Expensicat
API Reference

Invoices

GET
/v1/invoices/{id}/payments

Returns the payments applied to the invoice and its refunds, each with how the money arrived: recorded by hand, a bank transaction, a connected provider, or the invoice pay link. id is the payment. Amounts are exact decimal strings applied to this invoice; negative amounts are refunds.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",      "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",      "amount": "string",      "currency": "string",      "paid_on": "string",      "method": "card",      "reference": "string",      "origin": "manual",      "source": {        "name": "string",        "account": "string",        "id": "string"      },      "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",      "refund_of": "87028a18-6ad1-40ca-9b02-bf554e69c7bc",      "actor_id": "string",      "action_id": "52d6fa12-2c88-46da-984a-4cc821c7837a",      "created_at": "string",      "refundable_amount": "string",      "can_remove": true    }  ]}
POST
/v1/invoices/{id}/payments

Records money already received or returned by hand; does not initiate a transfer. Send an Idempotency-Key header or idempotency_key for retries. A refund supplies positive amounts, each with refund_of pointing to a payment on this invoice.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string
Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments" \  -H "Content-Type: application/json" \  -d '{    "currency": "string",    "paid_on": "2019-08-24",    "method": "card",    "kind": "payment",    "amount": "string"  }'
{  "data": {    "outcome": "recorded",    "payments": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",        "amount": "string",        "currency": "string",        "paid_on": "string",        "method": "card",        "reference": "string",        "origin": "manual",        "source": {          "name": "string",          "account": "string",          "id": "string"        },        "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",        "refund_of": "87028a18-6ad1-40ca-9b02-bf554e69c7bc",        "actor_id": "string",        "action_id": "52d6fa12-2c88-46da-984a-4cc821c7837a",        "created_at": "string",        "refundable_amount": "string",        "can_remove": true      }    ],    "invoices": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "amount_due": "string",        "status": "draft",        "paid_at": "string",        "can_collect": true,        "settlement": {          "paid": "string",          "refunded": "string",          "credited": "string",          "refund_owed": "string",          "collectible": "string",          "state": "unissued"        }      }    ]  }}
GET
/v1/invoices/{id}/payments/pending

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments/pending"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "amount": "string",      "currency": "string",      "occurred_on": "string",      "kind": "payment",      "can_resolve_without_credit": true,      "reason": "customer_ambiguous"    }  ]}
POST
/v1/invoices/{id}/payments/pending/{pending_id}/resolve

Records a received provider payment on the invoice, attaches it to an existing payment recorded by hand (payment_id), or pairs its refund with an issued credit note. distinct confirms the money is a separate payment. Amount, currency, and date come from what the provider reported. Changing bank-backed payments also requires transaction read and write permissions. This endpoint never initiates a transfer.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
Formatuuid
pending_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments/pending/497f6eca-6276-4993-bfeb-53cbbbba6f08/resolve" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "outcome": "recorded",    "payments": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",        "amount": "string",        "currency": "string",        "paid_on": "string",        "method": "card",        "reference": "string",        "origin": "manual",        "source": {          "name": "string",          "account": "string",          "id": "string"        },        "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",        "refund_of": "87028a18-6ad1-40ca-9b02-bf554e69c7bc",        "actor_id": "string",        "action_id": "52d6fa12-2c88-46da-984a-4cc821c7837a",        "created_at": "string",        "refundable_amount": "string",        "can_remove": true      }    ],    "invoices": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "amount_due": "string",        "status": "draft",        "paid_at": "string",        "can_collect": true,        "settlement": {          "paid": "string",          "refunded": "string",          "credited": "string",          "refund_owed": "string",          "collectible": "string",          "state": "unissued"        }      }    ]  }}
PATCH
/v1/invoices/{id}/payments/{payment_id}

