salesOrder resource type
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
Method | Return Type | Description |
---|---|---|
GET salesOrder | salesOrder | Gets a sales order object. |
DELETE salesOrder | none | Deletes a sales order object. |
POST salesOrder | salesOrder | Creates a sales order object. |
PATCH salesOrder | salesOrder | Updates a sales order object. |
Bound Actions
The salesOrder resource type offers a bound action called shipAndInvoice
which ship and invoices the corresponding salesOrder batch.
This is illustrated in the following example:
SHIPANDINVOICE https://<server address>:<server API port>/<server instance name>/api/v2.0/companies({id})/salesOrders({id})/Microsoft.NAV.shipAndInvoice
The response has no content; the response code is 204.
Navigation
Navigation | Return Type | Description |
---|---|---|
customer | customer | Gets the customer of the salesOrder. |
dimensionValue | dimensionValue | Gets the dimensionvalue of the salesOrder. |
currency | currency | Gets the currency of the salesOrder. |
paymentTerm | paymentTerm | Gets the paymentterm of the salesOrder. |
shipmentMethod | shipmentMethod | Gets the shipmentmethod of the salesOrder. |
dimensionSetLines | dimensionSetLines | Gets the dimensionsetlines of the salesOrder. |
salesOrderLines | salesOrderLines | Gets the salesorderlines of the salesOrder. |
attachments | attachments | Gets the attachments of the salesOrder. |
documentAttachments | documentAttachments | Gets the documentattachments of the salesOrder. |
Properties
Property | Type | Description |
---|---|---|
id | GUID | The unique ID of the sales order. Non-editable. |
number | string | Specifies the number of the sales order. |
externalDocumentNumber | string | Specifies an external document number for the sales order. |
orderDate | date | The order date. |
postingDate | date | The date that the sales order is posted. |
customerId | GUID | The unique ID of customer. |
customerNumber | string | The customer's number. |
customerName | string | The customer's name. |
billToName | string | Bill to name. |
billToCustomerId | GUID | Bill to customer id. |
billToCustomerNumber | string | Bill to customer number. |
shipToName | string | Ship to name. |
shipToContact | string | Ship to contact. |
sellToAddressLine1 | string | Sell to address line 1. |
sellToAddressLine2 | string | Sell to address line 2. |
sellToCity | string | Sell to city. |
sellToCountry | string | Sell to country. |
sellToState | string | Sell to state. |
sellToPostCode | string | Sell to post code. |
billToAddressLine1 | string | Bill to address line 1. |
billToAddressLine2 | string | Bill to address line 2. |
billToCity | string | Bill to city. |
billToCountry | string | Bill to country. |
billToState | string | Bill to state. |
billToPostCode | string | Bill to post code. |
shipToAddressLine1 | string | Ship to address line 1. |
shipToAddressLine2 | string | Ship to address line 2. |
shipToCity | string | Ship to city. |
shipToCountry | string | Ship to country. |
shipToState | string | Ship to state. |
shipToPostCode | string | Ship to post code. |
shortcutDimension1Code | string | |
shortcutDimension2Code | string | |
currencyId | GUID | Specifies which currency the sales order uses. |
currencyCode | string | The default currency code for the sales order. |
pricesIncludeTax | boolean | Specifies whether the prices include Tax or not. Read-Only. |
paymentTermsId | GUID | Specifies which payment term the sales order uses. |
shipmentMethodId | GUID | Specifies which shipment method the sales order uses. |
salesperson | string | The salesperson code for the sales order. |
partialShipping | boolean | Specifies whether partial shipping of items is preferred or not. |
requestedDeliveryDate | date | The requested delivery date. |
discountAmount | decimal | The sales order discount amount. |
discountAppliedBeforeTax | boolean | Specifies whether the discount is applied before tax. |
totalAmountExcludingTax | decimal | The total amount excluding tax. Read-Only. |
totalTaxAmount | decimal | The total tax amount for the sales order. Read-Only. |
totalAmountIncludingTax | decimal | The total amount including tax. Read-Only. |
fullyShipped | boolean | Specifies whether the items of the sales order were fully shipped or not. |
status | NAV.salesOrderEntityBufferStatus | Specifies the status of the sales order. It can be "Draft", "In Review" or "Open". |
lastModifiedDateTime | datetime | The last datetime the sales order was modified. Read-Only. |
phoneNumber | string | Specifies the sales order's telephone number. |
string | Specifies the sales order's email address. |
JSON representation
Here is a JSON representation of the salesOrder resource.
{
"id": "GUID",
"number": "string",
"externalDocumentNumber": "string",
"orderDate": "date",
"postingDate": "date",
"customerId": "GUID",
"customerNumber": "string",
"customerName": "string",
"billToName": "string",
"billToCustomerId": "GUID",
"billToCustomerNumber": "string",
"shipToName": "string",
"shipToContact": "string",
"sellToAddressLine1": "string",
"sellToAddressLine2": "string",
"sellToCity": "string",
"sellToCountry": "string",
"sellToState": "string",
"sellToPostCode": "string",
"billToAddressLine1": "string",
"billToAddressLine2": "string",
"billToCity": "string",
"billToCountry": "string",
"billToState": "string",
"billToPostCode": "string",
"shipToAddressLine1": "string",
"shipToAddressLine2": "string",
"shipToCity": "string",
"shipToCountry": "string",
"shipToState": "string",
"shipToPostCode": "string",
"shortcutDimension1Code": "string",
"shortcutDimension2Code": "string",
"currencyId": "GUID",
"currencyCode": "string",
"pricesIncludeTax": "boolean",
"paymentTermsId": "GUID",
"shipmentMethodId": "GUID",
"salesperson": "string",
"partialShipping": "boolean",
"requestedDeliveryDate": "date",
"discountAmount": "decimal",
"discountAppliedBeforeTax": "boolean",
"totalAmountExcludingTax": "decimal",
"totalTaxAmount": "decimal",
"totalAmountIncludingTax": "decimal",
"fullyShipped": "boolean",
"status": "NAV.salesOrderEntityBufferStatus",
"lastModifiedDateTime": "datetime",
"phoneNumber": "string",
"email": "string"
}
Related information
GET salesOrder
DELETE salesOrder
POST salesOrder
PATCH salesOrder