# SalesOrderLines

> One product on a sales order, with the quantity ordered and its price.

Subject: Sales orders.

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_id`, `sales_order_header_id`, `sales_order_line_id` |
| Administration-specific | yes: always filter on `administration_id` |
| Operations | GET list, GET one, POST, PATCH, DELETE |
| Read licenses | BASIS, URENPC |
| Write licenses | VERKOOP |
| Scopes | FLEDGE_PORTAL, FLEDGE_TERMINAL |

## Example requests

```http
GET https://odata-api.fledge.nl/v2-8/SalesOrderLines?$filter=administration_id eq 1&$select=sales_order_header_id,sales_order_line_id,confirmation_delivery_date,discount_percentage,intrastat_item_id&$top=50
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_id` (key) | Int32 | Administratienummer |
| `sales_order_line_id` (key) | Int32, not null | Regelnummer |
| `sales_order_header_id` (key) | String, not null | 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. Values: 1 = Article; 2 = Text line; 3 = Subtotal (no longer used); 4 = Repair |
| `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.. Values: 0 = Normal order; 2 = Take-away order (afhaalorder) |
| `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. Values: 0 = Normal; 1 = Accelerated invoicing (versneld factureren, the checkbox Kostenartikel), for transport, rent or costs; approval goes straight to invoicing |

## Relations

- `Administration` → [Administrations](https://docs.fledge.nl/en/api/reference/Administrations.md) (one)
- `Article` → [Articles](https://docs.fledge.nl/en/api/reference/Articles.md) (one)
- `ArticleGroup` → [ArticleGroups](https://docs.fledge.nl/en/api/reference/ArticleGroups.md) (one)
- `ChangedByUser` → [Users](https://docs.fledge.nl/en/api/reference/Users.md) (one)
- `CreatedByUser` → [Users](https://docs.fledge.nl/en/api/reference/Users.md) (one)
- `RevenueGroup` → [RevenueGroups](https://docs.fledge.nl/en/api/reference/RevenueGroups.md) (one)
- `SalesOrderHeader` → [SalesOrderHeaders](https://docs.fledge.nl/en/api/reference/SalesOrderHeaders.md) (one)
- `SalesQuotationLine` → [SalesQuotationLines](https://docs.fledge.nl/en/api/reference/SalesQuotationLines.md) (one)
- `WarehouseAddress` → [WarehouseAddresses](https://docs.fledge.nl/en/api/reference/WarehouseAddresses.md) (one)
- `WarehouseAisle` → [WarehouseAisles](https://docs.fledge.nl/en/api/reference/WarehouseAisles.md) (one)
- `WarehouseShelf` → [WarehouseShelfs](https://docs.fledge.nl/en/api/reference/WarehouseShelfs.md) (one)
- `DocumentLinks` → [DocumentLinks](https://docs.fledge.nl/en/api/reference/DocumentLinks.md) (many)
- `ProductionOrderHeaders` → [ProductionOrderHeaders](https://docs.fledge.nl/en/api/reference/ProductionOrderHeaders.md) (many)
- `SalesOrderLineStatuses` → [SalesOrderLineStatuses](https://docs.fledge.nl/en/api/reference/SalesOrderLineStatuses.md) (many)
- `SalesPurchaseOrderLinks` → [SalesPurchaseOrderLinks](https://docs.fledge.nl/en/api/reference/SalesPurchaseOrderLinks.md) (many)
- `ServiceProductionLinks` → [ServiceProductionLinks](https://docs.fledge.nl/en/api/reference/ServiceProductionLinks.md) (many)

---

Source: https://docs.fledge.nl/en/api/reference/SalesOrderLines
