/api/v1/object/data/select-options/{objectSlug}/{fieldSlug}List the records you can link through one relation field.
List the records you can link through one relation field.
fieldSlug is the slug of a relation column in fields. Returns one page
of records on the other side of that relation that the credential may
link, sorted by display name, plus the relation's details.
search matches the record name, slug, random_id, and its text, long
text, email, phone, WhatsApp number and serial number fields. When the
term holds 6 or more digits, phone numbers also match on digits alone.
Query parameters:
search— text to find. At most 100 characters.page— page number, from 1. Default1.limit— options per page, up to200. Default25.
Scope: read.<object slug>, for example read.deals.
Errors:
400— no active object has that slug.403— the credential lacksread.<object slug>.404—Relation field 'contact-mpoc4k2z' not found on object 'deals'.422— a query parameter is invalid, for examplelimitis above200.
Response 200:
{
"status": 200,
"message": "Select options retrieved successfully",
"data": {
"field_slug": "contact-mpoc4k2z",
"label": "Contact",
"relation_type": "belongsTo",
"direction": "forward",
"object_slug": "contacts",
"object_name": "Contacts",
"object_icon": "users",
"options": [
{
"type": "relation",
"slug": "9f2c4b7a1e03",
"random_id": "a3f9c21b",
"name": "Sara Ali",
"label": "Sara Ali",
"icon": "users"
}
]
},
"pagination": {
"total": 1,
"page": 1,
"limit": 25,
"totalPages": 1,
"nextPage": null,
"prevPage": null
}
}
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Responses
Successful response
{
"message": "string",
"data": "string",
"pagination": "string"
}Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs