Sifr Wahid Developers

API reference / Webhooks

Get webhook

One of this key's webhooks

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

Request

Path parameters

NameTypeRequiredDescription
idintegerrequiredAt least 1

cURL

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

JavaScript

const response = await fetch('https://s.zo.sa/api/public/v1/webhooks/7', {
  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/webhooks/7');
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/webhooks/7",
    headers={
        "Authorization": f"Bearer {os.environ['ZO_API_KEY']}",
        "Accept": "application/json",
    },
    timeout=30,
)
print(response.status_code, response.json())
Response 200
{
  "data": {
    "id": 7,
    "name": "ERP orders",
    "event": "order.created",
    "url": "https://erp.example.com/zo/hooks",
    "rule": null,
    "headers": [],
    "security_strategy": "signature",
    "signature_version": 2,
    "is_active": true,
    "disabled_reason": null,
    "failures": 0,
    "last_status": 200,
    "last_delivered_at": "2026-11-23T06:02:10Z",
    "created_at": "2026-11-22T10:00:00Z",
    "updated_at": "2026-11-22T10:00:00Z"
  }
}

Example.

Responses

200The row.
Response schema
  • dataobjectrequired
    A webhook this key created. The secret is never shown here; it comes back once, on create and on rotate.
    15 fields
    • idintegerrequired
    • namestringrequired
    • eventstringrequired
    • urlstring (uri)required
    • rulestringrequirednullable
      A rule on the payload attributes, such as total > 100 AND payment_method = `cod`.
    • headersarray of objectsrequired
      2 fields
      • keystringrequired
        Up to 64 characters Pattern ^[A-Za-z0-9-]+$
      • valuestringrequired
        Masked (••••••) on every read; shown only in the answer to the POST or PATCH that sent it. Sending the mask back in a PATCH keeps the stored value.
        Up to 500 characters
    • security_strategystringrequired
      One of signature, token, none
    • signature_versionintegerrequired
      1 signs the raw body; 2 signs "{X-Zo-Timestamp}.{raw body}" and sends X-Zo-Timestamp.
      One of 1, 2
    • is_activebooleanrequired
    • disabled_reasonstringrequirednullable
      failures when the webhook switched itself off.
    • failuresintegerrequired
      Failed deliveries in a row.
    • last_statusintegerrequirednullable
      The HTTP status of the last delivery.
    • last_delivered_atstring (date-time)requirednullable
    • 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"}}.