Sales Orders

Sales Orders endpoints for the Accounting API Unified API

10.66.2
Run In Postman
|Full reference

A Sales Order represents a customer's committed order for goods or services, including line items with product references, quantities, prices, delivery date, shipping details and fulfilment status, before it is invoiced.

The Sales Orders model

idstring

A unique identifier for an object.

downstream_idstring or null

The third-party API ID of original entity

numberstring or null

Sales order number, as assigned by the accounting system.

customerobject or null

The customer this entity is linked to.

quote_idstring or null

The unique identifier for the quote.

invoice_idstring or null

ID of the invoice created from this sales order. Populated when the accounting system records a single invoice on the order (see the connector gotchas); null when the order has not been invoiced, or when it was invoiced in parts and the system keeps no single link.

Sales Orders example
{}

List Sales Orders

get
https://unify.apideck.com/accounting/sales-orders

List Sales Orders

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

cursorstring or null

Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.

limitinteger[ 1 .. 200 ]
Default:20

Number of results to return. Minimum 1, Maximum 200, Default 20

filterobjectfilter[updated_since]=2020-09-30T07:43:32.000Z

Apply filters

pass_throughobjectpass_through[example_downstream_property]=example_downstream_property

Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads

Responses

200Sales Orders
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

Acumatica
Acumatica
Fortnox
Fortnox
MYOB Acumatica
MYOB Acumatica
Sage Intacct
Sage Intacct
Sage Intacct REST
Sage Intacct REST
Access Financials
Access Financials
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
e-Boekhouden.nl
e-Boekhouden.nl
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Bank Feeds
Intuit Bank Feeds
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Lexware Office
Lexware Office
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Minox
Minox
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Oracle Fusion Cloud
Oracle Fusion Cloud
Request
Pennylane
Pennylane
Request
Plaid Core Exchange
Plaid Core Exchange
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
sevDesk
sevDesk
Request
SnelStart
SnelStart
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Twinfield
Twinfield
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

import { Apideck } from "@apideck/unify";

const apideck = new Apideck({
  consumerId: "test-consumer",
  appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
  apiKey: process.env["APIDECK_API_KEY"] ?? "",
});

