Skip to content

Trip API (v2)

Download OpenAPI description
Languages
Servers
Sandbox URL
https://api-ext-sboxmeta.partners.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.

Security
Bearer
Bodyapplication/json
tripNamestringrequired

Name of the trip.

tripDescriptionstring

Description of the trip.

userIdobject(UserId)
registrarIdobject(UserId)
curl -i -X POST \
  https://api-ext-sboxmeta.partners.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.

Security
Bearer
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://api-ext-sboxmeta.partners.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.

Security
Bearer
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://api-ext-sboxmeta.partners.spotnana.com/v3/trips/6926658168/detail?refreshType=REFRESH_TYPE_BLOCKING' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
basicTripInfoobject(BasicTripInfo)required
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)
basicTripInfo.​endDateobject(DateModel)
basicTripInfo.​userIdobject(UserId)
basicTripInfo.​registrarUserIdobject(UserId)
basicTripInfo.​tripMetadataobject(TripMetadata)
basicTripInfo.​tripDisabledInfoobject(TripDisabledInfo)
pnrsArray of objects(PnrDetailsResponseWithId)required
pnrs[].​pnrIdstring

Unique PNR ID

Example: "6926658168"
pnrs[].​dataobject(PnrData)
pendingShellPnrsArray of objects(PnrDetailsResponseWithId)
pendingManualFormPnrsArray of objects(PnrDetailsResponseWithId)
tripBookingStatusstring(UserFacingStatus)
Enum"UNKNOWN_STATUS""PENDING_STATUS""CONFIRMED_STATUS""ACTIVE_STATUS""COMPLETED_STATUS""CANCELLED_STATUS""REFUNDED_STATUS""VOIDED_STATUS""PROCESSING_STATUS""UNCONFIRMED_STATUS"
eventSummaryobject(TravelerEventSummary)
simplePnrsArray of objects(SimplePnr)
additionalInfoobject(TripAdditionalInfo)
tripPaymentInfoobject(TripPaymentInfo)
tripStatusstring(PnrBookingStatus)Deprecated
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": {} } }

Delete trip

Request

This endpoint deletes a trip by ID.

Security
Bearer
Path
tripIdstringrequired

Trip ID

Example: 6926658168
curl -i -X DELETE \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/trips/6926658168 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Deleted Successfully

Response
No content

Update trip details for trip Id

Request

Security
Bearer
Path
tripIdstringrequired

Trip ID

Example: 6926658168
Bodyapplication/json
tripContactsArray of objects(TripContact)
curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/trips/6926658168 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tripContacts": [
      {
        "label": "Coordinator",
        "name": "Himani Jain",
        "email": "himani@spotnana.com",
        "phoneNumber": {
          "countryCode": 91,
          "countryCodeSource": "FROM_NUMBER_WITH_PLUS_SIGN",
          "extension": "222",
          "isoCountryCode": "IN",
          "italianLeadingZero": true,
          "nationalNumber": 8150,
          "numberOfLeadingZeros": 1,
          "preferredDomesticCarrierCode": "7",
          "rawInput": "77777",
          "type": "MOBILE"
        },
        "isPrimary": true,
        "restrictVisibility": true
      }
    ]
  }'

Responses

OK

Response
No content

List trip summaries for a user

Request

Retrieves the list of trip summaries associated with a user.

Security
Bearer
Path
userIdstring(uuid)required

Identifier for the user whose trip summaries are requested.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
paginationRequestParamsobject(OffsetBasedPaginationRequestParams)required
paginationRequestParams.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
paginationRequestParams.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
includePnrSummariesboolean

Boolean flag to include PNR summaries in the response

Example: true
tripFiltersArray of TripUserIdFilter (object) or TripIdFilter (object) or CompanyIdFilter (object) or TripTypeFilter (object) or TripTravelTypeFilter (object) or PolicyStatusFilter (object) or TripStartDateRangeFilter (object) or TripEndDateRangeFilter (object) or OverallStatusFilter (object) or TripDateTimeRangeFilter (object)(TripFilters)

Filter for the list trip summary request.

