Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/api-docs/getting-started/list-shipments-and-containers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords:
- "shipment data"
- "container data"
---
## Shipment and Container Data in Terminal49
## Shipment and container data in Terminal49

After you've successfully made a tracking request, Terminal49 will begin to track shipments and store relevant information about that shipment on your behalf.

Expand All @@ -22,7 +22,7 @@ You can access data about shipments and containers on your tracked shipments any

Keep in mind, however, that apart from initialization code, you would not usually access shipment data in this way. You would use Webhooks (described in the next section). A Webhook is another name for a web-based callback URL, or a HTTP Push API. They provide a method for an API to post a notification to your service. Specifically, a webhook is simply a URL that can receive HTTP Post Requests from the Terminal49 API.

## List all your Tracked Shipments
## List all your tracked shipments

If your tracking request was successful, you will now be able to list your tracked shipments.

Expand Down Expand Up @@ -58,7 +58,7 @@ This means you send your API Key as your token in every request.
Webhooks are associated with API tokens, and this is how the Terminal49 knows who to return relevant shipment information to.


## Anatomy of Shipments JSON Response
## Anatomy of shipments JSON response

Here's what you'll see come back after you get the /shipments endpoint.

Expand Down Expand Up @@ -130,7 +130,7 @@ You can write code to access these structured elements from the API. The advanta
}
```

## Sample Code: Listing Tracked Shipment into a Google Sheet
## Sample code: listing tracked shipments in a Google Sheet

Below is code written in Google App Script that lists the current shipments into the current sheet of a spreadsheet. App Script is very similar to Javascript.

Expand Down Expand Up @@ -213,7 +213,7 @@ function listShipmentValues(shipment_values){
```


## List all your Tracked Containers
## List all your tracked containers

You can also list out all of your Containers. Container data includes terminal availability, last free day, holds, fees, and other logistical information that you might use for drayage operations at port.

Expand All @@ -237,7 +237,7 @@ To learn how to use holds and fees data to determine if a container is ready for
}
```

## Anatomy of Containers JSON Response
## Anatomy of containers JSON response
Now that you've got a list of containers, let's examine the response you've received.

```jsx
Expand Down
16 changes: 8 additions & 8 deletions docs/api-docs/getting-started/receive-status-updates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ keywords:
- "shipment events"
- "container events"
---
## Using Webhooks to Receive Status Updates
## Using webhooks to receive status updates

Terminal49 posts status updates to a webhook that you register with us.

A Webhook is another name for a web-based callback URL, or a HTTP Push API. They provide a method for an API to post a notification to your service. Specifically, a webhook is simply a URL that can receive HTTP Post Requests from the Terminal49 API.

The HTTP Post request from Terminal49 has a JSON payload which you can parse to extract the relevant information.

## How do I use a Webhook with Terminal49?
## How do I use a webhook with Terminal49?

First, you need to register a webhook. You can register as many webhooks as you like. Webhooks are associated with your account. All updates relating to that account are sent to the Webhook associated with it.

Expand All @@ -37,7 +37,7 @@ This means you send your API Key as your token in every request.

Webhooks are associated with API tokens, and this is how the Terminal49 knows who to return relevant shipment information to.

## Anatomy of a Webhook Notification
## Anatomy of a webhook notification

Here's what you'll see in a Webhook Notification, which arrives as a POST request to your designated URL.

Expand Down Expand Up @@ -156,7 +156,7 @@ You can find what type of event you have received by looking at the "attributes"
}
```

### Inclusions: Tracking Requests & Shipment Data
### Inclusions: tracking requests and shipment data

When a tracking request has succeeded, the webhook event **includes** information about the shipment, the containers in the shipment, and the milestones for that container, so your app can present this information to your end users without making further queries to the API.

Expand Down Expand Up @@ -227,9 +227,9 @@ Some objects have **relationships**. These are simply links to another object. T
]
```

## Code Examples
## Code examples

### Registering a Webhook
### Registering a webhook

```jsx
function registerWebhook(){
Expand Down Expand Up @@ -257,7 +257,7 @@ function registerWebhook(){
}
```

### Receiving a Post Webhook
### Receiving a POST webhook

Here's an example of some Javascript code that receives a Post request and parses out some of the desired data.

