salesOrders resource type (v1.0)

NEW VERSION This is v1.0 of the Business Central API. For the newest version, see Business Central API (V2.0).

Represents a sales order in Business Central.

Note


For information about enabling APIs for Business Central see Enabling the APIs for Dynamics 365 Business Central.

Methods

MethodReturn TypeDescription
GET salesOrderssalesOrdersGet a sales order object.
POST salesOrderssalesOrdersCreate a sales order object.
PATCH salesOrderssalesOrdersUpdate a sales order object.
DELETE salesOrdersnoneDelete a sales order object.

Properties

PropertyTypeDescription
idGUIDThe order ID. Non-editable.
numberstring, maximum size 20The order number. Read-Only.
orderDatedateThe order date
customerIdGUIDThe id of the order customer.
contactIdstring, maximum size 250The exchange contact id for the given customer. If a customer id is not specified, we will use the contact id to find it.
customerNumberstring, maximum size 20The customer number for the order.
customerNamestring, maximum size 50The full name of the customer. Read-Only.
billingPostalAddresscomplexThe billing postal address for the order.
currencyIdGUIDThe id of the order currency.
currencyCodestring, maximum size 10The currency code for the order.
pricesIncludeTaxbooleanSpecifies whether the prices include Tax or not. Read-Only.
paymentTermsIdGUIDThe id of the order payment term.
paymentTermsstring, maximum size 10The payment terms of the order.
salespersonstring, maximum size 20The salesperson code for the order.
partialShippingbooleanSpecifies whether partial shipping of items is preferred or not.
requestedDeliveryDateDateThe requested delivery date.
discountAmountnumericThe order discount amount
discountAppliedBeforeTaxbooleanSpecifies whether the discount is applied before tax. Read-Only.
totalAmountExcludingTaxnumericThe total amount excluding tax. Read-Only.
totalTaxAmountnumericThe total tax amount for the order. Read-Only.
totalAmountIncludingTaxnumericThe total amount for the order, including tax. Read-Only.
fullyShippedbooleanSpecifies whether the items of the order were fully shipped or not.
statusstring, maximum size 20The order status. Status can be: Draft, Cancelled, Paid, On hold, Created. Read-Only.
billToNamestring, maximum length 100The name of the customer to bill.
billToCustomerIdGUIDId of the customer to bill
billToCustomerNumberstring, maximum length 20Number of the customer to bill.
shipToNamestring, maximum size 100Name of the customer in ship to address.
shipToContactstring, maximum size 100Ship to contact
sellingPostalAddressMicrosoft.NAV.postalAddressTypeSelling postal address
billingPostalAddressMicrosoft.NAV.postalAddressTypeBilling postal address
shippingPostalAddressMicrosoft.NAV.postalAddressTypeShipping postal address
lastModifiedDateTimedatetimeThe last datetime the sales order was modified. Read-Only.

Relationships

A Currency(currencyCode) must exist in the Currencies table.

A Payment Term(paymentTerms) must exist in the Payment Terms table.

A Shipment Method(shipmentMethod) must exist in the Shipment Method table.

A Customer (customerId) must exist in the Customer table.

JSON representation

Here is a JSON representation of the resource.

{
      "id": "GUID",
      "number": "string",
      "orderDate": "Date",
      "customerId": "GUID",
      "contactId": "string",
      "customerNumber": "string",
      "customerName": "string",
      "billingPostalAddress": {NAV.PostalAddress},
      "currencyId": "GUID",
      "currencyCode": "string",
      "pricesIncludeTax": "boolean",
      "paymentTermsId": "GUID",
      "salesperson": "string",
      "partialShipping": "boolean",
      "requestedDeliveryDate": "Date",
      "discountAmount": "decimal",
      "discountAppliedBeforeTax": "boolean",
      "totalAmountExcludingTax": "decimal",
      "totalTaxAmount": "decimal",
      "totalAmountIncludingTax": "decimal",
      "fullyShipped": "boolean",
      "status": "string",
      "lastModifiedDateTime": "DateTime"
}

Get Sales Order
Create Sales Order
Update Sales Order
Delete Sales Order