A purchase order (inkooporder): what is bought from one supplier, with its terms, currency and dates. It holds no articles, no total and no status: the articles are its lines (PurchaseOrderLines), and where each line is in the orderflow is on PurchaseOrderLineStatuses.

Label in Fledge: Inkooporder header

URLhttps://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders
Keyadministration_idpurchase_order_header_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASISURENPC
Write licensesINKOOP
ScopesFLEDGE_PORTALFLEDGE_TERMINAL

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/PurchaseOrderHeaders" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=purchase_order_header_id,closed,confirmed_date,creditor_id' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'purchase_order_header_id,closed,confirmed_date,creditor_id');
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/PurchaseOrderHeaders" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("purchase_order_header_id,closed,confirmed_date,creditor_id"),
    "$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/PurchaseOrderHeaders(administration_id=1,purchase_order_header_id='{purchase_order_header_id}')

Fields

FieldTypeDescription
administration_idkeyInt32Administratienummer
purchase_order_header_idkeyStringOrdernummer
automatic_collectionBooleanAutomatische incasso (j/n)
change_dateDateDatum wijzig
closedBooleanAfgesloten (ja/nee)

Not kept up to date by the Fledge API and not documented. Whether an order is done comes from its status rows.

confirmed_dateDateBevestigde leverdatum

The delivery date the supplier confirmed, with is_confirmed, confirmed_date_shift_reason (why it moved) and confirmed_delivery_date_confirmed_on_date (when it was confirmed).

confirmed_date_shift_reasonStringReden verschuiving
confirmed_delivery_date_confirmed_on_dateDateLeverdatum bevestigd op
containerBooleanVervoer via container ja/nee
country_of_originInt32Land oorsprong: Land van oorsprong voor intrastat
country_of_sourceInt32Land herkomst: Land van herkomst voor intrastat
created_byInt32User aanmaak
creation_dateDateDatum aanmaak
creditor_group_idInt32Crediteurgroep nummer
creditor_idInt32Crediteurnummer

The supplier ordered from (Creditors.creditor_id in this administration).

currency_code_idInt32Valutanummer

The order's currency. With a foreign currency the lines hold prices in both currencies, converted at exchange_rate (per currency_unit). 0 or the local currency means local prices only.

currency_unitInt32Eenheid valuta
delivery_city_1StringPlaats aflevering
delivery_city_2StringPlaats aflevering 2
delivery_condition_idInt32Leveringsconditie
delivery_country_code_idInt32Landnr.aflevering: Landnummer aflevering
delivery_dateDateDatum levering

The expected delivery date of the order (leverdatum verwacht). A default: every line has its own delivery_date, which counts for anything about delivery. Reporting a delay moves this date too.

delivery_nameStringAflevernaam
delivery_note_layout_idInt32Layout
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_weekInt32Week levering
delivery_with_regard_toStringAflevering t.a.v.
description_1StringOmschrijving
description_2StringOmschrijving 2
description_3StringOmschrijving
exchange_rateDecimalKoers
exchange_rate_invoiceInt32Koers fact.: Koers die gebruikt wordt bij factureren (0 = koers van de order, 1= koers uit de valuta tabel)
include_vatBooleanBTW j/n: BTW ja/nee

Whether VAT is calculated on the order; amounts on the lines are always without VAT.

instalment_division_header_idInt32Termijn nummer
intrastat_goods_flow_idInt32Intrastat goederenstroomcode
intrastat_order_type_idInt32ICT: Soort order mbt intrastataangifte (0 = Nederland; 2 = ICL binnen EU; 4 = ICL buiten EU; 6 = ICV binnen EU; 8 = ICV buiten EU).
  • 0 Domestic (Nederland)
  • 2 Intra-community delivery, within the EU (ICL)
  • 4 Intra-community delivery, outside the EU
  • 6 Intra-community acquisition, within the EU (ICV)
  • 8 Intra-community acquisition, outside the EU
intrastat_preference_idInt32Intrastat preferentiecode
intrastat_shipping_type_idInt32Vervoerwijze code: Intrastat vervoerwijzecode
intrastat_statistic_scheme_idInt32Stelsel-code: Intrastat statistisch stelsel code
intrastat_taric_idInt32Intrastat taric-code
intrastat_traffic_area_idInt32Verkeersgebied code: Verkeersgebiedcode
intrastat_transaction_idInt32Transactie code intrastat
invoice_creditorInt32Factuurcrediteur

The supplier that sends the invoice, a creditor number; usually the same as creditor_id.

invoice_relation_idInt32Relatienr fact.cred.: Relatienummer factuurcrediteur
is_confirmedBooleanBevestigd ja/nee

Whether the supplier confirmed the order. Not the internal approval, which is status 2 on the status rows.

is_partial_deliveryBooleanDeellevering ja/nee
is_vat_reverse_chargeBooleanBTW verlegd (j/n)
language_code_idInt32Taalkode
leading_currencyInt32Bepalende valuta

