Skip to content

Get

/userproducts/{accountId}

Target audience: Developers

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

Required scope

1
/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

1
2
3
4
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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"
        }
    ]
}

Errors

Example error response

1
2
3
4
5
6
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