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

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://dev.xola.com/api/users -d '{
    "name" : "John Doe",
    "email" : "john.doe@gmail.com",
    "password" : "password123", 
    "roles" : ["ROLE_DEVELOPER"]
}'

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.

Confirm Your Email Address

Once the account is created, click on the activation link in the email to proceed ahead

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.

Below you will find every API end point available to you.

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

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

Fetch real time availability for a single experience

 
gethttps://sandbox.xola.com/api/experiences/id/availability
curl https://sandbox.xola.com/api/experiences/561f9264c683b19e7f8b4568/availability?start=2015-11-07&end=2015-11-13
A binary file was returned

You couldn't be authenticated

{
    "2015-11-07": {
      	"0800": 8,
        "1800": 0
    },
    "2015-11-08": {
      	"0800": 5,
        "1800": 7
    },
    "2015-11-13": {
      	"0800": 0,
        "1800": 3
    }
}

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.

 
Suggest Edits

Batch availbility

Fetch 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
required

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

experience
string
required

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

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.

 

This end point returns you availability information across multiple experiences

Suggest Edits

Event capacity

Returns the capacity of an experience regardless of scheduled availability

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/experiences/id/capacity/start
curl https://sandbox.xola.com/api/experiences/561f9264c683b19e7f8b4568/capacity/2015-11-07
A binary file was returned

You couldn't be authenticated

{
  "start": "2015-07-19T10:00:00",
  "end": "2015-07-19T11:00:00",
  "open": 12,
  "experience": {
    "id": "55491898cf8b9c55418b456f"
  },
  "equipment": [
    {
      "id": "55a8fd21ac24e0e00b8b4582"
    },
    {
      "id": "55a756adac24e046288b456f"
    }
  ]
}

Path Params

id
string
required

Experience ID

start
date
required

Start date/time in ISO 8601 format without timezone

 
Suggest Edits

Introduction

 

To allow customers to make bookings through your website, you'll need to implement Xola Book Now buttons that pull up online checkout.

Xola offers four kinds of online checkout:

  • 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.

Using the Multi-Item Checkout, Timeline Checkout or Gifts Checkout will require you to create a button. You have the ability to pick and choose which of your listings will appear in the checkout window. Creating different groups of listings is a great idea if you have certain sets of offerings that you would like to present to your customers at the same time.

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

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

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

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

 
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

Introduction

 

Sellers create coupons to offer discounts on bookings. There are two varieties of coupons which allow you to reduce the total booking value:

  • Discount: These are your traditional dollar amount or percentage off coupons. They allow a seller to specify rules around which the coupon value is calculated.
  • Unlock: Allows the consumer to specify an arbitrary order amount. Any discount value will be accepted as long as it does not reduce the total order amount below zero.

All coupons are applied to the order amount before tax.

Coupon Structure

Each Coupon object represents one campaign. Every coupon will have a name attribute indicating the name of the campaign for e.g. 'Xmas Discounts 2016', and within the campaign there will an array of codes any one of which can be used while creating a booking. A code is unique across all coupons and can only be used in one campaign.

Each coupon also contains an amount and a series of string variables like algorithm and type that describe how the discount is calculated. Coupon usage maybe restricted based on an arrival date schedule as defined by arrivalSchedule or based on the date the booking can be made, as defined in bookBySchedule.

A sample object maybe found in the documentation below

Rules to Calculate Coupon Discount Value

Discount coupons rely on the the type and algorithm attributes that determine how the coupon value is calculated.

  • algorithm: Determines if the calculation treats the amount as an absolute value or a percent value
  • type: Determines if the calculation is applicable per person (person) or a flat discount for the entire booking (discount)
Suggest Edits

List all coupons

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/coupons?seller=584f61efcb2256a6132c6e04
# Authentication not required because `experience` is specified
curl https://sandbox.xola.com/api/coupons?experience=584f61fe9ec4c2ac4fe1b48e&arrival=2016-12-25
curl https://sandbox.xola.com/api/coupons?experience=584f61fe9ec4c2ac4fe1b48e&code=XMAS16
A binary file was returned

You couldn't be authenticated

[
  {
    "id":"584f6036d724811a4d985762",
    "name":"10% for one experience only",
    "limit":null,
    "type":"discount",
    "source":"xola",
    "experiences":{
      "all":false,
      "experiences":[
        "584f604632292d67735b9541"
      ]
    },
    "amount":10,
    "algorithm":"percent",
    "uses":2,
    "count":1
  },
  {
    "id":"584f60a1570f63f1b7e952c7",
    "name":"20% off on Saturday & Sunday for one experience",
    "limit":null,
    "type":"discount",
    "source":"xola",
    "experiences":{
      "all":false,
      "experiences":[
        "57b7395ce0179850238b45af"
      ]
    },
    "arrivalSchedule":{
      "id":"57b74320e01798ee258b4652",
      "days":[
        0,
        6
      ],
      "repeat":"weekly",
      "type":"available",
      "timeRanges":[

      ]
    },
    "amount":20,
    "algorithm":"percent",
    "uses":3,
    "count":3
  }
]

Query Params

seller
string
required

The Seller ID

experience
string

The Experience ID. This field is required if you are not logged in.

code
string

A specific coupon code to return in the response. This field is required if you are not logged in.

source
string

One of xola or gift

arrival
date

A date which will return coupons applicable on given arrival date

arrivalTime
int32

Will return coupons that can be applied on the given arrival time

 

Returns

Return all coupons based on the above filters. It will not return coupon codes but it will return total uses for all codes in this coupon in the uses attribute.

To retrieve coupons, either the seller or experience must be specified as a filter. Optionally you may specify arrival or arrivalTime filters to restrict the response to coupons that can only be applied to orders with the specified arrival date & time.

Suggest Edits

Retrieve a coupon

Fetch a single coupon with it's ID

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons/id
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/coupons/584f6036d724811a4d985762
A binary file was returned

You couldn't be authenticated

{
  "id":"584f6036d724811a4d985762",
  "name": "10% for one experience only",
  "limit": null,
  "type": "discount",
  "source": "xola",
  "experiences": {
    "all": false,
    "experiences":[
      "584f604632292d67735b9541"
    ]
  },    
  "amount":10,
  "algorithm":"percent",
  "createdBy":{
    "id": "584f65f54e3601e32b071d38"
  },
  "codes":[
    {
      "id":"57b742b1926705b85c8b45f5",
      "code":"dlp",
      "status":100,
      "uses":12,
      "orders":[
        {
          "id":"57c4efd56864eaf5388b4583"
        },
        {
          "id":"57c583c6926705ca3e8b45ce"
        }        
      ]      
    }
  ]  
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The Coupon ID

 
Suggest Edits

Create a coupon

Create a new coupon for an authorized seller

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/coupons
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/coupons -d '{
  "name": "10% for one experience only",
  "type": "discount",
  "algorithm": "absolute",
  "amount": 10,
  "codes": ["code1", "code2"],
  "seller": {
       "id": "584f7065cf2e25f5a0b4b785"
   }
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"584f6036d724811a4d985762",
  "name": "10% for one experience only",
  "limit": null,
  "type": "discount",
  "source": "xola",
  "experiences": {
    "all": true,
    "experiences":[]
  },    
  "amount":10,
  "algorithm":"percent",
  "createdBy":{
    "id": "584f65f54e3601e32b071d38"
  },
  "codes":[
    {
      "id": "584f70fcbd369dc235426436",
      "code":"code1",
      "status":100,
      "uses": 0,
      "orders":[] 
    },
    {
      "id": "584f710114c21eaab745b2a0",
      "code": "code2",
      "status":100,
      "uses":0,
      "orders":[]
    }
  ]  
}

Body Params

name
string
required

The name of the coupon / campaign, something used to describe it.

type
string
required

One of discount or unlock

algorithm
string
required

A calculation algorithm, either absolute or percentage

amount
float
required

The amount to discount

codes
array of strings

An array of strings, each containing a unique code. These codes can be applied to a booking

 

To create a coupon you must be logged in and authorized with a reservation role (ROLE_RESERVATION) with the seller for whom you are creating the coupon.

Suggest Edits

Delete a coupon

Remove a coupon

 

Header Auth

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

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The Coupon ID to delete

 

Deleting a coupon will not remove it from any pre-existing orders. It will remove the coupon from the seller's interface and prevent it from being applied to any further overs.

One coupon can have multiple codes. Each code is a unique alphanumeric string that can be applied to a booking.

Structure

A coupon code has the following key attributes:

  • code An alphanumeric string that has the code that can be applied to a booking. This code is case in-sensitive.
  • status A status of 100 will indicate an active code, and a status of 400 will indicate a voided code. Voided codes cannot be used on a booking.
  • uses The number of times this code has been used
  • orders A list of order IDs where this code has been used.
Suggest Edits

List all codes

Retrieve all codes associated with a coupon

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/coupons/id/codes
curl -H "X-API-KEY: APIKEY" https://sandbox.xola.com/api/coupons/584f6036d724811a4d985762/codes
A binary file was returned

You couldn't be authenticated

