> ## Documentation Index
> Fetch the complete documentation index at: https://docs.einvoice.sa.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Introduction

> Overview of the ezInvoice REST API

ezInvoice provides a REST API that uses standard HTTPS methods for requests, authenticates via a bearer token, and returns responses in JSON format.

The ezInvoice API is available in two environments: **Test** and **Production**. Using the Test environment does not submit invoices to ZATCA or affect your live data. The environment is determined by which credentials (VAT number, username, secret) you authenticate with.

## Base URL

All API requests must be made over HTTPS to the following base URL:

```
https://api.einvoice.sa.com:{port}/v1/e-invoicing
```

## Postman Collection

You can view and import the API collection from here: [Postman Collection](https://documenter.getpostman.com/view/33624817/2sB3BEnA6z)

## Setting Up Postman

1. Import the Collection into Postman.
2. Configure variables: `remote_hostname`, `port`, and `onboard_id`.
3. Choose the appropriate credentials (Test or Production) when authenticating.

<Info>
  Always use an environment in Postman to manage your API keys securely. Never hardcode credentials directly in requests.
</Info>

<Tip>
  **Testing Best Practices:**

  * Start with the Test environment to verify your integration
  * Test invoice clearance, reporting, and error handling before going live
  * Switch to Production credentials only after thorough testing
</Tip>
