Get order
One order
GET
https://s.zo.sa/api/public/v1 /orders/{id} Scope
orders.readRequest
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | integer | required | At least 1 |
cURL
curl -sS "https://s.zo.sa/api/public/v1/orders/1042" \
-H "Authorization: Bearer $ZO_API_KEY" \
-H "Accept: application/json"JavaScript
const response = await fetch('https://s.zo.sa/api/public/v1/orders/1042', {
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/orders/1042');
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/orders/1042",
headers={
"Authorization": f"Bearer {os.environ['ZO_API_KEY']}",
"Accept": "application/json",
},
timeout=30,
)
print(response.status_code, response.json()){
"data": {
"id": 1042,
"number": "1042",
"status": "in_progress",
"payment_status": "pending",
"payment_method": "cod",
"source": "storefront",
"currency": "SAR",
"totals": {
"subtotal": 5000,
"discount": 0,
"shipping": 2500,
"tax": 978,
"total": 7500
},
"customer": {
"id": 2187,
"name": "Sara Ahmed",
"mobile": "+966501234567",
"email": "sara@example.com"
},
"customer_note": null,
"shipping_address": {
"name": "Sara Ahmed",
"mobile": "+966501234567",
"country": "SA",
"city": "Riyadh",
"district": "Al Olaya",
"street": "King Fahd Road",
"building": "12",
"postal_code": "12211",
"details": null
},
"items": [
{
"id": 3301,
"product_id": 501,
"variant_id": 811,
"sku": "TSHIRT-BLUE-M",
"name": {
"ar": "...",
"en": "Blue T-shirt"
},
"quantity": 2,
"unit_price": 2500,
"total": 5000,
"options": null
}
],
"created_at": "2026-11-23T06:01:53Z",
"updated_at": "2026-11-23T07:15:20Z"
}
}Example. An answer for a key with customers.read. Without it the customer is {id, name}, and shipping_address and customer_note are absent.
Responses
200The order.
Response schema
dataobjectrequiredAn order. shipping_address is present only with the customers.read scope (null for an order with nothing to ship) and so is customer_note; without that scope both keys are absent. Card codes, gift links, file paths and merchant notes are never shown.14 fields
idintegerrequirednumberstringrequiredThe order number the merchant and the shopper see.statusstringrequiredpayment_statusstringrequiredpayment_methodstringrequiredsourcestringrequirednullableWhere the order came from: storefront, manual (typed in the dashboard), api (created through this API), or a marketplace (trendyol, amazon).currencystringrequiredtotalsobjectrequiredHalalas. shipping includes the cash-on-delivery fee; tax is the VAT already included in total. total may also hold paid order options.5 fields
subtotalintegerrequireddiscountintegerrequiredshippingintegerrequiredtaxintegerrequiredtotalintegerrequired
customerobjectrequiredWho placed the order. Without the customers.read scope only id and name are present; with it, mobile and email are added.4 fields
idintegerrequirednullableThe customer record (GET /customers/{id}).namestringrequirednullablemobilestringnullablePresent only with customers.read. E.164 for Saudi numbers.emailstringnullablePresent only with customers.read.
customer_notestringnullableWhat the shopper wrote with the order. Present only with customers.read (free text that may hold contact details).shipping_addressobjectnullable9 fields
namestringrequirednullableThe recipient (the customer unless the address names someone else).mobilestringrequirednullablecountrystringrequiredISO 3166-1 alpha-2; SA unless the address says otherwise.citystringrequirednullableThe city's name as the shopper reads it.districtstringrequirednullablestreetstringrequirednullablebuildingstringrequirednullablepostal_codestringrequirednullabledetailsstringrequirednullableAddress details the shopper typed (landmark, floor and so on).
itemsarray of objectsrequired9 fields
idintegerrequiredproduct_idintegerrequirednullableNull when the line is not tied to a product.variant_idintegerrequirednullableskustringrequirednullablenameobjectrequired2 fields
arstringrequirednullableenstringrequirednullable
quantityintegerrequiredunit_priceintegerrequiredHalalas.totalintegerrequiredHalalas.optionsobjectrequirednullableThe chosen option values as one text (for example "Red / L"); null for a product without options.2 fields
arstringrequirednullableenstringrequirednullable
created_atstring (date-time)requiredWhen the order was placed.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"}}.