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

URLhttps://odata-api.fledge.nl/v2-8/SalesOrderHeaders
Keyadministration_idsales_order_header_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/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

FieldTypeDescription
administration_idkeyInt32Administratienummer
sales_order_header_idkeyStringVerkoopordernummer
agent_idInt32verwijzing naar de tabel agnt (agent)
changed_byInt32User laatste wijziging
confirmed_dateDateBevestigde leverdatum

The delivery date confirmed to the customer.

confirmed_date_shift_reasonStringReden verschuiving
confirmed_delivery_date_confirmed_on_dateDateLeverdatum bevestigd op
cost_center_idInt32Verdeel oms nr: Kostenplaatsverdelingsnummer
created_byInt32User aanmaak
creation_dateDateDatum aanmaak
currency_code_idInt32Valutanummer
currency_unitInt32Eenheid valuta
customer_group_idInt32Debiteurgroep nummer
date_last_invoiceDateDatum faktuur: Datum laatste faktuur
days_in_transportInt32Transportdagen
debtor_idInt32Debiteurnummer

The customer (Debtors) who ordered.

invoice_debtor_idInt32Faktuurdebiteur

The customer the invoice goes to; the order's own customer unless it invoices to another.

deed_of_assignmentBooleanAkte van cessie (j/n)
delivery_condition_idInt32Leveringsconditie
delivery_note_relation_address_idInt32Afleveradres
delivery_note_contact_person_idInt32Pakbon naar
sales_delivery_note_layout_idInt32Layout
descriptionStringVerkooporderomschrijving
district_idInt32verwijzing naar tabel rayn (rayon)
entry_order_numberInt32Vgn: Boekstukvolgnummer betaling
entry_payment_numberStringBoekstuk betaling
exchange_rateDecimalKoers
financial_year_paymentInt32Boekjaar betaling
flow_of_goods_code_idInt32Intrastat goederenstroomcode
is_finishedBooleanAfgesloten (ja/nee)

Never set by the Fledge API, so it doesn't tell whether an order is done. Use the open status lines.

has_vatBooleanBTW j/n
intrastat_destination_countryInt32Land bestemming: Land van bestemming voor intrastat-aangifte.
intrastat_traffic_area_idInt32Verkeersgebied code: Verkeersgebiedcode
intrastat_transport_mode_idInt32Vervoerwijze code: Intrastat vervoerwijzecode
intrastat_type_idInt32ICT: Soort order mbt intrastataangifte (0 = Nederland; 2 = ICL binnen EU; 4 = ICL buiten EU; 6 = ICV binnen EU; 8 = ICV buiten EU).
  • 0 Domestic (Nederland)
  • 2 Intra-community delivery, within the EU (ICL)
  • 4 Intra-community delivery, outside the EU
  • 6 Intra-community acquisition, within the EU (ICV)
  • 8 Intra-community acquisition, outside the EU
invoice_address_idInt32Faktuuradres
invoice_contact_person_idInt32Faktuur naar: Faktuurpersoon
sales_invoice_layout_idInt32Faktuur layout nummer
invoice_rate_from_order_or_currencyInt32Koers fact.: Koers die gebruikt wordt bij factureren (0 = koers van de order, 1= koers uit de valuta tabel)
invoice_relation_idInt32Relatienr. fact.deb.: Relatienummer factuurdebiteur

The invoice customer's relation; set by the backend from invoice_debtor_id.

is_confirmedBooleanBevestigd 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_deliveryBooleanDeellevering j/n
is_instalment_invoiceBooleanTermijn facturering

An instalment order (termijnorder), invoiced through SalesOrderInstalments instead of per line.

is_transport_by_containerBooleanVervoer middels container (intrastat) ja/nee
language_code_idInt32Taalkode
last_change_dateDateDatum laatste wijziging
last_deliveryDateDatum levering: Datum laatste levering
leading_currencyInt32Bepalende valuta

Which price the backend keeps on a foreign order and converts the other from.

  • 0 The local price leads
  • 1 The foreign price leads
memoStringMemo
memo_productionStringMemo productie
order_confirmation_addressInt32Bevestigingsadres: Adres opdrachtbevestiging
order_confirmation_contact_personInt32Bevestiging naar: Opdrachtbevestiging contactpersoon
order_confirmation_layout_idInt32Orderbevestigingsnummer
order_dateDateDatum order

The date the order was placed.

order_discountDecimalOrderkorting

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_weekInt32Week order
originInt32Herkomst
our_referenceStringOnze referentie
payment_condition_idInt32Betalingskonditie
picklist_layout_idInt32Picklistlayout
planning_dateDateDatum planning