sortOptionsArray of objects(TripSortOptions)

Sort options for the list trip summary request

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/trips/users/4974a66b-7493-4f41-908c-58ba81093947/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paginationRequestParams": {
      "offset": 0,
      "limit": 100
    },
    "includePnrSummaries": true,
    "tripFilters": [
      {
        "filterType": "string",
        "userIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "sortOptions": [
      {
        "sortField": "START_DATE",
        "sortOrder": "DESC"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
paginationResponseParamsobject(OffsetBasedPaginationResponseParams)required
paginationResponseParams.​totalNumResultsinteger(int32)required

Total number of results.

tripSummariesArray of objects(TripSummary)

List of Trip summaries

failedTripSummariesArray of objects(TripSummary)

List of Trip summaries

Response
application/json
{ "paginationResponseParams": { "totalNumResults": 0 }, "tripSummaries": [ {} ], "failedTripSummaries": [ {} ] }

List trip summaries for a company

Request

Retrieves the list of trip summaries associated with a company.

Security
Bearer
Path
companyIdstring(uuid)required

Identifier for the company whose trip summaries are requested.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
paginationRequestParamsobject(OffsetBasedPaginationRequestParams)required
paginationRequestParams.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
paginationRequestParams.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
includePnrSummariesboolean

Boolean flag to include PNR summaries in the response

Example: true
tripFiltersArray of TripUserIdFilter (object) or TripIdFilter (object) or CompanyIdFilter (object) or TripTypeFilter (object) or TripTravelTypeFilter (object) or PolicyStatusFilter (object) or TripStartDateRangeFilter (object) or TripEndDateRangeFilter (object) or OverallStatusFilter (object) or TripDateTimeRangeFilter (object)(TripFilters)

Filter for the list trip summary request.

sortOptionsArray of objects(TripSortOptions)

Sort options for the list trip summary request

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/trips/companies/4974a66b-7493-4f41-908c-58ba81093947/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paginationRequestParams": {
      "offset": 0,
      "limit": 100
    },
    "includePnrSummaries": true,
    "tripFilters": [
      {
        "filterType": "string",
        "userIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "sortOptions": [
      {
        "sortField": "START_DATE",
        "sortOrder": "DESC"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
paginationResponseParamsobject(OffsetBasedPaginationResponseParams)required
paginationResponseParams.​totalNumResultsinteger(int32)required

Total number of results.

tripSummariesArray of objects(TripSummary)

List of Trip summaries

failedTripSummariesArray of objects(TripSummary)

List of Trip summaries

Response
application/json
{ "paginationResponseParams": { "totalNumResults": 0 }, "tripSummaries": [ {} ], "failedTripSummaries": [ {} ] }

List trip summaries for travelers managed by an arranger

Request

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.

Security
Bearer
Path
arrangerIdstring(uuid)required

Identifier for the arranger whose managed travelers trip summaries are requested.

Example: 4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
paginationRequestParamsobject(OffsetBasedPaginationRequestParams)required
paginationRequestParams.​offsetinteger(int32)>= 0

The starting index in the list from which results are returned. The value must be greater than or equal to 0.

Default 0
paginationRequestParams.​limitinteger(int32)>= 1

Maximum number of results to be fetched.

Default 100
includePnrSummariesboolean

Boolean flag to include PNR summaries in the response

Example: true
tripFiltersArray of TripUserIdFilter (object) or TripIdFilter (object) or CompanyIdFilter (object) or TripTypeFilter (object) or TripTravelTypeFilter (object) or PolicyStatusFilter (object) or TripStartDateRangeFilter (object) or TripEndDateRangeFilter (object) or OverallStatusFilter (object) or TripDateTimeRangeFilter (object)(TripFilters)

Filter for the list trip summary request.

sortOptionsArray of objects(TripSortOptions)

Sort options for the list trip summary request

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/trips/arrangers/4974a66b-7493-4f41-908c-58ba81093947/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "paginationRequestParams": {
      "offset": 0,
      "limit": 100
    },
    "includePnrSummaries": true,
    "tripFilters": [
      {
        "filterType": "string",
        "userIds": [
          {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
          }
        ]
      }
    ],
    "sortOptions": [
      {
        "sortField": "START_DATE",
        "sortOrder": "DESC"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
paginationResponseParamsobject(OffsetBasedPaginationResponseParams)required
paginationResponseParams.​totalNumResultsinteger(int32)required

Total number of results.

tripSummariesArray of objects(TripSummary)

List of Trip summaries

failedTripSummariesArray of objects(TripSummary)

List of Trip summaries

Response
application/json
{ "paginationResponseParams": { "totalNumResults": 0 }, "tripSummaries": [ {} ], "failedTripSummaries": [ {} ] }

Get trip partner info

Request

This endpoint provides info related to partner for the trip.

Security
Bearer
Path
tripIdstringrequired

Identifier for trip.

Example: 2398199412
bookerEmailIdstringrequired

Booker Email Id for whom budget info will be fetched.

Example: akanksha@spotnana.com
curl -i -X GET \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/trips/2398199412/booker-email/akanksha@spotnana.com/partner-info \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
tripIdstringrequired

Spotnana trip Id

Example: "6926658168"
partnerInfoobject(TripPartnerInfo)required
partnerInfo.​partnerInfoTypestring(TripPartnerInfoType)required
Value"BUDGET"
partnerInfo.​partnerInfoDetailsTripBudgetInfoWrapper (object)(TripPartnerInfoDetails)required
TripBudgetInfoWrapper (object)(TripPartnerInfoDetails)
Response
application/json
{ "tripId": "6926658168", "partnerInfo": { "partnerInfoType": "BUDGET", "partnerInfoDetails": {} } }

Get tripDeprecated

Request

Retrieves trip info by ID.

Deprecation notice

The Get Trip /v2/trips/{tripId} endpoint has been deprecated. Use the new Get trip details /v3/trips/{tripId}/detail endpoint instead.

Security
Bearer
Path
tripIdstringrequired

Identifier for trip.

Example: 2398199412
curl -i -X GET \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/trips/2398199412 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

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"
applicationIdstring(uuid)

Application id used for the trip.

startDateobject(DateModel)
endDateobject(DateModel)
userIdobject(UserId)
registrarUserIdobject(UserId)
tripMetadataobject(TripMetadata)
tripDisabledInfoobject(TripDisabledInfo)
Response
application/json
{ "tripId": "6926658168", "tripName": "JFK SFO Trip", "tripDescription": "JFK SFO Business Trip", "applicationId": "97ab27fa-30e2-43e3-92a3-160e80f4c0d5", "startDate": { "iso8601": "2017-07-21" }, "endDate": { "iso8601": "2017-07-21" }, "userId": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }, "registrarUserId": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08" }, "tripMetadata": { "hasTripOverride": true, "preferredCurrency": "USD", "tripContacts": [] }, "tripDisabledInfo": { "disabledReason": "MAX_BOOKINGS_EXCEEDED", "isDisabled": false } }

List tripsDeprecated

Request

Retrieves the list of trips associated with an organization.

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.

Security
Bearer
Bodyapplication/json
organizationIdobject(OrganizationId)required
organizationId.​idstringrequired
updatedAtobject(DateTimeOffset)
pnrTypestringrequired

Type of PNR

Enum"AIR""CAR""RAIL""HOTEL""LIMO""ALL"
customFieldIdsArray of objects(CustomFieldId)Deprecated

List of custom field IDs to filter. This field is not in use and has been deprecated.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v2/list-organisation-trips \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "organizationId": {
      "id": "string"
    },
    "updatedAt": {
      "iso8601": "2017-07-21T17:32Z"
    },
    "pnrType": "AIR",
    "customFieldIds": [
      {
        "type": "QUESTION",
        "externalId": "string"
      }
    ]
  }'

Responses

OK

Bodyapplication/json
tripsArray of objects(OrgTripInfo)
Response
application/json
{ "trips": [ {} ] }

PNRs

APIs to manage PNRs within trips.

Operations

Invoicing

APIs to manage invoicing.

Operations

Approval

APIs to manage approvals.

Operations