Identifies a bank transaction as a payment recorded by hand, so the money is counted once and uses the transaction. The payment date follows the transaction.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
Formatuuid
payment_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482"  }'
{  "data": {    "outcome": "recorded",    "payments": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",        "amount": "string",        "currency": "string",        "paid_on": "string",        "method": "card",        "reference": "string",        "origin": "manual",        "source": {          "name": "string",          "account": "string",          "id": "string"        },        "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",        "refund_of": "87028a18-6ad1-40ca-9b02-bf554e69c7bc",        "actor_id": "string",        "action_id": "52d6fa12-2c88-46da-984a-4cc821c7837a",        "created_at": "string",        "refundable_amount": "string",        "can_remove": true      }    ],    "invoices": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "amount_due": "string",        "status": "draft",        "paid_at": "string",        "can_collect": true,        "settlement": {          "paid": "string",          "refunded": "string",          "credited": "string",          "refund_owed": "string",          "collectible": "string",          "state": "unissued"        }      }    ]  }}
DELETE
/v1/invoices/{id}/payments/{payment_id}

Removes one payment and recomputes the invoice; the invoice history keeps the removal and its reason. Payments a provider reported and payments with refunds cannot be removed. Removing a bank-backed payment also requires transaction read and write permissions. Does not return money.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
Formatuuid
payment_id*string
Formatuuid

Query Parameters

reason*string
Length3 <= length <= 1000

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/invoices/497f6eca-6276-4993-bfeb-53cbbbba6f08/payments/497f6eca-6276-4993-bfeb-53cbbbba6f08?reason=string"
{  "data": {    "outcome": "recorded",    "payments": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",        "amount": "string",        "currency": "string",        "paid_on": "string",        "method": "card",        "reference": "string",        "origin": "manual",        "source": {          "name": "string",          "account": "string",          "id": "string"        },        "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",        "refund_of": "87028a18-6ad1-40ca-9b02-bf554e69c7bc",        "actor_id": "string",        "action_id": "52d6fa12-2c88-46da-984a-4cc821c7837a",        "created_at": "string",        "refundable_amount": "string",        "can_remove": true      }    ],    "invoices": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "amount_due": "string",        "status": "draft",        "paid_at": "string",        "can_collect": true,        "settlement": {          "paid": "string",          "refunded": "string",          "credited": "string",          "refund_owed": "string",          "collectible": "string",          "state": "unissued"        }      }    ]  }}
GET
/v1/invoices/payments/transactions

Select payment for incoming money or refund for outgoing money. available_amount is the unsigned amount invoice payments can still use.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Query Parameters

currency*string
Match^[A-Z]{3}$
search?string
Lengthlength <= 500
cursor?string
Formatuuid
direction?string
Default"payment"

Value in

  • "payment"
  • "refund"

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/payments/transactions?currency=string"
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "description": "string",      "booking_date": "string",      "currency": "string",      "amount": "string",      "available_amount": "string"    }  ],  "next_cursor": "string"}
POST
/v1/invoices/payments/allocate

Records explicit same-currency payments from one incoming bank transaction without exceeding it. Every line is committed together or none is. distinct confirms the money is not a payment already recorded on an invoice it would overpay. Does not infer a match from amount or customer name.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/payments/allocate" \  -H "Content-Type: application/json" \  -d '{    "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",    "currency": "string",    "paid_on": "2019-08-24",    "lines": [      {        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",        "amount": "string"      }    ]  }'
{  "data": {    "outcome": "recorded",    "payments": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",        "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",        "amount": "string",        "currency": "string",        "paid_on": "string",        "method": "card",        "reference": "string",        "origin": "manual",        "source": {          "name": "string",          "account": "string",          "id": "string"        },        "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",        "refund_of": "87028a18-6ad1-40ca-9b02-bf554e69c7bc",        "actor_id": "string",        "action_id": "52d6fa12-2c88-46da-984a-4cc821c7837a",        "created_at": "string",        "refundable_amount": "string",        "can_remove": true      }    ],    "invoices": [      {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "amount_due": "string",        "status": "draft",        "paid_at": "string",        "can_collect": true,        "settlement": {          "paid": "string",          "refunded": "string",          "credited": "string",          "refund_owed": "string",          "collectible": "string",          "state": "unissued"        }      }    ]  }}
GET
/v1/invoices

List invoices with filtering and pagination

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Query Parameters

cursor?string

Pagination cursor

limit?integer

Number of items per page (1-100; higher values cap at 100)

Range1 <= value
Default20
start_date?string

Start date (YYYY-MM-DD)

end_date?string

End date (YYYY-MM-DD)

total?string
total[eq]?string
total[neq]?string
total[gt]?string
total[gte]?string
total[lt]?string
total[lte]?string
total[in]?string
total[nin]?string
subtotal?string
subtotal[eq]?string
subtotal[neq]?string
subtotal[gt]?string
subtotal[gte]?string
subtotal[lt]?string
subtotal[lte]?string
subtotal[in]?string
subtotal[nin]?string
date?string
date[eq]?string
date[neq]?string
date[gt]?string
date[gte]?string
date[lt]?string
date[lte]?string
date[in]?string
date[nin]?string
due_date?string
due_date[eq]?string
due_date[neq]?string
due_date[gt]?string
due_date[gte]?string
due_date[lt]?string
due_date[lte]?string
due_date[in]?string
due_date[nin]?string
status?string

Filter by status

Value in

  • "draft"
  • "unpaid"
  • "paid"
  • "overdue"
  • "cancelled"
status[eq]?string
status[neq]?string
status[gt]?string
status[gte]?string
status[lt]?string
status[lte]?string
status[in]?string
status[nin]?string
customer_id?string
customer_id[eq]?string
customer_id[neq]?string
customer_id[gt]?string
customer_id[gte]?string
customer_id[lt]?string
customer_id[lte]?string
customer_id[in]?string
customer_id[nin]?string
q?string

Search query

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/invoices"
{  "data": [    {      "id": "string",      "organization_id": "string",      "customer_id": "string",      "number": "string",      "status": "draft",      "date": "string",      "due_date": "string",      "subtotal": "string",      "tax": "string",      "total": "string",      "amount_due": "string",      "settlement": {        "paid": "string",        "refunded": "string",        "credited": "string",        "refund_owed": "string",        "collectible": "string",        "state": "unissued"      },      "can_collect": true,      "has_amount_due": true,      "has_credit": true,      "from_details": "string",      "to_details": "string",      "items": [        {          "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",          "name": "string",          "quantity": "string",          "price": "string",          "unit": "string",          "tax_rate": "string",          "tax_behavior": "inclusive",          "amount": "string",          "tax_amount": "string",          "tax_category": "standard",          "tax_exemption_reason": "string",          "tax_exemption_reason_code": "string",          "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",          "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",          "kind": "goods",          "dispatched_from": "st",          "metadata": {            "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"          },          "ai": {            "description": "string",            "status": "pending"          }        }      ],      "payment_details": "string",      "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",      "notes": "string",      "created_at": "string",      "updated_at": "string",      "template": null,      "token": "string",      "reminder_sent_at": "string",      "paid_at": "string",      "reminder_sent_to": "string",      "viewed_at": "string",      "is_recurring_inflow": true,      "recurring_contract_id": "string",      "recurring_series_id": "string",      "scheduled_send_at": "string",      "document_type": "invoice",      "reference_invoice_id": "string",      "source_quote_id": "string",      "service_period_start": "string",      "service_period_end": "string",      "buyer_reference": "string",      "contract_reference": "string",      "purchase_order_reference": "string",      "tax_point_date": "string",      "tax_point_date_code": "3",      "project_reference": "string",      "tender_or_lot_reference": "string",      "invoiced_object_identifier": "string",      "invoiced_object_scheme": "string",      "buyer_accounting_reference": "string",      "delivery_date": "string",      "correction_reason": "string",      "country_extensions": {        "it": {          "regime_fiscale": "RF01",          "natura": "N1"        },        "pl": {          "annotations": {            "cash_method": true,            "self_invoicing": true,            "reverse_charge": true,            "split_payment": true          }        }      },      "external_invoice_id": "string",      "client_id": "string",      "metadata": {        "property1": null,        "property2": null      },      "currency": "string",      "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",      "downloads": {        "pdf": "string",        "ubl": "string",        "bundle": "string"      },      "customer": {        "id": "string",        "reference_id": "string",        "name": "string",        "email": "string",        "website": "string",        "vat_verification": {          "status": "verified",          "trader": {            "name": "string",            "address": "string"          },          "consultation_number": "WAPIAAAAZK2bF1rb",          "checked_at": "2026-10-28T12:00:00.000Z"        }      }    }  ],  "meta": {    "count": 0,    "next_cursor": "string"  }}
POST
/v1/invoices

Create a new invoice draft

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Header Parameters

idempotency-key?string

Optional idempotency key (sent as the Idempotency-Key header; case-insensitive). Reusing the same key with an identical body replays the original response; reusing it with a different body returns 409. Keys are retained for 24 hours.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "string",    "organization_id": "string",    "customer_id": "string",    "number": "string",    "status": "draft",    "date": "string",    "due_date": "string",    "subtotal": "string",    "tax": "string",    "total": "string",    "amount_due": "string",    "settlement": {      "paid": "string",      "refunded": "string",      "credited": "string",      "refund_owed": "string",      "collectible": "string",      "state": "unissued"    },    "can_collect": true,    "has_amount_due": true,    "has_credit": true,    "from_details": "string",    "to_details": "string",    "items": [      {        "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",        "name": "string",        "quantity": "string",        "price": "string",        "unit": "string",        "tax_rate": "string",        "tax_behavior": "inclusive",        "amount": "string",        "tax_amount": "string",        "tax_category": "standard",        "tax_exemption_reason": "string",        "tax_exemption_reason_code": "string",        "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",        "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",        "kind": "goods",        "dispatched_from": "st",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "ai": {          "description": "string",          "status": "pending"        }      }    ],    "payment_details": "string",    "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",    "notes": "string",    "created_at": "string",    "updated_at": "string",    "template": null,    "token": "string",    "reminder_sent_at": "string",    "paid_at": "string",    "reminder_sent_to": "string",    "viewed_at": "string",    "is_recurring_inflow": true,    "recurring_contract_id": "string",    "recurring_series_id": "string",    "scheduled_send_at": "string",    "document_type": "invoice",    "reference_invoice_id": "string",    "source_quote_id": "string",    "service_period_start": "string",    "service_period_end": "string",    "buyer_reference": "string",    "contract_reference": "string",    "purchase_order_reference": "string",    "tax_point_date": "string",    "tax_point_date_code": "3",    "project_reference": "string",    "tender_or_lot_reference": "string",    "invoiced_object_identifier": "string",    "invoiced_object_scheme": "string",    "buyer_accounting_reference": "string",    "delivery_date": "string",    "correction_reason": "string",    "country_extensions": {      "it": {        "regime_fiscale": "RF01",        "natura": "N1"      },      "pl": {        "annotations": {          "cash_method": true,          "self_invoicing": true,          "reverse_charge": true,          "split_payment": true        }      }    },    "external_invoice_id": "string",    "client_id": "string",    "metadata": {      "property1": null,      "property2": null    },    "currency": "string",    "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",    "downloads": {      "pdf": "string",      "ubl": "string",      "bundle": "string"    },    "customer": {      "id": "string",      "reference_id": "string",      "name": "string",      "email": "string",      "website": "string",      "vat_verification": {        "status": "verified",        "trader": {          "name": "string",          "address": "string"        },        "consultation_number": "WAPIAAAAZK2bF1rb",        "checked_at": "2026-10-28T12:00:00.000Z"      }    }  }}
GET
/v1/invoices/templates

