Which purchase is meant for which production order: one row per purchase status row and pre-calculation part (a material, outsourced item or buy part of a production order's assembly), with the quantity. Made when the part is ordered from the production order or the order advice. The link moves to the new status row on every purchase action, so it sits on an open row until the purchase line moves to history; then it stays without a status row, and an expand of PurchaseOrderLineStatus or PurchaseOrderLine leaves it out.
Label in Fledge: Inkooporder koppeling met productieorder
| URL | https://odata-api.fledge.nl/v2-8/PurchaseOrderProductionOrderLinks |
|---|---|
| Key | administration_idmaterial_outsourcing_purchase_partproduction_order_assembly_idproduction_order_header_idpurchase_order_header_idpurchase_order_line_idpurchase_order_line_status_idtype |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASISURENPC |
| Write licenses | PRODUCTIEINKOOP |
| 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/PurchaseOrderProductionOrderLinks" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=material_outsourcing_purchase_part,production_order_assembly_id,production_order_header_id,purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,type,invoice_is_booked,is_processed,quantity' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/PurchaseOrderProductionOrderLinks');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'material_outsourcing_purchase_part,production_order_assembly_id,production_order_header_id,purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,type,invoice_is_booked,is_processed,quantity');
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/PurchaseOrderProductionOrderLinks" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("material_outsourcing_purchase_part,production_order_assembly_id,production_order_header_id,purchase_order_header_id,purchase_order_line_id,purchase_order_line_status_id,type,invoice_is_booked,is_processed,quantity"),
"$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/PurchaseOrderProductionOrderLinks(administration_id=1,material_outsourcing_purchase_part={material_outsourcing_purchase_part},production_order_assembly_id={production_order_assembly_id},production_order_header_id='{production_order_header_id}',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},type={type})Fields
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
purchase_order_header_idkey | String | Ordernummer |
material_outsourcing_purchase_partkey | Int32 | MUK nummer The id of the part, of the kind type says: PreCalculationMaterials (1), PreCalculationOutsourcedItems (2) or PreCalculationBuyMakeParts (3). The three navigations don't check the type, so expand only the one that fits. |
typekey | Int32 | Type (materiaal, uitbesteding, koopdeel) What kind of part material_outsourcing_purchase_part is; always filter on both together.
|
purchase_order_line_idkey | Int32 | Regelnummer |
purchase_order_line_status_idkey | Int32 | Volgnummer |
production_order_header_idkey | String | Order nummer |
production_order_assembly_idkey | Int32 | Schrapnummer The assembly of the production order (schrapnummer). |
date_invoice | Date | Factuur datum |
invoice_is_booked | Boolean | Factuur geboekt Whether the purchase invoice is booked, with price_post_calculation (the price that goes to the production order's post-calculation) and date_invoice. price_post_calculation 0 means not invoiced yet, not free. |
is_processed | Boolean | Verwerkt Whether the need is covered even though less was received. |
price_post_calculation | Decimal | Prijs NC |
quantity | Decimal | Aantal The quantity of the purchase meant for this part. |
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 |
PreCalculationBuyMakeParts | PreCalculationBuyMakeParts | one |
PreCalculationMaterials | PreCalculationMaterials | one |
PreCalculationOutsourcedItems | PreCalculationOutsourcedItems | one |
ProductionOrderAssembly | ProductionOrderAssemblies | one |
ProductionOrderHeader | ProductionOrderHeaders | one |
PurchaseOrderHeader | PurchaseOrderHeaders | one |
PurchaseOrderLine | PurchaseOrderLines | one |
PurchaseOrderLineStatus | PurchaseOrderLineStatuses | one |