Chat API for The Landscaper (0.0.1)

Download OpenAPI specification:Download

Chat API for The Landscaper with TalkJS integration

Chat Management

Chat and conversation related requests

Create a TalkJS user

Request Body schema: application/json
first_name_en
required
string

First name in English

last_name_en
required
string

Last name in English

email
string <email>

User email address

talkjs_id
string

TalkJS user ID (optional, will be generated if not provided)

Responses

Request samples

Content type
application/json
{
  • "first_name_en": "John",
  • "last_name_en": "Doe",
  • "email": "john.doe@example.com",
  • "talkjs_id": "uuid-123-456-789"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": "uuid-123-456-789"
}

Create a chat conversation

Request Body schema: application/json
participant_ids
required
Array of integers <int64> [ items <int64 > ]

List of user IDs to include in the conversation

subject
required
string

Subject/title of the conversation

initial_message
required
string

Initial welcome message for the conversation

conversation_id
string

Custom conversation ID (optional, will be generated if not provided)

Responses

Request samples

Content type
application/json
{
  • "participant_ids": [
    ],
  • "subject": "Enquiry for Beautiful Property",
  • "initial_message": "Welcome to this conversation!",
  • "conversation_id": "123_456_789"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": "123_456_789"
}

Get user chats

path Parameters
id
required
integer <int64>

The ID of the user

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Get chat by ID

path Parameters
id
required
integer <int64>

The ID of the chat

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Listing Management

Listing related requests

Create a new listing

Request Body schema: application/json
title_en
required
string

The title of the listing in English

title_ar
string

The title of the listing in Arabic

description_en
string

The description of the listing in English

description_ar
string

The description of the listing in Arabic

fields
object

The custom fields key value of the listing

buy_rent
string

The buy or rent of the listing

price
number

The price of the listing

object

The location of the listing (X(longitude), Y(latitude))

object (location-metadata)
category_id
required
integer

The category ID of the listing

sub_category_id
required
integer

The sub category ID of the listing

child_category_id
integer

The child category ID of the listing (optional)

city_id
required
integer

The city ID of the listing

status
required
string
Enum: "draft" "pending" "live" "rejected" "archived"

The status of the listing

images
Array of strings [ 0 .. 5 ] items

The images of the listing [url1, url2, url3, url4, url5]

Array of objects (Portfolio-Create)

The portfolios of the listing

Responses

Request samples

Content type
application/json
{
  • "title_en": "My Listing",
  • "title_ar": "قطعة الأرض",
  • "description_en": "This is a description of the listing",
  • "description_ar": "هذا هو الوصف للقطعة الأرضية",
  • "fields": {
    },
  • "buy_rent": "buy",
  • "price": 100000,
  • "location": {
    },
  • "location_metadata": {
    },
  • "category_id": 1,
  • "sub_category_id": 1,
  • "child_category_id": 1,
  • "city_id": 1,
  • "status": "draft",
  • "portfolios": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "draft | pending | live | rejected | archived",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "title_en": "My Listing",
  • "title_ar": "قطعة الأرض",
  • "description_en": "This is a description of the listing",
  • "description_ar": "هذا هو الوصف للقطعة الأرضية",
  • "fields": {
    },
  • "buy_rent": "buy",
  • "price": 100000,
  • "location": {
    },
  • "location_metadata": {
    },
  • "category_id": 1,
  • "sub_category_id": 1,
  • "child_category_id": 1,
  • "city_id": 1,
  • "portfolios": [
    ],
  • "id": 1,
  • "listing_uuid": "uuid-123-456-789",
  • "posted_by": 1,
  • "posted_at": "2021-01-01T00:00:00Z",
  • "updated_at": "2021-01-01T00:00:00Z",
  • "is_favorite": true,
  • "is_active": true,
  • "is_blocked": false,
  • "rejection_comments": "Does not meet quality standards",
  • "blocked_by": 1,
  • "blocked_on": "2021-01-01T00:00:00Z",
  • "blocked_reason": "The listing was blocked because it violated the terms of service",
  • "reports": [
    ]
}

Get a listing Details by ID

path Parameters
id
required
string

