apyhub
Back
▣ VERIFICATION KIT

Batch Validate MENA IDs API

What it does

The batch ID validation API checks up to 100 Middle East and North Africa ID and data values in one call. Send a list in items, where each item has a type, a value and, for some types, a country.

You can mix seven types in one list: saudi-id, emirates-id, egypt-national-id, iban, mobile, tax-number and company-registration. Each result keeps the type you sent and returns the same fields as the single check, such as valid, the cleaned-up value and problem codes.

Spaces, dashes and Arabic-Indic digits are cleaned up first. A list over 100 items, an unknown type or a value that is not a string returns a 422 error.

Teams use the batch ID validation API to clean customer and supplier files, check records before a migration and validate uploads in back-office tools.

These are format and checksum checks. They catch typos and made-up numbers but do not confirm that an ID or account exists in a government or bank register.

For one value at a time, use the single checks, such as the Validate Saudi National ID & Iqama API or the Validate IBAN & Bank Name API.

POST
Batch Validation
https://api.eu.apyhub.com/odelyo/mena-id-and-data-validation-api/batch

QUICKSTART

GUIDE

Quickstart

Validate one or more MENA IDs or related identifiers by sending an items array with the type and value you want to check.

curl -X POST "https://api.eu.apyhub.com/odelyo/mena-id-and-data-validation-api/batch" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"items":[{"type":"saudi-id","value":"1000000008"},{"type":"iban","value":"SA0380000000608010167519"},{"type":"mobile","value":"+966501234567","country":"SA"}]}'

What you'll get back

Returns a JSON object with data (the validation result) and meta (request id and version). Below is the real response for the request above.

{
  "data": {
    "results": [
      {
        "valid": true,
        "input": "1000000008",
        "normalized": "1000000008",
        "problems": [],
        "type": "saudi-id",
        "id_type": "citizen",
        "document": "National ID"
      },
      {
        "valid": true,
        "input": "SA0380000000608010167519",
        "normalized": "SA0380000000608010167519",
        "formatted": "SA03 8000 0000 6080 1016 7519",
        "problems": [],
        "country": "SA",
        "country_supported": true,
        "bank_code": "80",
        "bank": "Al Rajhi Bank",
        "type": "iban"
      },
      {
        "valid": true,
        "input": "+966501234567",
        "problems": [],
        "country": "SA",
        "e164": "+966501234567",
        "national": "0501234567",
        "original_operator": "STC",
        "note": "Operator is the original one for the prefix; the number may have been ported.",
        "type": "mobile"
      }
    ]
  },
  "meta": {
    "request_id": "req_17fc3b941f357c5f",
    "version": "v1"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
items*
items-1*

About this endpoint

What it does

Validates a batch of identification or data values in a single request. You send an array of items to validate, and the response returns a data field plus optional request metadata.

Request Body

ParameterTypeMandatoryDescription
itemsObject ArrayYesBatch of validation items. Minimum 1 item, maximum 100 items.
items[].typeENUMYesValidation type. Allowed values: egypt-national-id, saudi-id, emirates-id, iban, mobile, tax-number, company-registration.
items[].valueStringYesValue to validate. Minimum length 1, maximum length 64.
items[].countryStringNoCountry code associated with the item. Maximum length 6.

Response

Returns a JSON object with a data object holding the validation result and a meta object with the request_id and API version. data.results has one result per item you sent. Invalid values still return 200 with valid: false and the reasons in problems. Requests with a missing or wrong-type field return 422 with an error object.

ParameterTypeDescription
dataObjectThe validation result.
data.resultsObject ArrayOne result per item, in the order you sent them. Each result has the same fields as the matching single endpoint (for example bank for iban or e164 for mobile).
data.results[].typeStringThe type you sent for the item, e.g. saudi-id, iban, mobile.
data.results[].validBooleantrue if the item passes all checks.
data.results[].inputStringThe value you sent for the item.
data.results[].normalizedStringThe item value after cleanup.
data.results[].problemsString ArrayProblem codes for the item. Empty when valid.
metaObjectRequest details.
meta.request_idStringUnique id of this request, useful for support.
meta.versionStringAPI version, e.g. v1.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.