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
| Name | In | Required | Type | Description |
|---|
direction | query | -- | string, optional | -- |
status | query | -- | string, optional | -- |
q | query | -- | string, optional | -- |
limit | query | -- | integer | -- |
offset | query | -- | integer | -- |
Responses
| Status | Description | Body |
|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
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
| Name | In | Required | Type | Description |
|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/subscriptions/:entity_id/activate \
-H "Authorization: Bearer $TOKEN"
POST /subscriptions/{entity_id}/cancel
Cancel Subscription
Parameters
| Name | In | Required | Type | Description |
|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
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
| Name | In | Required | Type | Description |
|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/subscriptions/:entity_id/generate \
-H "Authorization: Bearer $TOKEN"
POST /subscriptions/{entity_id}/pause
Pause Subscription
Parameters
| Name | In | Required | Type | Description |
|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/subscriptions/:entity_id/pause \
-H "Authorization: Bearer $TOKEN"
POST /subscriptions/{entity_id}/resume
Resume Subscription
Parameters
| Name | In | Required | Type | Description |
|---|
entity_id | path | yes | string | -- |
Responses
| Status | Description | Body |
|---|
200 | Successful Response | object |
422 | Validation Error | HTTPValidationError |
Example
curl -X POST http://localhost:8000/subscriptions/:entity_id/resume \
-H "Authorization: Bearer $TOKEN"