Trip API (v2)

Download OpenAPI description
Languages
Servers
Staging URL
https://apis.spotnana.com/
Spotnana mock server
https://developer.spotnana.com/_mock/openapi/tripapi/

Trips

APIs to manage trips.

Operations

Create trip

Request

This endpoint creates a trip object. A trip is a container object for all related PNRs associated with a trip.

Bodyapplication/json
tripNamestringrequired

Name of the trip.

tripDescriptionstring

Description of the trip.

userIdobject(UserId)

User identifier

registrarIdobject(UserId)

Creator of the Trip.

curl -i -X POST \
  https://apis.spotnana.com/v2/trips \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tripName": "string",
    "tripDescription": "string",
    "userId": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    },
    "registrarId": {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    }
  }'

Responses

Created

Bodyapplication/json
idstring
Example: "some-id"
Response
application/json
{ "id": "some-id" }

Update trip

Request

This endpoint updates trip by ID.

Path
tripIdstringrequired

Identifier for trip.

Example: 2398199412
Bodyapplication/json
tripIdstringrequired

Spotnana trip Id

Example: "6926658168"
tripNamestringrequired

Name of the trip

Example: "JFK SFO Trip"
tripDescriptionstring

Trip description

Example: "JFK SFO Business Trip"
curl -i -X PUT \
  https://apis.spotnana.com/v2/trips/2398199412 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tripId": "6926658168",
    "tripName": "JFK SFO Trip",
    "tripDescription": "JFK SFO Business Trip"
  }'

Responses

Updated Successfully

Response
No content

Get trip details

Request

This endpoint gets trip details for a given trip ID.

Path
tripIdstringrequired

Trip ID

Example: 6926658168
Query
refreshTypestring(RefreshType)

Refresh Type

Enum"REFRESH_TYPE_BLOCKING""REFRESH_TYPE_ASYNC""REFRESH_TYPE_DISABLED"
Example: refreshType=REFRESH_TYPE_BLOCKING
curl -i -X GET \
  'https://apis.spotnana.com/v3/trips/6926658168/detail?refreshType=REFRESH_TYPE_BLOCKING' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
basicTripInfoobject(BasicTripInfo)required

Basic trip info

basicTripInfo.​tripIdstringrequired

Spotnana trip Id

Example: "6926658168"
basicTripInfo.​tripNamestringrequired

Name of the trip

Example: "JFK SFO Trip"
basicTripInfo.​tripDescriptionstring

Trip description

Example: "JFK SFO Business Trip"
basicTripInfo.​applicationIdstring(uuid)

Application id used for the trip.

basicTripInfo.​startDateobject(DateModel)

Date in ISO 8601 standard.

basicTripInfo.​endDateobject(DateModel)

Date in ISO 8601 standard.

basicTripInfo.​userIdobject(UserId)

The user Id of the traveler to whom the trip belongs to.

basicTripInfo.​registrarUserIdobject(UserId)

The user Id of the registrar of the adhoc traveler.

basicTripInfo.​tripMetadataobject(TripMetadata)

Metadata for the trip

basicTripInfo.​tripDisabledInfoobject(TripDisabledInfo)

Information regarding whether the trip is disabled and if so, the reason why.

pnrsArray of objects(PnrDetailsResponseWithId)required
pnrs[].​pnrIdstring

Unique PNR ID

Example: "6926658168"
pnrs[].​dataobject(PnrData)

Pnr data with all information about a single booking containing one of Air, Hotel, Car, Rail, Limo or Miscellaneous PNR.

pendingShellPnrsArray of objects(PnrDetailsResponseWithId)
pendingManualFormPnrsArray of objects(PnrDetailsResponseWithId)
tripBookingStatusstring(UserFacingStatus)

User facing booking status

Enum"UNKNOWN_STATUS""PENDING_STATUS""CONFIRMED_STATUS""ACTIVE_STATUS""COMPLETED_STATUS""CANCELLED_STATUS""REFUNDED_STATUS""VOIDED_STATUS""PROCESSING_STATUS""UNCONFIRMED_STATUS"
eventSummaryobject(TravelerEventSummary)

Event summary for a traveler

simplePnrsArray of objects(SimplePnr)
additionalInfoobject(TripAdditionalInfo)

Additional information about the trip

tripPaymentInfoobject(TripPaymentInfo)

Payment info for a given trip. Fares of pending manual form and pending shell pnrs are not considered.

tripStatusstring(PnrBookingStatus)Deprecated

User facing status for this booking

Enum"PENDING""CONFIRMED""ACTIVE""COMPLETED""CANCELLED""REFUNDED""VOIDED""PROCESSING""UNCONFIRMED""AIRLINE_CONTROL"
Response
application/json
{ "basicTripInfo": { "tripId": "6926658168", "tripName": "JFK SFO Trip", "tripDescription": "JFK SFO Business Trip", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "startDate": {}, "endDate": {}, "userId": {}, "registrarUserId": {}, "tripMetadata": {}, "tripDisabledInfo": {} }, "pnrs": [ {} ], "pendingShellPnrs": [ {} ], "pendingManualFormPnrs": [ {} ], "tripStatus": "CONFIRMED", "tripBookingStatus": "PENDING_STATUS", "eventSummary": { "id": "12345", "type": "GENERIC", "name": "My event", "description": "This is an event description", "startDateTime": {}, "endDateTime": {}, "location": {}, "contacts": [], "documents": [], "bookingGuidelines": [], "allowedBookingTypes": [], "eventUserRsvp": {}, "contactInfoList": [], "companyId": {}, "runningStatus": "UPCOMING", "status": "DRAFT", "isRemovedParticipant": true, "inviteEmailConfig": {} }, "simplePnrs": [ {} ], "additionalInfo": { "vpayBillBack": "B" }, "tripPaymentInfo": { "totalFare": {}, "totalFareAmount": {}, "serviceFeeFareAmount": {} } }

PNRs

APIs to manage PNRs within trips.

Invoicing

APIs to manage invoicing.

Operations

Approval

APIs to manage approvals.

Operations