Bill Credit Notes

Bill Credit Notes endpoints for the Accounting API Unified API

10.46.0
Run In Postman
|Full reference

A Bill Credit Note represents a supplier-issued (accounts payable) credit, including line items, amounts, and the linked supplier.

The Bill Credit Notes model

idstring
required

Unique identifier representing the entity

numberstring or null

Bill credit note number.

supplierobject or null

The supplier this entity is linked to.

subsidiaryobject or null
locationobject or null
departmentobject or null
Bill Credit Notes example
{}

List Bill Credit Notes

get
https://unify.apideck.com/accounting/bill-credit-notes

List Bill Credit Notes

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[ids]=12345,67890

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

200Bill Credit Notes
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
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
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
Fortnox
Fortnox
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
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
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
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
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.billCreditNotes.list({
    serviceId: "salesforce",
    companyId: "12345",
    filter: {
      ids: "12345,67890",
      idSince: "1",
      updatedSince: new Date("2020-09-30T07:43:32.000Z"),
      createdSince: new Date("2020-09-30T07:43:32.000Z"),
      number: "OIT00546",
      supplierId: "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": "microsoft-dynamics-365-business-central",
  "resource": "bill-credit-notes",
  "operation": "all",
  "data": [
    {
      "id": "123456",
      "number": "OIT00546",
      "supplier": {
        "id": "12345",
        "display_id": "SUPP00101",
        "display_name": "Windsurf Shop",
        "company_name": "The boring company",
        "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"
        }
      },
      "subsidiary": {
        "id": "12345",
        "display_id": "123456",
        "name": "Acme Inc."
      },
      "location": {
        "id": "123456",
        "display_id": "123456",
        "name": "New York Office",
        "downstream_id": "12345"
      },
      "department": {
        "id": "12345",
        "display_id": "123456",
        "name": "Acme Inc.",
        "downstream_id": "12345"
      },
      "currency": "USD",
      "currency_rate": 0.69,
      "tax_inclusive": true,
      "sub_total": 27500,
      "total_amount": 49.99,
      "total_tax": 2500,
      "tax_code": "1234",
      "balance": 27500,
      "remaining_credit": 27500,
      "status": "authorised",
      "reference": "123456",
      "date_issued": "2021-05-01T12:00:00.000Z",
      "date_paid": "2021-05-01T12:00:00.000Z",
      "type": "accounts_payable_credit",
      "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": "Returned goods credit",
          "type": "expense_account",
          "tax_amount": 27.5,
          "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",
          "location": {
            "id": "123456",
            "display_id": "123456",
            "name": "New York Office",
            "downstream_id": "12345"
          },
          "department": {
            "id": "12345",
            "display_id": "123456",
            "name": "Acme Inc.",
            "downstream_id": "12345"
          },
          "item": {
            "id": "12344",
            "code": "120-C",
            "name": "Model Y"
          },
          "tax_rate": {
            "id": "123456",
            "code": "N-T",
            "name": "GST on Purchases",
            "rate": 10
          },
          "ledger_account": {
            "id": "123456",
            "name": "Bank account",
            "nominal_code": "N091",
            "code": "453",
            "parent_id": "123456",
            "display_id": "123456"
          },
          "tracking_categories": [
            {
              "id": "123456",
              "code": "100",
              "name": "New York",
              "parent_id": "123456",
              "parent_name": "New York"
            }
          ],
          "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"
        }
      ],
      "allocations": [
        {
          "id": "123456",
          "type": "invoice",
          "code": "N091",
          "amount": 49.99,
          "allocation_id": "123456"
        }
      ],
      "note": "Some notes about this bill credit note",
      "terms": "Some terms about this bill credit note",
      "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 Bill Credit Note

post
https://unify.apideck.com/accounting/bill-credit-notes

Create Bill Credit Note

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

Bill credit note number.

supplierobject or null

The supplier this entity is linked to.

subsidiaryobject or null
locationobject or null
departmentobject or null
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_amountnumber
required

Amount of transaction

total_taxnumber or null

Total tax amount applied to this bill credit note.

tax_codestring or null

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

balancenumber or null

The balance reflecting any payments made against the transaction.

remaining_creditnumber or null

Indicates the total credit amount still available to apply towards the payment.

statusstring
Enum:draftauthorisedpostedpartially_paid

Status of bill credit notes

referencestring or null

Optional reference message ie: Debit remittance detail.

date_issuedstring

Date bill credit note issued - YYYY:MM::DDThh:mm:ss.sTZD

date_paidstring or null

Date bill credit note paid - YYYY:MM::DDThh:mm:ss.sTZD

typestring
Enum:accounts_payable_credit

The type of credit note. A bill credit note is always an accounts payable (supplier-side) credit.

accountobject or null
line_itemsobjects
allocationsobjects
notestring or null

Optional note to be associated with the bill credit note.

termsstring or null

Optional terms to be associated with the bill credit note.

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

201Bill Credit Note created
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
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
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
Fortnox
Fortnox
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
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
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
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
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": "OIT00546",
  "supplier": {
    "id": "12345",
    "display_name": "Windsurf Shop",
    "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"
    }
  },
  "subsidiary": {
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "location": {
    "id": "123456",
    "display_id": "123456",
    "name": "New York Office"
  },
  "department": {
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "currency": "USD",
  "currency_rate": 0.69,
  "tax_inclusive": true,
  "sub_total": 27500,
  "total_amount": 49.99,
  "total_tax": 2500,
  "tax_code": "1234",
  "balance": 27500,
  "remaining_credit": 27500,
  "status": "authorised",
  "reference": "123456",
  "date_issued": "2021-05-01T12:00:00.000Z",
  "date_paid": "2021-05-01T12:00:00.000Z",
  "type": "accounts_payable_credit",
  "account": {
    "id": "123456",
    "name": "Bank account",
    "nominal_code": "N091",
    "code": "453",
    "parent_id": "123456",
    "display_id": "123456"
  },
  "line_items": [
    {
      "row_id": "12345",
      "code": "120-C",
      "line_number": 1,
      "description": "Returned goods credit",
      "type": "expense_account",
      "tax_amount": 27.5,
      "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",
      "location": {
        "id": "123456",
        "display_id": "123456",
        "name": "New York Office"
      },
      "department": {
        "display_id": "123456",
        "name": "Acme Inc."
      },
      "item": {
        "id": "12344",
        "code": "120-C",
        "name": "Model Y"
      },
      "tax_rate": {
        "id": "123456",
        "code": "N-T",
        "rate": 10
      },
      "ledger_account": {
        "id": "123456",
        "name": "Bank account",
        "nominal_code": "N091",
        "code": "453",
        "parent_id": "123456",
        "display_id": "123456"
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "row_version": "1-12345"
    }
  ],
  "allocations": [
    {
      "id": "123456",
      "type": "invoice",
      "amount": 49.99,
      "allocation_id": "123456"
    }
  ],
  "note": "Some notes about this bill credit note",
  "terms": "Some terms about this bill credit note",
  "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": "microsoft-dynamics-365-business-central",
  "resource": "bill-credit-notes",
  "operation": "add",
  "data": {
    "id": "12345"
  },
  "_raw": {}
}

Get Bill Credit Note

get
https://unify.apideck.com/accounting/bill-credit-notes/{id}

Get Bill Credit Note

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

200Bill Credit Note
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
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
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
Fortnox
Fortnox
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
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
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
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
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.billCreditNotes.get({
    id: "<id>",
    serviceId: "salesforce",
    companyId: "12345",
    fields: "id,updated_at",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "microsoft-dynamics-365-business-central",
  "resource": "bill-credit-notes",
  "operation": "one",
  "data": {
    "id": "123456",
    "number": "OIT00546",
    "supplier": {
      "id": "12345",
      "display_id": "SUPP00101",
      "display_name": "Windsurf Shop",
      "company_name": "The boring company",
      "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"
      }
    },
    "subsidiary": {
      "id": "12345",
      "display_id": "123456",
      "name": "Acme Inc."
    },
    "location": {
      "id": "123456",
      "display_id": "123456",
      "name": "New York Office",
      "downstream_id": "12345"
    },
    "department": {
      "id": "12345",
      "display_id": "123456",
      "name": "Acme Inc.",
      "downstream_id": "12345"
    },
    "currency": "USD",
    "currency_rate": 0.69,
    "tax_inclusive": true,
    "sub_total": 27500,
    "total_amount": 49.99,
    "total_tax": 2500,
    "tax_code": "1234",
    "balance": 27500,
    "remaining_credit": 27500,
    "status": "authorised",
    "reference": "123456",
    "date_issued": "2021-05-01T12:00:00.000Z",
    "date_paid": "2021-05-01T12:00:00.000Z",
    "type": "accounts_payable_credit",
    "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": "Returned goods credit",
        "type": "expense_account",
        "tax_amount": 27.5,
        "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",
        "location": {
          "id": "123456",
          "display_id": "123456",
          "name": "New York Office",
          "downstream_id": "12345"
        },
        "department": {
          "id": "12345",
          "display_id": "123456",
          "name": "Acme Inc.",
          "downstream_id": "12345"
        },
        "item": {
          "id": "12344",
          "code": "120-C",
          "name": "Model Y"
        },
        "tax_rate": {
          "id": "123456",
          "code": "N-T",
          "name": "GST on Purchases",
          "rate": 10
        },
        "ledger_account": {
          "id": "123456",
          "name": "Bank account",
          "nominal_code": "N091",
          "code": "453",
          "parent_id": "123456",
          "display_id": "123456"
        },
        "tracking_categories": [
          {
            "id": "123456",
            "code": "100",
            "name": "New York",
            "parent_id": "123456",
            "parent_name": "New York"
          }
        ],
        "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"
      }
    ],
    "allocations": [
      {
        "id": "123456",
        "type": "invoice",
        "code": "N091",
        "amount": 49.99,
        "allocation_id": "123456"
      }
    ],
    "note": "Some notes about this bill credit note",
    "terms": "Some terms about this bill credit note",
    "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 Bill Credit Note

patch
https://unify.apideck.com/accounting/bill-credit-notes/{id}

Update Bill Credit Note

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.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Request body schema

application/json
numberstring or null

Bill credit note number.

supplierobject or null

The supplier this entity is linked to.

subsidiaryobject or null
locationobject or null
departmentobject or null
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_amountnumber
required

Amount of transaction

total_taxnumber or null

Total tax amount applied to this bill credit note.

tax_codestring or null

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

balancenumber or null

The balance reflecting any payments made against the transaction.

remaining_creditnumber or null

Indicates the total credit amount still available to apply towards the payment.

statusstring
Enum:draftauthorisedpostedpartially_paid

Status of bill credit notes

referencestring or null

Optional reference message ie: Debit remittance detail.

date_issuedstring

Date bill credit note issued - YYYY:MM::DDThh:mm:ss.sTZD

date_paidstring or null

Date bill credit note paid - YYYY:MM::DDThh:mm:ss.sTZD

typestring
Enum:accounts_payable_credit

The type of credit note. A bill credit note is always an accounts payable (supplier-side) credit.

accountobject or null
line_itemsobjects
allocationsobjects
notestring or null

Optional note to be associated with the bill credit note.

termsstring or null

Optional terms to be associated with the bill credit note.

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

200Bill Credit Note updated
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
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
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
Fortnox
Fortnox
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
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
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
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
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": "OIT00546",
  "supplier": {
    "id": "12345",
    "display_name": "Windsurf Shop",
    "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"
    }
  },
  "subsidiary": {
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "location": {
    "id": "123456",
    "display_id": "123456",
    "name": "New York Office"
  },
  "department": {
    "display_id": "123456",
    "name": "Acme Inc."
  },
  "currency": "USD",
  "currency_rate": 0.69,
  "tax_inclusive": true,
  "sub_total": 27500,
  "total_amount": 49.99,
  "total_tax": 2500,
  "tax_code": "1234",
  "balance": 27500,
  "remaining_credit": 27500,
  "status": "authorised",
  "reference": "123456",
  "date_issued": "2021-05-01T12:00:00.000Z",
  "date_paid": "2021-05-01T12:00:00.000Z",
  "type": "accounts_payable_credit",
  "account": {
    "id": "123456",
    "name": "Bank account",
    "nominal_code": "N091",
    "code": "453",
    "parent_id": "123456",
    "display_id": "123456"
  },
  "line_items": [
    {
      "row_id": "12345",
      "code": "120-C",
      "line_number": 1,
      "description": "Returned goods credit",
      "type": "expense_account",
      "tax_amount": 27.5,
      "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",
      "location": {
        "id": "123456",
        "display_id": "123456",
        "name": "New York Office"
      },
      "department": {
        "display_id": "123456",
        "name": "Acme Inc."
      },
      "item": {
        "id": "12344",
        "code": "120-C",
        "name": "Model Y"
      },
      "tax_rate": {
        "id": "123456",
        "code": "N-T",
        "rate": 10
      },
      "ledger_account": {
        "id": "123456",
        "name": "Bank account",
        "nominal_code": "N091",
        "code": "453",
        "parent_id": "123456",
        "display_id": "123456"
      },
      "tracking_categories": [
        {
          "id": "123456",
          "code": "100",
          "name": "New York",
          "parent_id": "123456",
          "parent_name": "New York"
        }
      ],
      "row_version": "1-12345"
    }
  ],
  "allocations": [
    {
      "id": "123456",
      "type": "invoice",
      "amount": 49.99,
      "allocation_id": "123456"
    }
  ],
  "note": "Some notes about this bill credit note",
  "terms": "Some terms about this bill credit note",
  "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": "microsoft-dynamics-365-business-central",
  "resource": "bill-credit-notes",
  "operation": "update",
  "data": {
    "id": "12345"
  },
  "_raw": {}
}

Delete Bill Credit Note

delete
https://unify.apideck.com/accounting/bill-credit-notes/{id}

Delete Bill Credit Note

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.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

Responses

200Bill Credit Note deleted
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
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
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
Fortnox
Fortnox
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
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
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Restaurant365
Restaurant365
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
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.billCreditNotes.delete({
    id: "<id>",
    serviceId: "salesforce",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "microsoft-dynamics-365-business-central",
  "resource": "bill-credit-notes",
  "operation": "delete",
  "data": {
    "id": "12345"
  },
  "_raw": {}
}