Xola

Suggest Edits

Quick Start

 

This is a quick guide to get you up and running to make API calls. The Xola API is organized around REST principles. So a HTTP POST will create a resource, a PUT will update it, a GET will retrieve it and a DELETE will delete it. Most API end points need you to be authenticated to perform the operation. All API payloads are in JSON, and responses are in JSON only.

Create your account below. If you already have an account, skip down to "Get your API Key".

Sandbox accounts do not carry over to Production

Most of our documentation provides examples for our Sandbox environment (sandbox.xola.com). Any credentials or resources you create in Sandbox will not carry over to Production (xola.com). You'll need to create a separate set of credentials for the Production environment.

Create a new account

New accounts are created via a POST request to the users API end point. The email address should be a valid address that will receive a confirmation email.

curl -H "Content-type: application/json" -X POST https://sandbox.xola.com/api/users -d '{
	"name" : "John Doe",
	"email" : "john.doe@gmail.com",
	"password" : "password123", 
	"roles" : ["ROLE_DEVELOPER"]
}'

Verify your account

Once the account is created, a verification email is sent to you. It is necessary to click on the verification link to activate your account.

If you plan to make API calls on behalf of a seller, then the roles attribute is optional. However, the seller will have to grant you access to their API through the "Grant Access" section in the Xola seller interface.

Get your account information

Grab your user account ID and check up on your roles. Make note of your user id, as that will be used to get your API Key

curl -H "Content-type: application/json" https://sandbox.xola.com/api/users/me -u "john.doe@gmail.com:password123"

Get your API Key

curl https://sandbox.xola.com/api/users/<my_user_id>/apiKey -u "john.doe@gmail.com:password123"

All future requests don't need username password. You can use the API Key, for example - getting your user info

curl -H 'X-API-KEY: MYAPIKEY' https://sandbox.xola.com/api/users/me

Fetch Experiences

Fetching all experiences available to you requires being authenticated

curl -H 'X-API-KEY: MYAPIKEY' https://sandbox.xola.com/api/experiences

No auth is required for fetching information about a specific experience

curl https://sandbox.xola.com/api/experiences/4f358f70536e86b149000000

Refer to the detailed documentation in the Orders section below to know more.

Suggest Edits

Terminology

 

There are three key objects in Xola that every API developer should know about. We'll use flight tickets as an analogy here to explain what each term means.

  • Experiences - An experience is also known as a listing. These are items that your customers purchase. For example: Delta Airlines offers a flight from NYC to LA. This is Delta's experience/listing.
  • Orders - A customer will make a booking for a specific experience, they're essentially purchasing something. For example.: A customer buys a flight ticket for Delta Airlines flight 447 from NYC to LA. The customer has given money and it has created a booking in Delta's flight reservation system. This is an order.
  • Transactions - A transaction is something that tracks movement of money in Xola. If the traveler paid $100 via credit card for a booking, that will be logged as a transaction. Then two days later they want to buy an add-on (merchandise) like a T-Shirt for $20, this would be logged as a second transaction. Any exchange of money, through any payment method (credit card, cash, check) is logged as a transaction. This way you can always track who paid what, when and how.
Suggest Edits

Payment Methods

 

Xola has built in support for several payment methods. Each payment method is used when creating a booking, or collecting payments on a booking.

The default payment methods are:

Key
Description

cc

Credit Card - This payment will be processed through the account's payment gateway.

cash

Any Cash payment

check

A payment through any type of check

gift

A gift certificate purchased through Xola

affiliate_deposit

Affiliate Deposit. This indicates the payment was given to an affiliate.

voucher

A voucher (with a voucher code)

later

Pay Later. This indicates payment is not collected not, and will be collected later.

other

Other -- A generic payment method to support any payment method not reflected above

Each key above (like cc or cash) can be used in API calls when referencing a payment method.

Custom Payment Methods

You might find the "Other" payment method is too broad and does not precisely describe what some frequently-used methods of payment might be (e.g. credit card terminal; imported bookings, etc). To solve this problem Xola provides the ability to create custom payment methods. Each custom payment method can have a name like "Credit Card Terminal" or "Square POS" and they will have their own 24 character ID, you can use this ID in lieu of the above default payment methods when collecting a payment.

For details see the API end point reference.

Suggest Edits

Booking Sources

 

Every order and transaction has a source attribute. The source indicates what type of application was used to create the order or transaction. The possible sources are:

Source
Description

office

The Xola back office application at /seller

checkout

The traveler checkout application. Usually through a "Book Now" button

refund

A refund transaction usually done through the back office

xola

A transaction created by Xola. Usually for monthly subscription charged.

import

An order or transaction created through an import process. These are orders that are usually created when a seller has pre-existing orders that need to be batch imported

 

Certain objects in Xola have a metadata parameter. You can use this parameter to attach key-value data to these objects.

Metadata is useful for storing additional, structured information about an object. For example, you could store the customer ID from your CRM system in the Xola User object.

Guidelines

One important limitation of metadata keys is that they cannot contain periods (.). We recommend you use a forward slash (/) to delimit keys.

We also recommend that you namespace your keys by prefixing them with your company name and application name so that your keys do not conflict with any other applications that may utilize metadata. E.g. acme/rocket/my_preference

Objects that support metadata

Currently, the following objects support user-definable metadata:

User

  • POST /api/users/:id/meta to add metadata. You may pass multiple key-value pairs.
  • DELETE /api/users/:id/meta/:property to remove a single metadata property.

Any metadata present for a user will be returned when fetching a user with the private=true flag.
GET /api/users/:id?private=true

Suggest Edits

Introduction

 

Experiences also known as "Listings" are the experiences and activities that the seller's business offers. The experiences end point is where you create & update experience, and it is where you update logistical information like trip schedules, pricing, and trip logistics like duration, capacity, and location.

Attribute
Type
Definition

addOns

array

List of add-ons that are available for this experience. See add-ons.

arrivalOffset

integer

Indicates how many minutes prior to the event start travelers should arrive.

cancellationPolicy

string

Conditions for booking cancellation.

category

string

Category of this experience. See categories.

currency

string

Three-letter ISO currency code in uppercase.

cutoff

integer

Number of minutes before the event start that a new order may be placed. Orders placed after the cutoff will be rejected.

demographics

array

List of demographics that are available for this experience. See demographics.

desc

string

Detailed description of the experience.

duration

integer

Duration of the experience in minutes.

earlyReturn

boolean

Indicates whether releasing inventory due to early temination of trip is allowed.

excerpt

string

Short description of the experience. This is shown on the Xola checkout widget.

geo

object

Object containing lat and lng coordinates of where the experience will take place.

group.max

integer

Maximum quantity of guests per order.

group.min

integer

Minimum quantity of guests per order.

group.outingMax

integer

Maximum quantity of guests per event.

group.outingMin

integer

Minimum quantity of guests per event.

group.outinMinCutoff

integer

If the group.outingMin quantity has not been met for an event within this many minutes from event start, a warning message is sent to the seller.

included

string[]

List of things that are included as part of the experience.

medias

array

List of media assets that help describe the experience. See medias.

name

string

Title of the experience.

notIncluded

string[]

List of things that you should bring to get the most out of the experience.

other

string

A catch-all blurb for any other information guests should be aware of for the experience.

paymentMethod

string

Payment method that is accepted during self checkout. Values may be cc or later. This attribute is not applicable for back office orders.

photo

object

A media object that is used for the experience's thumbnail photo.

pickupAddress

string

Address to which guests should arrive.

pickupGeo

object

Object containing lat and lng coordinates of the pickupAddress.

price

float

Base price of the experience.

priceType

string

Whether the experience is priced per person or per outing. Values may be person or outing.

private

boolean

If true, only one order is allowed per event (makes "per person" order behave like a "per outing" order from an availability perspective)

resources

array

List of inventory resources assigned to the experience. See resources.

schedules

array

List of schedules configured for the experience. See schedules.

seller.id

string

Seller who owns the experience.

updated

datetime

Timestamp at which the experience was last modified.

visible

boolean

Deprecated. Determines if the experience will be shown in the online checkout. Only applicable if old buttons are used.

waiverPreference

object

Digital waiver configuration for the experience. See waiver.

{
  "id": "567176edcf8b9c1d288b45b3",
  "object": "experience",
  "addOns": [
    {
      "id": "58c21a71332e756f2e8b4588",
      "desc": "A Go-Pro camera to record your trip.",
      "name": "Go-Pro",
      "price": 50,
      "visibility": "public"
    }
  ],
  "arrivalOffset": 15,
  "cancellationPolicy": "All sales are final unless cancellation protection is purchased.",
  "category": "Escape Room",
  "complete": true,
  "currency": "USD",
  "cutoff": 120,
  "demographics": [
    {
      "id": "57ccbeab6864eaa2768b459c",
      "object": "experience_demographic",
      "all": false,
      "caption": "18 and up",
      "code": "adults",
      "createdAt": "2017-07-29T09:06:40+00:00",
      "experience": {
        "id": "567176edcf8b9c1d288b45b3"
      },
      "label": "Adults",
      "labelCanonical": "adults",
      "name": "Adults",
      "overrideCaption": false,
      "parent": {
        "id": "597c4ff5c8f7b07d81544c67"
      },
      "seller": {
        "id": "55c2b026ad2171f0438b45e7"
      },
      "updatedAt": "2017-08-04T20:28:06+00:00",
      "updatedBy": {
        "id": "55c2b026ad2171f0438b45e7"
      }
    },
    {
      "id": "57ccbebae017981f6b8b463a",
      "object": "experience_demographic",
      "all": false,
      "caption": "12-17 (Minors must be accompanied by adults)",
      "code": "minors",
      "createdAt": "2017-07-29T09:06:40+00:00",
      "experience": {
        "id": "567176edcf8b9c1d288b45b3"
      },
      "label": "Minors",
      "labelCanonical": "minors",
      "name": "Minors",
      "overrideCaption": false,
      "parent": {
        "id": "597c4ff5c8f7b07d81544c68"
      },
      "seller": {
        "id": "55c2b026ad2171f0438b45e7"
      },
      "updatedAt": "2017-08-04T20:28:09+00:00",
      "updatedBy": {
        "id": "55c2b026ad2171f0438b45e7"
      }
    }
  ],
  "desc": "The hardest part of being an antiquities thief is finding a discreet buyer with deep pockets...",
  "duration": 75,
  "earlyReturn": false,
  "excerpt": "This room has a 4 person minimum.",
  "geo": {
    "lat": 29.742664339342,
    "lng": -95.403785705676
  },
  "group": {
    "max": 12,
    "min": 1,
    "outingMax": 12,
    "outingMin": 4,
    "outingMinCutoff": 3600
  },
  "included": ["Snacks", "Photo booth"],
  "medias": [
    {
      "id": "567176f985523e0a3f8b4592",
      "caption": null,
      "seq": 0,
      "size": null,
      "src": "http://xola.com/api/experiences/567176edcf8b9c1d288b45b3/medias/567176f985523e0a3f8b4592?size=medium",
      "title": null,
      "type": "photo"
    }
  ],
  "name": "The Heist",
  "notIncluded": ["Tips"],
  "other": "PARKING:\nWe’re in a very walkable neighborhood, and while we don’t have our own parking lot, there is plenty of free street parking.",
  "paymentMethod": "cc",
  "photo": {
    "caption": null,
    "id": "567176f985523e0a3f8b4592",
    "seq": null,
    "size": null,
    "src": "/uploads/images/experiences/567176edcf8b9c1d288b45b3/567176f985523e0a3f8b4592.png",
    "title": null,
    "type": "photo"
  },
  "pickupAddress": "1735 Westheimer Rd.\nHouston, TX 77098\n",
  "pickupGeo": {
    "lat": 29.742665426163,
    "lng": -95.403783917318
  },
  "price": 29,
  "priceType": "person",
  "private": false,
  "resources": [
    {
      "id": "567177379267057f368b45f9",
      "priority": null,
      "resource": {
        "id": "567177379267057f368b45f9",
        "capacity": 12,
        "count": 1,
        "name": "The Heist",
        "seller": "55c2b026ad2171f0438b45e7",
        "type": "equipment"
      }
    }
  ],
  "schedules": [
    {
      "id": "5a1ca038e017986c628b45a7",
      "days": [0, 1, 2, 3, 4, 5, 6],
      "departure": "fixed",
      "priceDelta": 0,
      "repeat": "weekly",
      "times": [1310, 1440, 1610, 1740],
      "type": "available"
    }
  ],
  "seller": {
    "id": "55c2b026ad2171f0438b45e7"
  },
  "updated": "2017-11-27T23:31:27+00:00",
  "visible": true,
  "waiverPreference": {
    "remoteID": "example",
    "url": "https://www.smartwaiver.com/v/example/"
  }
}
Suggest Edits