The ID of the listing

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "draft | pending | live | rejected | archived",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "title_en": "My Listing",
  • "title_ar": "قطعة الأرض",
  • "description_en": "This is a description of the listing",
  • "description_ar": "هذا هو الوصف للقطعة الأرضية",
  • "fields": {
    },
  • "buy_rent": "buy",
  • "price": 100000,
  • "location": {
    },
  • "location_metadata": {
    },
  • "category_id": 1,
  • "sub_category_id": 1,
  • "child_category_id": 1,
  • "city_id": 1,
  • "portfolios": [
    ],
  • "id": 1,
  • "listing_uuid": "uuid-123-456-789",
  • "posted_by": 1,
  • "posted_at": "2021-01-01T00:00:00Z",
  • "updated_at": "2021-01-01T00:00:00Z",
  • "is_favorite": true,
  • "is_active": true,
  • "is_blocked": false,
  • "rejection_comments": "Does not meet quality standards",
  • "blocked_by": 1,
  • "blocked_on": "2021-01-01T00:00:00Z",
  • "blocked_reason": "The listing was blocked because it violated the terms of service",
  • "reports": [
    ]
}

Get all listings

query Parameters
category_id
string

The ID of the category

sub_category_id
string

The ID of the sub category

child_category_id
string

The ID of the child category

city_id
string

The ID of the city

search
string
Example: search=search

The search term

sort
string
Example: sort=asc

The sort order

sort_by
string
Example: sort_by=created_at

The sort by

limit
integer
Example: limit=10

The number of items per page

index
integer
Example: index=0

The index

is_reported
boolean
Example: is_reported=true

Whether to get reported listings only

reported_status
string
Example: reported_status=pending | resolved

The status of the report

is_blocked
boolean
Example: is_blocked=true

Whether to get blocked listings only

status
string
Example: status=draft | pending | live | rejected | archived

The status of the listing

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Get my listings

query Parameters
category_id
string

The ID of the category

sub_category_id
string

The ID of the sub category

child_category_id
string

The ID of the child category

city_id
string

The ID of the city

search
string
Example: search=search

The search term

sort
string
Example: sort=asc

The sort order

sort_by
string
Example: sort_by=created_at

The sort by

limit
integer
Example: limit=10

The number of items per page

index
integer
Example: index=0

The index

status
string
Example: status=draft | pending | live | rejected | archived

The status of the listing

is_blocked
boolean
Example: is_blocked=true

Whether to get blocked listings only

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Get my listing by ID

path Parameters
id
required
string

The ID of the listing

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "draft | pending | live | rejected | archived",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "title_en": "My Listing",
  • "title_ar": "قطعة الأرض",
  • "description_en": "This is a description of the listing",
  • "description_ar": "هذا هو الوصف للقطعة الأرضية",
  • "fields": {
    },
  • "buy_rent": "buy",
  • "price": 100000,
  • "location": {
    },
  • "location_metadata": {
    },
  • "category_id": 1,
  • "sub_category_id": 1,
  • "child_category_id": 1,
  • "city_id": 1,
  • "portfolios": [
    ],
  • "id": 1,
  • "listing_uuid": "uuid-123-456-789",
  • "posted_by": 1,
  • "posted_at": "2021-01-01T00:00:00Z",
  • "updated_at": "2021-01-01T00:00:00Z",
  • "is_favorite": true,
  • "is_active": true,
  • "is_blocked": false,
  • "rejection_comments": "Does not meet quality standards",
  • "blocked_by": 1,
  • "blocked_on": "2021-01-01T00:00:00Z",
  • "blocked_reason": "The listing was blocked because it violated the terms of service",
  • "reports": [
    ]
}

Update my listing

Request Body schema: application/json
title_en
required
string

The title of the listing in English

title_ar
string

The title of the listing in Arabic

description_en
string

The description of the listing in English

description_ar
string

The description of the listing in Arabic

fields
object

The custom fields key value of the listing

buy_rent
string

The buy or rent of the listing

price
number

The price of the listing

object

The location of the listing (X(longitude), Y(latitude))

object (location-metadata)
category_id
required
integer

The category ID of the listing

sub_category_id
required
integer

The sub category ID of the listing

child_category_id
integer

The child category ID of the listing (optional)

