Skip to main content

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>
MethodAddressWhat it does
GET/meYour shop, its currency, your key and your limits.
GET/shelvesEvery shelf a product may sit on (id, name and path in en/ar).
GET/colorsMazad's colour list, if you prefer to send color_id.
GET/sizesMazad'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:bulkAdd or update up to 100 products. Answers 202 with a batch_id.
GET/batches/{id}The result of a product send.
PATCH/products/stock:bulkChange stock only, up to 1,000 lines.
PATCH/products/price:bulkChange prices only, up to 1,000 lines.
POST/products/unpublish:bulkTake products off sale (kept, never deleted), up to 1,000.
GET/productsWhat 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 }
          ]
        }
      ]
    }
  ]
}
FieldNeededMeaning
variants_are_completenotrue (default): the colours/sizes sent are the whole list; the rest are switched off.
products[]yes1 to 100 products.
external_idyesYour own number for the product (up to 255 letters).
source_languageyesen, ar or tr — the language you wrote name and description in.
nameyesText, or {"en": …, "ar": …} for several languages.
descriptionnoText or a language object.
category_idyesA shelf id from GET /shelves.
priceyesYour selling price in your shop's currency.
price_currencynoIf sent, must be your shop's currency.
compare_at_pricenoThe old price before a discount.
stock_quantitynoPieces 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.
availablenofalse shows the product as not available now.
min_order_quantitynoFewest pieces per order line, for items sold in packs (1–99).
skunoYour code shown to staff (up to 100 letters).
brandnoBrand 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.
gendernomale, female or both.
images[]noPhoto links (https). Absent = keep; [] = remove all.
source_videono{"url": …, "thumbnail": …, "width": …, "height": …, "duration": …}
specifications[]noUp to 50 {"name", "value"} lines for the details table.
variants[]noColours: external_id, color or color_id, price, compare_at_price, stock_quantity, images[], sub_options[].
sub_options[]noSizes 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]
}
HTTPerrorWhat to do
401invalid_keyThe key is wrong, ended or missing. Check the Authorization header.
403key_pausedOur team paused your key. You were told why; wait until it is switched on.
403key_not_activeThe key is still waiting for approval, or was refused or ended.
403shop_not_approvedYour shop is not approved (or is suspended).
429rate_limitedMore than 60 calls a minute. Wait the seconds in Retry-After.
422field_not_allowedYou sent a field Mazad sets itself — remove the fields listed.
422validationA field is missing or wrong — fields lists each one.
422too_many_productsMore than 100 products in one send.
422duplicate_external_idThe same external_id twice in one send.
422wrong_currencyA price is not in your shop's currency.
422unknown_shelfcategory_id is not one of the shelves from GET /shelves.
422product_cap_reachedYour shop holds its limit of products. Updates still work.
422too_many_new_brandsMore than 20 brands Mazad does not have yet in one send. Send the rest in the next send.
404not_foundThat batch does not exist or is not yours.
Mazad Developer is for approved Mazad sellers who run their own system.Mazad Market