Sales orders

Confirmation of a customer's intent to purchase goods or services from a seller

Explore the Sales Orders endpoints in Swagger.

View the coverage for sales orders in the Data Coverage Explorer.

Overview

A sales order represents a customer's intention to purchase goods or services from a seller and usually includes information such as the expected delivery date and shipping details. This information can be used to provide visibility on a business's expected receivables and to track sales through the full procurement process.

A sales order is typically converted to an invoice after approval.

Data model

Field

Type

Description

id

string

Identifier for the sales order, unique for the company in the accounting platform.

salesOrderNumber

string

Friendly reference for the sales order, commonly generated by the accounting platform.

customerPurchaseOrderNumber

string

A customer-supplied identifier for the purchase order in the customer's system.

issueDate

date

Date of the sales order as recorded in the accounting platform.

expectedDeliveryDate

date

Expected delivery date for any goods that have been ordered.

note

string

Any additional information associated with the sales order.

shipTo

ShipTo

Delivery details for any goods that have been ordered.

customerRef

customerRef

The customer that the sales order is recorded against in the accounting system.

status

string

Current state of the sales order, either:
Draft
Open
Closed
Void
* Unknown

invoicingStatus

string

If the sales order is converted to an invoice, or will be in future, the invoicingStatus field indicates the current stage of the invoicing process.

Can be one of either:
NotInvoiced
PartiallyInvoiced
* Invoiced

currency

string

Currency of the sales order.
See currency

currencyRate

decimal

Rate for converting the total amount of the sales order into the base currency for the company.
See currency rate

lineItems

array

An array of SalesOrderLineItems

totalDiscount

decimal

Total value of any discounts applied to the sales order.

subTotal

decimal

Total amount of the sales order, including discounts but excluding tax.

totalTaxAmount

decimal

Total amount of tax included in the sales order.

totalAmount

decimal

Total amount of the sales order, including discounts and tax.

modifiedDate

date

Date the sales order was last updated in the Codat system.

sourceModifiedDate

date

Date the sales order was last changed in the accounting system.

metadata

Metadata

Miscellaneous data about the item.

Lines

FieldTypeDescription
descriptionstringDescription of the goods or services that have been ordered.
accountRefaccountRefReference to the account to which the line item is linked.
itemRefitemRefReference to the product or inventory item to which the line item is linked.
trackingarrayAn array of recordRefs.
unitAmountdecimalPrice of each unit.
quantitydecimalNumber of units that have been ordered.
discountAmountdecimalValue of any discounts applied.
discountPercentagedecimalPercentage rate (from 0 to 100) of any discounts applied to the unit amount.
subTotaldecimalAmount of the line, inclusive of discounts but exclusive of tax.
taxAmountdecimalAmount of tax for the line.
taxRateRefTaxRateRefReference to the tax rate to which the line item is linked.
totalAmountdecimalTotal amount of the line, inclusive of discounts and tax.

ShipTo

FieldTypeDescription
contactContactDetails of the named contact at the delivery address.
addressAddressDelivery address for any goods that have been ordered.

Contact

FieldTypeDescription
namestringName of the contact at the delivery address.
emailstringEmail address of the contact at the delivery address.
phonestringPhone number of the contact at the delivery address.

Metadata

Field

Type

Description

isDeleted

boolean

Whether or not the object has been deleted. Either:
null
false
* true

Example sales order

This is a sample sales order from our Sandbox integration. To view more examples, enable sales orders in your sync settings and synchronize data for a company.

{
  "id": "9f3d6a69-f0cb-4152-ab73-42c6eddf7ba2",
  "salesOrderNumber": "d41f457e-a30b-449a-9878-bd659dca1e01",
  "customerPurchaseOrderNumber" : "REF-0001"
  "issueDate": "2021-08-09T00:00:00",
  "expectedDeliveryDate": "2021-08-09T00:00:00",
  "note": "Sales Order with 2 line items, totaling 3903.42",
  "shipTo": {
    "contact": {
      "name": "Orpha Farrell",
      "email": "[email protected]",
      "phone": "055 8086 1319"
    },
    "address": {
      "type": "Delivery",
      "line1": "Suite 491",
      "line2": "0489 Joana Isle",
      "city": "Adalinefurt",
      "region": "Wales",
      "country": "United Kingdom",
      "postalCode": "AP1 3HH"
    }
  },
  "customerRef": {
    "id": "c0cead49-e33c-4caa-b64d-dd79f6856f78",
    "companyName": "Pagac Inc"
  },
  "status": "Void",
  "invoicingStatus": "PartiallyInvoiced",
  "currency": "GBP",
  "currencyRate": 1,
  "lineItems": [
    {
      "description": "Grease Trap",
      "accountRef": {
        "id": "72df89d2-512b-4455-af51-a6b563733842",
        "name": "Sales"
      },
      "itemRef": {
        "id": "9409d23d-1011-432e-98a4-591fcd8d5404",
        "name": "300 Litre Grease Trap"
      },
      "tracking": {
        "recordRefs": [
          {
            "id": "costcode_9",
            "dataType": "trackingCategories"
          },
          {
            "id": "costcode_B13",
            "dataType": "trackingCategories"
          }
        ]
      },
      "unitAmount": 1371.39,
      "quantity": 2,
      "discountAmount": 0,
      "discountPercentage": 0,
      "subTotal": 2742.78,
      "taxAmount": 274.28,
      "taxRateRef": {
        "id": "6c88aff3-7cb9-4980-a3d3-443e72e02498",
        "name": "Sales Tax (10%)",
        "effectiveTaxRate": 10
      },
      "totalAmount": 3017.06
    },
    {
      "description": "Underground - Trapped Road Gully 450mm x 450mm",
      "accountRef": {
        "id": "72df89d2-512b-4455-af51-a6b563733842",
        "name": "Sales"
      },
      "itemRef": {
        "id": "3abf0883-03f7-44c6-bc15-1372522d25e1",
        "name": "Heavy Duty Hinged Gully Grating"
      },
      "unitAmount": 402.89,
      "quantity": 2,
      "discountAmount": 0,
      "discountPercentage": 0,
      "subTotal": 805.78,
      "taxAmount": 80.58,
      "taxRateRef": {
        "id": "6c88aff3-7cb9-4980-a3d3-443e72e02498",
        "name": "Sales Tax (10%)",
        "effectiveTaxRate": 10
      },
      "totalAmount": 886.36
    }
  ],
  "totalDiscount": 0,
  "subTotal": 3548.56,
  "totalTaxAmount": 354.86,
  "totalAmount": 3903.42,
  "modifiedDate": "2022-08-09T14:00:53Z",
  "sourceModifiedDate": "2021-11-12T01:16:06",
  "metadata": {
    "isDeleted": false
  }
}