# Get trips

Retrieve a paginated list of trips with optional filtering and sorting

Endpoint: GET /trips
Version: 1.1.0
Security: bearerAuth, m2mOnBehalfOf

## Security:

  - `bearerAuth` (unknown)
    http bearer

  - `m2mOnBehalfOf` (unknown)
    http bearer

## Query parameters:

  - `page` (integer)
    Page number (starts at 1)

  - `pageSize` (integer)
    Number of items per page

  - `filters` (string)
    JSON array of filters, e.g. [{"field":"duration","operator":"gte","value":5}]

  - `orderBy` (string)
    JSON object for sorting, e.g. {"field":"createdAt","direction":"desc"}

  - `search` (string)
    JSON object for searching, e.g. {"fields":["title"],"term":"Paris"}

## Header parameters:

  - `x-on-behalf-of` (string)
    Identifies the agent the M2M client is acting on behalf of. Format: `<email>` or `<email>,<account_id>`. When `account_id` is omitted, the agent's `current_account_id` is used. The resolved account must be within the M2M client's grant (its account or, if the grant points at an organization parent, one of its children).
Marked `required: false` because it is only needed when authenticating with the `m2mOnBehalfOf` security scheme — `bearerAuth` requests ignore it. When using `m2mOnBehalfOf` it is mandatory; omitting it causes the request to fall through to the legacy `@clients` flow, which is not the documented public API surface.
Duplicate headers are rejected with `400`.

## Response 200:

  - `200` (unknown)
    Successful response with paginated trips

## Response 200 fields (application/json):

  - `data` (array, required)

  - `data.id` (integer, required)
    Unique identifier for the trip
    Example: 12345

  - `data.title` (string, required)
    Title of the trip
    Example: Paris Summer Vacation

  - `data.slug` (string, required)
    URL-friendly identifier for the trip
    Example: paris-summer-vacation-abc123

  - `data.joinCode` (string)
    Code for travelers to join the trip
    Example: ABC12345

  - `data.seoDescription` (string)
    SEO description for the trip
    Example: Experience the best of Paris in this 7-day adventure

  - `data.duration` (integer)
    Duration of the trip in days
    Example: 7

  - `data.hasFirmBooking` (boolean)
    Whether the trip has a firm booking, which freezes its party. Returned by the trip read and update.
    Example: false

  - `data.partyLock` (string)
    Why the party cannot be restated through `statedParty`, or null when it can.
    Enum: "trip_party_frozen", "trip_party_quoted", "null"

  - `data.dateStart` (string)
    Start date of the trip
    Example: 2025-07-15T00:00:00.000Z

  - `data.dateFinish` (string)
    End date of the trip
    Example: 2025-07-22T00:00:00.000Z

  - `data.dateExpiration` (string)
    Expiration date for the trip offer
    Example: 2025-06-30T00:00:00.000Z

  - `data.code` (string, required)
    Internal trip code
    Example: TRIP-001

  - `data.logo` (string)
    URL of the trip logo
    Example: https://example.com/trip-logo.png

  - `data.countries` (array)
    ISO 3166-1 alpha-3 country codes
    Example: ["FRA","ESP"]

  - `data.imageUrl` (string)
    URL of the trip cover image
    Example: https://example.com/trip-cover.jpg

  - `data.agentId` (integer, required)
    ID of the agent who created the trip
    Example: 100

  - `data.template` (boolean, required)
    Whether this trip is a template
    Example: false

  - `data.accountId` (integer, required)
    ID of the account that owns the trip
    Example: 50

  - `data.createdAt` (string, required)
    Timestamp when the trip was created
    Example: 2025-01-15T10:30:00.000Z

  - `data.updatedAt` (string, required)
    Timestamp when the trip was last updated
    Example: 2025-01-18T14:45:00.000Z

  - `data.visualizations` (integer, required)
    Number of times the trip has been viewed by travelers (read-only)
    Example: 150

  - `data.travelerAges` (array)
    Canonical search party, returned on trip detail reads. IDs are assigned by the server and retained when services reference the party.

  - `data.travelerAges.id` (string, required)
    Example: 1c2c38f3-e596-463e-9f62-75c7c3602770

  - `data.travelerAges.age` (integer, required)
    Example: 30

  - `data.agentName` (string)
    First name of the agent
    Example: John

  - `data.agentSurname` (string)
    Last name of the agent
    Example: Doe

  - `data.agentPictureUrl` (string)
    URL of the agent's profile picture
    Example: https://example.com/agent-photo.jpg

  - `data.accountName` (string)
    Name of the account/agency
    Example: Travel Dreams Agency

  - `data.customer` (string)
    Customer name associated with the trip
    Example: Jane Smith

  - `data.role` (string)
    User's role for this trip
    Enum: "owner", "editor", "viewer"

  - `data.isPublic` (boolean)
    Whether the trip is publicly accessible
    Example: true

  - `page` (integer, required)
    Current page number
    Example: 1

  - `pageSize` (integer, required)
    Number of items per page
    Example: 20

  - `totalCount` (integer, required)
    Total number of items
    Example: 150

  - `totalPages` (integer, required)
    Total number of pages
    Example: 8

## Response 400:

  - `400` (unknown)
    Invalid request parameters