async function run() {
  const result = await apideck.accounting.salesOrders.list({
    serviceId: "salesforce",
    companyId: "12345",
    filter: {
      updatedSince: new Date("2020-09-30T07:43:32.000Z"),
      createdSince: new Date("2020-09-30T07:43:32.000Z"),
      number: "SO000123",
      customerId: "123abc",
    },
    passThrough: {
      "search": "San Francisco",
    },
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "acumatica",
  "resource": "SalesOrders",
  "operation": "all",
  "data": [
    {
      "id": "12345",
      "downstream_id": "12345",
      "number": "SO000123",
      "customer": {
        "id": "12345",
        "display_id": "CUST00101",
        "display_name": "Windsurf Shop",
        "name": "Windsurf Shop",
        "company_name": "The boring company",
        "email": "boring@boring.com"
      },
      "quote_id": "123456",
      "invoice_id": "123456",
      "company_id": "12345",
      "department_id": "12345",
      "location_id": "12345",
      "project_id": "12345",
      "subsidiary_id": "12345",
      "order_date": "2020-09-30",
      "delivery_date": "2020-10-15",
      "order_type": "SO",
      "terms": "Net 30",
      "terms_id": "12345",
      "po_number": "90000117",
      "reference": "INV-2024-001",
      "status": "open",
      "currency": "USD",
      "currency_rate": 0.69,
      "tax_inclusive": true,
      "sub_total": 27500,
      "total_tax": 2500,
      "tax_code": "1234",
      "discount_percentage": 5.5,
      "discount_amount": 25,
      "total": 30000,
      "unbilled_amount": 30000,
      "shipping_method": "FEDEX",
      "payment_method": "cash",
      "customer_memo": "Thank you for your order!",
      "notes": "Ship with next consignment",
      "line_items": [
        {
          "id": "12345",
          "row_id": "12345",
          "code": "120-C",
          "line_number": 1,
          "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
          "type": "sales_item",
          "tax_amount": 27500,
          "total_amount": 27500,
          "quantity": 1,
          "unit_price": 27500.5,
          "unit_of_measure": "pc.",
          "discount_percentage": 0.01,
          "discount_amount": 19.99,
          "service_date": "2024-01-15",
          "category_id": "12345",
          "location_id": "12345",
          "department_id": "12345",
          "subsidiary_id": "12345",
          "shipping_id": "12345",
          "memo": "Some memo",
          "prepaid": true,
          "item": {
            "id": "12344",
            "code": "120-C",
            "name": "Model Y"
          },
          "taxable": true,
          "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services",
          "tax_recoverability": "Fully_Recoverable",
          "tax_method": "Due_to_Supplier",
          "worktags": [
            {
              "id": "123456",
              "value": "New York"
            }
          ],
          "tax_rate": {
            "id": "123456",
            "code": "N-T",
            "name": "GST on Purchases",
            "rate": 10
          },
          "tracking_categories": [
            {
              "id": "123456",
              "code": "100",
              "name": "New York",
              "parent_id": "123456",
              "parent_name": "New York"
            }
          ],
          "ledger_account": {
            "id": "123456",
            "name": "Bank account",
            "nominal_code": "N091",
            "code": "453",
            "parent_id": "123456",
            "display_id": "123456"
          },
          "custom_fields": [
            {
              "id": "2389328923893298",
              "name": "employee_level",
              "ref_name": "Marketing",
              "description": "Employee Level",
              "value": "Uses Salesforce and Marketo"
            }
          ],
          "row_version": "1-12345",
          "updated_by": "12345",
          "created_by": "12345",
          "created_at": "2020-09-30T07:43:32.000Z",
          "updated_at": "2020-09-30T07:43:32.000Z"
        }
      ],
      "billing_address": {
        "id": "123",
        "type": "primary",
        "string": "25 Spring Street, Blackburn, VIC 3130",
        "name": "HQ US",
        "line1": "Main street",
        "line2": "apt #",
        "line3": "Suite #",
        "line4": "delivery instructions",
        "line5": "Attention: Finance Dept",
        "street_number": "25",
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94104",
        "country": "US",
        "latitude": "40.759211",
        "longitude": "-73.984638",
        "county": "Santa Clara",
        "contact_name": "Elon Musk",
        "salutation": "Mr",
        "phone_number": "111-111-1111",
        "fax": "122-111-1111",
        "email": "elon@musk.com",
        "website": "https://elonmusk.com",
        "notes": "Address notes or delivery instructions.",
        "row_version": "1-12345"
      },
      "shipping_address": {
        "id": "123",
        "type": "primary",
        "string": "25 Spring Street, Blackburn, VIC 3130",
        "name": "HQ US",
        "line1": "Main street",
        "line2": "apt #",
        "line3": "Suite #",
        "line4": "delivery instructions",
        "line5": "Attention: Finance Dept",
        "street_number": "25",
        "city": "San Francisco",
        "state": "CA",
        "postal_code": "94104",
        "country": "US",
        "latitude": "40.759211",
        "longitude": "-73.984638",
        "county": "Santa Clara",
        "contact_name": "Elon Musk",
        "salutation": "Mr",
        "phone_number": "111-111-1111",
        "fax": "122-111-1111",
        "email": "elon@musk.com",
        "website": "https://elonmusk.com",
        "notes": "Address notes or delivery instructions.",
        "row_version": "1-12345"
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "template_id": "123456",
      "source_document_url": "https://www.ordersolution.com/order/123456",
      "custom_mappings": {},
      "custom_fields": [
        {
          "id": "2389328923893298",
          "name": "employee_level",
          "ref_name": "Marketing",
          "description": "Employee Level",
          "value": "Uses Salesforce and Marketo"
        }
      ],
      "row_version": "1-12345",
      "updated_by": "12345",
      "created_by": "12345",
      "updated_at": "2020-09-30T07:43:32.000Z",
      "created_at": "2020-09-30T07:43:32.000Z"
    }
  ],
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    },
    "total_count": 1,
    "warnings": [
      {
        "type": "downstream_request_failed",
        "status_code": 429,
        "error": "string",
        "operation": "getManager",
        "message": "string"
      }
    ]
  },
  "links": {
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
  }
}

Create Sales Order

post
https://unify.apideck.com/accounting/sales-orders

Create Sales Order

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Request body schema

application/json
numberstring or null

Sales order number, as assigned by the accounting system.

customerobject or null

The customer this entity is linked to.

quote_idstring or null

The unique identifier for the quote.

company_idstring or null

The company ID the transaction belongs to

department_idstring or null

The ID of the department

location_idstring or null

The ID of the location

project_idstring

The unique identifier for the linked project.

subsidiary_idstring or null

The ID of the subsidiary

order_datestring or null

Date the sales order was placed - YYYY-MM-DD.

delivery_datestring or null

The requested delivery date: the date the customer asked to receive the goods or services - YYYY-MM-DD. Promised ship dates and payment due dates are not mapped here.

order_typestring or null

The order or transaction type of the sales order, as configured in the accounting system. On create, selects the type to create when the system supports several; omit to use the connection default. See the connector gotchas for the values each system accepts.

termsstring or null

Payment terms of the sales order.

terms_idstring or null

The ID of the payment terms

po_numberstring or null

A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order.

referencestring or null

Optional reference identifier for the transaction.

statusstring or null
Enum:draftopenon_holdback_ordered

Sales order status, in order of precedence: cancelled; closed (the order is closed or completed, whether or not it was billed); invoiced (fully billed but not yet closed); back_ordered; on_hold (including credit hold); draft (including pending approval); open (every other active state, including partially shipped and partially invoiced); other for states that fit none of these.

currencystring or null
Enum:UNKNOWN_CURRENCYAEDAFNALL

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

currency_ratenumber or null

Currency Exchange Rate at the time entity was recorded/generated.

tax_inclusiveboolean or null

Amounts are including tax

sub_totalnumber or null

Sub-total amount, normally before tax.

total_taxnumber or null

Total tax amount applied to this sales order.

tax_codestring or null

Applicable tax id/code override if tax is not supplied on a line item basis.

discount_percentagenumber or null

Discount percentage applied to this sales order.

discount_amountnumber or null

Discount amount applied to this sales order.

totalnumber or null

Total amount of the sales order, including tax.

shipping_methodstring or null

Shipping method or carrier code for the order.

payment_methodstring or null

Payment method used for the transaction, such as cash, credit card, bank transfer, or check

customer_memostring or null

Message to the customer, shown on the sales order.

notesstring or null

Internal notes for the sales order, not shown to the customer.

line_itemsobjects
billing_addressobject
shipping_addressobject
tracking_categoriesobjects or null or null

A list of linked tracking categories.

template_idstring or null

Optional sales order template

source_document_urlstring or null

URL link to a source document - shown as 'Go to [appName]' in the downstream app.

custom_fieldsobjects or objects
row_versionstring or null

A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.

pass_throughobjects

The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.

Responses

201Sales Orders
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

Acumatica
Acumatica
Fortnox
Fortnox
MYOB Acumatica
MYOB Acumatica
Sage Intacct
Sage Intacct
Sage Intacct REST
Sage Intacct REST
Access Financials
Access Financials
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
e-Boekhouden.nl
e-Boekhouden.nl
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Bank Feeds
Intuit Bank Feeds
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Lexware Office
Lexware Office
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Minox
Minox
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Oracle Fusion Cloud
Oracle Fusion Cloud
Request
Pennylane
Pennylane
Request
Plaid Core Exchange
Plaid Core Exchange
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
sevDesk
sevDesk
Request
SnelStart
SnelStart
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Twinfield
Twinfield
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

{
  "number": "SO000123",
  "customer": {
    "id": "12345",
    "display_name": "Windsurf Shop",
    "name": "Windsurf Shop",
    "email": "boring@boring.com"
  },
  "quote_id": "123456",
  "company_id": "12345",
  "department_id": "12345",
  "location_id": "12345",
  "project_id": "12345",
  "subsidiary_id": "12345",
  "order_date": "2020-09-30",
  "delivery_date": "2020-10-15",
  "order_type": "SO",
  "terms": "Net 30",
  "terms_id": "12345",
  "po_number": "90000117",
  "reference": "INV-2024-001",
  "status": "open",
  "currency": "USD",
  "currency_rate": 0.69,
  "tax_inclusive": true,
  "sub_total": 27500,
  "total_tax": 2500,
  "tax_code": "1234",
  "discount_percentage": 5.5,
  "discount_amount": 25,
  "total": 30000,
  "shipping_method": "FEDEX",
  "payment_method": "cash",
  "customer_memo": "Thank you for your order!",
  "notes": "Ship with next consignment",
  "line_items": [
    {
      "id": "12345",
      "row_id": "12345",
      "code": "120-C",
      "line_number": 1,
      "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
      "type": "sales_item",
      "tax_amount": 27500,
      "total_amount": 27500,
      "quantity": 1,
      "unit_price": 27500.5,
      "unit_of_measure": "pc.",
      "discount_percentage": 0.01,
      "discount_amount": 19.99,
      "service_date": "2024-01-15",
      "category_id": "12345",
      "location_id": "12345",
      "department_id": "12345",
      "subsidiary_id": "12345",
      "shipping_id": "12345",
      "memo": "Some memo",
      "prepaid": true,
      "item": {
        "id": "12344",
        "code": "120-C",
        "name": "Model Y"
      },
      "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services",
      "tax_recoverability": "Fully_Recoverable",
      "tax_method": "Due_to_Supplier",
      "worktags": [
        {
          "id": "123456",
          "value": "New York"
        }
      ],
      "tax_rate": {
        "id": "123456",
        "code": "N-T",
        "rate": 10
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "ledger_account": {
        "id": "123456",
        "name": "Bank account",
        "nominal_code": "N091",
        "code": "453",
        "parent_id": "123456",
        "display_id": "123456"
      },
      "custom_fields": [
        {
          "id": "2389328923893298",
          "name": "employee_level",
          "ref_name": "Marketing",
          "description": "Employee Level",
          "value": "Uses Salesforce and Marketo"
        }
      ],
      "row_version": "1-12345"
    }
  ],
  "billing_address": {
    "id": "123",
    "type": "primary",
    "string": "25 Spring Street, Blackburn, VIC 3130",
    "name": "HQ US",
    "line1": "Main street",
    "line2": "apt #",
    "line3": "Suite #",
    "line4": "delivery instructions",
    "line5": "Attention: Finance Dept",
    "street_number": "25",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94104",
    "country": "US",
    "latitude": "40.759211",
    "longitude": "-73.984638",
    "county": "Santa Clara",
    "contact_name": "Elon Musk",
    "salutation": "Mr",
    "phone_number": "111-111-1111",
    "fax": "122-111-1111",
    "email": "elon@musk.com",
    "website": "https://elonmusk.com",
    "notes": "Address notes or delivery instructions.",
    "row_version": "1-12345"
  },
  "shipping_address": {
    "id": "123",
    "type": "primary",
    "string": "25 Spring Street, Blackburn, VIC 3130",
    "name": "HQ US",
    "line1": "Main street",
    "line2": "apt #",
    "line3": "Suite #",
    "line4": "delivery instructions",
    "line5": "Attention: Finance Dept",
    "street_number": "25",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94104",
    "country": "US",
    "latitude": "40.759211",
    "longitude": "-73.984638",
    "county": "Santa Clara",
    "contact_name": "Elon Musk",
    "salutation": "Mr",
    "phone_number": "111-111-1111",
    "fax": "122-111-1111",
    "email": "elon@musk.com",
    "website": "https://elonmusk.com",
    "notes": "Address notes or delivery instructions.",
    "row_version": "1-12345"
  },
  "tracking_categories": [
    {
      "id": "123456",
      "code": "100",
      "name": "New York",
      "parent_id": "123456",
      "parent_name": "New York"
    }
  ],
  "template_id": "123456",
  "source_document_url": "https://www.ordersolution.com/order/123456",
  "custom_fields": [
    {
      "id": "2389328923893298",
      "name": "employee_level",
      "ref_name": "Marketing",
      "description": "Employee Level",
      "value": "Uses Salesforce and Marketo"
    }
  ],
  "row_version": "1-12345",
  "pass_through": [
    {
      "service_id": "string",
      "operation_id": "string",
      "extend_object": {},
      "extend_paths": [
        {
          "path": "$.nested.property",
          "value": {
            "TaxClassificationRef": {
              "value": "EUC-99990201-V1-00020000"
            }
          }
        }
      ]
    }
  ]
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "acumatica",
  "resource": "SalesOrders",
  "operation": "add",
  "data": {
    "id": "12345"
  }
}

Get Sales Order

get
https://unify.apideck.com/accounting/sales-orders/{id}

Get Sales Order

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Responses

200Sales Orders
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

Acumatica
Acumatica
Fortnox
Fortnox
MYOB Acumatica
MYOB Acumatica
Sage Intacct
Sage Intacct
Sage Intacct REST
Sage Intacct REST
Access Financials
Access Financials
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
e-Boekhouden.nl
e-Boekhouden.nl
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Bank Feeds
Intuit Bank Feeds
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Lexware Office
Lexware Office
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Minox
Minox
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Oracle Fusion Cloud
Oracle Fusion Cloud
Request
Pennylane
Pennylane
Request
Plaid Core Exchange
Plaid Core Exchange
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
sevDesk
sevDesk
Request
SnelStart
SnelStart
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Twinfield
Twinfield
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

import { Apideck } from "@apideck/unify";

const apideck = new Apideck({
  consumerId: "test-consumer",
  appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
  apiKey: process.env["APIDECK_API_KEY"] ?? "",
});

async function run() {
  const result = await apideck.accounting.salesOrders.get({
    id: "<id>",
    serviceId: "salesforce",
    companyId: "12345",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "acumatica",
  "resource": "SalesOrders",
  "operation": "one",
  "data": {
    "id": "12345",
    "downstream_id": "12345",
    "number": "SO000123",
    "customer": {
      "id": "12345",
      "display_id": "CUST00101",
      "display_name": "Windsurf Shop",
      "name": "Windsurf Shop",
      "company_name": "The boring company",
      "email": "boring@boring.com"
    },
    "quote_id": "123456",
    "invoice_id": "123456",
    "company_id": "12345",
    "department_id": "12345",
    "location_id": "12345",
    "project_id": "12345",
    "subsidiary_id": "12345",
    "order_date": "2020-09-30",
    "delivery_date": "2020-10-15",
    "order_type": "SO",
    "terms": "Net 30",
    "terms_id": "12345",
    "po_number": "90000117",
    "reference": "INV-2024-001",
    "status": "open",
    "currency": "USD",
    "currency_rate": 0.69,
    "tax_inclusive": true,
    "sub_total": 27500,
    "total_tax": 2500,
    "tax_code": "1234",
    "discount_percentage": 5.5,
    "discount_amount": 25,
    "total": 30000,
    "unbilled_amount": 30000,
    "shipping_method": "FEDEX",
    "payment_method": "cash",
    "customer_memo": "Thank you for your order!",
    "notes": "Ship with next consignment",
    "line_items": [
      {
        "id": "12345",
        "row_id": "12345",
        "code": "120-C",
        "line_number": 1,
        "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
        "type": "sales_item",
        "tax_amount": 27500,
        "total_amount": 27500,
        "quantity": 1,
        "unit_price": 27500.5,
        "unit_of_measure": "pc.",
        "discount_percentage": 0.01,
        "discount_amount": 19.99,
        "service_date": "2024-01-15",
        "category_id": "12345",
        "location_id": "12345",
        "department_id": "12345",
        "subsidiary_id": "12345",
        "shipping_id": "12345",
        "memo": "Some memo",
        "prepaid": true,
        "item": {
          "id": "12344",
          "code": "120-C",
          "name": "Model Y"
        },
        "taxable": true,
        "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services",
        "tax_recoverability": "Fully_Recoverable",
        "tax_method": "Due_to_Supplier",
        "worktags": [
          {
            "id": "123456",
            "value": "New York"
          }
        ],
        "tax_rate": {
          "id": "123456",
          "code": "N-T",
          "name": "GST on Purchases",
          "rate": 10
        },
        "tracking_categories": [
          {
            "id": "123456",
            "code": "100",
            "name": "New York",
            "parent_id": "123456",
            "parent_name": "New York"
          }
        ],
        "ledger_account": {
          "id": "123456",
          "name": "Bank account",
          "nominal_code": "N091",
          "code": "453",
          "parent_id": "123456",
          "display_id": "123456"
        },
        "custom_fields": [
          {
            "id": "2389328923893298",
            "name": "employee_level",
            "ref_name": "Marketing",
            "description": "Employee Level",
            "value": "Uses Salesforce and Marketo"
          }
        ],
        "row_version": "1-12345",
        "updated_by": "12345",
        "created_by": "12345",
        "created_at": "2020-09-30T07:43:32.000Z",
        "updated_at": "2020-09-30T07:43:32.000Z"
      }
    ],
    "billing_address": {
      "id": "123",
      "type": "primary",
      "string": "25 Spring Street, Blackburn, VIC 3130",
      "name": "HQ US",
      "line1": "Main street",
      "line2": "apt #",
      "line3": "Suite #",
      "line4": "delivery instructions",
      "line5": "Attention: Finance Dept",
      "street_number": "25",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94104",
      "country": "US",
      "latitude": "40.759211",
      "longitude": "-73.984638",
      "county": "Santa Clara",
      "contact_name": "Elon Musk",
      "salutation": "Mr",
      "phone_number": "111-111-1111",
      "fax": "122-111-1111",
      "email": "elon@musk.com",
      "website": "https://elonmusk.com",
      "notes": "Address notes or delivery instructions.",
      "row_version": "1-12345"
    },
    "shipping_address": {
      "id": "123",
      "type": "primary",
      "string": "25 Spring Street, Blackburn, VIC 3130",
      "name": "HQ US",
      "line1": "Main street",
      "line2": "apt #",
      "line3": "Suite #",
      "line4": "delivery instructions",
      "line5": "Attention: Finance Dept",
      "street_number": "25",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94104",
      "country": "US",
      "latitude": "40.759211",
      "longitude": "-73.984638",
      "county": "Santa Clara",
      "contact_name": "Elon Musk",
      "salutation": "Mr",
      "phone_number": "111-111-1111",
      "fax": "122-111-1111",
      "email": "elon@musk.com",
      "website": "https://elonmusk.com",
      "notes": "Address notes or delivery instructions.",
      "row_version": "1-12345"
    },
    "tracking_categories": [
      {
        "id": "123456",
        "code": "100",
        "name": "New York",
        "parent_id": "123456",
        "parent_name": "New York"
      }
    ],
    "template_id": "123456",
    "source_document_url": "https://www.ordersolution.com/order/123456",
    "custom_mappings": {},
    "custom_fields": [
      {
        "id": "2389328923893298",
        "name": "employee_level",
        "ref_name": "Marketing",
        "description": "Employee Level",
        "value": "Uses Salesforce and Marketo"
      }
    ],
    "row_version": "1-12345",
    "updated_by": "12345",
    "created_by": "12345",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z"
  },
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    },
    "total_count": 1,
    "warnings": [
      {
        "type": "downstream_request_failed",
        "status_code": 429,
        "error": "string",
        "operation": "getManager",
        "message": "string"
      }
    ]
  }
}

Update Sales Order

patch
https://unify.apideck.com/accounting/sales-orders/{id}

Update Sales Order

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Request body schema

application/json
numberstring or null

Sales order number, as assigned by the accounting system.

customerobject or null

The customer this entity is linked to.

quote_idstring or null

The unique identifier for the quote.

company_idstring or null

The company ID the transaction belongs to

department_idstring or null

The ID of the department

location_idstring or null

The ID of the location

project_idstring

The unique identifier for the linked project.

subsidiary_idstring or null

The ID of the subsidiary

order_datestring or null

Date the sales order was placed - YYYY-MM-DD.

delivery_datestring or null

The requested delivery date: the date the customer asked to receive the goods or services - YYYY-MM-DD. Promised ship dates and payment due dates are not mapped here.

order_typestring or null

The order or transaction type of the sales order, as configured in the accounting system. On create, selects the type to create when the system supports several; omit to use the connection default. See the connector gotchas for the values each system accepts.

termsstring or null

Payment terms of the sales order.

terms_idstring or null

The ID of the payment terms

po_numberstring or null

A PO Number uniquely identifies a purchase order and is generally defined by the buyer. The buyer will match the PO number in the invoice to the Purchase Order.

referencestring or null

Optional reference identifier for the transaction.

statusstring or null
Enum:draftopenon_holdback_ordered

Sales order status, in order of precedence: cancelled; closed (the order is closed or completed, whether or not it was billed); invoiced (fully billed but not yet closed); back_ordered; on_hold (including credit hold); draft (including pending approval); open (every other active state, including partially shipped and partially invoiced); other for states that fit none of these.

currencystring or null
Enum:UNKNOWN_CURRENCYAEDAFNALL

Indicates the associated currency for an amount of money. Values correspond to ISO 4217.

currency_ratenumber or null

Currency Exchange Rate at the time entity was recorded/generated.

tax_inclusiveboolean or null

Amounts are including tax

sub_totalnumber or null

Sub-total amount, normally before tax.

total_taxnumber or null

Total tax amount applied to this sales order.

tax_codestring or null

Applicable tax id/code override if tax is not supplied on a line item basis.

discount_percentagenumber or null

Discount percentage applied to this sales order.

discount_amountnumber or null

Discount amount applied to this sales order.

totalnumber or null

Total amount of the sales order, including tax.

shipping_methodstring or null

Shipping method or carrier code for the order.

payment_methodstring or null

Payment method used for the transaction, such as cash, credit card, bank transfer, or check

customer_memostring or null

Message to the customer, shown on the sales order.

notesstring or null

Internal notes for the sales order, not shown to the customer.

line_itemsobjects
billing_addressobject
shipping_addressobject
tracking_categoriesobjects or null or null

A list of linked tracking categories.

template_idstring or null

Optional sales order template

source_document_urlstring or null

URL link to a source document - shown as 'Go to [appName]' in the downstream app.

custom_fieldsobjects or objects
row_versionstring or null

A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.

pass_throughobjects

The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.

Responses

200Sales Orders
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

Acumatica
Acumatica
Fortnox
Fortnox
MYOB Acumatica
MYOB Acumatica
Sage Intacct
Sage Intacct
Sage Intacct REST
Sage Intacct REST
Access Financials
Access Financials
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
e-Boekhouden.nl
e-Boekhouden.nl
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Bank Feeds
Intuit Bank Feeds
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Lexware Office
Lexware Office
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Minox
Minox
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Oracle Fusion Cloud
Oracle Fusion Cloud
Request
Pennylane
Pennylane
Request
Plaid Core Exchange
Plaid Core Exchange
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
sevDesk
sevDesk
Request
SnelStart
SnelStart
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Twinfield
Twinfield
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

{
  "number": "SO000123",
  "customer": {
    "id": "12345",
    "display_name": "Windsurf Shop",
    "name": "Windsurf Shop",
    "email": "boring@boring.com"
  },
  "quote_id": "123456",
  "company_id": "12345",
  "department_id": "12345",
  "location_id": "12345",
  "project_id": "12345",
  "subsidiary_id": "12345",
  "order_date": "2020-09-30",
  "delivery_date": "2020-10-15",
  "order_type": "SO",
  "terms": "Net 30",
  "terms_id": "12345",
  "po_number": "90000117",
  "reference": "INV-2024-001",
  "status": "open",
  "currency": "USD",
  "currency_rate": 0.69,
  "tax_inclusive": true,
  "sub_total": 27500,
  "total_tax": 2500,
  "tax_code": "1234",
  "discount_percentage": 5.5,
  "discount_amount": 25,
  "total": 30000,
  "shipping_method": "FEDEX",
  "payment_method": "cash",
  "customer_memo": "Thank you for your order!",
  "notes": "Ship with next consignment",
  "line_items": [
    {
      "id": "12345",
      "row_id": "12345",
      "code": "120-C",
      "line_number": 1,
      "description": "Model Y is a fully electric, mid-size SUV, with seating for up to seven, dual motor AWD and unparalleled protection.",
      "type": "sales_item",
      "tax_amount": 27500,
      "total_amount": 27500,
      "quantity": 1,
      "unit_price": 27500.5,
      "unit_of_measure": "pc.",
      "discount_percentage": 0.01,
      "discount_amount": 19.99,
      "service_date": "2024-01-15",
      "category_id": "12345",
      "location_id": "12345",
      "department_id": "12345",
      "subsidiary_id": "12345",
      "shipping_id": "12345",
      "memo": "Some memo",
      "prepaid": true,
      "item": {
        "id": "12344",
        "code": "120-C",
        "name": "Model Y"
      },
      "tax_applicable_on": "Domestic_Purchase_of_Goods_and_Services",
      "tax_recoverability": "Fully_Recoverable",
      "tax_method": "Due_to_Supplier",
      "worktags": [
        {
          "id": "123456",
          "value": "New York"
        }
      ],
      "tax_rate": {
        "id": "123456",
        "code": "N-T",
        "rate": 10
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "ledger_account": {
        "id": "123456",
        "name": "Bank account",
        "nominal_code": "N091",
        "code": "453",
        "parent_id": "123456",
        "display_id": "123456"
      },
      "custom_fields": [
        {
          "id": "2389328923893298",
          "name": "employee_level",
          "ref_name": "Marketing",
          "description": "Employee Level",
          "value": "Uses Salesforce and Marketo"
        }
      ],
      "row_version": "1-12345"
    }
  ],
  "billing_address": {
    "id": "123",
    "type": "primary",
    "string": "25 Spring Street, Blackburn, VIC 3130",
    "name": "HQ US",
    "line1": "Main street",
    "line2": "apt #",
    "line3": "Suite #",
    "line4": "delivery instructions",
    "line5": "Attention: Finance Dept",
    "street_number": "25",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94104",
    "country": "US",
    "latitude": "40.759211",
    "longitude": "-73.984638",
    "county": "Santa Clara",
    "contact_name": "Elon Musk",
    "salutation": "Mr",
    "phone_number": "111-111-1111",
    "fax": "122-111-1111",
    "email": "elon@musk.com",
    "website": "https://elonmusk.com",
    "notes": "Address notes or delivery instructions.",
    "row_version": "1-12345"
  },
  "shipping_address": {
    "id": "123",
    "type": "primary",
    "string": "25 Spring Street, Blackburn, VIC 3130",
    "name": "HQ US",
    "line1": "Main street",
    "line2": "apt #",
    "line3": "Suite #",
    "line4": "delivery instructions",
    "line5": "Attention: Finance Dept",
    "street_number": "25",
    "city": "San Francisco",
    "state": "CA",
    "postal_code": "94104",
    "country": "US",
    "latitude": "40.759211",
    "longitude": "-73.984638",
    "county": "Santa Clara",
    "contact_name": "Elon Musk",
    "salutation": "Mr",
    "phone_number": "111-111-1111",
    "fax": "122-111-1111",
    "email": "elon@musk.com",
    "website": "https://elonmusk.com",
    "notes": "Address notes or delivery instructions.",
    "row_version": "1-12345"
  },
  "tracking_categories": [
    {
      "id": "123456",
      "code": "100",
      "name": "New York",
      "parent_id": "123456",
      "parent_name": "New York"
    }
  ],
  "template_id": "123456",
  "source_document_url": "https://www.ordersolution.com/order/123456",
  "custom_fields": [
    {
      "id": "2389328923893298",
      "name": "employee_level",
      "ref_name": "Marketing",
      "description": "Employee Level",
      "value": "Uses Salesforce and Marketo"
    }
  ],
  "row_version": "1-12345",
  "pass_through": [
    {
      "service_id": "string",
      "operation_id": "string",
      "extend_object": {},
      "extend_paths": [
        {
          "path": "$.nested.property",
          "value": {
            "TaxClassificationRef": {
              "value": "EUC-99990201-V1-00020000"
            }
          }
        }
      ]
    }
  ]
}

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "acumatica",
  "resource": "SalesOrders",
  "operation": "update",
  "data": {
    "id": "12345"
  }
}

Delete Sales Order

delete
https://unify.apideck.com/accounting/sales-orders/{id}

Delete Sales Order

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Responses

200Sales Orders
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable

Mapping coverage per connector

Acumatica
Acumatica
Fortnox
Fortnox
MYOB Acumatica
MYOB Acumatica
Sage Intacct
Sage Intacct
Access Financials
Access Financials
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
e-Boekhouden.nl
e-Boekhouden.nl
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Bank Feeds
Intuit Bank Feeds
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Lexware Office
Lexware Office
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Minox
Minox
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Oracle Fusion Cloud
Oracle Fusion Cloud
Request
Pennylane
Pennylane
Request
Plaid Core Exchange
Plaid Core Exchange
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
sevDesk
sevDesk
Request
SnelStart
SnelStart
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Twinfield
Twinfield
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

import { Apideck } from "@apideck/unify";

const apideck = new Apideck({
  consumerId: "test-consumer",
  appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
  apiKey: process.env["APIDECK_API_KEY"] ?? "",
});

async function run() {
  const result = await apideck.accounting.salesOrders.delete({
    id: "<id>",
    serviceId: "salesforce",
    companyId: "12345",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "acumatica",
  "resource": "SalesOrders",
  "operation": "delete",
  "data": {
    "id": "12345"
  }
}