Documents
📄️ List Documents
Fetch a list of the portals documents.
📄️ Create Document
You can create documents only with the `DRAFT` or `VALIDATED` status. To create a Document, you need a [Customer](../api-docs/definitions/customer.mdx), which you can specify via `customerId`.
📄️ Get Document
Find a document by ID.
📄️ Delete document
Deletes a document. The deletion is only available on documents with DRAFT status. If document is not a DRAFT, deletion will be denied.
📄️ List Transaction Usages of a Document
Fetch the list of Transaction Usages for a given Document. The results can be sorted, filtered, and paginated.
📄️ Export document as PDF
Download the document as a PDF file.
📄️ Send a message about document
Send a document by email.
📄️ Mark a quotation as accepted by customer
Mark a quotation as accepted by the customer.
📄️ Mark a quotation as refused by customer
Mark a quotation as refused by the customer.
📄️ Validate a document
Validates a document (i.e. removes the 'DRAFT' status).
📄️ Converts a quotation to an invoice
Converts a quotation to an invoice.
📄️ Add a payment
Add a payment on an invoice.
📄️ Document created
This event is triggered when a new [Document](../api-docs/definitions/document.md) is created.
📄️ Document updated
This event is triggered when an existing [Document](../api-docs/definitions/document.md) is modified.
📄️ Document deleted
This event is triggered when an existing [Document](../api-docs/definitions/document.md) is deleted. More information on document deletion [can be found here](../api-docs/definitions/document#delete).
📄️ Invoice paid
This event is triggered when an invoice (i.e., a Document with `type = INVOICE`) is marked as fully paid. Its [[status](../api-docs/definitions/document#status) changes to `PAID`. More information on transactions [can be found here](../api-docs/definitions/transaction.mdx).
📄️ Invoice usage added
This event is triggered when an invoice (i.e., a Document with `type = INVOICE`) has a new [TransactionUsage](../api-docs/definitions/transaction-usage.mdx) added. Specifically, it is a payment from the client (or a credit) used to settle part (or all) of the invoice.
📄️ Invoice validated
This event is triggered when an invoice (i.e., a [Document](../api-docs/definitions/document.md) with `type = INVOICE`) is finalized. Its [status](../api-docs/definitions/document#status) changes from `DRAFT` to `VALIDATED`.
📄️ Quotation refused
This event is triggered when a quotation (i.e., a [Document](../api-docs/definitions/document.md) with `type = QUOTATION`) is marked as refused by the client.
📄️ Quotation accepted
This event is triggered when a quotation (i.e., a [Document](../api-docs/definitions/document.md) with `type = QUOTATION`) is marked as accepted by the client.
📄️ Quotation validated
This event is triggered when a quotation (i.e., a [Document](../api-docs/definitions/document.md) with `type = QUOTATION`) is finalized. Its [status](../api-docs/definitions/document#status) changes from `DRAFT` to `VALIDATED`.