apyhub
Back
▣ VERIFICATION KIT

MENA Shipping API

What it does

The MENA Shipping API creates shipments, quotes delivery prices, prints labels, tracks parcels and cancels shipments for Aramex and Bosta in one request format. Send a carrier (aramex, bosta or demo) plus the shipment details, and get back a JSON object with a data field and a meta field.

Pick the call you need. Create a shipment from a shipper, a recipient and a parcel (weight 0.01 to 1000 kg). Get a delivery price from an origin, a destination and a parcel, with an optional currency and cod_amount. Get a label with a tracking number, in English (en) or Arabic (ar). Track up to 20 tracking numbers in one request. Cancel a shipment with its tracking number. List the supported carriers with no input.

Send your own carrier login in credentials with each request. Aramex needs a username, a password and account details. Bosta needs an api_key. The login is used for that request only. Set environment to production (the default) or test. Aramex test mode is not available, so use the demo carrier to try the API without calling a carrier.

Teams use this MENA shipping API to quote delivery costs at checkout, print labels after an order is paid, and follow parcel status in admin tools. Country fields take 2-letter codes such as JO and EG. AI agents can call it through ApyHub MCP.

▣ ENDPOINT 01 / 06
POST
Create Shipment
https://api.eu.apyhub.com/odelyo/mena-shipping/shipments

QUICKSTART

GUIDE

Quickstart

Create a shipment with the demo carrier. No carrier login is needed.

curl -X POST "https://api.eu.apyhub.com/odelyo/mena-shipping/shipments" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"demo","reference":"ORDER-1001","shipper":{"address":{"line1":"12 Test Street","city":"Amman","country":"JO"},"contact":{"name":"Test User","phone":"0790000000"}},"recipient":{"address":{"line1":"12 Test Street","city":"Cairo","country":"EG"},"contact":{"name":"Test User","phone":"0790000000"}},"parcel":{"weight_kg":1,"description":"Test parcel"}}'

What you'll get back

Returns a JSON object with data and meta. data has the carrier, the tracking_number, the label fields and your reference.

