# Change estimate state Changes the state of an estimate document (estimate_type path segment: quotes, proformas, fees_notes). | From | To | Value in request body | | :--- | :--- | :--- | | draft | sent | finalized | | draft | deleted | deleted | | sent, refused | accepted | accept | | sent, accepted | refused | refuse | | sent, accepted, refused | canceled | canceled | The request body wrapper key must be the singular of the path type (quote, proforma, fees_note); any other key returns 422 "Invalid root element, expected quote" (with the expected key name). To cancel, send the reason in message inside the wrapper, e.g. {"quote": {"state": "canceled", "message": "Client withdrew the request"}}. Without it the API returns 422 "The cancellation reason is a required field". Endpoint: PUT /api/v3/{estimate_type}/{id}/change-state.json 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" ## Request fields (application/json): - `quote` (object, required) - `quote.state` (string, required) Target state event. finalized moves a draft to sent, accept / refuse mark it accepted / refused, canceled cancels it and deleted deletes a draft. Enum: "finalized", "accept", "refuse", "canceled", "deleted" - `quote.message` (string) Cancellation reason. Required when state is canceled; if it is missing or empty the API returns 422 with "The cancellation reason is a required field" (text in the account's language). Ignored for the other states. Example: "Client withdrew the request" ## 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: 257224130 - `quote.status` (string) A finalized document is returned as final here; the list endpoint returns the same status as sent. Example: "final" - `quote.archived` (boolean) - `quote.type` (string) Example: "Quote" - `quote.sequence_number` (string) Example: "1/INVOICEXPRESSDEMO" - `quote.inverted_sequence_number` (string) Example: "INVOICEXPRESSDEMO/1" - `quote.sequence_id` (integer) Example: 5259462 - `quote.date` (string) dd/mm/yyyy Example: "13/05/2026" - `quote.due_date` (string) dd/mm/yyyy Example: "13/06/2026" - `quote.reference` (string,null) - `quote.observations` (string,null) No enforced character limit (text column). - `quote.retention` (number,null) - `quote.permalink` (string) Example: "https://web.invoicexpress.com/documents/abc123" - `quote.saft_hash` (string) No enforced character limit (text column). Example: "Xbsc" - `quote.sum` (number) Example: 100 - `quote.discount` (number) - `quote.before_taxes` (number) Example: 100 - `quote.taxes` (number) Example: 23 - `quote.total` (number) Example: 123 - `quote.currency` (string) Example: "Euro" - `quote.client` (object) - `quote.client.name` (string) Example: "Test Client" - `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 Item" - `quote.items.description` (string,null) Maximum 200 characters and at most 20 lines. Longer values are rejected with 422. - `quote.items.unit_price` (string) Example: "100.0" - `quote.items.unit` (string) Example: "service" - `quote.items.quantity` (string) Example: "1.0" - `quote.items.tax` (object) - `quote.items.tax.value` (number) Example: 23 - `quote.items.subtotal` (number) Example: 100 - `quote.items.tax_amount` (number) Example: 23 - `quote.items.discount_amount` (number) - `quote.atcud` (string) Example: "N/D" ## 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) Example: [{"error":"The cancellation reason is a required field"}] - `errors.error` (string)