Skip to content

/reactivate_product

/me/reactivate_product

Target audience: Developers

Introduction

This endpoint reactivates a user product that has been cancelled.

It is important to note that cancelled is not the same as deactivated. Cancelled means that the user product has been cancelled but not yet deactivated, IE the subscription term has not reached its end yet.

URI

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

Parameters

Field Required Description
id Required The id of the user product to reactivate

Curl Example

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

Response

Field Description
id The id of the reactivated user product

Example Response

1
2
3
4
HTTP 200
{
    "id": "50f3ac249f6aef294d000007"
}

Errors

Example error response

1
2
3
4
5
6
HTTP 400 Bad Request
{
    "code": "invalid_parameter",
    "field": "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
json_parser_error Object The request body could not be parsed as valid json
invalid_content_type_error Object The requests Content-Type header isn't set to application/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 account or product could not be found

HTTP 409 Conflict

Name Type Description
user_product_not_tulo_provisioned Object The product is not controlled by Payway and can not be reactivated
invalid_state Object The product is not cancelled and can not be reactivated
user_product_not_belong_to_account Object The product is not associated with the current account and the operation is therefore forbidden

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side