Get
/userproducts/{accountId}
Target audience: Developers
Get subscriptions for account
Introduction
Retrieves list of user-products for an account.
URI
Environment |
URI |
Stage |
https://payway-api.stage.adeprimo.se/external/api/v1/userproducts/52a781d6400e06897c00000f |
Production |
https://backend.worldoftulo.com/external/api/v1/userproducts/52a781d6400e06897c00000f |
Requirements
Identity |
Scope |
No |
/external/userproduct/w |
Parameters
Name |
Type |
Description |
account_id |
String |
The id of the account to list user products for. Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i" |
Curl Example
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/userproducts/52a781d6400e06897c00000f \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
Response
Successful response
HTTP 200
{
"items": [
{
"id": "56e1741a6fc9365306000002",
"created": "2013-12-10T22:04:22+01:00",
"updated": "2013-12-11T22:04:22+01:00",
"product_code": "digital",
"title_code": "TITLE",
"valid_from": "2013-12-10T22:04:22+01:00",
"valid_to": "2014-01-10T22:04:22+01:00",
"provision_service": "tulo",
"subscription_type": "limited",
"state": "activated",
"has_pending_change_request": false,
"external_start_date": null
//external_start_date available only for Kayak provisioned subscriptions
}
]
}
Errors
Example error response
HTTP 400 Bad Request
{
"code": "invalid_parameter",
"field": "account_id",
"message": "Parameter must match format (/^[a-f\d]{24}$/)"
}
HTTP 400 Bad Request
Name |
Type |
Description |
invalid_parameter |
Object |
Validation error on any of the fields in the posted json |
unknown_parameter |
Object |
One or more of the fields in the posted json was not recognized |
HTTP 404 Not Found
Name |
Type |
Description |
not_found |
Object |
The product could not be found |
HTTP 500 Internal Server Error
Name |
Type |
Description |
internal_server_error |
Object |
Something unexpected happened server side |