Skip to main content
GET
/
api
/
reports
/
vendor-balance-summary
Get vendor balance summary
curl --request GET \
  --url https://api.example.com/api/reports/vendor-balance-summary \
  --header 'Authorization: <authorization>' \
  --header 'accept: <accept>' \
  --header 'organization-id: <organization-id>'
{
  "query": {
    "asDate": "<string>",
    "numberFormat": {
      "precision": 2,
      "divideOn1000": false,
      "showZero": true,
      "formatMoney": "total",
      "negativeFormat": "parentheses"
    },
    "vendorsIds": [
      123
    ],
    "noneZero": true,
    "noneInactive": true
  },
  "data": [
    {
      "vendorId": 123,
      "vendorName": "<string>",
      "closingBalance": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "openingBalance": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "totalDebit": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      },
      "totalCredit": {
        "amount": 123,
        "formattedAmount": "<string>",
        "currencyCode": "<string>",
        "date": {}
      }
    }
  ],
  "meta": {
    "organizationName": "<string>",
    "baseCurrency": "<string>",
    "dateFormat": "<string>",
    "isCostComputeRunning": true,
    "sheetName": "<string>",
    "formattedAsDate": "<string>",
    "formattedDateRange": "<string>"
  }
}

Headers

Authorization
string
required

Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

accept
string
required

Query Parameters

asDate
string

The date as of which the balance summary is calculated

Example:

"2024-01-01"

precision
number

Number of decimal places to display

Example:

2

divideOn1000
boolean

Whether to divide the number by 1000

Example:

false

showZero
boolean

Whether to show zero values

Example:

true

formatMoney
enum<string>

How to format money values

Available options:
total,
always,
none
Example:

"total"

negativeFormat
enum<string>

How to format negative numbers

Available options:
parentheses,
mines
Example:

"parentheses"

percentageColumn
boolean
default:false

Whether to show the percentage column in the summary

Example:

false

noneTransactions
boolean
default:false

Whether to exclude contacts with no transactions

Example:

false

noneZero
boolean
default:false

Whether to exclude contacts with zero balance

Example:

false

vendorsIds
number[]

Array of vendor IDs to filter the summary

Example:
[1, 2, 3]

Response

Vendor balance summary

query
object
required

Query parameters used to generate the report

data
object[]
required

Vendor balances

meta
object
required

Report metadata