One product on a sales order, with the quantity ordered and its price. Where that quantity is now (approved, in production, delivered, invoiced) is on its status lines, SalesOrderLineStatuses.
Label in Fledge: Verkooporderregels
| URL | https://odata-api.fledge.nl/v2-8/SalesOrderLines |
|---|---|
| Key | administration_idsales_order_header_idsales_order_line_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/SalesOrderLines" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=sales_order_header_id,sales_order_line_id,confirmation_delivery_date,discount_percentage,intrastat_item_id' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/SalesOrderLines');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'sales_order_header_id,sales_order_line_id,confirmation_delivery_date,discount_percentage,intrastat_item_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/SalesOrderLines" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("sales_order_header_id,sales_order_line_id,confirmation_delivery_date,discount_percentage,intrastat_item_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/SalesOrderLines(administration_id=1,sales_order_header_id='{sales_order_header_id}',sales_order_line_id={sales_order_line_id})Fields
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
sales_order_line_idkey | Int32 | Regelnummer |
sales_order_header_idkey | String | Verkoopordernummer |
apply_replacement_value | Boolean | Vervangingswaarde toepassen (j/n) |
approval_1 | Boolean | Fiat 1: Fiattering 1 |
approval_2 | Boolean | Fiat 2: Fiattering 2 |
approval_3 | Boolean | Fiat 3: Fiattering 3 |
article_group_id | Int32 | Artikelgroep |
article_id | String | Artikelcode |
benchmark_for_intrastat | Decimal | Maatstaf voor intrastat-aangifte. |
vat_category | String | Rubriek BTW omzet aangifte |
changed_by | Int32 | User wijzig |
confirmation_delivery_date | Date | Bevestigde leverdatum The delivery date confirmed to the customer for this line, when there is one. |
confirmation_date_1 | Date | Datum bevestiging |
confirmation_date_2 | Date | Datum bevestiging |
confirmation_week_1 | Int32 | Weeknr. bevestiging: Weeknummer bevestiging |
confirmation_week_2 | Int32 | Weeknr. bevestiging: Weeknummer bevestiging |
confirmed_date_shift_reason | String | Reden verschuiving |
confirmed_delivery_date_confirmed_on_date | Date | Leverdatum bevestigd op |
cost | Decimal | Kostprijs |
created_by | Int32 | User aanmaak |
creation_date | Date | Datum aanmaak |
creditor_id | Int32 | Crediteurnummer |
currency_code_id | Int32 | Valutanummer |
currency_unit | Int32 | Eenheid valuta |
description_1 | String | Omschrijving |
description_2 | String | Omschrijving |
description_3 | String | Omschrijving |
discount_percentage | Decimal | Kortingspercentage 1 The line's discount in percent. The only discount that is applied. |
drawing_number | String | Tekeningnummer |
exchange_rate | Decimal | Koers |
finishing_status | Int32 | Status afwerking |
force_cost_price | Boolean | Forceer kostprijs (ja/nee) |
function | Int32 | Funktie regel
|
intrastat_item_id | String | Intrastat goederencode The goods code (IntrastatGoodsCodes), despite the name. |
invoice_value_for_intrastat | Decimal | Factuurwaarde voor intrastat-aangifte. The invoice value for the Intrastat declaration, not the invoiced amount. |
is_confirmed | Boolean | Bevestigd ja/nee Whether the line is on an order confirmation. Set back to false when a delivery note is made. |
memo_1 | String | Memo Memo for sales and production. |
memo_2 | String | Memo 1 (faktuur) Memo for the invoice. |
memo_3 | String | Memo (pakbon) Memo for the delivery note. |
modification_date | Date | Datum wijzig |
order_code | String | Bestelkode |
order_date | Date | Datum order |
order_week | Int32 | |
planning_date | Date | Datum planning The planned delivery date of this line. Required, and can differ from the order's planning_date. |
planning_week | Int32 | |
pre_or_post_calculation_price | Boolean | VC/NC prijs: Prijs op basis van VC of NC false means post-calculation (nacalculatie): the price is set later, so it can be 0 until the line is invoiced. |
gross_price_foreign_currency | Decimal | Verkoopprijs vv |
net_price_foreign_currency | Decimal | Verkoopprijs netto: Verkoopprijs vv netto The price per unit in the order's foreign currency, after discount_percentage and without VAT. |
gross_price_local_currency | Decimal | Verkoopprijs lv The price per unit before discount_percentage. |
net_price_local_currency | Decimal | Verkooprpijs netto: Verkoopprijs lv netto The price per unit in the local currency, after discount_percentage and without VAT. Line value = quantity times this. |
price_with_vat | Decimal | Verkoopprijs incl. BTW |
print_article_id | Boolean | Afdrukken artikelkode |
print_memo | Boolean | Afdrukken memo |
print_price | Boolean | Afdrukken prijs |
print_quantity | Boolean | Afdrukken aantal |
profit_margin | Decimal | Winstmarge |
quantity | Decimal | Aantal besteld The quantity ordered, in the article's price unit (Articles.calculation_unit); the app shows it in the sales unit. Prices are per price unit, so quantity times net price is the value. Not what is still open: that's the sum of the open status lines. |
sales_quotation_header_id | String | Offertenummer |
sales_quotation_line_id | Int32 | Regelnummer |
reference | String | Referentie verkooporderregel |
revision | String | Revisie |
revenue_group_id | Int32 | Omzetgroep |
sales_order_type | Int32 | Type verkooporderorder A copy of the order's sales_order_header_type (0 normal, 2 take-away), not sales_order_type_id.
|
sales_price_system | Int32 | Verkoopprijssysteem |
sequence | Int32 | Volgorde |
statistical_value_intrastat | Decimal | Statistische waarde voor intrastat-aangifte |
vat_code_id | Int32 | BTW nummer |
warehouse_address_id | Int32 | Adresnummer |
warehouse_aisle_id | Int32 | Magazijn |
warehouse_shelf_id | Int32 | Locatie |
weight_for_intrastat | Decimal | Netto-gewicht voor gebruik in intrastat-aangifte |
workflow_type | Int32 | Workflow type
|
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 |
ArticleGroup | ArticleGroups | one |
ChangedByUser | Users | one |
CreatedByUser | Users | one |
RevenueGroup | RevenueGroups | one |
SalesOrderHeader | SalesOrderHeaders | one |
SalesQuotationLine | SalesQuotationLines | one |
WarehouseAddress | WarehouseAddresses | one |
WarehouseAisle | WarehouseAisles | one |
WarehouseShelf | WarehouseShelfs | one |
DocumentLinks | DocumentLinks | many |
ProductionOrderHeaders | ProductionOrderHeaders | many |
SalesOrderLineStatuses | SalesOrderLineStatuses | many |
SalesPurchaseOrderLinks | SalesPurchaseOrderLinks | many |
ServiceProductionLinks | ServiceProductionLinks | many |