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

PNRs

APIs to manage PNRs within trips.

Invoicing

APIs to manage invoicing.

Operations

Get Invoice Data

Request

This endpoint gets the invoice data for given invoice numbers

Bodyapplication/json
invoiceIdsArray of strings(uuid)

One or more Invoice IDs being requested

Example: ["15c94ac1-f540-4916-9243-306a75fbd8a9"]
tmcIdstringDeprecated

TMC for which invoice is being requested. Deprecated in favor of invoiceIds.

Example: "15c94ac1-f540-4916-9243-306a75fbd8a9"
invoiceNumbersArray of stringsDeprecated

One or more invoice numbers being requested. Deprecated in favor of invoiceIds.

curl -i -X POST \
  https://apis.spotnana.com/v2/invoicing/invoice-data \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "tmcId": "15c94ac1-f540-4916-9243-306a75fbd8a9",
    "invoiceNumbers": [
      "string"
    ],
    "invoiceIds": [
      "15c94ac1-f540-4916-9243-306a75fbd8a9"
    ]
  }'

Responses

OK

Bodyapplication/json
invoicesArray of objects(Invoice)required

List of invoices which were requested.

invoices[].​invoiceNumberstringrequired

The invoice number

Example: "SPOT-0001232"
invoices[].​invoiceIdstringrequired

The invoice ID

Example: "d694cf94-534e-410e-b66b-11ef970622bc"
invoices[].​dataobject(InvoiceData)required

The invoice content

invoices[].​data.​issuedDateobject(DateModel)required

Date of invoice issue

invoices[].​data.​issuedDate.​iso8601string^\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01...required
Example: "2017-07-21"
invoices[].​data.​sellerobject(SellerInfo)required

Entity that sold the items mentioned in the invoice.

invoices[].​data.​seller.​namestringrequired

Name of seller, usually a TMC Legal Entity.

Example: "Spotnana India Pvt. Ltd."
invoices[].​data.​seller.​addressstringrequired

Address of seller.

Example: "115 Broadway Suite 04-101,\nNew York, NY 10006"
invoices[].​data.​seller.​idInfoArray of objects(IdInfo)

The seller ID information.

invoices[].​data.​seller.​taxIdstringDeprecated

Tax number for the seller, for ex GSTN in India

Example: "TXG239023092"
invoices[].​data.​buyerobject(BuyerInfo)required

Buyer of items mentioned in the invoice.

invoices[].​data.​buyer.​namestringrequired

Name of buyer, usually a traveler.

Example: "John Doe"
invoices[].​data.​buyer.​addressstringrequired

Address of buyer. Could be office, legal entity or org address.

Example: "115 Broadway Suite 04-101,\nNew York, NY 10006"
invoices[].​data.​buyer.​idInfoArray of objects(IdInfo)

The seller ID information.

invoices[].​data.​buyer.​taxIdstringDeprecated

Tax number for the seller, for ex GSTN in India

Example: "TXG239023092"
invoices[].​data.​itemsArray of objects(Item)required

Items being invoiced.

invoices[].​data.​items[].​namestringrequired

Name of the item.

Example: "Air Ticket SFO-EWR"
invoices[].​data.​items[].​identifierstringrequired

Number identifying the item, for ex, the ticket number for air ticket.

Example: "00129383829"
invoices[].​data.​items[].​purchaseTypestringrequired

Type of item, indicates what type of item is being sold

Enum"TRIP_FEE""FLIGHT""ANCILLARY""HOTEL""CAR""RAIL""MERCHANT_FEE""LIMO""MISC"
Example: "TRIP_FEE"
invoices[].​data.​items[].​typestringrequired

Type of item, indicates if the item was purchased vs refunded.

Enum"PURCHASE""REFUND"
Example: "PURCHASE"
invoices[].​data.​items[].​amountobject(FareAmount)required

Amount of money.

invoices[].​data.​items[].​amount.​baseobject(Money)required

Base fare amount.

invoices[].​data.​items[].​amount.​taxobject(Money)required

Tax amount.

invoices[].​data.​items[].​amount.​taxBreakdownArray of objects(TaxBreakdown)

Breakdown of tax amounts.

invoices[].​data.​items[].​travelerNamestringrequired

Name of the traveler.

Example: "John Doe"
invoices[].​data.​items[].​taxBreakdownArray of objects(TaxBreakdown)

Tax breakdown for the invoice, this will be present for UK invoices with VAT

invoices[].​data.​items[].​itemNameMetadataticketMetadata (object) or ticketMetadata (object) or ticketMetadata (object)(ItemNameMetadata)
One of:

Metadata for the item name.

invoices[].​data.​paymentsArray of objects(PaymentInformation)required

Information on how the items have been paid for.

invoices[].​data.​payments[].​idstring

Payment reference ID.

Example: "sdkljhafisudlls"
invoices[].​data.​payments[].​transactionTimeobject(DateTimeOffset)

Transaction timestamp.

invoices[].​data.​payments[].​amountobject(Money)required

Amount paid.

invoices[].​data.​payments[].​amount.​amountnumber(double)required

The numeric value for the amount of money.

