API & WebhooksDocuments

Documents

List and retrieve documents with financial details and recipient info.

Documents API

Read-only endpoints to list and retrieve documents (proposals, invoices, contracts, quotes). Requires an API token with documents.view ability. Financial amounts are returned in the smallest currency unit (e.g., cents).


List Documents

GET /api/v1/documents — Permission: documents.view

Query Parameters

ParameterTypeRequiredDescription
typestringNoFilter by document type (e.g., invoice, proposal, contract, quote)
statusstringNoFilter by status (e.g., draft, sent, viewed, signed, paid)
searchstringNoSearch by document number or title
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/documents?type=invoice&status=sent&per_page=10" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 101,
      "type": "invoice",
      "number": "INV-0042",
      "title": "March Services",
      "reference": "PO-2025-001",
      "status": "sent",
      "recipient": {
        "type": "contact",
        "id": 1,
        "name": "Jane Doe"
      },
      "currency": "usd",
      "subtotal": 150000,
      "discount_amount": 0,
      "tax_amount": 15000,
      "total": 165000,
      "amount_paid": 0,
      "amount_due": 165000,
      "issued_at": "2025-03-15T00:00:00.000000Z",
      "due_at": "2025-04-14T00:00:00.000000Z",
      "sent_at": "2025-03-15T10:30:00.000000Z",
      "viewed_at": null,
      "signed_at": null,
      "paid_at": null,
      "created_at": "2025-03-14T09:00:00.000000Z",
      "updated_at": "2025-03-15T10:30:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 10, "total": 1 },
  "links": { "first": "...", "last": "...", "prev": null, "next": null }
}

Get Document

GET /api/v1/documents/{id} — Permission: documents.view

Retrieve a single document with its recipient details and financial summary.

Example Request

curl -X GET "https://your-domain.com/api/v1/documents/101" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Returns the same shape as a single item in the list response.

Financial Fields

FieldTypeDescription
subtotalintegerSum of line items before discounts and tax (in cents)
discount_amountintegerTotal discount applied (in cents)
tax_amountintegerTotal tax applied (in cents)
totalintegerFinal total after discounts and tax (in cents)
amount_paidintegerTotal amount paid so far (in cents)
amount_dueintegerRemaining balance (in cents)

Was this article helpful?