Follow these steps to start using the API:
https://test.safeway-xp.com/
https://api.safeway-xp.com/
https://cs.safeway-xp.com/
https://flm.safeway-xp.com/
Authenticate to access API endpoints. Use the token from the login API as a Bearer token in headers.
Method: POST
Endpoint (Production): https://flm.safeway-xp.com/api/Authentications/login
Endpoint (Test): https://api.safeway-xp.com/api/Authentications/login
{
"email": "your_email@example.com",
"password": "your_password"
}
{
"token": "your_authentication_token"
}
Method: POST
Endpoint (Production): https://flm.safeway-xp.com/api/CustomerJob/create
Endpoint (Test): https://api.safeway-xp.com/api/CustomerJob/create
{
"countryName": "Bahrain",
"supplierName": "HDL",
"shipmentDetails": "p",
"consigneeAddress": { ... },
"shipperAddress": { ... },
"cargo": [ { ... } ],
"shipmentMethod": "Air",
"descriptionOfGoods": "Books",
"remark": "Handle with care"
}
{
"airwayBill": "1234567890",
"safeAirwaybillNumber": "SA123456",
"status": "Created"
}
Method: GET
Endpoint (Production): https://flm.safeway-xp.com/api/CustomerJob/:airwayBill
Endpoint (Test): https://api.safeway-xp.com/api/CustomerJob/:airwayBill
Replace :airwayBill
with the job’s unique Airway Bill number.
Download the shipment document related to a specific job as a PDF file.
Method: GET
Endpoint (Production):https://flm.safeway-xp.com/api/CustomerJob/:airwayBill/document
Endpoint (Test):https://api.safeway-xp.com/api/CustomerJob/:airwayBill/document
Replace :airwayBill
with the specific job’s unique Airway Bill number.
Returns a Blob representing the PDF file of the shipment document.
You can calculate the expected shipping price before creating a job. Two modes are supported:
Authenticated users (Credit Customers) can calculate pricing based on their special rates and zones. Requires Bearer token from login.
Method: POST
Endpoint (Production): https://flm.safeway-xp.com/api/CustomerJob/calculateprice
Endpoint (Test): https://api.safeway-xp.com/api/CustomerJob/calculateprice
{
"supplierName": "DHL",
"shipmentMethod": 1,
"shipmentType": 0,
"countryName": "SAUDI ARABIA",
"cityName": "RIYADH",
"totalKg": 0.8
}
{
"price": 24.000,
"kg": 1.000,
"extraChargeApplied": null,
"extraChargeAmount": 0,
"netAmount": 24.000
}
Unauthenticated users (or website visitors) can use this endpoint to get a general price estimate. Uses the Cash Customer
pricing configuration.
Method: POST
Endpoint (Production): https://flm.safeway-xp.com/api/CustomerJob/calculateprice/public
Endpoint (Test): https://api.safeway-xp.com/api/CustomerJob/calculateprice/public
{
"supplierName": "ARAMEX",
"shipmentMethod": 0,
"shipmentType": 1,
"countryName": "UAE",
"cityName": "DUBAI",
"totalKg": 2.5
}
{
"price": 40.000,
"kg": 3.000,
"extraChargeApplied": null,
"extraChargeAmount": 0,
"netAmount": 40.000
}
Use these APIs to fetch country, state, and city names correctly.
/api/express/Countries/pagination?page=1&pageSize=10&searchTerm=bah
{
"currentPage": 1,
"pageSize": 10,
"totalItems": 2,
"items": [
{"id": 7, "countryName": "BAHRAIN", "countryCode": "BH", "states": null},
{"id": 119, "countryName": "BAHAMAS", "countryCode": "BS", "states": null}
]
}
/api/express/States/by-country-name?name=Bahrain&page=1&pageSize=10
{
"currentPage": 1,
"pageSize": 10,
"totalItems": 1,
"items": [
{"id": 29, "name": "Bahrain", "countryId": 7, "cities": []}
]
}
/api/Cities/by-country-name?countryName=Bahrain&stateName=Bahrain&page=1&pageSize=1000
{
"currentPage": 1,
"pageSize": 1000,
"totalItems": 81,
"items": [
{"id": 73, "cityName": "Riffa", "stateID": 29, "postalCode": []},
{"id": 72, "cityName": "Manama", "stateID": 29, "postalCode": []},
{"id": 785179, "cityName": "ZAYED TOWN", "stateID": 29, "postalCode": []},
...
]
}