This API provides an interface to create a new international shipment (import / export) at Aymakan.
This API only accepts POST requests.
https://dev-api.aymakan.com.sa/v2/shipping/create
https://api.aymakan.net/v2/shipping/create
The following headers should be sent along with the request
Your account security code / Api TokenBelow table list the request parameters which can be sent to Shipping Create API for international shipments.
{info} The request parameters should be sent in request body using JSON format.
| Parameter | Type | Required | Description |
|---|---|---|---|
| requested_by | String | Yes | The name of the person who is creating the shipping. It can be the employee name who is responsible for it |
| declared_value | Decimal | Yes | The amount of the order. This value is not visible on the shipping label. |
| declared_value_currency | String | No | The declared value currency. Default to SAR if no other currency is provided. Possible values are SAR, USD, AED. This value is not visible on the shipping label. |
| reference | AlphaNumeric | No | The order reference if available. It should be unique. If the reference number is already used a validation error will be returned The reference has already been taken |
| customer_tracking | String | No | Can be used to override Aymakan customer tracking with your own tracking number. Note: This won't work for all customers and you need to contact operations to activate this feature. |
| is_cod | Numeric (Bool) | No | Indicates whether the shipment is cash on delivery. |
| cod_amount | Decimal | No | The cash amount to collect from the receiver. |
| fulfilment_customer_name | String | Conditional | If customer is fufilment customer, then required, and customer has to provide their customer name in this field. Then this name will display on AWB. |
| currency | String | No | The currency of the amount. Default to SAR. |
| delivery_name | String | Yes | The delivery person name to whom that shipping will be delivered. |
| delivery_email | String | No | The delivery person email. It is optional, but if provided, then it should be valid email address. |
| delivery_city | String | Yes | A predefined city name of the delivery country. Please check the Cities API |
| delivery_address | String | Yes | Delivery address. |
| delivery_neighbourhood | String | No | City neighborhood for the delivery. |
| delivery_postcode | String | No | Delivery Post code |
| delivery_country | String | Yes | ISO Code for the country. For example AE for export, or SA for import. |
| delivery_phone | Number | Yes | Delivery Phone Number. Only digits should be provided |
| delivery_description | String | No | Any specific delivery description for that shipping |
| secondary_delivery_phone | Number | No | Second phone number for the receiver |
| delivery_national_address | Object | Conditional | Required for import shipments (delivery in Saudi Arabia). See National Address structure below |
| collection_national_address | Object | No | National address details for collection location. See National Address structure below |
| collection_name | String | Yes | The main collection or entity or business name who is creating the shipping |
| collection_email | String | No | The collection email |
| collection_city | String | Yes | Collection city name |
| collection_address | String | Yes | Collection point address, from where the shipping will be collected |
| collection_neighbourhood | String | No | City neighborhood for the Collection. |
| collection_postcode | String | No | Collection point post code |
| collection_country | String | Conditional | ISO Code for the country. Required for import (for example TR). Default to SA for export. |
| collection_phone | Number | Yes | Collection phone number. Phone number should be all numbers |
| collection_description | String | No | Any description for the collection of the shipping. |
| weight | Decimal | No | The weight of the shipment |
| length | Decimal | No | The length of the shipment in cm. Used for volumetric weight calculation |
| width | Decimal | No | The width of the shipment in cm. Used for volumetric weight calculation |
| height | Decimal | No | The height of the shipment in cm. Used for volumetric weight calculation |
| pieces | Integer | Yes | The total number of pieces that single shipping will have. For example, some shipping will have more items, which can't be enclosed in a single packaging, so it is possible to pack them in multiple cartons. Those number of cartons means pieces here. |
| items_count | Integer | No | The total number of physical items in the shipment |
| is_insured | boolean | No | If shipment is insured, set to 1. Default is 0. |
| international_metadata | Object | No | Invoice and tax details for the shipment. See International Metadata below |
| delivery_duty_type | String | No | DDU or DDP. |
| products | Array | No | Items in the shipment, used for customs. See Products below |
The service type is set automatically based on the countries:
| Code | Service Type | Description |
|---|---|---|
| EPX | Export Express | From Saudi Arabia to another country |
| IPX | Import Express | From another country to Saudi Arabia |
| IPXH | High Value Import Express | Import with declared_value of 1,000 SAR or more |
| Value | Description |
|---|---|
| DDU | Delivered Duty Unpaid. The receiver pays duties and VAT on delivery. |
| DDP | Delivered Duty Paid. The shipper pays duties and VAT. |
| Field | Type | Required | Description |
|---|---|---|---|
| sku | String | Yes | Item SKU |
| qty | Integer | Yes | Quantity |
| price | Decimal | Yes | Price per item |
| price_currency | String | No | Price currency. Default is SAR |
| description | String | No | Item description |
| hs_code | String | No | Customs HS code |
| origin_country | String | No | ISO code of the country where the item was made |
When using delivery_national_address or collection_national_address, provide an object with the following structure:
| Field | Type | Required | Description |
|---|---|---|---|
| short_code | String | Yes | The national address short code (e.g., "ABCD1234") |
| building_number | String | No | Building number from the national address |
| street_name | String | No | Street name from the national address |
| district | String | No | District/neighborhood name |
| city | String | No | City name |
| post_code | String | No | Postal code |
| additional_number | String | No | Additional number from the national address |
{warning} To be compatible with future API updates and releases, Please use the cities in the Cities API.
When creating international shipments, you can attach additional data via international_metadata.
| Field | Type | Required | Description |
|---|---|---|---|
| document_id | String | No | ID returned by Paperless Document Upload API. References the uploaded invoice/document to be submitted electronically. |
| tax_identification_number | String | Yes | Shipper tax/VAT/TIN identifier to include on customs documentation. |
| invoice_number | String | Yes | Commercial invoice number associated with the shipment. |
| invoice_date | Date (YYYY-MM-DD) | Yes | Commercial invoice date in ISO format (e.g., 2025-05-22). |
{tip} Upload the file first via Paperless Document Upload to get the
document_id.
A sample POST request body for EPX:
{
"requested_by": "Test3",
"declared_value": 1,
"declared_value_currency": "SAR",
"reference": "",
"is_cod": 0,
"currency": "SAR",
"delivery_name": "Mohammed",
"delivery_email": "[email protected]",
"delivery_city": "Dubai",
"delivery_address": "Sheikh Zayed Road",
"delivery_neighbourhood": "Al Barsha",
"delivery_postcode": "00000",
"delivery_country": "AE",
"delivery_phone": 971500000000,
"delivery_description": "",
"collection_name": "Ahmed",
"collection_email": "[email protected]",
"collection_city": "Riyadh",
"collection_address": "Al Sahafa",
"collection_neighbourhood": "Riyadh",
"collection_postcode": 11543,
"collection_country": "SA",
"collection_phone": 540000000,
"collection_description": "",
"collection_national_address": {
"short_code": "EFGH5678",
"building_number": "5678",
"street_name": "Prince Sultan Road",
"district": "Al Malaz",
"city": "Riyadh",
"post_code": "11564",
"additional_number": "9012"
},
"weight": 38,
"pieces": 1,
"items_count": 1,
"delivery_duty_type": "DDP",
"products": [
{
"sku": "SKU-001",
"qty": 1,
"price": 1,
"price_currency": "SAR",
"description": "T-shirt",
"hs_code": "610910",
"origin_country": "SA"
}
],
"international_metadata": {
"tax_identification_number": "id-123",
"invoice_number": "inv-123",
"invoice_date": "2025-05-22",
"document_id": "9b1f6c3e-4d2a-4f0e-8a51-2c7d9e0b1a34"
}
}
A sample POST request body for IPX:
{
"requested_by": "Test3",
"declared_value": 1,
"declared_value_currency": "SAR",
"reference": "",
"is_cod": 0,
"currency": "SAR",
"delivery_name": "Ahmed",
"delivery_email": "[email protected]",
"delivery_city": "Riyadh",
"delivery_address": "Riyadh",
"delivery_neighbourhood": "Al Sahafa",
"delivery_postcode": 11543,
"delivery_country": "SA",
"delivery_phone": 540000000,
"delivery_description": "",
"delivery_national_address": {
"short_code": "ABCD1234",
"building_number": "1234",
"street_name": "King Fahd Road",
"district": "Al Olaya",
"city": "Riyadh",
"post_code": "11543",
"additional_number": "5678"
},
"collection_name": "Store",
"collection_email": "[email protected]",
"collection_city": "Dubai",
"collection_address": "Test Street No:10, Test",
"collection_neighbourhood": "Test",
"collection_postcode": 34360,
"collection_country": "AE",
"collection_phone": 9715320000000,
"collection_description": "",
"weight": 2,
"pieces": 1,
"items_count": 1,
"delivery_duty_type": "DDU",
"products": [
{
"sku": "SKU-001",
"qty": 1,
"price": 1,
"price_currency": "SAR",
"description": "T-shirt",
"hs_code": "610910",
"origin_country": "TR"
}
],
"international_metadata": {
"tax_identification_number": "id-456",
"invoice_number": "inv-456",
"invoice_date": "2025-05-22",
"document_id": "9b1f6c3e-4d2a-4f0e-8a51-2c7d9e0b1a34"
}
}
Upon successful request, the following response will be sent back with an HTTP status 200 OK.
{
"success": true,
"shipping": {
"reference": null,
"tracking_number": "EPX2866494373",
"customer_tracking": null,
"customer_name": "test Account",
"requested_by": "Test3",
"price_set_amount": null,
"price_set_amount_incl_tax": null,
"tax_amount": null,
"tax_rate": null,
"cod_amount": 0,
"declared_value": 1,
"declared_value_currency": "SAR",
"currency": "SAR",
"delivery_name": "Mohammed",
"delivery_email": "[email protected]",
"delivery_city": "Dubai",
"delivery_address": "Sheikh Zayed Road",
"delivery_neighbourhood": "Al Barsha",
"delivery_postcode": "00000",
"delivery_country": "AE",
"delivery_phone": 971500000000,
"delivery_description": null,
"collection_name": "Ahmed",
"collection_email": "[email protected]",
"collection_city": "Riyadh",
"collection_address": "Al Sahafa",
"collection_region": null,
"collection_postcode": 11543,
"collection_country": "SA",
"collection_phone": 540000000,
"collection_description": null,
"submission_date": "2021-12-15T12:09:41.915027Z",
"pickup_date": null,
"received_at": null,
"delivery_date": null,
"weight": 38,
"pieces": 1,
"items_count": 1,
"status": "AWB created at origin",
"status_label": "AWB created at origin",
"created_at": "2021-12-15T12:09:41.000000Z",
"is_reverse_pickup": 0,
"label": "https://dev.aymakan.com.sa/pdf/generate/172aa74e-980f-4f80-930e-05f465e4cbbc",
"pdf_label": "https://dev.aymakan.com.sa/pdf/generate/172aa74e-980f-4f80-930e-05f465e4cbbc"
}
}
{info} The
labelandpdf_labelprovides full url to AWB download file in PDF format.
In case of an error, the following response can be returned. The error response depends on the validation of request data, make sure all required data is entered correctly.
{
"message": "The given data was invalid.",
"errors": {
"price_set": [
"The price set field is required."
],
"declared_value": [
"The declared value field is required."
]
}
}
Also, an HTTP status of 422 Unprocessable Entity will be returned.
In case of invalid credentials 401 Unauthorized, the following response will be returned.
{
"error": true,
"response": "Invalid Credentials"
}
{info} Getting this error? See Invalid Credentials for common causes and how to fix it.