How does the JSON output and object description table of list credit notes API of Apideck function?

In this article, I will provide a clear understanding of the object table and JSON output of the Apideck list credit notes API. As a programmer, it is essential to comprehend the structure of the data that we are working with. Object tables are an efficient way of representing data in a tabular form, while JSON output is a popular data format used to transmit and store data. By clarifying the specifics of these two concepts in the context of the Apideck list credit notes API, readers will have a deeper understanding of how to interact with the data and manipulate it to suit their needs.

Object Table

ObjectsDescription
data
idUnique identifier representing the entity
numberCredit note number
customerThe customer this entity is linked to
currencyIndicates the associated currency for an amount of money. Values correspond to ISO 4217.
currency_rateCurrency Exchange Rate at the time entity was recorded/generated.
tax_inclusiveAmounts are including tax
sub_totalSub-total amount, normally before tax
total_amountAmount of payment
total_taxTotal tax amount applied to this invoice
tax_codeApplicable tax id/code override if tax is not supplied on a line item basis
balanceThe balance reflecting any payments made against the transaction
remaining_creditIndicates the total credit amount still available to apply towards the payment
statusStatus of payment
referenceOptional reference message ie: Debit remittance detail.
date_issuedDate credit note issued - YYYY:MM::DDThh:mm:ss.sTZD
date_paidDate credit note paid - YYYY:MM::DDThh:mm:ss.sTZD
typeType of payment
accountAccount details
line_items
etcetc
  1. data: This object contains the data related to the credit note.

  2. id: This is a unique identifier that represents the credit note entity.

  3. number: This object represents the credit note number.

  4. customer: This object represents the customer that the credit note is linked to.

  5. currency: This object indicates the associated currency for an amount of money. The values correspond to ISO 4217.

  6. currency_rate: This object represents the currency exchange rate at the time the entity was recorded/generated.

  7. tax_inclusive: This object indicates whether the amounts are including tax or not.

  8. sub_total: This object represents the sub-total amount, normally before tax.

  9. total_amount: This object represents the amount of the payment.

  10. total_tax: This object represents the total tax amount applied to this invoice.

  11. tax_code: This object represents the applicable tax ID/code override if tax is not supplied on a line item basis.

  12. balance: This object represents the balance reflecting any payments made against the transaction.

  13. remaining_credit: This object indicates the total credit amount still available to apply towards the payment.

  14. status: This object represents the status of the payment.

  15. reference: This object represents an optional reference message, such as a debit remittance detail.

  16. date_issued: This object represents the date the credit note was issued in the format of YYYY:MM::DDThh:mm:ss.sTZD.

  17. date_paid: This object represents the date the credit note was paid in the format of YYYY:MM::DDThh:mm:ss.sTZD.

  18. type: This object represents the type of payment.

  19. account: This object represents the account details related to the credit note.

  20. line_items: This object contains the line items of the credit note, such as the quantity, unit price, and total price.

  21. etc: This object represents any other relevant data that is not explicitly mentioned in the table.

The information provided in the table is useful for understanding the structure and contents of the Apideck list credit notes API. As a programmer, having a clear understanding of the objects and their descriptions is essential for effectively interacting with the data and extracting the necessary information. The table provides a concise overview of the different objects that can be found in the API, such as the credit note number, customer, currency, tax information, payment status, and dates. By understanding the different objects and their descriptions, programmers can build more effective integrations, extract relevant information, and troubleshoot issues. Additionally, this information can be useful for non-technical stakeholders who need a high-level understanding of the Apideck list credit notes API and its capabilities.

JSON REST output

The JSON output represents a response from the Apideck list credit notes API that includes information about a credit note. The output contains a total of 21 objects, including metadata and links. The "status_code" and "status" objects indicate the response status of the API call. The "service" and "resource" objects represent the specific service and resource that the API call is related to. The "operation" object describes the type of operation that was performed, which in this case is "all". The "data" object contains an array that includes detailed information about the credit note, such as the unique identifier, credit note number, customer details, currency, tax information, payment status, dates, and line items. The "meta" object includes additional information about the data, such as the number of items on the page and cursors for pagination. Finally, the "links" object contains links to the previous, current, and next pages for the data. Overall, this JSON output provides a comprehensive overview of the credit note data that can be retrieved through the Apideck list credit notes API.

{
"status_code": 200,
"status": "OK",
"service": "xero",
"resource": "credit-notes",
"operation": "all",
"data": [
{
"id": "123456",
"number": "OIT00546",
"customer": {
"id": "12345",
"display_id": "CUST00101",
"display_name": "Windsurf Shop",
"name": "Windsurf Shop",
"company_name": "The boring company"
},
"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_receivable_credit",
"account": {
"id": "123456",
"name": "Bank account",
"nominal_code": "N091",
"code": "453"
},
"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,
"location_id": "1234",
"department_id": "1234",
"item": {
"id": "12344",
"code": "120-C",
"name": "Model Y"
},
"tax_rate": {
"id": "123456",
"code": "N-T",
"name": "GST on Purchases"
},
"ledger_account": {
"id": "123456",
"name": "Bank account",
"nominal_code": "N091",
"code": "453"
},
"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
}
],
"note": "Some notes about this credit note",
"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="
}
},
"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"
}
}

Conclusion

In this article, we've taken a closer look at the Apideck list credit notes API, including its object table and JSON output. We described the different objects in the table, such as the credit note number, customer, currency, tax information, payment status, and dates, and provided a detailed explanation of the JSON output that can be retrieved through the API. We also discussed the usefulness of this information for programmers and non-technical stakeholders alike. By understanding the structure and contents of the Apideck list credit notes API, programmers can build more effective integrations, extract relevant information, and troubleshoot issues, while non-technical stakeholders can gain a high-level understanding of the API's capabilities. Overall, this conversation provided valuable insights into the Apideck list credit notes API and its potential applications.

Footnote

You can request access to the Apideck list credit notes API through the third party data marketplace of Worldindata. Worldindata is a data-driven media organization that partners with Apideck to provide access to their APIs through their marketplace. To request access, you can visit the Worldindata website and navigate to their data marketplace, where you can browse the available APIs and select the Apideck list credit notes API. From there, you can follow the instructions to sign up for an account, provide payment information, and request access to the API. Once your request is approved, you will be able to access the Apideck list credit notes API and its features through the Worldindata platform.