One sales order (verkooporder): who ordered it, who is invoiced, its dates, terms, currency and documents. It holds no amounts: an order's value is the sum of its lines. Where its quantities are in the orderflow is on SalesOrderLineStatuses.
Label in Fledge: Verkooporder header
| URL | https://odata-api.fledge.nl/v2-8/SalesOrderHeaders |
|---|---|
| Key | administration_idsales_order_header_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/SalesOrderHeaders" \
--data-urlencode '$filter=administration_id eq 1' \
--data-urlencode '$select=sales_order_header_id,confirmed_date,debtor_id,invoice_debtor_id' \
--data-urlencode '$top=50' \
-H "Authorization: Bearer $TOKEN"const url = new URL('https://odata-api.fledge.nl/v2-8/SalesOrderHeaders');
url.searchParams.set('$filter', 'administration_id eq 1');
url.searchParams.set('$select', 'sales_order_header_id,confirmed_date,debtor_id,invoice_debtor_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/SalesOrderHeaders" + "?" + string.Join("&",
"$filter=" + Uri.EscapeDataString("administration_id eq 1"),
"$select=" + Uri.EscapeDataString("sales_order_header_id,confirmed_date,debtor_id,invoice_debtor_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/SalesOrderHeaders(administration_id=1,sales_order_header_id='{sales_order_header_id}')Fields
| Field | Type | Description |
|---|---|---|
administration_idkey | Int32 | Administratienummer |
sales_order_header_idkey | String | Verkoopordernummer |
agent_id | Int32 | verwijzing naar de tabel agnt (agent) |
changed_by | Int32 | User laatste wijziging |
confirmed_date | Date | Bevestigde leverdatum The delivery date confirmed to the customer. |
confirmed_date_shift_reason | String | Reden verschuiving |
confirmed_delivery_date_confirmed_on_date | Date | Leverdatum bevestigd op |
cost_center_id | Int32 | Verdeel oms nr: Kostenplaatsverdelingsnummer |
created_by | Int32 | User aanmaak |
creation_date | Date | Datum aanmaak |
currency_code_id | Int32 | Valutanummer |
currency_unit | Int32 | Eenheid valuta |
customer_group_id | Int32 | Debiteurgroep nummer |
date_last_invoice | Date | Datum faktuur: Datum laatste faktuur |
days_in_transport | Int32 | Transportdagen |
debtor_id | Int32 | Debiteurnummer The customer (Debtors) who ordered. |
invoice_debtor_id | Int32 | Faktuurdebiteur The customer the invoice goes to; the order's own customer unless it invoices to another. |
deed_of_assignment | Boolean | Akte van cessie (j/n) |
delivery_condition_id | Int32 | Leveringsconditie |
delivery_note_relation_address_id | Int32 | Afleveradres |
delivery_note_contact_person_id | Int32 | Pakbon naar |
sales_delivery_note_layout_id | Int32 | Layout |
description | String | Verkooporderomschrijving |
district_id | Int32 | verwijzing naar tabel rayn (rayon) |
entry_order_number | Int32 | Vgn: Boekstukvolgnummer betaling |
entry_payment_number | String | Boekstuk betaling |
exchange_rate | Decimal | Koers |
financial_year_payment | Int32 | Boekjaar betaling |
flow_of_goods_code_id | Int32 | Intrastat goederenstroomcode |
is_finished | Boolean | Afgesloten (ja/nee) Never set by the Fledge API, so it doesn't tell whether an order is done. Use the open status lines. |
has_vat | Boolean | BTW j/n |
intrastat_destination_country | Int32 | Land bestemming: Land van bestemming voor intrastat-aangifte. |
intrastat_traffic_area_id | Int32 | Verkeersgebied code: Verkeersgebiedcode |
intrastat_transport_mode_id | Int32 | Vervoerwijze code: Intrastat vervoerwijzecode |
intrastat_type_id | Int32 | ICT: Soort order mbt intrastataangifte (0 = Nederland; 2 = ICL binnen EU; 4 = ICL buiten EU; 6 = ICV binnen EU; 8 = ICV buiten EU).
|
invoice_address_id | Int32 | Faktuuradres |
invoice_contact_person_id | Int32 | Faktuur naar: Faktuurpersoon |
sales_invoice_layout_id | Int32 | Faktuur layout nummer |
invoice_rate_from_order_or_currency | Int32 | Koers fact.: Koers die gebruikt wordt bij factureren (0 = koers van de order, 1= koers uit de valuta tabel) |
invoice_relation_id | Int32 | Relatienr. fact.deb.: Relatienummer factuurdebiteur The invoice customer's relation; set by the backend from invoice_debtor_id. |
is_confirmed | Boolean | Bevestigd ja/nee Whether an order confirmation (opdrachtbevestiging) was made. Set back to false when a delivery note is made, so false doesn't mean it was never confirmed. |
is_partial_delivery | Boolean | Deellevering j/n |
is_instalment_invoice | Boolean | Termijn facturering An instalment order (termijnorder), invoiced through SalesOrderInstalments instead of per line. |
is_transport_by_container | Boolean | Vervoer middels container (intrastat) ja/nee |
language_code_id | Int32 | Taalkode |
last_change_date | Date | Datum laatste wijziging |
last_delivery | Date | Datum levering: Datum laatste levering |
leading_currency | Int32 | Bepalende valuta Which price the backend keeps on a foreign order and converts the other from.
|
memo | String | Memo |
memo_production | String | Memo productie |
order_confirmation_address | Int32 | Bevestigingsadres: Adres opdrachtbevestiging |
order_confirmation_contact_person | Int32 | Bevestiging naar: Opdrachtbevestiging contactpersoon |
order_confirmation_layout_id | Int32 | Orderbevestigingsnummer |
order_date | Date | Datum order The date the order was placed. |
order_discount | Decimal | Orderkorting The customer's discount, proposed for a new line when neither a price agreement nor the customer's group discount gives one. It is not applied to the order: the line's discount_percentage is. |
order_week | Int32 | Week order |
origin | Int32 | Herkomst |
our_reference | String | Onze referentie |
payment_condition_id | Int32 | Betalingskonditie |
picklist_layout_id | Int32 | Picklistlayout |
planning_date | Date | Datum planning The planned delivery date of the order. Each line has its own planning_date, which can differ. |
profit_margin | Decimal | Winstmarge |
sales_quotation_header_id | String | Offertenummer |
relation_id | Int32 | Relatienr. orderdeb.: Relatienummer orderdebiteur The customer's relation; set by the backend from debtor_id. |
route_id | Int32 | Routenummer |
salesman_id | Int32 | Verkopernummer |
sales_order_header_type | Int32 | Type verkooporderorder
|
sales_order_selection | String | Selectie A generated search string. Don't filter or parse it. |
sales_order_type_id | Int32 | Verkooporder soort The kind of order (soort), from SalesOrderTypes. Not the same as sales_order_header_type. |
shipping_method_id | Int32 | Verzendmethode nummer |
statistical_system_code_id | Int32 | Stelsel-code: Intrastat statistisch stelsel code |
statistic_number_id | String | Statistiek nummer |
trademark_id | Int32 | Handelsmerk id |
transaction_code_id | Int32 | Transactie code intrastat |
warehouse_address_id | Int32 | Adresnummer |
warehouse_aisle_id | Int32 | Magazijn |
warehouse_shelf_id | Int32 | Locatie |
planning_week | Int32 | Week planning |
your_reference | String | Uw referentie |
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 |
Agent | Agents | one |
ChangedByUser | Users | one |
CostCenterDivisionDescription | CostCenterDivisionDescriptions | one |
CountryCode | CountryCodes | one |
CreatedByUser | Users | one |
Debtor | Debtors | one |
DebtorGroups | DebtorGroups | one |
DebtorInvoice | Debtors | one |
DeliveryNoteAddress | RelationAddresses | one |
DeliveryNoteContactPerson | RelationContactPeople | one |
DeliveryCondition | DeliveryConditions | one |
District | Districts | one |
IntrastatGoodsFlow | IntrastatGoodsFlows | one |
IntrastatStatisticScheme | IntrastatStatisticSchemes | one |
IntrastatTrafficArea | IntrastatTrafficAreas | one |
IntrastatTransaction | IntrastatTransactions | one |
IntrastatTransportMode | IntrastatTransportModes | one |
InvoiceAddress | RelationAddresses | one |
InvoiceContactPerson | RelationContactPeople | one |
InvoiceRelation | Relations | one |
LanguageCode | LanguageCodes | one |
OrderConfirmationAddress | RelationAddresses | one |
OrderConfirmationContactPerson | RelationContactPeople | one |
OrderConfirmationLayout | OrderConfirmationLayouts | one |
PaymentTerm | PaymentConditions | one |
PicklistLayout | PicklistLayouts | one |
Relation | Relations | one |
Route | Routes | one |
SalesDeliveryNoteLayout | SalesDeliveryNoteLayouts | one |
SalesInvoiceLayout | SalesInvoiceLayouts | one |
Salesman | Salesmen | one |
SalesOrderType | SalesOrderTypes | one |
SalesQuotationHeader | SalesQuotationHeaders | one |
ShippingMethod | ShippingMethods | one |
WarehouseAddress | WarehouseAddresses | one |
WarehouseAisle | WarehouseAisles | one |
WarehouseShelf | WarehouseShelfs | one |
DocumentLinks | DocumentLinks | many |
SalesOrderLines | SalesOrderLines | many |
SalesOrderLineStatuses | SalesOrderLineStatuses | many |
ServiceProductionLinks | ServiceProductionLinks | many |
Actions
confirmPickedArticles
POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/confirmPickedArticlesPickListConfirmationsPickListConfirmationDto[]administration_idInt32sales_order_header_idStringsales_order_line_idInt32sales_order_line_status_idInt32quantityDecimalis_completedBoolean
Licenses: BASIS, VERKOOP
deliverGoods
POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/deliverGoodsdeliverGoodsDeliverGoodsDtoSalesOrderLineStatusesDeliverGoodsSalesOrderLineStatusDto[]null_deliveriesBooleandelivery_dateDatepackage_amountInt32total_valueDecimaltotal_weightDecimalgross_total_weightDecimalwaybill_idStringmemoString
Returns DeliveryNoteHeader[]
Licenses: VERKOOP
generatePicklist
POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/generatePicklistSalesOrderLineStatusesGeneratePicklistSalesOrderLineStatusDto[]administration_idInt32sales_order_header_idStringsales_order_line_idInt32sales_order_line_status_idInt32quantity_to_picklistDecimalis_finishedBoolean
Returns PickListHeader[]
Licenses: VERKOOP
nextId
GET https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/nextId(…)Returns SalesOrderHeaderNextIdResultDto
Licenses: BASIS, FINANCIEEL
toSalesOrderConfirmation
POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders(administration_id=1,sales_order_header_id='{sales_order_header_id}')/toSalesOrderConfirmationReturns SalesOrderConfirmationHeader
Licenses: BASISAPP