# 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<../enabling-apis-for-dynamics-nav>.
## Methods
Method|Return Type|Description
../api/dynamics_salesorder_get|salesOrder|Gets a sales order object.
../api/dynamics_salesorder_delete|none|Deletes a sales order object.
POST salesOrder<../api/dynamics_salesorder_create>|salesOrder|Creates a sales order object.
PATCH salesOrder<../api/dynamics_salesorder_update>|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:
`POST 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
dynamics_customer|customer|Gets the customer of the salesOrder.
dynamics_dimensionvalue|dimensionValue|Gets the dimensionvalue of the salesOrder.
dynamics_currency|currency|Gets the currency of the salesOrder.
dynamics_paymentterm|paymentTerm|Gets the paymentterm of the salesOrder.
dynamics_shipmentmethod|shipmentMethod|Gets the shipmentmethod of the salesOrder.
dynamics_dimensionsetline|dimensionSetLines|Gets the dimensionsetlines of the salesOrder.
dynamics_salesorderline|salesOrderLines|Gets the salesorderlines of the salesOrder.
dynamics_pdfdocument|pdfDocument|Gets the pdfdocument of the salesOrder.
dynamics_attachment|attachments|Gets the attachments of the salesOrder.
dynamics_documentattachment|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.|
|email|string|Specifies the sales order's email address.|
## JSON representation
Here's a JSON representation of the salesOrder resource.
```json
{
    "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
../api/dynamics_salesorder_get
../api/dynamics_salesorder_delete
POST salesOrder<../api/dynamics_salesorder_create>
PATCH salesOrder<../api/dynamics_salesorder_update>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_salesorder, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/api-reference/v2.0/resources/dynamics_salesorder/