{
  "data": {
    "carrier": "demo",
    "tracking_number": "82198802773",
    "label_url": null,
    "label_pdf_base64": null,
    "reference": "ORDER-1001",
    "demo": true
  },
  "meta": {
    "request_id": "req_0faa849ae5aa449d",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Creates a shipment with Aramex, Bosta or the demo carrier and returns its tracking number. Send the shipper, the recipient and the parcel.

Request Body

ParameterTypeDescription
carrierENUMRequired. Carrier to use. Allowed values: aramex, bosta, demo. demo answers without calling a carrier.
serviceENUMService level. Allowed values: domestic, express.
shipperObjectRequired. Shipper details. Includes contact, address, and optional account_number.
shipper.contactObjectRequired. Shipper contact details. Includes name, phone, and optional email, phone2, company.
shipper.contact.nameStringRequired. Contact name. Length 1 to 150.
shipper.contact.emailStringEmail address. Length 1 to 200.
shipper.contact.phoneStringRequired. Phone number. Length 1 to 30.
shipper.contact.phone2StringSecondary phone number. Length 1 to 30.
shipper.contact.companyStringCompany name. Length 1 to 150.
shipper.addressObjectRequired. Shipper address details. Includes line1, city, country, and optional additional address fields.
shipper.address.cityStringRequired. City. Length 1 to 100.
shipper.address.floorStringFloor. Length 1 to 20.
shipper.address.line1StringRequired. Address line 1. Length 1 to 300.
shipper.address.line2StringAddress line 2. Length 1 to 300.
shipper.address.city_idStringCity identifier. Length 1 to 60.
shipper.address.countryStringRequired. Country code in ISO 3166-1 alpha-2 format. Pattern: ^[A-Z]{2}$.
shipper.address.zone_idStringZone identifier. Length 1 to 60.
shipper.address.buildingStringBuilding. Length 1 to 40.
shipper.address.districtStringDistrict. Length 1 to 100.
shipper.address.postcodeStringPostcode. Length 1 to 20.
shipper.address.apartmentStringApartment. Length 1 to 20.
shipper.address.district_idStringDistrict identifier. Length 1 to 60.
shipper.account_numberStringShipper account number. Length 1 to 40.
recipientObjectRequired. Recipient details. Includes contact, address, and optional account_number.
recipient.contactObjectRequired. Recipient contact details. Includes name, phone, and optional email, phone2, company.
recipient.contact.nameStringRequired. Contact name. Length 1 to 150.
recipient.contact.emailStringEmail address. Length 1 to 200.
recipient.contact.phoneStringRequired. Phone number. Length 1 to 30.
recipient.contact.phone2StringSecondary phone number. Length 1 to 30.
recipient.contact.companyStringCompany name. Length 1 to 150.
recipient.addressObjectRequired. Recipient address details. Includes line1, city, country, and optional additional address fields.
recipient.address.cityStringRequired. City. Length 1 to 100.
recipient.address.floorStringFloor. Length 1 to 20.
recipient.address.line1StringRequired. Address line 1. Length 1 to 300.
recipient.address.line2StringAddress line 2. Length 1 to 300.
recipient.address.city_idStringCity identifier. Length 1 to 60.
recipient.address.countryStringRequired. Country code in ISO 3166-1 alpha-2 format. Pattern: ^[A-Z]{2}$.
recipient.address.zone_idStringZone identifier. Length 1 to 60.
recipient.address.buildingStringBuilding. Length 1 to 40.
recipient.address.districtStringDistrict. Length 1 to 100.
recipient.address.postcodeStringPostcode. Length 1 to 20.
recipient.address.apartmentStringApartment. Length 1 to 20.
recipient.address.district_idStringDistrict identifier. Length 1 to 60.
recipient.account_numberStringRecipient account number. Length 1 to 40.
parcelObjectRequired. Parcel details. Includes weight_kg and description, plus optional size and dimensions.
parcel.sizeENUMParcel size. Allowed values: SMALL, MEDIUM, LARGE.
parcel.piecesIntegerNumber of pieces. Minimum 1, maximum 999.
parcel.width_cmNumberParcel width in centimeters. Minimum 0.
parcel.height_cmNumberParcel height in centimeters. Minimum 0.
parcel.length_cmNumberParcel length in centimeters. Minimum 0.
parcel.weight_kgNumberRequired. Parcel weight in kilograms. Minimum 0.01, maximum 1000.
parcel.descriptionStringRequired. Parcel description. Length 1 to 300.
notesStringOptional shipment notes. Length 1 to 500.
currencyStringCurrency code in ISO 4217 format. Pattern: ^[A-Z]{3}$.
referenceStringShipment reference. Length 1 to 60.
cod_amountNumberCash on delivery amount. Minimum 0.
credentialsObjectCarrier credentials used only for this request and never stored. For aramex: username, password, account_number, account_pin, account_entity, account_country_code. For bosta: api_key.
credentials.api_keyStringAPI key. Length 10 to 500.
credentials.passwordStringPassword. Length 1 to 200.
credentials.usernameStringUsername. Length 1 to 200.
credentials.account_pinStringAccount PIN. Length 1 to 40.
credentials.account_entityStringAccount entity. Length 1 to 10.
credentials.account_numberStringAccount number. Length 1 to 40.
credentials.account_country_codeStringAccount country code in ISO 3166-1 alpha-2 format. Pattern: ^[A-Z]{2}$.
environmentENUMEnvironment to use. Allowed values: production, test. Default: production. test uses the carrier test server. Aramex test mode is not available.
allow_open_packageBooleanWhether an open package is allowed.

Response

Returns a JSON object with data and meta. data holds the tracking number and the label fields.

ParameterTypeDescription
dataObjectThe created shipment.
data.carrierStringCarrier that created the shipment: aramex, bosta or demo.
data.tracking_numberStringTracking number of the new shipment.
data.label_urlStringLink to the label, or null when the carrier gives none.
data.label_pdf_base64StringLabel as a base64 PDF, or null when the carrier gives none.
data.referenceStringYour reference from the request, or null when you sent none.
data.demoBooleantrue when the demo carrier answered. Only returned for demo.
metaObjectRequest details.
meta.request_idStringID of this request, for example req_0faa849ae5aa449d. Quote it when you contact support.
meta.versionStringAPI version, for example v1.

Notes

  • Send your own carrier login in credentials. aramex needs username, password, account_number, account_pin, account_entity and account_country_code. bosta needs api_key. demo needs none.
  • environment is production or test. Default: production. Aramex test mode is not available: the API returns HTTP 422 not_supported. Use carrier demo to try the API without a carrier call.
  • Errors return HTTP 422 with an error object that has code, message and field. A wrong carrier login returns carrier_unauthorized. A missing login returns credentials_required.
  • Returns HTTP 201 on success. The demo carrier returns label_url and label_pdf_base64 as null.
  • country is a 2-letter uppercase code such as JO or EG.
▣ ENDPOINT 02 / 06
POST
Shipping Label
https://api.eu.apyhub.com/odelyo/mena-shipping/labels

QUICKSTART

GUIDE

Quickstart

Get the label of a shipment with the demo carrier.

curl -X POST "https://api.eu.apyhub.com/odelyo/mena-shipping/labels" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"demo","tracking_number":"82198802773","lang":"en"}'

What you'll get back

Returns a JSON object with data and meta. data has the carrier, the tracking_number, label_url and label_pdf_base64.

{
  "data": {
    "carrier": "demo",
    "tracking_number": "82198802773",
    "label_url": null,
    "label_pdf_base64": null,
    "demo": true
  },
  "meta": {
    "request_id": "req_672a60babe6c26f0",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
demo answers without calling a carrier.
Tracking number.
Lang.
credentials
Your own account with the carrier. Used for this request only, never stored. aramex: username, password, account_number, account_pin, account_entity, account_country_code. bosta: api_key.
Api key.
Password.

About this endpoint

What it does

Returns the shipping label of an existing shipment, in English or Arabic.

Request Body

ParameterTypeDescription
carrierENUMRequired. Carrier to use. Allowed values: aramex, bosta, demo. demo answers without calling a carrier.
tracking_numberStringRequired. The tracking number. Max length: 40 characters.
langENUMResponse language. Allowed values: ar, en.
credentialsObjectCarrier account details used for this request only and never stored. For aramex, provide username, password, account_number, account_pin, account_entity, and account_country_code; for bosta, provide api_key. See schema for nested fields.
credentials.api_keyStringAPI key for the carrier account. Min length: 10, max length: 500.
credentials.passwordStringPassword for the carrier account. Min length: 1, max length: 200.
credentials.usernameStringUsername for the carrier account. Min length: 1, max length: 200.
credentials.account_pinStringAccount PIN for the carrier account. Min length: 1, max length: 40.
credentials.account_entityStringAccount entity for the carrier account. Min length: 1, max length: 10.
credentials.account_numberStringAccount number for the carrier account. Min length: 1, max length: 40.
credentials.account_country_codeStringTwo-letter uppercase country code matching the pattern ^[A-Z]{2}$.
environmentENUMEnvironment to use. Allowed values: production, test. Default: production. test uses the carrier test server. Aramex test mode is not available.

Response

Returns a JSON object with data and meta. data holds the label link and the label PDF.

ParameterTypeDescription
dataObjectThe label.
data.carrierStringCarrier of the shipment.
data.tracking_numberStringTracking number you sent.
data.label_urlStringLink to the label, or null when the carrier gives none.
data.label_pdf_base64StringLabel as a base64 PDF, or null when the carrier gives none.
data.demoBooleantrue when the demo carrier answered. Only returned for demo.
metaObjectRequest details.
meta.request_idStringID of this request, for example req_0faa849ae5aa449d. Quote it when you contact support.
meta.versionStringAPI version, for example v1.

Notes

  • Send your own carrier login in credentials. aramex needs username, password, account_number, account_pin, account_entity and account_country_code. bosta needs api_key. demo needs none.
  • environment is production or test. Default: production. Aramex test mode is not available: the API returns HTTP 422 not_supported. Use carrier demo to try the API without a carrier call.
  • Errors return HTTP 422 with an error object that has code, message and field. A wrong carrier login returns carrier_unauthorized. A missing login returns credentials_required.
  • The demo carrier returns label_url and label_pdf_base64 as null.
▣ ENDPOINT 03 / 06
POST
Track Shipments
https://api.eu.apyhub.com/odelyo/mena-shipping/tracking

QUICKSTART

GUIDE

Quickstart

Track a shipment with the demo carrier.

curl -X POST "https://api.eu.apyhub.com/odelyo/mena-shipping/tracking" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"demo","tracking_numbers":["82198802773"]}'

What you'll get back

Returns a JSON object with data and meta. data.results has the status and the events of each tracking number, and data.not_found lists the numbers that were not found.

{
  "data": {
    "carrier": "demo",
    "results": [
      {
        "tracking_number": "82198802773",
        "status": "in_transit",
        "events": [
          {
            "at": "2026-12-02T10:25:11.103Z",
            "status": "in_transit",
            "code": "DEMO2",
            "description": "Departed origin hub (demo)",
            "location": "Riyadh"
          },
          {
            "at": "2026-12-02T09:25:11.103Z",
            "status": "picked_up",
            "code": "DEMO1",
            "description": "Picked up (demo)",
            "location": "Riyadh"
          }
        ]
      }
    ],
    "not_found": [],
    "demo": true
  },
  "meta": {
    "request_id": "req_e23d553c8762ebaf",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the status and the event history of up to 20 shipments in one request.

Request Body

ParameterTypeDescription
carrierENUMRequired. Carrier to track with. Allowed values: aramex, bosta, demo. demo answers without calling a carrier.
credentialsObjectCarrier credentials for this request only; not stored. For aramex, use username, password, account_number, account_pin, account_entity, and account_country_code. For bosta, use api_key.
credentials.api_keyStringAPI key. Length 10 to 500.
credentials.passwordStringPassword. Length 1 to 200.
credentials.usernameStringUsername. Length 1 to 200.
credentials.account_pinStringAccount PIN. Length 1 to 40.
credentials.account_entityStringAccount entity. Length 1 to 10.
credentials.account_numberStringAccount number. Length 1 to 40.
credentials.account_country_codeStringTwo-letter uppercase country code matching ^[A-Z]{2}$.
environmentENUMEnvironment to use. Allowed values: production, test. Default: production. test uses the carrier test server. Aramex test mode is not available.
tracking_numbersString ArrayRequired. Tracking numbers to look up. Items 1 to 20. Each item must be a string with length 1 to 40.

Response

Returns a JSON object with data and meta. data.results has one row per tracking number that was found.

ParameterTypeDescription
dataObjectThe tracking answer.
data.carrierStringCarrier that was asked.
data.resultsObject ArrayOne row per tracking number that was found.
data.results[].tracking_numberStringThe tracking number.
data.results[].statusENUMCurrent status. Allowed values: created, picked_up, in_transit, out_for_delivery, delivered, returned, cancelled, exception, unknown.
data.results[].eventsObject ArrayStatus history, newest first.
data.results[].events[].atStringTime of the event, ISO 8601.
data.results[].events[].statusENUMStatus at that event. Same values as data.results[].status.
data.results[].events[].codeStringCarrier event code, for example DEMO2.
data.results[].events[].descriptionStringPlain text of the event.
data.results[].events[].locationStringPlace of the event.
data.not_foundString ArrayTracking numbers that the carrier did not find. Empty when all were found.
data.demoBooleantrue when the demo carrier answered. Only returned for demo.
metaObjectRequest details.
meta.request_idStringID of this request, for example req_0faa849ae5aa449d. Quote it when you contact support.
meta.versionStringAPI version, for example v1.

Notes

  • Send your own carrier login in credentials. aramex needs username, password, account_number, account_pin, account_entity and account_country_code. bosta needs api_key. demo needs none.
  • environment is production or test. Default: production. Aramex test mode is not available: the API returns HTTP 422 not_supported. Use carrier demo to try the API without a carrier call.
  • Errors return HTTP 422 with an error object that has code, message and field. A wrong carrier login returns carrier_unauthorized. A missing login returns credentials_required.
  • The demo carrier answers in_transit for every tracking number.
  • Send 1 to 20 tracking numbers per request.
▣ ENDPOINT 04 / 06
POST
Cancel Shipment
https://api.eu.apyhub.com/odelyo/mena-shipping/cancellations

QUICKSTART

GUIDE

Quickstart

Cancel a shipment with the demo carrier.

curl -X POST "https://api.eu.apyhub.com/odelyo/mena-shipping/cancellations" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"demo","tracking_number":"82198802773"}'

What you'll get back

Returns a JSON object with data and meta. data.cancelled is true when the shipment was cancelled.

{
  "data": {
    "carrier": "demo",
    "tracking_number": "82198802773",
    "cancelled": true,
    "demo": true
  },
  "meta": {
    "request_id": "req_b4cd99e69ab9466a",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
demo answers without calling a carrier.
Tracking number.
credentials
Your own account with the carrier. Used for this request only, never stored. aramex: username, password, account_number, account_pin, account_entity, account_country_code. bosta: api_key.
Api key.
Password.
Username.

About this endpoint

What it does

Cancels a shipment by its tracking number. Aramex does not offer cancellation through its API.

Request Body

ParameterTypeDescription
carrierENUMRequired. Carrier to cancel the shipment with. Allowed values: aramex, bosta, demo. demo answers without calling a carrier.
credentialsObjectYour own account with the carrier, used only for this request and never stored. For aramex, provide username, password, account_number, account_pin, account_entity, and account_country_code. For bosta, provide api_key.
credentials.api_keyStringCarrier API key. Length: 10 to 500 characters. Used for bosta.
credentials.passwordStringCarrier password. Length: 1 to 200 characters. Used for aramex.
credentials.usernameStringCarrier username. Length: 1 to 200 characters. Used for aramex.
credentials.account_pinStringCarrier account PIN. Length: 1 to 40 characters. Used for aramex.
credentials.account_entityStringCarrier account entity. Length: 1 to 10 characters. Used for aramex.
credentials.account_numberStringCarrier account number. Length: 1 to 40 characters. Used for aramex.
credentials.account_country_codeStringCarrier account country code in ISO 3166-1 alpha-2 format. Pattern: ^[A-Z]{2}$. Used for aramex.
environmentENUMEnvironment to use. Allowed values: production, test. Default: production. test uses the carrier test server. Aramex test mode is not available.
tracking_numberStringRequired. Shipment tracking number. Length: 1 to 40 characters.

Response

Returns a JSON object with data and meta. data.cancelled tells you the result.

ParameterTypeDescription
dataObjectThe cancellation answer.
data.carrierStringCarrier of the shipment.
data.tracking_numberStringTracking number you sent.
data.cancelledBooleantrue when the shipment was cancelled.
data.demoBooleantrue when the demo carrier answered. Only returned for demo.
metaObjectRequest details.
meta.request_idStringID of this request, for example req_0faa849ae5aa449d. Quote it when you contact support.
meta.versionStringAPI version, for example v1.

Notes

  • Send your own carrier login in credentials. aramex needs username, password, account_number, account_pin, account_entity and account_country_code. bosta needs api_key. demo needs none.
  • environment is production or test. Default: production. Aramex test mode is not available: the API returns HTTP 422 not_supported. Use carrier demo to try the API without a carrier call.
  • Errors return HTTP 422 with an error object that has code, message and field. A wrong carrier login returns carrier_unauthorized. A missing login returns credentials_required.
  • For aramex, the API returns HTTP 422 not_supported: cancel from the Aramex portal. The demo carrier returns cancelled true for any tracking number.
▣ ENDPOINT 05 / 06
GET
List Carriers
https://api.eu.apyhub.com/odelyo/mena-shipping/carriers

QUICKSTART

GUIDE

Quickstart

List the supported carriers and statuses.

curl -X GET "https://api.eu.apyhub.com/odelyo/mena-shipping/carriers" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with data and meta. data.carriers lists each carrier with its countries and operations, and data.statuses lists the shipment statuses.

{
  "data": {
    "carriers": [
      {
        "id": "aramex",
        "name": "Aramex",
        "countries": [
          "SA",
          "AE",
          "EG",
          "JO",
          "KW",
          "QA",
          "BH",
          "OM",
          "LB",
          "and international"
        ],
        "operations": [
          "rates",
          "shipments",
          "labels",
          "tracking"
        ],
        "cash_on_delivery": true
      },
      {
        "id": "bosta",
        "name": "Bosta",
        "countries": [
          "EG",
          "SA"
        ],
        "operations": [
          "rates",
          "shipments",
          "labels",
          "tracking",
          "cancellations"
        ],
        "cash_on_delivery": true
      }
    ],
    "statuses": [
      "created",
      "picked_up",
      "in_transit",
      "out_for_delivery",
      "delivered",
      "returned",
      "cancelled",
      "exception",
      "unknown"
    ]
  },
  "meta": {
    "request_id": "req_3dbf48eabed12716",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*

About this endpoint

What it does

Lists the supported carriers, the countries and operations of each, and the shipment statuses. It needs no input.

Request Body

No input. Send an empty request.

Response

Returns a JSON object with data and meta. data.carriers has one row per carrier.

ParameterTypeDescription
dataObjectThe carrier list.
data.carriersObject ArraySupported carriers.
data.carriers[].idStringCarrier ID to send as carrier: aramex, bosta or demo.
data.carriers[].nameStringCarrier name.
data.carriers[].countriesString ArrayCountry codes the carrier serves. * means all.
data.carriers[].operationsString ArraySupported operations: rates, shipments, labels, tracking, cancellations.
data.carriers[].cash_on_deliveryBooleantrue when the carrier supports cash on delivery.
data.statusesString ArrayAll shipment statuses the API can return.
metaObjectRequest details.
meta.request_idStringID of this request, for example req_0faa849ae5aa449d. Quote it when you contact support.
meta.versionStringAPI version, for example v1.

Notes

▣ ENDPOINT 06 / 06
POST
Shipping Rates
https://api.eu.apyhub.com/odelyo/mena-shipping/rates

QUICKSTART

GUIDE

Quickstart

Get a delivery price with the demo carrier.

curl -X POST "https://api.eu.apyhub.com/odelyo/mena-shipping/rates" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"carrier":"demo","origin":{"line1":"12 Test Street","city":"Amman","country":"JO"},"destination":{"line1":"12 Test Street","city":"Cairo","country":"EG"},"parcel":{"weight_kg":1,"description":"Test parcel"},"currency":"SAR"}'

What you'll get back

Returns a JSON object with data and meta. data has the amount and the currency of the delivery price.

{
  "data": {
    "carrier": "demo",
    "amount": 35,
    "currency": "SAR",
    "raw": {
      "demo": true
    }
  },
  "meta": {
    "request_id": "req_e8e5cb7cc28387f2",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Returns the delivery price for a parcel from an origin to a destination.

Request Body

ParameterTypeDescription
carrierENUMRequired. Carrier to rate against. Allowed values: aramex, bosta, demo. demo answers without calling a carrier.
originObjectRequired. Origin address object. Required fields: line1, city, country.
origin.cityStringRequired. City name.
origin.floorStringFloor identifier.
origin.line1StringRequired. Primary address line.
origin.line2StringSecondary address line.
origin.city_idStringCity identifier.
origin.countryStringRequired. Country code in ^[A-Z]{2}$ format.
origin.zone_idStringZone identifier.
origin.buildingStringBuilding identifier.
origin.districtStringDistrict name.
origin.postcodeStringPostcode.
origin.apartmentStringApartment identifier.
origin.district_idStringDistrict identifier.
parcelObjectRequired. Parcel details. Required fields: weight_kg, description.
parcel.sizeENUMParcel size. Allowed values: SMALL, MEDIUM, LARGE.
parcel.piecesIntegerNumber of pieces. Minimum 1, maximum 999.
parcel.width_cmNumberParcel width in centimeters. Minimum 0.
parcel.height_cmNumberParcel height in centimeters. Minimum 0.
parcel.length_cmNumberParcel length in centimeters. Minimum 0.
parcel.weight_kgNumberRequired. Parcel weight in kilograms. Minimum 0.01, maximum 1000.
parcel.descriptionStringRequired. Parcel description.
currencyStringCurrency code in ^[A-Z]{3}$ format.
cod_amountNumberCash on delivery amount. Minimum 0.
credentialsObjectCarrier credentials used only for this request and never stored. For aramex: username, password, account_number, account_pin, account_entity, account_country_code. For bosta: api_key.
credentials.api_keyStringAPI key for the carrier. Minimum length 10, maximum 500.
credentials.passwordStringCarrier password. Minimum length 1, maximum 200.
credentials.usernameStringCarrier username. Minimum length 1, maximum 200.
credentials.account_pinStringCarrier account PIN. Minimum length 1, maximum 40.
credentials.account_entityStringCarrier account entity. Minimum length 1, maximum 10.
credentials.account_numberStringCarrier account number. Minimum length 1, maximum 40.
credentials.account_country_codeStringCarrier account country code in ^[A-Z]{2}$ format.
destinationObjectRequired. Destination address object. Required fields: line1, city, country.
destination.cityStringRequired. City name.
destination.floorStringFloor identifier.
destination.line1StringRequired. Primary address line.
destination.line2StringSecondary address line.
destination.city_idStringCity identifier.
destination.countryStringRequired. Country code in ^[A-Z]{2}$ format.
destination.zone_idStringZone identifier.
destination.buildingStringBuilding identifier.
destination.districtStringDistrict name.
destination.postcodeStringPostcode.
destination.apartmentStringApartment identifier.
destination.district_idStringDistrict identifier.
environmentENUMEnvironment to use. Allowed values: production, test. Default: production. test uses the carrier test server. Aramex test mode is not available.

Response

Returns a JSON object with data and meta. data holds the price and its currency.

ParameterTypeDescription
dataObjectThe quote.
data.carrierStringCarrier that was asked.
data.amountNumberDelivery price.
data.currencyStringCurrency of amount, for example SAR.
data.rawObjectThe carrier's own answer. For demo it is {"demo": true}.
metaObjectRequest details.
meta.request_idStringID of this request, for example req_0faa849ae5aa449d. Quote it when you contact support.
meta.versionStringAPI version, for example v1.

Notes

  • Send your own carrier login in credentials. aramex needs username, password, account_number, account_pin, account_entity and account_country_code. bosta needs api_key. demo needs none.
  • environment is production or test. Default: production. Aramex test mode is not available: the API returns HTTP 422 not_supported. Use carrier demo to try the API without a carrier call.
  • Errors return HTTP 422 with an error object that has code, message and field. A wrong carrier login returns carrier_unauthorized. A missing login returns credentials_required.
  • The demo carrier returns a fixed price of 35 SAR and ignores currency and cod_amount.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.