List all invoice templates for the current organization

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/invoices/templates"
{  "data": [    {      "id": "string",      "name": "string",      "currency": "string",      "tax_rate": 0,      "tax_type": "string",      "invoice_number_prefix": "string",      "created_at": "string"    }  ]}
POST
/v1/invoices/templates

Create a new invoice template (document_template + invoice settings).

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/invoices/templates" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "data": {    "id": "string"  }}
POST
/v1/invoices/preview

Calculate a provider-ready invoice without creating an invoice, customer, token, idempotency reservation, or artifact.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "object": "invoice_preview",    "organization_id": "string",    "customer_id": "string",    "number": "string",    "status": "draft",    "date": "string",    "due_date": "string",    "subtotal": 0,    "tax": 0,    "total": 0,    "from_details": "string",    "to_details": "string",    "items": [      {        "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",        "name": "string",        "quantity": 0,        "price": 0,        "unit": "string",        "tax_rate": 0,        "tax_behavior": "inclusive",        "amount": 0,        "tax_amount": 0,        "tax_category": "standard",        "tax_exemption_reason": "string",        "tax_exemption_reason_code": "string",        "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",        "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",        "kind": "goods",        "dispatched_from": "st",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        }      }    ],    "payment_details": "string",    "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",    "notes": "string",    "template": null,    "template_id": "string",    "paid_at": "string",    "recurring_series_id": "string",    "scheduled_send_at": "string",    "document_type": "invoice",    "service_period_start": "string",    "service_period_end": "string",    "buyer_reference": "string",    "contract_reference": "string",    "purchase_order_reference": "string",    "tax_point_date": "string",    "tax_point_date_code": "3",    "project_reference": "string",    "tender_or_lot_reference": "string",    "invoiced_object_identifier": "string",    "invoiced_object_scheme": "string",    "buyer_accounting_reference": "string",    "delivery_date": "string",    "country_extensions": {      "it": {        "regime_fiscale": "RF01",        "natura": "N1"      },      "pl": {        "annotations": {          "cash_method": true,          "self_invoicing": true,          "reverse_charge": true,          "split_payment": true        }      }    },    "external_invoice_id": "string",    "client_id": "string",    "metadata": {      "property1": null,      "property2": null    },    "customer": {      "id": "string",      "reference_id": "string",      "name": "string",      "email": "string",      "website": "string"    }  }}
GET
/v1/invoices/{id}

