Skip to content

/archive

/accounts/archive

Target audience: Developers

Introduction

This endpoint archives the given account immediately.

Danger

Archived accounts cannot be restored once archived. Use with caution

URI

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

Required scope

1
/external/account/archive/w

Parameters

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

Curl Example

1
2
3
4
curl --request DELETE \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/account/archive?account_id=1234567890 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token'

Response

Example Response: Successfully archived account

1
2
HTTP 204 No Content
{}

Errors

Example error response

1
2
3
4
5
HTTP 409 Conflict
{
  "code": "archive_account_with_active_products",
  "message": "package_code,embedded_product_code"
}

HTTP 400 Bad Request

Name Type Description
invalid_parameter Object Account_id

HTTP 404 Not Found

Name Type Description
not_found Object The account_id could not be found

HTTP 409 Conflict

Name Type Description
archive_account_with_active_products Object An account with an active subscription cannot be archived.

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side