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
| URL | https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders |
|---|---|
| Key | administration_idpurchase_order_header_id |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASISURENPC |
| Write licenses | INKOOP |
| Scopes | FLEDGE_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
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
purchase_order_header_idkey | String | Ordernummer |
automatic_collection | Boolean | Automatische incasso (j/n) |
change_date | Date | Datum wijzig |
closed | Boolean | Afgesloten (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_date | Date | Bevestigde 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_reason | String | Reden verschuiving |
confirmed_delivery_date_confirmed_on_date | Date | Leverdatum bevestigd op |
container | Boolean | Vervoer via container ja/nee |
country_of_origin | Int32 | Land oorsprong: Land van oorsprong voor intrastat |
country_of_source | Int32 | Land herkomst: Land van herkomst voor intrastat |
created_by | Int32 | User aanmaak |
creation_date | Date | Datum aanmaak |
creditor_group_id | Int32 | Crediteurgroep nummer |
creditor_id | Int32 | Crediteurnummer The supplier ordered from (Creditors.creditor_id in this administration). |
currency_code_id | Int32 | Valutanummer 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_unit | Int32 | Eenheid valuta |
delivery_city_1 | String | Plaats aflevering |
delivery_city_2 | String | Plaats aflevering 2 |
delivery_condition_id | Int32 | Leveringsconditie |
delivery_country_code_id | Int32 | Landnr.aflevering: Landnummer aflevering |
delivery_date | Date | Datum 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_name | String | Aflevernaam |
delivery_note_layout_id | Int32 | Layout |
delivery_number_1 | Int32 | Straatnummer aflevering |
delivery_number_2 | String | Nummer 2: Straatnummer aflevering 2 |
delivery_postal_code | String | Postcode aflevering |
delivery_remark | String | Opmerking: Memo aflevering |
delivery_street_1 | String | Straat aflevering |
delivery_street_2 | String | Straat aflevering 2 |
delivery_week | Int32 | Week levering |
delivery_with_regard_to | String | Aflevering t.a.v. |
description_1 | String | Omschrijving |
description_2 | String | Omschrijving 2 |
description_3 | String | Omschrijving |
exchange_rate | Decimal | Koers |
exchange_rate_invoice | Int32 | Koers fact.: Koers die gebruikt wordt bij factureren (0 = koers van de order, 1= koers uit de valuta tabel) |
include_vat | Boolean | BTW j/n: BTW ja/nee Whether VAT is calculated on the order; amounts on the lines are always without VAT. |
instalment_division_header_id | Int32 | Termijn nummer |
intrastat_goods_flow_id | Int32 | Intrastat goederenstroomcode |
intrastat_order_type_id | Int32 | ICT: Soort order mbt intrastataangifte (0 = Nederland; 2 = ICL binnen EU; 4 = ICL buiten EU; 6 = ICV binnen EU; 8 = ICV buiten EU).
|
intrastat_preference_id | Int32 | Intrastat preferentiecode |
intrastat_shipping_type_id | Int32 | Vervoerwijze code: Intrastat vervoerwijzecode |
intrastat_statistic_scheme_id | Int32 | Stelsel-code: Intrastat statistisch stelsel code |
intrastat_taric_id | Int32 | Intrastat taric-code |
intrastat_traffic_area_id | Int32 | Verkeersgebied code: Verkeersgebiedcode |
intrastat_transaction_id | Int32 | Transactie code intrastat |
invoice_creditor | Int32 | Factuurcrediteur The supplier that sends the invoice, a creditor number; usually the same as creditor_id. |
invoice_relation_id | Int32 | Relatienr fact.cred.: Relatienummer factuurcrediteur |
is_confirmed | Boolean | Bevestigd ja/nee Whether the supplier confirmed the order. Not the internal approval, which is status 2 on the status rows. |
is_partial_delivery | Boolean | Deellevering ja/nee |
is_vat_reverse_charge | Boolean | BTW verlegd (j/n) |
language_code_id | Int32 | Taalkode |
leading_currency | Int32 | Bepalende valuta 1 when the order was priced in its foreign currency, 0 otherwise. Prices on the lines are in both currencies either way. |
memo | String | Memo |
modified_by | Int32 | User wijzig |
order_date | Date | Datum order The order date (orderdatum). |
order_discount | Decimal | Orderkorting 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_week | Int32 | Week order |
payment_conditions_id | Int32 | Betalingskonditie |
purchase_invoice_layout_id | Int32 | Layout |
purchase_order_layout_id | Int32 | Layout |
purchaser_id | Int32 | Inkoper The buyer (Purchasers.purchaser_id), 0 when none. |
reference | String | Referentie The order's reference. |
relation_address_id | Int32 | Adresnummer |
relation_contact_person_id | Int32 | Kontaktpers.: Kontakt persoon nummer |
relation_id | Int32 | Relatienr. cred.: Relatienummer crediteur The supplier's relation, for its addresses and contact persons. |
revenue_group_id | Int32 | Omzetgroep |
selection | String | Selectie A search key the backend builds from the supplier, purchaser and the open actions. Not user data. |
term_invoice | Boolean | Termijn facturering Whether the order is an instalment order (termijnorder), invoiced through PurchaseOrderInstalments. |
warehouse_address_id | Int32 | Adresnummer With warehouse_aisle_id and warehouse_shelf_id the default receiving location for new lines; each line has its own. |
warehouse_aisle_id | Int32 | Magazijn |
warehouse_shelf_id | Int32 | Locatie |
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 |
Creditor | Creditors | one |
CreditorGroup | CreditorGroups | one |
DeliveryCondition | DeliveryConditions | one |
InstalmentDivisionHeader | InstalmentDivisionHeaders | one |
IntrastatGoodsFlow | IntrastatGoodsFlows | one |
IntrastatPreference | IntrastatPreferences | one |
IntrastatStatisticScheme | IntrastatStatisticSchemes | one |
IntrastatTariff | IntrastatTariffs | one |
IntrastatTrafficArea | IntrastatTrafficAreas | one |
IntrastatTransaction | IntrastatTransactions | one |
IntrastatTransportMode | IntrastatTransportModes | one |
InvoiceCreditor | Creditors | one |
LanguageCode | LanguageCodes | one |
PaymentTerm | PaymentConditions | one |
PurchaseDeliveryNoteLayout | PurchaseDeliveryNoteLayouts | one |
PurchaseOrderInvoiceLayout | PurchaseOrderInvoiceLayouts | one |
PurchaseOrderLayout | PurchaseOrderLayouts | one |
Purchaser | Purchasers | one |
RelationAddress | RelationAddresses | one |
RelationContactPerson | RelationContactPeople | one |
RevenueGroup | RevenueGroups | one |
WarehouseAddress | WarehouseAddresses | one |
WarehouseAisle | WarehouseAisles | one |
WarehouseShelf | WarehouseShelfs | one |
DocumentLinks | DocumentLinks | many |
FinancialInfo | FinancialInfos | many |
HistoricProductionOrderPostCalculationOthers | HistoricProductionOrderPostCalculationOthers | many |
HistoricPurchaseStatuses | HistoricPurchaseStatuses | many |
PostCalculationBuyMakeParts | PostCalculationBuyMakeParts | many |
PostCalculationMaterials | PostCalculationMaterials | many |
PostCalculationOutsourcedItems | PostCalculationOutsourcedItems | many |
PurchaseMaterials | PurchaseMaterials | many |
PurchaseOrderInstalments | PurchaseOrderInstalments | many |
PurchaseOrderInstructionHeaders | PurchaseOrderInstructionHeaders | many |
PurchaseOrderInstructionLines | PurchaseOrderInstructionLines | many |
PurchaseOrderLines | PurchaseOrderLines | many |
PurchaseOrderLineStatuses | PurchaseOrderLineStatuses | many |
PurchaseOrderProductionOrderLinks | PurchaseOrderProductionOrderLinks | many |
SalesPurchaseOrderLinks | SalesPurchaseOrderLinks | many |
SerialNumbers | SerialNumbers | many |
Actions
augment
POST https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders/augmentReturns PurchaseOrderHeader
Licenses: INKOOP
generatePurchaseOrderInstructions
POST https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders(administration_id=1,purchase_order_header_id='{purchase_order_header_id}')/generatePurchaseOrderInstructionsPurchaseOrderLineStatusesGeneratePurchaseOrderInstructionsPurchaseOrderLineStatusDto[]purchase_order_line_idInt32purchase_order_line_status_idInt32sticker_quantityDecimal
Returns PurchaseOrderInstructionHeader
Licenses: INKOOP
generatePurchaseOrderReceipts
POST https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders/generatePurchaseOrderReceiptsgeneratePurchaseOrderReceiptsGeneratePurchaseOrderReceiptsDtoadministration_idInt32date_receivedDatesupplier_receipt_idStringPurchaseOrderLineStatusesGeneratePurchaseOrderReceiptLineStatusDto[]
Returns PurchaseOrderReceiptHeader[]
Licenses: INKOOP
nextId
GET https://odata-api.fledge.nl/v2-8/PurchaseOrderHeaders/nextId(…)Returns PurchaseOrderHeaderNextIdResultDto
Licenses: BASIS, INKOOP