List unit tags
GET
/preferences
const url = 'https://agent-dev.azizdubai.com/preferences';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://agent-dev.azizdubai.com/preferences \ --header 'X-API-Key: <X-API-Key>'The global list of unit tags (Sea view, High ROI, Quiet area, …).
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Tags, sorted by name.
Media typeapplication/json
object
status
required
string
data
required
The shape depends on the operation.
data
required
Array<object>
A unit tag from the global catalogue.
object
id
integer
name
string
created_at
string format: date-time
updated_at
string format: date-time
Example
{ "status": "success", "data": [ { "name": "Sea view" } ]}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
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
message
required
Human-readable message.
string
Examples
{ "status": "error", "message": "origin is not allowed for this api key"}{ "status": "error", "message": "agency license is required: upload a company license and wait for its approval"}An unexpected error. The cause is logged; a generic message is returned.
Media typeapplication/json
object
status
required
string
message
required
Human-readable message.
string
Examples
Examplegeneric
{ "status": "error", "message": "internal server error"}