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

URLhttps://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses
Keyadministration_idsales_order_header_idsales_order_line_idsales_order_line_status_id
AdministrationRows belong to one administration: always filter on administration_id.
OperationsGET listGET onePOSTPATCHDELETE
Read licensesBASISURENPC
Write licensesVERKOOP
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/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

FieldTypeDescription
administration_idkeyInt32Administratienummer
sales_order_line_idkeyInt32Regelnummer
sales_order_header_idkeyStringVerkoopordernummer
sales_order_line_status_idkeyInt32Volgnummer
actionStringAcite: 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_byInt32User aanmaak
creation_date_timeDateTimeOffsetAangemaakt: 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_idInt32Volgnummer
delivery_note_header_idStringPakbonnummer

The delivery note (pakbon) this quantity went on, set on the row the delivery made.

financial_yearInt32Boekjaar
sales_invoice_header_idStringFactuur nummer

The invoice this quantity is on, together with financial_year.

is_final_statusBooleanEind status

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

is_finishedBooleanAfgewerkt (ja/nee)

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

parent_status_idInt32Parent

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

picklist_header_idStringPicklist nummer
picklist_line_idInt32Volgnummer
priceDecimalPrijs

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_idStringOrder nummer

The production order this quantity is made in, when it has one.

sales_invoice_line_idInt32Factuurregelnummer
serial_number_idInt32Serienummer autom.: Serienummer automatisch
sscc_label_idInt64SSCC-code id: Uniek volgnummer SSCC-code
warehouse_address_idInt32Adresnummer
article_idStringArtikelcode
lot_numberStringLotnummer/partijregistratie
quantityDecimalAantal

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.

statusInt32Status
  • 1 Created (Aangemaakt)
  • 2 Approved (Bevestigd, formerly Gefiatteerd)
  • 3 To produce (Te produceren)
  • 4 In production (In productie)
  • 5 Ordered from a supplier (In bestelling)
  • 6 Ready / reserved (Gereed)
  • 7 On picklist (Op picklist)
  • 8 Delivery note made (Geleverd)
  • 9 Ready to ship (Klaar om te leveren)
  • 10 Delivered (Geleverd)
  • 11 Invoiced (Gefactureerd)
  • 12 Historic (Historisch)
  • 13 Deleted (Verwijderd)
  • 14 Approved for invoicing (Bevestigd voor facturatie, formerly Gefiatteerd voor facturatie)
  • 15 Invoice processed (Factuur verwerkt)
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
DeliveryNoteHeaderDeliveryNoteHeadersone
HistoricProductionOrderHeaderHistoricProductionOrderHeadersone
PicklistHeaderPickListHeadersone
PicklistLinePickListLinesone
ProductionOrderHeaderProductionOrderHeadersone
SalesInvoiceHeaderSalesInvoiceHeadersone
SalesInvoiceLineSalesInvoiceLinesone
SalesOrderHeaderSalesOrderHeadersone
SalesOrderLineSalesOrderLinesone
SerialNumberSerialNumbersone
SsccLabelSsccLabelsone
WarehouseAdressWarehouseAddressesone
WarehouseAisleWarehouseAislesone
WarehouseShelfWarehouseShelfsone

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})/approve

Returns 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})/approveForInvoicing

Returns SalesOrderLineStatus

Licenses: VERKOOP

bookSalesOrderInvoice

POST https://odata-api.fledge.nl/v2-8/SalesOrderLineStatuses/bookSalesOrderInvoice
  • administration_id Int32
  • invoice_date String
  • SalesOrderLineStatuses BookSalesOrderInvoiceSalesOrderLineStatusDto[]
    • sales_order_header_id String
    • sales_order_line_id Int32
    • sales_order_line_status_id Int32

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})/linkToExistingAssembly
  • production_order_header_id String
  • production_quantity Decimal

Returns SalesOrderLineStatus

Licenses: VERKOOP

Wingman