One row per status of (part of) a sales order line in the orderflow. An order line can be split over several open status lines, for example when part of it is delivered and the rest is not yet in stock. Every orderflow action closes the row it acts on (is_finished = true, kept as history) and opens new ones. The open rows (is_finished = false) are the current state. Which status an action leads to is configured per administration in NextStatuses.
Label in Fledge: Verkooporder statusregels
| URL | https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses |
|---|---|
| Key | administration_idsales_order_header_idsales_order_line_idsales_order_line_status_id |
| Administration | Rows belong to one administration: always filter on administration_id. |
| Operations | GET listGET onePOSTPATCHDELETE |
| Read licenses | BASISURENPC |
| Write licenses | VERKOOP |
| 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/SalesOrderLineStatuses" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=sales_order_header_id,sales_order_line_id,sales_order_line_status_id,action,creation_date_time,delivery_note_header_id' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'sales_order_header_id,sales_order_line_id,sales_order_line_status_id,action,creation_date_time,delivery_note_header_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/SalesOrderLineStatuses" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("sales_order_header_id,sales_order_line_id,sales_order_line_status_id,action,creation_date_time,delivery_note_header_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/SalesOrderLineStatuses(administration_id=1,sales_order_header_id='{sales_order_header_id}',sales_order_line_id={sales_order_line_id},sales_order_line_status_id={sales_order_line_status_id})Fields
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
sales_order_line_idkey | Int32 | Regelnummer |
sales_order_header_idkey | String | Verkoopordernummer |
sales_order_line_status_idkey | Int32 | Volgnummer |
action | String | Acite: Is actie mogelijk Selecting it returns action__1 up to action__30, one flag per orderflow action number, as they were when the row was made. The backend checks the current configuration instead, so a flag can be out of date. |
created_by | Int32 | User aanmaak |
creation_date_time | DateTimeOffset | Aangemaakt: Aanmaakdatum en -tijd When the row was made, so when the line reached this status. Local time, except rows the Fledge API made (picklist confirmation and a reverted delivery note in the app), which are in UTC. |
delivery_note_line_id | Int32 | Volgnummer |
delivery_note_header_id | String | Pakbonnummer The delivery note (pakbon) this quantity went on, set on the row the delivery made. |
financial_year | Int32 | Boekjaar |
sales_invoice_header_id | String | Factuur nummer The invoice this quantity is on, together with financial_year. |
is_final_status | Boolean | Eind status True when no action at all is allowed on the row any more. Not the same as "the flow is done". |
is_finished | Boolean | Afgewerkt (ja/nee) Whether this row is history. Filter on is_finished eq false for the current state. |
parent_status_id | Int32 | Parent The sales_order_line_status_id of the row this one came from; 0 on a line's first row. |
picklist_header_id | String | Picklist nummer |
picklist_line_id | Int32 | Volgnummer |
price | Decimal | Prijs Not reliable as a value: depending on how the line was last changed it holds the net or the gross price. For a value use quantity times SalesOrderLines.net_price_local_currency. |
production_order_header_id | String | Order nummer The production order this quantity is made in, when it has one. |
sales_invoice_line_id | Int32 | Factuurregelnummer |
serial_number_id | Int32 | Serienummer autom.: Serienummer automatisch |
sscc_label_id | Int64 | SSCC-code id: Uniek volgnummer SSCC-code |
warehouse_address_id | Int32 | Adresnummer |
article_id | String | Artikelcode |
lot_number | String | Lotnummer/partijregistratie |
quantity | Decimal | Aantal The part of the order line's quantity that is in this status. Only open rows count, and together they can be less than the line's quantity (a remainder can be dropped) or include negative rows. |
status | Int32 | Status
|
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 |
Article | Articles | one |
CreatedBy | Users | one |
DeliveryNoteHeader | DeliveryNoteHeaders | one |
HistoricProductionOrderHeader | HistoricProductionOrderHeaders | one |
PicklistHeader | PickListHeaders | one |
PicklistLine | PickListLines | one |
ProductionOrderHeader | ProductionOrderHeaders | one |
SalesInvoiceHeader | SalesInvoiceHeaders | one |
SalesInvoiceLine | SalesInvoiceLines | one |
SalesOrderHeader | SalesOrderHeaders | one |
SalesOrderLine | SalesOrderLines | one |
SerialNumber | SerialNumbers | one |
SsccLabel | SsccLabels | one |
WarehouseAdress | WarehouseAddresses | one |
WarehouseAisle | WarehouseAisles | one |
WarehouseShelf | WarehouseShelfs | one |
Actions
approve
POST https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses(administration_id=1,sales_order_header_id='{sales_order_header_id}',sales_order_line_id={sales_order_line_id},sales_order_line_status_id={sales_order_line_status_id})/approveReturns SalesOrderLineStatus
Licenses: VERKOOP
approveForInvoicing
POST https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses(administration_id=1,sales_order_header_id='{sales_order_header_id}',sales_order_line_id={sales_order_line_id},sales_order_line_status_id={sales_order_line_status_id})/approveForInvoicingReturns SalesOrderLineStatus
Licenses: VERKOOP
bookSalesOrderInvoice
POST https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses/bookSalesOrderInvoiceadministration_idInt32invoice_dateStringSalesOrderLineStatusesBookSalesOrderInvoiceSalesOrderLineStatusDto[]sales_order_header_idStringsales_order_line_idInt32sales_order_line_status_idInt32
Returns SalesInvoiceHeader
Licenses: VERKOOP
linkToExistingAssembly
POST https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses(administration_id=1,sales_order_header_id='{sales_order_header_id}',sales_order_line_id={sales_order_line_id},sales_order_line_status_id={sales_order_line_status_id})/linkToExistingAssemblyproduction_order_header_idStringproduction_quantityDecimal
Returns SalesOrderLineStatus
Licenses: VERKOOP