# Mandarin.ID
Sandbox mode is used for testing. To connect, contact Support Service (opens new window).
**Data for requests for simplified identification in a test (sandbox) environment.
In this case, an SMS message with a code to confirm the phone number is not sent. You need to use the code from the table below.
| Parameter | Meaning | Comment |
|---|---|---|
| firstName | Polygraph | |
| patronymic | Poligrafovich | |
| lastName | Sharikov | |
| smsCode | 000000 | All numbers are zeros. The number of digits in the SMS code is set in the merchant settings |
The remaining parameters can be anything.
# Query examples
Example of a request for identification using SNILS:
curl --request POST \
--url https://secure.mandarinpay.com/api/personidentification \
--header 'Content-Type: application/json' \
--header 'x-auth: {{x_auth}}' \
--data-raw '{
"firstName": "Полиграф",
"patronymic": "Полиграфович",
"lastName": "Шариков",
"passportSeries": "0306",
"passportNumber": "322484",
"snils": "11201709284",
"phone": "+79001234567"
}'
```**Example of a request for identification by TIN:**
::: warning PLEASE ATTENTION!
The snils parameter is also required for a request for identification by TIN, but in this case the value NULL is passed.
:::
```bash
curl --request POST \
--url https://secure.mandarinpay.com/api/personidentification \
--header 'Content-Type: application/json' \
--header 'x-auth: {{x_auth}}' \
--data-raw '{
"firstName": "Полиграф",
"lastName": "Шариков",
"patronymic": "Полиграфович",
"passportSeries": "1111",
"passportNumber": "111111",
"snils": "",
"inn": "501716749325",
"phone": "+79001234567"
}'
Response in case of successful creation of a request (200 OK):
{
"id": "794d3cc7-a2b4-4579-9173-bafc7d7dc29d"
}
Example of a request with an SMS code sent for verification:
curl --request PUT \
--url https://secure.mandarinpay.com/api/personidentification/{id} \
--header 'Content-Type: application/json' \
--header 'x-auth: {{x_auth}}' \
--data-raw '{
"smsCode": "000000"
}'
Response in case of successful creation of a request (200 OK):
{
"id": "794d3cc7-a2b4-4579-9173-bafc7d7dc29d"
}
```**Query identification status:**
```bash
curl --request GET \
--url https://secure.mandarinpay.com/api/personidentification/{id} \
--header 'x-auth: {{x_auth}}'
Response in case of successful completion of the request (200 OK):
The data indicated is Sharikov Poligraf Poligrafovich. A request to submit the code for verification has not yet been made.
{
"id": "485fc237-a8b8-45f9-816d-fb7de3715e2b",
"phoneVerified": null,
"phoneVerificationFinished": false,
"personVerified": true,
"personVerificationFinished": true,
"personVerificationError": "Sandbox mode"
}
The data indicated is Sharikov Poligraf Poligrafovich. The code has been sent for verification.
{
"id": "485fc237-a8b8-45f9-816d-fb7de3715e2b",
"phoneVerified": true,
"phoneVerificationFinished": true,
"personVerified": true,
"personVerificationFinished": true,
"personVerificationError": "Sandbox mode"
}
The data provided is different from Sharikov Poligraf Poligrafovich. The code has been sent for verification.
{
"id": "d3552b7c-80a6-4e0e-bf1f-ad0c7ff2d705",
"phoneVerified": true,
"phoneVerificationFinished": true,
"personVerified": false,
"personVerificationFinished": true,
"personVerificationError": "Sandbox mode"
}
# Possible errors
error code 401 - Request authorization failed, check the authorization is correct.
{
"error": "Authentication error: "
}
error code 400 - The id value is not specified for the identification status request.
{
"sessionId": [
"The value '{id}\n' is not valid."
]
}
error code 400 - The snils parameter was not specified in the identification request.
{
"snils": [
"Required property 'snils' not found in JSON. Path '', line 9, position 1."
]
}
error code 400 - The snils parameter contains invalid characters or exceeds the field size.
{
"snils": [
"The field Snils must match the regular expression '[0-9]{11}'."
]
}
Errors 5xx - Error on the server side. (Extremely rare)