Skip to Content
Docs
API referenceManagement API

Billing invoices

GET /v1/billing/invoices

GET
/billing/invoices

billing.invoice.v1.InvoiceService/ListInvoices (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Query Parameters

page?integer

Page number, from 1

limit?integer

Items per page, 1 to 100, default 25

customer_id?string

A cust_ id

contract_id?string

A ctr_ id

status?string

status

kind?string

kind

from?string

RFC 3339 time

to?string

RFC 3339 time

number?string

number

Response Body

A list of Invoice objects with pagination

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/invoices'
Example Response
{  "data": [    {      "id": "string",      "object": "string"    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
POST
/billing/invoices

billing.invoice.v1.InvoiceService/CreateInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices'
Example Response
{  "id": "string",  "object": "string"}
GET
/billing/invoices/upcoming

billing.invoice.v1.InvoiceService/GetUpcomingInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Query Parameters

contract_id?string

A ctr_ id

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/invoices/upcoming'
Example Response
{  "id": "string",  "object": "string"}
GET
/billing/invoices/{invoice_id}

billing.invoice.v1.InvoiceService/GetInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id_or_number

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/invoices/string'
Example Response
{  "id": "string",  "object": "string"}
PATCH
/billing/invoices/{invoice_id}

billing.invoice.v1.InvoiceService/UpdateInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/billing/invoices/string'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/invoices/{invoice_id}/finalize

billing.invoice.v1.InvoiceService/FinalizeInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices/string/finalize'
Example Response
{  "id": "string",  "object": "string"}
GET
/billing/invoices/{invoice_id}/lines

billing.invoice.v1.InvoiceService/ListInvoiceLines (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Query Parameters

page?integer

Page number, from 1

limit?integer

Items per page, 1 to 100, default 25

product_id?string

A product id

Response Body

A list of Line objects with pagination

application/json
  1. response
data?array<>
object?string
pagination?

Pagination is the page answered (api-route-review D9).

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/invoices/string/lines'
Example Response
{  "data": [    {      "id": "string",      "object": "string"    }  ],  "object": "string",  "pagination": {    "limit": 0,    "page": 0,    "total": 0,    "total_pages": 0  }}
POST
/billing/invoices/{invoice_id}/mark-uncollectible

billing.invoice.v1.InvoiceService/MarkInvoiceUncollectible (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices/string/mark-uncollectible'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/invoices/{invoice_id}/pay

billing.invoice.v1.InvoiceService/PayInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices/string/pay'
Example Response
{  "id": "string",  "object": "string"}
GET
/billing/invoices/{invoice_id}/pdf

billing.invoice.v1.InvoiceService/GetInvoicePdf (37-invoicing.md, API Surface; The document). The invoice's PDF as a download, not an envelope: Content-Type application/pdf and Content-Disposition attachment with the file name billing-svc gives, {number}.pdf. A voided invoice's is the VOID rendition (billing-svc docs/questions.md, X158); a draft has none (not_found). locale is not read until documents are localized.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Query Parameters

locale?string

locale

Response Body

The PDF

response?file
Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/invoices/string/pdf'
Example Response
null
POST
/billing/invoices/{invoice_id}/recompute

billing.invoice.v1.InvoiceService/RecomputeInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices/string/recompute'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/invoices/{invoice_id}/send

billing.invoice.v1.InvoiceService/SendInvoice (37-invoicing.md, API Surface; Emails). Sends the invoice issued email again, with its PDF, to the Customer's email as it is now, whatever the emails toggles say. A draft, held or void invoice is invoice_not_open (billing-svc docs/questions.md, X163). X-Idempotency-Key is passed through. The body takes no field.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

The Invoice object

application/json
  1. response
Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices/string/send'
Example Response
{}
GET
/billing/invoices/{invoice_id}/usage-detail

billing.invoice.v1.InvoiceService/GetInvoiceUsageCsv (37-invoicing.md, API Surface; The document). One row per rated usage line (billing-svc docs/questions.md, X157), as a download, not an envelope: Content-Type text/csv; charset=utf-8 and Content-Disposition attachment with the file name billing-svc gives, {number}-usage-detail.csv.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Response Body

The CSV

response?file
Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/invoices/string/usage-detail'
Example Response
null
POST
/billing/invoices/{invoice_id}/void

billing.invoice.v1.InvoiceService/VoidInvoice (37-invoicing.md, API Surface).

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

invoice_id*string

id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

A Invoice object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/invoices/string/void'
Example Response
{  "id": "string",  "object": "string"}