# SalesInvoiceHeaders

> One sales invoice.

Subject: Sales invoices.

One sales invoice. The key includes financial_year: an invoice number is only unique within its year. Made from the status lines of one sales order; its lines are in SalesInvoiceLines. Revenue is amount_goods_net.

Label in Fledge: Verkoopfactuurheader.

| | |
| --- | --- |
| URL | `https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders` |
| Key | `administration_id`, `financial_year`, `sales_invoice_header_id` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | VERKOOP, FINANCIEEL, BEHEER |
| Write licenses | VERKOOP, FINANCIEEL, BEHEER |
| Scopes | FLEDGE_PORTAL |

> **Watch out:** date_creation is when the invoice was made. For revenue per period use the invoice date, date_signoff.

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders?$filter=administration_id eq 1&$select=financial_year,sales_invoice_header_id,amount_credit_limit,amount_goods_net,amount_payment_condition&$top=50
GET https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders(administration_id=1,financial_year={financial_year},sales_invoice_header_id='{sales_invoice_header_id}')
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `administration_id` (key) | Int32 | Administratienummer |
| `financial_year` (key) | Int32, not null | Boekjaar |
| `sales_invoice_header_id` (key) | String, not null | Factuur nummer |
| `agent` | Int32 | Agent |
| `amount_credit_limit` | Decimal | Bedrag kredietbeperking. A surcharge from the payment condition (kredietbeperking), without VAT. |
| `amount_credit_limit_foreign_currency` | Decimal | Kredietbeperking vv |
| `amount_goods_net` | Decimal | Bedrag goederen netto. The goods after line discounts, without VAT, in the local currency. The revenue of the invoice. |
| `amount_goods_net_foreign_currency` | Decimal | Netto goederen bedrag vv |
| `amount_goods_vat_1` | Decimal | Bedrag goederen BTW 1 |
| `amount_goods_vat_1_foreign_currency` | Decimal | Goederen bedrag 1 vv |
| `amount_goods_vat_2` | Decimal | Bedrag goederen BTW 2 |
| `amount_goods_vat_2_foreign_currency` | Decimal | Goederen bedrag 2 vv |
| `amount_goods_vat_3` | Decimal | Bedrag goederen BTW 3 |
| `amount_goods_vat_3_foreign_currency` | Decimal | Goederen bedrag 3 vv |
| `amount_goods_vat_4` | Decimal | Bedrag goederen BTW 4 |
| `amount_goods_vat_4_foreign_currency` | Decimal | Goederen bedrag 4 vv |
| `amount_goods_vat_5` | Decimal | Bedrag goederen BTW 5 |
| `amount_goods_vat_5_foreign_currency` | Decimal | Goederen bedrag 5 vv |
| `amount_payment_condition` | Decimal | Bedrag betalingsconditie. The payment discount the customer may take; not subtracted from any total. |
| `amount_payment_condition_foreign_currency` | Decimal | Betalingskorting vv |
| `amount_total_cost_price` | Decimal | Kostprijs |
| `amount_total_goods` | Decimal | Bedrag totaal goederen. amount_goods_net plus amount_credit_limit, without VAT. |
| `amount_total_goods_foreign_currency` | Decimal | Totaal goederen bedrag vv |
| `amount_total_invoice` | Decimal | Factuur bedrag. What the customer pays, with VAT, in the local currency. |
| `amount_total_invoice_foreign_currency` | Decimal | Factuur bedrag vv |
| `amount_total_vat` | Decimal | Bedrag totaal BTW |
| `amount_total_vat_foreign_currency` | Decimal | Tot. bedrag BTW vv: Totaal bedrag BTW vv |
| `amount_vat_1` | Decimal | Bedrag BTW 1 |
| `amount_vat_1_foreign_currency` | Decimal | Bedrag BTW 1 vv |
| `amount_vat_2` | Decimal | Bedrag BTW 2 |
| `amount_vat_2_foreign_currency` | Decimal | Bedrag BTW 2 vv |
| `amount_vat_3` | Decimal | Bedrag BTW 3 |
| `amount_vat_3_foreign_currency` | Decimal | Bedrag BTW 3 vv |
| `amount_vat_4` | Decimal | Bedrag BTW 4 |
| `amount_vat_4_foreign_currency` | Decimal | Bedrag BTW 4 vv |
| `amount_vat_5` | Decimal | Bedrag BTW 5 |
| `amount_vat_5_foreign_currency` | Decimal | Bedrag BTW 5 vv |
| `approval_date` | DateTimeOffset | Gefiatteerd: Datumtijd fiattering |
| `approval_status` | Int32 | Fiatteringsstatus. -1 rejected, 0 default. |
| `approved_by_user` | Int32 | User gefiatteerd |
| `company_name_1` | String | Bedrijfsnaam |
| `company_name_2` | String | Bedrijfsnaam |
| `company_name_3` | String | Bedrijfsnaam |
| `country` | String | Land |
| `country_code_id` | Int32 | Landnummer |
| `created_by` | Int32 | User aanmaak |
| `currency_code` | String | Valutakode |
| `currency_description` | String | Valuta omschrijving |
| `currency_unit` | Int32 | Eenheid valuta |
| `date_creation` | Date | Datum aanmaak. When the invoice was made, not the invoice date. |
| `date_signoff` | Date | Datum dagtekening. The invoice date (factuurdatum). Use it for revenue per month. |
| `debtor_id` | Int32 | Debiteur. The customer invoiced (the order's invoice customer). SalesInvoiceLines.debtor_id is the customer who ordered. |
| `email` | String | E-mail |
| `exchange_rate` | Decimal | Koers |
| `fax_number` | String | Telefax |
| `financial_period_id` | Int32 | Periode nummer. The bookkeeping period of the invoice date; periods need not be calendar months. |
| `first_name` | String | Voornaam |
| `foreign_currency_code_id` | Int32 | Valutanummer. The order's currency, also when that is the local currency; compare currency_code with the local currency instead. |
| `gender` | String | Sexe |
| `initials` | String | Voorletters |
| `invoice_type` | Int32 | Type factuur. 0 a normal invoice, 1 an instalment invoice (termijnfactuur). |
| `iso_country_code_id` | String | ISO-landcode |
| `language_code_id` | Int32 | Taalkode |
| `name_person_1` | String | Naam kontaktpersoon |
| `name_person_2` | String | Naam kontaktpersoon |
| `name_prefix` | String | Voorvoegsel |
| `number_1` | Int32 | Nummer |
| `number_2` | String | Subnummer |
| `origin` | Int32 | Herkomst |
| `payment_term_description_1` | String | Betalingsconditie |
| `payment_term_description_2` | String | Betalingsconditie |
| `payment_terms_id` | Int32 | Betalingskonditie |
| `percentage_credit_limit` | Decimal | Percentage kredietbeperking |
| `percentage_payment_term` | Decimal | Percentage betalingsconditie |
| `percentage_vat_1` | Decimal | Percentage BTW 1 |
| `percentage_vat_2` | Decimal | Percentage BTW 2 |
| `percentage_vat_3` | Decimal | Percentage BTW 3 |
| `percentage_vat_4` | Decimal | Percentage BTW 4 |
| `percentage_vat_5` | Decimal | Percentage BTW 5 |
| `place_1` | String | Plaats |
| `place_2` | String | Plaats |
| `place_signoff` | String | Plaats dagtekening |
| `postal_code` | String | Postkode |
| `rubric_credit_limit` | String | Rubriek kredietbeperking |
| `sales_invoice_layout_id` | Int32 | Faktuur layout nummer |
| `sales_invoice_run_id` | Int32 | Runnummer |
| `salesman_id` | Int32 | Verkoper |
| `sales_order_instalment_id` | Int32 | Volgnummer |
| `status` | Boolean | Status financieel verwerkt. True when the invoice is financially processed (booked). Not whether it is paid. |
| `street_name_1` | String | Straat |
| `street_name_2` | String | Straat |
| `telephone_number` | String | Telefoon |
| `test_print` | Boolean | Proefafdruk. True for a trial invoice (proefafdruk); never revenue. |
| `title_long` | String | Titel lang |
| `title_short` | String | Titel kort |
| `trademark_id` | Int32 | Handelsmerk id |
| `vat_number` | String | BTW-nummer |
| `vat_number_debtor_order` | String | BTW-nummer |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)
- `ApprovedByUser` → [Users](https://docs.fledge.nl/en/api/reference/Users.md) (one)
- `CreatedByUser` → [Users](https://docs.fledge.nl/en/api/reference/Users.md) (one)
- `Debtor` → [Debtors](https://docs.fledge.nl/en/api/reference/Debtors.md) (one)
- `FinancialPeriod` → [FinancialPeriods](https://docs.fledge.nl/en/api/reference/FinancialPeriods.md) (one)
- `SalesInvoiceLines` → [SalesInvoiceLines](https://docs.fledge.nl/en/api/reference/SalesInvoiceLines.md) (many)
- `SalesOrderLineStatuses` → [SalesOrderLineStatuses](https://docs.fledge.nl/en/api/reference/SalesOrderLineStatuses.md) (many)

## Actions

- `GET SalesInvoiceHeaders(administration_id=1,financial_year={financial_year},sales_invoice_header_id='{sales_invoice_header_id}')/downloadEmail(…)` — returns Binary
- `GET SalesInvoiceHeaders(administration_id=1,financial_year={financial_year},sales_invoice_header_id='{sales_invoice_header_id}')/downloadEmail(…)` — body: `email_signature_id` Int64 — returns Binary

---

Source: https://docs.fledge.nl/en/api/reference/SalesInvoiceHeaders
