# Trip API Version: v2 ## Servers Sandbox URL ``` https://api-ext-sboxmeta.partners.spotnana.com ``` ## Security ### Bearer Type: http Scheme: bearer ## Download OpenAPI description [Trip API](https://developer-docs.redocly.app/docs/_bundle/openapi/TripApi.yaml) ## Trips APIs to manage trips. ### Create trip - [POST /v2/trips](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/createtrip.md): This endpoint creates a trip object. A trip is a container object for all related PNRs associated with a trip. ### Update trip - [PUT /v2/trips/{tripId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/updatetrip.md): This endpoint updates trip by ID. ### Get trip details - [GET /v3/trips/{tripId}/detail](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/gettripdetailsv3.md): This endpoint gets trip details for a given trip ID. {% admonition type="info" %} Note: For air bookings made via Travelfusion (i.e., pnrs.data.sourceInfo.bookingSource: TRAVEL_FUSION) the refundPolicy and exchangePolicy fields will be empty. {% /admonition %} ### Delete trip - [DELETE /v3/trips/{tripId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/deletetrip.md): This endpoint deletes a trip by ID. ### Update trip details for trip Id - [POST /v3/trips/{tripId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/updatetripv3.md) ### List trip summaries for a user - [POST /v3/trips/users/{userId}/list](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/getusertripsummarieslist.md): Retrieves the list of trip summaries associated with a user. ### List trip summaries for a company - [POST /v3/trips/companies/{companyId}/list](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/getcompanytripsummarieslist.md): Retrieves the list of trip summaries associated with a company. ### Search company trips. - [POST /v3/trips/companies/{companyId}/search](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/searchcompanytrips.md): This endpoint is used to search trips for a company. ### List trip summaries for travelers managed by an arranger - [POST /v3/trips/arrangers/{arrangerId}/list](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/getarrangermanagedtripsummarieslist.md): Retrieves the list of trip summaries for all travelers managed by a specific arranger. This endpoint can be used for arrangers whose role types are COMPANY_TRAVEL_ARRANGER or TRAVEL_ARRANGER. ### Get trip partner info - [GET /v2/trips/{tripId}/booker-email/{bookerEmailId}/partner-info](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/fetchtrippartnerinfo.md): This endpoint provides info related to partner for the trip. ### Get trip (deprecated) - [GET /v2/trips/{tripId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/readtrip.md): Retrieves trip info by ID. {% admonition type="warning" name="Deprecation notice" %} The Get Trip /v2/trips/{tripId} endpoint has been deprecated. Use the new Get trip details /v3/trips/{tripId}/detail endpoint instead. {% /admonition %} ### List trips (deprecated) - [POST /v2/list-organisation-trips](https://developer-docs.redocly.app/docs/openapi/tripapi/trips/listorganisationtrips.md): Retrieves the list of trips associated with an organization. {% admonition type="warning" name="Deprecation notice" %} The List Trips /v2/list-organisation-trips endpoint has been deprecated. Use the new List trip summaries for a company /v3/trips/companies/{companyId}/list endpoint instead. {% /admonition %} ## PNRs APIs to manage PNRs within trips. ### Create PNR - [POST /v3/trips/{tripId}/pnrs](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/createpnrv3.md): Create a new Passenger Name Record (PNR). A PNR represents a booking (air, hotel, rail, or car) made on the Spotnana platform. You can also use this endpoint to import bookings made from external sources into the Spotnana platform. ### Get PNR - [GET /v3/trips/{tripId}/pnrs/{pnrId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/getpnrv3.md): This endpoint gets PNR for a given trip ID and PNR ID. ### Update PNR - [PUT /v3/trips/{tripId}/pnrs/{pnrId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/updatepnrv3.md): This endpoint updates PNR by ID. ### Add Remark - [POST /v3/trips/{tripId}/pnrs/{pnrId}/remarks](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/addremarkv3.md): This endpoint provided adding third party remarks to the given PNR. ### Finalize the given pnr. - [POST /v3/trips/{tripId}/pnrs/{pnrId}/finalize](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/finalizepnr.md): This endpoint changes the metadata of PNR to finalized and triggers supplier actions if required. ### Suspend the given pnr. - [POST /v3/trips/{tripId}/pnrs/{pnrId}/suspend](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/suspendpnr.md): This endpoint suspends the PNR, transitioning it into a read-only state. Once suspended, updates via OBT will be restricted. This API serves various use cases, such as price optimization and rebooking. ### Cancel PNR - [POST /v3/trips/{tripId}/pnrs/{pnrId}/cancel](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/cancelpnrv3.md): This endpoint cancels PNR or part of PNR object.In case of partial PNR cancel we can cancel journey/ticket. ### Get cancellation details - [GET /v2/trips/{tripId}/pnrs/{pnrId}/cancellation-details](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/getcancellationdetails.md): This endpoint gets cancellation details for a given trip ID and PNR ID. ### Download PNR invoice - [POST /v2/trips/{tripId}/pnrs/{pnrId}/download-invoice](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/downloadinvoice.md): This endpoint downloads invoice on demand for a given trip ID and PNR ID. ### Process the PNR approval - [POST /v2/pnrs/{pnrId}/process-approval](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/processpnrapproval.md): Approve or decline a PNR. ### Get PNR by external Id - [GET /v2/pnrs](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/getpnrbyexternalid.md): This endpoint gets PNR Id and Trip Id for a given external Id. ### Find Pnr details like BookingId and TripId - [GET /v2/pnrs/search](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-pnrs/pnrsearch.md): This API gets Pnr details for a given Source Pnr/ Ticket Number/ Vendor Confirmation. ## Invoicing APIs to manage invoicing. ### Get Invoice Data - [POST /v2/invoicing/invoice-data](https://developer-docs.redocly.app/docs/openapi/tripapi/invoicing/getinvoicedata.md): This endpoint gets the invoice data for given invoice numbers ## Approval APIs to manage approvals. ### List approval data for an approver - [POST /v3/approvals/approvers/{userId}/list](https://developer-docs.redocly.app/docs/openapi/tripapi/approval/getapprovaluserapprovaldatalist.md): Retrieves the list of approval data associated with an approver. ### List approval data for a company - [POST /v3/approvals/companies/{companyId}/list](https://developer-docs.redocly.app/docs/openapi/tripapi/approval/getcompanyapprovaldatalist.md): Retrieves the list of approval data associated with a company. ## Trip Notes ### Create a note for agents - [POST /v2/trips/{tripId}/agent-notes](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-notes/createagentnote.md): Creates a note addressed to the agents assigned for a specific trip. Agent notes are used to communicate trip-related information to agents handling the trip, such as special instructions, updates made on the booking, or any unresolved issues reported by the traveler. Use this endpoint to: - Add a note to a trip so the agents working on it will have all the latest information about the trip. - Use the optional pnrId field in the request body to link a note to a specific PNR within a trip. ### Read all agent notes for a trip - [GET /v2/trips/{tripId}/agent-notes](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-notes/listagentnotes.md): Retrieves all agent notes associated with a specific trip. Each note in the response includes the message, the sender's basic information, and timestamps. Use this endpoint to: - Review the full history of agent notes added to a trip. - Identify who created each note and when, using the senderInfo, createdAt, and updatedAt fields. Note: The response may contain a pnrId if it was added during the note creation. Otherwise, the pnrId field is omitted in the response. ### Delete an agent note - [DELETE /v2/trips/{tripId}/agent-notes/{noteId}](https://developer-docs.redocly.app/docs/openapi/tripapi/trip-notes/deleteagentnote.md): Deletes an existing agent note from a trip. Once deleted, the note cannot be retrieved later. Use this endpoint to: - Remove an agent note that is no longer relevant or was added by mistake.