Introduction
Welcome to the ALLINE Cross Border API Documentation!
The ALLINE Cross Border API allows you to perform cross border operations on the ALLINE system.
ALLINE Cross Border API is built using REST principles which ensures predictable URLs that makes writing applications easy. This API follows HTTP rules, enabling a wide range of HTTP clients which can be used to interact with the API.
Every resource is exposed as a URL. The URL of each resource can be obtained by accessing the API Root Endpoint https://crossborder.omniship.eu/api/v3/.
For example the Waybills resource is reachable at https://crossborder.omniship.eu/api/v3/waybills.
Requests and responses are JSON. Send Content-Type: application/json and Accept: application/json with every request; without Accept: application/json a validation error may be answered with a redirect instead of a 422 JSON response.
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "https://crossborder.omniship.eu/api/v3/<resource>"
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
Make sure to replace
FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvvwith your API key.
ALLINE uses bearer authentication to authenticate requests. Contact your ALLINE representative to receive a new ALLINE API access token.
In order to authenticate properly, please put Authorization: Bearer <API Access Token> in the request header. ALLINE expects for the API access token to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv
A request without a valid token is answered with 401 Unauthorized. The API accepts up to 10,000 requests per minute per token; above that it answers 429 Too Many Requests.
Shipping Methods
Example:
{
"name": "DEDHL",
"address": {
"company": "DHL Bochum",
"line_1": "Opelring 1",
"city": "Bochum",
"country": "DE",
"country_full": "Germany",
"is_pickup": false
},
"customer": "Acme"
}
A Shipping Method represents the destination that can be assigned to parcels by using the name attribute as shippingMethod when adding a parcel. A parcel can only use a shipping method whose pricing agreement is valid today.
| Attribute | Type | Description |
|---|---|---|
name |
string | Unique code to identify a Shipping Method. |
address |
Object | Address associated with the Shipping Method: company, line_1, city, country (Alpha 2), country_full and is_pickup. |
customer |
string | Customer associated with the Shipping Method. |
List all Shipping Methods
curl "https://crossborder.omniship.eu/api/v3/shipping_methods"
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
The above command returns JSON structured like this:
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
{
"data": [
{
"name": "DEDHL",
"address": {
"company": "DHL Bochum",
"line_1": "Opelring 1",
"city": "Bochum",
"country": "DE",
"country_full": "Germany",
"is_pickup": false
},
"customer": "Acme"
},
{
"name": "DEDP",
"address": {
"company": "Deutsche Post Essen",
"line_1": "Daniel-Eckhardt-Straße 7",
"city": "Essen",
"country": "DE",
"country_full": "Germany",
"is_pickup": false
},
"customer": "Acme"
},
{"..."},
{"..."}
]
}
This endpoint retrieves all Shipping Methods of your account.
HTTP Request
GET /api/v3/shipping_methods
Waybills
Example:
{
"data": {
"id": "1cb3480a-86d3-44f2-a36d-f082e501fd37",
"masterWaybillNumber": "112-60318215",
"transportType": "air",
"customer": "Acme",
"customer_code": "ACE",
"status": "created",
"statusChangeUtc": "2024-04-24T07:09:14+00:00",
"statusChangeLocalTime": "2024-04-24T09:09:14+02:00",
"statusChangedHuman": "1 second ago",
"bigBagCount": 1,
"grossWeight": 13.25,
"airline": {
"trackingLink": "https://www.skyteam.com/en/cargo/track-shipment/",
"name": "China Cargo Airlines",
"prefix": "112",
"code": "MU",
"copyNumber": "60318215"
},
"destinationFlightNumber": "CK210",
"flight_date": "2024-05-26",
"eta": "2024-05-26T00:00:00+02:00",
"declarationType": "full",
"parcels": [
"1Z1V510W6898496192"
],
"inboundComplete": false,
"totalBagsUploaded": 0,
"totalParcelsUploaded": 0,
"parcelsInbound": 0,
"parcelsInboundPercentage": "0%",
"parcelsReleased": 0,
"parcelsReleasedPercentage": "0 %",
"parcelsOutbound": 0,
"parcelsOutboundPercentage": "0%"
}
}
A Waybill is a document that represents the contents of a shipment ready for transport and processing. It details the exact quantity, price and delivery details of the individual packages. Perform the simple operations mentioned below to create and manage your Waybill pre alert.
| Attribute | Type | Description |
|---|---|---|
id |
string | Unique ID of a waybill. This is used as an identifier. The ID is either your own reference given at creation or generated by the system. |
masterWaybillNumber |
string | Identifies the total shipment. If transportType is air the number must have the format 123-12345678; the first three digits are the airline prefix. |
transportType |
string | The transport type of the waybill. Values are air, road, train, sea. |
customer |
string | Customer name of the account associated with the waybill. |
customer_code |
string | Code of the customer the waybill belongs to. |
status |
string | The current waybill status: pre_upload, created, noa_received, received, ready_to_scan, scanning..., pending_clearance, partial, inbound, part_out, outbound, failed. |
statusChangeUtc |
datetime | Date and time the waybill last changed, in UTC. |
statusChangeLocalTime |
datetime | Date and time the waybill last changed, in the local time of the warehouse (Europe/Amsterdam). |
statusChangedHuman |
string | Human readable time since the last change, for example 4 minutes ago. |
bigBagCount |
integer | The number of pieces (BigBags/Boxes/Units) expected for the shipment. |
grossWeight |
float | The given gross weight for the shipment. |
airline |
object | The airline of the incoming flight, with trackingLink, name, prefix, code and copyNumber. Only present when the waybill has an airline. |
destinationFlightNumber |
string | The incoming flight number to the destination airport. For the Alline warehouse the destination airport is Schiphol (AMS). |
flight_date |
date | The arrival date given at creation as eta, in format yyyy-mm-dd. |
eta |
datetime | The estimated arrival time at the destination airport, in local time. Updates automatically when a known flight number and arrival date are given. |
declarationType |
string | The type of customs declaration for the shipment: full, partial or none. |
parcels |
array | The finalMileTrackingNumber of every parcel added to the waybill. |
The attributes below are only present once the waybill is confirmed (status is not pre_upload).
| Attribute | Type | Description |
|---|---|---|
inboundComplete |
boolean | Indicates if the inbound scan is (temporarily) completed. |
totalBagsUploaded |
integer | The number of BigBags/Boxes/Units uploaded for this waybill. |
totalParcelsUploaded |
integer | The number of parcels uploaded for this waybill. |
parcelsInbound |
integer | The number of parcels currently in the warehouse. |
parcelsInboundPercentage |
string | The percentage of parcels currently in the warehouse, for example 25%. |
parcelsReleased |
integer | The number of parcels released by customs. |
parcelsReleasedPercentage |
string | The percentage of parcels released. Note: when none are released the value is 0 % (with a space). |
parcelsOutbound |
integer | The number of parcels outbound. |
parcelsOutboundPercentage |
string | The percentage of parcels outbound. |
Create a Waybill
curl "https://crossborder.omniship.eu/api/v3/waybills"
-X POST
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
-d '{
"masterWaybillNumber": "112-60318215",
"transportType": "air",
"grossWeight": 13.25,
"parcelCount": 1,
"bigBagCount": 1,
"destinationFlightNumber": "CK210",
"eta": "2024-05-26",
"declarationType": "full",
"waybillDocument": "JVBERi0xLjQKJeTjz9IKMyAwIG9iago8PC9MZW5ndGggNCAwIFIKL0ZpbHRlci9GbGF0ZURlY29kZQo+PgpzdHJlYW0KeJydlM1ymzAQx+96ij22B9uSAAnl5sbG02k+WpvJTE8dgmUPHQOJgHjch+ozdkUc18aQ4sIwArT72/9+AAOKJ8PLU+5QehCnhNXvBq8LPn8KyYBRCuEvMg0JtVZ253BTu9jTrMkzYS4w4QGjnkCGAqPJinwjtYe1oENfucg+WU48FW91RBmjwOriEK72r+czvAm3e8moQQHzFIQpqc1uyIdJHlepzkrIqvRRm4/hz1ePLhmY4TPhVFwk5UgBZ6wp4XZ+1y+so/w6rOO0l+6dsC51mmFDEy21QchKG53Fup8G6ey74LqXapDOefV1EZvkqUzyrF94X/r/G973z0qwKKOyKg6RRwFDTzoUQshzd44ZSLXftIw3QwR9zbdYxCU87mAWlXob7X4fUXk31Q6kI9uhwffre7h/0eYl0VsYwG2UJStdlCB9dyBQC/UUhSDZaFCMc0EZ9VUj7HkZbEQs4nETOB/9BfzA0grHY/8E1ZN8SuL87oaNAyG+TNnEV9N5Q44aOni0D6f09puIe7NDJKUeZkmldKiSnEoulNsLWk9bB3SdmE0BRZWUvVD15HSgoHefucvb+zyZYp/rZo9NmcQbXfRnem47czxbHGiwMnkK14sH+Jw+5absTxeinb6o0jQyO1jqeBOZyH6+PTXboeksRHPm3mN0JU4vYHSlF+zi/AqN5nqdFKX9sPGJ++KAxl/RH05bj5MKZW5kc3RyZWFtCmVuZG9iago0IDAgb2JqCjUzNgplbmRvYmoKMi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XRhbG9nCi9QYWdlcyAxIDAgUgo+PgplbmRvYmoKeHJlZgowIDE0CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwNTI5OCAwMDAwMCBuIAowMDAwMDAwNjQyIDAwMDAwIG4gCjAwMDAwMDAwMTUgMDAwMDAgbiAKMDAwMDAwMDYyMyAwMDAwMCBuIAowMDAwMDAxMDU4IDAwMDAwIG4gCjAwMDAwMDI0OTQgMDAwMDAgbiAKMDAwMDAwMzg4MiAwMDAwMCBuIAowMDAwMDAwNzUwIDAwMDAwIG4gCjAwMDAwMDA4NTEgMDAwMDAgbiAKMDAwMDAwMjMwMiAwMDAwMCBuIAowMDAwMDAzUjk1IDAwMDAwIG4gCjAwMDAwMDUxMTggMDAwMDAgbiAKMDAwMDAwNTM1MiAwMDAwMCBuIAp0cmFpbGVyCjw8L1NpemUgMTQKL1Jvb3QgMTMgMCBSCi9JbmZvIDkgMCBSCi9JRFs8RjIwNENBMUE5Nzg1ODdDRjE2QUFDQkNGQ0M4ODg5QkT+PEYyMDRDQTFBOTc4NTg3Q0YxNkFBQ0JDRkNDODg4OUJEPl0KPj4Kc3RhcnR4cmVmCjU0MDAKJSVFT0YL"
}'
The above command returns JSON structured like this:
HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"data": {
"id": "1cb3480a-86d3-44f2-a36d-f082e501fd37",
"masterWaybillNumber": "112-60318215",
"transportType": "air",
"customer": "Acme",
"customer_code": "ACE",
"status": "pre_upload",
"statusChangeUtc": "2024-04-24T07:03:54+00:00",
"statusChangeLocalTime": "2024-04-24T09:03:54+02:00",
"statusChangedHuman": "1 second ago",
"bigBagCount": 1,
"grossWeight": 13.25,
"airline": {
"trackingLink": "https:\/\/www.skyteam.com\/en\/cargo\/track-shipment\/",
"name": "China Cargo Airlines",
"prefix": "112",
"code": "MU",
"copyNumber": "60318215"
},
"destinationFlightNumber": "CK210",
"flight_date": "2024-05-26",
"eta": "2024-05-26T00:00:00+02:00",
"declarationType": "full",
"parcels": []
}
}
This endpoint creates a new Waybill pre alert in ALLINE cross border. The waybill starts in status pre_upload: add its parcels with Create and add a Parcel to a Waybill, then confirm it.
Sending the same masterWaybillNumber and transportType again before any parcel of the waybill has been uploaded updates the existing waybill instead of creating a second one.
Unless declarationType is none, the request is refused with 402 Payment Required when your clearance balance is depleted.
HTTP Request
POST /api/v3/waybills
Arguments
| Attribute | Type | Description |
|---|---|---|
| masterWaybillNumber | string | required Number of the waybill. It cannot already exist for the same customer once parcels have been uploaded for it. If transportType is air it must have the format 123-12345678, and the first three digits must be a known airline prefix. |
| reference | string | optional Your own unique reference of the waybill. It cannot already exist for the same customer. If set, the reference is the ID of the Waybill in all further requests; otherwise an ID is generated. |
| customerCode | string | The code of the customer the waybill belongs to. Only required if your account may create waybills for several customers. |
| transportType | string | required The transport type of the waybill. Valid values are air, road, train, sea. |
| grossWeight | float | required The gross weight for the shipment in kg, at least 1. Should be the same as the gross weight on the Air Waybill copy. |
| parcelCount | integer | required The number of parcels contained in the shipment, at least 1. |
| bigBagCount | integer | required The number of bigBags/Boxes/Units contained in the shipment, at least 1. The waybill can only be confirmed once this many bags have been added. |
| destinationFlightNumber | string | optional The incoming flight number to the destination airport, for example CK210 or KE0925. For the Alline warehouse the destination airport is Schiphol (AMS). |
| eta | date | optional The estimated arrival date at the destination airport, in the timezone of the destination, in format yyyy-mm-dd. |
| declarationType | string | optional Indicates if Alline should process the customs declaration for this shipment. Valid values are full, partial, none. Default is full. partial and none are only accepted for accounts allowed to upload without a full customs declaration. |
| waybillDocument | base64_string | required Base64 encoded PDF, JPG or PNG file of the Waybill Document of the shipment. |
| unionGoods | boolean | Required if declarationType is partial or none. Whether the goods Alline does not declare are union goods (goods already in free circulation in the EU). |
| unionProof | base64_string | Required if unionGoods is true. Base64 encoded Excel or CSV file listing the parcel ids and their MRN numbers. |
| onwardTransit | object | optional Onward Transit object: forward the undeclared goods on a T1 transit document. Only allowed when declarationType is partial or none and unionGoods is false. |
Onward Transit object definitions:
Every field you leave out is taken from the T1 defaults stored for your account; when all defaults are set, an empty object {} is enough.
| Field Name | Type | Description |
|---|---|---|
consignee |
object | required The consignee of the T1, with name (required, max 255), street (required, max 255), postalCode (optional, max 20), city (required, max 255), country (required, Alpha 2 country code) and eori (optional, max 20). |
officeOfDestination |
string | required The customs office of destination: an 8-character office reference, the country code followed by 6 characters, as listed in the customs office list (codebook table 141). |
goodsDescription |
string | required Description of the goods, max 255 characters. |
hsCode |
string | required HS code of the goods, 6 to 10 digits. |
etd |
date | optional Estimated departure date. |
eta |
date | optional Estimated arrival date, not before etd. |
transportCosts |
string | optional Transport costs, max 50 characters. |
Retrieve a Specific Waybill
curl "https://crossborder.omniship.eu/api/v3/waybills/4dcdea18-afb4-4c38-8541-9b83056a5667"
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
The above command returns JSON structured like this:
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
{
"data": {
"id": "1cb3480a-86d3-44f2-a36d-f082e501fd37",
"masterWaybillNumber": "112-60318215",
"transportType": "air",
"customer": "Acme",
"customer_code": "ACE",
"status": "created",
"statusChangeUtc": "2024-04-24T07:09:14+00:00",
"statusChangeLocalTime": "2024-04-24T09:09:14+02:00",
"statusChangedHuman": "4 minutes ago",
"bigBagCount": 1,
"grossWeight": 13.25,
"airline": {
"trackingLink": "https:\/\/www.skyteam.com\/en\/cargo\/track-shipment\/",
"name": "China Cargo Airlines",
"prefix": "112",
"code": "MU",
"copyNumber": "60318215"
},
"destinationFlightNumber": "CK210",
"flight_date": "2024-05-26",
"eta": "2024-05-26T00:00:00+02:00",
"declarationType": "full",
"parcels": [
"1Z1V510W6898496192"
],
"inboundComplete": false,
"totalBagsUploaded": 1,
"totalParcelsUploaded": 1,
"parcelsInbound": 0,
"parcelsInboundPercentage": "0%",
"parcelsReleased": 0,
"parcelsReleasedPercentage": "0 %",
"parcelsOutbound": 0,
"parcelsOutboundPercentage": "0%"
}
}
This endpoint retrieves a specific Waybill.
HTTP Request
GET /api/v3/waybills/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | Alline Waybill ID provided when creating the Waybill. The ID was given at creation of the waybill and was either generated or is the given reference. |
Create and add a Parcel to a Waybill
curl "https://crossborder.omniship.eu/api/v3/waybills/4dcdea18-afb4-4c38-8541-9b83056a5667/parcels"
-X POST
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
-d '{
"transactionType": "B2C",
"finalMileTrackingNumber": "1Z1V510W6898496192",
"bigBagBarcode": "DE202301009-001",
"sellerDetails": {
"name": "Shenzhen Duhua technology Co., LTD",
"street": "Room 402, Building 2, Building B, No. 23 Wanli Road, Henggang Street",
"zipcode": "51800",
"city": "Shenzen",
"countryCode": "CN",
"iossNumber": "1ZoTwmSCWm/iQY3utehUVQ=="
},
"buyerDetails": {
"name": "juan luis garcia azpitarte",
"street": "pol. ind. calle tinajuela 39 18657 niguelas Granada Spain",
"zipcode": "18657",
"city": "Niguelas",
"countryCode": "ES"
},
"packageWeight": 23.5,
"items": [{
"hsCode": "950691",
"description": "DUMBBELL SET",
"quantity": 4,
"weight": 22.95,
"invoiceCurrency": "EUR",
"invoiceAmount": 119.99,
"freightValue": 3.30,
"productPids": [
{ "sku": "DB-SET-4X5", "manufacturerProductId": "MPN-4471", "standardProductId": "8712345678906" },
{ "sku": "DB-RACK-1", "manufacturerProductId": "MPN-4480", "standardProductId": null }
]
}],
"shippingMethod": "DPD145"
}'
The above command returns JSON structured like this:
HTTP/1.1 201 Created
Content-Type:application/json;charset=UTF-8
{
"data": {
"id": "711277a6-239b-4992-ab4a-cac276a27e21",
"state": "pre_upload",
"waybillId": "1cb3480a-86d3-44f2-a36d-f082e501fd37",
"waybillNumber": "112-60318215",
"finalMileTrackingNumber": "1Z1V510W6898496192",
"bigBagBarcode": "DE202301009-001",
"shippingMethod": "DPD145",
"transactionType": "B2C",
"invoiceNumber": null,
"sellerDetails": {
"name": "Shenzhen Duhua technology Co., LTD",
"street": "Room 402, Building 2, Building B, No. 23 Wanli Road, Henggang Street",
"zipcode": "51800",
"city": "Shenzen",
"countryCode": "CN"
},
"buyerDetails": {
"name": "juan luis garcia azpitarte",
"street": "pol. ind. calle tinajuela 39 18657 niguelas Granada Spain",
"zipcode": "18657",
"city": "Niguelas",
"countryCode": "ES"
},
"packageWeight": null,
"items": [
{
"hsCode": "950691",
"description": "DUMBBELL SET",
"quantity": "4",
"weight": 22.95,
"invoiceCurrency": "EUR",
"invoiceAmount": "119.99",
"freightValue": "3.30",
"productPids": [
{ "sku": "DB-SET-4X5", "manufacturerProductId": "MPN-4471", "standardProductId": "8712345678906" },
{ "sku": "DB-RACK-1", "manufacturerProductId": "MPN-4480", "standardProductId": null }
]
}
]
}
}
This endpoint creates a new Parcel and adds it to the given Waybill pre alert in the ALLINE cross border system. Each item becomes one declaration line.
Sending a parcel again with the same finalMileTrackingNumber and bigBagBarcode replaces it: its items are overwritten in order, and items left out are removed. The response packageWeight stays null until the waybill is confirmed.
HTTP Request
POST /api/v3/waybills/<ID>/parcels
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the Waybill for which a Parcel needs added. The ID was given at creation of the waybill and was either generated or is the given reference. |
Arguments
| Attribute | Type | Description |
|---|---|---|
| transactionType | string | required Type of transaction. Valid values are B2C and H2C (high value e-commerce, above €150). |
| invoiceNumber | string | optional Invoice number of the parcel, max 70 characters. Required if transactionType is H2C and the parcel is worth more than €150. |
| finalMileTrackingNumber | string | required Tracking number of the final mile parcel. Max 35 characters: letters, digits, - and /. |
| bigBagBarcode | string | required Barcode of the bag/box/unit containing the parcel(s). If there is only one parcel and no containing unit with a barcode, the finalMileTrackingNumber can be used instead. All parcels in one bag must use the same shipping method, unless your account allows mixed bags. |
| sellerDetails | object | required Address object that should be used as sender address. |
| buyerDetails | object | required Address object that should be used as buyer address. |
| packageWeight | float | optional The total weight of the package in kg. |
| items | array | required Array of Customs Item objects with details of the products in the shipment for customs. |
| shippingMethod | string | required The name of one of your Shipping Methods with a pricing agreement that is valid today. |
A single parcel worth more than €150 is checked at once: as B2C it is refused (unless your account is exempt); as H2C every item needs a 10 digit HS code and the parcel an invoiceNumber. The confirm checks all parcels of one buyer together.
Address Object definitions:
| Field Name | Type | Description |
|---|---|---|
name |
string | required Address contact name. Max 70 characters. |
street |
string | required Address street line. Max 70 characters; for the buyer at least 3. |
zipcode |
string | Seller: required, letters and digits with at most one - or /. Buyer: required if the country uses postal codes, and it must match that country's format. |
city |
string | required Address city. Max 35 characters; for the buyer at least 3. |
countryCode |
string | required Address country code in Alpha 2 Format (ISO 3166-1). |
eori |
string | optional Only for buyerDetails. EORI number of the buyer, max 17 characters. |
iossNumber |
string | Only for sellerDetails. Required if the waybill's declarationType is full. Format IM followed by 10 digits. |
Names, streets and cities accept printable ASCII characters except ; and ~. The buyer's name and street also may not contain <, =, >, ? or @.
CustomsItem definitions:
| Field Name | Type | Description |
|---|---|---|
hsCode |
string | required Harmonized Tariff Code of the item being shipped. It must be a known code that Alline accepts. 6 digits for B2C; 10 digits (TARIC) for H2C. |
description |
string | required Description of the item being shipped. Max 512 characters. |
quantity |
integer | required Quantity of the item, at least 1. |
weight |
float | required The weight of the item in kg, at least 0.001, at most 3 decimals. |
invoiceCurrency |
string | required The currency of the item value, as ISO 4217 code (for example EUR). |
invoiceAmount |
float | required Total value of the item line, at least 0.01. |
freightValue |
float | optional Freight value of the item line. |
productPids |
array | required from 1 November 2026, optional before. The products on this item: an array of 1 to 33 Product PID objects. |
Product PID definitions:
From 1 November 2026 EU customs requires product identification on every e-commerce declaration line: for every product its merchant product id (C127) and its manufacturer product id (C128), and its standard product id (C129) when it has one. A product without a C129 is declared with Y081.
| Field Name | Type | Description |
|---|---|---|
sku |
string | required from 1 November 2026, optional before. Merchant product identification (M-PID, C127): the webshop SKU or ASIN. |
manufacturerProductId |
string | required from 1 November 2026, optional before. Manufacturer product identification (NS-PID, C128): the model or part number. |
standardProductId |
string | optional Standardised product identification (S-PID, C129): one valid EAN/GTIN-8/12/13/14, UPC or ISBN. When the product has none, leave the key out or send null, "" or "null". |
sku and manufacturerProductId hold at most 70 printable ASCII characters each, without ,, ; and ". No other keys are accepted in a product, and a product needs at least one of the three values.
In the response every item carries its products as productPids: an empty array when the item has no product identification.
Remove a Parcel from a Waybill
A parcel can only be removed from a waybill while the waybill is not yet confirmed (status pre_upload). Otherwise the request is answered with 403 Forbidden; a parcel that is not on the given waybill gives 404 Not Found.
curl "https://crossborder.omniship.eu/api/v3/waybills/4dcdea18-afb4-4c38-8541-9b83056a5667/parcels/a51133c1-a0a4-4867-9507-18a6082aaacc"
-X DELETE
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
The above command returns JSON structured like this:
HTTP/1.1 204 No Content
Content-Type:application/json;charset=UTF-8
HTTP Request
DELETE /api/v3/waybills/<WaybillID>/parcels/<ParcelID>
URL Parameters
| Parameter | Description |
|---|---|
| WaybillID | The ID of the Waybill from which a Parcel needs to be removed. The ID was given at creation of the waybill and was either generated or is the given reference. |
| ParcelID | The id of the Parcel to be removed, as returned when the parcel was added (not the finalMileTrackingNumber). |
Confirm a Waybill upload
curl "https://crossborder.omniship.eu/api/v3/waybills/4dcdea18-afb4-4c38-8541-9b83056a5667/confirm"
-X PUT
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
The above command returns JSON structured like this:
HTTP/1.1 200 OK
Content-Type:application/json;charset=UTF-8
{
"data": {
"id": "1cb3480a-86d3-44f2-a36d-f082e501fd37",
"masterWaybillNumber": "112-60318215",
"transportType": "air",
"customer": "Acme",
"customer_code": "ACE",
"status": "created",
"statusChangeUtc": "2024-04-24T07:09:14+00:00",
"statusChangeLocalTime": "2024-04-24T09:09:14+02:00",
"statusChangedHuman": "4 minutes ago",
"bigBagCount": 1,
"grossWeight": 13.25,
"airline": {
"trackingLink": "https:\/\/www.skyteam.com\/en\/cargo\/track-shipment\/",
"name": "China Cargo Airlines",
"prefix": "112",
"code": "MU",
"copyNumber": "60318215"
},
"destinationFlightNumber": "CK210",
"flight_date": "2024-05-26",
"eta": "2024-05-26T00:00:00+02:00",
"declarationType": "full",
"parcels": [
"1Z1V510W6898496192"
],
"inboundComplete": false,
"totalBagsUploaded": 1,
"totalParcelsUploaded": 1,
"parcelsInbound": 0,
"parcelsInboundPercentage": "0%",
"parcelsReleased": 0,
"parcelsReleasedPercentage": "0 %",
"parcelsOutbound": 0,
"parcelsOutboundPercentage": "0%"
}
}
This endpoint confirms a new AirWaybill in ALLINE cross border after all parcels have been added through the add-parcel endpoint and the waybill is ready to be created and processed.
The waybill is confirmed only when:
- it is still in status
pre_upload(otherwise:The waybill is already confirmed.); - the number of bags added (distinct
bigBagBarcodevalues) equals thebigBagCountgiven at creation; - every parcel has a shipping method, and all parcels in one bag share the same shipping method (unless your account allows mixed bags);
- the transaction types fit the parcel values: when the parcels of one buyer are worth more than €150 together they must be
H2C, with a 10 digit HS code on every item and aninvoiceNumber.
Otherwise the request is answered with 422. Errors about a parcel are keyed by its finalMileTrackingNumber, for example parcels.1Z1V510W6898496192.shippingMethod, parcels.1Z1V510W6898496192.transactionType, parcels.1Z1V510W6898496192.invoiceNumber or parcels.1Z1V510W6898496192.items.0.hsCode.
HTTP Request
PUT /api/v3/waybills/<ID>/confirm
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the Waybill to confirm. The ID was given at creation of the waybill and was either generated or is the given reference. |
Delete a Waybill
A Waybill can only be removed while its status is pre_upload or created. In any other status the request is answered with 403 Forbidden.
curl "https://crossborder.omniship.eu/api/v3/waybills/4dcdea18-afb4-4c38-8541-9b83056a5667"
-X DELETE
-H "Authorization: Bearer FkihCtzyXWvutSRUaaEupN8hvABcDefgHI6lJKvv"
-H "Content-Type: application/json"
The above command returns JSON structured like this:
HTTP/1.1 204 No Content
Content-Type:application/json;charset=UTF-8
HTTP Request
DELETE /api/v3/waybills/<ID>
URL Parameters
| Parameter | Description |
|---|---|
| ID | The ID of the Waybill that needs to be deleted. The ID was given at creation of the waybill and was either generated or is the given reference. |
Webhooks
ALLINE can send webhook events to notify your application when a waybill or parcel changes status, so you do not need to poll our API. Your account representative sets up the URL that receives the events.
Each event is sent as an HTTP POST with a JSON body. Your endpoint should answer with a 2xx status within 3 seconds; otherwise the event is sent again, up to 3 attempts in total, with an increasing delay between them.
Verifying the signature
Every event carries the header X-ALLINE-SIGNATURE: the HMAC-SHA256 of the raw request body, hex encoded, with your signing key as the key. You get the signing key from your account representative. Compute the same HMAC over the body you received and compare it with the header to check that the event comes from ALLINE and was not changed.
# PHP example
$expected = hash_hmac('sha256', $rawBody, $signingKey);
$valid = hash_equals($expected, $request->header('X-ALLINE-SIGNATURE'));
Webhooks parcel.state.updated
When the status of one of your parcels changes, you'll get the event payload as below:
{
"eventType": "parcel.state.updated",
"resourceType": "parcel",
"resourceId": "a51133c1-a0a4-4867-9507-18a6082aaacc",
"parcel": {
"finalMileTrackingNumber": "1Z1V510W6898496192",
"parcelState": "cb_import_customs_finished",
"importMrn": "26NL0001234567890A",
"freightValue": "3.30",
"packageWeight": 23.5,
"currency": "EUR",
"inboundUtc": "2024-05-26T12:03:26+00:00",
"inboundLocalTime": "2024-05-26T14:03:26+02:00",
"releasedUtc": "2024-05-26T13:15:02+00:00",
"releasedLocalTime": "2024-05-26T15:15:02+02:00",
"outboundUtc": null,
"outboundLocalTime": null,
"lastUpdatedUtc": "2024-05-26T13:15:02+00:00",
"lastUpdatedLocalTime": "2024-05-26T15:15:02+02:00"
}
}
resourceId is the parcel id returned when the parcel was added. importMrn is the MRN of the import declaration once there is one. The dates are null until the step has happened.
| parcelState | Meaning |
|---|---|
created |
The parcel is known but not yet received. |
cb_transport_destination_port |
The parcel arrived in the warehouse. |
cb_import_customs_start |
Customs clearance started. |
cb_import_customs_inspection |
Customs selected the parcel for inspection. |
cb_import_customs_finished |
Customs released the parcel. |
cb_transport_handover |
The released parcel left the warehouse (outbound). |
cb_import_customs_exception |
Customs raised an exception or confiscated the parcel. |
cb_import_customs_failure |
The parcel was destroyed. |
Other internal states may be sent as they are.
Webhooks waybill.state.updated
When the status of one of your waybills changes, you'll get the event payload as below:
{
"eventType": "waybill.state.updated",
"resourceType": "waybill",
"resource_id": 123456,
"waybill": {
"number": "180-19687301",
"customer": "Acme",
"waybill_state": "created",
"updated_at_utc": "2024-05-26T12:05:32+00:00",
"updated_at_local_time": "2024-05-26T14:05:32+02:00"
}
}
waybill.number is the masterWaybillNumber. resource_id is an internal number of the waybill, not its id in the API: match events on waybill.number.
waybill_state takes the values of the Waybill status, except that the customs stage is sent as on_hold (the API reports it as pending_clearance).
Errors
The Cross Border API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 401 | Unauthorized -- Your API token is missing or wrong. |
| 402 | Payment Required -- Your clearance balance is depleted. Top up your balance to resume pre-alert uploads. |
| 403 | Forbidden -- The waybill is not yours, or its current state does not allow the action (for example deleting a confirmed waybill). |
| 404 | Not Found -- The specified resource could not be found. |
| 405 | Method Not Allowed -- The endpoint does not accept this HTTP method. |
| 422 | Unprocessable Entity -- The request contains invalid data. The response lists the errors per field. |
| 429 | Too Many Requests -- More than 10,000 requests per minute. |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
A 422 response looks like this:
{
"message": "The items.0.invoice currency XYZ is invalid. (and 1 more error)",
"errors": {
"items.0.invoiceCurrency": ["The items.0.invoice currency XYZ is invalid."],
"sellerDetails.iossNumber": ["The seller details.ioss number field is required."]
}
}
A 422 response holds a message and an errors object. Each key of errors is the path of the field in your request (for example items.0.hsCode for the HS code of the first item) and its value is a list of messages.
A 402 or 403 response holds an error object with a message:
{
"error": {
"message": "The current state of the waybill does not allow api deletion of the waybill."
}
}