List subscriptions
GET/clients/subscriptions
clients.subscriptions.search
Subscription status
represents current state of the subscription.
It is calculated according to package condition
, start_dt
and
stop_dt
of the package, and status of the last period.
Possible values:
active
– subscription is activated and there is an active period at the current moment.pending
– subscription is not activated or doesn't have an active period at the current moment, but still not deactivated.archive
– subscription is deactivated,stop_dt
of the package has passed orrenew_due
is already in the past.
Request​
- application/json
Bodyrequired
Number of rows to return (for pagination).
20
Number of rows to skip (for pagination).
0
List of columns to order results by.
Possible values: [clients_name
, -clients_name
, id
, -id
, packages_name
, -packages_name
, periods_start_dt
, -periods_start_dt
, start_dt
, -start_dt
, status
, -status
]
[]
Quick search (wildcards allowed).
Subscription ID.
Client ID.
Account ID.
Package ID.
Partition ID of the client.
Owner user ID of the client.
Real status at the current moment.
Possible values: [pending
, active
, archive
]
Subscription condition. Check method description for
more details on the difference between condition
and status
.
Possible values: [new
, activated
, deactivated
]
Responses​
- 200
- 400
- 401
- 404
- 422
- 500
List of subscription objects.
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
[
{}
]
The request contains invalid arguments or is malformed
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "Invalid request",
"data": {
"name": "Empty value is not allowed",
"payment_terms_id": "Object \"payment_terms(123)\" was not found!"
}
}
}
Access is not authorized
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "utoken-auth-failed: Authentication Failed: IP 10.0.0.1 is not allowed",
"data": {
"code": "utoken-auth-failed",
"message": "Authentication Failed: IP 10.0.0.1 is not allowed"
}
}
}
Requested object was not found
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "not_found: Object \"clients(123)\" was not found!",
"data": {
"code": "not_found",
"message": "Object \"clients(123)\" was not found!",
"object_name": "clients",
"object_id": "123"
}
}
}
A logical error occurred, making the request unprocessable
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "invoices-zero-amount: Impossible to create an invoice with zero amount",
"data": {
"code": "invoices-zero-amount",
"message": "Impossible to create an invoice with zero amount"
}
}
}
An unexpected error occurred
- application/json
- Schema
- Example (auto)
Schema
error object
{
"error": {
"message": "An unexpected error occurred"
}
}
Authorization: X-Api-Key
name: X-Api-Keytype: apiKeyin: headerdescription: Token for API access
- curl
- python
- nodejs
- php
- CURL
curl -L 'https://docs.jerasoft.net/clients/subscriptions' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <X-Api-Key>'