List categories

Categories are system defined strings that help categorize all the experiences in Xola.

 
gethttps://sandbox.xola.com/api/categories
curl https://sandbox.xola.com/api/categories
A binary file was returned

You couldn't be authenticated

[
    "Aerial Tours",
    "Ballooning",
    "Canyoning",
    "Deep Sea Fishing",
    "Sailing",
    "Trekking / Hiking",
    "Volunteering",
    "Wakeboarding",
    "Zip-lining"
]
 
Suggest Edits

Create an Experience

Creates a new experience.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences
curl --request POST \
  --url https://sandbox.xola.com/api/experiences
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/experiences");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

seller
object
required

Seller ID that owns this experience.

 
seller.id
string

Object identifier

category
string

Category for this experience.

name
string
required

Title of this experience.

excerpt
string
required

Short caption describing this experience. Should be no more than a couple sentences.

desc
string
required

Extended description of this experience.

price
float
required

Base price for this experience. This maybe be per person or per outing depending on the priceType.

priceType
string

Whether the price for this experience is per person or per outing.

duration
int32
required

Duration (in minuted) for which inventory is blocked. This is not shown to consumers.

demographics
array of objects
required

List of seller demographics to associate with this experience. Any seller demographics that are marked as all will automatically be associated.

parent 
overrideCaption
caption
discount 
eventDuration
int32

Duration (in minutes) as shown to consumers. This does not have an effect on inventory, unlike duration.

schedules
array of objects

List of schedules that determine the availability of this experience.

type
name
repeat
days
dates
departure
times
start
end
priceDelta
included
array of strings

List of things that are included as part of the experience.

notInluded
array of strings

List of things that you should bring with you for the experience.

paymentMethod
string

Payment method during consumer checkout. Can be cc (credit card required) or later (no payment required).

earlyReturn
boolean

Whether releasing inventory due to early termination of event is permitted.

emailFooter
string

HTML markup of footer in automated emails. This will override the account level emailFooter.

visible
boolean

(deprecated) Whether this experience appears in consumer checkout. This is deprecated in favor of buttons.

geo
object

Geographical coordinates indicating the location of this experience. An map with this location will be included in automated emails.

 
geo.lat
float

Geographical latitude of the coordinate.

geo.lng
float

Geographical longitude of the coordinate.

pickupAddress
string

Address where travelers will be picked up. Use questionnaires if you have multiple pickup locations.

pickupGeo
object

Geographical coordinates of the pickup address.

 
pickupGeo.lat
float

Geographical latitude of the coordinate.

pickupGeo.lng
float

Geographical longitude of the coordinate.

downDeposit
object

Rules for calculating partial deposit payment amount.

 
downDeposit.days
integer
required

Permits partial deposit payment if the arrival is at least this many days away.

downDeposit.amount
float
required

Amount that should be paid as a deposit. This can either be a percentage or absolute value depending on the amountType.

downDeposit.amountType
string
required

Determines how the final deposit amount is calculated. Can be absolute or percent.

downDeposit.scope
string
required

Whether the deposit amount is per person or per outing. Can be person or outing.

cutoff
int32

Prevents orders being placed too close to the arrival time. For example, specify 1440 (minutes) to prevent orders being placed less than a day prior to arrival. This setting is only applicable for consumer checkout and is ignored for backoffice orders.

alternateCutoff
int32

Overrides the cutoff if at least one confirmed order is present for the arrival time.

futureCutoff
object

Prevents orders being placed too far in advance.

 
futureCutoff.value
integer
required

Cutoff value in minutes. For example, specify 10080 if you want to prevent orders placed more than a week in advance.

arrivalOffset
int32

How far in advance (in minutes) of the scheduled time should consumers arrive.

private
boolean

Whether only one order is allowed per arrival time slot.

group
object
 
group.orderMin
integer

Requires a minimum quantity per order.

group.orderMax
integer

Limits the maximum quantity per order.

group.outingMin
integer

Requires a minimum quantity for each arrival time only after which orders will be confirmed. If the minimum is not met, the orders will be in a pending state.

group.outingMinCutoff
integer

Time (in seconds) prior to arrival when the seller should be notified if the outingMin has not been met.

group.outingMax
integer

Limits the maximum quantity per arrival time.

addOns
array of s

Additional items that can be sold with this experience.

cancellationPolicy
string

Cancellation policy for this experience. This text is included in automated emails.

other
string

Other considerations for this experience. This text is included in automated emails.

terms
object

Terms and conditions for this experience.

 
terms.termsLegal
string

Full legal text of the terms & conditions.

terms.termsHuman
string

Brief, human readable version of the terms & conditions.

terms.forceAgree
boolean

Forces the consumer to accept these terms by clicking an "Agree" button.

reviewPreference
object

Preferences for review reminder emails sent to consumers.

 
reviewPreference.destination
string

Which review service to include in the review request email. Can be off, xola, googlePlus, tripAdvisor, yelp, custom.

reviewPreference.reviewTemplate
string

HTML markup of the custom review request email. Required if the destination is custom.

 
Suggest Edits

Retrieve an experience

Retrieves the details of an experience that had previously been created.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/experiences/id
curl --request GET \
  --url https://sandbox.xola.com/api/experiences/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/experiences/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/experiences/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Experience ID

 
Suggest Edits

Update an Experience

Updates the specified experience with the parameters provided. Any parameters not specified will be left unchanged.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences
curl --request POST \
  --url https://sandbox.xola.com/api/experiences
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/experiences");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

category
string

Category for this experience.

name
string
required

Title of this experience.

excerpt
string
required

Short caption describing this experience. Should be no more than a couple sentences.

desc
string
required

Extended description of this experience.

price
float
required

Base price for this experience. This maybe be per person or per outing depending on the priceType.

priceType
string

Whether the price for this experience is per person or per outing.

duration
int32
required

Duration (in minuted) for which inventory is blocked. This is not shown to consumers.

eventDuration
int32

Duration (in minutes) as shown to consumers. This does not have an effect on inventory, unlike duration.

schedules
array of objects

List of schedules that determine the availability of this experience.

type
name
repeat
days
dates
departure
times
start
end
priceDelta
included
array of strings

List of things that are included as part of the experience.

notInluded
array of strings

List of things that you should bring with you for the experience.

paymentMethod
string

Payment method during consumer checkout. Can be cc (credit card required) or later (no payment required).

earlyReturn
boolean

Whether releasing inventory due to early termination of event is permitted.

emailFooter
string

HTML markup of footer in automated emails. This will override the account level emailFooter.

visible
boolean

(deprecated) Whether this experience appears in consumer checkout. This is deprecated in favor of buttons.

geo
object

Geographical coordinates indicating the location of this experience. An map with this location will be included in automated emails.

 
geo.lat
float

Geographical latitude of the coordinate.

geo.lng
float

Geographical longitude of the coordinate.

pickupAddress
string

Address where travelers will be picked up. Use questionnaires if you have multiple pickup locations.

pickupGeo
object

Geographical coordinates of the pickup address.

 
pickupGeo.lat
float

Geographical latitude of the coordinate.

pickupGeo.lng
float

Geographical longitude of the coordinate.

downDeposit
object

Rules for calculating partial deposit payment amount.

 
downDeposit.days
integer
required

Permits partial deposit payment if the arrival is at least this many days away.

downDeposit.amount
float
required

Amount that should be paid as a deposit. This can either be a percentage or absolute value depending on the amountType.

downDeposit.amountType
string
required

Determines how the final deposit amount is calculated. Can be absolute or percent.

downDeposit.scope
string
required

Whether the deposit amount is per person or per outing. Can be person or outing.

cutoff
int32

Prevents orders being placed too close to the arrival time. For example, specify 1440 (minutes) to prevent orders being placed less than a day prior to arrival. This setting is only applicable for consumer checkout and is ignored for backoffice orders.

alternateCutoff
int32

Overrides the cutoff if at least one confirmed order is present for the arrival time.

futureCutoff
object

Prevents orders being placed too far in advance.

 
futureCutoff.value
integer
required

Cutoff value in minutes. For example, specify 10080 if you want to prevent orders placed more than a week in advance.

arrivalOffset
int32

How far in advance (in minutes) of the scheduled time should consumers arrive.

private
boolean

Whether only one order is allowed per arrival time slot.

group
object
 
group.orderMin
integer

Requires a minimum quantity per order.

group.orderMax
integer

Limits the maximum quantity per order.

group.outingMin
integer

Requires a minimum quantity for each arrival time only after which orders will be confirmed. If the minimum is not met, the orders will be in a pending state.

group.outingMinCutoff
integer

Time (in seconds) prior to arrival when the seller should be notified if the outingMin has not been met.

group.outingMax
integer

Limits the maximum quantity per arrival time.

addOns
array of s

Additional items that can be sold with this experience.

cancellationPolicy
string

Cancellation policy for this experience. This text is included in automated emails.

other
string

Other considerations for this experience. This text is included in automated emails.

terms
object

Terms and conditions for this experience.

 
terms.termsLegal
string

Full legal text of the terms & conditions.

terms.termsHuman
string

Brief, human readable version of the terms & conditions.

terms.forceAgree
boolean

Forces the consumer to accept these terms by clicking an "Agree" button.

reviewPreference
object

Preferences for review reminder emails sent to consumers.

 
reviewPreference.destination
string

Which review service to include in the review request email. Can be off, xola, googlePlus, tripAdvisor, yelp, custom.

reviewPreference.reviewTemplate
string

HTML markup of the custom review request email. Required if the destination is custom.

 
Suggest Edits

