# Archive a document Archives the specified estimate document by setting its archived flag to true and returns the updated document. Endpoint: PATCH /api/v3/{estimate_type}/{id}/archive Version: 3.1.0 Security: apiKeyAuth ## Path parameters: - `estimate_type` (string, required) Type of estimate document (quotes, proformas, fees_notes). Enum: "quotes", "proformas", "fees_notes" - `id` (integer, required) The document ID. Example: 541674 ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Response 200 fields (application/json): - `quote` (object) Wrapper key matches the singular of the requested estimate type (quote, proforma, or fees_note). - `quote.id` (integer) Example: 257118662 - `quote.status` (string) Example: "draft" - `quote.archived` (boolean) - `quote.type` (string) Example: "Quote" - `quote.sequence_number` (string) Example: "draft" - `quote.inverted_sequence_number` (string) Example: "draft" - `quote.sequence_id` (integer) Example: 5259462 - `quote.atcud` (string) Example: "N/A" - `quote.date` (string) Example: "2026-05-11" - `quote.due_date` (string) Example: "2026-06-11" - `quote.reference` (string,null) - `quote.observations` (string,null) No enforced character limit (text column). - `quote.token` (string) Example: "2571186625ad1072ab31349f6c7c6bd919c2547e43c965aa1" - `quote.permalink` (string) Example: "https://web.invoicexpress.com/documents/2571186625ad1072ab31349f6c7c6bd919c2547e43c965aa1?language=pt" - `quote.retention` (number) - `quote.global_discount` (object,null) Document-level discount, or null when there is none. - `quote.global_discount.value_type` (string) Enum: "percentage", "absolute" - `quote.global_discount.value` (number) Example: 10 - `quote.owner_invoice_id` (integer,null) - `quote.raw_owner_invoice` (string) Conditional — only present when set. Reference to an original document issued outside InvoiceXpress (isolated credit/debit notes), in the form " /". - `quote.currency` (object,null) Document currency when one was set (multi-currency plans); null otherwise. - `quote.currency.name` (string) Example: "US Dollar" - `quote.currency.code` (string) Example: "USD" - `quote.currency.symbol` (string) Example: "$" - `quote.auto_add_related_document` (boolean) - `quote.qr_code` (string) Conditional — never present on API-key requests. Only returned to the InvoiceXpress web app, for non-draft documents with a real ATCUD once the QR code image has been generated. Public URL of the QR code image. - `quote.digital_signed` (boolean) Conditional — never present on API-key requests. Only returned to the InvoiceXpress web app; whether the document PDF is digitally signed. - `quote.include_payment_reference` (boolean) Conditional — never present on API-key requests. Only returned to the InvoiceXpress web app for draft (or deleted) documents of a type that supports a Multibanco reference, when the plan includes MB, an MB provider is configured and the document has no MB reference yet. Reflects the account's "add payment reference by default" preference. - `quote.auto_send_invoice_from_estimate` (boolean) Conditional — never present on API-key requests. Same conditions as include_payment_reference; reflects the account's "auto-send invoice from estimate" preference. - `quote.account` (object) - `quote.account.organization_name` (string) Example: "invoicexpress" - `quote.account.address` (object) - `quote.account.address.detail` (string) Example: "Avenida Duque D'Avila, Saldanha" - `quote.account.address.postal_code` (string) Example: "1500-555" - `quote.account.address.city` (string) Example: "Lisbon" - `quote.account.address.country` (string) Example: "Portugal" - `quote.account.address.translated_country` (string) Country name in the request language. Example: "Portugal" - `quote.account.email` (string,null) Example: "user@example.com" - `quote.account.phone` (string,null) - `quote.account.phone_country_code` (string) International calling code for the phone/mobile number (e.g. +351); empty string when unset. - `quote.account.phone_indicative_printed` (boolean) Whether the document PDF prints phone behind phone_country_code. - `quote.account.website` (string,null) - `quote.account.footer` (string,null) Document footer text — the document series' configured footer when set, otherwise the account's invoice footer. - `quote.account.fiscal_id` (string) Example: "999999990" - `quote.account.logo` (string) - `quote.account.bank_data` (array) - `quote.client` (object) - `quote.client.phone` (string) Empty string when unset. - `quote.client.mobile` (string) Empty string when unset. - `quote.client.mobile_country_code` (string) International calling code for the phone/mobile number (e.g. +351); empty string when unset. - `quote.client.country` (string) Display name of the client's country; empty when unset. - `quote.client.translated_country` (string) Client's fiscal country name in the request language. - `quote.items` (array) - `quote.items.name` (string) Maximum 60 characters. Longer values are rejected with 422 ("Code for the item is too long"). Example: "Test Service" - `quote.items.description` (string) Maximum 200 characters and at most 20 lines. Longer values are rejected with 422. - `quote.items.unit_price` (number) Example: 100 - `quote.items.unit` (string) Example: "service" - `quote.items.quantity` (number) Example: 1 - `quote.items.tax` (object) - `quote.items.discount` (number) - `quote.items.subtotal` (number) Example: 100 - `quote.items.tax_amount` (number) Example: 23 - `quote.items.discount_amount` (number) - `quote.items.total` (number) Example: 123 - `quote.summary` (object) - `quote.summary.sum` (number) Example: 100 - `quote.summary.before_taxes` (number) Example: 100 - `quote.summary.taxes` (number) Example: 23 - `quote.summary.currency` (object) - `quote.summary.pay_progress` (number) - `quote.summary.to_pay` (number) Example: 123 - `quote.summary.total_paid` (number) - `quote.summary.taxes_breakdown` (array) - `quote.summary.taxes_breakdown.category` (string) Example: "IVA23" - `quote.summary.taxes_breakdown.items_value` (number) Example: 100 - `quote.summary.taxes_breakdown.tax_value` (number) Example: 23 - `quote.summary.total_currency_rate` (number) - `quote.summary.rate` (number) Example: 1 ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 404 fields (application/json): - `errors` (array) Example: [{"error":"Resource not found"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) - `errors.error` (string) Example: "Date can't be blank" ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string)