The planned delivery date of the order. Each line has its own planning_date, which can differ.

profit_marginDecimalWinstmarge
sales_quotation_header_idStringOffertenummer
relation_idInt32Relatienr. orderdeb.: Relatienummer orderdebiteur

The customer's relation; set by the backend from debtor_id.

route_idInt32Routenummer
salesman_idInt32Verkopernummer
sales_order_header_typeInt32Type verkooporderorder
  • 0 Normal order
  • 2 Take-away order (afhaalorder)
sales_order_selectionStringSelectie

A generated search string. Don't filter or parse it.

sales_order_type_idInt32Verkooporder soort

The kind of order (soort), from SalesOrderTypes. Not the same as sales_order_header_type.

shipping_method_idInt32Verzendmethode nummer
statistical_system_code_idInt32Stelsel-code: Intrastat statistisch stelsel code
statistic_number_idStringStatistiek nummer
trademark_idInt32Handelsmerk id
transaction_code_idInt32Transactie code intrastat
warehouse_address_idInt32Adresnummer
warehouse_aisle_idInt32Magazijn
warehouse_shelf_idInt32Locatie
planning_weekInt32Week planning
your_referenceStringUw 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.

NavigationEntity set
AdministrationAdministrationsone
AgentAgentsone
ChangedByUserUsersone
CostCenterDivisionDescriptionCostCenterDivisionDescriptionsone
CountryCodeCountryCodesone
CreatedByUserUsersone
DebtorDebtorsone
DebtorGroupsDebtorGroupsone
DebtorInvoiceDebtorsone
DeliveryNoteAddressRelationAddressesone
DeliveryNoteContactPersonRelationContactPeopleone
DeliveryConditionDeliveryConditionsone
DistrictDistrictsone
IntrastatGoodsFlowIntrastatGoodsFlowsone
IntrastatStatisticSchemeIntrastatStatisticSchemesone
IntrastatTrafficAreaIntrastatTrafficAreasone
IntrastatTransactionIntrastatTransactionsone
IntrastatTransportModeIntrastatTransportModesone
InvoiceAddressRelationAddressesone
InvoiceContactPersonRelationContactPeopleone
InvoiceRelationRelationsone
LanguageCodeLanguageCodesone
OrderConfirmationAddressRelationAddressesone
OrderConfirmationContactPersonRelationContactPeopleone
OrderConfirmationLayoutOrderConfirmationLayoutsone
PaymentTermPaymentConditionsone
PicklistLayoutPicklistLayoutsone
RelationRelationsone
RouteRoutesone
SalesDeliveryNoteLayoutSalesDeliveryNoteLayoutsone
SalesInvoiceLayoutSalesInvoiceLayoutsone
SalesmanSalesmenone
SalesOrderTypeSalesOrderTypesone
SalesQuotationHeaderSalesQuotationHeadersone
ShippingMethodShippingMethodsone
WarehouseAddressWarehouseAddressesone
WarehouseAisleWarehouseAislesone
WarehouseShelfWarehouseShelfsone
DocumentLinksDocumentLinksmany
SalesOrderLinesSalesOrderLinesmany
SalesOrderLineStatusesSalesOrderLineStatusesmany
ServiceProductionLinksServiceProductionLinksmany

Actions

confirmPickedArticles

POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/confirmPickedArticles
  • PickListConfirmations PickListConfirmationDto[]
    • administration_id Int32
    • sales_order_header_id String
    • sales_order_line_id Int32
    • sales_order_line_status_id Int32
    • quantity Decimal
    • is_completed Boolean

Licenses: BASIS, VERKOOP

deliverGoods

POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/deliverGoods
  • deliverGoods DeliverGoodsDto
    • SalesOrderLineStatuses DeliverGoodsSalesOrderLineStatusDto[]
    • null_deliveries Boolean
    • delivery_date Date
    • package_amount Int32
    • total_value Decimal
    • total_weight Decimal
    • gross_total_weight Decimal
    • waybill_id String
    • memo String

Returns DeliveryNoteHeader[]

Licenses: VERKOOP

generatePicklist

POST https://odata-api.fledge.nl/v2-8/SalesOrderHeaders/generatePicklist
  • SalesOrderLineStatuses GeneratePicklistSalesOrderLineStatusDto[]
    • administration_id Int32
    • sales_order_header_id String
    • sales_order_line_id Int32
    • sales_order_line_status_id Int32
    • quantity_to_picklist Decimal
    • is_finished Boolean

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}')/toSalesOrderConfirmation

Returns SalesOrderConfirmationHeader

Licenses: BASISAPP

Wingman