Skip to content

Change product

/me/change_product

Target audience: Developers

Upgrade/downgrade subscription

Introduction

This endpoint lets you request a package change on an ongoing subscription. There are a number of requirements to take into account when using this functionality, which you can read more about here.

URI

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

Requirements

Identity Scope
Yes /external/me/w

Parameters

Field Required Type Description
id Optional String The id of the user product to change product on.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"
package_code Optional String The package_code of the package to upgrade/downgrade into.
Size range: 1..50

Curl Example

1
2
3
4
5
6
7
8
9
curl --request PUT \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/me/change_product \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
              "id": "50f3ac249f6aef294d000007",
              "package_code": "adeprimo_premium_extra_large"
          }'

Response

Field Description
id The id of the new user product.
1
2
3
4
HTTP 200 Updated
{
    "id": "50f3ac249f6aef294d000007"
}

Errors

This API uses the common error conventions of the Payway API

See common error responses