Invoices API

Get access to your invoices data through Cloudbox's v1 API.

Retrieving Invoices

Sales invoices with lines.

Use GET /api/v1/invoices to page through every record in your organization, or GET /api/v1/invoices/{id} to fetch a single record with its related data. The id is a UUID, and a 404 means it doesn't exist in your organization.

API Endpoint

GET
/api/v1/invoices
GET
/api/v1/invoices/{id}

Required Headers

Every request must include the following:

Header Key
Description
org-api-key
Your Organization API key. Contact Cloudbox Support For Access: support@cloudboxapp.com.
user-api-key
Your User API Key

Requests missing either header will return 401 Unauthorized

Example Request

bash curl -X GET "https://app.cloudboxapp.com/api/v1/invoices?limit=100" \ -H "org-api-key: YOUR_ORG_API_KEY" \ -H "user-api-key: YOUR_USER_API_KEY" \ -H "Accept: application/json"

Response Schema

Column
Type
Description
id
string (uuid)
Unique ID
invoice_number
string
Filterable (exact)
status
string
Filterable (exact)
date
string (YYYY-MM-DD)
Sortable
due_date
string (YYYY-MM-DD), nullable
Sortable
sales_order_id
string (uuid), nullable
References SalesOrders. Filterable (exact)
customer_account_id
string (uuid), nullable
References CustomerAccounts. Filterable (exact)
customer_location_id
string (uuid), nullable
References CustomerLocations
customer_contact_id
integer, nullable
References CustomerContacts
description
string, nullable
subtotal
number
document_discounts
number
tax_total
number
freight_total
number
invoice_total
number
paid_amount
number
balance_due
number
payment_terms
string, nullable
payment_method
string, nullable
hosted_invoice_url
string, nullable
integration_ref
string, nullable
created_at
string (ISO 8601)
Creation timestamp (UTC). Sortable
updated_at
string (ISO 8601), nullable
Last update timestamp (UTC). Sortable
customer
object
Detail endpoint only. Related record: id, name, account_code
lines
array of objects
Detail endpoint only. Related records: id, line_number, sales_order_line_id, sku_id, product_id, line_description, uom, quantity, unit_price, discount_percent, disc_unit_price, amount

Filters

limitPage size (default 100, max 1000)
offsetNumber of records to skip (default 0)
sortOne of: date, due_date, created_at, updated_at
orderasc | desc
statusInvoice status
customer_account_idInvoices for this customer
sales_order_idInvoices for this sales order
invoice_numberExact invoice number match
date_fromInvoice date on or after (YYYY-MM-DD)
date_toInvoice date on or before (YYYY-MM-DD)
updated_sinceOnly records updated at or after this ISO 8601 timestamp
default sortcreated_at descending

Errors

Cloudbox uses standard HTTP status codes to indicate API success or failure:

  • 200–299 – Request succeeded
  • 400 – Bad request (missing parameters, invalid values)
  • 401 – Unauthorized (missing or invalid API keys)
  • 404 – Resource not found
  • 429 – Too many requests (rate limited)