Skip to content

Latest commit

 

History

History
144 lines (108 loc) · 4.92 KB

user-verifications.md

File metadata and controls

144 lines (108 loc) · 4.92 KB

User Verifications

$userVerificationsController = $client->getUserVerificationsController();

Class Name

UserVerificationsController

Methods

Get User Verification

Get user verification

function getUserVerification(string $userVerificationId): ResponseUserVerification

Parameters

Parameter Type Tags Description
userVerificationId string Template, Required Constraints: Pattern: ^(([0-9a-fA-F\-]{24,36})|(([0-9a-fA-F]{8})-(([0-9a-fA-F]{4}\-){3})([0-9a-fA-F]{12})))$

Response Type

ResponseUserVerification

Example Usage

$userVerificationId = '11e95f8ec39de8fbdb0a4f1a';

$result = $userVerificationsController->getUserVerification($userVerificationId);

Example Response (as JSON)

{
  "type": "UserVerification",
  "data": {
    "id": "11e95f8ec39de8fbdb0a4f1a",
    "user_id": "11e95f8ec39de8fbdb0a4f1a",
    "hash": "123456781234567812345678",
    "created_ts": 1422040992
  }
}

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized Response401tokenException

List User Verifications

List user verifications

function listUserVerifications(
    ?Page $page = null,
    ?Sort30 $sort = null,
    ?Filter14 $filter = null,
    ?array $expand = null
): ResponseUserVerificationsCollection

Parameters

Parameter Type Tags Description
page ?Page Query, Optional Use this field to specify paginate your results, by using page size and number. You can use one of the following methods:

> /endpoint?page={ "number": 1, "size": 50 }
>
> /endpoint?page[number]=1&page[size]=50
sort ?Sort30 Query, Optional You can use any field_name from this endpoint results, and you can combine more than one field for more complex sorting. You can use one of the following methods:

> /endpoint?sort={ "field_name": "asc", "field_name2": "desc" }
>
> /endpoint?sort[field_name]=asc&sort[field_name2]=desc
filter ?Filter14 Query, Optional You can use any field_name from this endpoint results as a filter, and you can also use more than one field to create AND conditions. For date fields (ended with _ts), you can also search for ranges using the $gte (Greater than or equal to) and/or $lte (Lower than or equal to). You can use one of the following methods:

> /endpoint?filter={ "field_name": "Value" }
>
> /endpoint?filter[field_name]=Value
>
> /endpoint?filter={ "created_ts": "today" }
>
> /endpoint?filter[created_ts]=today
>
> /endpoint?filter={ "created_ts": { "$gte": "yesterday", "$lte": "today" } }
>
> /endpoint?filter[created_ts][$gte]=yesterday&filter[created_ts][$lte]=today
>
> /endpoint?filter[address][city]=memphis
>
> /endpoint?filter={ "address": { "city" : "memphis" } }
expand ?(string[]) Query, Optional Most endpoints in the API have a way to retrieve extra data related to the current record being retrieved. For example, if the API request is for the accountvaults endpoint, and the end user also needs to know which contact the token belongs to, this data can be returned in the accountvaults endpoint request.
Constraints: Unique Items Required, Pattern: ^[\w]+$

Response Type

ResponseUserVerificationsCollection

Example Usage

$page = PageBuilder::init()
    ->number(1)
    ->size(50)
    ->build();

$result = $userVerificationsController->listUserVerifications($page);

Example Response (as JSON)

{
  "type": "UserVerificationsCollection",
  "list": [
    {
      "id": "11e95f8ec39de8fbdb0a4f1a",
      "user_id": "11e95f8ec39de8fbdb0a4f1a",
      "hash": "123456781234567812345678",
      "created_ts": 1422040992
    }
  ],
  "links": {
    "type": "Links",
    "first": "/v1/endpoint?page[size]=10&page[number]=1",
    "previous": "/v1/endpoint?page[size]=10&page[number]=5",
    "last": "/v1/endpoint?page[size]=10&page[number]=42"
  },
  "pagination": {
    "type": "Pagination",
    "total_count": 423,
    "page_count": 42,
    "page_number": 6,
    "page_size": 10
  },
  "sort": {
    "type": "Sorting",
    "fields": [
      {
        "field": "last_name",
        "order": "asc"
      }
    ]
  }
}

Errors

HTTP Status Code Error Description Exception Class
401 Unauthorized Response401tokenException