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/customerLogin
Endpoint (Test): https://api.safeway-xp.com/api/Authentications/customerLogin
{
"email": "your_email@example.com",
"password": "your_password"
}{
"token": "your_authentication_token"
}Use this endpoint to verify if your token is still valid.
Method: POST
Endpoint (Production): https://flm.safeway-xp.com/api/Authentications/validate-token
Endpoint (Test): https://api.safeway-xp.com/api/Authentications/validate-token
Authorization: Bearer your_token_here{
"valid": true,
"expiresAt": "2025-03-15T14:23:00Z"
}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": "DHL",
"shipmentDetails": "Books and electronics",
"shipperAddress": {
"name": "Ali Express",
"countryId": 17,
"cityId": 204,
"addressLine": "Building 55, Road 12, Block 345",
"email": "ali@safeway.com",
"mobile": "+97339001122"
},
"consigneeAddress": {
"name": "Fatima Store",
"countryId": 24,
"cityId": 322,
"addressLine": "Street 7, Dammam",
"email": "store@fatima.com",
"mobile": "+96655005500"
},
"cargo": [
{
"description": "Laptop Boxes",
"quantity": 10,
"unitPrice": 350.000,
"weight": 100.000,
"length": 60,
"width": 50,
"height": 40,
"hsCodeId": 120,
"coo": "CN"
},
{
"description": "Cable Reels",
"quantity": 6,
"unitPrice": 60.000,
"weight": 80.000,
"length": 70,
"width": 40,
"height": 40,
"hsCodeId": 122,
"coo": "CN"
}
],
"paymentMethods": [
{ "method": "Cash", "amount": 150.000 },
{ "method": "Card", "amount": 50.000 }
],
"shipmentMethod": "Air",
"descriptionOfGoods": "Books and electronics",
"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 as a PDF file.
Method: GET
Endpoint: /api/CustomerJob/:airwayBill/document
Download the Safeway-formatted AWB document (SafeAWB).
Method: GET
Endpoint: /api/CustomerJob/:safeAirwayBill/safeway/document
Track shipment progress using Safe Airway Bill.
Method: GET
Endpoint: /api/Jobs/track-shipment?safeAirwaybill=SA123456
{
"airwayBill": "SA123456",
"currentStatus": "Delivered",
"routeHistory": [
{ "status": "Picked up", "location": "Manama", "timestamp": "2025-03-12T08:10:00Z" },
{ "status": "In Transit", "location": "Riyadh", "timestamp": "2025-03-13T16:45:00Z" },
{ "status": "Delivered", "location": "Riyadh", "timestamp": "2025-03-14T10:22:00Z" }
]
}Method: POST
Endpoint: /api/CustomerJob/calculateprice
Method: POST
Endpoint: /api/CustomerJob/calculateprice/public
/api/express/Countries/pagination?page=1&pageSize=10&searchTerm=bah
/api/express/States/by-country-name?name=Bahrain&page=1&pageSize=10
/api/Cities/by-country-name?countryName=Bahrain&stateName=Bahrain&page=1&pageSize=1000