1 when the order was priced in its foreign currency, 0 otherwise. Prices on the lines are in both currencies either way.

memoStringMemo
modified_byInt32User wijzig
order_dateDateDatum order

The order date (orderdatum).

order_discountDecimalOrderkorting

The supplier's order discount, proposed for new lines. It is not applied to any amount: a line's discount is already in its net price.

order_weekInt32Week order
payment_conditions_idInt32Betalingskonditie
purchase_invoice_layout_idInt32Layout
purchase_order_layout_idInt32Layout
purchaser_idInt32Inkoper

The buyer (Purchasers.purchaser_id), 0 when none.

referenceStringReferentie

The order's reference.

relation_address_idInt32Adresnummer
relation_contact_person_idInt32Kontaktpers.: Kontakt persoon nummer
relation_idInt32Relatienr. cred.: Relatienummer crediteur

The supplier's relation, for its addresses and contact persons.

revenue_group_idInt32Omzetgroep
selectionStringSelectie

A search key the backend builds from the supplier, purchaser and the open actions. Not user data.

term_invoiceBooleanTermijn facturering

Whether the order is an instalment order (termijnorder), invoiced through PurchaseOrderInstalments.

warehouse_address_idInt32Adresnummer

With warehouse_aisle_id and warehouse_shelf_id the default receiving location for new lines; each line has its own.

warehouse_aisle_idInt32Magazijn
warehouse_shelf_idInt32Locatie

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
CreditorGroupCreditorGroupsone
DeliveryConditionDeliveryConditionsone
InstalmentDivisionHeaderInstalmentDivisionHeadersone
IntrastatGoodsFlowIntrastatGoodsFlowsone
IntrastatPreferenceIntrastatPreferencesone
IntrastatStatisticSchemeIntrastatStatisticSchemesone
IntrastatTariffIntrastatTariffsone
IntrastatTrafficAreaIntrastatTrafficAreasone
IntrastatTransactionIntrastatTransactionsone
IntrastatTransportModeIntrastatTransportModesone
InvoiceCreditorCreditorsone
LanguageCodeLanguageCodesone
PaymentTermPaymentConditionsone
PurchaseDeliveryNoteLayoutPurchaseDeliveryNoteLayoutsone
PurchaseOrderInvoiceLayoutPurchaseOrderInvoiceLayoutsone
PurchaseOrderLayoutPurchaseOrderLayoutsone
PurchaserPurchasersone
RelationAddressRelationAddressesone
RelationContactPersonRelationContactPeopleone
RevenueGroupRevenueGroupsone
WarehouseAddressWarehouseAddressesone
WarehouseAisleWarehouseAislesone
WarehouseShelfWarehouseShelfsone
DocumentLinksDocumentLinksmany
FinancialInfoFinancialInfosmany
HistoricProductionOrderPostCalculationOthersHistoricProductionOrderPostCalculationOthersmany
HistoricPurchaseStatusesHistoricPurchaseStatusesmany
PostCalculationBuyMakePartsPostCalculationBuyMakePartsmany
PostCalculationMaterialsPostCalculationMaterialsmany
PostCalculationOutsourcedItemsPostCalculationOutsourcedItemsmany
PurchaseMaterialsPurchaseMaterialsmany
PurchaseOrderInstalmentsPurchaseOrderInstalmentsmany
PurchaseOrderInstructionHeadersPurchaseOrderInstructionHeadersmany
PurchaseOrderInstructionLinesPurchaseOrderInstructionLinesmany
PurchaseOrderLinesPurchaseOrderLinesmany
PurchaseOrderLineStatusesPurchaseOrderLineStatusesmany
PurchaseOrderProductionOrderLinksPurchaseOrderProductionOrderLinksmany
SalesPurchaseOrderLinksSalesPurchaseOrderLinksmany
SerialNumbersSerialNumbersmany

Actions

augment

POST https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders/augment

Returns PurchaseOrderHeader

Licenses: INKOOP

generatePurchaseOrderInstructions

POST https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders(administration_id=1,purchase_order_header_id='{purchase_order_header_id}')/generatePurchaseOrderInstructions
  • PurchaseOrderLineStatuses GeneratePurchaseOrderInstructionsPurchaseOrderLineStatusDto[]
    • purchase_order_line_id Int32
    • purchase_order_line_status_id Int32
    • sticker_quantity Decimal

Returns PurchaseOrderInstructionHeader

Licenses: INKOOP

generatePurchaseOrderReceipts

POST https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders/generatePurchaseOrderReceipts
  • generatePurchaseOrderReceipts GeneratePurchaseOrderReceiptsDto
    • administration_id Int32
    • date_received Date
    • supplier_receipt_id String
    • PurchaseOrderLineStatuses GeneratePurchaseOrderReceiptLineStatusDto[]

Returns PurchaseOrderReceiptHeader[]

Licenses: INKOOP

nextId

GET https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders/nextId(…)

Returns PurchaseOrderHeaderNextIdResultDto

Licenses: BASIS, INKOOP

Wingman