{
  "data": [
    {
      "id": "584f70fcbd369dc235426436",
      "code":"code1",
      "status":100,
      "uses": 0,
      "orders":[] 
    },
    {
      "id": "584f710114c21eaab745b2a0",
      "code": "code2",
      "status":100,
      "uses":0,
      "orders":[]
    },
    {
      "id": "584f7df4cedf2fab6f37c67a",
      "code": "code3",
      "status": 400,
      "uses": 1,
      "orders":[
        {
          "id": "584f7e086be599cb38eb1978"
        }
      ]
    }
  ],
  "paging": {
    "next": null
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The Coupon ID

 

Returns

This will return a paginated response that will contain all the codes for this coupon

Suggest Edits

Add codes

Add one or more new codes to an existing coupon

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/coupons/id/codes
curl -X POST -H "X-API-KEY: <key>" https://sandbox.xola.cm/api/coupons/584fbe4ed528bd6911f9cd8c/codes -d '{
  "code": "code3"
}'
curl -X POST -H "X-API-KEY: <key>" https://sandbox.xola.cm/api/coupons/584fbe4ed528bd6911f9cd8c/codes?batch=true -d '[
  {"code": "code3"},
  {"code": "code4"},
]'
A binary file was returned

You couldn't be authenticated

{
  "id": "584fbf3bcea23e4397f4394a",
  "code": "code3",
  "status": 100,
  "uses": 0,
  "orders": []
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The Coupon ID

Query Params

batch
boolean

Set to true if you are passing in more than one code

Body Params

code
string
required

The code to add

 
Suggest Edits

Update a code

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/coupons/id/codes/codeId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/coupons/584fbe4ed528bd6911f9cd8c/codes/584fbf3bcea23e4397f4394a -d '{
  "code": "code5"
  }'
A binary file was returned

You couldn't be authenticated

{
  "id": "584fbf3bcea23e4397f4394a",
  "code": "code5",
  "status": 100,
  "uses": 0,
  "orders": []
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The Coupon ID

codeId
string
required

The ID of the code

Body Params

code
string
required

The code that needs to be changed

 
Suggest Edits

Void a code

Prevents a code from being used further, while still keeping the coupon active

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/coupons/id/codes/:codeId
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/coupons/584f72ffb6e18405ff285594/codes/584f77918ebacc4883538181
A binary file was returned

You couldn't be authenticated

 {}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The Coupon ID

codeid
string
required

The coupon code ID

 

Voiding a code will not remove it from any pre-existing orders. It will mark the code as voided (status 400) in the seller's coupon list and prevent it from being applied to any further overs.

Suggest Edits

Introduction

All you need to know about drafts

 
Suggest Edits

List all drafts

Fetch drafts for this seller. This is currently restricted to order drafts only

 

Header Auth

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

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

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/drafts?seller=seller&type=type&status=status")

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/drafts?seller=seller&type=type&status=status");

xhr.send(data);
import requests

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

querystring = {"seller":"seller","type":"type","status":"status"}

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

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "data":[
    {
      "type":"order",
      "data":{
        "experience":{
          "id":"584fc94551147b5c56f2277a"
        },
        "experienceName":"Kayaking",
        "source":"checkout",
        "price":29,
        "priceType":"person",
        "currency":"USD",
        "quantity":1,
        "demographics":[
          {
            "id":"584fc95e006be5358b167c02",
            "name":"Adults",
            "quantity":1,
            "discount":{
              "amountType":"absolute",
              "amount":0
            },
            "description":"18 and over"
          }
        ],
        "groupSize":1,
        "balance":0,
        "baseAmount":29,
        "amount":29,
        "guestType":"normal",
        "payment":{
          "method":"cc"
        },
        "addOns":[

        ],
        "adjustments":[

        ],
        "guestStatus":"pending",
        "affiliateCommission":0,
        "notes":[

        ],
        "guestsData":[

        ],
        "amountPaid":29,
        "type":"order",
        "customerName":"John Doe",
        "customerEmail":"john.doe@gmail.com",
        "phone":"5402322157",
        "arrival":"2016-12-31",
        "group":{
          "min":1,
          "max":12
        },
        "arrivalTime":2000
      },
      "status":"abandoned",
      "seller":{
        "id":"584fc9b969b33646c1dc7ceb"
      },
      "createdAt":"2016-12-13T02:32:39+00:00",
      "updatedAt":"2016-12-13T03:40:03+00:00",
      "audit":[
        {
          "status":{
            "old":"pending",
            "new":"abandoned"
          },
          "createdAt":"2016-12-13T03:40:03+00:00"
        }
      ],
      "id":"584fc9c319012d407079db4a"
    }
  ],
  "paging":{
    "next":null,
    "count":1
  }
}

Query Params

seller
string
required

The Seller ID

type
string
required

The type of draft

status
string
required

The status of the draft. e.g. abandoned

limit
int32

The number of results to include in one page of data

skip
int32

Number of results to skip

 
Suggest Edits

Introduction

 

A trip (event) represents a collection of bookings for one experience that departs at the same time. In Xola's seller interface trips are what's shown on the dashboard. A trip will have a start & end time and an (optional) guide assigned. An event is automatically created when a new booking is created.

Suggest Edits

List all events

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/events
# Events between 1481653800 (13 Dec 2016 18:30 UTC) and 1481912999 (16 Dec 2016 18:29:59 UTC)
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events?seller=58511c095120b45dab3dbe2d&start=1481653800&end=1481912999&offset=-19800&reserved=true
# Events between 1481653800 (13 Dec 2016 18:30 UTC) and 1481912999 (16 Dec 2016 18:29:59 UTC)
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events?seller=58511c095120b45dab3dbe2d&start=1481653800&end=1481912999&offset=-19800&format=roster
A binary file was returned

You couldn't be authenticated

[
  {
    "end": "2016-12-14T15:44:59+00:00",
    "experience":{
      "id": "58511cb9273554e78989a20b"
    },
    "start":"2016-12-14T14:15:00+00:00",
    "actualStart":"2016-12-14T20:15:00+00:00",
    "title": "Kayaking",
    "seller":{
      "id":"58511c095120b45dab3dbe2d"
    },
    "equipment":[

    ],
    "quantity":{
      "canceled":0,
      "confirmed":9,
      "declined":0,
      "deposited":0,
      "failed":0,
      "offered":0,
      "pending":0,
      "reserved":9
    },
    "updated":"2016-11-20T22:33:31+00:00",
    "rosterSent":false,
    "open": 17,
    "orders":[
      {
        "id": "58511cddc8a979d44e5c8866"
      }
    ],
    "id": "58511ce277fe0adb836a745d"
  },
  {
    "end":"2016-12-15T15:59:59+00:00",
    "experience":{
      "id":"58511cb9273554e78989a20b"
    },
    "start":"2016-12-15T14:30:00+00:00",
    "actualStart":"2016-12-15T20:30:00+00:00",
    "title":"Paragliding",
    "seller":{
      "id":"58511c095120b45dab3dbe2d"
    },
    "equipment":[

    ],
    "quantity":{
      "canceled":0,
      "confirmed":2,
      "declined":0,
      "deposited":0,
      "failed":0,
      "offered":0,
      "pending":0,
      "reserved":2
    },
    "updated":"2016-11-07T19:38:36+00:00",
    "rosterSent":false,
    "open":24,
    "orders":[
      {
        "id": "58511d14de75dc14ef582ce8"
      }
    ],
    "id": "58511d23fcc4ec905b87d343"
  },
]

Query Params

seller
string
required

The Seller ID

experience
string

The Experience ID

start
date-time

The start date of the trip as an integer unix timestamp, offset for UTC

end
date-time

The end date of the trip as an integer unix timestamp, offset for UTC

reserved
boolean

Only return events that have reserved bookings

open
int32

Only return events who have more than the given number of open seats

closed
boolean

Only return events not in the experience schedule with zero open count and zero bookings. Cannot use this filter if open is used

format
string

Response format. Use roster to return all matching trips as a roster in an excel file

aggregate
string

Return aggregated information for the given keys. One or more of demographics, addons, orderNotes, guestStatus

 
Suggest Edits

Retrieve an event

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/events/id
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events/58511ce277fe0adb836a745d
A binary file was returned

You couldn't be authenticated

  {
    "end": "2016-12-14T15:44:59+00:00",
    "experience":{
      "id": "58511cb9273554e78989a20b"
    },
    "start":"2016-12-14T14:15:00+00:00",
    "actualStart":"2016-12-14T20:15:00+00:00",
    "title": "Kayaking",
    "seller":{
      "id":"584f61efcb2256a6132c6e04"
    },
    "equipment":[

    ],
    "quantity":{
      "canceled":0,
      "confirmed":9,
      "declined":0,
      "deposited":0,
      "failed":0,
      "offered":0,
      "pending":0,
      "reserved":9
    },
    "updated":"2016-11-20T22:33:31+00:00",
    "rosterSent":false,
    "open": 17,
    "orders":[
      {
        "id": "58511cddc8a979d44e5c8866"
      }
    ],
    "id": "58511ce277fe0adb836a745d"
  }

Path Params

id
string
required

The Event ID

Query Params

format
string

The response format. Use roster to return the trip roster as an excel file

aggregate
string

Return aggregated information for the given keys. One or more of demographics, addons, orderNotes, guestStatus

 
Suggest Edits

Create an event

An event is automatically created when a new booking is created, so this endpoint can be used to create an event that has no bookings. This is usually done to assign a guide or modify it's max capacity.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/events
curl -X POST -H "X-API-KEY: APIKEY" https://sandbox.xola.com/api/events -d '{
  "guides":[{
    "id":"58511e207e88fab465b5effa"
  }],
  "experience": {
    "id":"58511cb9273554e78989a20b"
  },
  "start":"2016-12-14T14:15:00+00:00"
}'
curl -X POST -H "X-API-KEY: APIKEY" https://sandbox.xola.com/api/events -d '{
  "max": 300,
  "experience":{
    "id":"58511cb9273554e78989a20b"
  },
  "start":"2016-12-14T14:15:00+00:00"
}'
A binary file was returned

