My Store
Ids, names, prices and times in the examples are samples. Read the real values from the API.
Your B7R store has three pages here: My Store (the store itself, its address and state, its visits and sales), Store products (what it sells) and Store promotions (its discount codes and free shipping).
Reading needs the key area my_store:read, and changing needs my_store:write beside it. When B7R stores are not open to your account, or the account is not active, each answers 409 feature_not_available; when B7R cannot tell, 503 service_unavailable, which you can send again. A key reads the store even while your email or phone is not verified; the app shows its verify card instead of the store until they are.
A store is opened in the B7R app, where you accept the store agreement; the API then manages it. Before you open one, GET /v1/my-store answers store: null and the candidates on Store products list your products; every other call answers 404 not_found with the error code store_missing.
Read your store
The store’s address, text, contacts, look, home sections, banner, announcement, search text and state. A suspended store says why in suspended_reason. rename_available is true until the one rename of the handle is used. The logo and each banner image come with their storage path, which a later change sends back to keep them.
Headers
Bearer b7r_live_.... A key with the my_store:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Answer
Child fields
Child fields
Child fields
Child fields
One of banner, pinned, all.
Child fields
One of none, single, slider.
Child fields
Child fields
One of open, closed, suspended.
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 |
| 409 | feature_not_available | 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/my-store \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/my-store", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/my-store",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"store": {
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"handle": "shop-one",
"url": "https://shop-one.b7r.sa",
"previous_handle": null,
"rename_available": true,
"name": "Shop One",
"bio": "Prints made by hand",
"contact_whatsapp": "+966512345678",
"contact_email": "creator@example.com",
"logo": {
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/logo/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.png",
"url": "https://media.b7r.sa/store-media/logo.png"
},
"look": {
"theme": "night",
"color": null,
"font": null,
"saved_at": "2026-11-20T10:00:00.000Z"
},
"socials": {
"instagram": "@shop.one"
},
"home_sections": [
{
"key": "banner",
"on": true
},
{
"key": "pinned",
"on": false
},
{
"key": "all",
"on": true
}
],
"banner": {
"mode": "single",
"autoplay": false,
"slides": [
{
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/banner/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.jpg",
"image_url": "https://media.b7r.sa/store-media/banner.jpg",
"focus_x": 50,
"focus_y": 40,
"link": {
"kind": "category",
"category_id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b"
}
}
]
},
"announcement": {
"on": true,
"text": "Free gift this week",
"link": null
},
"status": "open",
"suspended_reason": null,
"link_shared_at": "2026-11-21T09:30:00.000Z",
"free_shipping_threshold": "250.00",
"seo": {
"title": null,
"description": null
},
"created_at": "2026-11-20T09:00:00.000Z"
}
}List the banner categories
The categories of the products on the store, shown or hidden: what a banner slide may link to. At most 1,000; truncated: true says the list reached that many and more may exist.
Headers
Bearer b7r_live_.... A key with the my_store:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Answer
At most 1000 items.
Child fields
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 | feature_not_available | 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/my-store/categories \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/my-store/categories", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/my-store/categories",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"data": [
{
"id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b",
"name": {
"ar": "تيشيرتات",
"en": "T-shirts"
}
}
],
"truncated": false
}Read the visits
period: today, 7d or 30d (the default), Riyadh days, today included. The visits per source and the views per product, largest first. Today’s figures trail the store until B7R next counts its visits, a few times an hour.
Headers
Bearer b7r_live_.... A key with the my_store:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Query
One of today, 7d, 30d.
Answer
One of today, 7d, 30d.
Child fields
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 | feature_not_available | 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/my-store/visits \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/my-store/visits", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/my-store/visits",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"period": "30d",
"visits": 412,
"by_source": [
{
"source": "instagram",
"visits": 260
},
{
"source": "direct",
"visits": 152
}
],
"product_views": [
{
"product_id": "4d5e6f7a-8b9c-4d0e-9f2a-3b4c5d6e7f8a",
"views": 188
}
]
}Read the numbers
period as for the visits. Paid store orders in live mode, cancelled ones included, and in test mode on their own line, never in sales. conversion is live orders over visits, null without visits. The top five products by units, and the five newest orders with no shopper details; read an order’s details with the orders area.
Headers
Bearer b7r_live_.... A key with the my_store:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Query
One of today, 7d, 30d.
Answer
One of today, 7d, 30d.
Child fields
Child fields
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 | feature_not_available | 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/my-store/numbers \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/my-store/numbers", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/my-store/numbers",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"period": "30d",
"live_orders": 12,
"test_orders": 1,
"sales": "1440.00",
"conversion": 0.029,
"top_products": [
{
"product_id": "4d5e6f7a-8b9c-4d0e-9f2a-3b4c5d6e7f8a",
"name": {
"ar": "قميص الخط العربي",
"en": "Calligraphy shirt"
},
"units": 7
}
],
"latest_orders": [
{
"order_id": "B00000001042",
"created_at": "2026-11-25T18:12:00.000Z",
"status": "in_production",
"total": "120.00",
"test": false
}
]
}The calls below change the store and need my_store:write beside my_store:read. Each counts against store_writes_per_minute (GET /v1/me?include=limits), takes an Idempotency-Key and answers the whole store, as GET /v1/my-store does; a call sent again with the same key answers what the first answered. A change goes through the same rules as in the app, and new text goes to B7R’s review as it does there.
Change one section of your store
Send exactly one of profile, look, sections, banner, announcement, seo, logo_upload_id or link_shared; the section is replaced whole, as the app saves it. Every field of the section is required, a field left out answers 400 invalid_request and changes nothing; send null (or an empty text) to clear a field that may be cleared. The profile’s socials takes all five of instagram, tiktok, snapchat, x and youtube, and the announcement takes on, text and link. The profile needs a WhatsApp number or an email.
Images come from a staged upload (POST /v1/uploads with the purpose my_store_image): logo_upload_id sets the logo, or null removes it; each banner slide takes the path of an image the store shows now, exactly as GET /v1/my-store gives it in banner.slides[].path, or the upload_id of a new one, exactly one of the two. An upload is used only when the change succeeds. If an image change answers upload_not_found, read GET /v1/my-store before you upload again: the change may already have been made with that upload. A logo is at most 2 MB and 2048 by 2048 pixels, a banner image 5 MB and 4000 by 4000 (too_large, too_many_pixels, or unreadable for a file that is not a readable image), and the store takes 20 images a minute, as the app does. Images need the account’s email and phone verified: without them the call answers 403 verification_required naming the missing one.
A colour that does not read on the theme is refused at /body/look/color (colour_unreadable); a banner link must lead to a product on the store or one of their categories (banner_link_invalid), and a kept image must be one the banner shows now (banner_path_invalid at that slide’s path), checked before any new image is stored.
Headers
Bearer b7r_live_.... A key with the my_store: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.
Body
Child fields
At most 60.
Child fields
Child fields
At most 40.
3 to 3 items.
Child fields
One of banner, pinned, all.
Child fields
One of none, single, slider.
At most 5 items.
Child fields
At most 200.
0 to 100.
0 to 100.
Child fields
Child fields
At most 60.
At most 160.
Always true.
Answer
Child fields
Child fields
Child fields
Child fields
One of banner, pinned, all.
Child fields
One of none, single, slider.
Child fields
Child fields
One of open, closed, suspended.
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 |
| 403 | verification_required | No |
| 404 | not_found | No |
| 409 | idempotency_mismatch | No |
| 409 | idempotency_in_flight | Yes |
| 409 | feature_not_available | 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 PATCH https://api.b7r.app/v1/my-store \
-H "Authorization: Bearer $B7R_API_KEY" \
-H "If-Match: $ETAG" \
-H "Content-Type: application/json" \
-d '{
"seo": {
"title": "Calligraphy prints",
"description": ""
}
}'const res = await fetch("https://api.b7r.app/v1/my-store", {
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({
"seo": {
"title": "Calligraphy prints",
"description": ""
}
}),
});
const data = await res.json();import os, requests
res = requests.patch(
"https://api.b7r.app/v1/my-store",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"If-Match": etag, # the ETag header of your last read
},
json={
"seo": {
"title": "Calligraphy prints",
"description": ""
}
},
timeout=30,
)
data = res.json(){
"store": {
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"handle": "shop-one",
"url": "https://shop-one.b7r.sa",
"previous_handle": null,
"rename_available": true,
"name": "Shop One",
"bio": "Prints made by hand",
"contact_whatsapp": "+966512345678",
"contact_email": "creator@example.com",
"logo": {
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/logo/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.png",
"url": "https://media.b7r.sa/store-media/logo.png"
},
"look": {
"theme": "night",
"color": null,
"font": null,
"saved_at": "2026-11-20T10:00:00.000Z"
},
"socials": {
"instagram": "@shop.one"
},
"home_sections": [
{
"key": "banner",
"on": true
},
{
"key": "pinned",
"on": false
},
{
"key": "all",
"on": true
}
],
"banner": {
"mode": "single",
"autoplay": false,
"slides": [
{
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/banner/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.jpg",
"image_url": "https://media.b7r.sa/store-media/banner.jpg",
"focus_x": 50,
"focus_y": 40,
"link": {
"kind": "category",
"category_id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b"
}
}
]
},
"announcement": {
"on": true,
"text": "Free gift this week",
"link": null
},
"status": "open",
"suspended_reason": null,
"link_shared_at": "2026-11-21T09:30:00.000Z",
"free_shipping_threshold": "250.00",
"seo": {
"title": null,
"description": null
},
"created_at": "2026-11-20T09:00:00.000Z"
}
}Check a store address
Says whether an address can be used before you rename the store, as the app’s check does; it changes nothing and needs only my_store:read. reason says why not: the address’s shape (length, 3 to 30 characters; characters, lower-case letters, digits and hyphens; edge_hyphen; double_hyphen; punycode), reserved, or taken by a store now or before, which includes your store’s own address. suggestions lists free addresses like it. The checks share the app’s 30 a minute for your account (429 rate_limited).
Headers
Bearer b7r_live_.... A key with the my_store:read area. X-B7R-Key works too; send one, never both.
ar for Arabic error titles; anything else gives English. Codes never change.
Query
At most 100.
Answer
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 |
| 409 | feature_not_available | 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/my-store/handle-check?handle=calligraphy-shop" \
-H "Authorization: Bearer $B7R_API_KEY"const res = await fetch("https://api.b7r.app/v1/my-store/handle-check?handle=calligraphy-shop", {
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
},
});
const data = await res.json();import os, requests
res = requests.get(
"https://api.b7r.app/v1/my-store/handle-check?handle=calligraphy-shop",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
},
timeout=30,
)
data = res.json(){
"available": false,
"reason": "taken",
"suggestions": [
"calligraphy-shop-store",
"calligraphy-shop-sa"
]
}Change your store address
Once per store: the old address keeps leading to the store and is never given to anyone else. A second change is refused with 409 my_store_rejected and the error handle_rename_used; a taken or reserved address with handle_unavailable. Sending the address the store already has changes nothing.
Headers
Bearer b7r_live_.... A key with the my_store: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
At most 100.
Answer
Child fields
Child fields
Child fields
Child fields
One of banner, pinned, all.
Child fields
One of none, single, slider.
Child fields
Child fields
One of open, closed, suspended.
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 |
| 409 | feature_not_available | No |
| 409 | my_store_rejected | 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/my-store/rename \
-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 '{
"handle": "calligraphy-shop"
}'const res = await fetch("https://api.b7r.app/v1/my-store/rename", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"handle": "calligraphy-shop"
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/my-store/rename",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"handle": "calligraphy-shop"
},
timeout=30,
)
data = res.json(){
"store": {
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"handle": "shop-one",
"url": "https://shop-one.b7r.sa",
"previous_handle": null,
"rename_available": true,
"name": "Shop One",
"bio": "Prints made by hand",
"contact_whatsapp": "+966512345678",
"contact_email": "creator@example.com",
"logo": {
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/logo/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.png",
"url": "https://media.b7r.sa/store-media/logo.png"
},
"look": {
"theme": "night",
"color": null,
"font": null,
"saved_at": "2026-11-20T10:00:00.000Z"
},
"socials": {
"instagram": "@shop.one"
},
"home_sections": [
{
"key": "banner",
"on": true
},
{
"key": "pinned",
"on": false
},
{
"key": "all",
"on": true
}
],
"banner": {
"mode": "single",
"autoplay": false,
"slides": [
{
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/banner/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.jpg",
"image_url": "https://media.b7r.sa/store-media/banner.jpg",
"focus_x": 50,
"focus_y": 40,
"link": {
"kind": "category",
"category_id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b"
}
}
]
},
"announcement": {
"on": true,
"text": "Free gift this week",
"link": null
},
"status": "open",
"suspended_reason": null,
"link_shared_at": "2026-11-21T09:30:00.000Z",
"free_shipping_threshold": "250.00",
"seo": {
"title": null,
"description": null
},
"created_at": "2026-11-20T09:00:00.000Z"
}
}Open your store
Reopens your existing store to shoppers after it was closed; an open store stays open. A store is first opened in the B7R app. A store B7R suspended is refused with 409 my_store_rejected and the error store_suspended.
Headers
Bearer b7r_live_.... A key with the my_store: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.
Answer
Child fields
Child fields
Child fields
Child fields
One of banner, pinned, all.
Child fields
One of none, single, slider.
Child fields
Child fields
One of open, closed, suspended.
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 |
| 409 | feature_not_available | No |
| 409 | my_store_rejected | 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/my-store/open \
-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/my-store/open", {
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/my-store/open",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
timeout=30,
)
data = res.json(){
"store": {
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"handle": "shop-one",
"url": "https://shop-one.b7r.sa",
"previous_handle": null,
"rename_available": true,
"name": "Shop One",
"bio": "Prints made by hand",
"contact_whatsapp": "+966512345678",
"contact_email": "creator@example.com",
"logo": {
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/logo/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.png",
"url": "https://media.b7r.sa/store-media/logo.png"
},
"look": {
"theme": "night",
"color": null,
"font": null,
"saved_at": "2026-11-20T10:00:00.000Z"
},
"socials": {
"instagram": "@shop.one"
},
"home_sections": [
{
"key": "banner",
"on": true
},
{
"key": "pinned",
"on": false
},
{
"key": "all",
"on": true
}
],
"banner": {
"mode": "single",
"autoplay": false,
"slides": [
{
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/banner/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.jpg",
"image_url": "https://media.b7r.sa/store-media/banner.jpg",
"focus_x": 50,
"focus_y": 40,
"link": {
"kind": "category",
"category_id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b"
}
}
]
},
"announcement": {
"on": true,
"text": "Free gift this week",
"link": null
},
"status": "open",
"suspended_reason": null,
"link_shared_at": "2026-11-21T09:30:00.000Z",
"free_shipping_threshold": "250.00",
"seo": {
"title": null,
"description": null
},
"created_at": "2026-11-20T09:00:00.000Z"
}
}Close your store
Type the store’s current address in confirm_handle to close it; another value is refused at /body/confirm_handle (confirm_handle_mismatch). Shoppers then see the store as closed. A suspended store is refused as for opening.
Headers
Bearer b7r_live_.... A key with the my_store: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
At most 100.
Answer
Child fields
Child fields
Child fields
Child fields
One of banner, pinned, all.
Child fields
One of none, single, slider.
Child fields
Child fields
One of open, closed, suspended.
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 |
| 409 | feature_not_available | No |
| 409 | my_store_rejected | 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/my-store/close \
-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 '{
"confirm_handle": "shop-one"
}'const res = await fetch("https://api.b7r.app/v1/my-store/close", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.B7R_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"confirm_handle": "shop-one"
}),
});
const data = await res.json();import os, requests, uuid
res = requests.post(
"https://api.b7r.app/v1/my-store/close",
headers={
"Authorization": f"Bearer {os.environ['B7R_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"confirm_handle": "shop-one"
},
timeout=30,
)
data = res.json(){
"store": {
"id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"handle": "shop-one",
"url": "https://shop-one.b7r.sa",
"previous_handle": null,
"rename_available": true,
"name": "Shop One",
"bio": "Prints made by hand",
"contact_whatsapp": "+966512345678",
"contact_email": "creator@example.com",
"logo": {
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/logo/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.png",
"url": "https://media.b7r.sa/store-media/logo.png"
},
"look": {
"theme": "night",
"color": null,
"font": null,
"saved_at": "2026-11-20T10:00:00.000Z"
},
"socials": {
"instagram": "@shop.one"
},
"home_sections": [
{
"key": "banner",
"on": true
},
{
"key": "pinned",
"on": false
},
{
"key": "all",
"on": true
}
],
"banner": {
"mode": "single",
"autoplay": false,
"slides": [
{
"path": "stores/2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e/banner/7a8b9c0d-1e2f-4a3b-8c5d-6e7f8a9b0c1d.jpg",
"image_url": "https://media.b7r.sa/store-media/banner.jpg",
"focus_x": 50,
"focus_y": 40,
"link": {
"kind": "category",
"category_id": "5e6f7a8b-9c0d-4e1f-8a3b-4c5d6e7f8a9b"
}
}
]
},
"announcement": {
"on": true,
"text": "Free gift this week",
"link": null
},
"status": "open",
"suspended_reason": null,
"link_shared_at": "2026-11-21T09:30:00.000Z",
"free_shipping_threshold": "250.00",
"seo": {
"title": null,
"description": null
},
"created_at": "2026-11-20T09:00:00.000Z"
}
}