city_id
required
integer

The city ID of the listing

status
required
string
Enum: "draft" "pending" "live" "rejected" "archived"

The status of the listing

images
Array of strings [ 0 .. 5 ] items

The images of the listing [url1, url2, url3, url4, url5]

Array of objects (Portfolio-Basic)

The portfolios of the listing

Responses

Request samples

Content type
application/json
{
  • "title_en": "My Listing",
  • "title_ar": "قطعة الأرض",
  • "description_en": "This is a description of the listing",
  • "description_ar": "هذا هو الوصف للقطعة الأرضية",
  • "fields": {
    },
  • "buy_rent": "buy",
  • "price": 100000,
  • "location": {
    },
  • "location_metadata": {
    },
  • "category_id": 1,
  • "sub_category_id": 1,
  • "child_category_id": 1,
  • "city_id": 1,
  • "status": "draft",
  • "portfolios": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Search listings

Request Body schema: application/json
index
integer

The index

limit
integer

The limit

sort
string

The sort order

sort_by
string

The sort by

search
string

The search term

Array of objects

The filters

category_id
integer

The category ID of the listing

sub_category_id
integer

The sub category ID of the listing

child_category_id
integer

The child category ID of the listing

city_id
integer

The city ID of the listing

is_favorite
boolean

Whether the listing is favorite

object

The location of the user (X(longitude), Y(latitude))

distance_in_km
number

The distance in kilometers

top_favorites
integer

Number of months to count favorites for top listing

check_favorite
boolean

Include IsFavorite flag without filtering

Responses

Request samples

Content type
application/json
{
  • "index": 0,
  • "limit": 30,
  • "sort": "asc",
  • "sort_by": "created_at",
  • "search": "search",
  • "filters": [
    ],
  • "category_id": 1,
  • "sub_category_id": 1,
  • "child_category_id": 1,
  • "city_id": 1,
  • "is_favorite": true,
  • "location": {
    },
  • "distance_in_km": 100,
  • "top_favorites": 3,
  • "check_favorite": true
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Favorite a listing

path Parameters
id
required
string

The ID of the listing

Request Body schema: application/json
favorite
boolean

Whether to favorite the listing

Responses

Request samples

Content type
application/json
{
  • "favorite": true
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Rate a listing

path Parameters
id
required
string

The ID of the listing

Request Body schema: application/json
rating
number [ 1 .. 5 ]

The rating of the listing

Responses

Request samples

Content type
application/json
{
  • "rating": 5
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Report a listing

path Parameters
id
required
string

The ID of the listing

Request Body schema: application/json
id
required
integer <int64>

Report ID

listing_id
integer <int64>

Listing ID (for listing reports)

user_id
integer <int64>

User ID (for user reports)

status
required
string
Enum: "pending" "resolved" "closed"

Report status

report_reason
required
string

Reason for the report

reported_at
required
string <date-time>

When the report was made

responded_at
string <date-time>

When the report was responded to

reported_by_user_id
required
integer <int64>

ID of user who made the report

responded_by_user_id
integer <int64>

ID of user who responded to the report

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "listing_id": 123,
  • "user_id": 456,
  • "status": "pending",
  • "report_reason": "Inappropriate content",
  • "reported_at": "2021-01-01T00:00:00.000Z",
  • "responded_at": "2021-01-02T00:00:00.000Z",
  • "reported_by_user_id": 789,
  • "responded_by_user_id": 101
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Block a listing

path Parameters
id
required
string

The ID of the listing

Request Body schema: application/json
blocked_reason
string

The reason the listing was blocked

Responses

Request samples

Content type
application/json
{
  • "blocked_reason": "The listing was blocked because it violated the terms of service"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Unblock a listing

path Parameters
id
required
string

The ID of the listing

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Create an enquiry for a listing

path Parameters
id
required
string

The ID of the listing

Request Body schema: application/json
message
required
string

The message to send to the listing owner

Responses

Request samples

Content type
application/json
{
  • "message": "Hi! I'm very interested in this property. Could we schedule a viewing?"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get enquiries

query Parameters
search
string
Example: search=search

The search term

sort
string
Example: sort=asc

The sort order

sort_by
string
Example: sort_by=created_at

The sort by

index
integer
Example: index=0

The index

limit
integer
Example: limit=10

The number of items per page

listing_id
string
Example: listing_id=1234567890

The ID of the listing

status
string
Example: status=ongoing | archived

The status of the enquiry

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Action a listing

path Parameters
id
required
string

The ID of the listing

Request Body schema: application/json
action
string

The action to take on the listing

comments
string

The comments of the action

Responses

Request samples

Content type
application/json
{
  • "action": "approve | reject",
  • "comments": "The listing was approved because it was in good condition"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Reinitialize ElasticSearch index with all live listings

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Master Management

Master related requests

Get all cities with pagination

query Parameters
limit
integer
Example: limit=10

Number of items per page

index
integer
Example: index=1

Page number

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Get all categories with pagination

query Parameters
limit
integer
Example: limit=10

Number of items per page

index
integer
Example: index=1

Page number

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Create a new category (Admin only)

Authorizations:
AdminPolicy
Request Body schema: application/json
required
id
integer

The ID

category_en
required
string

The category in English

category_ar
required
string

The category in Arabic

is_active
required
boolean

The active status

display_order
required
integer

The display order

is_more
required
boolean

Whether the category should be shown in the more categories section

icon_img
required
string or null

The icon image URL

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "category_en": "Category",
  • "category_ar": "فئة",
  • "is_active": true,
  • "display_order": 1,
  • "is_more": false,
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get a category by ID

path Parameters
id
required
integer
Example: 1

The ID of the category

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Update a category (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the category

Request Body schema: application/json
required
id
integer

The ID

category_en
required
string

The category in English

category_ar
required
string

The category in Arabic

is_active
required
boolean

The active status

display_order
required
integer

The display order

is_more
required
boolean

Whether the category should be shown in the more categories section

icon_img
required
string or null

The icon image URL

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "category_en": "Category",
  • "category_ar": "فئة",
  • "is_active": true,
  • "display_order": 1,
  • "is_more": false,
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Delete a category (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the category

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get all sub-categories with pagination

query Parameters
category_id
integer

Filter by category ID

limit
integer
Example: limit=10

Number of items per page

index
integer
Example: index=1

Page number

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Create a new sub-category (Admin only)

Authorizations:
AdminPolicy
Request Body schema: application/json
required
id
integer

The ID

category_id
integer

The category ID

sub_category_en
string

The sub category in English

sub_category_ar
string

The sub category in Arabic

is_active
boolean

The active status

display_order
integer

The display order

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "category_id": 1,
  • "sub_category_en": "Sub Category",
  • "sub_category_ar": "فئة",
  • "is_active": true,
  • "display_order": 1
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get a sub-category by ID

path Parameters
id
required
integer

The ID of the sub-category

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Update a sub-category (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the sub-category

Request Body schema: application/json
required
id
integer

The ID

category_id
integer

The category ID

sub_category_en
string

The sub category in English

sub_category_ar
string

The sub category in Arabic

is_active
boolean

The active status

display_order
integer

The display order

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "category_id": 1,
  • "sub_category_en": "Sub Category",
  • "sub_category_ar": "فئة",
  • "is_active": true,
  • "display_order": 1
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Delete a sub-category (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the sub-category

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get all child categories with pagination

query Parameters
sub_category_id
integer

Filter by sub-category ID

limit
integer
Example: limit=10

Number of items per page

index
integer
Example: index=1

Page number

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Create a new child category (Admin only)

Authorizations:
AdminPolicy
Request Body schema: application/json
required
id
integer <int64>

The unique identifier for the child category

sub_category_id
required
integer <int64>

The ID of the parent sub-category

child_category_en
required
string

The name of the child category in English

child_category_ar
required
string

The name of the child category in Arabic

is_active
required
boolean

Whether the child category is active

display_order
required
integer

The order in which to display the child category

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "sub_category_id": 0,
  • "child_category_en": "string",
  • "child_category_ar": "string",
  • "is_active": true,
  • "display_order": 0
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get a child category by ID

path Parameters
id
required
integer

The ID of the child category

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Update a child category (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the child category

Request Body schema: application/json
required
id
integer <int64>

The unique identifier for the child category

sub_category_id
required
integer <int64>

The ID of the parent sub-category

child_category_en
required
string

The name of the child category in English

child_category_ar
required
string

The name of the child category in Arabic

is_active
required
boolean

Whether the child category is active

display_order
required
integer

The order in which to display the child category

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "sub_category_id": 0,
  • "child_category_en": "string",
  • "child_category_ar": "string",
  • "is_active": true,
  • "display_order": 0
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Delete a child category (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the child category

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get all fields with pagination

query Parameters
category_id
integer

Filter by category ID

limit
integer
Example: limit=10

Number of items per page

index
integer
Example: index=1

Page number

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Create a new field (Admin only)

Authorizations:
AdminPolicy
Request Body schema: application/json
required
id
integer

The ID

category_id
required
integer

The category ID

field_id
string or null

The field identifier

name_en
string or null

The name in English

name_ar
string or null

The name in Arabic

type
required
string or null
Enum: "text" "number" "boolean" "select" "multi-select" "date" "time" "datetime" "link" "email" "phone" "url" "file" "textarea" "radio"

The field type

is_bilingual_field
required
boolean
Default: true

Whether the field supports both languages

is_required
required
boolean
Default: false

Whether the field is required

prefix_en
string or null

The prefix in English

prefix_ar
string or null

The prefix in Arabic

suffix_en
string or null

The suffix in English

suffix_ar
string or null

The suffix in Arabic

options_en
Array of strings or null

The options in English

options_ar
Array of strings or null

The options in Arabic

is_active
required
boolean
Default: true

The active status

display_order
required
integer

The display order

placeholder_en
string or null

The placeholder in English

placeholder_ar
string or null

The placeholder in Arabic

is_common_field
boolean
Default: false

Whether this is a common field

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "category_id": 1,
  • "field_id": "field_1",
  • "name_en": "Name",
  • "name_ar": "الاسم",
  • "type": "text",
  • "is_bilingual_field": true,
  • "is_required": true,
  • "prefix_en": "kg",
  • "prefix_ar": "كجم",
  • "suffix_en": "kg",
  • "suffix_ar": "كجم",
  • "options_en": [
    ],
  • "options_ar": [
    ],
  • "is_active": true,
  • "display_order": 1,
  • "placeholder_en": "Enter value",
  • "placeholder_ar": "أدخل القيمة",
  • "is_common_field": false
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get a field by ID

path Parameters
id
required
integer

The ID of the field

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Partially update a field (Admin only)

Authorizations:
AdminPolicy
path Parameters
id
required
integer

The ID of the field

Request Body schema: application/json
required
Array
op
string
Enum: "add" "remove" "replace" "move" "copy" "test"

The operation to perform

path
string

A JSON-Pointer to the target location

value
object

The value to use for the operation

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get all FAQ groups

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Content Management

Content related requests

Get content by name

path Parameters
name
required
string
Example: About_Us

The name of the content (About_Us, Contact_Us, Terms_And_Conditions, Privacy_Policy, FAQ, FAQ_Group)

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Update content (Admin only)

Authorizations:
AdminPolicy
path Parameters
name
required
string
Example: About_Us

The name of the content

Request Body schema: application/json
required
object

Content update data in JSON format

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

User Management

User related requests

Get me

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Update me

Request Body schema: application/json
first_name_en
string

The first name of the user in English

last_name_en
string

The last name of the user in English

first_name_ar
string

The first name of the user in Arabic

last_name_ar
string

The last name of the user in Arabic

email
string

The email of the user

mobile
string

The mobile number of the user

gender
string

The gender of the user

nationality
string

The nationality of the user

dob
string <date-time>

The date of birth of the user iso format YYYY-MM-DDTHH:MM.sssZ

profile_image
string

The profile image of the user

business_name
string

The business name of the user

business_description
string

The business description of the user

is_verified
boolean

Whether the user is verified

is_email_verified
boolean

Whether the user's email is verified

is_admin
boolean

Whether the user is an admin

created_at
string <date-time>

When the user was created

updated_at
string <date-time>

When the user was last updated

images
Array of strings

Array of user images URLs

talkjs_id
string

TalkJS user ID for chat integration

Responses

Request samples

Content type
application/json
{
  • "first_name_en": "John",
  • "last_name_en": "Doe",
  • "first_name_ar": "جون",
  • "last_name_ar": "دو",
  • "email": "user@example.com",
  • "mobile": 501234567,
  • "gender": "male",
  • "nationality": "Saudi Arabia",
  • "dob": "2000-01-01T00:00:00.000Z",
  • "business_name": "The Landscaper",
  • "business_description": "Leading landscaping company",
  • "is_verified": false,
  • "is_email_verified": false,
  • "is_admin": false,
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z",
  • "talkjs_id": "talkjs_user_123"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Create a new user

Request Body schema: application/json
first_name_en
string

The first name of the user in English

last_name_en
string

The last name of the user in English

first_name_ar
string

The first name of the user in Arabic

last_name_ar
string

The last name of the user in Arabic

email
string

The email of the user

mobile
string

The mobile number of the user

gender
string

The gender of the user

nationality
string

The nationality of the user

dob
string <date-time>

The date of birth of the user iso format YYYY-MM-DDTHH:MM.sssZ

profile_image
string

The profile image of the user

business_name
string

The business name of the user

business_description
string

The business description of the user

is_verified
boolean

Whether the user is verified

is_email_verified
boolean

Whether the user's email is verified

is_admin
boolean

Whether the user is an admin

created_at
string <date-time>

When the user was created

updated_at
string <date-time>

When the user was last updated

images
Array of strings

Array of user images URLs

talkjs_id
string

TalkJS user ID for chat integration

password
string

The password of the user

Responses

Request samples

Content type
application/json
{
  • "first_name_en": "John",
  • "last_name_en": "Doe",
  • "first_name_ar": "جون",
  • "last_name_ar": "دو",
  • "email": "user@example.com",
  • "mobile": 501234567,
  • "gender": "male",
  • "nationality": "Saudi Arabia",
  • "dob": "2000-01-01T00:00:00.000Z",
  • "business_name": "The Landscaper",
  • "business_description": "Leading landscaping company",
  • "is_verified": false,
  • "is_email_verified": false,
  • "is_admin": false,
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z",
  • "talkjs_id": "talkjs_user_123",
  • "password": "password"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Login a user

Request Body schema: application/json
email
string

The email of the user

password
string

The password of the user

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "password": "password"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Resend verification email

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Verify email

Request Body schema: application/json
token
string

The token to verify the email

Responses

Request samples

Content type
application/json
{
  • "token": "eyjhXXXX..."
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Change password

Request Body schema: application/json
current_password
string

The current password

new_password
string

The new password

Responses

Request samples

Content type
application/json
{
  • "current_password": "password123",
  • "new_password": "password123"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Request password reset

Request Body schema: application/json
email
string

The email address of the user

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Verify password reset

Request Body schema: application/json
token
string

The token to reset the password

password
string

The new password

Responses

Request samples

Content type
application/json
{
  • "token": "eyjhXXXX...",
  • "password": "newpassword123"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get user profile

path Parameters
id
required
integer <int64>

The ID of the user

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Update user profile

path Parameters
id
required
integer <int64>

The ID of the user

Request Body schema: application/json
first_name_en
string

The first name of the user in English

last_name_en
string

The last name of the user in English

first_name_ar
string

The first name of the user in Arabic

last_name_ar
string

The last name of the user in Arabic

email
string

The email of the user

mobile
string

The mobile number of the user

gender
string

The gender of the user

nationality
string

The nationality of the user

dob
string <date-time>

The date of birth of the user iso format YYYY-MM-DDTHH:MM.sssZ

profile_image
string

The profile image of the user

business_name
string

The business name of the user

business_description
string

The business description of the user

is_verified
boolean

Whether the user is verified

is_email_verified
boolean

Whether the user's email is verified

is_admin
boolean

Whether the user is an admin

created_at
string <date-time>

When the user was created

updated_at
string <date-time>

When the user was last updated

images
Array of strings

Array of user images URLs

talkjs_id
string

TalkJS user ID for chat integration

password
string

The password of the user

Responses

Request samples

Content type
application/json
{
  • "first_name_en": "John",
  • "last_name_en": "Doe",
  • "first_name_ar": "جون",
  • "last_name_ar": "دو",
  • "email": "user@example.com",
  • "mobile": 501234567,
  • "gender": "male",
  • "nationality": "Saudi Arabia",
  • "dob": "2000-01-01T00:00:00.000Z",
  • "business_name": "The Landscaper",
  • "business_description": "Leading landscaping company",
  • "is_verified": false,
  • "is_email_verified": false,
  • "is_admin": false,
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z",
  • "talkjs_id": "talkjs_user_123",
  • "password": "password"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Logout user

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Verify token for user or admin or internal services. place token in body or header

header Parameters
Authorization
string

The token to verify

Request Body schema: application/json
token
string

The token to verify

Responses

Request samples

Content type
application/json
{
  • "token": "eyjhXXXX..."
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

List users

query Parameters
search
string
Example: search=search

The search term

sort
string
Example: sort=asc

The sort order

sort_by
string
Example: sort_by=created_at

The sort by

limit
integer
Example: limit=10

The number of items per page

index
integer
Example: index=0

The index

status
string
Example: status=active | inactive

The status of the user

is_blocked
boolean
Example: is_blocked=true | false

The blocked status of the user

is_reported
boolean
Example: is_reported=true | false

The reported status of the user

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ],
  • "total": 100
}

Report user

path Parameters
id
required
integer <int64>

The ID of the user

Request Body schema: application/json
report_reason
string

The reason for reporting the user

Responses

Request samples

Content type
application/json
{
  • "report_reason": "Inappropriate content"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Deactivate user

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Block user

path Parameters
id
required
integer <int64>

The ID of the user

Request Body schema: application/json
blocked_reason
string

The reason the user was blocked

Responses

Request samples

Content type
application/json
{
  • "blocked_reason": "The user was blocked because they violated the terms of service"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Unblock user

path Parameters
id
required
integer <int64>

The ID of the user

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Get notifications

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Send notification to user

Request Body schema: application/json
id
integer

The id of the notification

user_id
integer

The id of the user receiving the notification

type
string

The type of the notification

ref_id
integer

The reference id (e.g., enquiry id, listing id)

content
string

The content of the notification

is_read
boolean

Whether the notification is read

created_at
string <date-time>

The created at timestamp

from_user_id
integer

The id of the user who triggered the notification

meta_data
object

Additional metadata for the notification

Responses

Request samples

Content type
application/json
{
  • "id": 1,
  • "user_id": 1,
  • "type": "Enquiry",
  • "ref_id": 1,
  • "content": "New Enquiry",
  • "is_read": false,
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "from_user_id": 2,
  • "meta_data": {
    }
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Update FCM token for push notifications

Request Body schema: application/json
fcm_token
string

Firebase Cloud Messaging token

Responses

Request samples

Content type
application/json
{
  • "fcm_token": "ey234sdfsdfsdf..."
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

User Rating

User rating and review functionality

Rate a user

path Parameters
userId
required
integer <int64>

The ID of the user to rate

Request Body schema: application/json
rating
required
integer [ 1 .. 5 ]

The rating value (1-5 stars)

comment
string

Optional comment for the rating

Responses

Request samples

Content type
application/json
{
  • "rating": 4,
  • "comment": "Great service and professional work!"
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Get all ratings for a user

path Parameters
userId
required
integer <int64>

The ID of the user to rate

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": [
    ]
}

Get average rating for a user

path Parameters
userId
required
integer <int64>

The ID of the user to rate

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": 4.25
}

Get my rating for a specific user

path Parameters
userId
required
integer <int64>

The ID of the user to rate

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}

Delete my rating for a specific user

path Parameters
userId
required
integer <int64>

The ID of the user to rate

Responses

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100
}

Conversation

Create a one-to-one conversation

Request Body schema: application/json
recipient_user_id
string

The ID of the receipent

Responses

Request samples

Content type
application/json
{
  • "recipient_user_id": 1
}

Response samples

Content type
application/json
{
  • "message": "Success",
  • "status": "SUCCESS",
  • "is_error": false,
  • "error_message": "string",
  • "total_count": 100,
  • "data": {
    }
}