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_idfinancial_yearsales_invoice_header_id |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | VERKOOPFINANCIEELBEHEER |
| Write licenses | VERKOOPFINANCIEELBEHEER |
| Scopes | FLEDGE_PORTAL |
Example requests
A page of rows, with only the fields you need. See Authentication for the token.
curl -G "https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=financial_year,sales_invoice_header_id,amount_credit_limit,amount_goods_net,amount_payment_condition' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'financial_year,sales_invoice_header_id,amount_credit_limit,amount_goods_net,amount_payment_condition');
url.searchParams.set('$top', '50');
const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const { value } = await response.json();var url = "https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("financial_year,sales_invoice_header_id,amount_credit_limit,amount_goods_net,amount_payment_condition"),
"$top=" + Uri.EscapeDataString("50"));
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
var json = await http.GetStringAsync(url);One row by its key:
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_idkey | Int32 | Administratienummer |
financial_yearkey | Int32 | Boekjaar |
sales_invoice_header_idkey | String | 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 | |
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
Read a related row or list in the same request with $expand, and give it its own $select; a list also needs a $top.
| Navigation | Entity set | |
|---|---|---|
Administration | Administrations | one |
ApprovedByUser | Users | one |
CreatedByUser | Users | one |
Debtor | Debtors | one |
FinancialPeriod | FinancialPeriods | one |
SalesInvoiceLines | SalesInvoiceLines | many |
SalesOrderLineStatuses | SalesOrderLineStatuses | many |
Actions
downloadEmail
GET https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders(administration_id=1,financial_year={financial_year},sales_invoice_header_id='{sales_invoice_header_id}')/downloadEmail(…)Returns Binary
Licenses: BEHEER, FINANCIEEL, VERKOOP
downloadEmail
GET https://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders(administration_id=1,financial_year={financial_year},sales_invoice_header_id='{sales_invoice_header_id}')/downloadEmail(…)email_signature_idInt64
Returns Binary
Licenses: BEHEER, FINANCIEEL, VERKOOP