Products
A product is a base product from the catalog, printed with one technique on one or two zones (or blank, printed on none), in the colours you pick and every size of the base product, at your selling price. Each colour and size gets its own SKU, which is what an order names. The step by step is in Create a product; design review is in Design review.
- You see every product of your account: made through the API or in the app (
created_viasays which), sold on your stores or not, active or archived. A product of another account answers404, like one that does not exist. external_idisnullon a product that has none: a product made in the app has none until you give it one (see Change a product).?external_id=finds only a product that holds that reference.- A product is the same one the app shows: edit it in the app and your next read shows the change, with a new
ETag. - You can change or archive any active product of your account, made in the app or through the API, under the rules the app has. A product published to a store such as Salla follows: an edit or an archive through the API runs the same steps as the same action in the app, so the store listing is changed or archived too. It is one product.
- Archiving cannot be undone through the API, and a store listing it archived is not restored for you. Ids and SKUs are never reused.
- A colour needs a photo on the zones the product prints: an API product may use a colour the catalog leaves out because it lacks a photo on another zone. A blank product needs a photo of its front zone.
- A blank product prints nothing: it answers
technique_idnull,zone_ids[], nodesigns, and one plain photo per colour on the front zone. It costs the bare base cost of the catalog's blank option. - A product's sizes follow its base product, and you do not change them yourself: when B7R adds, retires or brings back a size of the base product, or retires one of its colours, the product's SKUs follow, and the update
product.updatedarrives withchangedholdingsizes(see Updates). A retired SKU is refused in an order assku_unavailable; read the product to see its SKUs now.
Check a product
Runs every check of POST /v1/products (ids, zones, price, each file) and answers the product it would make, without saving anything, taking a SKU or starting a review. Use it while you build, and before a create you are unsure of.
Headers
Bearer b7r_live_.... A key with the products: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
The printing technique. Leave it out (or send null) with no designs for a blank product, sold with no print (R2-D).
1 to 30 items.
1 to 20 items.
One design per zone. An empty list makes a blank product: no print, its bare base cost, a plain photo of each colour. At most 2 items.
Child fields
1 to 2048.
A staged upload of purpose design (POST /v1/uploads), its file PUT.
One of your designs (GET /v1/designs); needs designs:read.
Your PDF original of this design: a staged upload of purpose design_original. Only beside a new file; it is kept for B7R's print team, and the print file stays the image.
Child fields
-500 to 500.
-500 to 500.
At most 500.
Degrees clockwise about the centre. On a PATCH, absent keeps the stored turn; a new file without a position is placed upright. -360 to 360.
Mirrored left to right. On a PATCH, absent keeps the stored mirror.
Child fields
1 to 200.
1 to 200.
Child fields
At most 5000.
At most 5000.
Child fields
1 to 64.
1 to 60.
Answer
Child fields
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
At most 0 items.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
Child fields
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 |
| 409 | external_id_taken | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | design_rejected | No |
| 422 | product_rejected | No |
| 429 | rate_limited | Yes |
| 429 | product_limit_reached | 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/products/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 '{
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"colors": [
"7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d"
],
"sizes": [
"3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"file_url": "https://files.example.com/designs/falcon-front.png"
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20
}
}
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"retail_price": "99.00",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
}
}'const res = await fetch("https://api.b7r.app/v1/products/check", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"colors": [
"7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d"
],
"sizes": [
"3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"file_url": "https://files.example.com/designs/falcon-front.png"
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20
}
}
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"retail_price": "99.00",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
}
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/products/check",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"colors": [
"7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d"
],
"sizes": [
"3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"file_url": "https://files.example.com/designs/falcon-front.png"
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20
}
}
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"retail_price": "99.00",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
}
},
timeout=30,
)
data = res.json(){
"product": {
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "active",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "99.00",
"variants": [
{
"sku": null,
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": null,
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": null,
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": null,
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "pending",
"reason_code": null,
"message": null,
"decided_at": null
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 20,
"height_cm": 20
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 300,
"level": "good"
},
"review": {
"state": "pending",
"reason_code": null,
"message": null,
"decided_at": null
}
}
],
"review_state": "pending",
"id": null,
"photos": [],
"created_at": null,
"updated_at": null
}
}Create a product
Reads each design file (from file_url, upload_id or design_id: see Designs), checks it, places it, and creates the product and its SKUs. The answer is 201 with the product; the photos follow in the background (photos[].status is pending) and the designs wait for review (review_state is pending).
Retry a timeout with the same Idempotency-Key: you get one product, never two.
Headers
Bearer b7r_live_.... A key with the products: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
The printing technique. Leave it out (or send null) with no designs for a blank product, sold with no print (R2-D).
1 to 30 items.
1 to 20 items.
One design per zone. An empty list makes a blank product: no print, its bare base cost, a plain photo of each colour. At most 2 items.
Child fields
1 to 2048.
A staged upload of purpose design (POST /v1/uploads), its file PUT.
One of your designs (GET /v1/designs); needs designs:read.
Your PDF original of this design: a staged upload of purpose design_original. Only beside a new file; it is kept for B7R's print team, and the print file stays the image.
Child fields
-500 to 500.
-500 to 500.
At most 500.
Degrees clockwise about the centre. On a PATCH, absent keeps the stored turn; a new file without a position is placed upright. -360 to 360.
Mirrored left to right. On a PATCH, absent keeps the stored mirror.
Child fields
1 to 200.
1 to 200.
Child fields
At most 5000.
At most 5000.
Child fields
1 to 64.
1 to 60.
Answer
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
Child fields
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 |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 409 | external_id_taken | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | design_rejected | No |
| 422 | product_rejected | No |
| 429 | rate_limited | Yes |
| 429 | product_limit_reached | 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/products \
-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 '{
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"colors": [
"7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d"
],
"sizes": [
"3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"file_url": "https://files.example.com/designs/falcon-front.png"
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20
}
}
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"retail_price": "99.00",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
}
}'const res = await fetch("https://api.b7r.app/v1/products", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"colors": [
"7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d"
],
"sizes": [
"3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"file_url": "https://files.example.com/designs/falcon-front.png"
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20
}
}
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"retail_price": "99.00",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
}
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/products",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"colors": [
"7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d"
],
"sizes": [
"3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"file_url": "https://files.example.com/designs/falcon-front.png"
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20
}
}
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"retail_price": "99.00",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
}
},
timeout=30,
)
data = res.json(){
"id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "active",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "99.00",
"variants": [
{
"sku": "B7R-TS-0042-BLK-M",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-BLK-L",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": "B7R-TS-0042-WHT-M",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-WHT-L",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "pending",
"reason_code": null,
"message": null,
"decided_at": null
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 20,
"height_cm": 20
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 300,
"level": "good"
},
"review": {
"state": "pending",
"reason_code": null,
"message": null,
"decided_at": null
}
}
],
"review_state": "pending",
"photos": [
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "pending",
"url": null
},
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "pending",
"url": null
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "pending",
"url": null
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "pending",
"url": null
}
],
"created_at": "2026-11-22T10:15:02.118Z",
"updated_at": "2026-11-22T10:15:02.118Z"
}List products
Newest first. Filter by external_id to find your own product, by seller_ref for one seller.id, by status, or by updated_since to sync changes. Page with cursor until next_cursor is null.
sku finds the product that sells that SKU (a SKU it still sells; a removed one finds nothing), and category_id the products of a base product in that catalog category.
sort orders the list: newest (the default), price_low or price_high by your selling price. Each order pages with its own cursor: a next_cursor of one order sent with another answers 400 invalid_request with invalid_cursor.
Add include=details for what My Products shows beside each product (see Details).
Headers
Bearer b7r_live_.... A key with the products: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 256.
newest (the default) or by selling price, low or high first. A cursor pages the sort it came from only. One of newest, price_low, price_high.
One of active, archived.
stores (needs stores:read): each product's state on each of your connected stores. details (needs catalog): what My Products shows beside the product (unit_cost, base_product_name, canonical_sku and, with designs:read, takedown), and each photo's failure_code.
Answer
Child fields
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
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/products?external_id=falcon-tee-001" \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/products?external_id=falcon-tee-001", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/products?external_id=falcon-tee-001",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "active",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "99.00",
"variants": [
{
"sku": "B7R-TS-0042-BLK-M",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-BLK-L",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": "B7R-TS-0042-WHT-M",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-WHT-L",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 20,
"height_cm": 20
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 300,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
}
],
"review_state": "approved",
"photos": [
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-1.jpg"
},
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-2.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-3.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-4.jpg"
}
],
"created_at": "2026-11-22T10:15:02.118Z",
"updated_at": "2026-11-22T11:02:40.507Z"
}
],
"next_cursor": null
}Search products
The search of My Products: query (1 to 100 characters) is matched against the Arabic and the English name of your products as you write it, anywhere in the name. It takes the filters status and category_id, the sort of the list, limit (1 to 100, 50 when you leave it out) and cursor, and answers as GET /v1/products does. A query of punctuation only matches nothing.
The words you search for, and the cursor you send, are not kept in your API log. A search is a read, but it is a POST, so it needs an Idempotency-Key header as every POST does; nothing is stored under it, and a search without one is refused with 400 idempotency_key_required.
Headers
Bearer b7r_live_.... A key with the products: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
1 to 100.
One of active, archived.
newest (the default) or by selling price, low or high first. A cursor pages the sort it came from only. One of newest, price_low, price_high.
1 to 100.
1 to 256.
Answer
Child fields
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
Child fields
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/products/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 '{
"query": "صقر",
"status": "active",
"sort": "price_low",
"limit": 20
}'const res = await fetch("https://api.b7r.app/v1/products/search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"query": "صقر",
"status": "active",
"sort": "price_low",
"limit": 20
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/products/search",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"query": "صقر",
"status": "active",
"sort": "price_low",
"limit": 20
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "active",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "99.00",
"variants": [
{
"sku": "B7R-TS-0042-BLK-M",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-BLK-L",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": "B7R-TS-0042-WHT-M",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-WHT-L",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 20,
"height_cm": 20
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 300,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
}
],
"review_state": "approved",
"photos": [
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-1.jpg"
},
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-2.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-3.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-4.jpg"
}
],
"created_at": "2026-11-22T10:15:02.118Z",
"updated_at": "2026-11-22T11:02:40.507Z"
}
],
"next_cursor": null
}Read a product
The product with each design, its review and its photos. The ETag header is the version you read: send it back as If-Match when you change the product.
Add include=details for what My Products shows beside it (see Details).
Headers
Bearer b7r_live_.... A key with the products:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Query
stores (needs stores:read): the product's state on each of your connected stores. my_store (needs my_store:read): its state on your B7R store, or null without one. details (needs catalog): what My Products shows beside the product (unit_cost, base_product_name, canonical_sku and, with designs:read, takedown), and each photo's failure_code.
Answer
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
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/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c?include=details" \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c?include=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/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c?include=details",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "active",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "99.00",
"variants": [
{
"sku": "B7R-TS-0042-BLK-M",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-BLK-L",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": "B7R-TS-0042-WHT-M",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-WHT-L",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 20,
"height_cm": 20
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 300,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
}
],
"review_state": "approved",
"photos": [
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-1.jpg",
"failure_code": null
},
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-2.jpg",
"failure_code": null
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-3.jpg",
"failure_code": null
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-4.jpg",
"failure_code": null
}
],
"created_at": "2026-11-22T10:15:02.118Z",
"updated_at": "2026-11-22T11:02:40.507Z",
"details": {
"unit_cost": {
"net": "45.00",
"vat": "0.00",
"gross": "45.00",
"currency": "SAR"
},
"base_product_name": {
"ar": "تيشيرت كلاسيك",
"en": "Classic T-shirt"
},
"canonical_sku": "B7R-TS-0042-BLK-M",
"colors": [
{
"id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"name": {
"ar": "أسود",
"en": "Black"
},
"hex": "#111111"
},
{
"id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"name": {
"ar": "أبيض",
"en": "White"
},
"hex": "#FFFFFF"
}
],
"sizes": [
{
"id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b",
"label": "M"
},
{
"id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c",
"label": "L"
}
],
"technique": {
"id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"name": {
"ar": "طباعة DTF",
"en": "DTF printing"
}
},
"takedown": null
}
}Change a product
Send only what changes: the name, the description, the price (the minimum still applies), the colours, or a design or its position. A new design file goes back to review and makes new photos; a new position makes new photos. Removed colours stop being sold; their SKUs are never reused.
A photo that reads failed is made again when you send the product its own colors: every photo it lacks is queued. A colour B7R no longer has a base photo for answers unknown_color: leave it out. On a product published to a store such as Salla, the new photos reach the listing after they are ready, and it keeps its old ones until then.
Send technique_id to change the technique (one the base product offers, or unknown_technique), and zone_ids with the zones the product prints on after the change: a zone it did not print on needs its design with a new file in the same request, and a zone left out drops its design. The zones must be an option the catalog prices (zone_combination_not_offered). A zone change that would leave a colour of the product without a photo on its new zones is refused once, unknown_color at /body/zone_ids, with valid_values naming the colours that have one: drop the others in colors with the same request. The SKUs stay the same.
A new technique or new zones are held to their own minimum: the price you send, or the stored one, must reach it, or the answer is 422 product_rejected with the minimum. B7R never raises your price.
zone_ids: [] makes the product blank: its designs are dropped, its technique is dropped (send no technique_id, or null), and its plain photos are made. A blank product prints again with zone_ids, a technique_id and a design with a file for each zone, all in one request.
A new position for a design made in the app places its print file alone at that position: other layers the app kept for that zone are not kept.
A position without rotation_deg or flipped keeps the design's stored turn and mirror; a new file sent without a position is fitted upright. A new file without its own original_upload_id drops the PDF original of the file it replaces; a position change keeps it.
external_id and seller can be set once, on a product that has none (one made in the app). The same value again changes nothing; another value answers 409 product_not_editable (already_set), and an external_id another product holds answers 409 external_id_taken. Setting external_id sends its designs to review if they are not reviewed yet, and sends a product.updated update.
A refused PATCH may still have set external_id or seller: read the product for its new ETag before you retry.
If-Match is optional. With it, a product changed since your read answers 412 precondition_failed and nothing changes; without it, your change applies to the current version.
A taken down or archived product cannot change, and one sent back for changes accepts only new files for the designs sent back, its external_id and its seller (409 product_not_editable). Its own colors sent unchanged are no change there, so a failed photo can be made again.
Headers
Bearer b7r_live_.... A key with the products:write area. X-B7R-Key works too; send one, never both.
The ETag header of your last read. If the product changed since, the answer is 412 precondition_failed and nothing changes.
Optional on a PATCH; when sent, a retry with the same key answers the first result.
application/json, when the request has a body.
ar for Arabic error titles; anything else gives English. Codes never change.
Path
Body
Child fields
1 to 200.
1 to 200.
Child fields
At most 5000.
At most 5000.
1 to 30 items.
The printing technique after the edit. Null, or left out, when the product turns blank; required when it leaves blank.
The product's print zones after the edit. An empty list turns it blank; a zone it did not print on needs its design (with a file) in designs; a zone left out drops its design. At most 2 items.
1 to 2 items.
Child fields
1 to 2048.
A staged upload of purpose design (POST /v1/uploads), its file PUT.
One of your designs (GET /v1/designs); needs designs:read.
Your PDF original of this design: a staged upload of purpose design_original. Only beside a new file; it is kept for B7R's print team, and the print file stays the image.
Child fields
-500 to 500.
-500 to 500.
At most 500.
Degrees clockwise about the centre. On a PATCH, absent keeps the stored turn; a new file without a position is placed upright. -360 to 360.
Mirrored left to right. On a PATCH, absent keeps the stored mirror.
Child fields
1 to 64.
1 to 60.
Answer
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
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 |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 409 | product_not_editable | No |
| 409 | external_id_taken | No |
| 412 | precondition_failed | No |
| 413 | request_too_large | No |
| 415 | unsupported_media_type | No |
| 422 | design_rejected | No |
| 422 | product_rejected | No |
| 429 | rate_limited | Yes |
| 429 | product_limit_reached | 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 PATCH https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "If-Match: $ETAG" \
-H "Content-Type: application/json" \
-d '{
"retail_price": "109.00",
"designs": [
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 2,
"width_cm": 22
}
}
]
}'const res = await fetch("https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"If-Match": etag, // the ETag header of your last read
"Content-Type": "application/json",
},
body: JSON.stringify({
"retail_price": "109.00",
"designs": [
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 2,
"width_cm": 22
}
}
]
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.b7r.app/v1/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"If-Match": etag, # the ETag header of your last read
},
json={
"retail_price": "109.00",
"designs": [
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"file_url": "https://files.example.com/designs/falcon-back.png",
"position": {
"x_cm": 5,
"y_cm": 2,
"width_cm": 22
}
}
]
},
timeout=30,
)
data = res.json(){
"id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "active",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "109.00",
"variants": [
{
"sku": "B7R-TS-0042-BLK-M",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-BLK-L",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": "B7R-TS-0042-WHT-M",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-WHT-L",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 2,
"width_cm": 22,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 22,
"height_cm": 22
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 273,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
}
],
"review_state": "approved",
"photos": [
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-1.jpg"
},
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "pending",
"url": null
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-3.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "pending",
"url": null
}
],
"created_at": "2026-11-22T10:15:02.118Z",
"updated_at": "2026-11-22T14:20:05.661Z"
}Archive a product
Stops selling the product everywhere it is sold, the app and your stores included: a product on Salla leaves Salla as it does when you archive it in the app. New orders for its SKUs are refused (sku_unavailable). Archiving an archived product answers 200 with it. Ids and SKUs are never reused.
Headers
Bearer b7r_live_.... A key with the products: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
Answer
Child fields
One of active, archived.
One of app, api.
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
Child fields
One of good, acceptable, low.
Child fields
One of pending, approved, changes_requested, taken_down.
One of pending, approved, changes_requested, taken_down.
Child fields
One of pending, ready, failed.
With include=details only. Null unless the photo failed, then why: no_base_photo, design_missing, unreadable, too_large, render_error, no_result, attempts_exhausted, not_queued. The list is open: accept a code you do not know.
Child fields
One of published, hidden, removed, not_published.
Child fields
Child fields
What one unit costs you, as My Products shows it, split as the catalog's option cost is: net, vat and gross. Your profit on a piece is retail_price minus unit_cost.gross.
Child fields
Always "SAR".
Child fields
The product's colours, with their names in both languages, as your product page shows them.
Child fields
Child fields
The product's sizes. A size has one label in both languages (S, M, L).
Child fields
The printing technique, with its name in both languages; null for a blank product.
Child fields
Child fields
With designs:read only. Null unless B7R took the product down; then when, and the Admin's reason as your product page shows it.
Child fields
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 |
| 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/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c/archive \
-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/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c/archive", {
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/products/3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c/archive",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = res.json(){
"id": "3f6a8b1c-2d4e-4f5a-9b6c-7d8e9f0a1b2c",
"external_id": "falcon-tee-001",
"seller": {
"id": "seller-1042",
"name": "Najd Prints"
},
"status": "archived",
"created_via": "api",
"base_product_id": "8c2e4f6a-1b3d-4a5c-8e7f-9a0b1c2d3e4f",
"technique_id": "2b9d6e1f-7a4c-4d8e-b3f5-0c1a2e3d4f5a",
"zone_ids": [
"5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f"
],
"name": {
"ar": "تيشيرت الصقر",
"en": "Falcon T-shirt"
},
"description": null,
"retail_price": "99.00",
"variants": [
{
"sku": "B7R-TS-0042-BLK-M",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-BLK-L",
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
},
{
"sku": "B7R-TS-0042-WHT-M",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "3d5f7b9c-1e3a-4c5e-8a7b-9c1d3e5f7a9b"
},
{
"sku": "B7R-TS-0042-WHT-L",
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"size_id": "4e6a8c0d-2f4b-4d6f-9b8c-0d2e4f6a8b0c"
}
],
"designs": [
{
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"position": {
"x_cm": 0,
"y_cm": 0,
"width_cm": 25,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 3543,
"height_px": 4252,
"width_cm": 25,
"height_cm": 30
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 360,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
},
{
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"position": {
"x_cm": 5,
"y_cm": 4,
"width_cm": 20,
"rotation_deg": 0,
"flipped": false
},
"size": {
"width_px": 2362,
"height_px": 2362,
"width_cm": 20,
"height_cm": 20
},
"trimmed": null,
"has_original": false,
"print_quality": {
"dpi": 300,
"level": "good"
},
"review": {
"state": "approved",
"reason_code": null,
"message": null,
"decided_at": "2026-11-22T11:02:40.507Z"
}
}
],
"review_state": "approved",
"photos": [
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-1.jpg"
},
{
"color_id": "7a9c1e3f-5b7d-4f9a-8b3c-4d6e8f0a2b4c",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-2.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "5e7a9c1b-3d5f-4b7a-9c1e-2f4a6b8c0d2e",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-3.jpg"
},
{
"color_id": "1c3e5a7b-9d1f-4a3c-9e5b-7f9a1c3e5b7d",
"zone_id": "6f8b0d2c-4e6a-4c8b-8d2f-3a5b7c9d1e3f",
"status": "ready",
"url": "https://cdn.b7r.app/m/3f6a8b1c/photo-4.jpg"
}
],
"created_at": "2026-11-22T10:15:02.118Z",
"updated_at": "2026-11-22T11:02:40.507Z"
}Details
include=details on GET /v1/products and GET /v1/products/{id} needs the catalog area beside products:read; a key without it is refused with 403 area_forbidden (missing_area at /query/include, naming catalog). Without include the answer has neither details nor any failure_code.
details.unit_cost: what one unit costs you, as My Products shows it: the base cost with the technique and the zones it prints on, split intonet,vatandgrossas the catalog splits an option's cost (see Money). An order locks the cost when it is placed. Your profit on a piece, as My Products shows it, isretail_priceminusunit_cost.gross.details.base_product_nameanddetails.canonical_sku: the base product it is made from, and the SKU My Products shows for it.details.colors,details.sizesanddetails.technique: the plain names your product page shows, the colours and the technique in Arabic and English (a size has one label, such asM), so you need no catalog read to show them.techniqueisnullon a blank product.details.takedown, with thedesigns:readarea only:null, or when B7R took the product down (at) and the reason your product page shows (reason). A key withoutdesigns:readgets notakedownfield.photos[].failure_code:nullunless the photofailed, then why. The codes areno_base_photo,design_missing,unreadable,too_large,render_error,no_result,attempts_exhaustedandnot_queued(no photo was queued in time). The list is open: accept a code you do not know, and treat it as a failed photo.
