> For the complete documentation index, see [llms.txt](https://invoice4u.gitbook.io/invoice4u-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://invoice4u.gitbook.io/invoice4u-docs/getting-started/welcome.md).

# Welcome to the Invoice4U API

The Invoice4U API lets you create tax-compliant documents (invoices, receipts, credit invoices and more), manage customers and branches, and charge credit cards through the Invoice4U clearing service — all from your own application.

Use it to automate billing flows, sync your CRM or e-commerce store with Invoice4U, and collect payments with hosted clearing pages, saved card tokens, or standing orders.

The clearing service supports four providers — **UPay**, **Meshulam**, **YaadSarig** and **Cardcom** (`ClearingCompanies` values `6`, `7`, `12`, `15`); the one configured on your account is used automatically. See the [clearing overview](/invoice4u-docs/clearing-payments/overview.md).

### Get access

1. Create an account at [invoice4u.co.il](https://invoice4u.co.il).
2. Enable API access for your organization (Settings → API, or contact support).
3. Authenticate with your credentials or API key and use the returned token in your API requests.

### Base URLs

| Environment  | Base URL                                                |
| ------------ | ------------------------------------------------------- |
| Production   | `https://api.invoice4u.co.il/Services/ApiService.svc`   |
| QA (staging) | `https://apiqa.invoice4u.co.il/Services/ApiService.svc` |

All endpoints in this documentation are relative to these base URLs. Develop and test against **QA** first, then switch the base URL to **Production**.

{% hint style="info" %}
The API is a WCF service exposed over REST (JSON). A SOAP endpoint is also available at `{baseUrl}/Soap` (basicHttpBinding) for legacy integrations, but REST/JSON is the recommended and documented surface.
{% endhint %}

### Request format

Unless stated otherwise, endpoints are called with **POST** and a JSON body that wraps the operation parameters by name (WCF "wrapped request" style):

```http
POST /Services/ApiService.svc/CreateDocument HTTP/1.1
Host: api.invoice4u.co.il
Content-Type: application/json

{
  "doc": { ... },
  "token": "<your-token>"
}
```

### Authentication

Almost every endpoint takes a `token` parameter — this is your organization **API key** (GUID), passed in the body of each call. See [Authentication Overview](/invoice4u-docs/authentication/overview.md).

### Response envelope

Most response objects inherit a common envelope. Always check `Errors` before using the payload:

| Field      | Type   | Description                                                                                                                                    |
| ---------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `Errors`   | array  | List of errors. Empty on success. Each item: `ID` (numeric error code), `Error` (error name), `Paramters` (optional context, e.g. row number). |
| `Info`     | array  | Informational messages (e.g. `SuccessfulAction`).                                                                                              |
| `OpenInfo` | object | Key/value extras returned by some endpoints (e.g. `PaymentMismatchDelta`).                                                                     |

### First steps

Follow the [Quick Start](/invoice4u-docs/getting-started/quick-start.md), then read [Key Tips & Differences](/invoice4u-docs/getting-started/key-tips.md) (also available [in Hebrew](/invoice4u-docs/getting-started/key-tips-hebrew.md)).

### Machine-readable resources

* [OpenAPI 3.0 spec (JSON)](https://raw.githubusercontent.com/invoice4udev-hue/i4u-docs/main/openapi/invoice4u-openapi.json) — the full API surface for code generators, Postman, and AI agents.
* [Postman collection](https://raw.githubusercontent.com/invoice4udev-hue/i4u-docs/main/openapi/Invoice4u%20API%20collection.postman_collection.json) — ready-made requests for every documented endpoint.
* AI agents: this site serves [llms.txt](https://invoice4u.gitbook.io/invoice4u-docs/llms.txt), and every page is available as Markdown by appending `.md` to its URL.

### Support

For integration help, contact Invoice4U support through your account. Include the endpoint called, the request payload, the response payload, and the environment (QA/Production) with every report.

### Next pages

* [Quick Start](/invoice4u-docs/getting-started/quick-start.md)
* [Authentication Overview](/invoice4u-docs/authentication/overview.md)
* [Document Endpoints Overview](/invoice4u-docs/documents/overview.md)
