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

# Invoices (sales / purchase entries)

### Definition

In the Accounting API, a **sales entry** is a customer invoice and a **purchase entry** is a supplier invoice recorded in the accounting system.
These endpoints abstract the underlying accounting complexity while ensuring that every transaction is properly reflected in the ledger.

<Note>
  "Invoice" also exists in the [Invoicing API](/unified-apis/invoicing/concepts/invoice) (a standalone billing document) and the [PMS API](/unified-apis/pms/concepts/invoice) (a guest bill). The Accounting API version abstracts the underlying journal entries.
</Note>

### Purpose

* **Simplify invoice creation** for users by providing a business-friendly interface.
* **Automatically generate balanced journal entries** behind the scenes, ensuring accounting integrity.
* **Standardize behavior across accounting systems**, whether or not the target system natively supports invoices.
* **Ensure proper linkage to [ledger accounts](/unified-apis/accounting/concepts/ledger-account)** for revenue, expenses, taxes, and receivables/payables.
* **Integrate with payment reconciliation processes** and matching workflows.

### Relationships

* Belongs to a **folder** (company/entity).
* Invoice lines reference **ledger accounts** for revenue, expense, tax, and receivable/payable posting.
* Linked to a **partner** (customer for sales, supplier for purchases).
* Generates one or more **journal entries** in the general ledger.
* Tax lines reference **tax codes** defined in the accounting system.

### Data abstraction logic

* **Target system supports invoices**: creates native invoice objects in the accounting software.
* **Target system lacks invoice support**: automatically generates equivalent journal entries to produce the same accounting result.

### Endpoints

| Method | Endpoint                                                                                                                                                 | Description                                               |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| POST   | [Create Sale/Purchase Entry](/api-reference/endpoints/accounting/create-salepurchase-entry)                                                              | Create a single sale/purchase entry                       |
| POST   | [Create Sale/Purchase Entry (Multiple Plans)](/api-reference/endpoints/accounting/create-salepurchase-entry-multiple-plans)                              | Create a sale/purchase entry with multiple analytic plans |
| GET    | [Get Invoices by Type](/api-reference/endpoints/accounting/get-invoices-by-type-salepurchase-entries)                                                    | List invoices by type (sale/purchase)                     |
| GET    | [Get One Invoice](/api-reference/endpoints/accounting/get-one-invoice-salepurchase-entry)                                                                | Retrieve a specific invoice                               |
| GET    | [Get One Invoice (Multiple Analytic Plans)](/api-reference/endpoints/accounting/get-one-invoice-salepurchase-entry--multiple-analytic-plans)             | Retrieve invoice with multiple analytic plans             |
| GET    | [Get Invoices by Type (Multiple Analytic Plans)](/api-reference/endpoints/accounting/get-invoices-by-type-salepurchase-entries--multiple-analytic-plans) | List invoices by type with multiple analytic plans        |

### See also

* [Accounts in invoices](/unified-apis/accounting/concepts/invoice/accounts)
* [Invoice amounts validation](/unified-apis/accounting/concepts/invoice/amounts-validation)
