Sales Receipts

Sales Receipts endpoints for the Accounting API Unified API

10.38.1
Run In Postman
|Full reference

A Sales Receipt represents a point-of-sale transaction where payment is received at the time of sale, with no accounts-receivable leg: payment is captured at sale and the receipt closes immediately.

The Sales Receipts model

idstring
required

Unique identifier representing the sales receipt

numberstring or null

Reference number for the sales receipt.

customerobject or null

The customer this entity is linked to.

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

Sales Receipts example
{}

List Sales Receipts

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

List Sales Receipts

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

sortobjectsort[by]=updated_at

Apply sorting

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

fieldsstring or null

The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.

Responses

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

Mapping coverage per connector

QuickBooks
QuickBooks
Access Financials
Access Financials
Request
Acumatica
Acumatica
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
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
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.salesReceipts.list({
    serviceId: "salesforce",
    companyId: "12345",
    filter: {
      updatedSince: new Date("2020-09-30T07:43:32.000Z"),
      customerId: "123abc",
    },
    sort: {
      by: "updated_at",
      direction: "desc",
    },
    passThrough: {
      "search": "San Francisco",
    },
    fields: "id,updated_at",
  });

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

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "quickbooks",
  "resource": "sales-receipts",
  "operation": "all",
  "data": [
    {
      "id": "123456",
      "number": "SR-00001",
      "customer": {
        "id": "12345",
        "display_id": "CUST00101",
        "display_name": "Windsurf Shop",
        "name": "Windsurf Shop",
        "company_name": "The boring company",
        "email": "boring@boring.com"
      },
      "currency": "USD",
      "currency_rate": 0.69,
      "tax_inclusive": true,
      "sub_total": 250,
      "total_amount": 49.99,
      "total_tax": 25,
      "transaction_date": "2021-05-01T12:00:00.000Z",
      "payment_method": "cash",
      "payment_method_reference": "123456",
      "payment_method_id": "12345",
      "account": {
        "id": "123456",
        "name": "Bank account",
        "nominal_code": "N091",
        "code": "453",
        "parent_id": "123456",
        "display_id": "123456"
      },
      "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",
            "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"
        }
      ],
      "tax_code": "1234",
      "discount_percentage": 5.5,
      "discount_amount": 25,
      "note": "Thank you for your purchase",
      "customer_memo": "Thank you for your business and have a great day!",
      "reference": "REF-123456",
      "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"
      },
      "department": {
        "id": "12345",
        "display_id": "123456",
        "name": "Acme Inc.",
        "downstream_id": "12345"
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "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"
  },
  "_raw": {}
}

Create Sales Receipt

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

Create Sales Receipt

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

Reference number for the sales receipt.

customerobject or null

The customer this entity is linked to.

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

Subtotal amount, normally before tax.

total_amountnumber or null
required

The total amount of the transaction or record

total_taxnumber or null

Total tax amount applied to this transaction.

transaction_datestring or null

The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD

payment_methodstring or null

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

payment_method_referencestring or null

Optional reference message returned by payment method on processing

payment_method_idstring or null

A unique identifier for an object.

accountobject or null
line_itemsobjects

Line items for itemized sales receipts. Used when the sales receipt includes product/service details with quantities and pricing.

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 receipt.

discount_amountnumber or null

Discount amount applied to this sales receipt.

notestring or null

Optional note to be associated with the sales receipt.

customer_memostring or null

Customer memo

referencestring or null

Optional reference message for the sales receipt.

billing_addressobject
shipping_addressobject
departmentobject or null
tracking_categoriesobjects or null or null

A list of linked tracking categories.

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

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

Mapping coverage per connector

QuickBooks
QuickBooks
Access Financials
Access Financials
Request
Acumatica
Acumatica
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
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
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": "SR-00001",
  "customer": {
    "id": "12345",
    "display_name": "Windsurf Shop",
    "name": "Windsurf Shop",
    "email": "boring@boring.com"
  },
  "currency": "USD",
  "currency_rate": 0.69,
  "tax_inclusive": true,
  "sub_total": 250,
  "total_amount": 49.99,
  "total_tax": 25,
  "transaction_date": "2021-05-01T12:00:00.000Z",
  "payment_method": "cash",
  "payment_method_reference": "123456",
  "payment_method_id": "12345",
  "account": {
    "id": "123456",
    "name": "Bank account",
    "nominal_code": "N091",
    "code": "453",
    "parent_id": "123456",
    "display_id": "123456"
  },
  "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"
    }
  ],
  "tax_code": "1234",
  "discount_percentage": 5.5,
  "discount_amount": 25,
  "note": "Thank you for your purchase",
  "customer_memo": "Thank you for your business and have a great day!",
  "reference": "REF-123456",
  "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"
  },
  "department": {
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "tracking_categories": [
    {
      "id": "123456",
      "code": "100",
      "name": "New York",
      "parent_id": "123456",
      "parent_name": "New York"
    }
  ],
  "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": "quickbooks",
  "resource": "sales-receipts",
  "operation": "add",
  "data": {
    "id": "12345"
  },
  "_raw": {}
}

