Orders
A key with orders:read sees every order of your account, however it came in: placed through the API, created by hand in the app, bought on your Salla, Zid or Shopify store, or bought on your B7R store. A key with orders:write places orders and cancels them as you can in the app. The walk-throughs are in Place an order and Track an order.
An order you place names your SKUs, your shopper's name, phone and Saudi address, and your selling price per line. B7R charges your wallet the cost of the lines plus the carrier fee, prints, packs and ships under your brand. An order can carry seller, an id and a name of your own: the name shows on the order in the app and on the packing slip, and GET /v1/orders lists it. The shipping label carries your account's brand.
Where an order came from
| Field | Means |
|---|---|
channel | Where the order came from: one value of the table below. |
store_order_id | The store's own id of the order, as your order page in the app shows it. null unless the order came from a store. |
store_order_number | The order number your shopper sees in the store, as the packing slip prints it. null unless the order came from a store, or the store sent none. |
external_id | Your own id. Set only on an order you placed through the API; null on every other channel. |
paid_by | Who paid: see Payment. |
sale | The statement of a B7R store order: see B7R store orders. null on every other order. |
channel | The order |
|---|---|
api | Placed through the API with a key of your account. |
manual | Created in the app, by you or by B7R for you. |
salla, zid, shopify | Bought on that store you connected to B7R. |
b7r_store | Bought on your B7R store. |
store | Bought on a store you have since disconnected. |
A platform B7R adds later shows under its own name, so treat a channel you do not know as a store order you handle by default (versioning). GET /v1/orders?channel= keeps one channel.
Statuses
status | Means | Next |
|---|---|---|
created | Accepted. You can still cancel it. | in_production, or cancelled |
in_production | Being printed. The invoice is made here. | shipped |
shipped | Home: with the carrier. Pickup: ready for collection at B7R. | delivered |
delivered | Home: delivered. Pickup: collected. | None |
cancelled | Cancelled; see cancellation. | B7R can reopen it to created. |
An order moves one step at a time. B7R can move it one step back, with a reason; the order.status_changed update then says direction: backward. delivery_method is the order carrier's: home or pickup.
Payment
payment_status | Means |
|---|---|
paid | Paid: by your wallet, by the store, or by the shopper. |
not_paid | Your wallet was short; a top-up pays waiting orders oldest first. |
awaiting_funds | A store order the store settles after delivery (paid_by: store_settlement) whose hold on the store could not be placed yet. |
refund_pending | Cancelled; the refund lands in seconds. |
refunded | Cancelled and refunded. |
paid_by | Means |
|---|---|
wallet | Your B7R wallet paid it: API orders, manual orders and the store orders charged to your wallet. |
store_settlement | The store holds the shopper's payment and settles B7R's cost after delivery; your wallet is not charged. |
shopper | A B7R store order the shopper paid B7R for; your wallet never moved. sale shows the payment, the fee and your profit. |
B7R store orders
A shopper on your B7R store pays B7R, so your wallet never moves for that order. money is B7R's cost of the order. sale is the statement your order page shows: paid (what the shopper paid: lines, shipping and total), fee (the payment and service fee) and profit (what you keep: net, vat and gross, which can be negative after B7R edits the order). Such an order is cancelled with a reason, and the shopper is refunded in full: see Cancel an order.
{
"sale": {
"paid": {
"lines": {
"net": "198.00",
"vat": "0.00",
"gross": "198.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "223.00",
"vat": "0.00",
"gross": "223.00",
"currency": "SAR"
}
},
"fee": {
"net": "6.50",
"vat": "0.00",
"gross": "6.50",
"currency": "SAR"
},
"profit": {
"net": "71.50",
"vat": "0.00",
"gross": "71.50",
"currency": "SAR"
}
}
}What moves money
- Placing an order charges the wallet at once, or leaves it
not_paiduntil a top-up pays waiting orders oldest first. - A cancel of a paid order, by you or by B7R, refunds the wallet (
refund_pending, thenrefunded). A not paid order is cancelled with nothing to refund. A store order the store holds is released. A B7R store order refunds the shopper through the payment gateway, never your wallet. - B7R can reopen a cancelled order to
created: a refunded or never paid order is charged its full total again when the balance covers it, otherwise it waits asnot_paid; an order still paid stays paid. - B7R can edit a
createdorder for you: on a paid order an increase is charged and a decrease refunded, and it stays paid; on a not paid order only the totals move.moneyalways shows the current totals, and you getorder.edited.
Cancellation codes
cancellation.code | Means |
|---|---|
merchant_self_cancel | Cancelled from your side: your API call, your account in the app, or a key revoked with its orders. |
print_error | B7R printed it wrong; refunded. |
damaged | Damaged before delivery; refunded. |
lost_in_transit | Lost by the carrier; refunded. |
policy_takedown | A design was taken down. |
design_quality | A design cannot be printed well. |
store_cancel | Cancelled in your store (Salla, Zid, Shopify) before printing; refunded as your own cancel. |
creator_cancel | You cancelled a B7R store order with a reason, in the app or through the API; the shopper is refunded. |
shopper_cancel | The shopper cancelled their B7R store order before printing; the shopper is refunded. |
undeliverable | A B7R store order could not be delivered and was closed; the shopper is refunded for the items. |
other | Anything else: read cancellation.message. |
cancellation.message is the reason your account sees in the app, or null. B7R may add codes to this list (versioning): treat a code you do not know as other.
Saved customers
The customers the app saved from your manual and store orders, with the area customer_list:read (which needs orders:read and customers:read). B7R records every read in your activity log. An order you place through the API never adds or changes a saved customer.
Search saved customers
Finds your saved customers by a part of the name or the phone, q, 2 to 100 characters; a phone in any form, such as 05… or +966…, matches the form it is saved in. Without q, the customers who ordered most recently. At most limit of them, 1 to 50 (default 20). Each answers its name, the last 4 digits of its phone, when it last ordered and how many orders it has. It counts in searches_per_minute, as the orders search does.
Headers
Bearer b7r_live_.... A key with the customer_list:read area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Body
A part of the customer's name or phone, 2 to 100 characters; a phone in any form matches its stored form. Without it, the customers who ordered most recently. Never kept in the call's record. 2 to 100.
At most this many customers, 1 to 50 (default 20). 1 to 50.
Answer
Child fields
The last 4 digits of the customer's phone; never the whole phone.
When the customer last ordered; null when never.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | 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 |
curl -X POST https://api.b7r.app/v1/customers/search \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"q": "0551234987",
"limit": 10
}'const res = await fetch("https://api.b7r.app/v1/customers/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"q": "0551234987",
"limit": 10
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/customers/search",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"q": "0551234987",
"limit": 10
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "6c3b1f0e-2a4d-4c8e-9b7f-1d2e3f4a5b6c",
"name": "سارة العتيبي",
"phone_last4": "4987",
"last_order_at": "2026-11-20T09:14:02.000Z",
"order_count": 3
}
]
}A saved customer's last address
The shipping address of your latest order for this customer, to send again with a new order; address is null when you have no order for them. A customer of another account answers 404 not_found, as one that does not exist.
Headers
Bearer b7r_live_.... A key with the customer_list:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Answer
The shipping address of your latest order for this customer; null when you have no order for them.
Child fields
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | 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 |
curl https://api.b7r.app/v1/customers/6c3b1f0e-2a4d-4c8e-9b7f-1d2e3f4a5b6c/last-address \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/customers/6c3b1f0e-2a4d-4c8e-9b7f-1d2e3f4a5b6c/last-address", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/customers/6c3b1f0e-2a4d-4c8e-9b7f-1d2e3f4a5b6c/last-address",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"address": {
"country": "SA",
"city": "الرياض",
"district": "العليا",
"street": "شارع التحلية",
"building": "4512",
"postal_code": "12345",
"national_address": "RRRD1234"
}
}Shopper details
Order answers show the shopper masked: the name's first letter and the last 3 digits of the phone, and shipping_address is null. To ship an order yourself, or to reach its shopper, read it with ?include=customer using a key that holds the customers:read area (Keys and access).
GET /v1/orders/{order_id}?include=customeranswers the shopper in full, the fields your order page in the app shows:customerwithname,phone,emailandgender(each of the last two may benull; a B7R store order records no gender), andshipping_addresswithcountry,city,district,street,building,postal_codeandnational_address.GET /v1/orders?include=customeradds each row'scustomer.name, as your order list in the app shows it.- Without
customers:read,include=customeranswers403 area_forbiddennamingcustomers:read. Withoutinclude, the answer stays masked, whatever the key holds. - B7R records every call with
include=customerin its activity log, with the key prefix. Read the shopper once per order, when you need it, and keep polling withoutinclude. - Placing and cancelling an order always answer masked, even for a key with
customers:read: a retry with the sameIdempotency-Keyreplays the stored answer to any key of your account, so a stored answer never holds a shopper. Updates never carry shopper details. - You receive these details to fulfil your own orders: protect them, as the Custom API terms require.
{
"customer": {
"name": "Sara Alqahtani",
"phone": "+966551234567",
"email": "sara@example.com",
"gender": "female"
},
"shipping_address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"building": "2929",
"postal_code": null,
"national_address": "RRRD2929"
}
}{
"id": "B26112200042",
"customer": {
"name": "Sara Alqahtani"
}
}Check an order
Runs every check of POST /v1/orders and answers what the order would cost, whether your wallet would pay it now, and what the key may still spend today. Nothing is saved, charged or numbered, and no email is sent.
An account that does not meet a verification requirement is refused 403 verification_required first, as a manual order is in the app, with the missing groups in errors (see Errors).
When the order would wait as not_paid, missing_if_created is a top-up that is sure to pay it: the wallet pays unpaid orders oldest first, so the figure covers every unpaid order you have and then this one. A smaller top-up may still pay it, since the wallet skips an order it cannot pay and pays newer, smaller ones. The order would wait as not paid and be paid by itself after a top-up in the app. The figure is as of the read, and the minimum top-up the app sets still applies. It is null when the order would be paid.
Headers
Bearer b7r_live_.... A key with the orders:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Body
1 to 64.
Child fields
1 to 64.
1 to 60.
Child fields
2 to 120.
At most 32.
The shopper's email, kept encrypted on the order. B7R never writes to it. At most 254.
A saved customer of your account (POST /v1/customers/search), in place of customer: the order takes their name, phone and email. Needs the customer_list:read area. The address is still the order's.
Child fields
Always "SA".
1 to 80.
1 to 80.
1 to 120.
At most 40.
At most 12.
1 to 50 items.
Child fields
1 to 64.
1 to 999.
At most 500.
Answer
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
One of paid, not_paid.
When the order would wait as not_paid: a top-up sure to pay it and every unpaid order before it (the wallet pays unpaid orders oldest first). As of this read; the minimum top-up the app sets still applies. Null when the order would be paid.
Child fields
Always "SAR".
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 403 | verification_required | No |
| 409 | order_exists | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | order_rejected | No |
| 422 | spend_cap_reached | No |
| 422 | unpaid_backlog_full | 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 |
| 503 | try_again_later | Yes |
| 504 | upstream_timeout | Yes |
curl -X POST https://api.b7r.app/v1/orders/check \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"external_id": "ord-77120",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"customer": {
"name": "Sara Alqahtani",
"phone": "0551234567",
"email": "sara@example.com"
},
"address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"national_address": "RRRD2929",
"building": "2929"
},
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"selling_price": "99.00"
}
],
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f"
}'const res = await fetch("https://api.b7r.app/v1/orders/check", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"external_id": "ord-77120",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"customer": {
"name": "Sara Alqahtani",
"phone": "0551234567",
"email": "sara@example.com"
},
"address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"national_address": "RRRD2929",
"building": "2929"
},
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"selling_price": "99.00"
}
],
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f"
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/orders/check",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"external_id": "ord-77120",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"customer": {
"name": "Sara Alqahtani",
"phone": "0551234567",
"email": "sara@example.com"
},
"address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"national_address": "RRRD2929",
"building": "2929"
},
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"selling_price": "99.00"
}
],
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f"
},
timeout=30,
)
data = res.json(){
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"payment_status_if_created": "paid",
"missing_if_created": null,
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"unit_cost": {
"net": "60.00",
"vat": "0.00",
"gross": "60.00",
"currency": "SAR"
}
}
],
"spend_left_today": {
"amount": "1855.00",
"currency": "SAR"
}
}Place an order
Accepted whole or refused whole: when any line cannot be ordered, nothing is saved and every bad line is listed. A line may name any SKU of any active product of your account, made in the app or through the API, published to a store or not; the SKU of an archived product, or of a colour you removed or a size or colour B7R retired, is refused as sku_unavailable. On success the answer is 201 and your wallet is charged at once; when the balance is short the order is not_paid and is paid, oldest first, when you top up. Every order answer, here, in a read and in the list, carries funding: on an order that waits as not_paid for your wallet, missing is a top-up of this amount that is sure to pay it and every older unpaid order (the order waits as not paid and is paid by itself after a top-up in the app; the figure is as of the read, and the minimum top-up the app sets still applies) and top_up_url opens your wallet; on any other order it is null. A repeat of this call with the same Idempotency-Key answers funding as it was when the order was created. The answer shows the shopper masked.
One order per external_id, ever: a second one answers 409 order_exists with the first order's id. Retry a timeout with the same Idempotency-Key and body: you get the same order and one charge.
An account that does not meet a verification requirement cannot place an order, as a manual order is refused in the app: 403 verification_required, with the missing groups in errors. Nothing is charged, and no order number or external_id is used, so the same request with the same Idempotency-Key works once the account is verified. A retry with the same Idempotency-Key within 24 hours answers that order; a new request for an external_id already placed may answer 403 while the account is blocked, so read that order with GET /v1/orders?external_id=. GET /v1/me?include=verification lists what is missing.
The shopper is customer (a name, a Saudi mobile and, if you have it, an email) or customer_id, one of your saved customers from POST /v1/customers/search, never both. With customer_id the order takes the saved customer's name, phone and email, and the address is still the one you send; it needs customer_list:read (403 area_forbidden at /body/customer_id without it), and an id that is not a saved customer of your account is 400 invalid_request with unknown_customer. The email is kept encrypted on the order, as the app keeps it: B7R never writes to your shopper. An API order does not add or change a saved customer.
Headers
Bearer b7r_live_.... A key with the orders:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Body
1 to 64.
Child fields
1 to 64.
1 to 60.
Child fields
2 to 120.
At most 32.
The shopper's email, kept encrypted on the order. B7R never writes to it. At most 254.
A saved customer of your account (POST /v1/customers/search), in place of customer: the order takes their name, phone and email. Needs the customer_list:read area. The address is still the order's.
Child fields
Always "SA".
1 to 80.
1 to 80.
1 to 120.
At most 40.
At most 12.
1 to 50 items.
Child fields
1 to 64.
1 to 999.
At most 500.
Answer
Your own order id, on an order placed through the API; null on every other channel.
Where the order came from: api, manual, b7r_store, the store platform (salla, zid, shopify), or store for a store since removed. Accept a value you do not know.
The store's own id of the order, as the B7R order page shows it; null when the order did not come from a store.
The order number the shopper sees in the store, as the packing slip prints it; null when the order did not come from a store or the store sent none.
Who paid: wallet (your wallet), store_settlement (the store holds the payment and settles after delivery), shopper (a B7R store order: your wallet never moved). One of wallet, store_settlement, shopper.
One of created, in_production, shipped, delivered, cancelled.
One of paid, not_paid, awaiting_funds, refund_pending, refunded.
Null unless the order is not_paid and your wallet pays it. The order waits as not_paid and is paid by itself after a top-up in the app; nothing else is needed.
Child fields
A top-up of this amount is sure to pay this order and every older unpaid order: the wallet pays unpaid orders oldest first. As of this read; the minimum top-up the app sets still applies.
Child fields
Always "SAR".
Where you top up: your wallet in the B7R app.
One of home, pickup.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
A B7R store order's sale as your order page shows it: what the shopper paid, the payment and service fee, and your profit. Null on every other order.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Child fields
One of merchant_self_cancel, print_error, damaged, lost_in_transit, policy_takedown, design_quality, store_cancel, creator_cancel, shopper_cancel, undeliverable, other.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
The shopper, masked: the name's first letter and the phone's last 3 digits. In full only on GET /v1/orders/{order_id}?include=customer with customers:read.
Child fields
Always null here. The address comes only on GET /v1/orders/{order_id}?include=customer with customers:read.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 403 | verification_required | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 409 | order_exists | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | order_rejected | No |
| 422 | spend_cap_reached | No |
| 422 | unpaid_backlog_full | No |
| 429 | rate_limited | Yes |
| 429 | order_limit_reached | 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 |
curl -X POST https://api.b7r.app/v1/orders \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"external_id": "ord-77120",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"customer": {
"name": "Sara Alqahtani",
"phone": "0551234567",
"email": "sara@example.com"
},
"address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"national_address": "RRRD2929",
"building": "2929"
},
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"selling_price": "99.00"
}
],
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f"
}'const res = await fetch("https://api.b7r.app/v1/orders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"external_id": "ord-77120",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"customer": {
"name": "Sara Alqahtani",
"phone": "0551234567",
"email": "sara@example.com"
},
"address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"national_address": "RRRD2929",
"building": "2929"
},
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"selling_price": "99.00"
}
],
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f"
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/orders",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"external_id": "ord-77120",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"customer": {
"name": "Sara Alqahtani",
"phone": "0551234567",
"email": "sara@example.com"
},
"address": {
"country": "SA",
"city": "Riyadh",
"district": "Al Malqa",
"street": "Anas Bin Malik Road",
"national_address": "RRRD2929",
"building": "2929"
},
"lines": [
{
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"selling_price": "99.00"
}
],
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f"
},
timeout=30,
)
data = res.json(){
"id": "B26112200042",
"external_id": "ord-77120",
"channel": "api",
"store_order_id": null,
"store_order_number": null,
"paid_by": "wallet",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel"
],
"invoice": null,
"created_at": "2026-11-22T12:30:11.902Z",
"line_items": [
{
"id": "5b8c0d3e-4f6a-4b7c-9d8e-0f1a2b3c4d5e",
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"unit_cost": {
"net": "60.00",
"vat": "0.00",
"gross": "60.00",
"currency": "SAR"
},
"selling_price": {
"amount": "99.00",
"currency": "SAR"
}
}
],
"customer": {
"name": "S***",
"phone": "*********567"
},
"shipping_address": null
}List orders
Every order of your account, newest first, from every channel, without the shopper and the lines. include=customer adds the name of each shopper (with customers:read, see Shopper details); include=items adds each order's lines with the product's name and photo (with order_details:read); ask for both as include=customer.items. A key without the area an include needs is refused 403 area_forbidden before anything is read. Each row says where it came from (channel) and who paid (paid_by); the example shows a B7R store order, a Salla order and an API order. Page with cursor until next_cursor is null; limit sets the page size, 1 to 100 (default 50).
Filters: channel keeps one channel (channel=api lists the orders you placed through the API; a channel you have no order on answers an empty page, and a value that is not a channel name is 400 invalid_request); external_id finds the API order that carries it; status and payment_status keep one value each; seller_ref keeps the orders of one seller, exactly its seller.id. Filters combine.
sort is newest (the default), oldest, or total_desc (the order total, highest first). A cursor works only with the sort it came from: another sort answers 400 invalid_request with invalid_cursor. To follow changes, updates tell you about every order of your account, whatever its channel; each row here carries status and payment_status.
Headers
Bearer b7r_live_.... A key with the orders:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Query
1 to 64.
Only the orders of this channel: api, manual, b7r_store, salla, zid, shopify or store. A channel you have no order on answers an empty page.
Only the orders in this status. One of created, in_production, shipped, delivered, cancelled.
Only the orders in this payment status. One of paid, not_paid, awaiting_funds, refund_pending, refunded.
Only the orders of this seller: exactly the seller's id.
newest (the default) or oldest by when the order was made, or total_desc by its total, highest first. A cursor works only with the sort that made it. One of newest, oldest, total_desc.
1 to 256.
customer: add the shopper's name (needs customers:read; every such call is logged). items: add each order's lines with their names and photos (needs order_details:read). Join both with a dot: include=customer.items.
Answer
Child fields
Your own order id, on an order placed through the API; null on every other channel.
Where the order came from: api, manual, b7r_store, the store platform (salla, zid, shopify), or store for a store since removed. Accept a value you do not know.
The store's own id of the order, as the B7R order page shows it; null when the order did not come from a store.
The order number the shopper sees in the store, as the packing slip prints it; null when the order did not come from a store or the store sent none.
Who paid: wallet (your wallet), store_settlement (the store holds the payment and settles after delivery), shopper (a B7R store order: your wallet never moved). One of wallet, store_settlement, shopper.
One of created, in_production, shipped, delivered, cancelled.
One of paid, not_paid, awaiting_funds, refund_pending, refunded.
Null unless the order is not_paid and your wallet pays it. The order waits as not_paid and is paid by itself after a top-up in the app; nothing else is needed.
Child fields
A top-up of this amount is sure to pay this order and every older unpaid order: the wallet pays unpaid orders oldest first. As of this read; the minimum top-up the app sets still applies.
Child fields
Always "SAR".
Where you top up: your wallet in the B7R app.
One of home, pickup.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
A B7R store order's sale as your order page shows it: what the shopper paid, the payment and service fee, and your profit. Null on every other order.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Child fields
One of merchant_self_cancel, print_error, damaged, lost_in_transit, policy_takedown, design_quality, store_cancel, creator_cancel, shopper_cancel, undeliverable, other.
Child fields
The shopper's name, only with include=customer and customers:read.
Child fields
The order's lines with their names and photos, only with include=items and order_details:read.
Child fields
The product the line sells; null when its SKU no longer exists.
Child fields
The product's photo in the line's colour, as the app's order card shows it; null when it has none.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | 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 |
| 503 | try_again_later | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/orders \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "B26112300017",
"external_id": null,
"channel": "b7r_store",
"store_order_id": null,
"store_order_number": null,
"paid_by": "shopper",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": null,
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": {
"paid": {
"lines": {
"net": "198.00",
"vat": "0.00",
"gross": "198.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "223.00",
"vat": "0.00",
"gross": "223.00",
"currency": "SAR"
}
},
"fee": {
"net": "6.50",
"vat": "0.00",
"gross": "6.50",
"currency": "SAR"
},
"profit": {
"net": "71.50",
"vat": "0.00",
"gross": "71.50",
"currency": "SAR"
}
},
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel_with_reason"
],
"invoice": null,
"created_at": "2026-11-23T14:02:37.118Z"
},
{
"id": "B26112300009",
"external_id": null,
"channel": "salla",
"store_order_id": "1457983214",
"store_order_number": "218842",
"paid_by": "wallet",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": null,
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel"
],
"invoice": null,
"created_at": "2026-11-23T09:41:15.620Z"
},
{
"id": "B26112200042",
"external_id": "ord-77120",
"channel": "api",
"store_order_id": null,
"store_order_number": null,
"paid_by": "wallet",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel"
],
"invoice": null,
"created_at": "2026-11-22T12:30:11.902Z"
}
],
"next_cursor": null
}curl "https://api.b7r.app/v1/orders?channel=salla" \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders?channel=salla", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders?channel=salla",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "B26112300009",
"external_id": null,
"channel": "salla",
"store_order_id": "1457983214",
"store_order_number": "218842",
"paid_by": "wallet",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": null,
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel"
],
"invoice": null,
"created_at": "2026-11-23T09:41:15.620Z"
}
],
"next_cursor": null
}Search orders
Finds your orders by q, 2 to 100 characters, as the app's order search finds them: an order number or a part of it, the store's order id, and the store order number the shopper sees. With customers:read it also finds a shopper's phone in any form, its last 4 digits, or the words of a name. Newest first, filtered by status and payment_status when you send them; page with cursor until next_cursor is null. The rows are the list's, without the shopper.
A key without customers:read searches the numbers only. A term that could then match only a shopper (a name, a phone) is refused 403 area_forbidden at /body/q, before anything is read. With customers:read, a search a name or a phone could match is recorded in your activity log, with the key prefix and never the term. The term is in the body so a name, an Arabic word or a +966 phone can be sent at all; it is never kept in the call's record. Each search counts in your account's searches_per_minute (see GET /v1/me?include=limits), shared with the saved customers search; past it the answer is 429 rate_limited with Retry-After and the limit.
Headers
Bearer b7r_live_.... A key with the orders:read area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Body
What to find, 2 to 100 characters: an order number, a store order number or id, and, with customers:read, a shopper's phone, its last 4 digits or a name. Never kept in the call's record. 2 to 100.
Only the orders in this status. One of created, in_production, shipped, delivered, cancelled.
Only the orders in this payment status. One of paid, not_paid, awaiting_funds, refund_pending, refunded.
The page size, 1 to 100 (default 50). 1 to 100.
The next_cursor of the page before. 1 to 256.
Answer
Child fields
Your own order id, on an order placed through the API; null on every other channel.
Where the order came from: api, manual, b7r_store, the store platform (salla, zid, shopify), or store for a store since removed. Accept a value you do not know.
The store's own id of the order, as the B7R order page shows it; null when the order did not come from a store.
The order number the shopper sees in the store, as the packing slip prints it; null when the order did not come from a store or the store sent none.
Who paid: wallet (your wallet), store_settlement (the store holds the payment and settles after delivery), shopper (a B7R store order: your wallet never moved). One of wallet, store_settlement, shopper.
One of created, in_production, shipped, delivered, cancelled.
One of paid, not_paid, awaiting_funds, refund_pending, refunded.
Null unless the order is not_paid and your wallet pays it. The order waits as not_paid and is paid by itself after a top-up in the app; nothing else is needed.
Child fields
A top-up of this amount is sure to pay this order and every older unpaid order: the wallet pays unpaid orders oldest first. As of this read; the minimum top-up the app sets still applies.
Child fields
Always "SAR".
Where you top up: your wallet in the B7R app.
One of home, pickup.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
A B7R store order's sale as your order page shows it: what the shopper paid, the payment and service fee, and your profit. Null on every other order.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Child fields
One of merchant_self_cancel, print_error, damaged, lost_in_transit, policy_takedown, design_quality, store_cancel, creator_cancel, shopper_cancel, undeliverable, other.
Child fields
The shopper's name, only with include=customer and customers:read.
Child fields
The order's lines with their names and photos, only with include=items and order_details:read.
Child fields
The product the line sells; null when its SKU no longer exists.
Child fields
The product's photo in the line's colour, as the app's order card shows it; null when it has none.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | 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 |
curl -X POST https://api.b7r.app/v1/orders/search \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"q": "SO-1043",
"status": "created"
}'const res = await fetch("https://api.b7r.app/v1/orders/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"q": "SO-1043",
"status": "created"
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/orders/search",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"q": "SO-1043",
"status": "created"
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "B26112300017",
"external_id": null,
"channel": "b7r_store",
"store_order_id": null,
"store_order_number": null,
"paid_by": "shopper",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": null,
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": {
"paid": {
"lines": {
"net": "198.00",
"vat": "0.00",
"gross": "198.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "223.00",
"vat": "0.00",
"gross": "223.00",
"currency": "SAR"
}
},
"fee": {
"net": "6.50",
"vat": "0.00",
"gross": "6.50",
"currency": "SAR"
},
"profit": {
"net": "71.50",
"vat": "0.00",
"gross": "71.50",
"currency": "SAR"
}
},
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel_with_reason"
],
"invoice": null,
"created_at": "2026-11-23T14:02:37.118Z"
},
{
"id": "B26112300009",
"external_id": null,
"channel": "salla",
"store_order_id": "1457983214",
"store_order_number": "218842",
"paid_by": "wallet",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": null,
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel"
],
"invoice": null,
"created_at": "2026-11-23T09:41:15.620Z"
},
{
"id": "B26112200042",
"external_id": "ord-77120",
"channel": "api",
"store_order_id": null,
"store_order_number": null,
"paid_by": "wallet",
"status": "created",
"payment_status": "paid",
"funding": null,
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": null,
"allowed_actions": [
"cancel"
],
"invoice": null,
"created_at": "2026-11-22T12:30:11.902Z"
}
],
"next_cursor": null
}Count orders by status
How many orders of your account are in each status, from every channel, as the app counts them on its order tabs.
Headers
Bearer b7r_live_.... A key with the orders:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Answer
Every order of the account, of every channel, per status.
Child fields
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | 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 |
curl https://api.b7r.app/v1/orders/counts \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders/counts", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders/counts",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"counts": {
"created": 4,
"in_production": 2,
"shipped": 7,
"delivered": 31,
"cancelled": 3
}
}Read an order
The status, the payment, the money, the lines, each shipment with its tracking, the invoice once made, and what you can do now (allowed_actions: cancel, cancel_with_reason, or none). Any order of your account reads, whatever its channel. The shopper comes back masked, without the address; add include=customer for the full shopper (Shopper details).
Headers
Bearer b7r_live_.... A key with the orders:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
B7R's order id: opaque, B and digits.
Query
customer: add the shopper to the answer. Needs the customers:read area; every such call is logged. Always "customer".
Answer
Your own order id, on an order placed through the API; null on every other channel.
Where the order came from: api, manual, b7r_store, the store platform (salla, zid, shopify), or store for a store since removed. Accept a value you do not know.
The store's own id of the order, as the B7R order page shows it; null when the order did not come from a store.
The order number the shopper sees in the store, as the packing slip prints it; null when the order did not come from a store or the store sent none.
Who paid: wallet (your wallet), store_settlement (the store holds the payment and settles after delivery), shopper (a B7R store order: your wallet never moved). One of wallet, store_settlement, shopper.
One of created, in_production, shipped, delivered, cancelled.
One of paid, not_paid, awaiting_funds, refund_pending, refunded.
Null unless the order is not_paid and your wallet pays it. The order waits as not_paid and is paid by itself after a top-up in the app; nothing else is needed.
Child fields
A top-up of this amount is sure to pay this order and every older unpaid order: the wallet pays unpaid orders oldest first. As of this read; the minimum top-up the app sets still applies.
Child fields
Always "SAR".
Where you top up: your wallet in the B7R app.
One of home, pickup.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
A B7R store order's sale as your order page shows it: what the shopper paid, the payment and service fee, and your profit. Null on every other order.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Child fields
One of merchant_self_cancel, print_error, damaged, lost_in_transit, policy_takedown, design_quality, store_cancel, creator_cancel, shopper_cancel, undeliverable, other.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
The shopper. Masked (name and phone only) unless you ask with include=customer and your key holds customers:read: then name, phone, email and gender in full.
Child fields
The shipping address, with include=customer and customers:read only; null otherwise.
Child fields
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | 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 |
| 503 | try_again_later | Yes |
| 504 | upstream_timeout | Yes |
curl https://api.b7r.app/v1/orders/B26112200042 \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders/B26112200042", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders/B26112200042",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"id": "B26112200042",
"external_id": "ord-77120",
"channel": "api",
"store_order_id": null,
"store_order_number": null,
"paid_by": "wallet",
"status": "shipped",
"payment_status": "paid",
"funding": null,
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [
{
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"tracking_number": "TRK7731904415",
"tracking_url": "https://track.example.com/TRK7731904415",
"shipped_at": "2026-11-24T08:05:40.120Z",
"delivered_at": null
}
],
"cancellation": null,
"allowed_actions": [],
"invoice": {
"number": "INV-2026-004210",
"issued_at": "2026-11-23T07:44:02.330Z"
},
"created_at": "2026-11-22T12:30:11.902Z",
"line_items": [
{
"id": "5b8c0d3e-4f6a-4b7c-9d8e-0f1a2b3c4d5e",
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"unit_cost": {
"net": "60.00",
"vat": "0.00",
"gross": "60.00",
"currency": "SAR"
},
"selling_price": {
"amount": "99.00",
"currency": "SAR"
}
}
],
"customer": {
"name": "S***",
"phone": "*********567"
},
"shipping_address": null
}An order's details
What your order page shows of one order, with order_details:read: every status change, newest first; the carrier's events; what B7R changed on the order, by section; each line with its product, colour, size, technique, print zones and their photos and print sizes, whether a design changed since the order, the price, B7R's cost and the profit; the money (your revenue, B7R's cost including what an edit kept, your profit); and the flags (another carrier, a store's cancel request, items that are not B7R's). A Salla hold order adds its hold.
A B7R store order adds store_order: the sale (what the shopper paid, the fee, your profit), its documents, its complaints with their messages, and its events: an edit, a delivery exception opened or closed, and each time B7R printed an item again; money is then null. On a cancelled order every profit is null, as the order page shows none. No shopper's name, phone or address is here: read them with include=customer on the order. A complaint's messages are the shopper's own words: B7R records every read in your activity log. When any part cannot be read the answer is 503 service_unavailable, never a shorter one.
Headers
Bearer b7r_live_.... A key with the order_details:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
B7R's order id: opaque, B and digits.
Answer
Every status change, newest first.
Child fields
The carrier's events, oldest first.
Child fields
What B7R changed on the order, by section, oldest first.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Sold with no print.
Child fields
Child fields
Child fields
Your selling price of one piece.
B7R's cost of one piece, locked at the order.
The line's profit; null on a cancelled order.
Your revenue, B7R's cost (what an edit kept included) and your profit, as the order page shows them; null on a B7R store order (see store_order.sale); profit null on a cancelled order.
Child fields
Child fields
Child fields
Child fields
The store's hold of B7R's cost on a Salla hold order; null on any other.
Child fields
A B7R store order only: its sale, documents, complaints and events.
Child fields
Child fields
Child fields
Child fields
Child fields
One of shopper, support.
Child fields
One of edit, exception_opened, exception_closed, reprint.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | 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 |
curl https://api.b7r.app/v1/orders/B20261120007/details \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/orders/B20261120007/details", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/orders/B20261120007/details",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"order_id": "B20261120007",
"status_history": [
{
"from": "in_production",
"to": "shipped",
"reason": null,
"at": "2026-11-21T08:02:11.000Z"
},
{
"from": "created",
"to": "in_production",
"reason": null,
"at": "2026-11-20T13:40:05.000Z"
}
],
"tracking_events": [
{
"kind": "picked_up",
"carrier_status": "pickedUp",
"at": "2026-11-21T09:15:00.000Z",
"note": null
}
],
"edits": [],
"lines": [
{
"sku": "TSWHMD00042",
"quantity": 2,
"name": {
"ar": "قميص الصقر",
"en": "Falcon shirt"
},
"color": {
"name": {
"ar": "أبيض",
"en": "White"
},
"hex": "#FFFFFF"
},
"size": {
"label": "M"
},
"technique": {
"id": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
"name": {
"ar": "طباعة DTF",
"en": "DTF printing"
}
},
"blank": false,
"zones": [
{
"zone_id": "3d4e5f6a-7b8c-4d9e-8f0a-1b2c3d4e5f6a",
"name": {
"ar": "الأمام",
"en": "Front"
},
"photo_url": "https://cdn.b7r.app/m/merchant-mockups/front.jpg",
"print_size_cm": {
"width": 28,
"height": 35
},
"design_changed_since_order": false
}
],
"unit_price": "120.00",
"unit_cost": "45.00",
"profit": "150.00"
}
],
"money": {
"revenue": "265.00",
"cost": "115.00",
"kept": "0.00",
"profit": "150.00"
},
"flags": {
"other_carrier": {
"pending": false,
"raised_at": null,
"cleared_at": null
},
"store_cancel_requested_at": null,
"non_b7r_items": {
"present": false,
"value": "0.00"
}
},
"hold": null,
"store_order": null
}Cancel an order
Only while the order is created, for any channel, with the same refund as in the app. allowed_actions on the order says how the cancel goes:
cancel: an order your wallet paid or a store holds (API, manual, Salla, Zid, Shopify). Send no body. The wallet is refunded or the store hold released, and a store order is cancelled in the store too. A reason you send is checked (3 to 500 characters, no control characters) and not needed.
cancel_with_reason: a B7R store order. Send { "reason": "..." } of 3 to 500 characters: without it the answer is 400 invalid_request with the code required at /body/reason. The shopper is refunded in full through the payment gateway and your wallet never moves. A refused cancel answers 409 order_not_cancellable with errors[0].code self_service_off (cancelling store orders is switched off), too_late (printing started), payment_disputed (the payment has an open dispute with the bank) or not_allowed. In a list, cancel_with_reason shows while cancelling store orders is on; an order B7R moved back to created after printing can still answer too_late, so read the order itself for the exact answer.
No action: the order cannot be cancelled through the API (409 order_not_cancellable): open a ticket from the Help Center in the B7R app. A created B7R store order also shows no action while cancelling store orders is switched off, and on its own read once the order has been printed. Cancelling an order you already cancelled answers 200 with it.
Its external_id stays taken: a new order needs a new one.
Headers
Bearer b7r_live_.... A key with the orders:write area. X-B7R-Key works too; send one, never both.
A new value per operation (up to 255 letters, digits, ., _, : or -; a UUID works), the same value on its retries. See Safe retries.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
B7R's order id: opaque, B and digits.
Body
3 to 500.
Answer
Your own order id, on an order placed through the API; null on every other channel.
Where the order came from: api, manual, b7r_store, the store platform (salla, zid, shopify), or store for a store since removed. Accept a value you do not know.
The store's own id of the order, as the B7R order page shows it; null when the order did not come from a store.
The order number the shopper sees in the store, as the packing slip prints it; null when the order did not come from a store or the store sent none.
Who paid: wallet (your wallet), store_settlement (the store holds the payment and settles after delivery), shopper (a B7R store order: your wallet never moved). One of wallet, store_settlement, shopper.
One of created, in_production, shipped, delivered, cancelled.
One of paid, not_paid, awaiting_funds, refund_pending, refunded.
Null unless the order is not_paid and your wallet pays it. The order waits as not_paid and is paid by itself after a top-up in the app; nothing else is needed.
Child fields
A top-up of this amount is sure to pay this order and every older unpaid order: the wallet pays unpaid orders oldest first. As of this read; the minimum top-up the app sets still applies.
Child fields
Always "SAR".
Where you top up: your wallet in the B7R app.
One of home, pickup.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
A B7R store order's sale as your order page shows it: what the shopper paid, the payment and service fee, and your profit. Null on every other order.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Always "SAR".
Child fields
Child fields
One of merchant_self_cancel, print_error, damaged, lost_in_transit, policy_takedown, design_quality, store_cancel, creator_cancel, shopper_cancel, undeliverable, other.
Child fields
Child fields
Child fields
Always "SAR".
Child fields
Always "SAR".
The shopper, masked: the name's first letter and the phone's last 3 digits. In full only on GET /v1/orders/{order_id}?include=customer with customers:read.
Child fields
Always null here. The address comes only on GET /v1/orders/{order_id}?include=customer with customers:read.
Errors
| HTTP | Code | Retry |
|---|---|---|
| 400 | invalid_request | No |
| 400 | idempotency_key_required | No |
| 401 | unauthorized | No |
| 403 | area_forbidden | No |
| 403 | account_inactive | No |
| 403 | connection_disabled | No |
| 403 | https_required | No |
| 404 | not_found | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 409 | order_not_cancellable | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | 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 |
curl -X POST https://api.b7r.app/v1/orders/B26112300017/cancel \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')" \
-H "Content-Type: application/json" \
-d '{
"reason": "The shopper asked to cancel by message."
}'const res = await fetch("https://api.b7r.app/v1/orders/B26112300017/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"reason": "The shopper asked to cancel by message."
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/orders/B26112300017/cancel",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"reason": "The shopper asked to cancel by message."
},
timeout=30,
)
data = res.json(){
"id": "B26112300017",
"external_id": null,
"channel": "b7r_store",
"store_order_id": null,
"store_order_number": null,
"paid_by": "shopper",
"status": "cancelled",
"payment_status": "refund_pending",
"funding": null,
"seller": null,
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": {
"paid": {
"lines": {
"net": "198.00",
"vat": "0.00",
"gross": "198.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "223.00",
"vat": "0.00",
"gross": "223.00",
"currency": "SAR"
}
},
"fee": {
"net": "6.50",
"vat": "0.00",
"gross": "6.50",
"currency": "SAR"
},
"profit": {
"net": "71.50",
"vat": "0.00",
"gross": "71.50",
"currency": "SAR"
}
},
"shipments": [],
"cancellation": {
"code": "creator_cancel",
"message": "The shopper asked to cancel by message."
},
"allowed_actions": [],
"invoice": null,
"created_at": "2026-11-23T14:02:37.118Z",
"line_items": [
{
"id": "6c9d1e4f-5a7b-4c8d-8e9f-1a2b3c4d5e6f",
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"unit_cost": {
"net": "60.00",
"vat": "0.00",
"gross": "60.00",
"currency": "SAR"
},
"selling_price": {
"amount": "99.00",
"currency": "SAR"
}
}
],
"customer": {
"name": "N***",
"phone": "*********321"
},
"shipping_address": null
}curl -X POST https://api.b7r.app/v1/orders/B26112200042/cancel \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "Idempotency-Key: $(uuidgen 2>/dev/null || node -e 'console.log(crypto.randomUUID())')"const res = await fetch("https://api.b7r.app/v1/orders/B26112200042/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/orders/B26112200042/cancel",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = res.json(){
"id": "B26112200042",
"external_id": "ord-77120",
"channel": "api",
"store_order_id": null,
"store_order_number": null,
"paid_by": "wallet",
"status": "cancelled",
"payment_status": "refunded",
"funding": null,
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"carrier_id": "9b1d3f5a-7c9e-4b1d-8f5a-6c8e0a2b4d6f",
"delivery_method": "home",
"money": {
"lines_total": {
"net": "120.00",
"vat": "0.00",
"gross": "120.00",
"currency": "SAR"
},
"shipping": {
"net": "25.00",
"vat": "0.00",
"gross": "25.00",
"currency": "SAR"
},
"total": {
"net": "145.00",
"vat": "0.00",
"gross": "145.00",
"currency": "SAR"
}
},
"sale": null,
"shipments": [],
"cancellation": {
"code": "merchant_self_cancel",
"message": null
},
"allowed_actions": [],
"invoice": null,
"created_at": "2026-11-22T12:30:11.902Z",
"line_items": [
{
"id": "5b8c0d3e-4f6a-4b7c-9d8e-0f1a2b3c4d5e",
"sku": "B7R-TS-0042-BLK-M",
"quantity": 2,
"unit_cost": {
"net": "60.00",
"vat": "0.00",
"gross": "60.00",
"currency": "SAR"
},
"selling_price": {
"amount": "99.00",
"currency": "SAR"
}
}
],
"customer": {
"name": "S***",
"phone": "*********567"
},
"shipping_address": null
}