Skip to content

Get shared subscriptions

/me/get_shared_subscriptions

Target audience: Developers

Release version: 3.9.1

Get shared subscriptions

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

Requirements

Identity Scope
Yes /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

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

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

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

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