API collection

Ready-to-run requests for the Esnad API. Import into Postman, Insomnia, Bruno, Hoppscotch, or any HTTP client that supports Postman Collection v2.1. Base URL is https://api.esnadapi.com. Authenticate with your API key (zatca_test_ for sandbox or zatca_live_ for production).

Setup

  1. Download the zip (or both JSON files) and import them in your API client.
  2. Select the Esnad API environment (if your client uses environments).
  3. Set apiKey to the key from your dashboard.

Tip

Import both the collection and the environment. The collection alone does not create environment variables in most clients.

What’s in the collection

  • Auth context — verify API key (GET /v1/auth/context)
  • EGS units (create, status, renew, list via status)
  • Invoices (simplified B2C, standard B2B, credit/debit notes, list, XML, PDF)
  • Reference data

API keys and webhook configuration are done in the dashboard. Every invoice request must include egs_unit_id for the branch or POS that is issuing. See Flow & integration.

Suggested first run

  1. Verify your API key with GET /v1/auth/context (see folder 0. Auth in the collection)
  2. Create an EGS unit (sandbox OTP 123345 with a zatca_test_ key). The collection saves egs_unit_id automatically in clients that run the included scripts.
  3. Poll EGS status until onboarding_status is active.
  4. Create a simplified or standard invoice.