Reference / Carriers
Carriers
Amounts, ids and limits in the examples are samples. Read the real values from the API.
List carriers
GET/v1/carriers
Every carrier you can choose today. delivery_method is home (to the door) or pickup (to a pickup point); eta_days is the usual delivery time in days. The fee is per shipment, as net, VAT and gross; it does not depend on the address. Addresses arrive with orders, in a later version.
Your default carrier is default_carrier in GET /v1/me. A quote without carrier_id uses it.
Headers
Authorizationstringrequired
Bearer b7r_live_.... A key with the catalog area. X-B7R-Key works too; send one, never both.
Accept-Languagestring
ar for Arabic error titles; anything else gives English. Codes never change.
Answer
dataarray of objectrequired
Child fields
idstring (uuid)required
nameobjectrequired
Child fields
arstringrequired
enstringrequired
feeobjectrequired
Child fields
netstringrequired
vatstringrequired
grossstringrequired
currencyconstantrequired
Always "SAR".
delivery_methodstringrequired
One of home, pickup.
eta_daysobjectrequired
Child fields
minintegerrequired
maxintegerrequired
Errors
| HTTP | Code | Retry |
|---|---|---|
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 400 | invalid_request | No |
| 429 | rate_limited | Yes |
| 500 | internal_error | Yes |
| 502 | upstream_unavailable | Yes |
| 503 | api_unavailable | Yes |
| 503 | request_expired | Yes |
| 503 | service_unavailable | Yes |
| 504 | upstream_timeout | Yes |
Request
curl https://api.b7r.app/v1/carriers \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/carriers", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/carriers",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json()200 OK
{
"data": [
{
"id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"name": {
"ar": "شحن سريع",
"en": "Express delivery"
},
"fee": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"delivery_method": "home",
"eta_days": {
"min": 2,
"max": 4
}
},
{
"id": "0c2e4a6b-8d0f-4c2e-9a6b-7d9f1b3c5e7a",
"name": {
"ar": "استلام من نقطة",
"en": "Pickup point"
},
"fee": {
"net": "18.00",
"vat": "0.00",
"gross": "18.00",
"currency": "SAR"
},
"delivery_method": "pickup",
"eta_days": {
"min": 3,
"max": 5
}
}
]
}