Expand Down Expand Up @@ -307,7 +307,7 @@ function isTrackingRequest(item){
}
```

## Try It Out & See More Sample Code
## Try it out and see more sample code

Update your API key below, and register a simple Webhook.

Expand Down
2 changes: 1 addition & 1 deletion docs/api-docs/getting-started/start-here.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Our APIs can be used with any HTTP client; choose your favorite! We love Postman
</Card>

***
## Get an API Key
## Get an API key
Sign in to your Terminal49 account and go to your [developer portal](https://app.terminal49.com/developers/api-keys) page to get your API key.

### Authentication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords:
- "booking tracking"
- "container tracking"
---
## What is a Tracking Request?
## What is a tracking request?

Your tracking request includes two pieces of data:

Expand Down Expand Up @@ -44,7 +44,7 @@ You can see a complete list of supported SCACs in row 2 of the Carrier Data Matr
- Seal numbers
- Internally generated numbers, for example PO numbers or customer reference numbers.

## How do I use Tracking Requests?
## How do I use tracking requests?

Terminal49 is an event-based API, which means that the API can be used asynchronously. In general the data flow is:

Expand Down Expand Up @@ -86,7 +86,7 @@ Support [dev@terminal49.com](mailto:dev@terminal49.com)
Authorization: Token YOUR_API_KEY
```

## How to Create a Tracking Request
## How to create a tracking request

Here is javascript code that demonstates sending a tracking request

Expand Down Expand Up @@ -116,7 +116,7 @@ fetch("https://api.terminal49.com/v2/tracking_requests", {
});
```

## Anatomy of a Tracking Request Response
## Anatomy of a tracking request response

Here's what you'll see in a Response to a tracking request.

Expand Down Expand Up @@ -174,7 +174,7 @@ The Terminal49 API is JSON API compliant, which means that there are nifty libra

</Info>

## Try It: Make a Tracking Request
## Try it: make a tracking request

Try it using the request maker below!

Expand Down Expand Up @@ -217,7 +217,7 @@ It is entirely possible that's neither us nor you but the shipping line is givin
}
```

## Try It: List Your Active Tracking Requests
## Try it: list your active tracking requests

We have not yet set up a webook to receive status updates from the Terminal49 API, so we will need to manually poll to check if the Tracking Request has succeeded or failed.