You couldn't be authenticated

  {
    "end": "2016-12-14T15:44:59+00:00",
    "experience":{
      "id": "58511cb9273554e78989a20b"
    },
    "start":"2016-12-14T14:15:00+00:00",
    "actualStart":"2016-12-14T20:15:00+00:00",
    "title": "Kayaking",
    "seller":{
      "id":"58511c095120b45dab3dbe2d"
    },
    "guides":[
      {"id": "58511e207e88fab465b5effa"}
    ],
    "quantity":{
      "canceled":0,
      "confirmed":0,
      "declined":0,
      "deposited":0,
      "failed":0,
      "offered":0,
      "pending":0,
      "reserved":0
    },
    "updated":"2016-11-20T22:33:31+00:00",
    "rosterSent":false,
    "open": 20,
    "orders":[
      {
        "id": "58511cddc8a979d44e5c8866"
      }
    ],
    "id": "58511ce277fe0adb836a745d"
  }
{
  "field": {
    "event":   {
        "end": "2016-12-14T15:44:59+00:00",
        "experience":{
          "id": "58511cb9273554e78989a20b"
        },
        "start":"2016-12-14T14:15:00+00:00",
        "actualStart":"2016-12-14T20:15:00+00:00",
        "title": "Kayaking",
        "seller":{
          "id":"58511c095120b45dab3dbe2d"
        },
        "guides":[
          {"id": "58511e207e88fab465b5effa"}
        ],
        "quantity":{
          "canceled":0,
          "confirmed":0,
          "declined":0,
          "deposited":0,
          "failed":0,
          "offered":0,
          "pending":0,
          "reserved":0
        },
        "updated":"2016-11-20T22:33:31+00:00",
        "rosterSent":false,
        "open": 20,
        "orders":[
          {
            "id": "58511cddc8a979d44e5c8866"
          }
        ],
        "id": "58511ce277fe0adb836a745d"
    }
  }
}

Body Params

start
date
required
experience
string
required

The experience ID. Provide this as a hash {"id: "experienceId"}

 

Returns

A successful request will return you the created event. However, if the creation of the event fails, then the response may vary based on the HTTP response code.

A response code of 409 will indicate that the guide is already assigned to another trip that conflicts with this time slot. The response body will contain the conflicting trip

Suggest Edits

Update an event

Update an event's max capacity. This allows you to override the maximum trip capacity configured in the experience configuration.

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/events/id
curl -X PUT -H "X-API-KEY: APIKEY" https://sandbox.xola.com/api/events/58511ce277fe0adb836a745d -d '{
  "max": 100
}'
A binary file was returned

You couldn't be authenticated

  {
    "end": "2016-12-14T15:44:59+00:00",
    "experience":{
      "id": "58511cb9273554e78989a20b"
    },
    "start":"2016-12-14T14:15:00+00:00",
    "actualStart":"2016-12-14T20:15:00+00:00",
    "title": "Kayaking",
    "seller":{
      "id":"58511c095120b45dab3dbe2d"
    },
    "equipment":[

    ],
    "quantity":{
      "canceled":0,
      "confirmed":9,
      "declined":0,
      "deposited":0,
      "failed":0,
      "offered":0,
      "pending":0,
      "reserved":9
    },
    "updated":"2016-11-20T22:33:31+00:00",
    "rosterSent":false,
    "open": 17,
    "max": 100,
    "orders":[
      {
        "id": "58511cddc8a979d44e5c8866"
      }
    ],
    "id": "58511ce277fe0adb836a745d"
  }

Path Params

id
string
required

The Event ID

Body Params

max
float
required

The maximum capacity of this trip. This is the only supported attribute by this end point

 

Changing the max capacity will not override any inventory restrictions. This end point only supports updating the max capacity.

Suggest Edits

Assign a guide to a trip

Add a guide to an event. Only a guide manager (ROLE_GUIDE_MANAGER) can add guides to the event

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/events/id/guides
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events/58511ce277fe0adb836a745d -d '{
  "id": "585120ba145618d4da0dad81"
  }
A binary file was returned

You couldn't be authenticated

{
    "end": "2016-12-14T15:44:59+00:00",
    "experience":{
      "id": "58511cb9273554e78989a20b"
    },
    "start":"2016-12-14T14:15:00+00:00",
    "actualStart":"2016-12-14T20:15:00+00:00",
    "title": "Kayaking",
    "seller":{
      "id":"58511c095120b45dab3dbe2d"
    },
    "guides":[
      {"id": "58511e207e88fab465b5effa"}
    ],
    "quantity":{
      "canceled":0,
      "confirmed":0,
      "declined":0,
      "deposited":0,
      "failed":0,
      "offered":0,
      "pending":0,
      "reserved":0
    },
    "updated":"2016-11-20T22:33:31+00:00",
    "rosterSent":false,
    "open": 20,
    "orders":[
      {
        "id": "58511cddc8a979d44e5c8866"
      }
    ],
    "id": "58511ce277fe0adb836a745d"
  }

Path Params

id
string
required

The Event ID

Body Params

id
string

The ID of the guide to assign to the trip

 
Suggest Edits

Remove a guide from a trip

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/events/id/guides/guideId
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events/58511ce277fe0adb836a745d/guides/585120ba145618d4da0dad81
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The Event ID

guideId
string
required

The Guide ID

 
Suggest Edits

Email roster to a guide

Send the trip roster to the seller & any assigned guides through email

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/events/id/email/roster
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events/5850365c05f9bdb7dc1eca98/email/roster
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The Event ID

 

Xola allows you to add notes to any event (trip). These notes will be associated with the trip and will be shown on the dashboard and the guide's roster. You can only add notes to a trip that has 1 or more confirmed bookings.

Suggest Edits

