# Change Estimate State Changes the state of estimate documents (quotes, proformas, fees_notes). | From | To | Event | | :--- | :--- | :--- | | Draft | final | finalized | | Draft | deleted | deleted | | final | Accepted | accept | | final | refused | refuse | | final | canceled | canceled | | Accepted | refused | refuse | | refused | Accepted | accept | | Accepted | canceled | canceled | | refused | canceled | canceled | Endpoint: PUT /{estimates-type}/{document-id}/change-state.json Version: 2.0.0 Security: apiKeyAuth ## Path parameters: - `estimates-type` (string, required) The type of the estimate document. Enum: "quotes", "proformas", "fees_notes" - `document-id` (integer, required) The ID of the document. Example: 1050 ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Request fields (application/json): - `quote` (object, required) - `quote.state` (string, required) Enum: "finalized", "canceled", "deleted", "accepted", "refused" - `quote.message` (string) Example: "Wrong value" ## Response 200 fields (application/json): - `quote` (object) - `quote.id` (integer) Example: 541791 - `quote.status` (string) Example: "final" - `quote.archived` (boolean) - `quote.type` (string) Example: "Quote" - `quote.sequence_number` (string) Example: "1/A" - `quote.inverted_sequence_number` (string) Example: "A/1" - `quote.atcud` (string) Example: "ABCD1234-1" - `quote.date` (string) Example: "12/06/2017" - `quote.due_date` (string) Example: "12/06/2017" - `quote.reference` (string) Example: "foo" - `quote.observations` (string) Example: "foo" - `quote.retention` (string) Example: "foo" - `quote.permalink` (string) Example: "https://www.app.invoicexpress.com/documents/541791f16ae45a73b703c684a221ef198c10020f3d56a1" - `quote.saft_hash` (string) Example: "NfTN" - `quote.sum` (number) Example: 10 - `quote.discount` (number) - `quote.before_taxes` (number) Example: 10 - `quote.taxes` (number) Example: 2.3 - `quote.total` (number) Example: 12.3 - `quote.currency` (string) Example: "Euro" - `quote.sequence_id` (string) Example: "12345" - `quote.tax_exemption` (string) Example: "M01" - `quote.client` (object) - `quote.client.name` (string) Example: "John Doe" - `quote.client.code` (string) Example: "C1" - `quote.client.country` (string) Example: "Portugal" - `quote.client.email` (string) Example: "john@example.com" - `quote.items` (array) - `quote.items.description` (string) Example: "Big Product" - `quote.items.unit_price` (number) Example: 100 - `quote.items.quantity` (number) Example: 1 - `quote.items.unit` (string) Example: "un" - `quote.items.tax` (object) - `quote.items.tax.value` (number) Example: 23 ## Response 401 fields (application/json): - `errors` (object) - `errors.error` (string) Example: "Invalid API key" ## Response 404 fields (application/json): - `errors` (object) - `errors.error` (string) Example: "Document not found" ## Response 422 fields (application/json): - `errors` (object) - `errors.error` (string) Example: "CantHandle: 1 for Invoice"