list_appointments
Search and list dock appointments using flexible query filters, field selection, and sorting.
Instructions
List and search appointments using NestJSX/Crud query syntax. Supports advanced filtering, field selection, joins, and sorting.
SEARCH (s=): JSON search with operators. When s= is provided, startDate/endDate/status/warehouseId/dockId convenience filters are ignored. Operators: $eq, $ne, $gt, $lt, $gte, $lte, $cont, $contL (case-insensitive contains), $starts, $ends, $in, $notin, $between, $isnull, $notnull Combinators: $and, $or Examples: Scheduled after a date: s='{"$and":[{"status":"Scheduled"},{"start":{"$gt":"2026-03-15T08:00:00.000-07:00"}}]}' Changed since a date: s='{"lastChangedDateTime":{"$gt":"2026-03-15T08:00:00.000Z"}}' Soft-deleted since a date: s='{"$and":[{"lastChangedDateTime":{"$gt":"2026-07-07T00:00:00.000Z"}},{"isActive":false}]}' Has tag "Late": s='{"tags":{"$contL":"Late"}}' Empty tags: s='{"tags":{"$or":{"$isnull":true,"$eq":"{}"}}}'
JOIN: Fetch related data in a single request. Each join is a separate array element. Examples: Get carrier info: join=["user","user.company"] Carrier email + company name only: join=["user||email,companyId","user.company||name"]
FIELDS: Comma-separated list of fields to return. Example: fields="refNumber,start,lastChangedDateTime,status"
SORT: Each sort is "field,direction". Use array for multi-sort. Examples: sort=["start,ASC"] or sort=["start,DESC","status,ASC"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number | |
| limit | No | Items per page | |
| offset | No | Number of records to skip | |
| warehouseId | No | Filter by warehouse ID (convenience; ignored if s= is set) | |
| dockId | No | Filter by dock ID (convenience; ignored if s= is set) | |
| status | No | Filter by status (convenience; ignored if s= is set) | |
| startDate | No | Appointments starting on or after this date, YYYY-MM-DD (convenience; ignored if s= is set) | |
| endDate | No | Appointments starting on or before this date, YYYY-MM-DD (convenience; ignored if s= is set) | |
| s | No | NestJSX/Crud search JSON — see description for operators and examples | |
| fields | No | Comma-separated fields to return (e.g. 'refNumber,start,status') | |
| join | No | Relations to join, each as 'relation' or 'relation||field1,field2' (e.g. ['user||email,companyId','user.company||name']) | |
| sort | No | Sort directives, each as 'field,ASC' or 'field,DESC' (e.g. ['start,ASC']) | |
| cache | No | Set to 0 to bypass cache |