Sparky Tours API

The journeys an organization offers on its website, with their places, departures, booking terms and business profile.

Address
https://tours.sparkyli.com/api/v1
Plan
Plus and Max, with API access switched on for the organization

Endpoints

GET /tours

Tours flagged "Show on website", with length, from-price and the places each visits.

Inputs

NameTypeWhat it is
limit, offsetwhole numbersPaging: limit 1 to 100 (default 50); offset from next_offset.

Answer: tours (a list) and next_offset

NameTypeWhat it is
id, titletextThe tour and its name.
summary, destinationtext or null
citieslist of textThe places the itinerary visits, in order, each once. Empty until the itinerary has places.
duration_dayswhole number or null
tagslist of text
overseastrue or false
from_priceobject or nullamount (minor units, such as paise or cents) and currency. null means price on request.

GET /tours/{id}

One tour, with its highlights and day list.

Inputs

NameTypeWhat it is
id*textThe tour's id.

Answer: tour

NameTypeWhat it is
(all the list fields, and these)
highlightstext or null
dayslistOne per day: day (number), title, theme and rest_day (true or false).

Errors (besides the common ones)

  • 404 not_found: No such tour, or it is not shown on the website.

GET /departures

Upcoming departures flagged for the website.

Inputs

NameTypeWhat it is
fromdate, YYYY-MM-DDEarliest departure date. Default today.
todate, YYYY-MM-DDLatest departure date.
limit, offsetwhole numbersPaging, as for tours.

Answer: departures (a list) and next_offset

NameTypeWhat it is
id, tour_id, titletextThe departure, its tour and the tour's name.
destinationtext or null
departs_on, returns_ondate
price_per_personobject or nullamount in minor units, and currency.
availabilityopen, few_left or fullA bucket. Seat counts are never shown.

GET /business-profile

The organization's public business profile and the registrations it chose to show.

Answer: (top level)

NameTypeWhat it is
trade_name, legal_name, country, registered_addresstext or nullAs entered in the business profile.
tax_registrationobject or nullThe primary registration: type and number.
registrationslistOnly the ones the owner chose to show: type, number, issued_by and valid_until.
contactslistContacts marked for the website: label, name, email and phone.

GET /booking-terms

Booking amount, advance and balance rules, refund steps and whether online payment is ready.

Answer: (top level)

NameTypeWhat it is
online_paymenttrue or falseTrue when the organization's payment gateway is saved and switched on, so a "pay the booking amount" button can really work.
booking_amountobjectamount (minor units), currency, refundable and counted_toward_price.
advancelistThe advance by how early a customer books: advance_pct, with booked_at_least_days_before, or on the last row booked_fewer_than_days_before.
balance_due_days_before_departurewhole numberWhen the rest is due.
cancellationlistRefund steps: within_days_of_departure and refund_pct.

Example

curl -s -H "authorization: Bearer $TOKEN" -H "x-sparky-org: ORG_ID" https://tours.sparkyli.com/api/v1/tours

New here? Start with the three things first, then sign in. Errors are explained under errors and limits.