Task Custom Fields - Search

Search a task with specific custom field(s) and value(s)

This is a POST request. https://onfleet.com/api/v2/tasks/customFields/search

This endpoint allows users to query tasks by a specific custom field key-value pair, returning all tasks that match the provided criteria. Instead of using JSON brackets, users only need to supply an array of key-value objects. The response will return all tasks that contain the queried key-value pair.

Request Fields:

NameTypeDescription
KeyStringUnique identifier.
ValueObjectThe desired value for this field.

Example payload:

[
    {
        "key": "c1",
        "value": "hello"
    }
]
[
    {
        "key": "c1",
        "value": "hello"
    },
    {
        "key": "c2",
        "value": "world"
    }
]
📘

Empty Value

If the custom field has an empty value, omit the key-value pair object from the array to ensure the endpoint returns the correct results.