Add a trip note

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/events/id/notes
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events/587b34454f0c1384354d7379/notes -d '{
  "text": "This is a test note"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "587b35295ff2c5a191f82e02",
  "text":"This is a test note",
  "updated":"2017-01-11T02:49:06+00:00",
  "created":"2017-01-11T02:49:06+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedBy":{
    "id":"584f61efcb2256a6132c6e04"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The ID of the event (trip)

Body Params

text
string

The text of the note to add

 
Suggest Edits

Update a trip note

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/events/id/notes/noteId
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/events/587b34454f0c1384354d7379/notes/587b35295ff2c5a191f82e02 -d '{
  "text": "This is an updated test note"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "587b35295ff2c5a191f82e02",
  "text":"This is a test note",
  "updated":"2017-01-11T03:49:06+00:00",
  "created":"2017-01-11T02:49:06+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedBy":{
    "id":"584f61efcb2256a6132c6e04"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The ID of the event (trip)

noteId
string
required

The ID of the note being updated

Body Params

text
string

The text of the note to update

 
Suggest Edits

Introduction

 

A demographic represents a type of customer within your experience. Demographics allow you to define custom discounts and a description that can be displayed at checkout.

Some examples of demographics are:

  • Adult
  • Children
  • Senior Citizens (with a 10% discount)
  • Military Veterans (with a 10% discount)
Suggest Edits

List all Demographics

Retrieve demographics that are created across the entire seller account

 

Header Auth

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

You couldn't be authenticated

{
  "data": [
    {
      "id": "599f99db43f1c3e00fd06def",
      "object": "seller_demographic",
      "createdAt": "2017-07-29T09:04:09+00:00",
      "updatedAt": "2017-08-03T12:21:36+00:00",
      "label": "Adults",
      "labelCanonical": "adults",
      "caption": "18+",
      "all": false,
      "seller": {
        "id": "584f61efcb2256a6132c6e04"
      }
    },
    {
      "id": "597c53735bd57e71c232579e",
      "object": "experience_demographic",
      "createdAt": "2017-07-29T09:20:51+00:00",
      "updatedAt": "2017-07-29T09:20:51+00:00",
      "label": "Adults",
      "labelCanonical": "adults",
      "all": false,
      "caption": "21+",
      "seller": {
        "id": "584f61efcb2256a6132c6e04"
      },
      "parent": {
        "id": "599f99db43f1c3e00fd06def"
      },
      "overrideCaption": true,
      "experience": {
        "id": "599f9a0543f1c3e00fd06df1"
      }
    }
  ],
  "paging": {
    "next":null,
    "total": 2
  }
}

Query Params

seller
string
required

The seller ID for whom you need to fetch the demographics

limit
int32

Number of records to return in the response. (Max: 1000)

 

A demographic can be of two types:

  • Global Demographic - One that applies across an entire account. This is indicated in the response by object: seller_demographic
  • Experience Demographic - One that applies towards a specific listing only. This is indicated in the response by object: experience_demographic
Suggest Edits

Create a new Global Demographic

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/demographics
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/demographics?seller=584f61efcb2256a6132c6e04 -d '{"seller":{"id":"584f61efcb2256a6132c6e04"},"label":"Children","caption":"Kids under 5","all":false}'
A binary file was returned

You couldn't be authenticated

{
  "id": "599fb4ecf8894e1b5ab7acd9",
  "object": "seller_demographic",
  "createdAt": "2017-08-25T05:26:04+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },
  "updatedAt": "2017-08-25T05:26:04+00:00",
  "label": "Children",
  "labelCanonical": "children",
  "caption": "Kids under 5",
  "all": false,
  "seller": {
    "id": "584f61efcb2256a6132c6e04"
  }
}

Body Params

seller
string
required

The seller for whom you are creating the demographic

label
string
required

The name of the demographic

caption
string

A helpful string to show to the end user

all
boolean

A boolean value indicating if this demographic should be applied to all listings

 
Suggest Edits

Update a demographic

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/demographics/id
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/demographics/599fb4ecf8894e1b5ab7acd9 -d '{"label":"Childrens","caption":"All children under 5","all":true}'
A binary file was returned

You couldn't be authenticated

{
  "id": "599fb4ecf8894e1b5ab7acd9",
  "object": "seller_demographic",
  "createdAt": "2017-08-25T05:26:04+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },
  "updatedAt": "2017-08-25T05:28:22+00:00",
  "label": "Childrens",
  "labelCanonical": "childrens",
  "caption": "All children under 5",
  "all": true,
  "seller": {
    "id": "584f61efcb2256a6132c6e04"
  }
}

Path Params

id
string
required

The demographic ID

Body Params

name
string

The name of the demographic

caption
string

A helpful text that should be shown to the end-user

all
boolean

A boolean value indicating if the demographic should be applied to all listings

 
Suggest Edits

Remove a demographic

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/demographics/id
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/demographics/599fb4ecf8894e1b5ab7acd9
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The demographic ID

 
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.

Suggest Edits

List categories

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

A category is a structured field that must be present in all experiences.

Suggest Edits

List all 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

{
    "data": [
        {
            "category": "Zip-lining",
            "name": "Ziplining Las Vegas - Sunset Tour",
            "excerpt": "Enjoy the zipline experience during a beautiful Nevada Sunset",
            "desc": "Start the hike up the mountain with the sun still shining and fly into the sunset down our longest run, a half mile, halfway through your tour.",
            "duration": 180,
            "seller": {
                "id": "561f8ab6c683b1dc7b8b456d"
            },
            "price": 160,
            "currency": "USD",
            "included": [
                "Water",
                "Miner Lights"
            ],
            "notIncluded": [
                "Tennis / Hiking Shoes",
                "Sunglasses"
            ],
            "geo": {
                "lng": -114.93821382523,
                "lat": 35.998910223358
            },
            "updated": "2015-10-15T14:27:10+00:00",
            "priceType": "person",
            "guestType": "normal",
            "group": {
                "min": 1,
                "outingMin": 1,
                "outingMinCutoff": 900
            },
            "visible": true,
            "pickupAddress": "Red mountain, boulder city, las vegas",
            "paymentMethod": "cc",
            "demographics": [
                {
                    "name": "Adults",
                    "code": "adults",
                    "description": "",
                    "id": "561f96e7c683b1fe7f8b4567"
                },
                {
                    "name": "Children",
                    "code": "children",
                    "description": "10 - 15 years old",
                    "discount": {
                        "amount": 10,
                        "amountType": "absolute"
                    },
                    "id": "561fb7b8c683b1f47f8b4573"
                }
            ],
            "schedules": [
                {
                    "repeat": "weekly",
                    "days": [
                        0,
                        5,
                        6
                    ],
                    "type": "available",
                    "departure": "fixed",
                    "times": [
                        1800
                    ],
                    "priceDelta": 0,
                    "id": "561f96e8c683b1dc7b8b456e"
                }
            ],
            "pickupGeo": {
                "lng": -114.93864297867,
                "lat": 35.998806064121
            },
            "photo": {
                "src": "/uploads/images/experiences/561f96e7c683b1fe7f8b4568/561fb367c683b1b57e8b4569.jpg",
                "type": "photo",
                "id": "561fb367c683b1b57e8b4569"
            },
            "medias": [
                {
                    "src": "https://sandbox.xola.com/uploads/images/experiences/561f96e7c683b1fe7f8b4568/561fb367c683b1b57e8b4569.jpg",
                    "type": "photo",
                    "seq": 0,
                    "id": "561fb367c683b1b57e8b4569"
                }
            ],
            "id": "561f96e7c683b1fe7f8b4568"
        }
    ],
    "paging": {
        "next": "/api/experiences?price=100%2C250&limit=1&skip=1"
    }
}

Query Params

seller
string

ID or email of the seller. If you do not specify this filter you must be 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 make a booking on behalf of the seller. This filter requires an authenticated booking agent

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.

This endpoint is best used as an authenticated user

Suggest Edits

Retrieve an experience

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/experiences/id
curl https://sandbox.xola.com/api/experiences/561f96e7c683b1fe7f8b4568
A binary file was returned

You couldn't be authenticated

{
    "category": "Zip-lining",
    "name": "Ziplining Las Vegas - Sunset Tour",
    "excerpt": "Enjoy the zipline experience during a beautiful Nevada Sunset",
    "desc": "Start the hike up the mountain with the sun still shining and fly into the sunset down our longest run, a half mile, halfway through your tour.",
    "duration": 180,
    "seller": {
        "id": "561f8ab6c683b1dc7b8b456d"
    },
    "price": 160,
    "currency": "USD",
    "included": [
        "Water",
        "Miner Lights"
    ],
    "notIncluded": [
        "Tennis / Hiking Shoes",
        "Sunglasses"
    ],
    "geo": {
        "lng": -114.93821382523,
        "lat": 35.998910223358
    },
    "updated": "2015-10-15T14:27:10+00:00",
    "complete": true,
    "priceType": "person",
    "guestType": "normal",
    "group": {
        "min": 1,
        "outingMin": 1,
        "outingMinCutoff": 900
    },
    "visible": true,
    "requireAdult": false,
    "pickupAddress": "Red mountain, boulder city, las vegas",
    "paymentMethod": "cc",
    "demographics": [
        {
            "name": "Adults",
            "code": "adults",
            "description": "",
            "id": "561f96e7c683b1fe7f8b4567"
        },
        {
            "name": "Children",
            "code": "children",
            "description": "10 - 15 years old",
            "discount": {
                "amount": 10,
                "amountType": "absolute"
            },
            "id": "561fb7b8c683b1f47f8b4573"
        }
    ],
    "schedules": [
        {
            "repeat": "weekly",
            "days": [
                0,
                5,
                6
            ],
            "type": "available",
            "departure": "fixed",
            "times": [
                1800
            ],
            "priceDelta": 0,
            "id": "561f96e8c683b1dc7b8b456e"
        }
    ],
    "pickupGeo": {
        "lng": -114.93864297867,
        "lat": 35.998806064121
    },
    "photo": {
        "src": "/uploads/images/experiences/561f96e7c683b1fe7f8b4568/561fb367c683b1b57e8b4569.jpg",
        "type": "photo",
        "id": "561fb367c683b1b57e8b4569"
    },
    "medias": [
        {
            "src": "https://sandbox.xola.com/uploads/images/experiences/561f96e7c683b1fe7f8b4568/561fb367c683b1b57e8b4569.jpg",
            "type": "photo",
            "seq": 0,
            "id": "561fb367c683b1b57e8b4569"
        }
    ],
    "id": "561f96e7c683b1fe7f8b4568"
}

Path Params

id
string
required

Experience ID

 
Suggest Edits

Update an experience

 

Header Auth

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

var options = { method: 'PUT',
  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::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");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/: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

The Experience ID

 
Suggest Edits

Remove an experience

Deletes an experience, which prevents it from being booked. Existing bookings with the deleted experience will remain unaffected

 

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

The Experience ID

 

A media item represents photos & other images 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.

Suggest Edits

Retrieve media

Get an image for an experience

 
gethttps://sandbox.xola.com/api/experiences/id/medias/media
curl https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/medias/default
A binary file was returned

You couldn't be authenticated

HTTP/1.1 302 Found
Access-Control-Allow-Origin: *
Cache-Control: max-age=86400, public
Content-Type: text/html; charset=UTF-8
Date: Wed, 14 Dec 2016 10:54:13 GMT
Location: /uploads/images/experiences/58511cb9273554e78989a20b/585124e9629962467cb9918f.png
Server: nginx
Content-Length: 568
Connection: keep-alive

Path Params

id
string
required

The Experience ID

media
string
required

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
string

Width of the image

 

Returns

Returns an image for an experience. 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

Upload Media

Upload a photo for this experience

 

Header Auth

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

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences/id/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/id/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/id/medias?qqfile=qqfile");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/id/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

id
string
required

The Experience ID

Query Params

qqfile
string
required

The name of the file to be uploaded

 

The body of the request must contain the full raw data of the image

Suggest Edits

Update Media

Change the caption for a photo or other media item

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/:id/medias/:mediaId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/medias/57c4452ee0179846018b460a -d '{
  "caption": "Photo of a kayaking tourist"
}'
A binary file was returned

You couldn't be authenticated

Try the API to see results
 
Suggest Edits

Delete media

Remove the media item from the experience and delete it

 

Header Auth

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

var options = { method: 'DELETE',
  url: 'https://sandbox.xola.com/api/experiences/:id/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/:id/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/:id/mediaId");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/:id/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
 
Suggest Edits

Attachments

 

Attachments are non-image related files like PDFs and Word documents. These attachments are usually sent as a part of the order confirmation email when a booking is created.

Suggest Edits

Upload Attachment File

 

Header Auth

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

var options = { method: 'POST',
  url: 'https://sandbox.xola.com/api/experiences/id/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/id/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/id/attachments?qqfile=qqfile");

xhr.send(data);
import requests

url = "https://sandbox.xola.com/api/experiences/id/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

id
string
required

The Experience ID

Query Params

qqfile
string
required

The name of the file being uploaded

 
Suggest Edits

Update an attachment

Update an existing attachment to change it's title or caption

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/id/attachments/attachmentId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/attachments/58512971ec74da1bb3bbe47f -d '{
  "title": "Trip information.pdf",
  "caption": "Your PDF guide to the city!"
}'
A binary file was returned

You couldn't be authenticated

{
  "src":"/uploads/documents/experiences/58511cb9273554e78989a20b/58512971ec74da1bb3bbe47f.pdf",
  "type":"pdf",
  "title": "Trip information.pdf",
  "size":3467,
  "caption":"Your PDF guide to the city!",
  "id":"58512971ec74da1bb3bbe47f"
}

Path Params

id
string
required

The Experience ID

attachmentId
string
required

The Attachment ID

 
Suggest Edits

Remove an attachment

Remove an attachment from the experience and delete it

 

Header Auth

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

You couldn't be authenticated

{
  "id":"58512971ec74da1bb3bbe47f",
  "unlinkResult":true
}

Path Params

id
string
required

The Experience ID

attachmentId
string
required

The Attachment ID

 
 

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).

Structure

The add-on structure is very simple. It has a name, a price, a description and a visibility flag.

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

Create an Add-On

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/:id/addOns
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/addOns -d '{
  "name": "Go-Pro",
  "price": 15,
  "desc": "A camera to record your trip!",
  "visibility": "public"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "585783f8975e887144a669ba",
  "name": "Go-Pro",
  "price": 15,
  "desc": "A Go-Pro camera to record your trip!",
  "visibility": "public"
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Experience ID

Body Params

name
string
required

The name of the add-on

price
float
required

The price for the add-on (inclusive of any taxes)

desc
string
required

A 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

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/id/addOns/addOnId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/addOns/585783f8975e887144a669ba -d '{
  "desc": "A Go-Pro camera to record your trip. You get the video emailed to you"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "585783f8975e887144a669ba",
  "name": "Go-Pro",
  "price": 15,
  "desc": "A Go-Pro camera to record your trip. You get the video emailed to you",
  "visibility": "public"
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The Experience ID

addOnID
string
required

The Add-On ID

Body Params

name
string

The name of the add-on

price
float

The price for the add-on (inclusive of any taxes)

desc
string

A 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

Remove an Add-On

 

Header Auth

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

You couldn't be authenticated

 {}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Experience ID

addOnId
string
required

The Add-On ID

 
Suggest Edits

Demographics

 

These set of API end points represent demographics directly tied to a specific listing. You can modify listing specific demographics with the end points below.

To fetch a list of demographics for a single listing, just retrieve the experience directly.

Suggest Edits

Add a Demographic

Add a new demographic to an experience

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/:id/demographics
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/demographics -d '{
  "name": "Seniors",
  "description": "Over 65 years"
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/demographics -d '{
  "name": "Seniors",
  "description": "Over 65 years",
  "discount": {
    amount: 10,
    amountType: "absolute"
  }
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "5857cf82f8894e7811b7acd9",
  "name": "Seniors",
  "description": "Over 65 years",
  "discount": {
    amount: 10,
    amountType: "absolute"
  }
}
{
  "field": {
    "discount": "discount_not_supported"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}
{
  "field": {
    "name":"duplicate_demographic_code"
  }
}

Path Params

ID
string
required

The Experience ID

Body Params

name
string
required

The name of your demographic e.g. Seniors

description
string
required

A description of your demographic that will be displayed to the customer

discount
object

An object describing the discount. Must have amount & amountType keys.

 
discount.amount
float

The amount to discount

discount.amountType
string

One of absolute (flat discount) or percentage (a percentage discount)

 
Suggest Edits

Update a demographic

 

Header Auth

 Authentication is required for this endpoint.
puthttps://sandbox.xola.com/api/experiences/:id/demographic/demographicId
curl -X PUT -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/demographics/5857cf82f8894e7811b7acd9 -d '{
  "description": "Over 60 years"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "5857cf82f8894e7811b7acd9",
  "name": "Seniors",
  "description": "Over 65 years",
  "discount": {
    amount: 10,
    amountType: "absolute"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}
{
  "field": {
    "name":"duplicate_demographic_code"
  }
}

Path Params

ID
string
required

The Experience ID

demographicId
string
required

The Demographic ID

Body Params

name
string

The name of your demographic e.g. Seniors

description
string

A description of your demographic that will be displayed to the customer

discount
object

An object describing the discount. Must have amount & amountType keys.

 
discount.amount
float

The amount to discount

discount.amountType
string

One of absolute (flat discount) or percentage (a percentage discount)

 
Suggest Edits

Remove a demographic

Remove a demographic from an experience. When you remove a demographic from an experience it will no longer be shown when you create a new booking. Demographics in existing bookings are not removed.

 

Header Auth

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

You couldn't be authenticated

 {}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}
{
  "global": ["last_demographic"]
}

Path Params

ID
string
required

The Experience ID

demographicID
string
required

The Demographic ID

 
Suggest Edits

Resources

 

Resources also known as inventory items are fixed resources that can be utilized across multiple listings. You must have the inventory feature turned on for this API endpoint to work.

There are two concepts in inventory items:

  • Capacity: The capacity is how many people, seats, or units are in each piece of equipment. For example, if you have a 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.
Suggest Edits

Assign an inventory item to an experience

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/experiences/:id/resources
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/experiences/58511cb9273554e78989a20b/resources -d '{
  "resource": {
    "id": "5857dfe5b358b97f4e2a2d34"
  }
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"5857dfe5b358b97f4e2a2d34",
  "resource": {
    "id":"5857dfe5b358b97f4e2a2d34"
  }  
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}
{
  "global": ["multiple_equipment_not_allowed"]
}

