The Shipsgo API is built on REST principles. Authenticated users can interact with any of our URIs by using the specified HTTP request method. Our API has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP response codes, authentication, and verbs.
All requests to Shipsgo API require you to authenticate yourself to the service. In order to do
this you must send X-Shipsgo-User-Token
header with the correct API token. If you don't have an
API token, you can create one from "Shipsgo API"
section on your dashboard.
If you use Shipsgo with multiple users (sub-accounts), API tokens are associated with a single user. Each account has different permission on API endpoints based on their role, similar to dashboard.
Role | Description |
---|---|
Full Access | View & manage (delete/update) all shipments of the company. |
Co-Worker | View & manage (delete/update) shipments only created by itself. |
Co-Worker Plus | View all shipments of the company, manage (delete/update) shipments only created by itself. |
If you want to check permissions of your users you can view/manage from "Sub Accounts" section on your dashboard.
Shipsgo uses conventional HTTP response codes to indicate the success or failure of an API request.
In general: Codes in the 2xx
range indicate success. Codes in the 4xx
range indicate an error that
failed given the information provided. Codes in the 5xx
range indicate an error with Shipsgo's servers
(these are rare).
Code | Description | Reason |
---|---|---|
200 |
Success | Everything went smooth. |
401 |
Unauthorized | Missing or invalid authentication token. |
402 |
Payment Required | Not enough credits. |
403 |
Forbidden | User not authorized to perform the operation. |
404 |
Not Found | Requested resource is not found. |
409 |
Conflict | The requested resource already exists. |
422 |
Unprocessable Content | Something with the payload isn't quite right, this could be malformed JSON or incorrect fields. |
429 |
Too Many Requests | Client has sent too many requests in a given amount of time. |
500 |
Internal Server Error | The server encountered an unexpected condition. |
503 |
Service Unavailable | The server is down for maintenance. This is a temporary state. |
The Shipsgo API uses a number of safeguards against bursts of incoming traffic to help maximize its stability.
For your company, the API rate limit is 100 requests per minute. This limit applies collectively across all
users within the company. You can use the headers that are sent with each response to determine the current status
of your rate limit. If you send many requests in a short window, you might see error responses with status code 429
.
Header | Description |
---|---|
X-RateLimit-Limit | The maximum number of requests that you can make per minute. |
X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
X-RateLimit-Reset | The time at which the current rate limit window resets, in UTC epoch seconds. |
All top-level API resources have support for bulk fetches. These list endpoints share a common structure for filtering, sorting and pagination. For example, you can list your air shipments with upcoming arrivals in order:
[GET] /air/shipments?filters[status]=eq:EN_ROUTE&order_by=date_of_rcf,asc
There are a variety of different filters that can be used to each list enpoint. Filters can be used together in
different combinations. When multiple filters are applied, they will be combined using the AND condition. Common
structure is filters[field]=operator:value(s)
. Each field
has corresponding operator
s. You can find the
field
& operator
mappings in the filters section of the relevant endpoint. The following operators are
supported:
Operator | Description |
---|---|
eq |
Equal to a specific value. |
not_eq |
Not equal to a specific value. |
contains |
Checks if the field value contains a specific substring. |
not_contains |
Checks if the field value does not contain a specific substring. |
in |
Checks if the field value is within a list of values (, separated). |
not_in |
Checks if the field value is not within a list of values (, separated). |
with |
Checks if the field value is within a list of values (, separated). |
without |
Checks if the field value is not within a list of values (, separated). |
gt |
Greater than a specific value. |
gte |
Greater than or equal to a specific value. |
lt |
Less than a specific value. |
lte |
Less than or equal to a specific value. |
between |
Checks if the field value is between two values (... separated). |
You can sort the list with order_by
parameter. Common structure is order_by=field,direction
. You can find the
available field
list in the order_by section of the relevant endpoint and direction
can be asc
(ascending)
or desc
(descending). If you omit the direction
, the default sort direction is asc
(ascending).
For the pagination you can use skip
& take
parameters with non-negative integer values.
The shipments list endpoint allows you to retrieve a list of airlines. This includes options to apply various filters and sorting.
Example #1: To filter the trackable airlines.
/air/airlines?filters[status]=eq:ACTIVE
Example #2: To filter airlines that contain ARABIA
in their name.
/air/airlines?filters[name]=contains:ARABIA
object <Dictionary<string, string>> You can use the following filters with their respective operators. Common structure is
| ||||||||||||||||
order_by | string You can sort the list with following fields. Common structure is
Note: By default the results are ordered by the | |||||||||||||||
skip | integer >= 0 The number of records to skip before returning the results. The default value is | |||||||||||||||
take | integer [ 1 .. 100 ] The number of records to return. The default value is |
message | string A message indicating the result ( | ||||||||
Array of objects List of shipments. | |||||||||
Array
| |||||||||
object Meta information about the returned list. | |||||||||
|
{- "message": "SUCCESS",
- "airlines": [
- {
- "iata": "AC",
- "name": "AIR CANADA",
- "status": "ACTIVE",
- "prefixes": [
- "014"
]
}, - {
- "iata": "AF",
- "name": "AIR FRANCE",
- "status": "ACTIVE",
- "prefixes": [
- "074",
- "057",
- "129"
]
}, - {
- "iata": "AA",
- "name": "AMERICAN AIRLINES",
- "status": "ACTIVE",
- "prefixes": [
- "001"
]
}, - {
- "iata": "EK",
- "name": "EMIRATES",
- "status": "ACTIVE",
- "prefixes": [
- "176"
]
}, - {
- "iata": "EY",
- "name": "ETIHAD AIRWAYS",
- "status": "ACTIVE",
- "prefixes": [
- "607"
]
}, - {
- "iata": "BA",
- "name": "IAG CARGO",
- "status": "ACTIVE",
- "prefixes": [
- "125",
- "075"
]
}, - {
- "iata": "LA",
- "name": "LATAM CARGO",
- "status": "ACTIVE",
- "prefixes": [
- "045",
- "957",
- "549",
- "145"
]
}, - {
- "iata": "LH",
- "name": "LUFTHANSA CARGO",
- "status": "ACTIVE",
- "prefixes": [
- "020",
- "220"
]
}, - {
- "iata": "QR",
- "name": "QATAR AIRWAYS",
- "status": "ACTIVE",
- "prefixes": [
- "157"
]
}, - {
- "iata": "TP",
- "name": "TAP AIR CARGO",
- "status": "ACTIVE",
- "prefixes": [
- "047"
]
}, - {
- "iata": "TK",
- "name": "TURKISH CARGO",
- "status": "ACTIVE",
- "prefixes": [
- "235"
]
}, - {
- "iata": "UA",
- "name": "UNITED CARGO",
- "status": "ACTIVE",
- "prefixes": [
- "016"
]
}
], - "meta": {
- "more": true,
- "total": null
}
}
This section provides a comprehensive set of endpoints to manage your air shipments.
First, you need to create the shipment, and after that, we will periodically check the shipment status and other relevant details. Our system will automatically track the shipment's progress and any changes, ensuring everything stays updated. You will be notified with updates and changes as needed, ensuring timely and accurate information about your shipment. You can also check your shipment details at any time, or use webhooks (available soon) to receive real-time updates.
This endpoint allows you to create a new shipment by providing the necessary shipment details. Once the shipment is successfully created, you need to save the given shipment identifier in your internal system to use it across the related endpoints.
If there is an another shipment with the same reference
and awb_number
, the shipment will not be created
(there is no cost), and the system will return a response (409
- ALREADY_EXISTS
) indicating details of the
existing shipment. If you don't provide a reference
field on your request, the system will only check with
the awb_number
.
Note: If you want to add a follower or tag to the existing shipment, you must make new request(s)
to related endpoints using the existing shipment's id
.
We process creation requests one by one for your company to prevent race conditions, such as misusing your credits
or creating unnecessary duplicate shipments. You don't need to take any action, this process is handled entirely by
Shipsgo system. However, sending too many concurrent requests can result in longer wait times and errors
(429
- TOO_MANY_CONCURRENT_REQUESTS
). If you plan to create a large number of shipments at once, ensure that
requests are sent synchronously.
reference | string [ 5 .. 128 ] characters Your reference to remember or classify the shipment. You can enter any numbers or letters. Note: Also it will be the default title of tracking notification emails. |
awb_number required | string^[0-9]{3}(-)?[0-9]{8}$ The Air Waybill (AWB) number provided by the airline and required to track the shipment. Note: To avoid any confusion, our system will standardize the AWB number with a
separating hyphen ( |
followers | Array of strings <= 10 items Email addresses subscribed to receive notifications about the shipment. |
tags | Array of strings <= 10 items [ items <= 64 characters ] A list of labels or keywords associated with the shipment. Used to include additional information to the shipment in order to differentiate, identify and categorise your shipments. |
X-Shipsgo-Credits-Cost | integer Example: "2" The amount of credit consumption for the operation. |
X-Shipsgo-Credits-Remaining | integer Example: "1000" The amount of credit remaining after the operation. |
message | string A message indicating the result ( | ||||||
object | |||||||
|
{- "reference": "INTERNAL_UNIQUE_IDENTIFIER",
- "awb_number": "333-88888888",
- "followers": [
- "customer-1@example.com",
- "customer-2@example.com"
], - "tags": [
- "IMPORT",
- "CUSTOMER_ABC"
]
}
{- "message": "SUCCESS",
- "shipment": {
- "id": 123456,
- "reference": "INTERNAL_UNIQUE_IDENTIFIER",
- "awb_number": "333-88888888"
}
}
The shipments list endpoint allows you to retrieve a list of your shipments (basic information). This includes
options to apply various filters and sorting. To access detailed information (status_extended
, movements
,
followers
, etc.) about a shipment, you should use the AIR - Details of the shipment endpoint.
Example #1: Ongoing (EN_ROUTE
) shipments carried by TURKISH CARGO (TK
) or LUFTHANSA CARGO (LH
)
with upcoming arrivals in order.
/air/shipments
?filters[status]=eq:EN_ROUTE
&filters[airline]=in:TK,LH
&order_by=date_of_rcf,asc
Example #2: Shipments that were shipped to India (IN
), between September 1, 2024, and
October 1, 2024 in order.
/air/shipments
?filters[destination_country]=eq:IN
&filters[date_of_dep]=between:2024-09-01...2024-10-01
&order_by=date_of_dep,asc
Example #3: Shipments tagged with COMPANY_ABC
and created by John Doe (john-doe@example.com
).
/air/shipments
?filters[tags]=with:COMPANY_ABC
&filters[creator]=eq:john-doe@example.com
object <Dictionary<string, string>> You can use the following filters with their respective operators. Common structure is
Note: You can specify a timezone for date fields; if no timezone is provided, they will be considered as UTC. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
order_by | string You can sort the list with following fields. Common structure is
Note: By default the results are ordered by the | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
skip | integer >= 0 The number of records to skip before returning the results. The default value is | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
take | integer [ 1 .. 100 ] The number of records to return. The default value is |
message | string A message indicating the result ( | ||||||||||||||||||||||||||
Array of objects List of shipments. | |||||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||||
object Meta information about the returned list. | |||||||||||||||||||||||||||
|
{- "message": "SUCCESS",
- "shipments": [
- {
- "id": 17,
- "reference": "ADEMQ-23514481",
- "awb_number": "624-88699667",
- "airline": {
- "iata": "PC",
- "name": "PEGASUS CARGO"
}, - "cargo": {
- "pieces": 33,
- "weight": 161.7,
- "volume": 1.13
}, - "status": "EN_ROUTE",
- "status_split": false,
- "route": {
- "origin": {
- "location": {
- "iata": "IST",
- "name": "Istanbul Airport",
- "timezone": "Europe/Istanbul",
- "country": {
- "code": "TR",
- "name": "Turkey"
}
}, - "date_of_dep": "2024-09-22T17:13:15+03:00"
}, - "ts_count": 1,
- "destination": {
- "location": {
- "iata": "HKG",
- "name": "Hong Kong International Airport",
- "timezone": "Asia/Hong_Kong",
- "country": {
- "code": "HK",
- "name": "Hong Kong"
}
}, - "date_of_rcf": "2024-09-23T20:17:15+08:00"
}, - "transit_time": 22,
- "transit_percentage": 99
}, - "tags": [
- {
- "id": 1001,
- "name": "IMPORT"
}, - {
- "id": 1002,
- "name": "CUSTOMER_ABC"
}
], - "creator": {
- "name": "John Doe",
- "email": "john-doe@example.com"
}, - "created_at": "2024-09-23 07:42:15",
- "updated_at": "2024-09-23 07:42:15",
- "checked_at": "2024-09-23 07:42:15",
- "discarded_at": null
}, - {
- "id": 16,
- "reference": null,
- "awb_number": "731-35484934",
- "airline": {
- "iata": "MF",
- "name": "XIAMEN AIRLINES"
}, - "cargo": {
- "pieces": 15,
- "weight": 46.5,
- "volume": 0.05
}, - "status": "EN_ROUTE",
- "status_split": false,
- "route": {
- "origin": {
- "location": {
- "iata": "IST",
- "name": "Istanbul Airport",
- "timezone": "Europe/Istanbul",
- "country": {
- "code": "TR",
- "name": "Turkey"
}
}, - "date_of_dep": "2024-09-22T18:05:15+03:00"
}, - "ts_count": 1,
- "destination": {
- "location": {
- "iata": "HKG",
- "name": "Hong Kong International Airport",
- "timezone": "Asia/Hong_Kong",
- "country": {
- "code": "HK",
- "name": "Hong Kong"
}
}, - "date_of_rcf": "2024-09-23T16:15:15+08:00"
}, - "transit_time": 17,
- "transit_percentage": 99
}, - "tags": [
- {
- "id": 1001,
- "name": "IMPORT"
}, - {
- "id": 1002,
- "name": "CUSTOMER_ABC"
}
], - "creator": {
- "name": "John Doe",
- "email": "john-doe@example.com"
}, - "created_at": "2024-09-23 07:42:15",
- "updated_at": "2024-11-11 11:55:56",
- "checked_at": "2024-09-23 07:42:15",
- "discarded_at": null
}, - {
- "id": 13,
- "reference": "VSSJG-36060957",
- "awb_number": "921-67562567",
- "airline": {
- "iata": "O3",
- "name": "SF AIRLINES"
}, - "cargo": {
- "pieces": 23,
- "weight": 25.3,
- "volume": 0.3
}, - "status": "EN_ROUTE",
- "status_split": false,
- "route": {
- "origin": {
- "location": {
- "iata": "IST",
- "name": "Istanbul Airport",
- "timezone": "Europe/Istanbul",
- "country": {
- "code": "TR",
- "name": "Turkey"
}
}, - "date_of_dep": "2024-09-22T11:36:15+03:00"
}, - "ts_count": 0,
- "destination": {
- "location": {
- "iata": "ICN",
- "name": "Incheon International Airport",
- "timezone": "Asia/Seoul",
- "country": {
- "code": "KR",
- "name": "South Korea"
}
}, - "date_of_rcf": "2024-09-22T21:26:15+09:00"
}, - "transit_time": 4,
- "transit_percentage": 99
}, - "tags": [
- {
- "id": 1001,
- "name": "IMPORT"
}, - {
- "id": 1002,
- "name": "CUSTOMER_ABC"
}
], - "creator": {
- "name": "John Doe",
- "email": "john-doe@example.com"
}, - "created_at": "2024-09-23 07:42:15",
- "updated_at": "2024-09-23 07:42:15",
- "checked_at": "2024-09-23 07:42:15",
- "discarded_at": null
}
], - "meta": {
- "more": false,
- "total": 3
}
}
This endpoint retrieves the details of an existing air shipment. It returns comprehensive information about the shipment. This allows users to track and monitor the shipment's progress and status in real-time.
shipment_id required | integer The unique identifier of the shipment. |
message | string A message indicating the result ( | ||||||||||||||||||||||||||||||||||||
object | |||||||||||||||||||||||||||||||||||||
|
{- "message": "SUCCESS",
- "shipment": {
- "id": 123456,
- "reference": "INTERNAL_UNIQUE_IDENTIFIER",
- "awb_number": "403-88888888",
- "airline": {
- "iata": "PO",
- "name": "POLAR AIR CARGO"
}, - "cargo": {
- "pieces": null,
- "weight": null,
- "volume": null
}, - "status": "INPROGRESS",
- "status_split": false,
- "status_extended": { },
- "route": null,
- "movements": [ ],
- "tokens": { },
- "followers": [
- {
- "id": 1001,
- "email": "customer-1@example.com"
}, - {
- "id": 1002,
- "email": "customer-2@example.com"
}
], - "tags": [
- {
- "id": 1001,
- "name": "IMPORT"
}, - {
- "id": 1002,
- "name": "CUSTOMER_ABC"
}
], - "creator": {
- "name": "John Doe",
- "email": "john-doe@example.com"
}, - "created_at": "2020-01-31 12:00:00",
- "updated_at": "2020-01-31 12:00:00",
- "checked_at": "2020-01-31 12:00:00"
}
}
This endpoint allows users to update the fields of an existing air shipment.
shipment_id required | integer The unique identifier of the shipment. |
reference | string Your reference to remember or classify the shipment. |
message | string A message indicating the result ( | ||||||
object | |||||||
|
{- "reference": "INTERNAL_UNIQUE_IDENTIFIER"
}
{- "message": "SUCCESS",
- "shipment": {
- "id": 123456,
- "reference": "INTERNAL_UNIQUE_IDENTIFIER",
- "awb_number": "333-88888888"
}
}
This endpoint allows users to delete an existing air shipment.
shipment_id required | integer The unique identifier of the shipment. |
message | string A message indicating the result ( |
{- "message": "SUCCESS"
}
This endpoint allows users to add a new follower to an existing air shipment.
shipment_id required | integer The unique identifier of the shipment. |
follower | string The new follower’s email address that you want to add to the shipment. |
message | string A message indicating the result ( | ||||
object | |||||
|
{- "follower": "customer-1@example.com"
}
{- "message": "SUCCESS",
- "follower": {
- "id": 1001,
- "email": "customer-1@example.com"
}
}
This endpoint allows users to remove an existing follower from an existing air shipment.
shipment_id required | integer The unique identifier of the shipment. |
follower_id required | integer The unique identifier of the follower. |
message | string A message indicating the result ( |
{- "message": "SUCCESS"
}
This endpoint allows users to add a tag to an existing air shipment.
shipment_id required | integer The unique identifier of the shipment. |
tag | string <= 64 characters The new tag (a label or keyword) that you want to add to the shipment. |
message | string A message indicating the result ( | ||||
object | |||||
|
{- "tag": "IMPORT"
}
{- "message": "SUCCESS",
- "tag": {
- "id": 1001,
- "name": "IMPORT"
}
}
This endpoint allows users to remove an existing tag from an existing air shipment.
shipment_id required | integer The unique identifier of the shipment. |
tag_id required | integer The unique identifier of the tag. |
message | string A message indicating the result ( |
{- "message": "SUCCESS"
}