Remove an experience

Deletes an experience which prevents new orders from being created for the experience. Existing orders for the deleted experience aren't affected.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experiences/:id
curl --request DELETE \
  --url https://sandbox.xola.com/api/experiences/:id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/experiences/:id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/experiences/:id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/:id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ID
string
required

Experience ID

 
Suggest Edits

List experiences

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/experiences
curl --request GET \
  --url https://sandbox.xola.com/api/experiences
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/experiences' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/experiences");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

seller
string

ID or email of the seller. Required if not authenticated.

category
string

Category of the experience. You can search multiple categories by comma-separating them. (e.g. category=Sailing,Surfing)

price
mixed type

Accepts a max price (e.g. price=79) or a comma separated min-max price range (e.g. price=45,79)

geo
mixed type

Returns data sorted in ascending order by distance from the specified geo coordinate (lat,lng). Specify an optional 3rd value to restrict search radius in kilometers (lat,lng,km).

limit
int32

Number of results to include in one page of data

skip
int32

Number of results to skip

agent
boolean

Specify true to return experiences for which an agent can create orders behalf of the seller. Using this filter requires authentication.

sort
string

Sort data by field and an optional sort order. E.g. sort=price[desc] or sort=price[asc]

 

This endpoint is great for discovery operations and is typically the starting point for any consumer focused app. It allows querying Xola's database of experiences using a variety of interesting data filters.

 

Add-Ons are additional items that are sold along with a listing. They are set on a per-listing basis and you can add as many as you like. Add-ons can be customer-facing (so available to purchase during online checkout) or private (so can only be added to a purchase if it is a back office booking or modification).

Attribute
Type
Definition

name

string

Title of the add-on.

price

float

Price per add-on.

desc

string

Short description of the add-on.

visibility

string

Whether the add-on is visible to online checkout customers or if it is restricted to back office orders. Either public, or private.

{
  "name": "Go-Pro",
  "price": 15,
  "desc": "A Go-Pro camera to record your trip!",
  "visibility": "public"
}
Suggest Edits

Create an add-on

Create an add-on for a given experience.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/experienceId/addOns
curl --request POST \
  --url https://sandbox.xola.com/api/experiences/experienceId/addOns
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/addOns' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/addOns")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/experiences/experienceId/addOns");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/addOns"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The Experience ID

Body Params

name
string
required

Title of the add-on.

price
float
required

Price per add-on.

desc
string
required

Short description of the add-on.

visibility
string

One of public or hidden; the latter will only show the add-on in the back office

 
Suggest Edits

Update an add-on

Updates the specified add-on. Any attributes not provided are left unchanged.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/:id/addOns/addOnId
curl --request PUT \
  --url https://sandbox.xola.com/api/experiences/:id/addOns/addOnId
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/experiences/:id/addOns/addOnId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/:id/addOns/addOnId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/experiences/:id/addOns/addOnId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/:id/addOns/addOnId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The Experience ID

addOnId
string
required

The Add-On ID

Body Params

name
string

Title of the add-on.

price
float

Price per add-on.

desc
string

Short description of the add-on.

visibility
string

Whether the add-on is visible to online checkout customers or if it is restricted to back office orders. Either public, or private.

 
Suggest Edits

Remove an add-on

Removes the specified add-on from the experience. Any existing orders with this add-on are unaffected.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experiences/experienceId/addOns/addOnId
curl --request DELETE \
  --url https://sandbox.xola.com/api/experiences/experienceId/addOns/addOnId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/addOns/addOnId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/addOns/addOnId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/experiences/experienceId/addOns/addOnId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/addOns/addOnId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The Experience ID

addOnId
string
required

The Add-On ID

 
Suggest Edits

Attachments

 

Attachments are non-image files like PDFs and Word documents. These attachments are sent as a part of the order notification emails (e.g. confirmation, reminder).

Attribute
Type
Definition

caption

string

Short description of the attachment.

title

string

Title of the attachment.

type

string

Type of the attachment. Currently only supports pdf.

size

integer

Size of the attachment in bytes.

src

url

An absolute or relative path to the location of the attchment.

{
  "id": "5a6ebe6f6864ea90668b4567",
  "caption": "Floor map for when you arrive",
  "title": "First floor area.pdf",
  "type": "pdf",
  "size": 216657,
  "src": "\/uploads\/documents\/experiences\/52e804703e269e9e73000014\/5a6ebe6f6864ea90668b4567.pdf"
}
Suggest Edits

Create an attachment

Upload a document and create an attachment object for it.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/experienceId/attachments
curl --request POST \
  --url 'https://sandbox.xola.com/api/experiences/experienceId/attachments?qqfile=qqfile'
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/attachments',
  qs: { qqfile: 'qqfile' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/attachments?qqfile=qqfile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/experiences/experienceId/attachments?qqfile=qqfile");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/attachments"

querystring = {"qqfile":"qqfile"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID

Query Params

qqfile
string
required

Filename being uploaded as multipart/form-data in the request body

 

This endpoint expects the request body to contain the document being uploaded as multipart/form-data. The name of the file contained in the request must also be specified in the qqfile query parameter.

Suggest Edits

Retrieve an attachment

Retrieves the attachment with the given ID.

 
gethttps://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId
curl --request GET \
  --url https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID

attachmentId
string
required

The attachment ID.

 

Response codes

Response code
Definition

302

If the attachment is found, a redirect response is returned with the location of the media asset.

404

The experience or attachment is not found.

Suggest Edits

Update an attachment

Updates the caption of an attachment.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId
curl --request PUT \
  --url https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The Experience ID

attachmentId
string
required

The Attachment ID

Body Params

caption
string
required

Short description of the attachment.

 
Suggest Edits

Delete an attachment

Removes the attachment from the experience and permanently deletes the uploaded document.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId
curl --request DELETE \
  --url https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/attachments/attachmentId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID

attachmentId
string
required

The Attachment ID

 

A media item represents photos & other media that are associated with an experience. These maybe used as the primary photo for the experience, or as other photos that can be used to show off the experience to perspective travelers.

Attribute
Type
Definition

src

url

An absolute or relative path to the location of the original uploaded media.

type

string

Type of the media. Currently only supports photo.

caption

string

Short descripton of the media.

seq

integer

Sequence in which to display the media in relation to other media.

{
  "id": "52e805b73e269ebd6d00003a",
  "src": "\/uploads\/images\/experiences\/52e804703e269e9e73000014\/52e805b73e269ebd6d00003a.jpg",
  "type": "photo",
  "caption": "Knights jousting",
  "seq": 0
}
Suggest Edits

Create a media

Upload a photo and create a media object for it.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/experienceId/medias
curl --request POST \
  --url 'https://sandbox.xola.com/api/experiences/experienceId/medias?qqfile=qqfile'
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/medias',
  qs: { qqfile: 'qqfile' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/medias?qqfile=qqfile")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/experiences/experienceId/medias?qqfile=qqfile");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/medias"

querystring = {"qqfile":"qqfile"}

response = requests.request("POST", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID

Query Params

qqfile
string
required

Filename being uploaded as multipart/form-data in the request body

 

This endpoint expects the request body to contain the image being uploaded as multipart/form-data. The name of the file contained in the request must also be specified in the qqfile query parameter.

Suggest Edits

Retrieve a media

Retrieves the media with the given ID.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 
gethttps://sandbox.xola.com/api/experiences/experienceId/medias/mediaId
curl --request GET \
  --url https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID

mediaId
string
required

The media ID. Specify default to get the default image set by the seller.

Query Params

size
string

Size of the image (small, medium, large, bg)

height
int32

Height of the image

width
int32

Width of the image

 

Response codes

Response code
Definition

302

If the media is found, a redirect response is returned with the location of the media asset.

404

The experience or media is not found.

The filters allow you to resize the image on the server. If no filters are specified, the original image is returned unaltered.

The bg size returns a large image that is blurred which can be used as the background of a page displaying the relevant experience.

Suggest Edits

Update a media

Updates the caption or sequence of a media. Any attributes not provided are left unchanged.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/experienceId/medias/mediaId
curl --request PUT \
  --url https://sandbox.xola.com/api/experiences/experienceId/medias/The%20media%20ID.
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/medias/The%20media%20ID.' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/medias/The%20media%20ID.")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/experiences/experienceId/medias/The%20media%20ID.");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/medias/The%20media%20ID."

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID.

mediaId
string
required

Body Params

caption
string

Short descripton of the media.

seq
int32

Sequence in which to display the media in relation to other media.

 
Suggest Edits

Delete a media

Removes the media from the experience and permanently deletes the uploaded image. You cannot delete a media if it is designated as the experience's default media.

To perform this action, you must be the account owner, or must be delegated with ROLE_CURATOR or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experiences/experienceId/medias/mediaId
curl --request DELETE \
  --url https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/medias/mediaId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The experience ID.

mediaId
string
required

The media ID.

 
Suggest Edits

Review Preferences

 

Review reminders are way to send automated emails to the traveler after their trip is completed reminding them to review the trip. Xola will send an automated review reminder email to the traveler 24 hours after the trip has completed. Xola gives you five review options:

  • Xola (xola) - Xola will our own email template and collect feedback that is stored privately
  • Google+ (google) - Send an email to the traveler with a link to a Google+ page
  • TripAdvisor (tripadvisor) - Send an email to the traveler with a link to a TripAdvisor page
  • Yelp (yelp) - Send an email to the traveler with a link to a Yelp.com page
  • Custom (custom) - Send an email with a custom email template that you write

Links for Google+, TripAdvisor & Yelp are taken from the social links in the seller's profile.

Suggest Edits

Add a review preference

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/users/:id/preferences/review
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/preferences/review -d '{
  "destination": "xola"
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/preferences/review -d '{
  "destination": "custom",
  "reviewTemplate": "HTML content"
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"5871b3095c7f3a69f367eb56",
  "destination":"xola"
}

Path Params

ID
string
required

The seller's ID

Body Params

destination
string
required

One of the predefined review preferences

 

Adding a review preference to an experience overrides one specified at a global (user) level.

Suggest Edits

Update a review preference

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/users/:id/preferences/review
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/584f61efcb2256a6132c6e04/preferences/review -d '{
  "destination": "yelp"
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"5871b327f5e699cd730c0c50",
  "destination":"yelp"
}

Path Params

ID
string
required

The seller's ID

Body Params

destination
string
required

One of the predefined review preferences

 
Suggest Edits

Remove a review preference

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/users/:id/preferences/review
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/preferences/review
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ID
string
required

The seller's ID

 

Once a review preference is removed from an experience, any review preference configured at a global (user) level kicks in.

Suggest Edits

Schedules

 

This API end point allows you to build activity schedules that define when your trip departs. Combining schedules also allows for dynamic pricing that adjusts based on time or day. You can create as many schedules as you would like.

Configuration

For each schedule you can configure how it behaves. The following attributes are available:

Schedule type:

  • available: Creates a schedule with times that this listing is available to be booked by customers.
  • unavailable: Creates a schedule with times that this listing will not be available.

Schedule repeats:

  • weekly: Repeat the schedule every week
  • custom: Specify specific days on which the schedule will apply

Schedule timeslots:

These are specific departure times that are able to be booked for this listing. You may create upto 100 timeslots. Specify the timeslots as an integer value (e.g. 800 for 8AM and 2200 for 10PM).

If your listing does not have set departure times, send varies for the departure attribute.

Schedule days:

These are specific departure weekdays (Sunday, Monday etc) that are able to be booked for the listing. The days are specified by an integer value representing the day of the week. 0 represents a Sunday, 1 a Monday and 6 for a Saturday.

Schedule start & end:

This is the time-span that the will apply to the schedule. If the schedule never changes, then you don't need to specify a value for this attribute.

Schedule price (price delta):

This will allow you to specify a price delta for this schedule. You can increase or decrease a price for a given schedule. For example: If you charge more for trips on the weekend, make a weekly schedule with Saturday and Sunday and specify a higher price

Response

Whenever a schedule is successfully created or updated, the API will return an HTTP response code of 202. This is because the API updates the experience's schedules and does some additional post processing to update the dashboard. Depending on the number of trips the dashboard may take upto a minute to reflect the changes.

Suggest Edits

Add a schedule to an experience

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/id/schedules
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/schedules -d '{
  "name": "Weekdays",
  "repeat": "weekly",
  "days": [1,2,3,4,5],
  "departure": "fixed",
  "times": [800, 1000],
  "type": "available"
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/schedules -d '{
  "name": "Weekends",
  "repeat": "weekly",
  "days": [0, 6],
  "departure": "fixed",
  "times": [2000, 2200],
  "type": "available",
  "priceDelta": 100
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/schedules -d '{
  "name": "Ad-hoc schedule",
  "repeat": "custom",
  "days": [1,2,3,4,5],
  "departure": "varies",
  "type": "available"
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/schedules -d '{
  "type":"unavailable",
  "repeat":"custom",
  "dates":["2016-12-25"],
  "departure":"varies"
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"5857f4c8f8894e3e31b7acd9",
  "name": "Weekdays",
  "repeat": "weekly",
  "days": [1,2,3,4,5],
  "departure": "fixed",
  "times": [800, 1200, 1800],
  "type": "available",
  "priceDelta": 0
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}
{
  "global": ["name_exists"]
}
{
  "field": {
    "times":"too_many_timeslots"
  }
}

