Guide
Everything you need to know to keep your Mazad shop in step with your system.
Keys
- Each shop has at most one live key and one test key at a time.
- Live keys start with mzd_live_, test keys with mzd_test_.
- Send it as: Authorization: Bearer <your key>.
- Our team can pause a live key; while paused every call answers key_paused. You are told when it is paused or switched on again.
- You can end a key yourself at any time in Developer keys, and make a fresh one.
Your product numbers (external_id)
Every product, colour and size carries your OWN number in external_id — usually the SKU or the id in your database. Mazad uses it to recognise the product the next time you send it: the same external_id updates the product, a new one creates a product.
- Keep it the same for ever. Changing it makes Mazad think it is a new product.
- It must be unique inside your shop. Two products with the same external_id in one send are refused.
- Colours and sizes need their own external_id too, unique within the product.
Shelves
Every product sits on one of Mazad's shelves. GET /developer/shelves gives the full list of shelves a product may sit on, with their names and full paths in English and Arabic. Put the shelf's id in category_id.
{
"shelves": [
{
"id": 123,
"name": { "en": "Shirts", "ar": "قمصان" },
"path": { "en": "Men › Clothing › Shirts", "ar": "رجال › ملابس › قمصان" }
}
]
}Only the last shelf of a branch is accepted (for example "Shirts", not "Men"). Read the list once a day and keep a copy; shelves change rarely.
Names, descriptions and languages
Write the name and description in one language and say which in source_language (en, ar or tr). Mazad translates them into the other languages by itself.
If you already have more than one language, send an object instead of plain text, for example "name": {"en": "Cotton shirt", "ar": "قميص قطن"}. What you send is kept; only the missing languages are translated.
Prices and currency
- price is the price the customer pays you, in your shop's currency (GET /developer/me tells you which).
- compare_at_price is the old price before a discount; when it is higher, shoppers see the saving.
- A colour or size may carry its own price; without one it uses the product's price.
- A price in another currency is refused with wrong_currency — Mazad never converts your prices.
Photos and video
Send photos as public links (https) in images. Mazad downloads and keeps its own copy, so your links only need to work at the moment you send. The first photo is the main one. A colour may carry its own photos.
- Leave out images to keep the photos Mazad already has.
- Send "images": [] to remove all photos.
- One video per product may be sent as source_video with a url.
Colours and sizes
Colours go in variants, and each colour's sizes in its sub_options. A product with sizes but no colours sends one variant without a colour and puts the sizes under it.
Write the colour and size as words ("White", "M") — Mazad matches them to its own list. If you prefer exact ids, GET /developer/colors and GET /developer/sizes give the lists; send color_id or size_id instead.
With "variants_are_complete": true (the usual way), the colours and sizes you send are the whole list: any colour or size you no longer send is switched off. Send false only when you are sending a part of the list on purpose.
Sending products
POST /developer/products:bulk takes up to 100 products. Mazad checks the whole send at once — if something is wrong with the send itself (a wrong shelf, the wrong currency, too many products) nothing is taken and you get the reason straight away.
A send that passes is answered 202 with a batch_id and handled in the background, usually within seconds. Ask GET /developer/batches/{batch_id} for the result: how many were created and updated, and the reason for any product that could not be taken.
HTTP/1.1 202 Accepted
{
"batch_id": 48213,
"status": "queued",
"idempotent": false
}{
"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." }
]
}Add an Idempotency-Key header (any text up to 180 letters) to make a send safe to repeat: if your connection drops and you send the same key again, Mazad answers with the first batch instead of taking it twice.
Quick changes: stock and price
To change only stock or only prices, use PATCH /developer/products/stock:bulk and PATCH /developer/products/price:bulk. They take up to 1,000 lines, work at once, and do not touch anything else. Add variant_external_id to change one colour or size.
{
"updates": [
{ "external_id": "SKU-1001", "variant_external_id": "SKU-1001-WHITE-M", "stock_quantity": 12 },
{ "external_id": "SKU-1002", "stock_quantity": 0 }
]
}Products you stop selling
Send their external_id to POST /developer/products/unpublish:bulk. They are taken off sale and kept — sending them again later puts them back. Mazad never deletes a product your system sent.
Review and going on sale
Each new product follows your shop's usual rule: if your shop's products are approved automatically, it goes on sale at once; otherwise our team checks it first. GET /developer/products shows each product's status (approved, pending, rejected or inactive) and, when refused, the reason.
Your system owns its products
A product your system sends is controlled by your system. In the Mazad seller app and seller area its details are locked, so a hand edit never disagrees with your next send. Change the product in your own system and send it again.
Limits
| What | Limit |
|---|---|
| Products in one send | 100 |
| Stock or price lines in one call | 1,000 |
| Calls per minute, per key | 60 |
| Products your shop may hold from your system | 10,000 (our team can raise it) |
Going over the calls limit answers 429 rate_limited with a Retry-After header — wait that many seconds and try again. Reaching the product limit answers product_cap_reached; updates to products you already have still work.
Test mode
Every call works the same with a test key, against the real shelves, colours, sizes and your real products — but nothing is ever saved or changed. A product send answers what would happen:
{
"test": true,
"accepted": 1,
"would_create": 1,
"would_update": 0,
"new_brands": ["Your Brand"],
"message": "Test key: everything was checked and nothing was saved."
}new_brands lists the brands your send would add to Mazad, because Mazad does not have them yet. A real send adds them and your products go on sale under them.
Your call log
Developer keys in your seller area lists your last calls (address, answer, how long it took) and your last product sends with every product that could not be taken. Use it when something does not look right.