GetMyHotels Trips API
The trips API from GetMyHotels — 8 operation(s) for trips.
The trips API from GetMyHotels — 8 operation(s) for trips.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/getmyhotels-com:getmyhotels-com-trips-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: GetMyHotels REST Trips API
version: 1.0.0
description: REST surface for the native GetMyHotels apps. Every route is a thin transport over the shared tRPC routers — inputs are validated with the same Zod schemas the web client uses, and responses are returned verbatim. Authentication uses Better Auth bearer session tokens issued by the /api/auth/* endpoints (not part of this spec). Native clients send X-GMH-App-Version and X-GMH-Platform on every request; versions below the configured floor receive a typed 426 UpgradeRequiredError.
servers:
- url: https://api.getmyhotels.com
description: Production API
tags:
- name: trips
paths:
/v1/trips:
get:
tags:
- trips
summary: List my trips
description: Runs `itinerary.list` for the signed-in user.
security:
- bearerAuth: []
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.list` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: getV1Trips
x-operation-id-source: derived
post:
tags:
- trips
summary: Create a trip
description: 'Runs `itinerary.create`. Saving a trip requires sign-in (critical decision #4).'
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
title:
type: string
minLength: 1
maxLength: 255
description:
type: string
maxLength: 4000
startDate:
type:
- string
- 'null'
endDate:
type:
- string
- 'null'
destinationId:
type: integer
exclusiveMinimum: 0
budget:
type: number
minimum: 0
maximum: 10000000
budgetCurrency:
type: string
minLength: 3
maxLength: 3
coverImageUrl:
type: string
maxLength: 2048
format: uri
aiScore:
type: integer
minimum: 1
maximum: 10
aiVerdict:
type: string
enum:
- ready
- improve
- reject
aiSummary:
type: string
maxLength: 400
aiIssues:
type: array
items:
type: object
properties:
severity:
type: string
enum:
- blocker
- warning
- nit
where:
type: string
maxLength: 60
problem:
type: string
maxLength: 300
fix:
type: string
maxLength: 300
required:
- severity
- where
- problem
- fix
maxItems: 6
required:
- title
- startDate
- endDate
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.create` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1Trips
x-operation-id-source: derived
/v1/trips/{publicId}:
get:
tags:
- trips
summary: Trip detail
description: 'Runs `itinerary.getByPublicId`. Public read: published trips and share-token links resolve without a session.'
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
- schema:
type: string
maxLength: 50
required: false
name: shareToken
in: query
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.getByPublicId` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: getV1TripsByPublicId
x-operation-id-source: derived
delete:
tags:
- trips
summary: Delete a trip
description: 'Runs `itinerary.remove`; owner-only (collaborators cannot delete). Permanent: the trip and every item go. A trip the caller does not own answers 404.'
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.remove` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: deleteV1TripsByPublicId
x-operation-id-source: derived
/v1/trips/{publicId}/publish:
post:
tags:
- trips
summary: Publish a trip
description: Runs `itinerary.publish`; owner-only. Makes the trip publicly readable and returns `{ shareToken }`. Publishing again keeps the same token, so links already shared keep working. The web share link is `https://www.getmyhotels.com/trips/{publicId}?token={shareToken}`; `GET /v1/trips/{publicId}` takes the same value as `shareToken`.
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.publish` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1TripsByPublicIdPublish
x-operation-id-source: derived
/v1/trips/{publicId}/unpublish:
post:
tags:
- trips
summary: Unpublish a trip
description: Runs `itinerary.unpublish`; owner-only. Makes the trip private again and clears the share token, so every previously shared link stops working.
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.unpublish` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1TripsByPublicIdUnpublish
x-operation-id-source: derived
/v1/trips/{publicId}/items:
post:
tags:
- trips
summary: Add an item to a trip
description: Runs `itinerary.addItem`. The owner and `editor` collaborators may add; anyone else gets 403. `day` is 1-based and `sortOrder` orders items within a day. Returns the new item's numeric `{ id }`, which `DELETE /v1/trips/{publicId}/items/{itemId}` takes.
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
day:
type: integer
minimum: 1
maximum: 365
sortOrder:
type: integer
minimum: 0
default: 0
type:
type: string
enum:
- hotel
- flight
- experience
- transfer
- activity
- meal
- note
title:
type: string
minLength: 1
maxLength: 255
description:
type: string
maxLength: 2000
referenceId:
type: string
minLength: 1
maxLength: 36
bookingId:
type: integer
exclusiveMinimum: 0
startTime:
type: string
maxLength: 10
endTime:
type: string
maxLength: 10
location:
type: string
maxLength: 500
address:
type: string
maxLength: 500
latitude:
type: number
minimum: -90
maximum: 90
longitude:
type: number
minimum: -180
maximum: 180
notes:
type: string
maxLength: 2000
estimatedCost:
type: number
minimum: 0
maximum: 1000000
currency:
type: string
minLength: 3
maxLength: 3
imageUrl:
type: string
maxLength: 2048
format: uri
required:
- day
- type
- title
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.addItem` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller may not edit this trip
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1TripsByPublicIdItems
x-operation-id-source: derived
/v1/trips/{publicId}/items/{itemId}:
delete:
tags:
- trips
summary: Remove an item from a trip
description: 'Runs `itinerary.removeItem`. The owner and `editor` collaborators may remove; anyone else gets 403. Idempotent: an item id that is not on this trip succeeds and changes nothing.'
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
- schema:
type: integer
example: 42
required: true
name: itemId
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.removeItem` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller may not edit this trip
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: deleteV1TripsByPublicIdItemsByItemId
x-operation-id-source: derived
/v1/trips/{publicId}/collaborators:
get:
tags:
- trips
summary: List a trip's collaborators
description: 'Runs `itinerary.listCollaborators`. Readable by the owner and every collaborator; anyone else gets 403. Returns `{ collaborators: [{ userId, email, role, addedAt }] }`; `role` is `editor` today.'
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.listCollaborators` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The trip is private to its owner and collaborators
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: getV1TripsByPublicIdCollaborators
x-operation-id-source: derived
post:
tags:
- trips
summary: Invite a collaborator to a trip
description: Runs `itinerary.addCollaborator`; owner-only. The invitee must already have an account (404 with a sign-up hint otherwise); inviting yourself is a 400 and inviting an existing collaborator a 409. `role` defaults to `editor`. Returns `{ collaborator }`.
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
maxLength: 320
format: email
role:
type: string
enum:
- editor
default: editor
required:
- email
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.addCollaborator` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'409':
description: The request conflicts with the resource's current state
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: postV1TripsByPublicIdCollaborators
x-operation-id-source: derived
/v1/trips/{publicId}/collaborators/{userId}:
delete:
tags:
- trips
summary: Remove a collaborator from a trip
description: Runs `itinerary.removeCollaborator`; owner-only. `userId` is the collaborator's `userId` from the list. 404 when the trip is not the caller's or that user is not a collaborator.
security:
- bearerAuth: []
parameters:
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: publicId
in: path
- schema:
type: string
minLength: 1
maxLength: 36
required: true
name: userId
in: path
responses:
'200':
description: Success
content:
application/json:
schema:
description: Verbatim JSON output of the `itinerary.removeCollaborator` tRPC procedure. Response shapes are intentionally not modeled in this spec; the native client types them by hand.
'400':
description: Request validation failed or the router rejected the input
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing or invalid bearer session token
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'426':
description: Reported X-GMH-App-Version is below the supported minimum — the app must update
content:
application/json:
schema:
$ref: '#/components/schemas/UpgradeRequiredError'
'500':
description: Unexpected server error (opaque; details stay in logs)
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
operationId: deleteV1TripsByPublicIdCollaboratorsByUserId
x-operation-id-source: derived
components:
schemas:
UpgradeRequiredError:
type: object
properties:
error:
type: object
properties:
code:
type: string
enum:
- UPGRADE_REQUIRED
message:
type: string
minVersion:
type: string
example: 1.2.0
platform:
type:
- string
- 'null'
required:
- code
- message
- minVersion
- platform
required:
- error
ApiError:
type: object
properties:
error:
type: object
properties:
code:
type: string
example: NOT_FOUND
message:
type: string
example: Booking not found
domainCode:
type: string
example: NON_REFUNDABLE_CONSENT_REQUIRED
issues:
type: array
items:
type: object
properties:
path:
type: string
message:
type: string
required:
- path
- message
required:
- code
- message
required:
- error
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Better Auth session token. Obtain it from the native /api/auth/* endpoints (Better Auth bearer plugin — out of scope for this spec, see #922).'
x-provenance:
method: harvested
publisher: GetMyHotels
source: https://api.getmyhotels.com/v1/openapi.json
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)