Skip to content

Get a unit by ID

GET
/units/{id}
curl --request GET \
--url https://agent-dev.azizdubai.com/units/1 \
--header 'X-API-Key: <X-API-Key>'

Returns the unit with its project, developer, area, floor plan and preference tags. price is expressed in the key’s prices.

A unit is visible only while its project is visible: if the project is a draft or has been deleted, the response is 404, in the same way as for a non-existent ID.

The response is the underlying data model as is, so the nested project.company and project.author objects use PascalCase keys.

id
required
integer
>= 1

Unit ID.

The unit.

Media typeapplication/json
object
status
required
string
Allowed value: success
data
required

The shape depends on the operation.

data
required

The full unit — the response of GET /units/{id}.

object
id
integer
project_id
integer
project

The project within GET /units/{id}: its own fields are in snake_case, except CreatedAt and UpdatedAt, which are in PascalCase; the nested company and author objects are entirely in PascalCase.

object
id
integer
company_id
integer
company

The company as returned within GET /units/{id}: the underlying data model with PascalCase keys.

object
ID
integer
CompanyType

2 — agency

integer
Allowed values: 2 3
CompanyName
string
LegalName
string | null
TradeLicenseCode
string | null
ReraLicenseCode
string | null
PreferredContactEmail
string | null
PreferredContactPhone
string | null
OfficeAddress
string | null
POBoxNumber
string | null
LogoFileID
integer | null
LogoFile
One of:

An uploaded file, with all fields. Files are served not by this service but by the host configured in STATIC_BASE_URL, and without a key.

object
id
integer
original_name
string
storage_name
string
mime_type
string
path

Relative storage path.

string
url

Ready-to-use link: STATIC_BASE_URL + path (the full path is appended). Equal to path when the variable is not set.

string
size
integer format: int64
created_at
string format: date-time
updated_at
string format: date-time
OrganisationDescription
string | null
Specialisation
integer | null
ProjectPortfolioURL
string | null
TradeLicenseDocumentVerified
boolean
ReraCertificateVerified
boolean
IdentificationDocumentVerified
boolean
Status
integer
CreatedAt
string format: date-time
UpdatedAt
string format: date-time
key
additional properties
any
author_id
integer
author

The user as the underlying data model, also with PascalCase keys.

object
ID
integer
Name
string
Email
string
Status
integer
Type
integer
Allowed values: 0 1 2 3
CreatedAt
string format: date-time
UpdatedAt
string format: date-time
DeletedAt
string | null format: date-time
area_id
integer
area
object
id
integer
name
string
city
string
created_at
string format: date-time
updated_at
string format: date-time
name
string
type
integer
status
integer
description
string
launch_date
string | null format: date-time
launch_time
string | null
developer_registration_id
string
trakheesi_project_id
string
escrow_account
string
oqood_registration
string
is_draft
boolean
readiness_progress
integer
is_branded
boolean
service_charge
number | null format: double
development_status
integer
resale_conditions
string | null
total_floors
integer
floors_formula
string | null
floor_plan_file_id
integer | null
floor_plan_file
One of:

An uploaded file, with all fields. Files are served not by this service but by the host configured in STATIC_BASE_URL, and without a key.

object
id
integer
original_name
string
storage_name
string
mime_type
string
path

Relative storage path.

string
url

Ready-to-use link: STATIC_BASE_URL + path (the full path is appended). Equal to path when the variable is not set.

string
size
integer format: int64
created_at
string format: date-time
updated_at
string format: date-time
brochure_file_id
integer | null
brochure_file
One of:

An uploaded file, with all fields. Files are served not by this service but by the host configured in STATIC_BASE_URL, and without a key.

object
id
integer
original_name
string
storage_name
string
mime_type
string
path

Relative storage path.

string
url

Ready-to-use link: STATIC_BASE_URL + path (the full path is appended). Equal to path when the variable is not set.

string
size
integer format: int64
created_at
string format: date-time
updated_at
string format: date-time
general_plan_file_id
integer | null
general_plan_file
One of:

An uploaded file, with all fields. Files are served not by this service but by the host configured in STATIC_BASE_URL, and without a key.

object
id
integer
original_name
string
storage_name
string
mime_type
string
path

Relative storage path.

string
url

Ready-to-use link: STATIC_BASE_URL + path (the full path is appended). Equal to path when the variable is not set.

string
size
integer format: int64
created_at
string format: date-time
updated_at
string format: date-time
CreatedAt
string format: date-time
UpdatedAt
string format: date-time
unit_number
string
bedrooms

0 — studio.

integer
status

1 — announced, 2 — EOI, 3 — start of sales, 4 — on sale, 5 — out of stock.

integer
Allowed values: 1 2 3 4 5
furnishing

1 — unfurnished, 2 — partially furnished, 3 — fully furnished, 4 — premium.

integer
Allowed values: 1 2 3 4
parking
integer
floor
integer
price

In the key’s prices.

number format: double
unit_area

Area in m².

number format: double
plan_file_id
integer | null
plan_file
One of:

An uploaded file, with all fields. Files are served not by this service but by the host configured in STATIC_BASE_URL, and without a key.

object
id
integer
original_name
string
storage_name
string
mime_type
string
path

Relative storage path.

string
url

Ready-to-use link: STATIC_BASE_URL + path (the full path is appended). Equal to path when the variable is not set.

string
size
integer format: int64
created_at
string format: date-time
updated_at
string format: date-time
preferences
Array<object>

The link between a unit and a tag from the catalogue.

object
id
integer
unit_id
integer
preference_id
integer
preference

A unit tag from the global catalogue.

object
id
integer
name
string
created_at
string format: date-time
updated_at
string format: date-time
created_at
string format: date-time
updated_at
string format: date-time
created_at
string format: date-time
updated_at
string format: date-time

Example

{
"status": "success",
"data": {
"project": {
"company": {
"CompanyType": 2
},
"author": {
"Type": 0
}
},
"status": 1,
"furnishing": 1,
"preferences": [
{
"preference": {
"name": "Sea view"
}
}
]
}
}

A parameter or the request body failed validation.

Media typeapplication/json
object
status
required
string
Allowed value: error
message
required

Human-readable message.

string

Examples

ExamplebadID
{
"status": "error",
"message": "id must be a positive integer"
}

The key is missing (missing api key) or invalid (invalid api key). The latter covers unknown, revoked and deleted keys. Every operation requires a key, so any request without one receives this response.

Media typeapplication/json
object
status
required
string
Allowed value: error
message
required

Human-readable message.

string

Examples

Exampleinvalid
{
"status": "error",
"message": "invalid api key"
}

The key is valid, but it is restricted to a list of domains and the request’s Origin (or Referer) does not match any of them; or the key’s agency has no approved licence.

Media typeapplication/json
object
status
required
string
Allowed value: error
message
required

Human-readable message.

string

Examples

{
"status": "error",
"message": "origin is not allowed for this api key"
}

No record exists with the given ID — or it belongs to a developer the key’s agency has no approved contract with.

Media typeapplication/json
object
status
required
string
Allowed value: error
message
required

Human-readable message.

string

Examples

Exampleunit
{
"status": "error",
"message": "unit not found"
}

An unexpected error. The cause is logged; a generic message is returned.

Media typeapplication/json
object
status
required
string
Allowed value: error
message
required

Human-readable message.

string

Examples

Examplegeneric
{
"status": "error",
"message": "internal server error"
}