Appearance
Government ID and age verification
Upload or parse identity images, save government-ID records, and run age or image matching checks. Image endpoints use multipart form data; record endpoints use JSON.
Access labels such as Origin + Brand key + Customer are defined in Headers and access. Each endpoint ends in a Try it console; set the host and keys once in its Settings tab or on the overview.
Verify user image with license
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/user/verify/image/license | Origin + Customer + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | object | yes | — |
body.payload.target_image | string | yes | Whitespace trimmed |
body.payload.source_image | string | yes | Whitespace trimmed |
Example:
bash
curl -X POST "$BASE_URL/api/v1/user/verify/image/license" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{"target_image":"https://files.example/image.jpg","source_image":"https://files.example/image.jpg"}}'Response: JSON with success: true and result containing the operation’s service data. Result fields/details: age_verified, similarity_score, user_id.
Source: app/v1/controller/customer_controller.js:1490 → verifyUserImageWithLicense; routes: routes/v1/customer_route.js:633; service: _verifyUserImageWithLicense (app/v1/service/customer_service.js:3476).
Upload image
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/user/uploadImage | Origin + Brand key + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
multipart.file | file | yes | No controller schema |
Example:
bash
curl -X POST "$BASE_URL/api/v1/user/uploadImage" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-F "file=@/path/to/image.jpg"Response: JSON with success: true and result containing the operation’s service data. Result fields/details: file, link.
Source: app/v1/controller/govtId_controller.js:17 → uploadImage; routes: routes/v1/govtId_route.js:20; service: _uploadFile (app/v1/service/govtId_service.js:47).
Parse government ID
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/user/parseGovtId | Origin + Brand key + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
multipart.file | file | yes | No controller schema |
Example:
bash
curl -X POST "$BASE_URL/api/v1/user/parseGovtId" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-F "file=@/path/to/image.jpg"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/govtId_controller.js:73 → parseGovtId; routes: routes/v1/govtId_route.js:30; service: _getTextFromImage (app/v1/service/govtId_service.js:73).
Add user government ID
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/user/govtId/add | Origin + Brand key + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | object | yes | — |
body.payload.governmentId | string | conditional | Optional for type mmic, rec, or patientId; required for other types |
body.payload.expiration | date | yes | — |
body.payload.fileName | string | yes | Whitespace trimmed |
body.payload.type | string | yes | Whitespace trimmed |
body.payload.isValid | boolean | yes | — |
body.payload.dateOfBirth | date | optional | ISO date |
body.payload.identification_json | any JSON value | optional | — |
Example:
bash
curl -X POST "$BASE_URL/api/v1/user/govtId/add" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{"governmentId":"<GOVERNMENT_ID>","expiration":"2030-01-01","fileName":"<UPLOADED_FILE_NAME>","type":"age_proof","isValid":true}}'Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, userDocumentId.
Source: app/v1/controller/govtId_controller.js:101 → addUserGovtID; routes: routes/v1/govtId_route.js:40; service: _addUserGovtId (app/v1/service/govtId_service.js:132).
Get user government IDs
| Method | URL path | Required access |
|---|---|---|
GET | /api/v1/user/govtId | Origin + Brand key + Customer |
Request fields: no body, query, or path fields are read by this controller. Context comes from the headers/middleware above.
Example:
bash
curl -X GET "$BASE_URL/api/v1/user/govtId" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/govtId_controller.js:144 → getUserGovernmentIds; routes: routes/v1/govtId_route.js:50; service: _getUserGovernmentIds (app/v1/service/govtId_service.js:181).
Update government ID
| Method | URL path | Required access |
|---|---|---|
PUT | /api/v1/user/updateGovtId/:userDocumentId | Origin + Brand key + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
body.payload | object | yes | — |
body.payload.governmentId | string | optional | Whitespace trimmed |
body.payload.expiration | date | optional | — |
body.payload.fileName | string | optional | Whitespace trimmed |
body.payload.type | string | optional | Whitespace trimmed |
body.payload.isValid | boolean | optional | — |
body.payload.dateOfBirth | date | optional | ISO date |
path.userDocumentId | string | yes | No controller schema |
Example:
bash
curl -X PUT "$BASE_URL/api/v1/user/updateGovtId/<USERDOCUMENTID>" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-H 'Content-Type: application/json' \
--data-raw '{"payload":{"type":"example"}}'Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/govtId_controller.js:156 → updateGovtID; routes: routes/v1/govtId_route.js:60; service: _updateGovtId (app/v1/service/govtId_service.js:197).
Parse open government ID
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/brand/parseGovtId | Origin + Brand key |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
multipart.file | file | yes | No controller schema |
Example:
bash
curl -X POST "$BASE_URL/api/v1/brand/parseGovtId" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-F "file=@/path/to/image.jpg"Response: JSON with success: true and result containing the operation’s service data.
Source: app/v1/controller/govtId_controller.js:199 → parseOpenGovtId; routes: routes/v1/govtId_route.js:70; service: _getTextFromOpenImage (app/v1/service/govtId_service.js:276).
Add user government ID for age gate
| Method | URL path | Required access |
|---|---|---|
POST | /api/v1/user/age/gate/govtId/add | Origin + Brand key + Customer |
Request fields:
| Field | Type | Required | Rules / meaning |
|---|---|---|---|
multipart.back_file | file | optional | No controller schema |
multipart.file | file | yes | No controller schema |
Use multipart file for the front image and optional back_file for the back image.
Example:
bash
curl -X POST "$BASE_URL/api/v1/user/age/gate/govtId/add" \
-H "Origin: $ORIGIN" \
-H "api-key: $API_KEY" \
-H "Authorization: Bearer $CUSTOMER_TOKEN" \
-F "file=@/path/to/image.jpg"Response: JSON with success: true and result containing the operation’s service data. Result fields/details: message, userDocumentId, fileName, link.
Source: app/v1/controller/govtId_controller.js:227 → addUserGovtIDForAgeGate; routes: routes/v1/govtId_route.js:91; service: _verifyAndAddGovtId (app/v1/service/govtId_service.js:350).