Path Params

ID
string
required

The Experience ID

 

Note: You are restricted to only one inventory item per experience

Suggest Edits

Un-assign inventory item from the experience

 

Header Auth

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

You couldn't be authenticated

Try the API to see results

Path Params

ID
string
required

The Experience ID

resourceId
string
required

The Resource 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

 

Gift certificates allows customers to purchase a specific activity, or redeemable dollar amount, for their friends or family. Whenever a Gift is purchased it generates a special code, and this code can be used to pay for any new or existing booking.

Suggest Edits

List all Gifts

 

Header Auth

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

You couldn't be authenticated

{
  data: [{
    "id": "585b57a5f8894e3e31b7acdc",
    "experienceName": "Kayak the Rapids",
    "quantity": 1,
    "customerName": "Odysseus",
    "customerEmail": "odysseus@atlas.gr",
    "balance": 14,
    "recipientName": "Trojans",
    "recipientEmail": "trojans@troy.com",
    "status": 200,
    "currency": "USD",
    "guestType": "normal",
    "baseAmount": 24,
    "amount": 24,
  	"deferredIncome": 24,
  	"recognizedIncome": 0,
    "coupon": {
        "id": "585b57a9f8894e3e31b7ace1",
        "code": "329e2d"
    },
    "adjustments": [{
        "type": "payment",
        "amount": -24,
        "caption": "Payment",
        "payment": {
            "method": "cc",            
            "card": "585b57a5f8894e3e31b7acdf"
        },
        "transaction": {
            "id": "585b57a5f8894e3e31b7acde"
        },
        "audit": [],
        "meta": {
            "payment": {
                "method": "cc",                
                "card": "585b57a5f8894e3e31b7acdf"
            },
            "cardSummary": {
                "brand": "Visa",
                "last4": "4242",
                "expMonth": 1,
                "funding": "prepaid",
                "expYear": 2020,
                "id": "585b57a5f8894e3e31b7acdf",
                "name": "Odysseus Laertides"
            }
        },
        "created": "2016-12-22T04:33:45+00:00",
        "createdBy": {
            "id": "585b563af8894e8611b7acdd"
        },
        "updatedAt": "2016-12-22T04:33:45+00:00",
        "classType": "",
        "id": "585b57a5f8894e3e31b7acdd"
    }],
    "reminders": {
        "travelerTrip": 1,
        "notConfirmed": 0,
        "reviewed": 0
    },
    "source": "gift",
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "traveler": {
        "id": "585b563af8894e8611b7acdd"
    },
    "transactions": [{
        "id": "585b57a5f8894e3e31b7acde"
    }],
    "createdAt": "2016-12-22T04:33:41+00:00",
    "createdBy": {
        "id": "585b563af8894e8611b7acdd"
    },
    "updatedAt": "2016-12-22T04:33:45+00:00",    
    "type": "gift",    
    "tags": [{
        "system": true,
        "type": "gift",
        "id": "329e2d"
    }]    
	}],
  "paging": {
    next: null,
    total: 1
  }
}
	
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Query Params

seller
string
required

The Seller ID

traveler
string

The ID of the traveler associated with the gifts

search
string

Free text to search by customer name, or email

status
int32

Gift status. You can comma separate multiple statuses

createdBy
string

String ID of the user who created the Gift

createdAt
date

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: updatedAt=2015-08-01[,2015-08-30]

sort
string

Field to sort on. Prefix with a minus sign to sort descending.

limit
int32

Number of results to include in one page of data

skip
int32

Number of results to skip

 

This will return a paginated response that will contain all the purchased Gifts.

Suggest Edits

Retrieve a Gift

 

Header Auth

 Authentication is required for this endpoint.
gethttps://sandbox.xola.com/api/gifts/:id
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/gifts/585b57a5f8894e3e31b7acdc
A binary file was returned

You couldn't be authenticated

{
    "id": "585b57a5f8894e3e31b7acdc",
    "experienceName": "Kayak the Rapids",
    "quantity": 1,
    "customerName": "Odysseus",
    "customerEmail": "odysseus@atlas.gr",
    "balance": 14,
    "recipientName": "Trojans",
    "recipientEmail": "trojans@troy.com",
    "status": 200,
    "currency": "USD",
    "guestType": "normal",
    "baseAmount": 24,
    "amount": 24,
  	"deferredIncome": 24,
  	"recognizedIncome": 0,
    "coupon": {
        "id": "585b57a9f8894e3e31b7ace1",
        "code": "329e2d"
    },
    "adjustments": [{
        "type": "payment",
        "amount": -24,
        "caption": "Payment",
        "payment": {
            "method": "cc",            
            "card": "585b57a5f8894e3e31b7acdf"
        },
        "transaction": {
            "id": "585b57a5f8894e3e31b7acde"
        },
        "audit": [],
        "meta": {
            "payment": {
                "method": "cc",                
                "card": "585b57a5f8894e3e31b7acdf"
            },
            "cardSummary": {
                "brand": "Visa",
                "last4": "4242",
                "expMonth": 1,
                "funding": "prepaid",
                "expYear": 2020,
                "id": "585b57a5f8894e3e31b7acdf",
                "name": "Odysseus Laertides"
            }
        },
        "created": "2016-12-22T04:33:45+00:00",
        "createdBy": {
            "id": "585b563af8894e8611b7acdd"
        },
        "updatedAt": "2016-12-22T04:33:45+00:00",
        "classType": "",
        "id": "585b57a5f8894e3e31b7acdd"
    }],
    "reminders": {
        "travelerTrip": 1,
        "notConfirmed": 0,
        "reviewed": 0
    },
    "source": "gift",
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "traveler": {
        "id": "585b563af8894e8611b7acdd"
    },
    "transactions": [{
        "id": "585b57a5f8894e3e31b7acde"
    }],
    "createdAt": "2016-12-22T04:33:41+00:00",
    "createdBy": {
        "id": "585b563af8894e8611b7acdd"
    },
    "updatedAt": "2016-12-22T04:33:45+00:00",    
    "type": "gift",    
    "tags": [{
        "system": true,
        "type": "gift",
        "id": "329e2d"
    }]    
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Gift ID

 
Suggest Edits

Purchase a Gift

Create a new gift certificate

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/gifts
curl -X POST https://sandbox.xola.com/api/gifts -d '{
    "quantity": 1,
    "amount": 24,
    "baseAmount": 24,
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "sendTo": "recipient",
    "currency": "USD",
    "customerName": "Odysseus",
    "customerEmail": "odysseus@atlas.gr",
    "recipientName": "Trojans",
    "recipientEmail": "trojans@troy.com",
    "type": "gift",
    "adjustments": [],
    "fees": [],
    "tags": [],
    "card": {
        "name": "Odysseus Laertides",
        "number": "4242424242424242",
        "cvv": "123",
        "expiryMonth": "1",
        "expiryYear": "2020",
        "billingPostcode": "02119"
    }
}'
A binary file was returned

You couldn't be authenticated

{
    "id": "585b57a5f8894e3e31b7acdc",
    "experienceName": "Kayak the Rapids",
    "quantity": 1,
    "customerName": "Odysseus",
    "customerEmail": "odysseus@atlas.gr",
    "balance": 24,
    "recipientName": "Trojans",
    "recipientEmail": "trojans@troy.com",
    "status": 200,
    "currency": "USD",
    "guestType": "normal",
    "baseAmount": 24,
    "amount": 24,
    "coupon": {
        "id": "585b57a9f8894e3e31b7ace1",
        "code": "329e2d"
    },
    "adjustments": [{
        "type": "payment",
        "amount": -24,
        "caption": "Payment",
        "payment": {
            "method": "cc",            
            "card": "585b57a5f8894e3e31b7acdf"
        },
        "transaction": {
            "id": "585b57a5f8894e3e31b7acde"
        },
        "audit": [],
        "meta": {
            "payment": {
                "method": "cc",                
                "card": "585b57a5f8894e3e31b7acdf"
            },
            "cardSummary": {
                "brand": "Visa",
                "last4": "4242",
                "expMonth": 1,
                "funding": "prepaid",
                "expYear": 2020,
                "id": "585b57a5f8894e3e31b7acdf",
                "name": "Odysseus Laertides"
            }
        },
        "created": "2016-12-22T04:33:45+00:00",
        "createdBy": {
            "id": "585b563af8894e8611b7acdd"
        },
        "updatedAt": "2016-12-22T04:33:45+00:00",
        "classType": "",
        "id": "585b57a5f8894e3e31b7acdd"
    }],
    "reminders": {
        "travelerTrip": 1,
        "notConfirmed": 0,
        "reviewed": 0
    },
    "source": "gift",
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "traveler": {
        "id": "585b563af8894e8611b7acdd"
    },
    "transactions": [{
        "id": "585b57a5f8894e3e31b7acde"
    }],
    "createdAt": "2016-12-22T04:33:41+00:00",
    "createdBy": {
        "id": "585b563af8894e8611b7acdd"
    },
    "updatedAt": "2016-12-22T04:33:45+00:00",    
    "type": "gift",    
    "tags": [{
        "system": true,
        "type": "gift",
        "id": "329e2d"
    }]    
}
 

Confirmation Email

A confirmation email with the Gift code will be sent after the purchase is complete. The destination of the email will depend upon the sendTo field, you may choose either the customer (the person buying the gift) or the recipient (the person receiving the gift). A copy of this email will also be sent to the seller.

Suggest Edits

Add Funds

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/gifts/:id/charge
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/gifts/585b57a5f8894e3e31b7acdc/charge -d '{
  "amount": 25,
  "caption": "Added funds on-site",
  "method": "cash"
}
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/gifts/585b57a5f8894e3e31b7acdc/charge -d '{
  "amount": 25,
  "caption": "AddFund",
  "method": "cash",
  "_emailOverrides": {
    "sendEmailToTraveler": false
  },
}'
A binary file was returned

You couldn't be authenticated

