# 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.spotnana.com/_bundle/openapi/TripApi.yaml)

## Trips

 - [POST /v2/trips](https://developer.spotnana.com/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.
 - [PUT /v2/trips/{tripId}](https://developer.spotnana.com/openapi/tripapi/trips/updatetrip.md): This endpoint updates trip by ID.
 - [GET /v3/trips/{tripId}/detail](https://developer.spotnana.com/openapi/tripapi/trips/gettripdetailsv3.md): This endpoint gets trip details for a given trip ID. **Note:** For air bookings made via Travelfusion (i.e., `pnrs.data.sourceInfo.bookingSource: TRAVEL_FUSION`) the `refundPolicy` and `exchangePolicy
 - [DELETE /v3/trips/{tripId}](https://developer.spotnana.com/openapi/tripapi/trips/deletetrip.md): This endpoint deletes a trip by ID.
 - [POST /v3/trips/{tripId}](https://developer.spotnana.com/openapi/tripapi/trips/updatetripv3.md)
 - [POST /v3/trips/users/{userId}/list](https://developer.spotnana.com/openapi/tripapi/trips/getusertripsummarieslist.md): Retrieves the list of trip summaries associated with a user.
 - [POST /v3/trips/companies/{companyId}/list](https://developer.spotnana.com/openapi/tripapi/trips/getcompanytripsummarieslist.md): Retrieves the list of trip summaries associated with a company.
 - [POST /v3/trips/companies/{companyId}/search](https://developer.spotnana.com/openapi/tripapi/trips/searchcompanytrips.md): This endpoint is used to search trips for a company.
 - [POST /v3/trips/arrangers/{arrangerId}/list](https://developer.spotnana.com/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 /v2/trips/{tripId}/booker-email/{bookerEmailId}/partner-info](https://developer.spotnana.com/openapi/tripapi/trips/fetchtrippartnerinfo.md): This endpoint provides info related to partner for the trip.
 - [GET /v2/trips/{tripId}](https://developer.spotnana.com/openapi/tripapi/trips/readtrip.md): Retrieves trip info by ID. The **Get Trip** `/v2/trips/{tripId}` endpoint has been deprecated. Use the new **Get trip details** `/v3/trips/{tripId}/detail` endpoint instead.
 - [POST /v2/list-organisation-trips](https://developer.spotnana.com/openapi/tripapi/trips/listorganisationtrips.md): Retrieves the list of trips associated with an organization. The **List Trips** `/v2/list-organisation-trips` endpoint has been deprecated. Use the new **List trip summaries for a company** `/v3/trips
## PNRs

 - [POST /v3/trips/{tripId}/pnrs](https://developer.spotnana.com/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 sour
 - [GET /v3/trips/{tripId}/pnrs/{pnrId}](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/getpnrv3.md): This endpoint gets PNR for a given trip ID and PNR ID.
 - [PUT /v3/trips/{tripId}/pnrs/{pnrId}](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/updatepnrv3.md): This endpoint updates PNR by ID.
 - [POST /v3/trips/{tripId}/pnrs/{pnrId}/remarks](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/addremarkv3.md): This endpoint provided adding third party remarks to the given PNR.
 - [POST /v3/trips/{tripId}/pnrs/{pnrId}/finalize](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/finalizepnr.md): This endpoint changes the metadata of PNR to finalized and triggers supplier actions if required.
 - [POST /v3/trips/{tripId}/pnrs/{pnrId}/suspend](https://developer.spotnana.com/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
 - [POST /v3/trips/{tripId}/pnrs/{pnrId}/cancel](https://developer.spotnana.com/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 /v2/trips/{tripId}/pnrs/{pnrId}/cancellation-details](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/getcancellationdetails.md): This endpoint gets cancellation details for a given trip ID and PNR ID.
 - [POST /v2/trips/{tripId}/pnrs/{pnrId}/download-invoice](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/downloadinvoice.md): This endpoint downloads invoice on demand for a given trip ID and PNR ID.
 - [POST /v2/pnrs/{pnrId}/process-approval](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/processpnrapproval.md): Approve or decline a PNR.
 - [GET /v2/pnrs](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/getpnrbyexternalid.md): This endpoint gets PNR Id and Trip Id for a given external Id.
 - [GET /v2/pnrs/search](https://developer.spotnana.com/openapi/tripapi/trip-pnrs/pnrsearch.md): This API gets Pnr details for a given Source Pnr/ Ticket Number/ Vendor Confirmation.
## Invoicing

 - [POST /v2/invoicing/invoice-data](https://developer.spotnana.com/openapi/tripapi/invoicing/getinvoicedata.md): This endpoint gets the invoice data for given invoice numbers
## Approval

 - [POST /v3/approvals/approvers/{userId}/list](https://developer.spotnana.com/openapi/tripapi/approval/getapprovaluserapprovaldatalist.md): Retrieves the list of approval data associated with an approver.
 - [POST /v3/approvals/companies/{companyId}/list](https://developer.spotnana.com/openapi/tripapi/approval/getcompanyapprovaldatalist.md): Retrieves the list of approval data associated with a company.
## Trip Notes

 - [POST /v2/trips/{tripId}/agent-notes](https://developer.spotnana.com/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 mad
 - [GET /v2/trips/{tripId}/agent-notes](https://developer.spotnana.com/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 histo
 - [DELETE /v2/trips/{tripId}/agent-notes/{noteId}](https://developer.spotnana.com/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.
