Skip to content

Pending package changes

/me/pending_package_changes

Target audience: Developers

Release version: 4.4.9

Pending package changes

Introduction

This endpoint provides information about whether a specified subscription has any pending downgrade- or change requests.

URI

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

Requirements

Identity Scope
Yes /external/me/r

Parameters

Field Required Type Description
user_product_id Optional String The ID of the subscription that should be checked. If none is specified, all changes for the current account will be fetched.
Size range: 24
Allowed values: "/^[a-f\d]{24}$/i"

Curl Example

curl --request PUT \
  --url https://payway-api.stage.adeprimo.se/external/api/v2/me/pending_package_changes \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "user_product_id": "50f3ac249f6aef294d000007"
          }'

Response

Field Description
downgrades Array of any pending downgrades on the subscription
changes Array of any pending changes on the subscription

Example Response

HTTP 200 OK
{
    "items": {
      "downgrades": [
        {
          "id": "50f3ac249f6aef294d000007",
          "state": "created",
          "created": "2022-01-28T12:55:21.137+01:00",
          "target_package": {
            "id": "50f3ac249f6aef294d000007",
            "code": "adeprimo_combo",
            "name": "Adeprimo Combo",
            "tags": []
          },
          "price_description": "You have this package until 21-02-2022. Afterwards you will change to adeprimo_combo.",
          "change_date": "2022-02-28T12:55:21.137+01:00"
        }
      ],
      "changes": []
    }
}

Errors

This API uses the common error conventions of the Payway API

See common error responses