Skip to content

API reference / RivetMSP

Invoices

GET /invoices Bearer token or API key

List invoices (paged)

Parameters

NameInTypeDescription
pagequeryinteger
limitqueryinteger
client_idqueryinteger
statusquerystring

Example request

curl "https://YOUR-HOST/api/v1/invoices" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/invoices",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/invoices", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/invoices");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Paged invoice list

FieldTypeDescription
data array of object
data[].id integer
data[].number string
data[].date string
data[].due_date string
data[].status string
data[].total number
data[].client string
data[].guest_url string
total integer
Example response
json
{
    "data": [
        {
            "id": 1,
            "number": "string",
            "date": "string",
            "due_date": "string",
            "status": "string",
            "total": 1.5,
            "client": "string",
            "guest_url": "string"
        }
    ],
    "total": 1
}

403Authenticated but not permitted

FieldTypeDescription
error string
GET /invoices/{id} Bearer token or API key

Invoice detail with line items

Parameters

NameInTypeDescription
idrequiredpathinteger

Example request

curl "https://YOUR-HOST/api/v1/invoices/1" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/invoices/1",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/invoices/1", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/invoices/1");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Invoice detail

FieldTypeDescription
id integer
number string
date string
due_date string
status string
total number
client string
guest_url string
subtotal number
tax number
notes string
items array of object
items[].description string
items[].quantity number
items[].unit_price number
items[].total number
items[].taxable boolean
Example response
json
{
    "id": 1,
    "number": "string",
    "date": "string",
    "due_date": "string",
    "status": "string",
    "total": 1.5,
    "client": "string",
    "guest_url": "string",
    "subtotal": 1.5,
    "tax": 1.5,
    "notes": "string",
    "items": [
        {
            "description": "string",
            "quantity": 1.5,
            "unit_price": 1.5,
            "total": 1.5,
            "taxable": true
        }
    ]
}

404Resource not found

FieldTypeDescription
error string