Organization API: Billing & Payouts: Invoices
The 3 Organization API operations for invoices.
Part of Billing & Payouts.
Operations
Section titled Operations| Method | Path | Summary |
|---|---|---|
| GET | /api/v1/orgs/{org_slug}/invoices |
The org's invoices, newest first, each naming its customer |
| GET | /api/v1/orgs/{org_slug}/invoices/{invoice_id} |
Get invoice |
| POST | /api/v1/orgs/{org_slug}/invoices/{invoice_id}/mark-paid |
Mark invoice paid |
The org's invoices, newest first, each naming its customer
Section titled The org's invoices, newest first, each naming its customerGET /api/v1/orgs/{org_slug}/invoices
The org's invoices, newest first, each naming its customer.
status_filter=open is unpaid or overdue. with_total=true answers
{items, total, limit, offset, counts, outstanding} instead of a bare
list: counts per status ignore the status filter (they are the tab's
pills) and outstanding is what every open invoice owes per currency,
both under the customer filter.
Parameters
Section titled Parameters| Name | In | Type | Required | Description |
|---|---|---|---|---|
org_slug |
path | string | yes | |
customer_id |
query | integer | no | |
status_filter |
query | string | no | |
limit |
query | integer | no | Default: 50. |
offset |
query | integer | no | Default: 0. |
with_total |
query | boolean | no | Default: False. |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Get invoice
Section titled Get invoiceGET /api/v1/orgs/{org_slug}/invoices/{invoice_id}
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
invoice_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |
Fields of a 200 response:
| Field | Type |
|---|---|
id |
integer |
org_id |
integer |
customer_id |
integer |
invoice_number |
string |
subtotal |
string |
tax |
string |
total |
string |
amount_paid |
string |
currency |
string |
status |
string |
due_date |
string (date-time) or null |
paid_at |
string (date-time) or null |
notes |
string or null |
created_at |
string (date-time) or null |
customer_name |
string or null |
customer_email |
string or null |
items |
array of OrgInvoiceItemResponse |
items[].id |
integer |
items[].invoice_id |
integer |
items[].org_service_id |
integer or null |
items[].description |
string |
items[].item_type |
string |
items[].quantity |
string |
items[].unit_price |
string |
items[].total |
string |
Mark invoice paid
Section titled Mark invoice paidPOST /api/v1/orgs/{org_slug}/invoices/{invoice_id}/mark-paid
Parameters
Section titled Parameters| Name | In | Type | Required |
|---|---|---|---|
invoice_id |
path | integer | yes |
org_slug |
path | string | yes |
Responses
Section titled Responses| Status | Meaning |
|---|---|
200 |
Success. |
422 |
The request is not valid. detail lists each problem. |