# EDI Manage electronic invoice (CIUS-PT) generation and its additional customs/delivery fields. Note these endpoints are served under `/api/v1/edi/` on the v3 host, and address documents by a bare `id` with no document-type segment. ## Download CIUS-PT File - [GET /api/v1/edi/{id}/cius-pt](https://docs.invoicexpress.com/v3/edi/getv3documentciuspt.md): Generates and downloads the CIUS-PT (electronic invoice) file for a document. The operation is asynchronous: while the file is being generated the response body is {"generating": true}; keep polling until the body contains key and url. Both cases return HTTP 200 — unlike the SAF-T export and the PDF and QR code endpoints, this endpoint does not return 202 while generating. The only difference is which fields are present in the body. Note that this endpoint takes a bare document id with no document-type segment, so any document in the account can be addressed. Only Invoice, InvoiceReceipt, SimplifiedInvoice, DebitNote and CreditNote documents are eligible — VAT MOSS invoices are not, and return 406. Draft documents also return 406. ## Get CIUS Additional Fields - [GET /api/v1/edi/{id}/additional_fields](https://docs.invoicexpress.com/v3/edi/getv3documentciusadditionalfields.md): Returns the CIUS/EDI additional fields (order and delivery references, accounting cost, delivery date) associated with a document. Every field is always present in the response; each one is null when no additional fields have been stored for the document yet. ## Create or Update CIUS Additional Fields - [POST /api/v1/edi/{id}/additional_fields](https://docs.invoicexpress.com/v3/edi/createv3documentciusadditionalfields.md): Creates the document's CIUS/EDI additional fields, or updates them if they already exist — the same endpoint serves both cases. Returns 201 when the record is created and 200 when an existing record is updated. Fields omitted from the payload keep their stored value, so this is a partial update rather than a replace.