Search...
Generic filters
Exact matches only
Search in title
Search in content
Search in excerpt
Filter by Custom Post Type

Introduction

Modified August 16, 2019 | Created October 31, 2017 | Jeff Valair

Filed under API

Connect to the API

Setup

  1. Click File > Configuration > Services.
  2. Create or obtain a unique identifier to set for the Key field.
    » https://www.uuidgenerator.net/
  3. Add the following API token setup.
  4. Click OK.

Basic Request

URL
https://api.blueskybooking.com/2019-03/{Request}

JSON
{
  Key : "EB2F8AE0-6B56-4CA5-9A83-BECDCDB0702E"
}

XML
<{Request}Request xmlns="http://schemas.datacontract.org/2004/07/BlueSkyBooking.Api.BusinessModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Key>EB2F8AE0-6B56-4CA5-9A83-BECDCDB0702E</Key>
</{Request}Request>

Requests

  • 2019-03/booking
  • 2019-03/booking/update
  • 2019-03/contact/<id>
  • 2019-03/contact/create
  • 2019-03/contact/find
  • 2019-03/contact/password/reset
  • 2019-03/class
  • 2019-03/crew
  • 2019-03/equipment
  • 2019-03/fare
  • 2019-03/location
  • 2019-03/location/pairs
  • 2019-03/schedule
  • 2019-03/route
  • 2019-03/route/<id>
  • 2019-03/segment
  • 2019-03/status
  • 2019-03/tier
  • 2019-03/type

Profile (Authenticated)

  • 2019-03/profile
  • 2019-03/profile/update
  • 2019-03/profile/password

Login

URL
https://api.blueskybooking.com/token

Method
POST

Content-Type
application/x-www-form-urlencoded

Data
grant_type=password&email={email}&password={password}&key={apiKey}&method=email

Error

  • 0 = Success
  • -1 = Login (email) does not exist
  • -2 = Password is incorrect
  • -3 = Privilege (online access) not available

Example
grant_type=password&email=name@company.com&password=mysecret&key=EB2F8AE0-6B56-4CA5-9A83-BECDCDB0702E&method=email

Response
{
  "access_token": "R2LPdq4tzqlF...",
  "token_type": "bearer",
  "expires_in": 86399,
  "refresh_token": "PHCZNmnzG30mu2nz..."
}

Password Recovery

Email

1. Find all ContactId with an email address.

URL
https://api.blueskybooking.com/2019-03/contact/find

Request
{
  Key : "EB2F8AE0-6B56-4CA5-9A83-BECDCDB0702E",
  Filter : {
    Email : "name@company.com"
  }
}

Response
{
  "contacts": [
    2343,
    529,
    44329,
  ],
  "resultCode": "success"
}

2. Loop through each of the returned ContactId, notify each of the password recovery.

URL
https://api.blueskybooking.com/2019-03/contact/password/reset

Request
{
  Key : "0EA8AA5F-6B0D-480E-83D3-06C77AF7385A",
  ContactId : 2343
}

Response
{
  "resultCode": "success"
}

Profile

Create a new profile.  Existing email address is allowed.

URL
https://api.blueskybooking.com/2019-03/contact/create

Request
{
  Key : "0EA8AA5F-6B0D-480E-83D3-06C77AF7385A",
  "profile": {
    "first": "First",
    "last": "Last",
    "email": "email@company.com",
    "gender": "Male",
    "weight": 200.0,
    "locks": 1,
    "password": "my$ecretpw",
    "home": {
      "address": "1234 Main Street",
      "city": "Vancouver",
      "state": "BC",
      "country": "Canada",
      "zip": "X1X 1X2",
      "phone": "604-123-1234",
      "fax": "",
      "mobile": "",
      "webSite": null
    },
    "business": {
      "address": "",
      "city": "",
      "state": "",
      "country": "",
      "zip": "",
      "phone": "",
      "fax": "",
      "mobile": "",
      "webSite": null
    }
  }
}

Response
{
  "profile": {
  "contactId": 2533205,
  "first": "First",
  "last": "Last",
  "email": "email@company.com",
  "password": "my$ecretpw",
  "gender": "Male",
  "weight": 200.0,
  "locks": 1,
  "home": {
    "address": "1234 Main Street",
    "city": "Vancouver",
    "state": "BC",
    "country": "Canada",
    "zip": "X1X 1X2",
    "phone": "604-123-1234",
    "fax": "",
    "mobile": "",
    "webSite": null
  },
  "business": {
    "address": "",
    "city": "",
    "state": "",
    "country": "",
    "zip": "",
    "phone": "",
    "fax": "",
    "mobile": "",
    "webSite": null
  },
  "shipping": {
    "address": null,
    "city": null,
    "state": null,
    "country": null,
    "zip": null,
    "phone": null,
    "fax": null,
    "mobile": null,
    "webSite": null
  }
},
  "resultCode": "success"
}

Error

  • 0 = Success
  • -1 = Missing name (First, Last or Company)
  • -2 = Missing email (or mismatch email list)
  • -3 = Missing password

Type: Locks (seats) and Weight

To set the locks and weight in the contact/update, use the /type endpoint and extract all genders that are web active.

URL
https://api.blueskybooking.com/2019-03/type

Request
{
  Key : "0EA8AA5F-6B0D-480E-83D3-06C77AF7385A"
}

Filter results by:
{
  "typeList": [
  {
    "web": {
      "active": true
    }
  }
}

Create a booking

Step 1: Search Critera

URL (Required)
https://api.blueskybooking.com/2019-03/location
https://api.blueskybooking.com/2019-03/location/pairs
https://api.blueskybooking.com/2019-03/type

URL (Optional)
https://api.blueskybooking.com/2019-03/classes
https://api.blueskybooking.com/2019-03/tiers
https://api.blueskybooking.com/2019-03/segments

Step 2: Search Results

URL
https://api.blueskybooking.com/2019-03/route

Request
{
  Key : "0EA8AA5F-6B0D-480E-83D3-06C77AF7385A",
  Filter : {
    DateStart : "2019-03-20 00:00:00",
    DateEnd: "2019-03-20 23:59:59",
    TimeStart: 0,
    TimeEnd: 1440,
    DepartureLocationId: 3,
    ArrivalLocationId: 32,
    ClassId: [1],
    FareId: [0,1,2],
    Booking: [0,1,2],
   Web: [1,2]
  }
}

Required

  • DateStart
  • DateEnd
  • TimeStart
  • TimeEnd
  • DepartureLocationId
  • ArrivalLocsationId

Booking, Web

  • 0 = Closed
  • 1 = View Only
  • 2 = Open

Step 3: Create Booking

[Under construction]

logo
Bitnami