Purchase order lines moved to history (inkooporderhistorie): one flat row with order, line, receipt and invoice data, and the frontend treats one row as one invoice of (part of) a line. The legacy ERP moves them here; the Fledge API only reads them. Questions about purchases from the past need this set, not only PurchaseOrderLines. It has no navigation to the order: join on order_header_id and order_line_id. Several names are misleading or misspelled: read the notes.

Label in Fledge: Inkooporder historie

URLhttps://odata-api.fledge.nl/v2-8/HistoricPurchaseOrders
Keyadministration_idhistoric_purchase_order_idorder_header_idorder_line_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASIS
Write licensesINKOOPBEHEER
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/HistoricPurchaseOrders" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=historic_purchase_order_id,order_header_id,order_line_id,compan_name,creditor_id,date_deliverv' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/HistoricPurchaseOrders');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'historic_purchase_order_id,order_header_id,order_line_id,compan_name,creditor_id,date_deliverv');
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/HistoricPurchaseOrders" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("historic_purchase_order_id,order_header_id,order_line_id,compan_name,creditor_id,date_deliverv"),
    "$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/HistoricPurchaseOrders(administration_id=1,historic_purchase_order_id={historic_purchase_order_id},order_header_id='{order_header_id}',order_line_id={order_line_id})

Fields

FieldTypeDescription
administration_idkeyInt32Administratienummer
historic_purchase_order_idkeyInt32Volgnummer
order_header_idkeyStringOrder nummer

The purchase order number (PurchaseOrderHeaders.purchase_order_header_id).

order_line_idkeyInt32Order regel nummer

The order line (PurchaseOrderLines.purchase_order_line_id).

agent_idInt32Agent
amount_of_sawingInt32Aantal maal zagen
angle_1DecimalHoek 1
angle_2DecimalHoek 2
apply_offset_sawing_priceBooleanToepassen verstekzaagprijs
area_of_country_idInt32Rayon
article_current_status_idInt32Courantstatus
article_custom_fields_idInt32Volgnummer
article_group_idInt32Artikelgroep
basic_tracking_idInt32Intern volgnummer
batch_idStringLotnummer/partijregistratie
benchmarkDecimalMaatstaf intrastat-aangifte
burnBooleanBranden
calculation_methodInt32Rekenmethode
compan_nameStringBedrijfsnaam

The supplier's name when the row became history (sic).

contact_person_idInt32Persoon
containerBooleanVervoer via container (intrastat-aangifte)
cost_systemInt32Kostprijssysteem
country_idInt32Landcode
created_byInt32User aanmaak
creation_dateDateDatum aanmaak
creditor_group_idInt32Crediteurgroep
creditor_idInt32Leverancier

The supplier.

currency_code_idInt32Valuta code
currency_unitInt32Valuta eenheid
currency_unit_invoiceInt32Valuta eenheid factuur
date_delivervDateDatum pakbon

Despite its name (sic), the date of the receipt, so when the goods arrived.

date_orderDateDatum order

The order date.

date_purchase_orderDateDatum bestelopdracht

The date of the order instruction (bestelopdracht).

delivery_city_1StringPlaats aflevering
delivery_city_2StringPlaats aflevering 2
delivery_condition_idInt32Leveringsconditie
delivery_country_code_idInt32Landnr.aflevering: Landnummer aflevering
delivery_nameStringAflevernaam
delivery_note_headerStringPakbon
delivery_note_layout_idInt32Pakbon layout
delivery_note_lineInt32Pakbon regel
delivery_note_quantityDecimalAantal pakbon

The quantity received on the receipt (delivery_note_header, delivery_note_line).

delivery_number_1Int32Straatnummer aflevering
delivery_number_2StringNummer 2: Straatnummer aflevering 2
delivery_postal_codeStringPostcode aflevering
delivery_remarkStringOpmerking: Memo aflevering
delivery_street_1StringStraat aflevering
delivery_street_2StringStraat aflevering 2
delivery_with_regard_toStringAflevering t.a.v.
description_1StringOmschrijving
description_2StringOmschrijving
description_3StringOmschrijving
determined_surfaceBooleanBepaal oppervlakte
determined_weightBooleanBepaal gewicht
discountDecimalKorting
drawing_numberStringTekeningnummer
exchange_rateDecimalKoers
exchange_rate_invoiceDecimalKoers factuur

The exchange rate of the invoice.

extra_priceBooleanOverprijs
financial_yearInt32Boekjaar
foreign_currency_priceDecimalBestelprijs bruto VV
gross_weightDecimalGewicht bruto
has_multiple_anglesBooleanMeerdere hoeken
historical_dateDateDatum historie

When the row became history.