Expand All @@ -234,7 +234,7 @@ We have not yet set up a webook to receive status updates from the Terminal49 AP
}
```

## Next Up: Get your Shipments
## Next up: get your shipments

Now that you've made a tracking request, let's see how you can list your shipments and retrieve the relevant data.

Expand Down
14 changes: 7 additions & 7 deletions docs/api-docs/in-depth-guides/auto-detect-carrier.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ But what if you don't know the SCAC? That's where the Infer API comes in.
the carrier. Now this same intelligence is available via API.
</Card>

## Why SCAC Matters
## Why SCAC matters

To track a shipment or container, Terminal49 needs to know **which shipping line to ask** (also called the vessel-operating common carrier (VOCC)).
The SCAC (Standard Carrier Alpha Code) we use here is the **shipping line SCAC for tracking** — i.e., the carrier operating the move we’re querying for events and shipment data.
Expand All @@ -44,7 +44,7 @@ The SCAC (Standard Carrier Alpha Code) we use here is the **shipping line SCAC f
increase the likelihood your tracking request succeeds.
</Info>

## How the Infer API Helps
## How the Infer API helps

Submit any tracking number, and the API returns:

Expand All @@ -68,7 +68,7 @@ Submit any tracking number, and the API returns:
</Step>
</Steps>

## Examples by Number Type
## Examples by number type

<Tabs>
<Tab title="Container Number" icon="box">
Expand Down Expand Up @@ -275,7 +275,7 @@ Submit any tracking number, and the API returns:
</Tab>
</Tabs>

## Understanding the Response
## Understanding the response

<AccordionGroup>
<Accordion title="Decision Types Explained" icon="code-branch" defaultOpen>
Expand Down Expand Up @@ -324,7 +324,7 @@ Submit any tracking number, and the API returns:
</Accordion>
</AccordionGroup>

## Integration Guide
## Integration guide

For developers implementing this API, here are code examples in different languages:

Expand Down Expand Up @@ -417,7 +417,7 @@ curl -X POST https://api.terminal49.com/v2/tracking_requests/infer_number \
</Tab>
</Tabs>

## Rate Limits
## Rate limits

| Setting | Value |
| ------------------- | ----------------------- |
Expand All @@ -429,7 +429,7 @@ curl -X POST https://api.terminal49.com/v2/tracking_requests/infer_number \
header to avoid extended throttling.
</Warning>

## What's Next?
## What's next?

<CardGroup cols={2}>
<Card
Expand Down
10 changes: 5 additions & 5 deletions docs/api-docs/in-depth-guides/container-statuses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ keywords:
---
The `current_status` attribute on container objects provides a high-level view of where a container is in its journey. This guide explains the different status values and their meanings.

## Available Status Values
## Available status values

The `current_status` field can have one of the following values:

Expand Down Expand Up @@ -70,9 +70,9 @@ This status is specific to shipments with inland rail movements.
### loaded
**Not currently used** - This status value is defined but not actively used in the system.

## Important Considerations
## Important considerations

### Status Accuracy
### Status accuracy
The logic to derive container statuses is complex and involves processing data from multiple sources including:
- Shipping line updates
- Terminal systems
Expand All @@ -83,13 +83,13 @@ The logic to derive container statuses is complex and involves processing data f
- Cross-referencing with transport events
- Contacting the terminal directly for time-sensitive pickups

### Status Transitions
### Status transitions
Containers don't always follow a linear path through these statuses. For example:
- A container may go from `on_ship` directly to `available` if terminal data arrives quickly
- A container might alternate between `available` and `not_available` if holds are placed and removed
- The status may remain as `new` for some time if data from the shipping line is delayed

### API Usage
### API usage
To get the current status of a container, you can read the container's `current_status` attribute in your API responses:

```bash
Expand Down
12 changes: 6 additions & 6 deletions docs/api-docs/in-depth-guides/document-processing-workflows.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can submit documents in two ways:

Both follow the same customer-facing lifecycle: submit -\> classify -\> extract -\> webhook result.

## Workflow Diagrams
## Workflow diagrams

```mermaid
flowchart LR
Expand All @@ -34,7 +34,7 @@ flowchart LR
F --> G[Terminal49 sends webhook result]
```

## Workflow: Step-by-Step
## Workflow: step-by-step

<Steps>
<Step title="Submit document">
Expand All @@ -58,7 +58,7 @@ flowchart LR
Treat submission as asynchronous. Do not assume extraction is complete immediately after upload/email.
</Tip>

## Technical Implementation (One End-to-End Example)
## Technical implementation (one end-to-end example)

Example scenario: user uploads one file, `invoice.pdf`.

Expand Down Expand Up @@ -214,7 +214,7 @@ Response (`201`):

Use the webhook `event` and included `document` payload to update your internal record for that document.

## Webhooks You Should Handle
## Webhooks you should handle

| Event | Meaning |
| --- | --- |
Expand All @@ -230,7 +230,7 @@ Use the webhook `event` and included `document` payload to update your internal
Webhook event availability depends on your account configuration. If you are not receiving expected events, contact Terminal49 support.
</Info>

## APIs Involved
## APIs involved

- [`POST /documents`](/api-docs/api-reference/documents/upload-a-document)
- [`GET /documents`](/api-docs/api-reference/documents/list-documents)
Expand All @@ -241,6 +241,6 @@ Use the webhook `event` and included `document` payload to update your internal
- [`GET /document_schemas/{id}`](/api-docs/api-reference/document-schemas/get-a-document-schema)
- [`Document representations resource`](/api-docs/api-reference/document-representations/document-representations-resource)

## Planned (Not Live Yet)
## Planned (not live yet)

- `email_submission.created` webhook event after inbound email acceptance.
2 changes: 1 addition & 1 deletion docs/api-docs/in-depth-guides/event-timestamps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ then the local time of the `pod_arrived_at` timestamp would be `2022-12-22T07:00



## System Timestamps
## System timestamps
Timestamps representing changes within the Terminal49 system (e.g. `created_at`, `updated_at`, `terminal_checked_at`) are stored and represented in UTC and do not have a TimeZone.
Loading
Loading