salesInvoices 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 invoice 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 salesInvoicessalesInvoicesGets a sales invoice object.
POST salesInvoicessalesInvoicesCreates a sales invoice object.
PATCH salesInvoicessalesInvoicesUpdates a sales invoice object.
DELETE salesInvoicesnoneDeletes a sales invoice object.
NavigationReturn typeDescription
pdfDocumentpdfDocumentGets a PDF document.
currencycurrencyGets the currency.
paymentTermpaymentTermGets the paymentTerm.
shipmentMethodshipmentMethodGets the method of shipment.
customercustomerGets the customer.
salesInvoiceLinessalesInvoiceLinesGets a line on a sales invoice.

Properties

PropertyTypeDescription
idGUIDThe invoice ID. Non-editable.
numberstring, maximum size 20The invoice number. Read-Only.
externalDocumentNumberstringThe external document number
invoiceDatedateThe invoice date.
customerPurchaseOrderReferencestring, maximum size 35The customer purchase order reference for the invoice
dueDatedateThe date the invoice is due.
customerNumberstring, maximum size 20The customer number for the invoice.
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.
customerIdGUIDThe id of the invoice customer.
customerNamestring, maximum size 50The full name of the customer. Read-Only.
currencyIdGUIDThe id of the invoice currency.
currencyCodestring, maximum size 10The currency code for the invoice.
emailstring, maximum size 80Email for the customer, cash sales
phonestring, maximum size 30Phone number for the customer, cash sales
orderIdGUIDThe unique id of the order to which the invoice is associated to. Read-Only.
orderNumberstring, maximum size 20The number of the order to which the invoice is associated to. Read-Only.
statusstring, maximum size 20The invoice status. Status can be: Draft, In Review, Open, Paid, Canceled, or Corrective. Read-Only.
discountAmountnumericThe invoice discount amount.
discountAppliedBeforeTaxbooleanSpecifies whether the discount is applied before tax.
totalAmountExcludingTaxnumericThe total amount excluding tax. Read-Only.
totalTaxAmountnumericThe total tax amount for the invoice. Read-Only.
totalAmountIncludingTaxnumericThe total amount for the invoice, including tax. Read-Only.
pricesIncludeTaxbooleanSpecifies whether the prices include Tax or not. Read-Only.
billingPostalAddresscomplexThe billing postal address for the invoice.
paymentTermsIdGUIDThe id of the invoice payment term.
paymentTermsstring, maximum size 10The payment terms of the invoice.
shipmentMethodIdGUIDThe id of the invoice shipment method.
shipmentMethodstring, maximum size 10The shipment method of the invoice.
salespersonstring, maximum size 20The salesperson code for the invoice.
lastModifiedDateTimedatetimeThe last datetime the sales invoice was modified. 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

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.

An Order (orderId) must exist in the Sales Orders table.

JSON representation

Here is a JSON representation of the resource.

{
      "id": "GUID",
      "number": "string",
      "invoiceDate": "Date",
      "dueDate": "Date",
      "customerPurchaseOrderReference": "string",
      "customerId": "GUID",
      "contactId": "string",
      "customerNumber": "string",
      "customerName": "string",
      "billingPostalAddress": {NAV.PostalAddress},
      "currencyId": "GUID",
      "currencyCode": "string",
      "orderId": "GUID",
      "orderNumber": "string",
      "paymentTermsId": "GUID",
      "shipmentMethodId": "GUID",
      "shipmentMethod": "string",
      "salesperson": "string",
      "pricesIncludeTax": "boolean",
      "discountAmount": "decimal",
      "discountAppliedBeforeTax": "boolean",
      "totalAmountExcludingTax": "decimal",
      "totalTaxAmount": "decimal",
      "totalAmountIncludingTax": "decimal",
      "status": "string",
      "lastModifiedDateTime": "DateTime"
}

Get Sales Invoice
Create Sales Invoice
Update Sales Invoice
Delete Sales Invoice