Path Params

id
string
required

The Experience ID

 
Suggest Edits

Update a schedule

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/id/schedules/scheduleId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/schedules/5857f4c8f8894e3e31b7acd9 -d '{
  "name": "Everyday",
  "days": [0,1,2,3,4,5,6]
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"5857f4c8f8894e3e31b7acd9",
  "name": "Everyday",
  "repeat": "weekly",
  "days": [0,1,2,3,4,5,6],
  "departure": "fixed",
  "times": [800, 1200, 1800],
  "type": "available",
  "priceDelta": 0
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}
{
  "global": ["name_exists"]
}
{
  "field": {
    "times":"too_many_timeslots"
  }
}

Path Params

id
string
required

The Experience ID

scheduleId
string
required

The Schedule ID

 
Suggest Edits

Remove a schedule

Remove a schedule from the experience. When you remove a schedule the experience won't be bookable on the date and time slots that were defined in it. Existing trips are not removed, they still remain.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experience/id/schedules/scheduleId
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/schedules/5857f4c8f8894e3e31b7acd9
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The Experience ID

scheduleId
string
required

The Schedule ID

 
Suggest Edits

Terms & Conditions

 

Terms and Conditions are a set of rules and guidelines that a user must agree to in order to place the booking. These are simply blocks of text that are shown to the traveler when they make a checkout, they maybe shown as a link or as a modal window specifically prompting the user to accept the terms. Terms & Conditions configured for this experience override any terms that are configured at a global (user) level.

These set of end points allows you configure an account set of terms and conditions which will take effect if the experience does not have configured terms.

Suggest Edits

Add terms and conditions for an experience

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/id/terms
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/terms -d '{
  "forceAgree": true,
  "termsLegal": "Lorem ipsum dolor sit amet"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "5871b4246da862d9cf225872",
  "forceAgree": true,
  "termsHuman": "",
  "termsLegal": "Lorem ipsum dolor sit amet"
}

Path Params

id
string
required

The experience ID

Body Params

termsLegal
string
required

These are the legal terms & conditions for the experience.

termsHuman
string

This is a condensed version of the terms & conditions, meant for a quick read.

forceAgree
boolean

Force the user to agree to the terms and conditions before proceeding

 
Suggest Edits

Update terms and conditions for an experience

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/id/terms
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/terms -d '{
  "termsLegal": "Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!"
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"5871b2e03d7f1e42341ad481",
  "forceAgree": true,
  "termsHuman": "",
  "termsLegal": "Space, the final frontier. These are the voyages of the starship Enterprise. Its five year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before!"
}

Path Params

id
string
required

The experience ID

Body Params

termsLegal
string
required

These are the legal terms & conditions for the experience.

termsHuman
string

This is a condensed version of the terms & conditions, meant for a quick read.

forceAgree
boolean

Force the user to agree to the terms and conditions before proceeding

 
Suggest Edits

Remove terms and conditions for an experience

Delete the terms & conditions for an experience. Existing bookings that have the terms and conditions will not be affected. If the seller has terms & conditions configured globally then those will take effect.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experiences/id/terms
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/terms
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The experience ID

 
Suggest Edits

Introduction

 

Demographics (or ticket types) allow for segmenting of guests for an experience. It also lets you adjust the base price of an experience to be customized for each demographic.

There are 2 types of demographics:

  • Seller: Defined at the account level. Any experience-level demographic must extend from a seller-level demographic.
  • Experience: Defined at the experience level. These are the demographics that travelers/reservationists see and are the demographics used in orders.
Attribute
Type
Definition

all

boolean

Whether the demographic applies to all experiences. Only applicable for seller_demographic objects.

caption

string

Additional information about the demographic.

createdAt

timestamp

Time at which the demographic was created.

createdBy.id

id

User who created the demographic.

discount.amount

float

Discount on the experience price for the demographic. Only applicable for experience_demographic objects.

discount.amountType

string

How the discount is applied on the experience price. Currently only supports absolute.

experience.id

id

Experience the demographic belongs to. Only applicable for experience_demographic objects.

label

string

Title of the demographic.

labelCanonical

string

A system generated canonical representation of the label.

object

string

Type of the demographic. Either global_demographic, seller_demographic, or experience_demographic

overrideCaption

boolean

Whether to override the parent demographic's caption. Only applicable for experience_demographic objects.

parent.id

id

Demographic that this demographic inherits from. The parent is always a seller_demographic and the child is always an experience_demographic.

seller.id

id

Seller account that owns the demographic.

updatedAt

timestamp

Time at which the demographic was last updated.

updatedBy.id

id

User who last updated the demographic.

{
  "all": false,
  "caption": "under 5 years",
  "createdAt": "2017-08-17T10:32:06+00:00",
  "createdBy": {
    "id": "4f293e17536e86bc66000000"
  },
  "discount": {
    "amount": 10,
    "amountType": "absolute"
  },
  "experience": {
    "id": "5817df4192670590158b4582"
  },
  "id": "599570a6b5672916438b45a9",
  "label": "Children",
  "labelCanonical": "children",
  "object": "experience_demographic",
  "overrideCaption": false,
  "parent": {
    "id": "597c4fe0c8f7b07d81544905"
  },
  "seller": {
    "id": "4f104661536e86b23d000000"
  },
  "updatedAt": "2018-01-29T12:31:14+00:00",
  "updatedBy": {
    "id": "4f293e17536e86bc66000000"
  }
}
Suggest Edits

Create a seller demographic

Create a demographic for a given seller.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/demographics
curl --request POST \
  --url https://sandbox.xola.com/api/demographics
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/demographics' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/demographics");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

seller
object
 
seller.id
string
required

Seller ID that owns the demographic.

label
string
required

Title of the demographic.

caption
string

Additional information about the demographic.

all
boolean

Whether the demographic applies to all experiences. If true, an Experience Demographic will be automatically created for each Experience in the account.

 
Suggest Edits

Create an experience demographic

Create a demographic for a given experience.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/demographics
curl --request POST \
  --url https://sandbox.xola.com/api/demographics
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/demographics' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/demographics");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

seller
object
 
seller.id
string
required

Seller ID that owns the demographic.

experience
object
 
experience.id
string
required

Experience the demographic belongs to.

parent
object
 
parent.id
string
required

Demographic from which to inherit. The parent must be a seller_demographic.

overrideCaption
boolean

Determines if this demographic will override its parent's caption.

caption
string

Additional information about the demographic.

discount
object
 
discount.amount
string

Discount on the experience price for the demographic.

discount.amountType
string

How the discount is applied on the experience price. Currently only supports absolute.

 
Suggest Edits

Retrieve a demographic

Retrieves the demographic with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/demographics/id
curl --request GET \
  --url https://sandbox.xola.com/api/demographics/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/demographics/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/demographics/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Demographic ID.

 
Suggest Edits

Update a seller demographic

Updates an existing seller demographic. Any parameters not provided are left unchanged.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/demographics/id
curl --request PUT \
  --url https://sandbox.xola.com/api/demographics/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/demographics/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/demographics/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Demographic ID.

Body Params

all
string

Whether the demographic applies to all experiences. If true, an Experience Demographic will be automatically created for each Experience in the account.

label
string

Title of the demographic.

caption
string

Additional information about the demographic.

 
Suggest Edits

Update an experience demographic

Updates an existing experience demographic. Any parameters not provided are left unchanged.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/demographics/id
curl --request PUT \
  --url https://sandbox.xola.com/api/demographics/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/demographics/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/demographics/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Demographic ID.

Body Params

overrideCaption
boolean

Determines if this demographic will override its parent's caption.

caption
string

Additional information about the demographic.

discount
object
 
discount.amount
float

Discount on the experience price for the demographic.

discount.amountType
string

How the discount is applied on the experience price. Currently only supports absolute.

 
Suggest Edits

Delete a seller demographic

Deletes the seller demographic with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/demographics/id
curl --request DELETE \
  --url https://sandbox.xola.com/api/demographics/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/demographics/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/demographics/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Demographic ID.

Body Params

force
boolean

If true, delete even if the seller demographic is being used by experience demographics. Will attempt to recursively delete all inheriting experience demographics.

 
Response code
Force?
Definition

204

true or false

Successfully deleted.

409

false

Seller demographic is being used by at least one experience demographic.

409

true

An inheriting experience demographic cannot be deleted because it is the sole demographic for an experience.

Suggest Edits

Delete an experience demographic

Deletes the experience demographic with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/demographics/id
curl --request DELETE \
  --url https://sandbox.xola.com/api/demographics/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/demographics/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/demographics/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Demographic ID.

 
Response code
Definition

204

Successfully deleted.

409

Experience demographic cannot be deleted because it is the sole demographic for its experience.

Suggest Edits

List all demographics

Returns a list of demographics owned by a given seller.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/demographics
curl --request GET \
  --url 'https://sandbox.xola.com/api/demographics?seller=seller'
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/demographics',
  qs: { seller: 'seller' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/demographics?seller=seller")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/demographics?seller=seller");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/demographics"

