# Organization API: Billing & Payouts: Invoices

> The 3 Organization API operations for invoices.

Source: https://www.coritan.com/docs/api/reference/organizations/billing-payouts/invoices/

Part of [Billing & Payouts](/docs/api/reference/organizations/billing-payouts/).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/orgs/{org_slug}/invoices`](#op-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}`](#op-get-api-v1-orgs-org-slug-invoices-invoice-id) | Get invoice |
| POST | [`/api/v1/orgs/{org_slug}/invoices/{invoice_id}/mark-paid`](#op-post-api-v1-orgs-org-slug-invoices-invoice-id-mark-paid) | Mark invoice paid |

### The org's invoices, newest first, each naming its customer {#op-get-api-v1-orgs-org-slug-invoices}

`GET /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

| 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

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get invoice {#op-get-api-v1-orgs-org-slug-invoices-invoice-id}

`GET /api/v1/orgs/{org_slug}/invoices/{invoice_id}`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `invoice_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### 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 {#op-post-api-v1-orgs-org-slug-invoices-invoice-id-mark-paid}

`POST /api/v1/orgs/{org_slug}/invoices/{invoice_id}/mark-paid`

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `invoice_id` | path | integer | yes |
| `org_slug` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
