Skip to content

Business Registration System API — Get Business by UEN

This document describes how to retrieve a registered business by its Unique Entity Number (UEN) from the BRS API.


Authentication

The BRS API uses DIT's Central Authentication Service (CAS) for authentication. This endpoint requires machine-to-machine (M2M) authentication via the Client Credentials flow.

CAS URLs

Use https://auth.dev.krd in dev, staging, and pre-prod environments.

Use https://account.id.krd in production environment.

OpenID Connect

The CAS is an OpenID Connect-compatible service. It provides a discovery endpoint for dynamic information discovery at /.well-known/openid-configuration.

Required Scope

To call this endpoint, your client must be granted the following scope:

ScopeDescription
beas-processes-api.businesses.get_by_uenGrants permission to read a business by UEN

Obtaining an Access Token

To obtain an access token, send a POST request to the CAS token endpoint:

POST https://auth.dev.krd/connect/token

Set the Header to: Content-Type: application/x-www-form-urlencoded

Set the Request Body to:

json
{
    "grant_type": "client_credentials",
    "scope": "beas-processes-api.businesses.get_by_uen",
    "client_id": "YOUR CLIENT ID",
    "client_secret": "YOUR CLIENT SECRET"
}

Upon successful handling of the request, the response payload will contain an access token, expiry time, token type, and requested scopes:

json
{
    "access_token": "A LONG ACCESS TOKEN HERE",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "beas-processes-api.businesses.get_by_uen"
}

Use the access_token from the response as a Bearer token in the Authorization header when calling the endpoint.

Note: We highly recommend using existing packages and libraries that take care of the OAuth 2.0 Client Credentials implementation instead of making raw HTTP requests. The existing libraries are battle-tested and handle many details that you may otherwise skip.


Endpoint

Get Business by Unique Entity Number (UEN)

Retrieves a single registered business by its Unique Entity Number.

Request

GET /v1/admin/businesses/uen/:uen

Path Parameters

ParameterTypeRequiredDescription
uenstringYesThe Unique Entity Number (UEN) of the business. A 14-digit identifier (e.g., 20241001048392).

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token obtained from the CAS. Format: Bearer <access_token>
Accept-LanguagestringNoPreferred language for localized content. Supported: en, ar, ckb. Defaults to the application default locale.

Example Request

bash
curl -X GET "https://api.example.com/v1/admin/businesses/uen/20241001048392" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Accept: application/vnd.api+json"

Successful Response

Status: 200 OK

Content-Type: application/vnd.api+json

All responses follow the JSON:API v1.0 specification. Attribute keys are serialized in camelCase.

json
{
  "data": {
    "id": "42",
    "type": "businesses",
    "attributes": {
      "email": "company@example.com",
      "language": "ckb",
      "uniqueEntityNumber": "20241001048392",
      "tradeNameId": 100,
      "houseNumber": "12",
      "streetNumber": "5",
      "street": "Bakhtiari Street",
      "address": "Sulaymaniyah, Kurdistan Region",
      "neighborhood": "Raparin",
      "establishedAt": "2024-03-15T00:00:00.000Z",
      "totalFeesPaid": "250000.0",
      "response": null,
      "version": 3,
      "businessState": "registered",
      "userActivities": "Retail Trade",
      "createdAt": "2024-03-15T10:30:00.000Z",
      "updatedAt": "2024-06-20T14:45:00.000Z",
      "workflowState": "registered",
      "dossierNumber": 12345,
      "letterTo": ["ministry_of_interior"],
      "terminationDate": "2025-03-15",
      "pendingReview": false,
      "upn": "1234567890",
      "transitions": [],
      "transitionComment": ""
    },
    "relationships": {
      "tradeName": {
        "data": { "id": "100", "type": "tradeNames" }
      },
      "district": {
        "data": { "id": "5", "type": "districts" }
      },
      "province": {
        "data": { "id": "2", "type": "provinces" }
      },
      "businessType": {
        "data": { "id": "1", "type": "businessTypes" }
      },
      "company": {
        "data": { "id": "42", "type": "companies" }
      },
      "activities": {
        "data": [
          { "id": "10", "type": "activities" }
        ]
      },
      "transferOwnershipUploads": {
        "data": []
      }
    }
  },
  "included": [
    {
      "id": "100",
      "type": "tradeNames",
      "attributes": { "..." : "..." }
    },
    {
      "id": "5",
      "type": "districts",
      "attributes": { "..." : "..." }
    },
    {
      "id": "2",
      "type": "provinces",
      "attributes": { "..." : "..." }
    },
    {
      "id": "1",
      "type": "businessTypes",
      "attributes": { "..." : "..." }
    },
    {
      "id": "42",
      "type": "companies",
      "attributes": { "..." : "..." }
    },
    {
      "id": "10",
      "type": "activities",
      "attributes": { "..." : "..." }
    }
  ]
}

Response Attributes

AttributeTypeDescription
emailstringContact email of the business
languagestringLanguage of the business record (en, ar, ckb)
uniqueEntityNumberstringThe 14-digit Unique Entity Number
tradeNameIdintegerID of the associated trade name
houseNumberstringHouse number of the business address
streetNumberstringStreet number of the business address
streetstringStreet name of the business address
addressstringFull address of the business
neighborhoodstringNeighborhood of the business
establishedAtdatetimeDate the business was established
totalFeesPaidstringTotal fees paid for registration
responseobject/nullResponse data (if any)
versionintegerVersion number of the record
businessStatestringAlways registered for businesses with a UEN
userActivitiesstringDescription of business activities
createdAtdatetimeRecord creation timestamp
updatedAtdatetimeRecord last update timestamp
workflowStatestringCurrent workflow state
dossierNumberintegerDossier number assigned upon registration
letterToarrayList of entities the registration letter is addressed to
terminationDatedateDate the business registration terminates
pendingReviewbooleanWhether the business is pending review
upnstringUnified Personal Number of the business owner
transitionsarrayAlways [] for this endpoint
transitionCommentstringLatest transition comment (if applicable)

Included Relationships

The response includes the following related resources in the included array:

RelationshipTypeDescription
tradeNametradeNamesThe trade name associated with this business
districtdistrictsThe district where the business is located
provinceprovincesThe province where the business is located
businessTypebusinessTypesThe type/category of the business
companycompaniesThe company entity (local or foreign) with nested country, shareholders, and ceo
activitiesactivitiesThe list of economic activities associated with the business
transferOwnershipUploadsuploadsUploads related to ownership transfer

Error Responses

Status CodeConditionExample Response
401 UnauthorizedMissing or malformed Authorization header{ "status": "unauthorized", "code": 401, "errors": "no authorization header is supplied" }
403 ForbiddenInvalid or expired token, or missing required scope{ "status": "forbidden", "code": 403, "errors": "You are not authorized to access this resource." }
404 Not FoundNo business found with the given UEN{ "status": "not_found", "code": 404, "errors": "Couldn't find Business" }

Appendix

UEN Format

The Unique Entity Number (UEN) is a 14-digit identifier structured as follows:

YYYY EEEE NNNNNN
│    │    └── 6 random digits
│    └─────── 4-digit entity type code
└──────────── 4-digit year of registration

Example: 20241001048392

  • 2024 — Year of registration
  • 1001 — Entity type code
  • 048392 — Random digits (unique)