Skip to content

Remove sharing

/me/remove_sharing

Target audience: Developers

Remove share

Introduction

This endpoint deletes a shared subscription. It will deactivate the receivers subscription and if successful send a confirmation mail to the sharer.

URI

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

Requirements

Identity Scope
Yes /external/me/w

Parameters

Field Required Type Description
package_sharing_id Required String The id of the package to be activated.
Size range: ..24
Allowed values: "/^[a-f\d]{24}$/i"

Curl Example

curl --request DELETE \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/me/remove_sharing \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "package_sharing_id": "585a4768edce2c5e6f000001"
          }'

Response

Example Response: Successfully deleted sharing

HTTP 200
{
    "item": "true"
}

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
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
invalid_account Object This account does not have access to deactivate the shared subscripton

HTTP 404 Not Found

Name Type Description
not_found Object The account or product could not be found

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side