querystring = {"seller":"seller"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

seller
string
required

Seller ID that owns the demographics.

experience
string

Experience ID that the demographics are associated with.

 
Suggest Edits

Introduction

 

Resources, also known as inventory are fixed resources that can be utilized across multiple experiences. When associated with experiences, Xola will automatically limit schedule availability for those experiences based on resource utilization.

Paid Feature

You must have the inventory feature turned on for this API endpoint to work.

There are two concepts key in inventory items:

  • Capacity: The number of seats/spots in each piece of equipment. For example, if you have a 20-seater bus, this would refer to how many seats you have on the bus.
  • Count: The count refers to how many units of equipment you have. In our bus example, the capacity is 20 seats but if we only have 1 bus the count is 1.
Attribute
Type
Definition

capacity

integer

Number of seats available per unit of the resource.

count

integer

Number of units available of the resource (capacity multiplier).

name

string

Name of the resource.

seller

string

Seller who owns the resource.

type

string

Always equipment.

{
  "id": "50be7451986ae56247000036",
  "capacity": 20,
  "count": 1,
  "name": "Bus",
  "seller": "4f104661536e86b23d000000",
  "type": "equipment"
}
Suggest Edits

Create a resource

Creates a new inventory resource.

To perform this action, you must be the account owner, or must be delegated with ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/resources
curl --request POST \
  --url https://sandbox.xola.com/api/resources
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/resources' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/resources")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/resources");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/resources"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

seller
string
required

Seller who owns the resource.

capacity
int32
required

Number of seats available per unit of the resource.

count
int32
required

Number of units available of the resource (capacity multiplier).

name
string
required

Name of the resource.

type
string
required

Always equipment.

 
Suggest Edits

Retrieve a resource

Retrieves the resource with the given ID.

To perform this action, you must be the account owner, or must be delegated with ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/resources/id
curl --request GET \
  --url https://sandbox.xola.com/api/resources/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/resources/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/resources/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/resources/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/resources/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Resource ID.

 
Suggest Edits

Assign a resource to an experience

Assigns an existing inventory resource to an existing experience. This operation may cause availability to decrease for experiences currently and previously assigned to the resource due to the introduction of greater restrictions. It may also cause "overbookings" to occur i.e. the open count of an event drops below zero.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/id/resources
curl --request POST \
  --url https://sandbox.xola.com/api/experiences/id/resources
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences/id/resources' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/id/resources")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/experiences/id/resources");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/id/resources"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Experience ID.

Body Params

resource
object

Resource to assign to the experience.

 
resource.id
string

Object identifier

 
Response code
Definition

201

Successfully assigned resource to the experience.

404

Experience or resource not found.

409

Experience is already assigned to another resource.

Suggest Edits

Un-assign a resource from an experience

Unassigns a previously assigned resource from an experience. This operation may cause availability to increase for experiences currently and previously assigned to the resource due to the relaxation of restrictions.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/experiences/experienceId/resources/resourceId
curl --request DELETE \
  --url https://sandbox.xola.com/api/experiences/experienceId/resources/resourceId
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/experiences/experienceId/resources/resourceId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/experienceId/resources/resourceId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/experiences/experienceId/resources/resourceId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/experienceId/resources/resourceId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

experienceId
string
required

The Experience ID

resourceId
string
required

The Resource ID

 
Suggest Edits

Update a resource

Updates the specified resource. Any parameters not provided will be left unchanged.

To perform this action, you must be the account owner, or must be delegated with ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api
curl --request PUT \
  --url https://sandbox.xola.com/api
var request = require("request");

var options = { method: 'PUT', url: 'https://sandbox.xola.com/api' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

capacity
int32

Number of seats available per unit of the resource.

count
int32

Number of units available of the resource (capacity multiplier).

name
string

Name of the resource.

 

If the capacity or count is changed and the resource is assigned to one or many experiences, Xola will recompute the open count for all Events for those experiences. The recompute is done in the background, so the resource update may return with a success code before all relevant Events have been updated.

Suggest Edits

Delete a resource

Deletes the given resource.

To perform this action, you must be the account owner, or must be delegated with ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/resources/id
curl --request DELETE \
  --url https://sandbox.xola.com/api/resources/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/resources/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/resources/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/resources/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/resources/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Resource ID.

 
Response code
Definition

204

Successfully deleted resource.

409

Resource is assigned to at least one experience. Un-assign the resource from all experiences and retry.

Suggest Edits

Introduction

 

In Xola, availability represents the number of open seats that are available on a given experience at a specific date & time. If the availability is 0, it means the particular date & time cannot be booked.

Response Format

API end points usually return availability between a given date range (max range is 62 days).

Experiences may be configured to be "all-day" or have specific "time slots". Based on the type of schedule, the response structure will be different.

For timeslot based schedules, the response will be a nested object structure with date, time, and availability properties:

{
  "2013-08-05": {
    945: 0,
    1200: 3,
  },
  "2013-09-08": {
    945: 11,
    1200: 0
  }
}

For all-day schedules, the response will contain date and availability properties (no time property):

{
  "2013-08-05": 3,
  "2013-09-08": 11
}

Any date or times not present in the response are considered closed, and may not be used for a booking.

Suggest Edits

Experience availability

Retrieves real-time availability for a single experience.

 
gethttps://sandbox.xola.com/api/experiences/id/availability
curl --request GET \
  --url https://sandbox.xola.com/api/experiences/5a719f5f07876cdf388b4569/availability
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/experiences/5a719f5f07876cdf388b4569/availability' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/experiences/5a719f5f07876cdf388b4569/availability")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/experiences/5a719f5f07876cdf388b4569/availability");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/5a719f5f07876cdf388b4569/availability"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
    "2018-11-07": {
      	"0800": 8,
        "1800": 0
    },
    "2018-11-08": {
      	"0800": 5,
        "1800": 7
    }
}
{
    "2018-11-07": 8,
    "2018-11-08": 0
}

Path Params

id
string
required

Experience ID

Query Params

start
date

Start date in YYYY-MM-DD format. Defaults to today (UTC).

end
date

End date in YYYY-MM-DD format. Defaults to 1 month after the start date. Cannot be more than 62 days past start.

 
Suggest Edits

Batch availbility

Retrieves real-time availability for several experiences.

 
gethttps://sandbox.xola.com/api/availability
curl https://sandbox.xola.com/api/availability?experience=561f9264c683b19e7f8b4568,561f9c06c683b1fe7f8b456a
curl https://sandbox.xola.com/api/availability?experience=561f9264c683b19e7f8b4568,561f9c06c683b1fe7f8b456a&start=2015-11-09&end=2015-11-11
A binary file was returned

You couldn't be authenticated

{
    "561f9264c683b19e7f8b4568": {
        "2015-11-09": {
            "900": 5,
            "1200": 5,
            "1500": 5,
            "1700": 5
        },
        "2015-11-10": {
            "900": 5,
            "1200": 5,
            "1500": 5,
            "1700": 5
        },
        "2015-11-11": {
            "900": 5,
            "1200": 5,
            "1500": 5,
            "1700": 5
        }
    },
    "561f9c06c683b1fe7f8b456a": {
        "2015-11-11": {
            "1300": 5
        }
    }
}

Query Params

seller
string

Comma separated list of Seller IDs (required if experience is not specified)

experience
string

Comma separated list of Experience IDs (required if seller is not specified)

start
date

date Start date in YYYY-MM-DD format. Defaults to today (UTC).

end
date

End date in YYYY-MM-DD format. Defaults to 1 month after the start date. Cannot be more than 62 days past start.

 

This end point returns you availability information across multiple experiences

Suggest Edits

Introduction

 

Buttons allow you to logically group experiences or gifts for use on websites. This is a great way to have themed landing pages with checkout offerings mirroring the theme.

Each of these buttons can be easily embedded on your website by following instructions to implement our javascript based checkout widget.

Xola offers four kinds of online checkout options:

  • Single Item Checkout: Pulls up checkout for one listing.
  • Multi-Item Checkout: You choose which listings should appear for checkout in this button, and your customers can checkout for more than one listing at a time.
  • Timeline Checkout: A scrollable timeline that shows upcoming trip times across all of your listings.You choose which listings appear in checkout for this button.
  • Gifts Checkout: Pulls up the listings you offer for Gifts as well as a custom dollar amount. Your customers can purchase these gifts and send them to recipients.
Suggest Edits

Create a button

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/buttons
curl -X POST -H "X-API-KEY: MY_API_KEY" https://sandbox.xola.com/api/buttons -d '{
  "name":"Kayak Tour",
  "type":"timeline",
  "items":[
    {
      "name":"Kayak Experience #1",
      "experience":"58511cb9273554e78989a20b",
      "type":"experience",
      "sequence":0
    },
    {
      "name":"Kayak Experience #2",
      "experience":"57b73bdce01798f31e8b44fd",
      "type":"experience",
      "sequence":1
    }
  ],
  "seller":{
    "id":"584f61efcb2256a6132c6e04"
  }
}'
curl -X POST  -H "X-API-KEY: MY_API_KEY" https://sandbox.xola.com/api/buttons -d '{
  "name":"My API Button",
  "type":"checkout",
  "items":[
    {
      "type":"experience",
      "experience":"58507203e017980f118b460d"
    }
  ],
  "seller":{
    "id":"584f61efcb2256a6132c6e04"
  }
}'
curl -X POST -H "X-API-KEY: MY_API_KEY" https://sandbox.xola.com/api/buttons -d '{
  "name":"Kayak Gifts",
  "type":"gift",
  "items":[
    {
      "name":"Kayak Experience #1",
      "experience":"58511cb9273554e78989a20b",
      "type":"experience",
      "sequence":0
    },
    {
      "name":"Kayak Experience #2",
      "experience":"57b73bdce01798f31e8b44fd",
      "type":"experience",
      "sequence":1
    }
  ],
  "seller":{
    "id":"584f61efcb2256a6132c6e04"
  }
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"584eddf3f8894ed117b7acd9",
  "name":"Kayak Tour",
  "type":"timeline",
  "items":[
    {
      "sequence":0,
      "type":"experience",
      "experience":{
        "id":"57b7395ce0179850238b45ae"
      }
    },
    {
      "sequence":1,
      "type":"experience",
      "experience":{
        "id":"57b73bdce01798f31e8b44fd"
      }
    }
  ],
  "seller":{
    "id":"570b5ff46864ea3e288b45f6"
  },
  "createdAt":"2016-12-12T17:27:15+00:00",
  "createdBy":{
    "id":"5209da0e3e269e7e05000000"
  },
  "updatedAt":"2016-12-12T17:27:15+00:00"
}
{
  "field": {
    "type": "required"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Query Params

seller
string
required

ID of the seller

Body Params

name
string
required

A name to describe the button

type
string
required

One of checkout, timeline or gift

items
array of objects

An array of objects that describe what should be shown in the checkout

type
experience
sequence
 
Suggest Edits

Retrieve a button

Fetch a specific button

 
gethttps://sandbox.xola.com/api/buttons/id
curl --request GET \
  --url https://sandbox.xola.com/api/buttons/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/buttons/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/buttons/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/buttons/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/buttons/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id":"584eddf3f8894ed117b7acd9",
  "name":"Kayak Tour",
  "type":"timeline",
  "items":[
    {
      "sequence":0,
      "type":"experience",
      "experience":{
        "id":"57b7395ce0179850238b45ae"
      }
    },
    {
      "sequence":1,
      "type":"experience",
      "experience":{
        "id":"57b73bdce01798f31e8b44fd"
      }
    }
  ],
  "seller":{
    "id":"570b5ff46864ea3e288b45f6"
  },
  "createdAt":"2016-12-12T17:27:15+00:00",
  "createdBy":{
    "id":"5209da0e3e269e7e05000000"
  },
  "updatedAt":"2016-12-12T17:27:15+00:00"
}

Path Params

id
string
required

The Button ID

 
Suggest Edits

Update a button

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/buttons/id
{
  "name": "The New Kayak Tour"
}
A binary file was returned

You couldn't be authenticated

{
  "type":"timeline",
  "name":"The New Kayak Tour",
  "items":[
    {
      "name": "Kayak Experience #1",
      "experience": {
        "id": "57b7395ce0179850238b45ae"
      },
      "type":"experience",
      "sequence": 0
    },
    {
      "name": "Kayak Experience #2",
      "experience":{
        "id": "57b73bdce01798f31e8b44fd"
      },
      "type":"experience",
      "sequence": 1
    }
  ],  
  "seller":{
    "id":"584f61efcb2256a6132c6e04"
  }
}

Path Params

id
string
required

The Button ID

Body Params

name
string

A name to describe the button

items
array of objects

An array of objects that describe what should be shown in the checkout

type
experience
sequence
 
Suggest Edits

Archive a button

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/buttons/id
curl --request DELETE \
  --url https://sandbox.xola.com/api/buttons/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/buttons/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/buttons/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/buttons/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/buttons/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The Button ID

 

Archiving a button will remove it from the seller's interface. However the buttons will continue work as before so as to not break existing functionality.

Suggest Edits

List all buttons

Fetch all buttons for a seller

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/buttons
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/buttons?seller=584f61efcb2256a6132c6e04
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/buttons?seller=584f61efcb2256a6132c6e04&type=gift
A binary file was returned

You couldn't be authenticated

{
  "data":[
    {
      "id":"584eddf3f8894ed117b7acd9",
      "name":"Kayak Tour",
      "type":"timeline",
      "items":[
        {
          "sequence":0,
          "type":"experience",
          "experience":{
            "id":"58511cb9273554e78989a20b"
          }
        },
        {
          "sequence":1,
          "type":"experience",
          "experience":{
            "id":"58511cb9273554e78989a20b"
          }
        }
      ],
      "seller":{
        "id":"584f61efcb2256a6132c6e04"
      },
      "createdAt":"2016-12-12T17:27:15+00:00",
      "createdBy":{
        "id":"584f61efcb2256a6132c6e04"
      },
      "updatedAt":"2016-12-12T17:27:15+00:00"
    }
  ],
  "paging":{
    "next":null,
    "total":1
  }
}

Query Params

seller
string
required

ID of the seller

type
string

Optional filter to restrict type of buttons being fetch. Should be one of gift, checkout or timeline

 
Suggest Edits

Introduction

 

Coupon Types

Xola offers four varieties of coupons:

  1. Discount: Reduces the order amount by a percentage or absolute value.
  2. Unlock: Specify an ad-hoc order amount.
  3. Demographic Discount: Reduces the order amount by an absolute value based on the quantity of guests.
  4. Buy X Get Y: Advanced demographic discount coupon that helps incentivize group bookings.
  5. Voucher: Applied as a payment method (unlike other types which are applied as a discount). Vouchers are a great way to handle campaigns from daily deal sites like Groupon.

Taxes & Fees

All Coupons, with the exception of Vouchers, are applied before taxes & fees. Vouchers are applied after taxes & fees; just like a method of payment.

Purchase Restrictions

All coupon types support the ability to place the following restrictions at redemption:

  1. Purchase Window: Limits the dates within which this coupon can be redeemed.
  2. Arrival Window: Limits the arrival date on which the activity takes place.
  3. Listing Restriction: Limits the coupon to a subset of your listings.

Coupon Codes

A coupon cannot be directly used. It must have "codes" associated with it. A code may be configured to be a limited use, or unlimited use. Xola will keep track of the number of code usages.

{
  "id": "5acc4fa307876c4f798b4567",
  "name": "Winter Sale",
  "amount": 20,
  "type": "discount",
  "algorithm": "percent",
  "source": "xola",
  "seller": {
    "id": "57e4a620c683b1c01e8b4575"
  },
  "bookBySchedule": {
    "id": "5b05c8ed07876c8a108b457e",
    "repeat": "weekly",
    "days": [0, 1, 2, 3, 4, 5, 6],
    "start": "2018-08-31T15:00:00+00:00",
    "end": "2018-12-31T14:59:59+00:00",
    "type": "available",
    "timeRanges": [],
    "blackouts": []
  },
  "arrivalSchedule": {
    "id": "5b05c8ed07876c8a108b457f",
    "repeat": "weekly",
    "days": [0, 1, 2, 3, 4, 5, 6],
    "start": "2018-10-31T15:00:00+00:00",
    "end": "2018-12-31T14:59:59+00:00",
    "type": "available",
    "timeRanges": [],
    "blackouts": [
      {
        "repeat": "weekly",
        "days": [2],
        "start": "2018-12-24T15:00:00+00:00",
        "end": "2018-12-25T14:59:59+00:00",
        "type": "unavailable",
        "timeRanges": [],
        "id": "5b05c8ed07876c8a108b4580"
      }
    ],
  },
  "createdAt": "2018-04-10T05:46:11+00:00",
  "createdBy": {
    "id": "4f293e17536e86bc66000000"
  },
  "updatedAt": "2018-05-23T20:02:53+00:00",
  "experiences": {
    "all": true,
    "experiences": []
  },
  "tags": [
    {
      "system": true,
      "id": "winter is coming"
    }
  ]
}
Suggest Edits

Create a coupon

Creates a new coupon object.

To perform this action, you must be the account owner, or must be delegated with ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/coupons
curl --request POST \
  --url https://sandbox.xola.com/api/coupons
var request = require("request");

var options = { method: 'POST', url: 'https://sandbox.xola.com/api/coupons' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/coupons");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

name
string
required

Name of the coupon campaign.

type
string
required

Type of coupon. Possible values are discount, person, unlock, bxgy,voucher`.

algorithm
string
required

Algorithm used to calculate the discount. Possible values are percent, absolute.

amount
float
required

Amount of the discount.

purchaseAmount
float

Amount paid by the customer for this coupon. This may be lower than the amount in case of promotional campaigns.

codes
array of objects
required

List of unique codes that may be used to redeem this coupon.

code
limit
int32

Limits the number of times the coupon can be used. Setting this to null or leaving blank will make this an "unlimited use" coupon.

bookBySchedule
array of objects

Restriction which ensures that this coupon is only redeemable within the specified schedules.

timeRanges
arrivalSchedule
array of objects

Restriction which ensures that this coupon can only be used for orders whose arrival is within the specified schedules.

timeRanges
tags
array of objects

List of tags that should automatically get applied orders that use this coupon.

id
paymentMethod
string

Reported payment method when this voucher is used. Applicable and required for voucher types.

 
Suggest Edits

Retrieve a coupon

Returns a coupon object.

To perform this action, you must be the account owner or be delegated with ROLE_RESERVATION_LITE, ROLE_RESERVATION, ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons/id
curl --request GET \
  --url https://sandbox.xola.com/api/coupons/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/coupons/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/coupons/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of the coupon.

 
Suggest Edits

Update a coupon

Updates the specified coupon.

To perform this action, you must be the account owner, or must be delegated with ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/coupons/id
curl --request PUT \
  --url https://sandbox.xola.com/api/coupons/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/coupons/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/coupons/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of the coupon.

Body Params

name
string
required

Name of the coupon campaign.

algorithm
string
required

Algorithm used to calculate the discount. Possible values are percent, absolute.

amount
float
required

Amount of the discount.

purchaseAmount
float

Amount paid by the customer for this coupon. This may be lower than the amount in case of promotional campaigns.

limit
int32

Limits the number of times the coupon can be used.

bookBySchedule
array of objects

Restriction which ensures that this coupon is only redeemable within the specified schedules.

timeRanges
arrivalSchedule
array of objects

Restriction which ensures that this coupon can only be used for orders whose arrival is within the specified schedules.

timeRanges
tags
array of objects

List of tags that should automatically get applied orders that use this coupon.

id
paymentMethod
string

Reported payment method when this voucher is used. Applicable and required for voucher types.

 
Suggest Edits

Delete a coupon

Deletes the coupon with the given ID.

To perform this operation, you must be the account owner, or must be delegated with ROLE_MARKETER, or ROLE_SELLER_ADMIN.

Deleting a coupon will not remove it from any existing orders. It will remove the coupon from the seller's interface and prevent it from being redeemed going forward.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/coupons/id
curl --request DELETE \
  --url https://sandbox.xola.com/api/coupons/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/coupons/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/coupons/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of the coupon.

 
Suggest Edits

List all coupons

Returns a list of your coupons

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons
curl --request GET \
  --url https://sandbox.xola.com/api/coupons
var request = require("request");

var options = { method: 'GET', url: 'https://sandbox.xola.com/api/coupons' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/coupons");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

seller
string

Seller that owns the coupon.

experience
string

Experience for which the coupon is going to be applied. Required if not authenticated.

code
string

Coupon code to search by. Required if not authenticated.

source
string

Coupon source. Possible values are xola or gift.

arrival
date

Coupon restrictions must allow this arrival date.

arrivalTime
int32

Coupon restrictions must allow this arrival time.

 
Suggest Edits

Coupon Codes

 

A Coupon cannot be used unless it has codes associated with it.

Each coupon code has a user specified identifier (code) that must be unique across all active coupon campaigns. It's usage may be limited or left open for unlimited use. Usage of coupons are tracked at the code level to measure the efficacy of your coupon campaign.

The list of codes for a given coupon would typically be specified during coupon creation within the codes property. Alternately, you may use these endpoints to operate at a per-code level.

{
  "id": "5acc50ef07876cf24d8b456f",
  "code": "23voucher",
  "coupon": {
    "id": "5acc50ef07876cf24d8b456c"
  },
  "status": 100,
  "orders": [],
  "uses": 0
}
Suggest Edits

Create a code

Creates one or more coupon codes.

To perform this operation, you must be the account owner, or must be delegated with ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/coupons/id/codes
curl --request POST \
  --url https://sandbox.xola.com/api/coupons/id/codes
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/coupons/id/codes' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/id/codes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/coupons/id/codes");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/id/codes"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The Coupon ID

Query Params

batch
boolean

Use true if you are uploading multiple codes.

Body Params

code
string
required

Unique identifier for this code. Required if batch=false.

array of strings
required

List of unique codes. Required if batch=true.

 
Suggest Edits

Retrieve a coupon code

Returns a coupon code object.

To perform this action, you must be the account owner or be delegated with ROLE_RESERVATION_LITE, ROLE_RESERVATION, ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons/couponId/codes/id
curl --request GET \
  --url https://sandbox.xola.com/api/coupons/couponId/codes/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/coupons/couponId/codes/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/couponId/codes/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/coupons/couponId/codes/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/couponId/codes/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

couponId
string
required

ID of the coupon.

id
string
required

ID of the coupon code.

 
Suggest Edits

Update a code

Updates the identifier or status of a given coupon code.

To perform this action, you must be the account owner, or must be delegated with ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/coupons/couponId/codes/id
curl --request PUT \
  --url https://sandbox.xola.com/api/coupons/couponId/codes/id
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox.xola.com/api/coupons/couponId/codes/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/couponId/codes/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://sandbox.xola.com/api/coupons/couponId/codes/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/couponId/codes/id"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

couponId
string
required

ID of the coupon.

id
string
required

ID of the code.

Body Params

code
string

User specified unique identifier for this code.

status
int32

Status of this code. Possible values are 100 (active), 200 (redeemed), 400 (void).

 
Suggest Edits

Void a code

Updates a given coupon code's status to void. Marking a code as void prevents it from being used in the future. It does not affect orders that have already used this code in the past.

To perform this action, you must be the account owner, or must be delegated with ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/coupons/couponId/codes/id
curl --request DELETE \
  --url https://sandbox.xola.com/api/coupons/couponId/codes/id
var request = require("request");

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/coupons/couponId/codes/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/couponId/codes/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://sandbox.xola.com/api/coupons/couponId/codes/id");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/couponId/codes/id"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

couponId
string
required

ID of the coupon.

id
string
required

ID of the code.

 
Suggest Edits

List coupon codes

Retrieve all codes associated with a coupon.

To perform this action, you must be the account owner or be delegated with ROLE_RESERVATION_LITE, ROLE_RESERVATION, ROLE_MARKETER, or ROLE_SELLER_ADMIN.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons/id/codes
curl --request GET \
  --url https://sandbox.xola.com/api/coupons/id/codes
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/coupons/id/codes' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/coupons/id/codes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/coupons/id/codes");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/coupons/id/codes"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

ID of the coupon.

 
Suggest Edits

Introduction

 

Affiliates are partners who book on behalf of guests where there is either a discounting or commission component to the relationship. Each affiliate is given a unique code so that you can track commissions, accounts receivable, and accounts payable for each affiliate.

See our help center for more details.

{
  "id": "57ff8466c683b1e40a8b4572",
  "name": "Hotel California",
  "code": "CALI",
  "balance": 0,
  "status": "active",
  "voucher": false,
  "discount": {
    "amount": 5,
    "amountType": "percent",
    "scope": "outing",
    "scopeModifier": "excludeAddon"
  },
  "commission": {
    "amount": 5,
    "amountType": "percent",
    "scope": "outing",
    "scopeModifier": "excludeAddon"
  },
  "children": [
    "594787f907876ccd058b45ee"
  ],
  "travelerNotification": {
    "enabled": true
  },
  "affiliateNotification": {
    "enabled": false
  },
  "createdAt": "2016-10-13T12:56:06+00:00",
  "createdBy": "57ba753dc683b12a7f8b4567",
  "updatedAt": "2016-10-24T08:55:48+00:00",
  "updatedBy": "57ba753dc683b12a7f8b4567"
}
Suggest Edits

Create an affiliate

Create a new affiliate for a seller.

To perform this action, you must be the account owner or must be delegated with ROLE_SELLER_ADMIN or ROLE_RESERVATIONIST.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/sellers/id/affiliates
curl --request POST \
  --url https://sandbox.xola.com/api/sellers/id/affiliates
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/sellers/id/affiliates' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/sellers/id/affiliates")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://sandbox.xola.com/api/sellers/id/affiliates");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/sellers/id/affiliates"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Seller ID.

Body Params

name
string
required

Affiliate name.

code
string
required

Unique code to identify this affiliate when placing an order.

children
array of strings

If this affiliate is the parent of any other affiliates, then list their children's IDs in this attribute

commission
object

Commission this affiliate receives for each order placed.

 
discount
object

Discount that will be applied to orders placed by this affiliate.

 
discount.amount
float

The amount to discount

discount.amountType
string

One of absolute (flat discount) or percentage (a percentage discount)

 
Suggest Edits

Retrieve an affiliate

Retrieves the affiliate for a given seller and ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/sellers/id/affiliates/affiliateId
curl --request GET \
  --url https://sandbox.xola.com/api/sellers/id/affiliates/affiliateId
var request = require("request");

var options = { method: 'GET',
  url: 'https://sandbox.xola.com/api/sellers/id/affiliates/affiliateId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://sandbox.xola.com/api/sellers/id/affiliates/affiliateId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://sandbox.xola.com/api/sellers/id/affiliates/affiliateId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/sellers/id/affiliates/affiliateId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

Seller ID.

affiliateId
string
required

Affiliate ID.

 
Suggest Edits

Update an affiliate

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/users/id/affiliates/affiliateId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/affiliate/586d04b0ff4dc39755cd4624 -d '{
  "name": "Samwise Gamgee",
  "code": "sam"
}'
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The user ID

affiliateId
string
required

The affiliate ID

 
Suggest Edits

Remove an affiliate

Deletes the affiliate. Deleting this affiliate will not affect any existing bookings the affiliate code has been applied to.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/users/id/affiliates/affiliateId
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/affiliates/586d04b0ff4dc39755cd4624
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The User ID

affiliateId
string
required

The Affiliate ID

 
Suggest Edits

List all affiliates

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/users/:id/affiliates
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/affiliates
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

ID
string
required

The User ID

 
Suggest Edits

Pay an affiliate

If your affiliate has accrued commission for all the bookings they've referred, and you need to pay the affiliate their commission, you can use this API end point to create a transaction that reflects the seller paying the affiliate

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/users/id/affiliates/affiliateId/pay
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/affiliates/586d04b0ff4dc39755cd4624/pay -d '{
  "amount": 15,
  "method": "check",
  "comment": "Paid for week of 18th August by check #A123121",
  "start": "2015-01-18",
  "end": "2015-01-24"
}'
A binary file was returned

You couldn't be authenticated

{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The User ID

affiliateId
string
required

The affiliate ID

Body Params

amount
float
required

The amount paid

method
string
required

One of Xola's valid payment methods

comment
string

Any note or comment about this transaction

start
date
required

The start date of the date range for which the affiliate was paid

end
date
required

The end date of the date range for which the affiliate was paid

 

This will create a transaction of type affiliate in Xola's records. The transaction will be visible in the seller's reports and you can fetch this transaction through the transactions api.

Suggest Edits

Collect payment from an affiliate

If your affiliate has collected payment from your guests in the form of deposits, and the affiliate owes the seller some money, you can use this API end point to create a transaction that reflects the seller collecting a payment from an affiliate

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/users/id/affiliates/affiliateId/collect
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/users/584f61efcb2256a6132c6e04/affiliates/586d04b0ff4dc39755cd4624/collect -d '{
  "amount": 15,
  "method": "cash",
  "comment": "Collected by Jane"
}'
A binary file was returned

You couldn't be authenticated

{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The User ID

affiliateId
string
required

The affiliate ID

Body Params

amount
float
required

The amount to collect

method
string
required

One of Xola's valid payment methods

comment
string

Any note or comment about this transaction

 

This will create a transaction of type affiliate in Xola's records. The transaction will be visible in the seller's reports and you can fetch this transaction through the transactions api.

Suggest Edits

Introduction

 

Orders represent any bookings that are made on a seller's account. The API end points available for orders allow you to create, update, or cancel bookings.

Order Source

The source of an order determines how Xola will treat the order.

  • office: Use this when creating an order with authorized credentials. Xola will treat the order as though it came from the backoffice. When authenticated, immediate payment is optional and several experience restrictions may be bypassed.
  • checkout: Use this when creating an order anonymously. Xola will treat the order as though it came from the consumer checkout. When anonymous, payment is mandated unless the experience configuration explicitly allows for non-payment.

Order Statuses

Every order has an integer status atttribute which describes the state of the booking. The general principle with statuses are:

  • Status < 200 indicates a reserved but unconfirmed booking
  • Status >= 200 & < 300 indicates a reserved and confirmed booking
  • Status >= 300 indicates an unreserved booking
Code
Description

100

A pending booking. The traveler's card has not been charged yet, and the booking will not be counted as a part of trip till it is accepted.

101

A booking in a pending state due to a minimum configured on the listing. Once the trip meets the minimum, the status of this order will automatically change to 200.

103

An order in a hold status.

200

A confirmed/accepted booking

201

A confirmed booking for which only a deposit has been collected (deprecated)

202

An confirmed booking which has not been charged

203

An accepted booking, but with the "Pay Later" payment method

700

Booking has been canceled.

Suggest Edits

List all orders

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders?seller=584f61efcb2256a6132c6e04
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders?seller=584f61efcb2256a6132c6e04&arrival=2017-02-14
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders?seller=584f61efcb2256a6132c6e04&createdAt=2017-02-13,2017-02-14
A binary file was returned

You couldn't be authenticated

{
  "data":[
    {
      "id":"58725c43272899333d128bba",
      "shortCode":"ea1dff",
      "guestStatus":"pending",
      "groupDiscount":{
        "enabled":false
      },
      "guests":[
        {
          "id":"587a103107876c17468b45cd",
          "demographic":{
            "id":"55ae2decc683b1aa168b4568",
            "name":"Adults",
            "code":"adults",
            "description":"over 18",
            "quantity":1
          },
          "guestStatus":"pending"
        },
        {
          "id":"587a103107876c17468b45ce",
          "demographic":{
            "id":"587a101b07876c82218b45f3",
            "name":"Children",
            "code":"children",
            "description":"under 16",
            "discount":{
              "amount":5,
              "amountType":"absolute"
            },
            "quantity":1
          },
          "guestStatus":"pending"
        }
      ],
      "experienceName":"The Main Course",
      "quantity":2,
      "demographics":[
        {
          "id":"55ae2decc683b1aa168b4568",
          "name":"Adults",
          "code":"adults",
          "description":"over 18",
          "quantity":1
        },
        {
          "id":"587a101b07876c82218b45f3",
          "name":"Children",
          "code":"children",
          "description":"under 16",
          "discount":{
            "amount":5,
            "amountType":"absolute"
          },
          "quantity":1
        }
      ],
      "arrival":"2017-01-15",
      "customerName":"Rushi",
      "customerEmail":"rushi+api@xola.com",
      "status":200,
      "price":49,
      "priceType":"person",
      "currency":"USD",
      "guestType":"normal",
      "baseAmount":93,
      "amount":93,
      "adjustments":[
        {
          "id":"587a103107876c17468b45cf",
          "type":"payment_request",
          "amount":-93,
          "code":null,
          "caption":null,
          "meta":{
            "payment":{
              "method":"cash",
              "comment":"",
              "meta":{
                "cashCalculator":{
                  "amount":93,
                  "cash":100,
                  "change":7
                }
              }
            }
          },
          "created":"2017-01-14T11:49:05+00:00",
          "createdBy":{
            "id":"584f61efcb2256a6132c6e04"
          },
          "updatedAt":"2017-01-14T11:49:05+00:00",
          "payment":{
            "method":"cash",
            "comment":"",
            "meta":{
              "cashCalculator":{
                "amount":93,
                "cash":100,
                "change":7
              }
            }
          }
        },
        {
          "id":"587a103107876c17468b45d2",
          "type":"payment",
          "amount":-93,
          "code":null,
          "caption":"Payment",
          "meta":{
            "payment":{
              "method":"cash",
              "comment":"",
              "meta":{
                "cashCalculator":{
                  "amount":93,
                  "cash":100,
                  "change":7
                }
              }
            }
          },
          "transaction":"587a103107876c17468b45d3",
          "audit":{
            "balance":{
              "old":93,
              "new":0
            }
          },
          "created":"2017-01-14T11:49:05+00:00",
          "createdBy":{
            "id":"584f61efcb2256a6132c6e04"
          },
          "updatedAt":"2017-01-14T11:49:05+00:00",
          "payment":{
            "method":"cash",
            "comment":"",
            "meta":{
              "cashCalculator":{
                "amount":93,
                "cash":100,
                "change":7
              }
            }
          }
        }
      ],
      "reminders":{
        "travelerTrip":1,
        "notConfirmed":0,
        "reviewed":0
      },
      "source":"office",
      "guestsData":[
        {
          "id":"587a104d07876c737d8b45d5",
          "name":"Rushi",
          "fields":[
            {
              "type":"dateOfBirth",
              "label":"Date of birth",
              "value":"1983-01-12",
              "roster":false
            },
            {
              "type":"text",
              "label":"Pickup location",
              "value":"The Hilton",
              "roster":true
            },
            {
              "type":"text",
              "label":"Address",
              "value":"1 Hilton Way, Charlotte, SC",
              "roster":false
            }
          ],
          "user":{
            "id":"587a11b82a18c9bc35f81c88"
          }
        }
      ],
      "ip":"70.38.38.145",
      "group":{
        "min":1,
        "max":10,
        "outingMin":1,
        "outingMinCutoff":3600
      },
      "cancellationPolicy":"This is a cancellation agreed to by the traveler when making the booking",
      "experience":{
        "id":"58511cb9273554e78989a20b"
      },
      "event":{
        "id":"587a11f0fd9d9b01df5c70c2"
      },
      "seller":{
        "id":"584f61efcb2256a6132c6e04"
      },
      "traveler":{
        "id":"587a11b82a18c9bc35f81c88"
      },
      "transactions":[
        {
          "id":"587a103107876c17468b45d3"
        }
      ],
      "conversation":{
        "id":"587a103107876c17468b45d0"
      },
      "createdAt":"2017-01-14T11:49:05+00:00",
      "createdBy":{
        "id":"584f61efcb2256a6132c6e04"
      },
      "updatedAt":"2017-01-14T11:49:33+00:00",
      "phone":"",
      "phoneCanonical":"",
      "balance":0,
      "tags":[

      ],
      "type":"order",
      "waivers":[

      ]
    }
  ],
  "paging":{
    "next":"/api/orders?seller=584f61efcb2256a6132c6e04&limit=20&sort=-id&id[lt]=58725c43272899333d128bba",
    "total":202
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Query Params

seller
string

ID of a seller associated with the orders

traveler
string

ID of a traveler associated with the orders

affiliate
string

ID of an affiliate associated with the orders. Specifying a parent affiliate will include all it's children.

search
string

Free text search by consumer name, consumer email, or tag value

status
string

Order status. You can comma separate multiple statuses.

arrival
date

The date of the trip. Passing a single date will return orders only that date. Pass two comma separated dates to specify a range. Syntax: arrival=2015-08-01[,2015-08-30]

createdBy
string

ID of the user who created the order

createdAt
string

Date in ISO 8601. Pass two comma separated dates to specify a range. Syntax: createdAt=2015-08-01[,2015-08-30]

updatedAt
string

Date in ISO 8601. Pass two comma separated dates to specify a range. Syntax: createdAt=2015-08-01[,2015-08-30]

experiences
string

A comma separated list of experience IDs

sort
string

Field to sort on. Prefix with a minus sign to sort descending

limit
string

Number of results to include in one page of data

skip
string

Number of results to skip

 

This will return a paginated response that will contain all the orders.

Suggest Edits

Create a new Order

To create a confirmed order, you need to be logged in and be authorized with the reservation role (ROLE_RESERVATION or ROLE_RESERVATION_LITE) for the seller you are creating the order for.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders -d '{
    "experienceName": "The Main Course",
    "quantity": 2,
    "demographics": [{
        "id": "55ae2decc683b1aa168b4568",
        "name": "Adults",
        "code": "adults",
        "description": "over 18",
        "quantity": 1
    }],
    "arrival": "2017-01-15",
    "customerName": "Rushi",
    "customerEmail": "rushi+api@xola.com",
    "price": 49,
    "priceType": "person",
    "currency": "USD",
    "baseAmount": 93,
    "amount": 93,
    "payment": {
        "method": "cash",
        "comment": "5x20"
    },
    "status": 200,
    "source": "office",
    "experience": {
        "id": "55ae2dedc683b1aa168b4569"
    },
    "seller": {
        "id": "55ae2ca0c683b1aa168b4567"
    },
    "phone": "555-232-2157",
    "tags": []
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"58725c43272899333d128bba",
  "shortCode":"ea1dff",
  "guestStatus":"pending",
  "groupDiscount":{
    "enabled":false
  },
  "guests":[
    {
      "id":"587a103107876c17468b45cd",
      "demographic":{
        "id":"55ae2decc683b1aa168b4568",
        "name":"Adults",
        "code":"adults",
        "description":"over 18",
        "quantity":1
      },
      "guestStatus":"pending"
    },
    {
      "id":"587a103107876c17468b45ce",
      "demographic":{
        "id":"587a101b07876c82218b45f3",
        "name":"Children",
        "code":"children",
        "description":"under 16",
        "discount":{
          "amount":5,
          "amountType":"absolute"
        },
        "quantity":1
      },
      "guestStatus":"pending"
    }
  ],
  "experienceName":"The Main Course",
  "quantity":2,
  "demographics":[
    {
      "id":"55ae2decc683b1aa168b4568",
      "name":"Adults",
      "code":"adults",
      "description":"over 18",
      "quantity":1
    },
    {
      "id":"587a101b07876c82218b45f3",
      "name":"Children",
      "code":"children",
      "description":"under 16",
      "discount":{
        "amount":5,
        "amountType":"absolute"
      },
      "quantity":1
    }
  ],
  "arrival":"2017-01-15",
  "customerName":"Rushi",
  "customerEmail":"rushi+api@xola.com",
  "status":200,
  "price":49,
  "priceType":"person",
  "currency":"USD",
  "guestType":"normal",
  "baseAmount":93,
  "amount":93,
  "adjustments":[
    {
      "id":"587a103107876c17468b45cf",
      "type":"payment_request",
      "amount":-93,
      "code":null,
      "caption":null,
      "created":"2017-01-14T11:49:05+00:00",
      "createdBy":{
        "id":"584f61efcb2256a6132c6e04"
      },
      "updatedAt":"2017-01-14T11:49:05+00:00",
      "payment":{
        "method":"cash",
        "comment":"5x20"
      }
    },
    {
      "id":"587a103107876c17468b45d2",
      "type":"payment",
      "amount":-93,
      "code":null,
      "caption":"Payment",      
      "transaction":"587a103107876c17468b45d3",
      "audit":{
        "balance":{
          "old":93,
          "new":0
        }
      },
      "created":"2017-01-14T11:49:05+00:00",
      "createdBy":{
        "id":"584f61efcb2256a6132c6e04"
      },
      "updatedAt":"2017-01-14T11:49:05+00:00",
      "payment":{
        "method":"cash",
        "comment":"5x20",
      }
    }
  ],
  "reminders":{
    "travelerTrip":1,
    "notConfirmed":0,
    "reviewed":0
  },
  "source":"office",  
  "group":{
    "min":1,
    "max":10,
    "outingMin":1,
    "outingMinCutoff":3600
  },  
  "experience":{
    "id":"58511cb9273554e78989a20b"
  },
  "event":{
    "id":"587a11f0fd9d9b01df5c70c2"
  },
  "seller":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "traveler":{
    "id":"587a11b82a18c9bc35f81c88"
  },
  "transactions":[
    {
      "id":"587a103107876c17468b45d3"
    }
  ],
  "conversation":{
    "id":"587a103107876c17468b45d0"
  },
  "createdAt":"2017-01-14T11:49:05+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedAt":"2017-01-14T11:49:33+00:00",
  "phone":"",
  "phoneCanonical":"",
  "balance":0,
  "tags":[

  ],
  "type":"order",
  "waivers":[

  ]
}
 

Possibly the most complicated piece about orders are it's adjustments. Adjustments serve two purposes:

  • Redundancy check: This formula should always be true baseAmount + addOns + adjustments = amount
  • Audit trail: All changes to an order must be done via adjustments

You can use the /api/orders/prepare endpoint to have the adjustments generated for you.

Suggest Edits

Prepare an order

Use this endpoint to generate all the necessary "adjustments" for an order you want to create. This also returns a user friendly breakdown object that you can display to the consumer placing the order.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/prepare
curl -X POST https://sandbox.xola.com/api/orders -d '{
  "experience": "58511cb9273554e78989a20b",
  "arrival": "2015-01-15",
  "quantity": 2,
  "party": {
    "adults": 2,
    "children": 1
  }
}'
A binary file was returned

You couldn't be authenticated

{    
    "experienceName": "The Main Course",
    "quantity": 2,
    "demographics": [{
            "id": "55ae2decc683b1aa168b4568",
            "name": "Adults",
            "code": "adults",
            "description": "over 18",
            "quantity": 2
        },
        {
            "id": "587a101b07876c82218b45f3",
            "name": "Children",
            "code": "children",
            "description": "under 16",
            "discount": {
                "amount": 5,
                "amountType": "absolute"
            },
            "quantity": 1
        }
    ],
    "arrival": "2017-01-15",
    "price": 49,
    "priceType": "person",
    "currency": "USD",
    "guestType": "normal",
    "baseAmount": 142,
    "amount": 142,
    "group": {
        "min": 1,
        "max": 10,
        "outingMin": 1,
        "outingMinCutoff": 3600
    },
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "balance": 142,
    "tags": [],
    "guests": [],
    "type": "order",
    "breakdown": [{
            "Adults ($49.00 × 2)": "$98.00"
        },
        {
            "Children ($44.00 × 1)": "$44.00"
        },
        {
            "Total": "$142.00"
        }
    ]
}

Body Params

experience
string
required

The experience ID

arrival
date

The date of arrival

arrivalTime
int32

The arrival time as an integer (9AM would be 900 and 10PM would be 2200)

quantity
int32
required

The number of guests. Required if party is not specified

party
object

A object/hash representing your configured demographics & quantity. Required if no quantity is specified.

 
 
Suggest Edits

Retrieve an order

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/orders/id
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/5871d9499dc466302cf67d42