historic_intrastat_idStringIntrastatnummer: Instrastatnummer

An IntrastatItems code, not a goods code.

include_vatBooleanBTW berekenen (ja/nee)
inrastat_weightDecimalGewicht voor intrastat-aangifte
intrastat_dateDateDatum intrastat: Datum goederenverplaatsing intrastat

The date the goods moved, for the Intrastat declaration.

intrastat_goods_flow_idInt32Intrastat goederenstroomcode
intrastat_ict_order_idInt32Soort ICT-order (intrastat): Soort ICT-order voor intrastat

The Intrastat order type (0 domestic, 2 or 4 delivery to another country, 6 or 8 acquisition).

intrastat_idStringIntrastat goederencode

The goods code (IntrastatGoodsCodes).

intrastat_preference_idInt32Intrastat preferentiecode
intrastat_processedBooleanIntrastat verwerkt: In intrastat-aangifte verwerkt

Processed in an Intrastat declaration.

intrastat_report_period_idInt32Volgnummer

The Intrastat reporting period the row was declared in; 0 or empty when not declared.

intrastat_shipping_type_idInt32Vervoerwijze code: Intrastat vervoerwijzecode
intrastat_stats_system_idInt32Stelsel-code: Intrastat statistisch stelsel code
intrastat_taric_idInt32Intrastat taric-code
intrastat_traffic_area_idInt32Verkeersgebied code: Verkeersgebiedcode
intrastat_transaction_idInt32Transactie code intrastat
invoice_creditor_idInt32Factuur crediteur
invoice_currencyInt32Valuta factuur: Valuta code factuur
invoice_dateDateDatum factuur

The date of the invoice.

invoice_header_idStringFactuur nummer

The purchase invoice, with financial_year; 0 or empty when not invoiced.

invoice_layoutInt32Factuur layout
invoice_line_idInt32Factuur regel

The purchase invoice line (navigation PurchaseOrderInvoiceLine).

invoice_priceDecimalFactuurprijs

The invoiced price per unit.

invoice_price_foreign_currencyDecimalFactuurprijs vv
invoice_quantityDecimalAantal factuur

The quantity invoiced; 0 or less is a credit note.

invoice_valueDecimalFactuurwaarde intrastat-aangifte

The invoice value for the Intrastat declaration, not the invoiced amount.

language_idInt32Taalcode
line_functionInt32Functie van de regel
line_typeInt32Type
main_creditor_idInt32Hoofd crediteur: Hoofdcrediteur
materialInt32Mat/art/tekst: Materiaal/artikel/tekst
material_article_idStringArtikel (torm.part_code, msrt.part_code)
material_idStringMateriaalsoort: alfanumerieke code voor het materiaal, 15 karakters lang
material_priceDecimalPrijs per stuk
material_shape_idStringMateriaalvorm code
memoStringMemo
memo_headerStringMemo
net_gross_manualInt32Netto/Bruto/Handmatig
net_weightDecimalGewicht netto
offset_sawingBooleanVerstekzagen
operation_tracking_id_1Int32Intern volgnummer
operation_tracking_id_2Int32Intern volgnummer
operation_tracking_id_3Int32Intern volgnummer
operation_tracking_id_4Int32Nummer: Bewerkingsprijs 4
operation_tracking_id_5Int32Nummer: Bewerkingsprijs 5
operation_tracking_id_6Int32Nummer: Bewerkingsprijs 6
order_assignment_layout_idInt32Bestelopdracht layout
order_codeStringBestelkode
order_discountDecimalOrder korting
order_unitInt32Besteleenheid
order_unit_operatorStringOperator besteleenheid
order_unit_ratioDecimalFactor besteleenheid
order_without_vatDecimalBestel bruto: Besteleenheid bruto

Not a VAT amount: a gross price per order unit of a production material.

order_wit_vatDecimalBestel netto

Not a VAT amount (sic): a net price per order unit of a production material.

origin_countryInt32Land oorsprong: Land van oorsprong voor intrastat-aangifte
overrunBooleanToeslag
overrun_tracking_id_1Int32Nummer: Toeslagprijs 1
parameter_1DecimalPar 1: Parameter 1
parameter_2DecimalPar 2: Parameter 2
parameter_3DecimalPar 3: Parameter 3
parameter_4DecimalPar 4: Parameter 4
parameter_5DecimalPar 5: Parameter 5
parameter_6DecimalPar 6: Parameter 6
partial_deliveryBooleanDeellevering (ja/nee)
payment_term_idInt32Betalingsconditie
period_invoiceInt32Periode factuur
planned_delivery_dateDateDatum geplande levering

The expected delivery date.

pos_number_idStringPos-nummer
price_per_unitDecimalPrijs eenheid
price_systemInt32Prijssysteem
price_with_vatDecimalBestelprijs netto