Get a single invoice by ID, with its fiscal record when one exists

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/string"
{  "data": {    "id": "string",    "organization_id": "string",    "customer_id": "string",    "number": "string",    "status": "draft",    "date": "string",    "due_date": "string",    "subtotal": "string",    "tax": "string",    "total": "string",    "amount_due": "string",    "settlement": {      "paid": "string",      "refunded": "string",      "credited": "string",      "refund_owed": "string",      "collectible": "string",      "state": "unissued"    },    "can_collect": true,    "has_amount_due": true,    "has_credit": true,    "from_details": "string",    "to_details": "string",    "items": [      {        "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",        "name": "string",        "quantity": "string",        "price": "string",        "unit": "string",        "tax_rate": "string",        "tax_behavior": "inclusive",        "amount": "string",        "tax_amount": "string",        "tax_category": "standard",        "tax_exemption_reason": "string",        "tax_exemption_reason_code": "string",        "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",        "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",        "kind": "goods",        "dispatched_from": "st",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "ai": {          "description": "string",          "status": "pending"        }      }    ],    "payment_details": "string",    "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",    "notes": "string",    "created_at": "string",    "updated_at": "string",    "template": null,    "token": "string",    "reminder_sent_at": "string",    "paid_at": "string",    "reminder_sent_to": "string",    "viewed_at": "string",    "is_recurring_inflow": true,    "recurring_contract_id": "string",    "recurring_series_id": "string",    "scheduled_send_at": "string",    "document_type": "invoice",    "reference_invoice_id": "string",    "source_quote_id": "string",    "service_period_start": "string",    "service_period_end": "string",    "buyer_reference": "string",    "contract_reference": "string",    "purchase_order_reference": "string",    "tax_point_date": "string",    "tax_point_date_code": "3",    "project_reference": "string",    "tender_or_lot_reference": "string",    "invoiced_object_identifier": "string",    "invoiced_object_scheme": "string",    "buyer_accounting_reference": "string",    "delivery_date": "string",    "correction_reason": "string",    "country_extensions": {      "it": {        "regime_fiscale": "RF01",        "natura": "N1"      },      "pl": {        "annotations": {          "cash_method": true,          "self_invoicing": true,          "reverse_charge": true,          "split_payment": true        }      }    },    "external_invoice_id": "string",    "client_id": "string",    "metadata": {      "property1": null,      "property2": null    },    "currency": "string",    "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",    "downloads": {      "pdf": "string",      "ubl": "string",      "bundle": "string"    },    "customer": {      "id": "string",      "reference_id": "string",      "name": "string",      "email": "string",      "website": "string",      "vat_verification": {        "status": "verified",        "trader": {          "name": "string",          "address": "string"        },        "consultation_number": "WAPIAAAAZK2bF1rb",        "checked_at": "2026-10-28T12:00:00.000Z"      }    },    "fiscal": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "schema_version": "string",      "engine_version": "string",      "effective_date": "string",      "digest": "string",      "rule_packs": [        {          "id": "string",          "version": "string"        }      ],      "correction": null,      "preceding_documents": null,      "artifacts": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",          "transmission_id": "da08139c-7a56-4672-93e2-85353adf4d76",          "role": "canonical",          "format": "string",          "variant": "string",          "profile": "string",          "adapter_id": "string",          "adapter_version": "string",          "context": {            "property1": null,            "property2": null          },          "metadata": {            "property1": null,            "property2": null          },          "inputs": [            {              "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12",              "purpose": "string"            }          ],          "validation": {            "validator_id": "string",            "validator_version": "string",            "valid": true,            "diagnostics": [              {                "property1": null,                "property2": null              }            ],            "validated_at": "string"          },          "content_hash": "string",          "size_bytes": 0,          "mime_type": "string",          "created_at": "string",          "download_url": "string"        }      ],      "artifact_inputs": [        {          "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12",          "input_artifact_id": "a4134709-460b-44b6-99b2-2d637f889159",          "purpose": "string"        }      ],      "validations": [        {          "validator_id": "string",          "validator_version": "string",          "valid": true,          "diagnostics": [            {              "property1": null,              "property2": null            }          ],          "validated_at": "string",          "artifact_id": "b7bd6bbb-c7f1-4314-8742-2aeeeece9d12"        }      ],      "transmissions": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "invoice_id": "f4c4edb8-11e0-4b33-bcc1-482dc59ebb32",          "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",          "channel": "string",          "format": "string",          "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",          "connection_id": "d3547de1-d1f2-4344-b4c2-17169b7526f9",          "wire_artifact_id": "1133c6f0-26f2-43cb-b468-a2b54c2ebfc8",          "environment": "string",          "notification": "string",          "gateway_provider": "string",          "gateway_document_id": "string",          "attempt": 0,          "idempotency_key": "string",          "payload_hash": "string",          "next_retry_at": "string",          "legal_deadline_at": "string",          "tax_authority_id": "string",          "tax_authority_status": "string",          "tax_authority_status_at": "string",          "submitted_at": "string",          "delivered_at": "string",          "failed_at": "string",          "failure_reason": "string",          "created_at": "string",          "updated_at": "string",          "state": "string",          "events": [            {              "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",              "transmission_id": "da08139c-7a56-4672-93e2-85353adf4d76",              "type": "string",              "state": "string",              "provider_status_code": "string",              "provider_document_id": "string",              "authority_document_id": "string",              "metadata": {                "property1": null,                "property2": null              },              "receipt_artifact_id": "fc620f8e-020b-4e5c-8b39-e38502aefdab",              "occurred_at": "string",              "created_at": "string"            }          ]        }      ]    }  }}
PATCH
/v1/invoices/{id}

Update invoice fields. On a draft, items replaces every line, the way create sets them: the tax engine decides each line's tax, and subtotal, tax and total come from the lines. Send every line to keep, the ones already there included. paid records the amount due as a payment received on paid_at; unpaid only removes a single payment recorded by hand. Use the payments endpoints for explicit payment history.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/invoices/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "data": {    "id": "string",    "organization_id": "string",    "customer_id": "string",    "number": "string",    "status": "draft",    "date": "string",    "due_date": "string",    "subtotal": "string",    "tax": "string",    "total": "string",    "amount_due": "string",    "settlement": {      "paid": "string",      "refunded": "string",      "credited": "string",      "refund_owed": "string",      "collectible": "string",      "state": "unissued"    },    "can_collect": true,    "has_amount_due": true,    "has_credit": true,    "from_details": "string",    "to_details": "string",    "items": [      {        "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",        "name": "string",        "quantity": "string",        "price": "string",        "unit": "string",        "tax_rate": "string",        "tax_behavior": "inclusive",        "amount": "string",        "tax_amount": "string",        "tax_category": "standard",        "tax_exemption_reason": "string",        "tax_exemption_reason_code": "string",        "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",        "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",        "kind": "goods",        "dispatched_from": "st",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "ai": {          "description": "string",          "status": "pending"        }      }    ],    "payment_details": "string",    "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",    "notes": "string",    "created_at": "string",    "updated_at": "string",    "template": null,    "token": "string",    "reminder_sent_at": "string",    "paid_at": "string",    "reminder_sent_to": "string",    "viewed_at": "string",    "is_recurring_inflow": true,    "recurring_contract_id": "string",    "recurring_series_id": "string",    "scheduled_send_at": "string",    "document_type": "invoice",    "reference_invoice_id": "string",    "source_quote_id": "string",    "service_period_start": "string",    "service_period_end": "string",    "buyer_reference": "string",    "contract_reference": "string",    "purchase_order_reference": "string",    "tax_point_date": "string",    "tax_point_date_code": "3",    "project_reference": "string",    "tender_or_lot_reference": "string",    "invoiced_object_identifier": "string",    "invoiced_object_scheme": "string",    "buyer_accounting_reference": "string",    "delivery_date": "string",    "correction_reason": "string",    "country_extensions": {      "it": {        "regime_fiscale": "RF01",        "natura": "N1"      },      "pl": {        "annotations": {          "cash_method": true,          "self_invoicing": true,          "reverse_charge": true,          "split_payment": true        }      }    },    "external_invoice_id": "string",    "client_id": "string",    "metadata": {      "property1": null,      "property2": null    },    "currency": "string",    "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",    "downloads": {      "pdf": "string",      "ubl": "string",      "bundle": "string"    },    "customer": {      "id": "string",      "reference_id": "string",      "name": "string",      "email": "string",      "website": "string",      "vat_verification": {        "status": "verified",        "trader": {          "name": "string",          "address": "string"        },        "consultation_number": "WAPIAAAAZK2bF1rb",        "checked_at": "2026-10-28T12:00:00.000Z"      }    }  }}
DELETE
/v1/invoices/{id}

Delete a non-finalized draft or cancelled invoice by ID. Finalized fiscal records must be retained.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/invoices/string"
Empty
GET
/v1/invoices/{id}/download

Download issued invoice artifacts as PDF, UBL XML, or ZIP, or a watermarked review PDF of a draft. A 202 means the PDF exists but is not ready yet: wait for the invoices.presentation_ready realtime event matching preview, or retry after the Retry-After seconds. A 409 means the draft cannot be rendered as it stands.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Query Parameters

format?string
Default"pdf"

Value in

  • "pdf"
  • "ubl"
  • "pdf+ubl"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/string/download"
"string"
GET
/v1/invoices/{id}/artifacts/{artifactId}

Download a verified canonical, wire, receipt, or validation artifact.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
artifactId*string
Formatuuid

Response Body

*/*

application/json

application/json

curl -X GET "https://example.com/v1/invoices/string/artifacts/497f6eca-6276-4993-bfeb-53cbbbba6f08"
"string"
POST
/v1/invoices/{id}/finalize

Finalize a draft invoice — freezes the business / template snapshot, allocates a gap-free number from the document sequence, and transitions status from draft to unpaid.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/string/finalize"
{  "data": {    "id": "string",    "organization_id": "string",    "customer_id": "string",    "number": "string",    "status": "draft",    "date": "string",    "due_date": "string",    "subtotal": "string",    "tax": "string",    "total": "string",    "amount_due": "string",    "settlement": {      "paid": "string",      "refunded": "string",      "credited": "string",      "refund_owed": "string",      "collectible": "string",      "state": "unissued"    },    "can_collect": true,    "has_amount_due": true,    "has_credit": true,    "from_details": "string",    "to_details": "string",    "items": [      {        "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",        "name": "string",        "quantity": "string",        "price": "string",        "unit": "string",        "tax_rate": "string",        "tax_behavior": "inclusive",        "amount": "string",        "tax_amount": "string",        "tax_category": "standard",        "tax_exemption_reason": "string",        "tax_exemption_reason_code": "string",        "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",        "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",        "kind": "goods",        "dispatched_from": "st",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "ai": {          "description": "string",          "status": "pending"        }      }    ],    "payment_details": "string",    "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",    "notes": "string",    "created_at": "string",    "updated_at": "string",    "template": null,    "token": "string",    "reminder_sent_at": "string",    "paid_at": "string",    "reminder_sent_to": "string",    "viewed_at": "string",    "is_recurring_inflow": true,    "recurring_contract_id": "string",    "recurring_series_id": "string",    "scheduled_send_at": "string",    "document_type": "invoice",    "reference_invoice_id": "string",    "source_quote_id": "string",    "service_period_start": "string",    "service_period_end": "string",    "buyer_reference": "string",    "contract_reference": "string",    "purchase_order_reference": "string",    "tax_point_date": "string",    "tax_point_date_code": "3",    "project_reference": "string",    "tender_or_lot_reference": "string",    "invoiced_object_identifier": "string",    "invoiced_object_scheme": "string",    "buyer_accounting_reference": "string",    "delivery_date": "string",    "correction_reason": "string",    "country_extensions": {      "it": {        "regime_fiscale": "RF01",        "natura": "N1"      },      "pl": {        "annotations": {          "cash_method": true,          "self_invoicing": true,          "reverse_charge": true,          "split_payment": true        }      }    },    "external_invoice_id": "string",    "client_id": "string",    "metadata": {      "property1": null,      "property2": null    },    "currency": "string",    "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",    "downloads": {      "pdf": "string",      "ubl": "string",      "bundle": "string"    },    "customer": {      "id": "string",      "reference_id": "string",      "name": "string",      "email": "string",      "website": "string",      "vat_verification": {        "status": "verified",        "trader": {          "name": "string",          "address": "string"        },        "consultation_number": "WAPIAAAAZK2bF1rb",        "checked_at": "2026-10-28T12:00:00.000Z"      }    }  }}
POST
/v1/invoices/{id}/send

Deliver the invoice over its decided channel — a clearance/network rail or email, queued for the worker. A draft is finalized first (number allocation + completeness gate + e-invoice preflight), matching one-click issue-and-send.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/string/send"
{  "data": {    "id": "string",    "organization_id": "string",    "customer_id": "string",    "number": "string",    "status": "draft",    "date": "string",    "due_date": "string",    "subtotal": "string",    "tax": "string",    "total": "string",    "amount_due": "string",    "settlement": {      "paid": "string",      "refunded": "string",      "credited": "string",      "refund_owed": "string",      "collectible": "string",      "state": "unissued"    },    "can_collect": true,    "has_amount_due": true,    "has_credit": true,    "from_details": "string",    "to_details": "string",    "items": [      {        "line_key": "26a9f9be-034f-4698-a0b1-5a6311150885",        "name": "string",        "quantity": "string",        "price": "string",        "unit": "string",        "tax_rate": "string",        "tax_behavior": "inclusive",        "amount": "string",        "tax_amount": "string",        "tax_category": "standard",        "tax_exemption_reason": "string",        "tax_exemption_reason_code": "string",        "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",        "product_price_id": "453079f2-dfb3-4e2b-b8f6-52db9da09b0d",        "kind": "goods",        "dispatched_from": "st",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "ai": {          "description": "string",          "status": "pending"        }      }    ],    "payment_details": "string",    "payment_bank_account_id": "adc4755b-d4fa-421d-9e27-fb9149a6647a",    "notes": "string",    "created_at": "string",    "updated_at": "string",    "template": null,    "token": "string",    "reminder_sent_at": "string",    "paid_at": "string",    "reminder_sent_to": "string",    "viewed_at": "string",    "is_recurring_inflow": true,    "recurring_contract_id": "string",    "recurring_series_id": "string",    "scheduled_send_at": "string",    "document_type": "invoice",    "reference_invoice_id": "string",    "source_quote_id": "string",    "service_period_start": "string",    "service_period_end": "string",    "buyer_reference": "string",    "contract_reference": "string",    "purchase_order_reference": "string",    "tax_point_date": "string",    "tax_point_date_code": "3",    "project_reference": "string",    "tender_or_lot_reference": "string",    "invoiced_object_identifier": "string",    "invoiced_object_scheme": "string",    "buyer_accounting_reference": "string",    "delivery_date": "string",    "correction_reason": "string",    "country_extensions": {      "it": {        "regime_fiscale": "RF01",        "natura": "N1"      },      "pl": {        "annotations": {          "cash_method": true,          "self_invoicing": true,          "reverse_charge": true,          "split_payment": true        }      }    },    "external_invoice_id": "string",    "client_id": "string",    "metadata": {      "property1": null,      "property2": null    },    "currency": "string",    "fiscal_document_id": "79bf4701-726a-4939-ac1c-e7552a1d6c5a",    "downloads": {      "pdf": "string",      "ubl": "string",      "bundle": "string"    },    "customer": {      "id": "string",      "reference_id": "string",      "name": "string",      "email": "string",      "website": "string",      "vat_verification": {        "status": "verified",        "trader": {          "name": "string",          "address": "string"        },        "consultation_number": "WAPIAAAAZK2bF1rb",        "checked_at": "2026-10-28T12:00:00.000Z"      }    }  },  "delivery": {    "state": "queued",    "channel": "string",    "transmission_id": "string",    "warning": "string"  }}
GET
/v1/invoices/{id}/transmissions

The append-only transmission history for this invoice — every rail submission and email delivery attempt, newest first. After a queued send, poll here for the authority verdict.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/string/transmissions"
{  "data": [    {      "id": "string",      "channel": "string",      "format": "string",      "state": "queued",      "attempt": 0,      "gateway_provider": "string",      "tax_authority_id": "string",      "failure_reason": "string",      "created_at": "string",      "submitted_at": "string",      "delivered_at": "string",      "failed_at": "string"    }  ]}
GET
/v1/invoices/{id}/delivery-preview

The channel and format a send would use for this invoice as it stands — without sending anything. A null channel with a warning means the preferred route cannot be taken yet.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/string/delivery-preview"
{  "data": {    "channel": "string",    "format": "string",    "via_gateway": true,    "gateway_provider": "string",    "warning": "unsupported_country"  }}
GET
/v1/invoices/{id}/attachments

The receipts attached to an invoice, each with the line that would bill it back while the invoice is a draft.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/invoices/string/attachments"
{  "data": [    {      "id": "string",      "file_name": "string",      "content_type": "string",      "size": 0,      "inbox_id": "string",      "proposal": {        "name": "string",        "quantity": 0,        "price": 0,        "tax_behavior": "inclusive",        "kind": "service",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "currency": "string"      }    }  ]}
POST
/v1/invoices/{id}/attachments

Attach inbox receipts to an invoice, up to 10 in all. Answers with every attachment the invoice now has; bill one back by appending its proposal to the draft's items as it is.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/invoices/string/attachments" \  -H "Content-Type: application/json" \  -d '{    "inbox_ids": [      "9bbdaafa-95d3-4d4a-bddd-2ed1e7b76317"    ]  }'
{  "data": [    {      "id": "string",      "file_name": "string",      "content_type": "string",      "size": 0,      "inbox_id": "string",      "proposal": {        "name": "string",        "quantity": 0,        "price": 0,        "tax_behavior": "inclusive",        "kind": "service",        "metadata": {          "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6"        },        "currency": "string"      }    }  ]}
DELETE
/v1/invoices/{id}/attachments/{documentId}

Remove an attachment from the invoice. The receipt stays in the workspace, and a line that bills it stays on the invoice.

Authorization

bearerAuth
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string
documentId*string
Formatuuid

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/v1/invoices/string/attachments/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty