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 and PNRs.

Operations

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.

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

Pagination parameters for requests.

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 objects(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://apis.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

Pagination parameters for response.

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": [ {} ] }

Download PNR invoice

Request

This endpoint downloads invoice on demand for a given trip ID and PNR ID.

Path
tripIdstringrequired

Trip Id

Example: 6926658168
pnrIdstringrequired

Pnr Id

Example: 2643222286
curl -i -X POST \
  https://apis.spotnana.com/v2/trips/6926658168/pnrs/2643222286/download-invoice \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
datastring(byte)
Example: "6935813e12584abda0e43d71cd2ea260"
Response
application/json
{ "data": "6935813e12584abda0e43d71cd2ea260" }

Cancel PNR

Request

This endpoint cancels PNR or part of PNR object.In case of partial PNR cancel we can cancel journey/ticket.

Path
tripIdstringrequired

Trip ID

Example: 6926658168
pnrIdstringrequired

PNR ID

Example: 6926658168
Bodyapplication/jsonrequired
cancellationTypestring

Type of cancellation to be performed. For the NO_REFUND, FULL_REFUND and FULL_CREDIT cancellation types, if no cancellationDetails are provided, we assume the entire PNR is being canceled. If the cancellation type is FULL_CREDIT, we will also assume the credits created will have 0 penalty and an expiry date of 1 year from the issue date of the ticket.

Enum"NO_REFUND""FULL_REFUND""PARTIAL_REFUND""FULL_CREDIT"
Example: "FULL_REFUND"
cancellationDetailsArray of objects(CancelDetail)

List of object to be cancelled and their associated refund details.

bookingEmailInfoobject

Information passed to the Spotnana email system that processes booking updates.

curl -i -X POST \
  https://apis.spotnana.com/v3/trips/6926658168/pnrs/6926658168/cancel \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "cancellationType": "FULL_REFUND",
    "cancellationDetails": [
      {
        "cancelObjectDetail": {
          "cancelObjectType": "PNR",
          "cancelObjectId": "string",
          "vendorCancellationId": "string"
        },
        "refundInfo": [
          {
            "refundType": "CREDIT",
            "amount": {
              "base": {
                "amount": 510,
                "currencyCode": "GBP",
                "convertedAmount": 715.42,
                "convertedCurrency": "USD",
                "otherCoinage": [
                  {}
                ]
              },
              "tax": {
                "amount": 510,
                "currencyCode": "GBP",
                "convertedAmount": 715.42,
                "convertedCurrency": "USD",
                "otherCoinage": [
                  {}
                ]
              }
            },
            "fop": {
              "type": "CARD",
              "card": {
                "id": "34d536b6-f8ff-11eb-9a61-0242ac180002",
                "type": "CREDIT",
                "company": "VISA",
                "name": "Harrison Schwartz",
                "address": {
                  "addressLines": [],
                  "recipients": []
                },
                "number": "4111111111111111",
                "expiryMonth": 1,
                "expiryYear": 2010,
                "cvv": "012",
                "label": "Label amex",
                "currency": "USD",
                "externalId": "bxt_RNGsNfzgJDaTstKIKqK4xEuhGYAnMdYK8T40",
                "vaultId": "34d536b6-f8ff-11eb-9a61-0242ac180002",
                "expiry": {},
                "ownershipLabel": "CORPORATE"
              },
              "additionalInfo": "string",
              "accessType": {
                "accessType": "UNKNOWN_TYPE",
                "entityIds": [
                  null
                ],
                "entities": [
                  null
                ]
              },
              "paymentMethod": "BREX_POINTS",
              "paymentMetadata": {
                "customPaymentMethodMetadata": {
                  "brexBudgetMetadata": {}
                },
                "vendorProgramPaymentMetadata": {},
                "virtualCardMetadata": {},
                "cardMetadata": {}
              },
              "paymentSourceType": "CARD"
            },
            "expiryDate": {
              "iso8601": "2017-07-21"
            }
          }
        ]
      }
    ],
    "bookingEmailInfo": {
      "disableEmail": true
    }
  }'

Responses

OK

Response
No content

Invoicing

Operations

Approval

Operations