PATCH /v1/recurring-invoices/{id}
const url = 'https://api.asap.cool/v1/recurring-invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"auto_collect_sepa":true,"auto_send":true,"contact_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","frequency":"example","items":[{"description":"example","details":"example","kind":"example","position":1,"quantity":"example","unit_price":1,"vat_rate":"example"}],"next_generation_date":"example","notes":"example","operation_nature":"example","title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.asap.cool/v1/recurring-invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "auto_collect_sepa": true, "auto_send": true, "contact_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "frequency": "example", "items": [ { "description": "example", "details": "example", "kind": "example", "position": 1, "quantity": "example", "unit_price": 1, "vat_rate": "example" } ], "next_generation_date": "example", "notes": "example", "operation_nature": "example", "title": "example" }'Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters »Recurring template identifier.
Request Bodyrequired
Section intitulée « Request Bodyrequired »Body of POST /v1/recurring-invoices. org_id is never accepted here.
object
Debit each auto-sent invoice off-session via the buyer’s stored SEPA
mandate. Per-series opt-in, defaults to false; when off, no invoice of
this template is auto-debited even if the contact holds an active
mandate.
Finalize and send each generated draft automatically. Defaults to
false. When true, operation_nature is required.
Target contact id.
Cadence (monthly/quarterly/yearly).
Line items (at least one).
One line item in a recurring-invoice create request.
object
Line description.
Long description printed under the label. Optional free text.
product (default) or discount. Same whole-document rules as on a
one-off document: a discount must match the VAT rate of a line it
reduces and cannot exceed the subtotal at that rate.
Ordering position (defaults to the array index).
Quantity (decimal token, strictly positive).
Unit price excluding VAT, in cents (>= 0).
VAT rate as a percentage token ([0, 100]).
First generation date (YYYY-MM-DD).
Notes for generated documents.
Operation nature (biens/services/mixte) applied to generated
documents. Required when auto_send is true (finalize needs it).
Title for generated documents.
Examplegenerated
{ "auto_collect_sepa": true, "auto_send": true, "contact_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "frequency": "example", "items": [ { "description": "example", "details": "example", "kind": "example", "position": 1, "quantity": "example", "unit_price": 1, "vat_rate": "example" } ], "next_generation_date": "example", "notes": "example", "operation_nature": "example", "title": "example"}Responses
Section intitulée « Responses »The updated template.
Public projection of a [RecurringInvoice].
object
Whether each auto-sent invoice is debited off-session via a stored SEPA
mandate (per-series opt-in; defaults to false).
Whether generated drafts are finalized and sent automatically.
Target contact.
RFC3339 creation timestamp.
Cadence (monthly/quarterly/yearly).
Stable identifier.
Line items snapshot (JSONB array).
object
Next generation date (YYYY-MM-DD).
Optional notes for generated documents.
Operation nature (biens/services/mixte) applied to generated
documents; null when unset.
RFC3339 pause timestamp, or null when active.
Lifecycle status derived from paused_at: "active" or "paused".
Optional title for generated documents.
RFC3339 last-update timestamp.
Examplegenerated
{ "auto_collect_sepa": true, "auto_send": true, "contact_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "created_at": "example", "frequency": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "items": {}, "next_generation_date": "example", "notes": "example", "operation_nature": "example", "paused_at": "example", "status": "example", "title": "example", "updated_at": "example"}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Examplegenerated
{ "code": "example", "field": "example", "message": "example"}Missing invoice:write scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Examplegenerated
{ "code": "example", "field": "example", "message": "example"}Not found or cross-org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Examplegenerated
{ "code": "example", "field": "example", "message": "example"}Invalid recurring payload.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Examplegenerated
{ "code": "example", "field": "example", "message": "example"}