/api/v1/object/data/facets/{objectSlug}List the values of dependent filter fields.
List the values of dependent filter fields.
Some objects define filter dependencies: a child field whose choices
depend on the value of a parent field, such as a city that depends on a
country. For each child field, this returns the distinct values stored on
records, narrowed by the parent values you pass. Only records the
credential can see count. The object returns {} when it defines no
filter dependencies.
Parent and child fields are named by the field's name, not its slug.
Query parameters:
<parent field name>— the parent value to narrow by, for examplecountry=Egypt. Parameters that name no parent are ignored.
Scope: read.<object slug>, for example read.contacts.
Errors:
400— no active object has that slug.403— the credential lacksread.<object slug>.
Response 200:
{
"status": 200,
"message": "Filter facets retrieved successfully",
"data": {
"city": ["Alexandria", "Cairo", "Giza"]
}
}
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"
}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