One row per status of (part of) a purchase order line in the purchase orderflow. A line can be split over several open status rows, for example when part of it is received and the rest is still on order. A row is never changed to another status: every action closes it (is_finished = true, kept as the line's history) and opens new ones, with parent_status_id pointing back. The open rows (is_finished = false) are the current state. Which status an action leads to is configured per administration in NextStatuses (order type 30).

Label in Fledge: Inkooporder statusregels

URLhttps://odata-api.fledge.nl/v2-8/PurchaseOrderLineStatuses
Keyadministration_idpurchase_order_header_idpurchase_order_line_idpurchase_order_line_status_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASISURENPC
Write licensesINKOOPBEHEER
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/PurchaseOrderLineStatuses" \
  --data-urlencode '$filter=administration_id eq 1' \
  --data-urlencode '$select=purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,action,creation_date_time,delivery_note_number' \
  --data-urlencode '$top=50' \
  -H "Authorization: Bearer $TOKEN"
const url = new URL('https://odata-api.fledge.nl/v2-8/PurchaseOrderLineStatuses');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,action,creation_date_time,delivery_note_number');
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/PurchaseOrderLineStatuses" + "?" + string.Join("&",
    "$filter=" + Uri.EscapeDataString("administration_id eq 1"),
    "$select=" + Uri.EscapeDataString("purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,action,creation_date_time,delivery_note_number"),
    "$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/PurchaseOrderLineStatuses(administration_id=1,purchase_order_header_id='{purchase_order_header_id}',purchase_order_line_id={purchase_order_line_id},purchase_order_line_status_id={purchase_order_line_status_id})

Fields

FieldTypeDescription
administration_idkeyInt32Administratienummer
purchase_order_header_idkeyStringOrdernummer
purchase_order_line_idkeyInt32Regelnummer
purchase_order_line_status_idkeyInt32Volgnummer
actionStringActie

Selecting it returns action__1 up to action__30, one flag per orderflow action number, as they were when the row was made. To filter on one, use action_flags, for example action_flags has FledgeDev.Enumerators.PurchaseOrderActionFlagsEnum'GOODS_RECEPTION' (action 9).

created_byInt32User aanmaak

The user who did the action that made this row, so who approved it for a status 2 row.

creation_date_timeDateTimeOffsetAangemaakt: Aanmaakdatum en -tijd

When the row was made, so when the line reached this status.

delivery_note_numberStringPakbonnummer

Despite its name, the receipt number (PurchaseOrderReceiptHeaders.purchase_order_receipt_header_id), not the supplier's packing slip number; with receipt_id, the receipt line. Set on the row the receipt made, and copied to every later row of the same chain.

has_remarkBooleanOpmerking aanwezig (ja/nee)
invoice_booking_yearInt32Boekjaar
invoice_header_idStringFactuurnummer

The purchase invoice this quantity was booked on, with invoice_booking_year and invoice_line_id. Copied to later rows of the same chain.

invoice_line_idInt32Volgnummer
is_disputeBooleanOpmerking meenemen als dispuut?

Whether the receipt's remark is a dispute with the supplier.

is_final_statusBooleanEindstatus

True when no action at all is allowed on the row. Not the same as "the flow is done".

is_finishedBooleanAfgewerkt

Whether this row is history. Filter on is_finished eq false for the current state.

parent_status_idInt32Parent

The purchase_order_line_status_id of the row this one came from; 0 on a line's first row.

priceDecimalPrijs

The net price per unit in the local currency (after the line's discount, without VAT), copied from the line's net_price_local_currency when the row was made, per price unit. Value of a row = quantity times price.

purchase_order_instruction_header_idInt32Volgnummer

The order instruction (bestelopdracht) this row was sent in. Set on the row the instruction closed, not on the new status 3 row.

purchase_order_instruction_line_idInt32Regelnummer
receipt_idInt32Regelnummer

The receipt line (PurchaseOrderReceiptLines.purchase_order_receipt_line_id) within delivery_note_number.

remarkStringOpmerkings tekst

The remark entered at the receipt.

serial_numberInt32Serienummer autom.: Serienummer automatisch
typeInt32Type

Not used.

article_idStringArtikelcode
lot_numberStringLotnummer/partijregistratie
quantityDecimalAantal

The part of the line's quantity that is in this status, in the article's price unit. Only open rows count. After a quantity change over several rows the open rows don't always add up to the line's quantity.

statusInt32Status
  • 1 Created (Aangemaakt)
  • 2 Approved (Bevestigd, formerly goedgekeurd or gefiatteerd)
  • 3 Ordered (Besteld)
  • 4 Received (Ontvangen)
  • 5 Inspected (Gekeurd)
  • 6 Invoice booked (Factuur geboekt)
  • 7 Historic (Historisch)
  • 8 Deleted (Verwijderd)
  • 9 Not received (Niet ontvangen)
  • 10 Delivery note processed (Pakbon verwerkt)
  • 11 Not invoiced (Niet gefactureerd)
warehouse_address_idInt32Adresnummer
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
ArticleArticlesone
CreatedByUsersone
PurchaseOrderHeaderPurchaseOrderHeadersone
PurchaseOrderInstructionHeaderPurchaseOrderInstructionHeadersone
PurchaseOrderInstructionLinePurchaseOrderInstructionLinesone
PurchaseOrderInvoiceHeaderPurchaseOrderInvoiceHeadersone
PurchaseOrderInvoiceLinePurchaseOrderInvoiceLinesone
PurchaseOrderLinePurchaseOrderLinesone
SerialNumberSerialNumbersone
WarehouseAddressWarehouseAddressesone
WarehouseAisleWarehouseAislesone
WarehouseShelfWarehouseShelfsone
PurchaseOrderProductionOrderLinksPurchaseOrderProductionOrderLinksmany

Actions

approve

POST https://odata-api.fledge.nl/v2-8/PurchaseOrderLineStatuses(administration_id=1,purchase_order_header_id='{purchase_order_header_id}',purchase_order_line_id={purchase_order_line_id},purchase_order_line_status_id={purchase_order_line_status_id})/approve

Returns PurchaseOrderLineStatus

Licenses: BEHEER, INKOOP, PRODUCTIE

Wingman