GET /api/unified/users/trainers
Fetches all the trainers visible to the current user, allowing paging through them as well
as filtering by multiple fields.
{
// Contains filters to limit response by specific criteria
// Can be null
"unified_filters":
{
// An arbitrary parameter limiting the collection to 1 trainer with the specified id
// Can be null
"id": "Some string",
// An arbitrary string to perform full-text search against
// Can be null
"fulltext": "Some string",
// Gender of the trainer
// Can be null
"sex": true,
// Boolean parameter to flag if not to show current user
// Can be null
"others": "Some string",
// Boolean parameter to flag if visible or hidden trainers to be shown
// Can be null
"disabled": "Some string",
// A list of group ids to show the clients from
// Can be null
"group_ids": "Some string",
// A list of locations ids to show the clients from
// Can be null
"location_ids": "Some string",
// Id of the service category that the trainer is assocated with
// Can be null
"service_category_id": "Some string",
// Returns trainers with the specified status: active, inactive, frozen
// Can be null
"status": 563,
// Include only trainer belonging to the SDH with id passed
// Can be null
"service_working_time_id": 816,
// Returns trainers associated to the selected service
// Can be null
"service_id": 416,
// Returns trainers who provides personal or group services
// Can be null
"individual_trainers": true,
// Returns trainers who share their schedule
// Can be null
"share_schedule": true,
// Returns trainers with the specified type
// Allowed values are: "Users::Trainers::Employed" and "Users::Trainers::SelfEmployed"
// Can be null
"type": [ "An", "Array", "Of", "Strings/Integers" ],
// Array of Tag IDs or an arbitrary string to perform full-text search against
// Can be null
"tag_ids": [ "An", "Array", "Of", "Strings/Integers" ],
// Array of Tag IDs or an arbitrary string to perform full-text search against both tag names and trainers
// Can be null
"tags_fulltext": [ "An", "Array", "Of", "Strings/Integers" ],
// Contains filters for coaches based on the relationships they have
// Can be null
"relationship":
{
// Minimum strength of relationship
// Can be null
"min_strength": 45,
// Ids of clients, relationships with whom will be analysed
// Can be null
"client_ids": [ "An", "Array", "Of", "Strings/Integers" ],
// Array of relationship types
// Allowed values are: "has_package_with", "has_booking_with", "has_assessment_with", "has_workout_from", "is_allocated_to", and "has_active_package_with"
// Can be null
"type": [ "An", "Array", "Of", "Strings/Integers" ]
}
}
,
// Sorting settings
// Can be null
"unified_sorting":
{
// Sort by name, ascending if true
// Can be null
"name": true
}
,
// Pagination settings
// Can be null
"limit":
{
// The number of items to skip (=start from)
// Cannot be null
"start": 269,
// The number of items to include into response
// Cannot be null
"count": 285
}
}
{
// The collection of trainers matching criteria and pagination settings
// Cannot be null
"trainers": [ Trainer::Index ],
// Total number of items
// Cannot be null
"count": 453
}