Sifr Wahid Developers

Get started

Getting a key

Who creates a key, each choice on the way, the limits, and how to keep, rotate and revoke it.

Who creates it: the store owner only, in the dashboard, and never from a support session.

Labels below are the dashboard's English labels. Switch the dashboard language to English to see them.

Create the key

  1. All → Developer tools → API keys (/settings/api-keys) → New key.
  2. Key name: the system that will use it, such as "Odoo main warehouse". One key per system, so you know who did what and can revoke one without the others.
  3. Permissions (scopes): for each resource None, Read or Read and write. Pick the fewest. For an ERP, usually:
    • Products, inventory, orders and webhooks: read and write.
    • Store: read.
    • Customers: read only when you need the customer's mobile, email and address on orders, or create orders for a customer by mobile. Without it an order's customer is {id, name} only, and a customer object with a mobile is answered 422 customers_scope_required.
    • Sensitive scopes (customers, and payments and shipments read and write, which move money) show a warning. The full table is under scopes.
  4. Allowed IP addresses (optional, recommended): up to 20 addresses or ranges (IPv4 or IPv6, such as 203.0.113.7 or 203.0.113.0/24). A call from any other address is answered 403 ip_not_allowed.
  5. Expiry date (optional): the key stops at the end of that day, Riyadh time.
  6. Next, then Send verification code: a 4-digit code goes to the owner's verified mobile. Type it, then Create.
  7. The key (zo_live_…) is shown once. Copy it now and press Done, I saved it. The list then shows only its prefix and its last use.

Limits

  • A store holds at most 20 live keys.
  • The owner may ask for a code 10 times and create 20 keys every 10 minutes.
  • The codes for one mobile are capped (5 an hour and 10 a day by default).
  • The API is on the Pro plan only: a store on Basic or Plus cannot create a key.

Keeping it safe

  • In an environment variable or a secrets store (such as ZO_API_KEY), never in code, a repository or an emailed file.
  • In the Authorization header only, never in the URL (a key in the query string is refused).
  • To rotate: create a new key, move your system to it, then revoke the old one. If a key leaks, revoke it on the page at once: the next call with it is answered 401 invalid_token, and the webhooks it created stop.

Never send a key to support, in an email or in a GitHub issue. If you need help with a key, give the error code and the time of the call.

What a key can reach

Each key is bound to one store, and every answer is about that store only. What it may do inside that store is its scopes: see Authentication and scopes and the key and security model.