Sifr Wahid Developers

API reference / Products

Get product

One product

GET https://s.zo.sa/api/public/v1/products/{id}
Scope products.read

Request

Path parameters

NameTypeRequiredDescription
idintegerrequiredAt least 1

cURL

curl -sS "https://s.zo.sa/api/public/v1/products/501" \
  -H "Authorization: Bearer $ZO_API_KEY" \
  -H "Accept: application/json"

JavaScript

const response = await fetch('https://s.zo.sa/api/public/v1/products/501', {
  headers: {
    Authorization: `Bearer ${process.env.ZO_API_KEY}`,
    Accept: 'application/json',
  },
});
console.log(response.status, await response.json());

PHP

<?php

$ch = curl_init('https://s.zo.sa/api/public/v1/products/501');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('ZO_API_KEY'),
        'Accept: application/json',
    ],
]);
$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.get(
    "https://s.zo.sa/api/public/v1/products/501",
    headers={
        "Authorization": f"Bearer {os.environ['ZO_API_KEY']}",
        "Accept": "application/json",
    },
    timeout=30,
)
print(response.status_code, response.json())
Response 200
{
  "data": {
    "id": 501,
    "type": "physical",
    "status": "active",
    "name": {
      "ar": "...",
      "en": "Blue T-shirt"
    },
    "description": {
      "ar": "...",
      "en": "A cotton T-shirt in blue."
    },
    "slug": "blue-t-shirt",
    "url": "https://s.zo.sa/my-store/p/blue-t-shirt",
    "images": [],
    "images_pending": [],
    "categories": [
      {
        "id": 12,
        "name": {
          "ar": "...",
          "en": "T-shirts"
        },
        "slug": "t-shirts"
      }
    ],
    "brand": null,
    "variants": [
      {
        "id": 811,
        "sku": "TSHIRT-BLUE-M",
        "barcode": "6281234567895",
        "price": 2500,
        "sale_price": null,
        "quantity": 37,
        "unlimited": false,
        "hidden": false,
        "weight_grams": 250,
        "options": []
      }
    ],
    "sale_starts_at": null,
    "sale_ends_at": null,
    "created_at": "2026-11-20T09:12:44Z",
    "updated_at": "2026-11-23T06:01:53Z"
  }
}

Example.

Responses

200The product.
Response schema
  • dataobjectrequired
    A product has at least one variant (a product without options has exactly one), and prices live on its variants.
    16 fields
    • idintegerrequired
    • typestringrequired
      One of physical, service, food, digital, card, group, booking
    • statusstringrequired
      One of draft, active, hidden
    • nameobjectrequired
      2 fields
      • arstringrequirednullable
      • enstringrequirednullable
    • descriptionobjectrequired
      2 fields
      • arstringrequirednullable
      • enstringrequirednullable
    • slugstringrequired
    • urlstring (uri)required
      The product page on the storefront.
    • imagesarray of objectsrequired
      4 fields
      • idintegerrequired
      • urlstring (uri)required
      • altstringrequirednullable
        Reserved; null until images carry alt text.
      • sortintegerrequired
    • images_pendingarray of objectsrequired
      Picture links sent in a write that are copied in the background, usually within seconds. A link stays here with status pending until its copy joins images (and product.updated is sent), or with status failed when it could not be copied; failed links stay until the next picture write. Empty when nothing waits.
      3 fields
      • source_urlstring (uri)required
        The link as it was sent.
      • statusstringrequired
        One of pending, failed
      • errorstringrequirednullable
        Why a failed link was not copied; null while pending. too_many_images when the product already had 10 pictures by the time the copy finished; copy_failed when the copy job itself stopped, or ran out of time before this link (a job downloads for 60 seconds at most, 10 per link), so send it again in a new write.
        One of image_unreachable, too_many_images, copy_failed
    • categoriesarray of objectsrequired
      3 fields
      • idintegerrequired
      • nameobjectrequired
        2 fields
        • arstringrequirednullable
        • enstringrequirednullable
      • slugstringrequired
    • brandobjectrequirednullable
      3 fields
      • idintegerrequired
      • nameobjectrequired
        2 fields
        • arstringrequirednullable
        • enstringrequirednullable
      • slugstringrequirednullable
        Reserved; null until brands carry slugs.
    • variantsarray of objectsrequired
      10 fields
      • idintegerrequired
      • skustringrequirednullable
      • barcodestringrequirednullable
      • priceintegerrequired
        Halalas.
      • sale_priceintegerrequirednullable
        Halalas. Applies only between the product's sale_starts_at and sale_ends_at (a null end is open, so both null means always); outside that window the variant sells at price.
      • quantityintegerrequired
        Stock across all branches.
      • unlimitedbooleanrequired
        True when stock is not tracked; quantity is then no limit.
      • hiddenbooleanrequired
        Hidden from shoppers by the merchant; still part of the catalogue.
      • weight_gramsintegerrequirednullable
      • optionsarray of objectsrequired
        2 fields
        • nameobjectrequired
          2 fields
          • arstringrequirednullable
          • enstringrequirednullable
        • valueobjectrequired
          2 fields
          • arstringrequirednullable
          • enstringrequirednullable
    • sale_starts_atstring (date-time)requirednullable
      When the variants' sale_price starts to apply; null means from any time.
    • sale_ends_atstring (date-time)requirednullable
      When the variants' sale_price stops applying; null means no end.
    • 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"}}.

404No such row in this store (code not_found).

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

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

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