{}
{
  "field": {
    "amount": "required"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Gift ID

Body Params

amount
float
required

The amount to be added

caption
string
required

The caption which will appear as a line item in the gift

method
string
required

The mode of payment

 

Once the request is successful and a HTTP 205 is returned, you should retrieve the Gift again to get an updated version for your records.

Suggest Edits

Increase Balance

Increases the balance of a gift. This adjustment does not affect the total amount paid by the purchaser of the gift. Any change made will only affect the redeemable value of the Gift Code. This action is not intended to collect any payment i.e. a purchase transaction will not be created.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/gifts/:id/increase
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/gifts/585b57a5f8894e3e31b7acdc/increase -d '{
  "amount": 10,
  "caption": "Rain check"
}'
A binary file was returned

You couldn't be authenticated

{
    "id": "585b6a9df8894ef947b7acd9",
    "type": "increase",
    "amount": 10,
    "caption": "Rain Check",
    "audit": {
        "balance": {
            "old": 24,
            "new": 34
        }
    },
    "created": "2016-12-22T05:54:37+00:00",
    "createdBy": {
        "id": "585b6acb365e01ffd7ba2160"
    },
    "updatedAt": "2016-12-22T05:54:37+00:00"
}
{
  "field": {
    "amount": "required"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Gift ID

Body Params

amount
string
required

The amount to increase

caption
string
required

The caption which will appear as a line item in the gift

 
Suggest Edits

Decrease Balance

Decreases the balance of a gift. This adjustment does not affect the total amount paid by the purchaser of the gift. Any change made will only affect the redeemable value of the Gift Code. This action is not intended to collect any payment i.e. a purchase transaction will not be created.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/gifts/:id/decrease
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/gifts/585b57a5f8894e3e31b7acdc/decrease -d '{
  "amount": 10,
  "caption": "Adjust Balance"
}'
A binary file was returned

You couldn't be authenticated

{
    "id": "585b6a9df8894ef947b7acd9",
    "type": "decrease",
    "amount": 10,
    "caption": "Adjust Balance",
    "audit": {
        "balance": {
            "old": 34,
            "new": 24
        }
    },
    "created": "2016-12-22T05:54:37+00:00",
    "createdBy": {
        "id": "585b6acb365e01ffd7ba2160"
    },
    "updatedAt": "2016-12-22T05:54:37+00:00"
}
{
  "field": {
    "amount": "required"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Gift ID

Body Params

amount
string
required

The amount to decrease

caption
string
required

The caption which will appear as a line item in the gift

 
Suggest Edits

Refund Payment

This will refund a specific amount on a gift certificate back to the customer

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/gifts/:id/refund
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/gifts/585b57a5f8894e3e31b7acdc/decrease -d '{
  "amount": 30,
  "caption": "Discount",
  "method": "cash"
}'
A binary file was returned

You couldn't be authenticated

{}
{
  "field": {
    "amount": "required"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The Gift ID

Body Params

amount
float
required

The amount to refund, may not exceed the balance of the gift

caption
string
required

The caption which will appear as a line item in the gift

method
string
required

The mode of payment

 
Suggest Edits

Introduction

 

A job is essentially any background work that Xola is doing for a particular seller. The /api/jobs endpoints will allow you to fetch all the jobs for this seller and check on their status.

A job is created when there is any change done that requires extensive processing which cannot be completed in the lifecycle of an HTTP request. For example, when a seller modifies a schedule it has the potential to affect one or more trips & the dashboard too, therefore Xola will create a job to check and update availability for all affected trips.

Status

The following statuses are available for a job:

Status
Meaning

new

The job was added to the queue but has not been picked up by a worker.

processing

The job is being processed right now.

completed

The job has finished processing and any necessary changes have been made.

error

The job failed & error'ed out.

stale

The job has been running too long and has timed out. It may or may not have finished all necessary tasks. This should rarely happen.

Suggest Edits

List all Jobs

Fetch all jobs, accessible to seller and delegated curators only

 

Header Auth

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

You couldn't be authenticated

[
  {
    "eventName": "experience.schedule.update",
    "status": "processing",
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "createdAt": "2016-12-19T14:54:48+00:00",
    "createdBy": {
        "id": "585b563af8894e8611b7acdd"
    },
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "oldSchedule": {
        "name": "Slow Season",
        "repeat": "weekly",
        "days": [6],
        "start": "2016-01-02",
        "end": "2016-02-28",
        "type": "available",
        "departure": "fixed",
        "times": [930, 1000, 1500, 1600, 1800],
        "priceDelta": 0,
        "id": "58607c81b0ee77a6d71632f6"
    },
    "newSchedule": {
        "name": "Slow Season",
        "repeat": "weekly",
        "days": [6],
        "start": "2016-01-02",
        "end": "2016-04-28",
        "type": "available",
        "departure": "fixed",
        "times": [1000, 1500, 1600, 1800, 1900, 2000],
        "priceDelta": 0,
        "id": "58607c81b0ee77a6d71632f6"
    },
    "type": "schedule",
    "id": "5857f4b8f8894ef534b7acd9"
	}, 
  {
    "eventName": "experience.schedule.create",
    "status": "completed",
    "seller": {
        "id": "584f61efcb2256a6132c6e04"
    },
    "createdAt": "2016-12-19T14:55:04+00:00",
    "createdBy": {
        "id": "585b563af8894e8611b7acdd"
    },
    "experience": {
        "id": "58511cb9273554e78989a20b"
    },
    "newSchedule": {
        "name": "Slow Season",
        "repeat": "weekly",
        "days": [6],
        "start": "2016-01-02",
        "end": "2016-02-28",
        "type": "available",
        "departure": "fixed",
        "times": [930, 1000, 1500, 1600, 1800],
        "priceDelta": 0,
        "id": "58607c81b0ee77a6d71632f6"
    },
    "type": "schedule",
    "id": "58607caeab96bc930dad9f57"
}]

Query Params

seller
string
required

The Seller ID

type
string

Job status (e.g. new, processing, error, completed)

createdBy
string

Comma-separated list of the string ID of the user(s) who created the transaction or source that created the booking (office, checkout etc)

 
Suggest Edits

Introduction

 
Suggest Edits

List supported languages

Fetch a list of languages from which a seller can pick to support his content in

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/languages
curl -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/languages
A binary file was returned

You couldn't be authenticated

[{
    "locale": "en",
    "language": "English"
}, {
    "locale": "es",
    "language": "Spanish"
}, {
    "locale": "ja",
    "language": "Japanese"
}, {
    "locale": "fr",
    "language": "French"
}]
 
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 any booking within a seller's account.

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 pending booking
  • Status >= 200 & < 300 indicates a confirmed booking
  • Status >= 300 indicates an unconfirmed booking, which are bookings that were usually cancelled or not accepted.
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

202

An accepted 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
A binary file was returned

You couldn't be authenticated

{
    "id": "5871d9499dc466302cf67d42",
    "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": []
}

Path Params

id
string
required

The order ID

 
Suggest Edits

Adjustments

 

Adjustments are one of the key pieces in an order. They are essentially an audit trail of changes made to a booking by the traveler, seller or any other authorized delegate. Adjustments serve two key purposes:

  • Redundancy check: Summing up the order's baseAmount along with the adjustment amounts will give you the final amount of the order. This formula should always be true order.baseAmount + order.addOns.amount + order.adjustments.amount = order.amount
  • Audit trail: All changes to an order are done via adjustments.

Each end point below will create an adjustment to modify the order.

Suggest Edits

Accept an Order

Accepts an order that is in a pending state. This action can only be performed by the seller or other authorized party.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/accept
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/accept -d '{
  "collectPayment": true,
  "message": "Bring an umbrella it may rain!"
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"587a1b8007876c17538b46a2",
  "type":"payment",
  "amount":-49,
  "caption":"Payment",
  "payment":{
    "method":"cc",
    "card":"587a1b3e07876cc5788b45e2"
  },
  "transaction":{
    "id":"587a1b8007876c17538b46a3"
  },
  "audit":[

  ],
  "meta":{
    "cardSummary":{
      "brand":"Visa",
      "last4":"4242",
      "expMonth":1,
      "funding":"credit",
      "expYear":2026,
      "id":"587a1b3e07876cc5788b45e2",
      "name":"Rushi"
    },
    "updates":{
      "status":{
        "old":100,
        "new":200
      }
    }
  },
  "created":"2017-01-14T12:37:21+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedAt":"2017-01-14T12:37:21+00:00"
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

id
string
required

The order ID

Body Params

collectPayment
boolean

Charge the customer's card while accepting the booking

message
string

Optional message to be conveyed to the traveler

 

If the boolean collectPayment is provided as true, this action will charge the customer's credit card that was provided during order creation. An optional message attribute can be provided with a custom message from the seller that will be included in the confirmation email that is sent.

Suggest Edits

Decline an order

Declines an order that is in a pending state

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/:id/decline
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/decline -d '{
  "message": "Sorry, we're closed tomorrow due to bad weather."
}"
A binary file was returned

You couldn't be authenticated

{
  "id":"587a1d3a07876c4e138b469a",
  "type":"modify",
  "amount":0,
  "caption":"Sorry, we're closed tomorrow due to bad weather.",
  "audit":{
    "status":{
      "old":100,
      "new":300
    }
  },
  "created":"2017-01-14T12:44:42+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedAt":"2017-01-14T12:44:42+00:00"
}

Body Params

message
string

A message to include in the email to the customer

 

This action cannot be performed on a previously accepted order. See the cancel endpoint to cancel an already accepted order.

Suggest Edits

Add an affiliate

This end point will apply an affiliate to the given order

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/addAffiliate
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/addAffiliate -d '{
  "code": "HILTON",
  "deposit": 100
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/addAffiliate -d '{
  "code": "HILTON",
  "deposit": 100,
  "voucher_code": "HLTA1234"
}'
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The order ID

Body Params

code
string
required

The affiliate code

deposit
float
required

The amount collected by the affiliate

voucher
string

The voucher code. Required if the affiliate's settings mandate a voucher

 

If affiliate is not found or if the order has a pre-applied affiliate this endpoint will throw an error. The commission and discount is calculated as per the affiliate configuration.

Suggest Edits

Remove an affiliate

Remove an affiliate from a booking.

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://sandbox.xola.com/api/orders/id/affiliate
curl -X DELETE -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/affiliate
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The order ID

 
Suggest Edits

Add a coupon

This end point will add a coupon to the given order

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/:id/addCoupon
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/addCoupon -d '{
  "coupon": {
    "code": "10off",
    "amount": -10
  }
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"587a20f007876c08698b4664",
  "type":"coupon",
  "amount": -10,
  "code":"587a20e407876c321e8b4569",
  "caption":"Coupon (10off)",
  "audit":{
    "amount":{
      "old":98,
      "new":78
    }
  },
  "meta":{
    "couponCode":"10off",
    "coupon":{
      "id":"587a20e407876c321e8b4569",
      "name":"10OFF",
      "limit":null,
      "type":"person",
      "source":"xola",
      "bookBySchedule":{
        "id":"587a20e407876c321e8b456a",
        "days":[
          0, 1, 2, 3, 4, 5, 6
        ],
        "repeat":"weekly",
        "type":"available",
        "timeRanges":[]
      },
      "arrivalSchedule":{
        "id":"587a20e407876c321e8b456b",
        "days":[
          0, 1, 2, 3, 4, 5, 6
        ],
        "repeat":"weekly",
        "type":"available",
        "timeRanges":[]
      },
      "codes":[
        {
          "code":"10off",
          "status":100,
          "uses":0,
          "id":"587a20e407876c321e8b456c"
        }
      ],
      "amount":10,
      "algorithm":"absolute"
    }
  },
  "created":"2017-01-14T13:00:32+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedAt":"2017-01-14T13:00:32+00:00"
}

Body Params

coupon
object

Details of the coupon that is being added

 
coupon.coupon_code
string
coupon.amount
float

The amount by which the discount is offered

 

If successful the API call will return an adjustment object with type coupon. However if coupon is not found or if the order has a pre-applied coupon, this endpoint will throw an error.

Suggest Edits

Change arrival date

Changes the arrival date and/or time of the order

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/arrival
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/arrival -d '{
  "arrival": "2017-02-14"
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"587a231607876c737d8b45ee",
  "type":"modify",
  "amount":0,
  "audit":{
    "arrival":{
      "old":"2017-01-26",
      "new":"2017-02-14"
    }
  },
  "created":"2017-01-14T13:09:43+00:00",
  "createdBy":{
    "id":"584f61efcb2256a6132c6e04"
  },
  "updatedAt":"2017-01-14T13:09:43+00:00"
}
{
  "field": {
    "open": 0
  }
}

Path Params

id
string
required

The order ID

Body Params

arrival
date
required

The new arrival date of the order

arrivalTime
int32

The new arrival time of the order

 
Suggest Edits

Change add-ons

Change the add-ons associated with the order. This end point will add or remove add-ons

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/changeAddOns
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/changeAddOns -d '{
  "refund":true,
  "method":"other",
  "addOns":[
    {
      "visibility":"public",
      "name":"Go Pro ",
      "price":10,
      "desc":"Capture the experience on a Go-Pro",
      "id":"587a27f407876c06718b4639",
      "quantity":1
    },
    {
      "visibility":"private",
      "name":"Photo",
      "price":5,
      "desc":"A photo to capture the moment",
      "id":"587a280207876c321e8b4570",
      "quantity":2
    }
  ]
}'
A binary file was returned

