Skip to content

/get_shared_subscriptions

/me/get_shared_subscriptions

Target audience: Developers

1
Release version: 3.9.1

Introduction

This endpoint will return all shared subscriptions for an account with receivers id, contact email and the shared user product id.

Optional, if user_product_id is given it will return receivers id, contact email and the specific user product id that was given.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/me/get_shared_subscriptions
Production https://backend.worldoftulo.com/external/api/v1/me/get_shared_subscriptions

Required scope

1
/external/me/w

Parameters

Name Type Description
user_product_id String The id of the user product, optional.
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/me/get_shared_subscriptions \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <access_token_with_identity>'

Response

Example response: Without user_product_id

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
HTTP 200
{
    "items": [
        {
          "account_id": "5c6291d537c2ed78a11518b7",
          "product_sharing_id": "5c6291d537c2ed78a11518bf",
          "state": "active",
          "contact_email": "receiver1@accepted.com",
          "user_product_id": "5c6291d537c2ed78a11518a3",
          "sharing_limit": 2
        },
        {
          "account_id": "5c6291d537c2ed78a11518bb",
          "product_sharing_id": "5c6291d537c2ed78a1151349",
          "state": "pending",
          "contact_email": "receiver2@accepted.com",
          "user_product_id": "5c6291d537c2ed78a11518a3",
          "sharing_limit": 2
        },
        {
          "account_id": "5c6291d537c2ed78a11518bb",
          "product_sharing_id": "5c6291d537c2ed78a11518c0",
          "state": "active",
          "contact_email": "receiver2@accepted.com",
          "user_product_id": "5c4870b037c2ed8581431300",
          "sharing_limit": 1
        }
    ]
}

Example response: With user_product_id

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
HTTP 200
{
    "items": [
        {
          "account_id": "5c6291d537c2ed78a11518b7",
          "product_sharing_id": "5c6291d537c2ed78a11456ec",
          "state": "active",
          "contact_email": "receiver1@accepted.com",
          "user_product_id": "5c6291d537c2ed78a11534e9",
          "sharing_limit": 2
        },
        {
          "account_id": "5c6291d537c2ed78a11518bb",
          "product_sharing_id": "5c6291d537c2ed78a11534c0",
          "state": "active",
          "contact_email": "receiver2@accepted.com",
          "user_product_id": "5c6291d537c2ed78a11534e9",
          "sharing_limit": 2
        }
    ]
}

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
unknown_parameter Object One or more parameters was not recognized

HTTP 404 Not Found

Name Type Description
not_found Object The account could not be found

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side