# Invoices Create invoices, invoice receipts, simplified invoices, vat moss invoices, credit notes & debit notes and send them to your clients. ## Get Document Details - [GET /api/v3/documents/{token}](https://docs.invoicexpress.com/v3/invoices/getv3document.md): Retrieves detailed information about a specific document including client data, items, financial summary, and account information. Public endpoint — no API key needed; the document token itself grants access. The response language follows the client's (or the account's) language. ## Get Document PDF by Token - [GET /api/v3/documents/{token}/pdf](https://docs.invoicexpress.com/v3/invoices/getv3documentpdfbytoken.md): Returns the PDF URL of the document identified by its public token, or indicates that PDF generation is in progress (poll again). Public endpoint — no API key needed; the document token itself grants access. Works for any document type. ## Create partial payment for document - [POST /api/v3/documents/{document_id}/partial_payments.json](https://docs.invoicexpress.com/v3/invoices/createv3documentpartialpayment.md): Creates a partial payment for a document. This generates a treasury movement and client current account entry. Use the document numeric id (the same id returned for invoice-type and guide-type resources). The .json suffix requests a JSON response body. Send an Idempotency-Key header to make retries safe: a repeated request with the same key and payload replays the first answer (kept for 24 hours) instead of registering the payment twice. ## List Invoices - [GET /api/v3/invoices](https://docs.invoicexpress.com/v3/invoices/listv3invoices.md): Returns a list of all your invoices. ## Create Invoice-type Document - [POST /api/v3/{invoices-type}](https://docs.invoicexpress.com/v3/invoices/createv3invoice.md): Creates a new document of the specified invoice type, as a draft unless finalized later through change-state. The request body wrapper key must be the singular of the path segment: - invoice for invoices - invoice_receipt for invoice_receipts - simplified_invoice for simplified_invoices - credit_note for credit_notes - debit_note for debit_notes Any other key returns 422 No element provided. The response wrapper key follows the same rule. ## List document batches for the account - [GET /api/v3/invoices/batches](https://docs.invoicexpress.com/v3/invoices/getv3invoicebatches.md): Returns all document batches belonging to the authenticated account. Each item includes the stored number_of_documents value as count (set when the import batch is finalized). Use each batch id as the batch_id query parameter on GET /api/v3/invoices to list only invoices from that batch. ## Check Finalize Conditions - [GET /api/v3/invoices/{id}/check_finalize](https://docs.invoicexpress.com/v3/invoices/checkfinalizeinvoice.md): Checks if there are conditions to finalize an invoice (e.g., future dates or earlier drafts). ## Update Invoice Summary - [POST /api/v3/{invoices-type}/update_summary](https://docs.invoicexpress.com/v3/invoices/updatev3invoicesummary.md): Calculates and returns the financial summary (totals, taxes, discounts, retention) for an invoice based on the provided invoice data without saving the invoice. The request body wrapper key must be the singular of the path type (invoice, invoice_receipt, simplified_invoice, credit_note, debit_note, receipt); any other key returns 422 "No invoice element provided" (with the expected key name). ## Calculate Invoice Summary - [POST /api/v3/{invoices-type}/calculate_summary](https://docs.invoicexpress.com/v3/invoices/calculatev3invoicesummary.md): Unvalidated counterpart of update_summary: calculates the totals from the items, retention, global_discount, currency_code, rate and tax exemption in the body, without saving anything. Nothing else (client, dates, series) is read, and invalid input is coerced rather than rejected, so a missing or wrong wrapper key returns a summary of zeros instead of an error. At most 1000 items are taken into account. The wrapper key is the singular of the path segment (invoice, invoice_receipt, simplified_invoice, credit_note, debit_note, receipt). ## Get Invoices Summary - [POST /api/v3/invoices/summary](https://docs.invoicexpress.com/v3/invoices/getv3invoicessummary.md): Returns the totals of the documents matching the filters. Accepts the same filters as GET /api/v3/invoices (see V3InvoicesQueryParams: id[], except_id[], type[], status[], client_id[], serie_name[], date, due_date, total_before_taxes, total_with_taxes, text, archived, non_archived, reference, ...), sent either in the query string or in the JSON body. Pagination does not apply: totals.pages is always 1. ## Transform Document - [GET /api/v3/invoices/{id}/transform_document](https://docs.invoicexpress.com/v3/invoices/transformv3document.md): Returns a transformed version of the specified invoice document. This is typically used to prepare the document to be converted into another invoice-type document (e.g., credit note or other variations), mirroring the data structure of a cloned document ready for further edits. ## Get Document by ID - [GET /api/v3/{invoices-type}/{id}](https://docs.invoicexpress.com/v3/invoices/getv3documentbyid.md): Retrieves detailed information about a specific document including client data, items, financial summary, and account information. ## Update Invoice-type Document - [PUT /api/v3/{invoices-type}/{id}](https://docs.invoicexpress.com/v3/invoices/updatev3invoice.md): Updates a document of the specified invoice type and returns it. The id must belong to a document of that type. The request body wrapper key must be the singular of the path segment (invoice, invoice_receipt, simplified_invoice, credit_note, debit_note). The body accepts the same fields as create, and items must again contain at least one item: the item list sent replaces the stored one. Documents in status sent, settled, deleted, canceled, accepted, refused or second_copy cannot be changed (422 "Document has been finalized so can't be changed anymore"). ## Get New Document Defaults - [GET /api/v3/{invoices-type}/new](https://docs.invoicexpress.com/v3/invoices/newv3invoice.md): Returns the defaults and choice lists used to build a new document of the specified invoice type (payment terms, exemption reasons, series of that type, currencies, retention options, taxes and default remarks). Nothing is created. ## Clone Document - [GET /api/v3/{invoices-type}/{id}/clone](https://docs.invoicexpress.com/v3/invoices/clonev3invoice.md): Returns an unsaved copy of the document, ready to be edited and sent to create. Nothing is created: id and token are null. The copy is a draft of the path type, dated today, with the due date moved by the client's (or account's) payment days, the exchange rate refreshed for foreign-currency documents, and the account's default series of that type. The source id can be any document of the account; it is not checked against the path type. ## Sync Invoice with an Integration - [POST /api/v3/invoices/{id}/handle_integration](https://docs.invoicexpress.com/v3/invoices/handlev3invoiceintegration.md): Queues a background job that associates the document with an integration (plugin). Answers {} immediately; the result is not reported back. ## Archive a document - [PUT /api/v3/{invoices-type}/{id}/archive](https://docs.invoicexpress.com/v3/invoices/archivev3document.md): Archives the specified document by setting its archived flag to true and returns the updated document. ## Archive a document - [PATCH /api/v3/{invoices-type}/{id}/archive](https://docs.invoicexpress.com/v3/invoices/archivev3documentpatch.md): Archives the specified document by setting its archived flag to true and returns the updated document. ## Creates a comment for a document - [POST /api/v3/{invoices-type}/{id}/comments](https://docs.invoicexpress.com/v3/invoices/createv3documentcomment.md): Creates a new comment for the specified document. Comments can only be deleted within 15 minutes of creation. ## Deletes a comment from a document - [DELETE /api/v3/{invoices-type}/{id}/comments/{comment_id}](https://docs.invoicexpress.com/v3/invoices/deletev3documentcomment.md): Deletes a comment from the specified document. Comments can only be deleted within 15 minutes of creation and only by the author. ## List document movements - [GET /api/v3/{invoices-type}/{id}/movements](https://docs.invoicexpress.com/v3/invoices/listv3documentmovements.md): Returns the list of movements related to the specified document. ## Change document state - [PUT /api/v3/{invoices-type}/{id}/change-state.json](https://docs.invoicexpress.com/v3/invoices/changev3invoicedocumentstate.md): Changes the state of an invoice-type document (invoices-type path segment). | From | To | Value in request body | Notes | | :--- | :--- | :--- | :--- | | draft | final | finalized | All types. | | draft | settled | finalized | Only invoice_receipts. | | draft | deleted | deleted | All types. | | final | canceled | canceled | All types. | | settled | canceled | canceled | Only invoice_receipts. | | final | settled | settled | All types except invoice_receipts and receipts. | | settled | final | unsettled | Only credit_notes and debit_notes. | On receipts (payment receipts) the only transition is canceled; canceling a receipt that is already canceled succeeds without change. The request body wrapper key must be the singular of the path type (invoice, invoice_receipt, simplified_invoice, credit_note, debit_note, receipt); any other key returns 422 "Invalid root element, expected invoice" (with the expected key name). To cancel, send the reason in message inside the wrapper, e.g. {"invoice": {"state": "canceled", "message": "Document issued by mistake"}}. Without it the API returns 422 "The cancellation reason is a required field". ## Download document PDF - [GET /api/v3/{invoices-type}/{id}/pdf](https://docs.invoicexpress.com/v3/invoices/getv3documentpdf.md): Returns the PDF URL for the specified document or indicates if PDF generation is in progress. ## Get QR Code - [GET /api/v3/{invoices-type}/{id}/qr_code](https://docs.invoicexpress.com/v3/invoices/getv3documentqrcode.md): Returns the QR Code URL for the specified document or indicates if QR Code generation is in progress. ## Get send document configuration - [GET /api/v3/{invoices-type}/{id}/send](https://docs.invoicexpress.com/v3/invoices/getv3documentsendconfig.md): Returns the pre-filled email data for sending a document to a client. This includes the default recipient, subject, and body with placeholders resolved based on the document and client context. ## Send document by email - [POST /api/v3/{invoices-type}/{id}/send](https://docs.invoicexpress.com/v3/invoices/sendv3document.md): Sends the specified document by email to the client. ## List related documents - [GET /api/v3/{invoices-type}/{id}/related_documents](https://docs.invoicexpress.com/v3/invoices/listv3relateddocuments.md): Returns the list of documents related to the specified document. ## Returns timeline activities for a specific document - [GET /api/v3/{invoices-type}/{id}/timeline](https://docs.invoicexpress.com/v3/invoices/getv3documenttimeline.md): Retrieves timeline activities for a specific document including status changes, comments, and other events. ## Unarchive a document - [PUT /api/v3/{invoices-type}/{id}/unarchive](https://docs.invoicexpress.com/v3/invoices/unarchivev3document.md): Unarchives the specified document by setting its archived flag to false and returns the updated document. ## Unarchive a document - [PATCH /api/v3/{invoices-type}/{id}/unarchive](https://docs.invoicexpress.com/v3/invoices/unarchivev3documentpatch.md): Unarchives the specified document by setting its archived flag to false and returns the updated document. ## Create partial payment for document - [POST /api/v3/documents/{document_id}/partial_payments.json](https://docs.invoicexpress.com/v3/guides/createv3documentpartialpayment.md): Creates a partial payment for a document. This generates a treasury movement and client current account entry. Use the document numeric id (the same id returned for invoice-type and guide-type resources). The .json suffix requests a JSON response body. Send an Idempotency-Key header to make retries safe: a repeated request with the same key and payload replays the first answer (kept for 24 hours) instead of registering the payment twice. ## Create partial payment for document - [POST /api/v3/documents/{document_id}/partial_payments.json](https://docs.invoicexpress.com/v3/estimates/createv3documentpartialpayment.md): Creates a partial payment for a document. This generates a treasury movement and client current account entry. Use the document numeric id (the same id returned for invoice-type and guide-type resources). The .json suffix requests a JSON response body. Send an Idempotency-Key header to make retries safe: a repeated request with the same key and payload replays the first answer (kept for 24 hours) instead of registering the payment twice.