Example: 510
invoices[].​data.​payments[].​amount.​currencyCodestringrequired

The 3-letter currency code for the money amount (defined using ISO 4217 standard).

Example: "GBP"
invoices[].​data.​payments[].​amount.​convertedAmountnumber(double)

The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency).

Example: 715.42
invoices[].​data.​payments[].​amount.​convertedCurrencystring

The 3-letter currency code for the converted currency (defined using ISO 4217 standard).

Example: "USD"
invoices[].​data.​payments[].​amount.​otherCoinageArray of objects(OtherCoinage)

List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

invoices[].​data.​payments[].​paymentModestringrequired

Mode of Payment shown on invoice.

Enum"CREDIT_CARD""ON_ACCOUNT""DIRECT""EXCHANGE""BREX_POINTS""CASH""QANTAS_POINTS""VENDOR_PROGRAM_PAYMENT""AMADEUS_CHECKOUT""PREVIOUS_BOOKING_VALUE"
Example: "CREDIT_CARD"
invoices[].​data.​payments[].​paymentInstrumentIdentifierstringrequired

An identifier for the payment instrument used. For example, last four credit card number digits in case a credit card was used.

Example: "**2343"
invoices[].​data.​payments[].​actualPaymentobject(ActualPayment)

Details of how payment was done

invoices[].​data.​payments[].​exchangePaymentobject(ExchangePayment)

Details of how payment was done

invoices[].​data.​productIdstringrequired

ID of the product being invoiced

Example: "123243223"
invoices[].​data.​productTypestring(ProductType)required

Type of product for which invoice is generated.

Enum"PNR""SERVICE_FEE"
invoices[].​data.​invoiceAmountobject(FareAmount)required

Total invoice amount.

invoices[].​data.​invoiceAmount.​baseobject(Money)required

Base fare amount.

invoices[].​data.​invoiceAmount.​base.​amountnumber(double)required

The numeric value for the amount of money.

Example: 510
invoices[].​data.​invoiceAmount.​base.​currencyCodestringrequired

The 3-letter currency code for the money amount (defined using ISO 4217 standard).

Example: "GBP"
invoices[].​data.​invoiceAmount.​base.​convertedAmountnumber(double)

The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency).

Example: 715.42
invoices[].​data.​invoiceAmount.​base.​convertedCurrencystring

The 3-letter currency code for the converted currency (defined using ISO 4217 standard).

Example: "USD"
invoices[].​data.​invoiceAmount.​base.​otherCoinageArray of objects(OtherCoinage)

List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

invoices[].​data.​invoiceAmount.​taxobject(Money)required

Tax amount.

invoices[].​data.​invoiceAmount.​tax.​amountnumber(double)required

The numeric value for the amount of money.

Example: 510
invoices[].​data.​invoiceAmount.​tax.​currencyCodestringrequired

The 3-letter currency code for the money amount (defined using ISO 4217 standard).

Example: "GBP"
invoices[].​data.​invoiceAmount.​tax.​convertedAmountnumber(double)

The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency).

Example: 715.42
invoices[].​data.​invoiceAmount.​tax.​convertedCurrencystring

The 3-letter currency code for the converted currency (defined using ISO 4217 standard).

Example: "USD"
invoices[].​data.​invoiceAmount.​tax.​otherCoinageArray of objects(OtherCoinage)

List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

invoices[].​data.​invoiceAmount.​taxBreakdownArray of objects(TaxBreakdown)

Breakdown of tax amounts.

invoices[].​data.​taxBreakdownArray of objects(TaxBreakdown)

Tax breakdown for the invoice, this will be present for UK invoices with VAT

invoices[].​data.​referenceIdsArray of objects(ReferenceId)required

Reference Numbers to be shown on the invoice, for ex, Trip ID, PNR ID etc.

invoices[].​data.​referenceIds[].​labelstringrequired

Label for the reference ID on invoice.

Enum"TRIP_ID""PNR_ID""AGENCY_REFERENCE"
Example: "AGENCY_REFERENCE"
invoices[].​data.​referenceIds[].​valuestringrequired

The reference ID.

Example: "122332432"
invoices[].​data.​regionCodestring(RegionCode)

The region code for which the invoice is generated.

Enum"US""UK""NL""SG""CA""MX""DO""AR""BR""CO"
Example: "US"
invoices[].​data.​documentTypestring

Type of document

Enum"INVOICE""RECEIPT""NONE"
Example: "INVOICE"
invoices[].​data.​footerTextstring

Text shown at bottom of the PDF document. Nothing is shown if not set.

Example: "This document is proof of payment. If you require a tax invoice, please request one from the travel provider."
invoices[].​data.​supplierTypestring(ThirdPartySource)

SupplierType for PNR, for eg. NDC, Sabre etc.

Enum"UNKNOWN_SOURCE""SABRE""TRAVEL_FUSION""AVIA""NDC""TRAINLINE""ATPCO_NDC""FARELOGIX_NDC""OFFLINE""CONNEXUS"
Response
application/json
{ "invoices": [ {} ] }

Approval

APIs to manage approvals.

Operations