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

URLhttps://odata-api.fledge.nl/v2-8/SalesInvoiceHeaders
Keyadministration_idfinancial_yearsales_invoice_header_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesVERKOOPFINANCIEELBEHEER
Write licensesVERKOOPFINANCIEELBEHEER
ScopesFLEDGE_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

FieldTypeDescription
administration_idkeyInt32Administratienummer
financial_yearkeyInt32Boekjaar
sales_invoice_header_idkeyStringFactuur nummer
agentInt32Agent
amount_credit_limitDecimalBedrag kredietbeperking

A surcharge from the payment condition (kredietbeperking), without VAT.

amount_credit_limit_foreign_currencyDecimalKredietbeperking vv
amount_goods_netDecimalBedrag goederen netto

The goods after line discounts, without VAT, in the local currency. The revenue of the invoice.

amount_goods_net_foreign_currencyDecimalNetto goederen bedrag vv
amount_goods_vat_1DecimalBedrag goederen BTW 1
amount_goods_vat_1_foreign_currencyDecimalGoederen bedrag 1 vv
amount_goods_vat_2DecimalBedrag goederen BTW 2
amount_goods_vat_2_foreign_currencyDecimalGoederen bedrag 2 vv
amount_goods_vat_3DecimalBedrag goederen BTW 3
amount_goods_vat_3_foreign_currencyDecimalGoederen bedrag 3 vv
amount_goods_vat_4DecimalBedrag goederen BTW 4
amount_goods_vat_4_foreign_currencyDecimalGoederen bedrag 4 vv
amount_goods_vat_5DecimalBedrag goederen BTW 5
amount_goods_vat_5_foreign_currencyDecimalGoederen bedrag 5 vv
amount_payment_conditionDecimalBedrag betalingsconditie

The payment discount the customer may take; not subtracted from any total.

amount_payment_condition_foreign_currencyDecimalBetalingskorting vv
amount_total_cost_priceDecimalKostprijs
amount_total_goodsDecimalBedrag totaal goederen

amount_goods_net plus amount_credit_limit, without VAT.

amount_total_goods_foreign_currencyDecimalTotaal goederen bedrag vv
amount_total_invoiceDecimalFactuur bedrag

What the customer pays, with VAT, in the local currency.

amount_total_invoice_foreign_currencyDecimalFactuur bedrag vv
amount_total_vatDecimalBedrag totaal BTW
amount_total_vat_foreign_currencyDecimalTot. bedrag BTW vv: Totaal bedrag BTW vv
amount_vat_1DecimalBedrag BTW 1
amount_vat_1_foreign_currencyDecimalBedrag BTW 1 vv
amount_vat_2DecimalBedrag BTW 2
amount_vat_2_foreign_currencyDecimalBedrag BTW 2 vv
amount_vat_3DecimalBedrag BTW 3
amount_vat_3_foreign_currencyDecimalBedrag BTW 3 vv
amount_vat_4DecimalBedrag BTW 4
amount_vat_4_foreign_currencyDecimalBedrag BTW 4 vv
amount_vat_5DecimalBedrag BTW 5
amount_vat_5_foreign_currencyDecimalBedrag BTW 5 vv
approval_dateDateTimeOffsetGefiatteerd: Datumtijd fiattering
approval_statusInt32Fiatteringsstatus

-1 rejected, 0 default.

approved_by_userInt32User gefiatteerd
company_name_1StringBedrijfsnaam
company_name_2StringBedrijfsnaam
company_name_3StringBedrijfsnaam
countryStringLand
country_code_idInt32Landnummer
created_byInt32User aanmaak
currency_codeStringValutakode
currency_descriptionStringValuta omschrijving
currency_unitInt32Eenheid valuta
date_creationDateDatum aanmaak

When the invoice was made, not the invoice date.

date_signoffDateDatum dagtekening

The invoice date (factuurdatum). Use it for revenue per month.

debtor_idInt32Debiteur

The customer invoiced (the order's invoice customer). SalesInvoiceLines.debtor_id is the customer who ordered.

emailStringE-mail
exchange_rateDecimalKoers
fax_numberStringTelefax
financial_period_idInt32Periode nummer

The bookkeeping period of the invoice date; periods need not be calendar months.

first_nameStringVoornaam
foreign_currency_code_idInt32Valutanummer

The order's currency, also when that is the local currency; compare currency_code with the local currency instead.

genderStringSexe
initialsStringVoorletters
invoice_typeInt32Type factuur

0 a normal invoice, 1 an instalment invoice (termijnfactuur).

iso_country_code_idStringISO-landcode
language_code_idInt32Taalkode
name_person_1StringNaam kontaktpersoon
name_person_2StringNaam kontaktpersoon
name_prefixStringVoorvoegsel
number_1Int32Nummer
number_2StringSubnummer
originInt32Herkomst
payment_term_description_1StringBetalingsconditie
payment_term_description_2StringBetalingsconditie
payment_terms_idInt32Betalingskonditie
percentage_credit_limitDecimalPercentage kredietbeperking
percentage_payment_termDecimalPercentage betalingsconditie
percentage_vat_1DecimalPercentage BTW 1
percentage_vat_2DecimalPercentage BTW 2
percentage_vat_3DecimalPercentage BTW 3
percentage_vat_4DecimalPercentage BTW 4
percentage_vat_5DecimalPercentage BTW 5
place_1StringPlaats
place_2StringPlaats
place_signoffStringPlaats dagtekening
postal_codeStringPostkode
rubric_credit_limitStringRubriek kredietbeperking
sales_invoice_layout_idInt32Faktuur layout nummer
sales_invoice_run_idInt32Runnummer
salesman_idInt32Verkoper
sales_order_instalment_idInt32Volgnummer
statusBooleanStatus financieel verwerkt

True when the invoice is financially processed (booked). Not whether it is paid.

street_name_1StringStraat
street_name_2StringStraat
telephone_numberStringTelefoon
test_printBooleanProefafdruk

True for a trial invoice (proefafdruk); never revenue.

title_longStringTitel lang
title_shortStringTitel kort
trademark_idInt32Handelsmerk id
vat_numberStringBTW-nummer
vat_number_debtor_orderStringBTW-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.

NavigationEntity set
AdministrationAdministrationsone
ApprovedByUserUsersone
CreatedByUserUsersone
DebtorDebtorsone
FinancialPeriodFinancialPeriodsone
SalesInvoiceLinesSalesInvoiceLinesmany
SalesOrderLineStatusesSalesOrderLineStatusesmany

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_id Int64

Returns Binary

Licenses: BEHEER, FINANCIEEL, VERKOOP

Wingman