Despite its name, the net price per unit (after discount), without VAT.

price_with_vat_foreign_currencyDecimalBestelprijs netto vv

Despite its name, the net price per unit in the foreign currency, without VAT.

purchase_invoice_unitInt32Inkoopfactuur eenheid
purchase_invoice_unit_factorDecimalFactor inkoopfactuur eenheid
purchase_invoice_unit_operatorStringOperator inkoopfactuur eenheid
purchase_order_header_article_idStringArtikel

Despite the prefix, the article of this row. Headers have no article.

purchase_order_header_delivery_confirmedDateBevestigde leverdatum
purchase_order_header_delivery_confirmed_onDateLeverdatum bevestigd op
purchase_order_header_description_1StringOmschrijving
purchase_order_header_gross_priceDecimalBestelprijs bruto

Despite the prefix, the gross price per unit of this line.

purchase_order_header_is_confirmedBooleanBevestigd ja/nee
purchase_order_header_shift_reasonStringReden verschuiving
purchase_order_instruction_header_idInt32Bestelopdracht
purchase_order_instruction_line_idInt32Bestelopdracht regel
purchase_order_line_confimation_date_2DateDatum bevestiging
purchase_order_line_confirmation_dateDateDatum bevestiging
purchase_order_line_delivery_confirmedDateBevestigde leverdatum
purchase_order_line_delivery_confirmed_atDateLeverdatum bevestigd op
purchase_order_line_is_confirmedBooleanBevestigd ja/nee
purchase_order_line_shift_reasonStringReden verschuiving
purchase_quotation_header_idStringOffertenummer: Offerte nummer
purchase_quotation_line_idInt32Offertregel: Regelnummer
purchaser_idInt32Inkoper
quantity_orderedDecimalAantal besteld

The quantity ordered.

radiusBooleanStralen
receiving_unitInt32Ontvangsteenheid
receiving_unit_operatorStringOperator ontvangsteenheid
receiving_unit_ratioDecimalFactor ontvangsteenheid
referenceStringReferentie
relation_address_idInt32Adres
relation_idInt32Relatie
relation_invoice_creditorInt32Relatie factuurcrediteur
relation_main_creditorInt32Relatie hoofdcrediteur
remaining_tracking_idInt32Intern volgnummer
revisionStringRevisie
sales_group_idInt32Omzetgroep
sand_blast_and_primeBooleanStralen + menie`: Stralen + menie
sand_blast_and_sigma_weldBooleanStralen + sigmaweld
sawingBooleanZagen
sawing_typeInt32Type verstekzagen (liggend, staand)
source_countryInt32Land herkomst: Land van herkomst voor intrastat-aangifte
specialBooleanFixed lengte
special_quantityDecimalAantal
staistics_valueDecimalStatistische waarde voor intrastat-aangifte
statistics_idStringStatistieknummer
storageDecimalOpslag
term_invoiceBooleanTermijn facturering
total_invoice_priceDecimalTotaal factuurprijs

The invoiced amount of this row.

total_invoice_price_foreign_currencyDecimalTotaal factuurprijs vv
user_delivery_noteInt32User pakbon
user_historicalInt32User historie
user_invoiceInt32User factuur
user_purchase_orderInt32User bestelopdracht
valuation_priceDecimalWaarderingsprijs
vat_categoryStringBTW rubriek
vat_code_idInt32BTW code
vat_numberStringBTW-nummer
vat_shiftedBooleanBTW verlegd (j/n)
waranty_period_idInt32Garantie termijn
warehouse_address_iInt32Magazijn adres
warehouse_aisle_idInt32Magazijn
warehouse_shelf_idInt32Magazijn locatie
width_of_cutDecimalZaagsnede

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
CreditorCreditorsone
IntrastatGoodsCodeIntrastatGoodsCodesone
IntrastatGoodsFlowIntrastatGoodsFlowsone
IntrastatPreferenceIntrastatPreferencesone
IntrastatReportPeriodIntrastatReportPeriodsone
IntrastatStatisticSchemeIntrastatStatisticSchemesone
IntrastatTariffIntrastatTariffsone
IntrastatTrafficAreaIntrastatTrafficAreasone
IntrastatTransactionIntrastatTransactionsone
IntrastatTransportModeIntrastatTransportModesone
MaterialShapeMaterialShapesone
MaterialTypeMaterialTypesone
PurchaseOrderInvoiceHeaderPurchaseOrderInvoiceHeadersone
PurchaseOrderInvoiceLinePurchaseOrderInvoiceLinesone
PurchaseOrderReceiptHeaderPurchaseOrderReceiptHeadersone
Wingman