B7RDevelopers
ReferenceCarriers
Reference / Carriers

Carriers

View .md

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

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
      }
    }
  ]
}

Titles and headings of every page. llms-full.txt holds the full text.