Skip to content

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 ​

MethodURL pathRequired access
POST/api/v1/user/verify/image/licenseOrigin + Customer + Brand key

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.target_imagestringyesWhitespace trimmed
body.payload.source_imagestringyesWhitespace 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 ​

MethodURL pathRequired access
POST/api/v1/user/uploadImageOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
multipart.filefileyesNo 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 ​

MethodURL pathRequired access
POST/api/v1/user/parseGovtIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
multipart.filefileyesNo 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 ​

MethodURL pathRequired access
POST/api/v1/user/govtId/addOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.governmentIdstringconditionalOptional for type mmic, rec, or patientId; required for other types
body.payload.expirationdateyes—
body.payload.fileNamestringyesWhitespace trimmed
body.payload.typestringyesWhitespace trimmed
body.payload.isValidbooleanyes—
body.payload.dateOfBirthdateoptionalISO date
body.payload.identification_jsonany JSON valueoptional—

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 ​

MethodURL pathRequired access
GET/api/v1/user/govtIdOrigin + 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 ​

MethodURL pathRequired access
PUT/api/v1/user/updateGovtId/:userDocumentIdOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
body.payloadobjectyes—
body.payload.governmentIdstringoptionalWhitespace trimmed
body.payload.expirationdateoptional—
body.payload.fileNamestringoptionalWhitespace trimmed
body.payload.typestringoptionalWhitespace trimmed
body.payload.isValidbooleanoptional—
body.payload.dateOfBirthdateoptionalISO date
path.userDocumentIdstringyesNo 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 ​

MethodURL pathRequired access
POST/api/v1/brand/parseGovtIdOrigin + Brand key

Request fields:

FieldTypeRequiredRules / meaning
multipart.filefileyesNo 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 ​

MethodURL pathRequired access
POST/api/v1/user/age/gate/govtId/addOrigin + Brand key + Customer

Request fields:

FieldTypeRequiredRules / meaning
multipart.back_filefileoptionalNo controller schema
multipart.filefileyesNo 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).

Batch platform, Shopify app and API documentation