Get Sales Receipt

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

Get Sales Receipt

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

fieldsstring or null

The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.

Responses

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

Mapping coverage per connector

QuickBooks
QuickBooks
Access Financials
Access Financials
Request
Acumatica
Acumatica
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
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
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.salesReceipts.get({
    id: "<id>",
    serviceId: "salesforce",
    companyId: "12345",
    fields: "id,updated_at",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "quickbooks",
  "resource": "sales-receipts",
  "operation": "one",
  "data": {
    "id": "123456",
    "number": "SR-00001",
    "customer": {
      "id": "12345",
      "display_id": "CUST00101",
      "display_name": "Windsurf Shop",
      "name": "Windsurf Shop",
      "company_name": "The boring company",
      "email": "boring@boring.com"
    },
    "currency": "USD",
    "currency_rate": 0.69,
    "tax_inclusive": true,
    "sub_total": 250,
    "total_amount": 49.99,
    "total_tax": 25,
    "transaction_date": "2021-05-01T12:00:00.000Z",
    "payment_method": "cash",
    "payment_method_reference": "123456",
    "payment_method_id": "12345",
    "account": {
      "id": "123456",
      "name": "Bank account",
      "nominal_code": "N091",
      "code": "453",
      "parent_id": "123456",
      "display_id": "123456"
    },
    "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",
          "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"
      }
    ],
    "tax_code": "1234",
    "discount_percentage": 5.5,
    "discount_amount": 25,
    "note": "Thank you for your purchase",
    "customer_memo": "Thank you for your business and have a great day!",
    "reference": "REF-123456",
    "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"
    },
    "department": {
      "id": "12345",
      "display_id": "123456",
      "name": "Acme Inc.",
      "downstream_id": "12345"
    },
    "tracking_categories": [
      {
        "id": "123456",
        "code": "100",
        "name": "New York",
        "parent_id": "123456",
        "parent_name": "New York"
      }
    ],
    "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"
      }
    ]
  },
  "_raw": {}
}

Update Sales Receipt

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

Update Sales Receipt

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

Reference number for the sales receipt.

customerobject or null

The customer this entity is linked to.

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

Subtotal amount, normally before tax.

total_amountnumber or null
required

The total amount of the transaction or record

total_taxnumber or null

Total tax amount applied to this transaction.

transaction_datestring or null

The date of the sales receipt transaction - YYYY-MM-DDThh:mm:ss.sTZD

payment_methodstring or null

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

payment_method_referencestring or null

Optional reference message returned by payment method on processing

payment_method_idstring or null

A unique identifier for an object.

accountobject or null
line_itemsobjects

Line items for itemized sales receipts. Used when the sales receipt includes product/service details with quantities and pricing.

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 receipt.

discount_amountnumber or null

Discount amount applied to this sales receipt.

notestring or null

Optional note to be associated with the sales receipt.

customer_memostring or null

Customer memo

referencestring or null

Optional reference message for the sales receipt.

billing_addressobject
shipping_addressobject
departmentobject or null
tracking_categoriesobjects or null or null

A list of linked tracking categories.

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

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

Mapping coverage per connector

QuickBooks
QuickBooks
Access Financials
Access Financials
Request
Acumatica
Acumatica
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
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
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": "SR-00001",
  "customer": {
    "id": "12345",
    "display_name": "Windsurf Shop",
    "name": "Windsurf Shop",
    "email": "boring@boring.com"
  },
  "currency": "USD",
  "currency_rate": 0.69,
  "tax_inclusive": true,
  "sub_total": 250,
  "total_amount": 49.99,
  "total_tax": 25,
  "transaction_date": "2021-05-01T12:00:00.000Z",
  "payment_method": "cash",
  "payment_method_reference": "123456",
  "payment_method_id": "12345",
  "account": {
    "id": "123456",
    "name": "Bank account",
    "nominal_code": "N091",
    "code": "453",
    "parent_id": "123456",
    "display_id": "123456"
  },
  "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"
    }
  ],
  "tax_code": "1234",
  "discount_percentage": 5.5,
  "discount_amount": 25,
  "note": "Thank you for your purchase",
  "customer_memo": "Thank you for your business and have a great day!",
  "reference": "REF-123456",
  "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"
  },
  "department": {
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "tracking_categories": [
    {
      "id": "123456",
      "code": "100",
      "name": "New York",
      "parent_id": "123456",
      "parent_name": "New York"
    }
  ],
  "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": "quickbooks",
  "resource": "sales-receipts",
  "operation": "update",
  "data": {
    "id": "12345"
  },
  "_raw": {}
}

Delete Sales Receipt

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

Delete Sales Receipt

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

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

Mapping coverage per connector

QuickBooks
QuickBooks
Access Financials
Access Financials
Request
Acumatica
Acumatica
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
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
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.salesReceipts.delete({
    id: "<id>",
    serviceId: "salesforce",
    companyId: "12345",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "quickbooks",
  "resource": "sales-receipts",
  "operation": "delete",
  "data": {
    "id": "12345"
  },
  "_raw": {}
}