Get subscription state
GET/subscriptions/subscriptions/:subscription_uuid/states/:state_uuid
Get subscription state
Request
Path Parameters
The unique identifier of the subscription.
The unique identifier of the subscription state.
Responses
- 200
- 400
- 404
- 500
Success. A subscription state is returned.
- application/json
- Schema
- Example (from schema)
Schema
data SubscriptionState
The unique identifier.
Possible values: [subscription_state
]
This represents the type of resource object being returned. Always subscription_state
.
attributes SubscriptionStateAttributesrequired
Possible values: [cancel
, pause
, resume
, pending
]
The subscription lifecycle is the states that a subscription can go through when a customer subscribes to a service or a product.
A subscription can have the following states; canceled
, paused
, or resumed
.
meta StateMetarequired
The date and time a resource was created.
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "subscription_state",
"attributes": {
"action": "cancel"
},
"meta": {
"created_at": "2017-01-10T11:41:19.244842Z"
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": "400",
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (from schema)
- not-found
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "No plan found"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}