REST API

Subscriptions API

Manage recurring billing and automatic invoicing.

Generated from the Celerp 2.4.0 OpenAPI schema, 16 September 2026.

GET /subscriptions

List Subscription Templates

List subscription templates (docs with subscription_invoice/subscription_po doc_type).

Parameters

NameInRequiredTypeDescription
directionquery--string, optional--
statusquery--string, optional--
qquery--string, optional--
limitquery--integer--
offsetquery--integer--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /subscriptions/{entity_id}/activate

Activate Subscription

Promote a draft subscription template to active, computing next_run_date.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /subscriptions/{entity_id}/cancel

Cancel Subscription

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /subscriptions/{entity_id}/generate

Generate Now

Generate a finalized document from the subscription template immediately.

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /subscriptions/{entity_id}/pause

Pause Subscription

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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

POST /subscriptions/{entity_id}/resume

Resume Subscription

Parameters

NameInRequiredTypeDescription
entity_idpathyesstring--

Responses

StatusDescriptionBody
200Successful Responseobject
422Validation ErrorHTTPValidationError

Example

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