Skip to content

List Subscriptions

GET
/tenant/{tenantId}/subscription
curl --request GET \
--url https://api.exolink.cloud/tenant/example/subscription \
--header 'Authorization: Bearer <token>' \
--header 'x-exo-fields: ["id","displayName"]' \
--header 'x-exo-filter: ["eq","profileId",3]' \
--header 'x-exo-sort: ["asc","displayName"]'

Retrieve the tenant’s active subscriptions

tenantId
required
string

Tenant domain prefix

x-exo-fields
string

JSON array of the fields to return

Example

["id","displayName"]
x-exo-filter
string

JSON filter expression [operator, field, value]. Operators: eq, ne, gt, gte, lt, lte, in, nin, like, ilike, nlike, nilike, null, nnull, and eqc, nec, gtc, gtec, ltc, ltec to compare two fields. Combine expressions with ["and", ...] or ["or", ...].

Example

["eq","profileId",3]
x-exo-page
integer
>= 1

Page number, starting at 1. Applies together with x-exo-size.

x-exo-size
integer
>= 1

Page size. Every returned row then carries __total, the number of matching rows.

x-exo-sort
string

JSON sort [direction, field] with direction asc or desc, or a list of them

Example

["asc","displayName"]

Subscriptions

Media typeapplication/json
Array<object>

Tenant subscription information

object
id

Subscription ID

integer
tenantId

Tenant ID

integer
productId

Product ID

integer
productName

Product name

string
productDisplayName

Product name as shown on receipts

string
productMetadata

Additional information for the product

object
productType

Product type

string
nullable
chargerCount

Number of chargers of the tenant. Connect subscriptions only.

integer
cancelAt

When the subscription ends, if cancelled

string format: date-time
nullable
createdAt
string format: date-time
updatedAt
string format: date-time
deletedAt
string format: date-time
nullable

Example

[
{
"productType": "connect"
}
]

Missing, invalid or expired credentials

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Not authorized",
"errorCode": "ERR_API_NOT_AUTHORIZED"
}

The caller may not perform this action

Media typeapplication/json

Error response. Some rejections carry only message.

object
message
required

Error message

string
errorCode

Error code

string
Allowed values: ERR_API_BAD_REQUEST ERR_API_NOT_AUTHORIZED ERR_API_PAYMENT_REQUIRED ERR_API_FORBIDDEN ERR_API_RESOURCE_NOT_FOUND ERR_API_RESOURCE_IN_USE ERR_API_RESOURCE_ALREADY_EXISTS ERR_API_UNEXPECTED_STATE ERR_API_CONTENT_TOO_LARGE ERR_API_VALIDATION_FAILED ERR_API_VERIFICATION_FAILED ERR_API_NO_TENANT ERR_API_INVALID_INVITATION ERR_API_USER_DISABLED ERR_API_FAILED_DEPENDENCY ERR_EXOLINK_GENERIC
details

Failed validations, for requests checked against a schema

Array<object>
object
path

Path of the invalid field

string
message
string
code
string

Example

{
"message": "Forbidden",
"errorCode": "ERR_API_FORBIDDEN"
}