One row per status of (part of) a production order assembly in the production orderflow. An assembly can be split over several open rows, for example when part of it is reported ready. A row is never changed to another status: every action closes it (is_finished = true, kept as history) and opens a new one, with parent_status_id pointing back. The open rows (is_finished = false) are the current state; the order's state is that of its root assembly (ProductionOrderAssembly/level eq 1). Which status an action leads to is configured per administration in NextStatuses (type 20).
Label in Fledge: Productieorder statusregels
| URL | https://odata-api.fledge.nl/v2-8/ProductionOrderAssemblyStatuses |
|---|---|
| Key | administration_idproduction_order_assembly_idproduction_order_assembly_status_idproduction_order_header_id |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASISBASISAPPURENPC |
| Write licenses | PRODUCTIEBEHEER |
| 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/ProductionOrderAssemblyStatuses" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=production_order_assembly_id,production_order_assembly_status_id,production_order_header_id,action,creation_date_time,is_final_status' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/ProductionOrderAssemblyStatuses');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'production_order_assembly_id,production_order_assembly_status_id,production_order_header_id,action,creation_date_time,is_final_status');
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/ProductionOrderAssemblyStatuses" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("production_order_assembly_id,production_order_assembly_status_id,production_order_header_id,action,creation_date_time,is_final_status"),
"$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/ProductionOrderAssemblyStatuses(administration_id=1,production_order_assembly_id={production_order_assembly_id},production_order_assembly_status_id={production_order_assembly_status_id},production_order_header_id='{production_order_header_id}')Fields
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
production_order_header_idkey | String | Order nummer |
production_order_assembly_idkey | Int32 | Schrapnummer |
production_order_assembly_status_idkey | Int32 | Volgnummer A sequence number within the assembly, not the status. |
action | String | Is actie mogelijk j/n 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.ProductionOrderActionFlagsEnum'ENTER_TIMESHEET_ENTRY' (action 13, hours can be booked). |
created_by | Int32 | User aanmaak The user who did the action that made this row, so who confirmed it for a status 2 row. |
creation_date_time | DateTimeOffset | Aangemaakt: Aanmaakdatum en -tijd When the row was made, so when the assembly reached this status. Local time, except rows the Fledge API made (since v2-8 in UTC), such as those of generating work documents. |
is_final_status | Boolean | Eindstatus True when no action at all was allowed on the row's status when it was made. A final row stays open. |
is_finished | Boolean | Afgewerkt Whether this row is history. Filter on is_finished eq false for the current state. |
parent_status_id | Int32 | Parent The production_order_assembly_status_id of the row this one came from. |
price | Decimal | Prijs The assembly's planned price for one unit (entry_price_pre_calculation) when the row was made, copied forward by later rows (provisional: shown for rows the Fledge API makes). |
serial_number | Int32 | Serienummer autom.: Serienummer automatisch |
sscc_label_id | Int64 | SSCC-code id: Uniek volgnummer SSCC-code |
article_id | String | Artikelcode |
lot_number | String | Lotnummer/partijregistratie The lot made when the assembly was reported ready (status 6), carried to later rows. |
quantity | Decimal | Aantal The part of the assembly's quantity in this status, in the article's calculation unit. Only open rows count. |
status | Int32 | Status
|
warehouse_address_id | Int32 | Adresnummer |
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 | |
|---|---|---|
Administrations | Administrations | one |
Article | Articles | one |
CreatedBy | Users | one |
ProductionOrderAssembly | ProductionOrderAssemblies | one |
ProductionOrderHeader | ProductionOrderHeaders | one |
SerialNumber | SerialNumbers | one |
SsccLabel | SsccLabels | one |
WarehouseAddress | WarehouseAddresses | one |
WarehouseAisle | WarehouseAisles | one |
WarehouseShelf | WarehouseShelfs | one |
Actions
approve
POST https://odata-api.fledge.nl/v2-8/ProductionOrderAssemblyStatuses(administration_id=1,production_order_assembly_id={production_order_assembly_id},production_order_assembly_status_id={production_order_assembly_status_id},production_order_header_id='{production_order_header_id}')/approveReturns ProductionOrderAssemblyStatus
Licenses: PRODUCTIE
generateWorkDocument
POST https://odata-api.fledge.nl/v2-8/ProductionOrderAssemblyStatuses(administration_id=1,production_order_assembly_id={production_order_assembly_id},production_order_assembly_status_id={production_order_assembly_status_id},production_order_header_id='{production_order_header_id}')/generateWorkDocumentReturns ProductionOrderAssemblyStatus
Licenses: PRODUCTIE
generateWorkDocument
POST https://odata-api.fledge.nl/v2-8/ProductionOrderAssemblyStatuses/generateWorkDocumentProductionOrderAssemblyStatusesProductionOrderAssemblyStatusKeyDto[]administration_idInt32production_order_header_idStringproduction_order_assembly_idInt32production_order_assembly_status_idInt32
Returns ProductionOrderAssemblyStatus[]
Licenses: PRODUCTIE
toProduction
POST https://odata-api.fledge.nl/v2-8/ProductionOrderAssemblyStatuses(administration_id=1,production_order_assembly_id={production_order_assembly_id},production_order_assembly_status_id={production_order_assembly_status_id},production_order_header_id='{production_order_header_id}')/toProductionReturns ProductionOrderAssemblyStatus
Licenses: PRODUCTIE