You couldn't be authenticated

{
  "id":"587a281007876c08698b466d",
  "type":"modify",
  "amount":0,
  "audit":{
    "addOns":{
      "old":[],
      "new":[
        {
          "name":"Go Pro ",
          "price":10,
          "visibility":"public",
          "quantity":1
        },
        {
          "name":"Photo",
          "price":5,
          "visibility":"private",
          "quantity":2
        }
      ]
    },
    "amount":{
      "old":78,
      "new":98
    }
  },
  "created":"2017-01-14T13:30:56+00:00",
  "updatedAt":"2017-01-14T13:30:56+00:00",
  "classType":""
}

Path Params

id
string
required

The order ID

Body Params

method
string
required

One of the defined payment methods.

addOns
array of s

An array of add-on objects

 

If an add-on is not found in the experience, it is ignored. Add-ons are matched by name. If the price attribute is not passed, priority is given to the price defined by an existing add-on in the order. If the order does not have the add-on, the price defined in the experience is considered.

Suggest Edits

Change (Switch) Experience

Changes the experience associated with an order

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/changeExperience
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/changeExperience -d '{
  "experience": "514af36ce4739f370800000b",
  "arrival": "2012-04-21",
  "arrivalTime": 1400
}'
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The order ID

Body Params

experience
string
required

The new experience ID

arrival
date

An optional new arrival date

arrivalTime
int32

An optional new arrival time

 

Refresh your order

Since this end point makes a multitude of changes, it will return an HTTP 205 response with an empty body. You should re-fetch the entire order by making an API call to /api/orders/:id end point. This will give you an update order with all of the modifications made.

Suggest Edits

Change the guest status

Mark a booking's guest status as arrived, no show or pending

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/guestStatus
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/guestStatus -d '{
  "status": "arrived"
}'
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/guestStatus -d '{
  "status": "noshow"
}'
A binary file was returned

You couldn't be authenticated

{
  "id": "5884afd1f8894e5dfa9b579c",
  "amount": 0,
  "audit": {
    "guests": {
      "new": [
        {
          "demographic": {
            "code": "adults",
            "id": "56d7797bcf8b9cde648b4585",
            "name": "Adults",
            "quantity": 1
          },
          "guestStatus": "noshow",
          "id": "587f0a84f8894ea35fb7ace7"
        }
      ],
      "old": [
        {
          "demographic": {
            "code": "adults",
            "id": "56d7797bcf8b9cde648b4585",
            "name": "Adults",
            "quantity": 1
          },
          "guestStatus": "arrived",
          "id": "587f0a84f8894ea35fb7ace7"
        }
      ]
    },
    "guestStatus": {
      "new": "noshow",
      "old": "arrived"
    }
  },
  "caption": null,
  "code": null,
  "created": "2017-01-22T13:12:49+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },  
  "type": "modify",
  "updatedAt": "2017-01-22T13:12:49+00:00"
}

Path Params

id
string
required

The order ID

Body Params

status
string
required

One of arrived, noshow or pending

 
Suggest Edits

Increase the value of an order

Inreases the value of a booking

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/:id/increase
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/increase -d '{
  "amount": 20,
  "caption": "Tip",
  "fees": false
}'
A binary file was returned

You couldn't be authenticated

{
  "amount": 20,
  "audit": {
    "amount": {
      "new": 117.83,
      "old": 97.83
    },
    "balance": {
      "new": 117.83,
      "old": 97.83
    }
  },
  "caption": "Tip",
  "created": "2017-01-22T13:23:26+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },
  "id": "5884b24ef8894ea6239b5780",
  "type": "increase",
  "updatedAt": "2017-01-22T13:23:26+00:00"
}
{
  "field": {
    "amount": "required"
  }
}
{
  "error": {
    "code":404,
    "message":"Not Found"
  }
}

Path Params

ID
string
required

The order ID

Body Params

amount
float
required

The amount to increase the order by

caption
string
required

A caption which will appear as a line item in the order

fees
boolean

Set to true to specify if fee adjustments should be created. The amount specified in the amount attribute excludes any applicable taxes & fees that are applied on top of it

 
Suggest Edits

Decrease the value of an order

Decreases the value of a booking. This action is not intended to refund any payment i.e. a refund transaction will NOT be automatically created. However, if a refund=true parameter is specified, a refund will trigger if necessary.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/decrease
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/increase -d '{
  "amount": 20,
  "caption": "Useful caption",
  "fees": false
}'
A binary file was returned

You couldn't be authenticated

{
  "amount": -20,
  "audit": {
    "amount": {
      "new": 97.83,
      "old": 117.83
    },
    "balance": {
      "new": 97.83,
      "old": 117.83,
    }
  },
  "caption": "Useful caption",
  "created": "2017-01-22T13:28:42+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },
  "id": "5884b24ef8894ea6239b5780",
  "type": "decrease",
  "updatedAt": "2017-01-22T13:28:42+00:00"
}

Path Params

id
string
required

The order ID

Body Params

amount
float
required

The amount to decrease the order. May not exceed the value of the booking

caption
string
required

A message that will appear as a line item in the order

fees
boolean

Set to true to specify if fee adjustments should be created. The amount specified in the amount attribute excludes any applicable taxes & fees that are applied on top of it

 
Suggest Edits

Refund an order

Refunds a payment on an order. To cancel an order with a refund use the /cancel end point

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/refund
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/refund -d '{
  "amount": 20,
  "caption": "Refund tip",
  "decrease": true,
  "method": "cash"
}'
A binary file was returned

You couldn't be authenticated

{
  "amount": 20,
  "audit": {
    "balance": {
      "new": 20,
      "old": 0
    }
  },
  "caption": "Refund",
  "created": "2017-01-22T13:50:42+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },
  "id": "5884b8b1f8894e03289b5781",
  "payment": {
    "method": "cash"
  },
  "transaction": {
    "id": "5884b8b1f8894e03289b5782"
  },
  "type": "refund",
  "updatedAt": "2017-01-22T13:50:42+00:00"
}

Path Params

id
string
required

The order ID

Body Params

amount
float
required

The amount to refund

decrease
boolean

Specify true if the value of the booking should also be reduced by a corresponding amount

fees
boolean

Set to true to specify if refund fee adjustments should be created. Specified amount is considered to be inclusive of refundable fees. This flag is applicable only if decrease is true

 
Suggest Edits

Cancel an order

Cancels a previously accepted order and optionally offers a refund along with the cancellation. This action can only be performed by the seller or an authorized 3rd party.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://sandbox.xola.com/api/orders/id/cancel
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/cancel
curl -X POST -H "X-API-KEY: MYAPIKEY" https://sandbox.xola.com/api/orders/58725c43272899333d128bba/cancel -d '{
  "amount": 25,
  "method": "cash"
  "decrease": true,
  "fees": false
}'
A binary file was returned

You couldn't be authenticated

{
  "amount": 0,
  "audit": {
    "status": {
      "new": 700,
      "old": 200
    }
  },
  "created": "2017-01-22T14:06:45+00:00",
  "createdBy": {
    "id": "584f61efcb2256a6132c6e04"
  },
  "id": "5884bc75f8894e31f99b5790",
  "type": "modify",
  "updatedAt": "2017-01-22T14:06:45+00:00"
}

Path Params

id
string
required

The order ID

Body Params

amount
float

The amount to refund after cancellation. Set it to 0 to offer no refund

method
string

One of the defined payment methods. This may be skipped if no refund is being offered.

decrease
boolean

Indicates whether or not to automatically create a "decrease" adjustment along with the refund. This flag is applicable only if a non-zero amount is specified and defaults to true.

fees
boolean

A flag which indicates whether or not to refund taxes/fees. Only applicable only if decrease=true

 

Pending Orders

This action cannot be performed on a pending order. See the decline endpoint to decline a pending order.

Suggest Edits

Commit an order hold

Commit an order that is in a hold status

 

Header Auth

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

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

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/orders/id/commit")

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/orders/id/commit");

xhr.send(data);
import requests

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

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 order ID

 
Suggest Edits

Release an order

Release/rollback an order that is held

 

Header Auth

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

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

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/orders/id/release")

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/orders/id/release");

xhr.send(data);
import requests

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

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 order ID

 
Suggest Edits

Guest Data

 
Suggest Edits

Add guest data

Add guest data to an order which can be anything relevant to the guests participating in the experience.

 

Header Auth

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

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

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/orders/:id/guestsData")

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/orders/:id/guestsData");

xhr.send(data);
import requests

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

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

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Guest data can be anything relevant to the guests participating in the experience. Some sellers require information like "medical conditions", or "age" to determine whether the participants are fit for the experience. You can fetch seller questions via the /api/orders/{id}/questions endpoint.

Suggest Edits

List all seller questions

Returns a list of questions to ask the consumer after an order is place

 

Header Auth

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

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

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/orders/id/questions")

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/orders/id/questions");

xhr.send(data);
import requests

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

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 order ID

 
Suggest Edits

Update a guest's data

Update a specific guest's questionnaire responses for an order

 

Header Auth

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

var