# Update Schedule Updates an existing schedule. This is not a partial update; resend the full schedule, including template with its client and items. A missing template or items answers 422 (No template element provided, No items element provided). No client element provided (422) is returned only when client is sent without an id, name or code, not when it is missing. Endpoint: PUT /api/v3/schedules/{id} Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Path parameters: - `id` (integer, required) Schedule id ## Request fields (application/json): - `schedule` (object, required) - `schedule.document_type` (string, required) Document type to generate. Accepts the key (invoice) or the stored value (Invoice); responses always return the key. Enum: "invoice", "invoice_receipt", "simplified_invoice", "Invoice", "InvoiceReceipt", "SimplifiedInvoice" - `schedule.interval` (integer, required) Must be greater than 0. Example: 1 - `schedule.type` (string, required) Enum: "Daily", "Monthly", "Yearly" - `schedule.description` (string, required) Example: "Monthly invoice" - `schedule.start_date` (string) On create it must be tomorrow or later; today or a past date is rejected with 422 ("Start date cannot be today, must be tomorrow or later"). Defaults to tomorrow when omitted. Example: "2030-01-01" - `schedule.end_date` (string) Example: "2035-01-01" - `schedule.to_create_back_invoices` (boolean) Accepted, but has no effect when creating a schedule: back invoices are only generated for dates between start_date and today, and on create start_date must be tomorrow or later. - `schedule.to_send` (boolean) Example: true - `schedule.email_cc` (string,null) - `schedule.email_bcc` (string,null) - `schedule.template` (object) - `schedule.template.date` (string) Example: "2025-10-20" - `schedule.template.due_date` (string) Example: "2025-10-20" - `schedule.template.client` (object) - `schedule.template.client.name` (string) Example: "John Doe" - `schedule.template.items` (array) - `schedule.template.items.quantity` (integer) Example: 1 - `schedule.template.items.unit_price` (number) Example: 10 - `schedule.template.items.tax` (object) ## Response 200 fields (application/json): - `schedule` (object) - `schedule.id` (integer) Example: 1 - `schedule.client_name` (string) Example: "John Doe" - `schedule.interval` (integer) Example: 1 - `schedule.type` (string) Enum: "Daily", "Monthly", "Yearly" - `schedule.description` (string) Example: "Monthly invoice" - `schedule.active` (boolean) Example: true - `schedule.document_type` (string) Enum: "invoice", "invoice_receipt", "simplified_invoice" - `schedule.to_send` (boolean) - `schedule.email_cc` (string,null) - `schedule.email_bcc` (string,null) - `schedule.start_date` (string) Example: "2026-08-01" - `schedule.next_date` (string) Example: "2020-01-01" - `schedule.end_date` (string) Example: "2030-01-01" - `schedule.total` (integer) Occurrences the schedule is planned to produce over its whole date range (a forecast, not a document count) Example: 2 - `schedule.issued` (integer) Documents actually generated so far by this schedule (deleted ones excluded). Not equal to total - total_remain. Not returned in the list. - `schedule.total_remain` (integer) Occurrences still to come between now and end_date Example: 2 - `schedule.template` (object) The draft document generated from the schedule's template. - `schedule.template.status` (string) Example: "draft" - `schedule.template.archived` (boolean) - `schedule.template.sequence_number` (string) Example: "draft" - `schedule.template.inverted_sequence_number` (string) Example: "draft" - `schedule.template.sequence_id` (integer,null) - `schedule.template.atcud` (string) Example: "N/A" - `schedule.template.date` (string) Example: "2026-08-01" - `schedule.template.due_date` (string) Example: "2026-08-15" - `schedule.template.reference` (string,null) - `schedule.template.observations` (string,null) - `schedule.template.token` (string) Example: "2646260403677fd1d1a71ef33e06d27d39dbb11664aaafad8" - `schedule.template.permalink` (string) Example: "https://web.invoicexpress.com/documents/2646260403677fd1d1a71ef33e06d27d39dbb11664aaafad8?language=pt" - `schedule.template.retention` (number) - `schedule.template.global_discount` (number,null) - `schedule.template.account` (object) - `schedule.template.account.organization_name` (string) Example: "invoicexpress" - `schedule.template.account.address` (object) - `schedule.template.account.address.detail` (string) Example: "Avenida Duque D'Avila, Saldanha" - `schedule.template.account.address.postal_code` (string) Example: "1500-555" - `schedule.template.account.address.city` (string) Example: "Lisbon" - `schedule.template.account.address.country` (string) Example: "Portugal" - `schedule.template.account.email` (string) Example: "tito.reis@visma.com" - `schedule.template.account.fiscal_id` (string) Example: "999999990" - `schedule.template.account.logo` (string) - `schedule.template.account.bank_data` (array) Example: [] - `schedule.template.client` (object) - `schedule.template.client.name` (string) Example: "Test Client" - `schedule.template.items` (array) - `schedule.template.items.unit_price` (number) Example: 10 - `schedule.template.items.unit` (string) Example: "service" - `schedule.template.items.quantity` (number) Example: 1 - `schedule.template.items.tax` (object) - `schedule.template.items.tax.value` (number) Example: 23 - `schedule.template.items.discount` (number) - `schedule.template.items.subtotal` (number) Example: 10 - `schedule.template.items.tax_amount` (number) Example: 2.3 - `schedule.template.items.discount_amount` (number) - `schedule.template.items.total` (number) Example: 12.3 - `schedule.template.summary` (object) - `schedule.template.summary.sum` (number) Example: 10 - `schedule.template.summary.before_taxes` (number) Example: 10 - `schedule.template.summary.taxes` (number) Example: 2.3 - `schedule.template.summary.currency` (object) - `schedule.template.summary.currency.code` (string) Example: "EUR" - `schedule.template.summary.currency.symbol` (string) Example: "€" - `schedule.template.summary.pay_progress` (number) - `schedule.template.summary.to_pay` (number) Example: 12.3 - `schedule.template.summary.total_paid` (number) - `schedule.template.summary.taxes_breakdown` (array) - `schedule.template.summary.taxes_breakdown.category` (string) Example: "IVA23" - `schedule.template.summary.taxes_breakdown.items_value` (number) Example: 10 - `schedule.template.summary.taxes_breakdown.tax_value` (number) Example: 2.3 - `schedule.template.summary.total_currency_rate` (number) - `schedule.template.summary.rate` (number) Example: 1 - `schedule.template.owner_invoice_id` (integer,null) - `schedule.template.auto_add_related_document` (boolean) ## 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":"An unexpected error occurred"}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string) ## Response 400 fields