Sifr Wahid Developers

API reference / Brands

Create brand

Create a brand

POST https://s.zo.sa/api/public/v1/brands
Scope products.read_writeIdempotency-Key supported

Request

Headers

NameTypeRequiredDescription
Idempotency-Keystring1 to 120 visible ASCII characters. A write sent again with the same key runs once; the retry gets the first answer back with the header Idempotent-Replayed: true. Use a new key for each new write. 1 to 120 characters

Request body

application/json required

  • nameobjectrequired
    2 fields
    • arstringrequired
    • enstringnullable

cURL

curl -sS -X POST "https://s.zo.sa/api/public/v1/brands" \
  -H "Authorization: Bearer $ZO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: erp-brand-DESERT-LOOM" \
  -d '{
  "name": {
    "ar": "Desert Loom",
    "en": "Desert Loom"
  }
}'

JavaScript

const response = await fetch('https://s.zo.sa/api/public/v1/brands', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ZO_API_KEY}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
    'Idempotency-Key': 'erp-brand-DESERT-LOOM',
  },
  body: JSON.stringify({
    "name": {
      "ar": "Desert Loom",
      "en": "Desert Loom"
    }
  }),
});
console.log(response.status, await response.json());

PHP

<?php

$ch = curl_init('https://s.zo.sa/api/public/v1/brands');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ZO_API_KEY'),
        'Accept: application/json',
        'Content-Type: application/json',
        'Idempotency-Key: erp-brand-DESERT-LOOM',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'name' => [
            'ar' => 'Desert Loom',
            'en' => 'Desert Loom',
        ],
    ]),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

echo $status, PHP_EOL, $body, PHP_EOL;

Python

import os

import requests

response = requests.post(
    "https://s.zo.sa/api/public/v1/brands",
    headers={
        "Authorization": f"Bearer {os.environ['ZO_API_KEY']}",
        "Accept": "application/json",
        "Idempotency-Key": "erp-brand-DESERT-LOOM",
    },
    json={
        "name": {
            "ar": "Desert Loom",
            "en": "Desert Loom",
        },
    },
    timeout=30,
)
print(response.status_code, response.json())

name.ar holds the Arabic name; the example puts the English name in both because these docs are English only.

Response 201
{
  "data": {
    "id": 1,
    "name": {
      "ar": null,
      "en": null
    },
    "slug": null,
    "logo_url": null,
    "created_at": "2026-11-23T06:01:53Z",
    "updated_at": "2026-11-23T06:01:53Z"
  }
}

Example generated from the schema.

Responses

201The new brand.
Response schema
  • dataobjectrequired
    6 fields
    • idintegerrequired
    • nameobjectrequired
      2 fields
      • arstringrequirednullable
      • enstringrequirednullable
    • slugstringrequirednullable
      Reserved; null until brands carry slugs.
    • logo_urlstringrequirednullable
      Reserved; null until brands carry logos.
    • created_atstring (date-time)required
    • updated_atstring (date-time)required
401Missing, unknown, revoked or expired key.

An error object: {"error": {"code", "message", "fields"}}.

402The store's plan does not include this feature (error code feature_locked, with the feature and the plan that has it). Every operation answers it with feature public_api when the key's store is not on the Pro plan.

An error object: {"error": {"code", "message", "fields"}}.

403The key lacks the scope (code insufficient_scope, naming it in scope), the caller's address is not allowed (ip_not_allowed), or the store is suspended (store_suspended: reads stay allowed, every write answers this).

An error object: {"error": {"code", "message", "fields"}}.

409A write with the same Idempotency-Key is still running (code duplicate_request); retry shortly.

An error object: {"error": {"code", "message", "fields"}}.

422The body is invalid (code validation_failed). fields names each invalid input by its path in the body, such as variants.0.sku or images.1.url.

An error object: {"error": {"code", "message", "fields"}}.

429Too many requests (code rate_limited); see Retry-After.

An error object: {"error": {"code", "message", "fields"}}.