Reference
Every address below starts with the address in the first box. Every call needs your key in the Authorization header and answers in JSON.
Addresses
http
https://api.mazad.market/api/v1/developer
Authorization: Bearer <key>| Method | Address | What it does |
|---|---|---|
| GET | /me | Your shop, its currency, your key and your limits. |
| GET | /shelves | Every shelf a product may sit on (id, name and path in en/ar). |
| GET | /colors | Mazad's colour list, if you prefer to send color_id. |
| GET | /sizes | Mazad's size list, if you prefer to send size_id. |
| GET | /brands?q= | Find a brand by name (at least 2 letters, up to 50 results). |
| POST | /products:bulk | Add or update up to 100 products. Answers 202 with a batch_id. |
| GET | /batches/{id} | The result of a product send. |
| PATCH | /products/stock:bulk | Change stock only, up to 1,000 lines. |
| PATCH | /products/price:bulk | Change prices only, up to 1,000 lines. |
| POST | /products/unpublish:bulk | Take products off sale (kept, never deleted), up to 1,000. |
| GET | /products | What Mazad holds from your system, 50 a page (per_page up to 100). |
GET /me
json
{
"shop": { "id": 15620, "name": "Your Shop", "currency": "IQD" },
"key": { "kind": "live", "last4": "a9F2" },
"limits": {
"products_per_send": 100,
"calls_per_minute": 60,
"product_cap": 10000,
"products_held": 312
}
}POST /products:bulk
json
{
"variants_are_complete": true,
"products": [
{
"external_id": "SKU-1001",
"source_language": "en",
"name": "Cotton shirt, long sleeves",
"description": "Soft 100% cotton shirt with a classic collar.",
"category_id": 123,
"brand": "Your Brand",
"gender": "male",
"price": 25000,
"compare_at_price": 30000,
"stock_quantity": 40,
"images": [
"https://your-site.com/images/sku-1001-front.jpg",
"https://your-site.com/images/sku-1001-back.jpg"
],
"specifications": [
{ "name": "Material", "value": "100% cotton" }
],
"variants": [
{
"external_id": "SKU-1001-WHITE",
"variant_type": "color",
"color": "White",
"images": ["https://your-site.com/images/sku-1001-white.jpg"],
"sub_options": [
{ "external_id": "SKU-1001-WHITE-M", "size": "M", "stock_quantity": 15 },
{ "external_id": "SKU-1001-WHITE-L", "size": "L", "stock_quantity": 10, "price": 26000 }
]
}
]
}
]
}| Field | Needed | Meaning |
|---|---|---|
| variants_are_complete | no | true (default): the colours/sizes sent are the whole list; the rest are switched off. |
| products[] | yes | 1 to 100 products. |
| external_id | yes | Your own number for the product (up to 255 letters). |
| source_language | yes | en, ar or tr — the language you wrote name and description in. |
| name | yes | Text, or {"en": …, "ar": …} for several languages. |
| description | no | Text or a language object. |
| category_id | yes | A shelf id from GET /shelves. |
| price | yes | Your selling price in your shop's currency. |
| price_currency | no | If sent, must be your shop's currency. |
| compare_at_price | no | The old price before a discount. |
| stock_quantity | no | Pieces you have, for a product without colours/sizes. With colours and sizes, send stock on each of them: Mazad adds them up for the product, and GET /products shows that total. |
| available | no | false shows the product as not available now. |
| min_order_quantity | no | Fewest pieces per order line, for items sold in packs (1–99). |
| sku | no | Your code shown to staff (up to 100 letters). |
| brand | no | Brand name, matched to Mazad's brand list (GET /brands helps you check). A brand Mazad does not have yet is added by your send, at most 20 new brands in one send. Leave it out for a product with no brand. |
| gender | no | male, female or both. |
| images[] | no | Photo links (https). Absent = keep; [] = remove all. |
| source_video | no | {"url": …, "thumbnail": …, "width": …, "height": …, "duration": …} |
| specifications[] | no | Up to 50 {"name", "value"} lines for the details table. |
| variants[] | no | Colours: external_id, color or color_id, price, compare_at_price, stock_quantity, images[], sub_options[]. |
| sub_options[] | no | Sizes of a colour: external_id, size or size_id, stock_quantity, price, compare_at_price. |
Mazad sets these itself and refuses them if you send them: vendor_id, external_source, platform_defaults, seller_name, price_basis, rating, reviews_count, country_id, external_url, and source_url / source_price on colours and sizes.
http
HTTP/1.1 202 Accepted
{
"batch_id": 48213,
"status": "queued",
"idempotent": false
}GET /batches/{id}
status is queued or processing while it runs, then done (everything taken), partial (some products could not be taken — see failed) or failed (nothing taken — see error).
json
{
"batch_id": 48213,
"status": "partial",
"total_products": 2,
"created": 1,
"updated": 0,
"failed": [
{ "external_id": "SKU-1002", "reason": "images.0: The image could not be downloaded." }
]
}PATCH /products/stock:bulk
json
{
"updates": [
{ "external_id": "SKU-1001", "variant_external_id": "SKU-1001-WHITE-M", "stock_quantity": 12 },
{ "external_id": "SKU-1002", "stock_quantity": 0 }
]
}Answer: {"updated": <how many>, "failed": [ … lines that were not found … ]}.
PATCH /products/price:bulk
json
{
"updates": [
{ "external_id": "SKU-1001", "price": 24000, "compare_at_price": 30000 },
{ "external_id": "SKU-1001", "variant_external_id": "SKU-1001-WHITE-L", "price": 25500 }
]
}Answer: {"updated": <how many>, "failed": [ … ]}. A price_currency other than your shop's is refused.
POST /products/unpublish:bulk
json
{
"external_ids": ["SKU-0999", "SKU-0998"]
}Answer: {"unpublished": <how many>, "failed": [ … ]}.
GET /products
Filters: external_id[] (up to 100), status (approved, pending, rejected, inactive), per_page (1–100), page.
json
{
"products": [
{
"external_id": "SKU-1001",
"mazad_id": 3970015,
"status": "approved",
"refused_reason": null,
"price": 25000,
"currency": "IQD",
"stock": 25,
"url": "https://mazad.market/en/products/cotton-shirt-long-sleeves",
"updated_at": "2026-11-28T10:15:00+00:00"
}
],
"page": 1,
"last_page": 7,
"total": 312
}Errors
A refused call answers with a code you can act on, and a message in English:
http
HTTP/1.1 422 Unprocessable Content
{
"error": "unknown_shelf",
"message": "category_id must be one of the end shelves from GET /developer/shelves.",
"category_ids": [999]
}| HTTP | error | What to do |
|---|---|---|
| 401 | invalid_key | The key is wrong, ended or missing. Check the Authorization header. |
| 403 | key_paused | Our team paused your key. You were told why; wait until it is switched on. |
| 403 | key_not_active | The key is still waiting for approval, or was refused or ended. |
| 403 | shop_not_approved | Your shop is not approved (or is suspended). |
| 429 | rate_limited | More than 60 calls a minute. Wait the seconds in Retry-After. |
| 422 | field_not_allowed | You sent a field Mazad sets itself — remove the fields listed. |
| 422 | validation | A field is missing or wrong — fields lists each one. |
| 422 | too_many_products | More than 100 products in one send. |
| 422 | duplicate_external_id | The same external_id twice in one send. |
| 422 | wrong_currency | A price is not in your shop's currency. |
| 422 | unknown_shelf | category_id is not one of the shelves from GET /shelves. |
| 422 | product_cap_reached | Your shop holds its limit of products. Updates still work. |
| 422 | too_many_new_brands | More than 20 brands Mazad does not have yet in one send. Send the rest in the next send. |
| 404 | not_found | That batch does not exist or is not yours. |