# Invoices Create invoices, invoice receipts, simplified invoices, vat moss invoices, credit notes & debit notes and send them to your clients. ## List All - [GET /invoices.json](https://docs.invoicexpress.com/v2/invoices/listinvoices.md): Returns a list of invoices. ## Create Invoice - [POST /{invoices-type}.json](https://docs.invoicexpress.com/v2/invoices/createinvoice.md): Creates a new invoice, simplified_invoice, invoice_receipt, credit_note or debit_note. ### Idempotency Send a proprietary_uid (at the top level or inside the root object) to make the request safe to retry: * If a document with that proprietary_uid was already created, the API returns 201 with the original document instead of creating a new one. * If another request with the same proprietary_uid is still being saved, the API returns 422 with This document is being saved by another request. Please try again. English text shown; the message follows the account language. ### Creating new clients or items along with the documents This method also allows to create a new client and/or new items in the same request with the following behavior: * If the client name does not exist, a new one is created. * If items do not exist with the given names, new ones will be created. * If item name already exists, the item is updated with the new values. ### Taxes Regarding item taxes, if the tax name is not found, the default tax is applyed to that item. Portuguese accounts should also send the IVA exemption reason if the invoice contains exempt items (IVA 0%). > Note: Simplified Invoices are only available in Portugal. ## Get Invoice - [GET /{invoices-type}/{document-id}.json](https://docs.invoicexpress.com/v2/invoices/getinvoice.md) ## Update Invoice - [PUT /{invoices-type}/{document-id}.json](https://docs.invoicexpress.com/v2/invoices/updateinvoice.md): Updates an existing draft invoice, simplified_invoice, invoice_receipt, credit_note or debit_note. Only items is required. The items list is replaced by the one sent; the client and any other field that is not sent keep their current values. ### Creating new clients or items along with the invoice This method also allows to create a new client and/or new items in the same request with the following behavior: * If the client name does not exist, a new one is created. * If items do not exist with the given names, new ones will be created. * If item name already exists, the item is updated with the new values. ### Taxes Regarding item taxes, if the tax name is not found, the default tax is applyed to that item. Portuguese accounts should also send the IVA exemption reason if the invoice contains exempt items (IVA 0%). > Note: Simplified Invoices are only available in Portugal. ## Change Invoice State - [PUT /{invoices-type}/{document-id}/change-state.json](https://docs.invoicexpress.com/v2/invoices/changeinvoicestate.md): Changes the state of invoice documents. | From | To | State on Request Body | Notes | | :--- | :--- | :--- | :--- | | draft | final | finalized | All documents except invoice_receipt. | | draft | settled | finalized | Only invoice_receipt. | | draft | deleted | deleted | All documents. | | final | canceled | canceled | All documents. Requires message (the cancellation reason). | | settled | canceled | canceled | Only invoice_receipt. Requires message. | | final | settled | settled | invoice, simplified_invoice, credit_note and debit_note. Not available for invoice_receipt. | | settled | final | unsettled | Only credit_note and debit_note. | > Note: An invoice or simplified_invoice settled with settled cannot be returned to final or canceled through the API. ## Send Invoice by Email - [PUT /{invoices-type}/{document-id}/email-document.json](https://docs.invoicexpress.com/v2/invoices/sendinvoiceemail.md) ## Generate PDF - [GET /api/pdf/{document-id}.json](https://docs.invoicexpress.com/v2/invoices/generatepdf.md) ## Get QR Code - [GET /api/qr_codes/{document-id}.json](https://docs.invoicexpress.com/v2/invoices/getqrcode.md) ## Related Documents - [GET /document/{document-id}/related_documents.json](https://docs.invoicexpress.com/v2/invoices/relateddocs.md) ## Generate Payment - [POST /documents/{document-id}/partial_payments.json](https://docs.invoicexpress.com/v2/invoices/generatepayment.md) ## Cancel Payment - [PUT /receipts/{receipt-id}/change-state.json](https://docs.invoicexpress.com/v2/invoices/cancelreceipt.md) ## Generate PDF - [GET /api/pdf/{document-id}.json](https://docs.invoicexpress.com/v2/estimates/generatepdf.md) ## Generate PDF - [GET /api/pdf/{document-id}.json](https://docs.invoicexpress.com/v2/guides/generatepdf.md) ## Get QR Code - [GET /api/qr_codes/{document-id}.json](https://docs.invoicexpress.com/v2/guides/getqrcode.md)