REST API

Subscriptions API

Recurring document and subscription API for invoice and purchase-order templates, scheduling, activation, pausing, resuming, cancellation, and on-demand generation.

Generated from the Celerp 2.5.0 OpenAPI schema, 21 September 2026.

GET /subscriptions

List Recurring Document Templates

Return recurring document templates matching the documented filters and pagination options.

Parameters

NameInRequiredTypeDescription
directionquery--string, optionalSort or schedule direction supported by the subscriptions endpoint.
statusquery--string, optionalRecord or workflow status used to filter results or select the requested lifecycle state.
qquery--string, optionalSearch text used to filter matching records.
limitquery--integerMaximum number of records to return.
offsetquery--integerNumber of matching records to skip before returning results.

Responses

StatusDescriptionBody
200Returns the requested recurring document templates.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X GET http://localhost:8000/subscriptions \
  -H "Authorization: Bearer $TOKEN"

POST /subscriptions/{entity_id}/activate

Activate Recurring Document

Activate a draft recurring document and schedule its first run.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Responses

StatusDescriptionBody
200Returns `ok: true` and the next date a document will be generated.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/subscriptions/:entity_id/activate \
  -H "Authorization: Bearer $TOKEN"

POST /subscriptions/{entity_id}/cancel

Cancel Recurring Document

Cancel a recurring document. No further documents are generated.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Responses

StatusDescriptionBody
200Returns `ok: true` when the change is saved.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/subscriptions/:entity_id/cancel \
  -H "Authorization: Bearer $TOKEN"

POST /subscriptions/{entity_id}/generate

Generate Recurring Document Now

Generate a finalized document from the subscription template immediately.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Responses

StatusDescriptionBody
200Returns the new document's ID and number, and the next run date.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/subscriptions/:entity_id/generate \
  -H "Authorization: Bearer $TOKEN"

POST /subscriptions/{entity_id}/pause

Pause Recurring Document

Pause a recurring document. No documents are generated until it is resumed.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Responses

StatusDescriptionBody
200Returns `ok: true` when the change is saved.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/subscriptions/:entity_id/pause \
  -H "Authorization: Bearer $TOKEN"

POST /subscriptions/{entity_id}/resume

Resume Recurring Document

Resume a paused recurring document and schedule its next run.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstringIdentifier of the requested Celerp record.

Responses

StatusDescriptionBody
200Returns `ok: true` and the next date a document will be generated.object
422The request failed validation. The response lists each invalid field and why.HTTPValidationError

Example

curl -X POST http://localhost:8000/subscriptions/:entity_id/resume \
  -H "Authorization: Bearer $TOKEN"