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

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
Response
application/json
{ "id": "string" }

Get trip

Request

This endpoint gets trip by ID.

Path
tripIdstringrequired

Identifier for trip.

Example: 2398199412
curl -i -X GET \
  https://apis.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)

Date in ISO 8601 standard.

endDateobject(DateModel)

Date in ISO 8601 standard.

userIdobject(UserId)

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

registrarUserIdobject(UserId)

The user Id of the registrar of the adhoc traveler.

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" } }

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

Invoicing

Operations

Approval

Operations