Skip to content

Pending verification request

/accounts/pending_verification_request

Target audience: Developers

Release version: 4.9.24

Pending verification request

Introduction

This endpoint returns the pending verification request for an account. If no pending request exists, the response will indicate whether the account is already verified or has no pending request.

URI

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

Requirements

Identity Scope
No /external/account/r

Parameters

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

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/pending_verification_request?account_id=5c6291d537c2ed78a11518b7 \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <token>'

Response

Field Description
id The id of the verification request (only present if a pending request exists)
account_id The id of the account
status The status of the request: "pending", "verified" or "no_pending_request"
expires_at Timestamp for when the verification request expires (only present if pending request exists)
created_at Timestamp for when the verification request was created (only present if pending request exists)
verified Whether the account is verified

Example response - pending request

HTTP 200
{
  "item": {
    "id": "5caf3c206e95528fe2943abe",
    "account_id": "5c6291d537c2ed78a11518b7",
    "status": "pending",
    "expires_at": "2024-01-15 12:00:00 UTC",
    "created_at": "2024-01-14 12:00:00 UTC",
    "verified": false
  }
}

Example response - no pending request

HTTP 200
{
  "item": {
    "account_id": "5c6291d537c2ed78a11518b7",
    "status": "no_pending_request",
    "verified": false
  }
}

Example response - already verified

HTTP 200
{
  "item": {
    "account_id": "5c6291d537c2ed78a11518b7",
    "status": "verified",
    "verified": true
  }
}

Errors

Example error response

HTTP 400 Bad request
{
  "code": "unknown_parameter",
  "message": "Unknown parameters: my_parameter"
}

HTTP 400 Bad Request

Name Type Description
invalid_parameter Object Validation error on any of the fields in the posted json
unknown_parameter Object One or more of the fields in the posted json was not recognized

HTTP 404 Not Found

Name Type Description
does_not_exist Object The account does not exist

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side