apyhub
Back
▣ VERIFICATION KIT

Validate Saudi Commercial Registration API

What it does

The Saudi commercial registration validation API checks a Saudi CR number. Send the number in value with country set to SA, and get back valid, the cleaned-up number and the rule that was applied.

A Saudi commercial registration number has 10 digits. The first digit is the issuing city group, from 1 to 7. Spaces, dashes and Arabic-Indic digits are cleaned up first. Wrong lengths or a first digit outside 1 to 7 return valid: false with the problem invalid_format.

Only Saudi Arabia is supported, so country must be SA. Any other value returns a 422 error.

Teams use the Saudi commercial registration validation API in B2B onboarding and KYB forms, supplier records and e-invoicing setup.

This is a format check. It does not confirm that the company is registered or active with the Ministry of Commerce.

To check the company's VAT number too, use the Validate MENA VAT & Tax Number API. To check many values at once, use the Batch Validate MENA IDs API.

POST
Commercial Registration
https://api.eu.apyhub.com/odelyo/validate-saudi-commercial-registration/company-registrations

QUICKSTART

GUIDE

Quickstart

Validate a Saudi value by sending the required value and country fields as JSON.

curl -X POST "https://api.eu.apyhub.com/odelyo/validate-saudi-commercial-registration/company-registrations" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":"1010010030","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": {
    "valid": true,
    "input": "1010010030",
    "normalized": "1010010030",
    "problems": [],
    "country": "SA",
    "registration_type": "commercial-registration",
    "rule": "Saudi commercial registration: 10 digits, first digit is the issuing city group (1-7)"
  },
  "meta": {
    "request_id": "req_f4d9e7123c4232d9",
    "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*
Country of the commercial registration. Only Saudi Arabia (`SA`) is supported: a 10-digit commercial registration number.

About this endpoint

What it does

Validates a commercial registration value for the specified country and returns a JSON object with validation data plus optional metadata.

Request Body

ParameterTypeMandatoryDescription
valueStringYesThe commercial registration value to validate. String length must be between 1 and 64 characters.
countryENUMYesCountry of the registration. Only SA (Saudi Arabia) is supported, for 10-digit commercial registration numbers.

Response

Returns a JSON object with a data object holding the validation result and a meta object with the request_id and API version. 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.validBooleantrue if the value passes all checks for its format.
data.inputStringThe value you sent.
data.normalizedStringThe value after cleanup: spaces and separators removed and Arabic-Indic digits converted to Latin digits.
data.problemsString ArrayProblem codes when the value is not valid, e.g. checksum_failed, must_be_14_digits. Empty when valid.
data.countryStringCountry of the registration. Only SA is supported.
data.registration_typeStringType of registration that was checked, e.g. commercial-registration.
data.ruleStringThe format rule that was checked, e.g. 10 digits with the first digit as the issuing city group (1 to 7).
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.