QA fixture. Ledgerwell is a made-up accounting product used to test integrations. All data is synthetic.
Send your API token on every request: Authorization: Bearer <token>. There is no OAuth sign-in. Requests without a valid token get 401.
All endpoints are under /api/v1 and send and receive JSON. Amounts are decimal numbers in the currency's major unit (12.50 means twelve and a half). Dates are YYYY-MM-DD.
The organisation the token belongs to: {"organisation":{"id":"org-1","name":"..."}}. Use it to check a token.
Contacts whose name contains the text (case-insensitive): {"data":{"contacts":[{"id":"con-101","name":"...","reference":"..."}]}}
Body {"name":"string (required)","reference":"string (optional, your own id for the contact)"}. Returns 201 {"data":{"contact":{"id":"con-102","name":"...","reference":"..."}}}.
Invoices with exactly that number: {"data":{"invoices":[{"id":"inv-103","number":"...","total":0,"currency":"USD","status":"open"}]}}. An empty list when there is none.
{
"number": "string (required, must be unique)",
"contact_id": "string (required, a contact id)",
"currency": "string, ISO 4217 (required)",
"issue_date": "YYYY-MM-DD (required)",
"due_date": "YYYY-MM-DD (optional)",
"total": 0.00, // number (required): the invoice total including tax
"idempotency_key": "string (optional): a repeated key returns the first invoice instead of creating another",
"lines": [ // at least one
{ "description": "string (required)", "quantity": 1, "unit_price": 0.00,
"account_code": "string (required, the sales account)", "tax_code": "string (optional)" }
]
}
Returns 201 {"data":{"invoice":{"id":"inv-104","number":"...","total":0.00,"currency":"USD","status":"open"}}}. A duplicate number gets 409; a missing field gets 422 with {"error":"..."}.
{"data":{"invoice":{"id":"...","number":"...","total":0.00,"currency":"USD","status":"open | paid | void"}}}. An invoice is paid when status is paid.
Voids an open invoice (status becomes void). Returns 200. A paid invoice cannot be voided (409).
Same shape as invoices, under data.credit_notes.
Same body as an invoice (number, contact_id, currency, issue_date, total, lines, idempotency_key), plus optional "invoice_id" for the invoice it credits. Returns 201 {"data":{"credit_note":{"id":"crn-105","number":"...","total":0.00,"currency":"USD","status":"open"}}}.
{"data":{"credit_note":{"id":"...","number":"...","total":0.00,"currency":"USD","status":"open | void"}}}
Reverses a credit note (status becomes void). No body. Returns 200.