NAV
shell javascript

Introduction

Welcome to the Visit Galaxy API Reference for the legacy V3 version. If you don’t have an API key, get in touch with us.

The API gives you access to some of the citybreak functionaility, enabling you to search for products, get content, search availability and use shopping baskets for booking and generating pay-later invoices.

This documentation is too long? You can check out the Swagger UI https://galaxy.test.citybreak.com/v3/. It targets test data and you can request a test API key for internal products that you can make bookings and do availability searches for. Give it a try and come back later.

The live Galaxy API endpoint is accessible at https://galaxy.citybreak.com/v3/

Point of Sales

A point of sales is concept widely used in the Citybreak system, implementation will guide you about which one you should use. The following settings can be configured per point of sales:

If you wish different combination of those settings for different purposes, you most likely would like to use more than 1 point of sales. Talk to our implementation team help.citybreak.com, they know all there is to know on the subject.

Example Workflow

This section will provide a very basic example workflow for booking a hotel room for one adult and one child that encompasses creating a basket, searching for availability, adding items and customer information, committing then checking the reservation and, finally, cancelling it. For each step, see to the right of the page for prototype calls using cURL or simple Javascript calls as well as example responses. Each of these calls (not counting the API keys and specific parameters that you will need to plug in) are the minimum requirements for a successful response.

Choose a Point of Sale Choose a currency Search availability Create basket Add booking item Add customer info Commit Basket Get Status Review reservation Cancel Reservation

Get Point of Sale

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/pointofsales'

var r = fetch("https://galaxy.citybreak.com/v3/api/pointofsales",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
  {
    "Id": 1234561,
    "Name": "Online"
  },
  {
    "Id": 1234562,
    "Name": "online viktors hotell 3"
  },
  {
    "Id": 1234565,
    "Name": "callcenter test"
  },
  {
    "Id": 1234569,
    "Name": "Veras Call Center"
  },
  {
    "Id": 1234570,
    "Name": "Test salespoint Distribution API"
  }
]

The first step is to obtain a valid Point of Sale Identifier. This is needed for many of the following operations and defines the products available for search as well as many of the settings important for creating a booking, such as rate codes availability periods, etc. We will go with the “Test salespoint Distribution API” Point of Sale - 1234570

HTTP Request

GET https://galaxy.citybreak.com/v3/api/pointofsales

Choose A Currency

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/pointofsales/currencies/1234570'
var r = fetch("https://galaxy.citybreak.com/v3/api/pointofsales/currencies/1234570",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

[
  "DKK",
  "SEK",
  "NOK",
  "EUR"
]

Once we have a Point of Sale we need to choose a Currency. Rates for hotel room products in the Availability Search are shown in whatever currency you choose but certain hotels do not have products for sale in all currencies so your results may be filtered depending on the currency you choose. We will choose Swedish Kronor - SEK.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/pointofsales/currencies/1234570

Create A Basket

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' -d '{
  "PointOfSalesId": 1234570,
  "Currency": "SEK"
}' 'https://galaxy.citybreak.com/v3/api/basket/create'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/create",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  },
  body: JSON.Stringify({
	"PointOfSalesId": 1234570,
	"Currency": "SEK"
  })
});

Example of response:

{
  "BasketId": 87654321,
  "Success": true
}

For all booking operations you will need a Shopping Basket. This entity will be the reference for all information related to a booking, right up until the time the customer decides to commit to the booking and has provided all the necessary information. It is therefore very important to hold a reference to the BasketId, in this case - 87654321

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/create

Search Availability

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' -d '{
   "PointOfSalesId": 1234570,
   "Arrival": "2017-10-14T12:27:58.851Z",
   "Departure": "2017-10-15T12:27:58.851Z",
   "Currency": "SEK",
   "PageSize": 20,
   "Page": 0,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         1
       ] 
     }
   ]
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "PointOfSalesId": 1234570,
    "Arrival": "2017-10-14T12:27:58.851Z",
    "Departure": "2017-10-15T12:27:58.851Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 0,
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          1
        ]
      }
	  ]
	})
});

Example of response:

{
  "AccommodationSearch": {
    "PointOfSalesId": 1234570,
    "Arrival": "2017-10-14T00:00:00Z",
    "Departure": "2017-10-15T00:00:00Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 0,
    "Sort": {
      "Order": 0,
      "Field": "Price"
    },
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          1
        ]
      }
    ],
    "ContentFilter": null,
    "OutputFilter": null
  },
  "Accommodations": [
    {
      "Id": 1136433,
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1010101010",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1010101010",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "The absolute Leading e-commerce platform for the DMO and individual hotels in the Nordics!"
          },
          {
            "Id": 100038,
            "Name": "Elevator",
            "Value": "False"
          },
          {
            "Id": 100163,
            "Name": "Reception",
            "Value": "False"
          }
        ],
        "Categories": null,
        "Geos": [],
        "Pois": [],
        "Position": null
      },
      "Placements": [
        {
          "Price": {
            "Price": 450,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum med extra säng",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum med extra säng"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  1
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 300,
                  "ChildPrice": 150,
                  "TotalPrice": 450,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "18-A"
        },
        {
          "Price": {
            "Price": 500,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [
                {
                  "Name": "Trädgårdstomte",
                  "Content": {
                    "PriceFrom": null,
                    "Images": [],
                    "Information": [
                      {
                        "Id": 99,
                        "Name": "Name",
                        "Value": "Trädgårdstomte"
                      }
                    ],
                    "Categories": null,
                    "Geos": null,
                    "Pois": null,
                    "Position": null
                  },
                  "Price": 150,
                  "Amount": 1,
                  "Currency": "SEK",
                  "PriceIncluded": false,
                  "IsExtraBed": false,
                  "PayOnSite": false
                }
              ],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  1
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 250,
                  "ChildPrice": 100,
                  "TotalPrice": 350,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "19-A"
        }
      ],
      "TotalResults": 2
    }
  ],
  "SearchId": "899fe054-3bb4-4ff8-b577-ba716b0b3317",
  "ExpirationDate": "2017-09-15T09:15:46.0619347Z",
  "TotalResults": 1
}

At a minimum, an Availability Search requires the PointOfSalesId we obtained earlier (1234570) and the Currency (“SEK”) as well as the Arrival and Departure dates we want to search for, the PersonConfigurations - i.e. the number of rooms or cabins (each item in the list represents a “room”) and the guest make up, both Adult and Child (a list of ages for each child) for each room - and the “PageSize” of the result you want. If there are 50 results and you want to have 20 products at a time, you can check the total number products in the first response at Page 0 and repeat the request incrementing the Page as necessary.

The information above is one of the most complex and probably the most important parts of the Galaxy API. It returns a list of “Accommodations”, which in this case for Citybreak are Hotel Properties (or Bed & Breakfasts, Apartments, etc), within which is a list of “Placements” which are Hotel Rooms (or Beds or Apartments, etc. depending on the property. These may also come with compulsory Add-ons (also known as sub-products) like breakfast included or champagne on arrival.

Each Accommodation object will also have content information about the property, that can also be found in an Accommodation Search, and how many room types (Placements) are available.

The placement objects represent the products that will actually be booked. As such they have a lot of the important information a customer might want to see, they contain a “Price” that represents total spend as well as a “PricePeriods” list that breaks the cost dow for example. Other useful information might be included in the content info or the room configuration/occupancy allowances, etc. The most important information for the booking process however is the BookingKey. There is one per Placement and is used to add a product to a Basket.

Also required is the SearchId that represents your search. The object represented by this unique id will hold references to all the products that were returned in the Accommodation Search. Also keep note of the ExpirationDate of the search as the reference will be invalid after this timestamp is passed.

For this example we will use the double room at BookVisit Hotel with a handy Garden Gnome included:

BookingKey = 19-A SearchId = 899fe054-3bb4-4ff8-b577-ba716b0b3317

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation

Add A Booking Item

curl -X PUT 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/basket/add/accommodation/87654321/899fe054-3bb4-4ff8-b577-ba716b0b3317/19-A'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/add/accommodation/87654321/899fe054-3bb4-4ff8-b577-ba716b0b3317/19-A",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
  }  
});

Example of response:

true

Taking the BasketId: 87654321 of the basket we created earlier, the SearchId: 899fe054-3bb4-4ff8-b577-ba716b0b3317 from the availability search and the BookingCode: 19-A of the product we selected, we can now add a product to our Basket.

PUT https://galaxy.citybreak.com/v3/api/basket/add/accommodation/87654321/899fe054-3bb4-4ff8-b577-ba716b0b3317/19-A"

Add Customer Info

curl -X POST 
--header 'Content-Type: application/json' 
--header 'apiKey: APIKEY132456789EWOK' -d '{
   "NameFirst": "Test",
   "NameLast": "User",
   "Salutation": "Ms",
   "CustomerType": "Private",
   "Culture": "en-US",
   "Address": { 
     "StreetAddress1": "Test Road 123",
     "PostalCode": "41111",
     "City": "Gothenburg",
     "CountryCode": "SE"
   },
   "Email": "testuser%40visit.com",
   "PhoneMobile": { 
     "CountryCode": "46",
     "AreaCode": "07",
     "Number": "2222222"
   }
 }' 'https://galaxy.citybreak.com/v3/api/basket/customer/87654321'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/customer/87654321",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
  }  
  body: JSON.Stringify({
    "NameFirst": "Test",
    "NameLast": "User",
    "Salutation": "Ms",
    "CustomerType": "Private",
    "Culture": "en-US",
    "Address": {
      "StreetAddress1": "Test Road 123",
      "PostalCode": "41111",
      "City": "Gothenburg",
      "CountryCode": "SE"
    },
    "Email": "testuser@visit.com",
    "PhoneMobile": {
      "CountryCode": "46",
      "AreaCode": "07",
      "Number": "2222222"
    }
  }
}
});

Example of response: no content

To commit a Basket we will need to provide Customer Information using our BasketId: 87654321. In the example, we have created Ms. Test User and will POST her data which will attach it to the basket. You will only receive a status code of 204 to indicate success. The basket now has the bare minimum required to commit it.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/customer/87654321"

Commit A Basket

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/basket/commit/87654321'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/commit/87654321",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
  }  
});

Example of response: an integer representing the CommitJobId

98761234

Once you have all the information in the basket, you can Commit it. This will start the process of finalising bookings and generating the necessary financial information. You only need to provide the Basket Id for this call. The whole commit process is a two step one. First, in this call, we will use a POST call and the BasketId: 87654321 to trigger the Basket commit job. What you get in return is the CommitJobId, you should use it with Commit Status to get the status of the job. Our CommitJobId is 98761234.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/commit/87654321

Get The Commit Job Status

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/basket/commit/status/98761234'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/commit/status/98761234",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{
  "Status": "CompletedOk",
  "Subtasks": [
    {
      "Task": "StartingCommit",
      "Status": "CompletedOk",
      "ExtraInfo": null
    },
    {
      "Task": "CreatingConfirmations",
      "Status": "CompletedOk",
      "ExtraInfo": null
    },
    {
      "Task": "CreditCardAction",
      "Status": "CompletedOk",
      "ExtraInfo": null
    },
    {
      "Task": "CreatingInvoices",
      "Status": "NotStarted",
      "ExtraInfo": null
    },
    {
      "Task": "CreatingStatistics",
      "Status": "NotStarted",
      "ExtraInfo": null
    },
    {
      "Task": "FinishingTransaction",
      "Status": "CompletedOk",
      "ExtraInfo": null
    }
  ],
  "ResvVersionId": 12349876,
  "BookingCode": "EWOK12"
}

Once the basket has been ordered to be Committed, in order to get information about the booking you will need to use the CommitJobId: 98761234 to query the Commit Status of the job. As you can see in the example return, there are a number of different tasks that run as a part of a commit job. All of these are running in the back ground. Continue polling /basket/commit/status/{id} until you get either CompletedOk ok Failed as status. Both of them are final statuses. If you get Ok your reservation is confirmed and you have the booking code in the result. If you get Fail you will be provided with some detailes what went wrong. Like if you failed to confirm the reservation in a sub system or you havent provided enough information.

The other important information returned by the status is the ResvVersionId (reservation version id), for us: 12349876 and the BookingCode, for us: EWOK12, which are used to obtain information about the Reservation

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/commit/status/98761234

Review A Reservation

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/latest/EWOK12'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/latest/EWOK12",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{
  "BookingCode": "EWOK12",
  "Version": 1,
  "BookingDate": "2017-09-27T13:12:54.1938577Z",
  "AutoCancellation": "9999-12-31T23:59:59.9999999",
  "Fees": [],
  "BookingUser": {
    "Id": 113685,
    "NameFirst": "Galaxy",
    "NameLast": "Api user",
    "Email": null
  },
  "CancellationMessage": null,
  "LastCancellation": "2017-10-27T15:48:06.009Z",
  "Customer": {
    "NameFirst": "Test",
    "NameLast": "User",
    "Salutation": Ms,
    "CustomerNumber": null,
    "CustomerType": 0,
    "Culture": null,
    "CivicRegistrationNumber": null,
    "Company": null,
    "CompanyDepartment": null,
    "Address": {
      "StreetAddress1": "Test Road 123",
      "StreetAddress2": null,
      "StreetAddress3": null,
      "PostalCode": "41111",
      "City": "Gothenburg",
      "CountryCode": "SE",
      "State": null
    },
    "Email": null,
    "PhoneHome": {
      "CountryCode": null,
      "AreaCode": null,
      "Number": null
    },
    "PhoneWork": {
      "CountryCode": null,
      "AreaCode": null,
      "Number": null
    },
    "PhoneMobile": {
      "CountryCode": "46",
      "AreaCode": "07",
      "Number": "2222222"
    }
  },
  "ProductGroups": [
    {
      "Products": [
        {
          "Id": 3,
          "Name": "Dubbelrum",
          "Price": 350
        }
      ],
      "Id": 153663,
      "Name": "BookVisit Hotel"
    }
  ]
}

There are two ways to return information about a reservation, either by the Version of the Reservation, using the BookingCode and ResVersionId or by the latest version as we have done here where we just require our BookingCode: EWOK12. It displays limited information about the booked products, the customer and some meta information about the booking itself. The user should retain a reference to the BookingCode so that they are able to reference their reservation

HTTP Request

GET https://galaxy.citybreak.com/v3/api/reservation/latest/EWOK12

Cancel A Reservation

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/cancel/info/EWOK12'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/cancel/info/EWOK12",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{
  "BookingCode": "EWOK12",
  "NoProducts": 1,
  "ReservationVersionId": 12349876,
  "LastCancellationDate": "9999-12-31T23:59:59.9999999"
}

Finally, lets cancel our reservation. Cancelling policies can vary for products and so it is worth noting here that the only guaranteed cancellation that of the reservation. There might be part or full payments due depending on policies, cancellation insurance and other factors, that can differ product to product. To cancel, we once again just require our BookingCode: EWOK12 and with a GET query we will close out our reservation and end the example workflow.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/reservation/cancel/info/EWOK12

Point of Sale

Points of Sale are the distribution channels controlled by an Citybreak Organisation. An API key may give access to multiple Points of Sale, each with it’s own rate and currency information and selection of available products. Having a valid Point of Sale Id is important for most other queries in the API

All GET operations

Point Of Sales

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/pointofsales'

var r = fetch("https://galaxy.citybreak.com/v3/api/pointofsales",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
  {
    "Id": 1,
    "Name": "Online"
  },
  {
    "Id": 2,
    "Name": "online viktors hotell 3"
  },
  {
    "Id": 5,
    "Name": "callcenter test"
  },
  {
    "Id": 9,
    "Name": "Veras Call Center"
  }
]

Get the points of sale available to the current API Key.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/pointofsales

Currencies

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/pointofsales/currencies/{pointOfSaleId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/pointofsales/currencies/{pointOfSaleId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

[
  "DKK",
  "SEK",
  "NOK",
  "EUR"
]

Get currencies available for a given Point of Sale. Availability searches will require a currency for a valid search.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/pointofsales/currencies

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.

Accommodation

Accommodation operations provide information on Accommodation products available in a point of sale. No availability information is included here, it is primarily content (images, position, categories, etc).

All GET operations

Accommodation

curl -X GET 
  --header 'ApiKey: APIKEY132456789EWOK'
  --header 'Accept: application/json' 
  --header 'Accept-Language: en-US'
  'https://galaxy.citybreak.com/v3/api/accommodation/{pointOfSaleId}/20/0'
var r = fetch("https://galaxy.citybreak.com/v3/api/accommodation/{pointOfSaleId}/20/0",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Page": 0,
  "PageSize": 20,
  "TotalResults": 1,
  "Items": [
    {
      "Id": "cbis:12345",
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=4136104",
            "IsMain": true,
            "Name": null,
            "Copyright": "",
            "Description": null
          },
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
        ],
        "Categories": null,
        "Geos": [
          {
            "Id": 69962,
            "Path": null
          },
        ],
        "Pois": [],
        "Position": {
          "Latitude": 57.7039005352791,
          "Longitude": 11.9626625079345
        }
      },
      "Children": [
        {
          "Id": "pt:355468",
          "Name": "BookVisit Hotel BookVisit",
          "Content": {
            "PriceFrom": null,
            "Images": null,
            "Information": null,
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          }
        }
      ]
    }
  ]
}

Get details about Accommodation

HTTP Request

GET https://galaxy.citybreak.com/v3/api/accommodation/view/{pointOfSalesId}/{productId}

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.
pageSize Size of the page.
page The page.

Product

curl -X GET 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/accommodation/{pointOfSalesId}/{pageSize}/{page}'
var r = fetch("https://galaxy.citybreak.com/v3/api/accommodation/view/{pointOfSaleId}/{productId}'",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Id": "cbis:12345",
  "Name": "BookVisit Hotel",
  "Content": {
    "PriceFrom": 0,
    "Images": [
      {
        "Uri": "//images.citybreak.com/image.aspx?ImageId=4136104",
        "IsMain": true,
        "Name": null,
        "Copyright": "",
        "Description": null
      },
    ],
    "Information": [
      {
        "Id": 99,
        "Name": "Name",
        "Value": "BookVisit Hotel"
      },
      {
        "Id": 101,
        "Name": "Introduction",
        "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
      },
    ],
    "Categories": null,
    "Geos": [
      {
        "Id": 69962,
        "Path": null
      },
    ],
    "Pois": [],
    "Position": {
      "Latitude": 57.7039005352791,
      "Longitude": 11.9626625079345
    }
  },
  "Children": [
    {
      "Id": "pt:542664"
      "Name": "BookVisit Hotel BookVisit",
      "Content": {
        "PriceFrom": null,
        "Images": null,
        "Information": null,
        "Categories": null,
        "Geos": null,
        "Pois": null,
        "Position": null
      }
    }
  ]
}

Get details and content about a specific Citybreak product, the requests requires that you have both a Point of Sale Id and a valid Product Id

HTTP Request

GET https://galaxy.citybreak.com/v3/api/accommodation/view/{pointOfSalesId}/{productId}

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.
productId The Id of the product you wish to retrieve.

Activity

Activity operations provide information on Activity products available in a point of sale. No availability information is included here, it is primarily content (images, position, categories, etc).

All GET operations

Activity

curl -X GET 
  --header 'ApiKey: APIKEY132456789EWOK'
  --header 'Accept: application/json' 
  --header 'Accept-Language: en-US'
  'https://galaxy.citybreak.com/v3/api/activity/{pointOfSaleId}/20/0'
var r = fetch("https://galaxy.citybreak.com/v3/api/activity/{pointOfSaleId}/20/0",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Page": 0,
  "PageSize": 20,
  "TotalResults": 25,
  "Items": [
    {
      "Id": "cbis:1324320",
      "Name": "Valley stars 7-9 years",
      "Content": {
        "PriceFrom": 1280,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=5039905",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 141,
            "Name": "Prices from",
            "Value": "1280"
          },
          {
            "Id": 99,
            "Name": "Name",
            "Value": "Valley stars 7-9 years"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Grouplessons for Valley stars 7-9 years, beginner level"
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "Beginner lessons where will learn skiing, stop and turn through fun activities. We will begin to handle the lifts. \r\n\r\nMust know: Nothing."
          }
        ],
        "Categories": null,
        "Geos": [
          {
            "Id": 105257,
            "Path": "[ALPINCO Hafjell och Kvitfjell]"
          },
          {
            "Id": 105629,
            "Path": "Hafjell & Kvitfjell"
          },
          {
            "Id": 105260,
            "Path": "Hafjell"
          }
        ],
        "Pois": [],
        "Position": {
          "Latitude": 61.2340708391529,
          "Longitude": 10.4462814331055
        }
      },
      "Occasions": [
        {
          "Start": "2017-12-18T00:00:00Z",
          "End": "2017-12-18T00:00:00Z",
          "Arena": null
        },
        {
          "Start": "2017-12-18T00:00:00Z",
          "End": "2017-12-18T00:00:00Z",
          "Arena": null
        },
        {
          "Start": "2017-12-18T00:00:00Z",
          "End": "2017-12-18T00:00:00Z",
          "Arena": null
        }
      ],
      "Children": []
    }
  ]
}   

Get details about Activity

HTTP Request

GET https://galaxy.citybreak.com/v3/api/activity/{pointOfSalesId}/{pageSize}/{page}

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.
pageSize Size of the page.
page The page.

Product

curl -X GET 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/activity/view/{pointOfSaleId}/{productId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/activity/view/{pointOfSaleId}/{productId}'",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Id": "cbis:1324320",
  "Name": "Valley stars 7-9 years",
  "Content": {
    "PriceFrom": 1280,
    "Images": [
      {
        "Uri": "//images.citybreak.com/image.aspx?ImageId=5039905",
        "IsMain": false,
        "Name": null,
        "Copyright": null,
        "Description": null
      }
    ],
    "Information": [
      {
        "Id": 141,
        "Name": "Prices from",
        "Value": "1280"
      },
      {
        "Id": 99,
        "Name": "Name",
        "Value": "Valley stars 7-9 years"
      },
      {
        "Id": 101,
        "Name": "Introduction",
        "Value": "Grouplessons for Valley stars 7-9 years, beginner level"
      },
      {
        "Id": 102,
        "Name": "Description",
        "Value": "Beginner lessons where will learn skiing, stop and turn through fun activities. We will begin to handle the lifts. \r\n\r\nMust know: Nothing."
      }
    ],
    "Categories": null,
    "Geos": [
      {
        "Id": 105257,
        "Path": "[ALPINCO Hafjell och Kvitfjell]"
      },
      {
        "Id": 105629,
        "Path": "Hafjell & Kvitfjell"
      },
      {
        "Id": 105260,
        "Path": "Hafjell"
      }
    ],
    "Pois": [],
    "Position": {
      "Latitude": 61.2340708391529,
      "Longitude": 10.4462814331055
    }
  },
  "Occasions": [
    {
      "Start": "2017-12-18T00:00:00Z",
      "End": "2017-12-18T00:00:00Z",
      "Arena": null
    },
    {
      "Start": "2017-12-18T00:00:00Z",
      "End": "2017-12-18T00:00:00Z",
      "Arena": null
    },
    {
      "Start": "2017-12-18T00:00:00Z",
      "End": "2017-12-18T00:00:00Z",
      "Arena": null
    }
  ],
  "Children": []
}

Get details and content about a specific Citybreak product, the requests requires that you have both a Point of Sale Id and a valid Product Id

HTTP Request

GET https://galaxy.citybreak.com/v3/api/activity/view/{pointOfSalesId}/{productId}

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.
productId The Id of the product you wish to retrieve.

Availability - Accommodation

Availability - Accommodation calls provide information about the availability of any type of accommodation products. Both searches (normal and fuzzy) will return products with availability, including content, pricing groups with room information (Placements) and subproduct information (such as breakfasts or tickets to nearby attractions), as well as a Search ID with its Expiry.

The SearchId can be used to retrieve prior, cached searches in a much shorter amount of time for both Accommodation Search and Cabin Scan if used before its Expiry. The object recalled by the search contains all the unfiltered information retrieved in the first search, so further or different filtering on content, etc. can be done in this call.

The SearchId and the BookingKey of each room product are used in the basket operations to add the product found to the Basket

GET and POST operations

Accommodation

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Arrival": "2017-10-14",
   "Departure": "2017-10-15",
   "Currency": "SEK",
   "PageSize": 20,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         0
       ] 
     }
   ]
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ]
	})  
});

Example of response:

{
  "AccommodationSearch": {
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14T00:00:00Z",
    "Departure": "2017-10-15T00:00:00Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 0,
    "Sort": {
      "Order": 0,
      "Field": "Price"
    },
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ]
      }
    ],
    "ContentFilter": null,
    "OutputFilter": null
  },
  "Accommodations": [
    {
      "Id": "cbis:12345",
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=10101010",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1010101010",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "The absolute Leading e-commerce platform for the DMO and individual hotels in the Nordics!"
          },
          {
            "Id": 100038,
            "Name": "Elevator",
            "Value": "False"
          },
          {
            "Id": 100163,
            "Name": "Reception",
            "Value": "False"
          }
        ],
        "Categories": null,
        "Geos": [],
        "Pois": [],
        "Position": null
      },
      "Placements": [
        {
          "Price": {
            "Price": 450,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum med extra säng",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum med extra säng"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  0
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 300,
                  "ChildPrice": 150,
                  "TotalPrice": 450,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "18-A"
        },
        {
          "Price": {
            "Price": 500,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [
                {
                  "Name": "Trädgårdstomte",
                  "Content": {
                    "PriceFrom": null,
                    "Images": [],
                    "Information": [
                      {
                        "Id": 99,
                        "Name": "Name",
                        "Value": "Trädgårdstomte"
                      }
                    ],
                    "Categories": null,
                    "Geos": null,
                    "Pois": null,
                    "Position": null
                  },
                  "Price": 150,
                  "Amount": 1,
                  "Currency": "SEK",
                  "PriceIncluded": false,
                  "IsExtraBed": false,
                  "PayOnSite": false
                }
              ],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  0
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 250,
                  "ChildPrice": 100,
                  "TotalPrice": 350,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "19-A"
        }
      ],
      "TotalResults": 2
    }
  ],
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh",
  "ExpirationDate": "2017-09-15T09:15:46.0619347Z",
  "TotalResults": 1
}

This is a POST request that requires a filter with some mandatory properties, such as arrival and departure dates. The filter can also include content filtering, such as only including those hotels associated with a particular CBIS category or that have 24 hr reception. Content filtering possibilities can be found in the Content Section You can see a bare minimum version of this search in the examples. The Most important return values in this response are the SearchId and the BookingKey used in the Basket, also pay attention to the ExpirationDate of the SearchId

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Arrival": "2018-11-23T15:23:15.087Z", //DateTime - Mandatory "Departure": "2018-11-23T15:23:15.088Z", //DateTime - Mandatory "Currency": "string", //string - Mandatory e.g SEK or EUR "PageSize": 0, //int Mandatory "Sort": { // Optional - defaults to Price Ascending "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Random }, //List of configurations for guest numbers. Each item represents a "room". //Cannot be empty, must represent at least one guest "PersonConfigurations": [ { "Adults": 0, //int - represents number of adults "ChildrenAges": [ //List of ints - each int represents the age of a child guest 0 ] } ], "ContentFilter": { // Optional - See ContentFilter }, "OutputFilter": { // Optional - See OutputFilter } }

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "Page": 1,
  "PageSize": 20,
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh"
}' 'https://galaxy.citybreak.com/v3/api/availability/accommodation/get'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/get",
{
	method: "POST",
	headers: {
	   "ApiKey:" "APIKEY132456789EWOK",
	   "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "Page": 1,
    "PageSize": 20,
    "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh"
  })  
});

Example of response:

{
  "AccommodationSearch": {
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14T00:00:00Z",
    "Departure": "2017-10-15T00:00:00Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 1,
    "Sort": {
      "Order": 0,
      "Field": "Price"
    },
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ]
      }
    ],
    "ContentFilter": null,
    "OutputFilter": null
  },
  "Accommodations": [
    {
      "Id": "cbis:12345",
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=10101010",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=10101010",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "The absolute Leading e-commerce platform for the DMO and individual hotels in the Nordics!"
          },
          {
            "Id": 100038,
            "Name": "Elevator",
            "Value": "False"
          },
          {
            "Id": 100163,
            "Name": "Reception",
            "Value": "False"
          }
        ],
        "Categories": null,
        "Geos": [],
        "Pois": [],
        "Position": null
      },
      "Placements": [
        {
          "Price": {
            "Price": 450,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum med extra säng",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum med extra säng"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  1
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 300,
                  "ChildPrice": 150,
                  "TotalPrice": 450,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "18-A"
        },
        {
          "Price": {
            "Price": 500,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [
                {
                  "Name": "Trädgårdstomte",
                  "Content": {
                    "PriceFrom": null,
                    "Images": [],
                    "Information": [
                      {
                        "Id": 99,
                        "Name": "Name",
                        "Value": "Trädgårdstomte"
                      }
                    ],
                    "Categories": null,
                    "Geos": null,
                    "Pois": null,
                    "Position": null
                  },
                  "Price": 150,
                  "Amount": 1,
                  "Currency": "SEK",
                  "PriceIncluded": false,
                  "IsExtraBed": false,
                  "PayOnSite": false
                }
              ],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  1
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 250,
                  "ChildPrice": 100,
                  "TotalPrice": 350,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "19-A"
        }
      ],
      "TotalResults": 2
    }
  ],
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh",
  "ExpirationDate": "2017-09-15T09:15:46.0619347Z",
  "TotalResults": 1
}

This is a POST request that requires a filter with a valid (non-expired) SearchId. The filter otherwise has the same constraints as in the original Accommodation availability search. You can see a bare minimum version of this search in the examples.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation/get

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "Page":1, //int mandatory - the pager is 0-indexed so 1 is the second page "PageSize": 0, //int Mandatory "Sort": { // Optional "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Random }, //string - Mandatory - the search Id of a still valid accommodation availability search "SearchId":"string", "OutputFilter": { // Optional - See OutputFilter } }

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "PointOfSalesId": 0,
  "Start": "2018-11-09",
  "End": "2018-11-13",
  "Currency": "SEK"
}' 'https://galaxy.citybreak.com/v3/api/availability/accommodation/calendar'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/calendar",
{
	method: "POST",
	headers: {
	   "ApiKey:" "APIKEY132456789EWOK",
	   "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "PointOfSalesId": 0,
    "Start": "2018-11-09",
    "End": "2018-11-13",
    "Currency": "SEK"
  })  
});

Example of response:

{
  "Calendar": [
    {
      "Date": "2018-11-09T00:00:00",
      "IsAvailable": true,
      "Groups": [
        {
          "Id": "ptg:987654",
          "Name": "Visit Hotell",
          "Products": [
            {
              "Id": "pt:54321",
              "Name": "Double room",
              "Nights": 1
            },
            {
              "Id": "pt:54321",
              "Name": "Double room",
              "Nights": 2
            }
          ]
        },
        {
          "Id": "ptg:2345678",
          "Name": "Citybreak Hotell",
          "Products": [
            {
              "Id": "pt:65432",
              "Name": "Double room",
              "Nights": 1
            }
          ]
        }
      ]
    },
    {
      "Date": "2018-11-10T00:00:00",
      "IsAvailable": false,
      "Groups": [
        {
          "Id": "ptg:1234567",
          "Name": "Visit Hotell",
          "Products": [
            {
              "Id": "pt:54321",
              "Name": "Double room",
              "Nights": 1
            }
          ]
        }
      ]
    },
    {
      "Date": "2018-11-11T00:00:00",
      "IsAvailable": false,
      "Groups": null
    },
    {
      "Date": "2018-11-12T00:00:00",
      "IsAvailable": false,
      "Groups": null
    },
    {
      "Date": "2018-11-13T00:00:00",
      "IsAvailable": false,
      "Groups": null
    },
  ],
  "CalendarContext": {
    "PointOfSalesId": 0,
    "Start": "2018-11-09T00:00:00",
    "End": "2018-11-13T00:00:00",
    "Currency": "SEK",
    "ContentFilter": null
  }
}

This is a POST request that requires a filter with some mandatory properties, such as the start and end dates of the calendar, the pointOfSalesId and the currency. As in other availability queries, the filter can also include a content filter, such as only those hotels associated with a particular CBIS category or that have 24 hr reception. Content possibilities can be found in the Content Section You can see a bare minimum version of this search in the examples. The return of this call is a set of days with an IsAvailable boolean value indicating any availability at all and (if there is availability) an entity called Groups which shows accommodation options available on that day with the nested sub-products (think hotels with sub-products being hotel rooms) in the search period and the possible lengths of stay. This is useful for, say, quickly displaying days on which you can begin a stay and, once clicked, the minimum and maximum number of days you may stay within the search period.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation/calendar

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Start": "2018-11-23", //DateTime - Mandatory, conforms to ISO 8601 "End": "2018-11-23", //DateTime - Mandatory, conforms to ISO 8601 "Currency": "string", //string - Mandatory e.g SEK or EUR "ContentFilter": { // Optional - See ContentFilter }, }

Availability - No Placement Accommodation

Availability - No Placement Accommodation calls provide information about the availability of any type of accommodation products. Searches will return products with availability, content, room price, and subproduct information (such as breakfasts or tickets to nearby attractions), as well as a Search ID with its Expiry. No placement search differs from the normal accommodation availability search in that it does not do automatic placement of persons into rooms. That means if you send two person configurations: one with 1 adult and one with 2 adults, you will get a flat list of room results priced twice: first for 1 adult and secondly for 2 adults.

The SearchId can be used to retrieve prior, cached searches in a much shorter amount of time if used before its Expiry. The object recalled by the search contains all the unfiltered information retrieved in the first search, so further or different filtering on content, etc. can be done in this call.

The SearchId and the BookingKey of each room product are used in the basket operations to add the product found to the Basket

GET and POST operations

Accommodation No Placement

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Arrival": "2017-10-14",
   "Departure": "2017-10-15",
   "Currency": "SEK",
   "PageSize": 20,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         0
       ] 
     }
   ]
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation/noplacement'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/noplacement",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ]
	})  
});

Example of response:

{
  "AccommodationSearch": {
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14T00:00:00Z",
    "Departure": "2017-10-15T00:00:00Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 0,
    "Sort": {
      "Order": 0,
      "Field": "Price"
    },
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ]
      }
    ],
    "ContentFilter": null,
    "OutputFilter": null
  },
  "Accommodations": [
    {
      "Id": "cbis:12345",
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=10101010",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1010101010",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "The absolute Leading e-commerce platform for the DMO and individual hotels in the Nordics!"
          },
          {
            "Id": 100038,
            "Name": "Elevator",
            "Value": "False"
          },
          {
            "Id": 100163,
            "Name": "Reception",
            "Value": "False"
          }
        ],
        "Categories": null,
        "Geos": [],
        "Pois": [],
        "Position": null
      },
      "Products": [
        {
          "Price": {
            "Price": 450,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Name": "Dubbelrum med extra säng",
          "Content": {
            "PriceFrom": null,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Dubbelrum med extra säng"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "IncludedSubProducts": [],
          "MaxPopopulation": 3,
          "MinPopulation": 1,
          "ExtraBeds": 1,
          "PersonConfiguration": {
            "Adults": 1,
            "ChildrenAges": [
              0
            ]
          },
          "PricePeriods": [
            {
              "DateStart": "2017-10-14T00:00:00",
              "DateEnd": "2017-10-15T00:00:00",
              "AdultPrice": 300,
              "ChildPrice": 150,
              "TotalPrice": 450,
              "Currency": "SEK"
            }
          ],
          "BookingConditions": {
            "Name": null,
            "Terms": null
          },
          "BookingKey": "18-A"
        },
        {
          "Price": {
            "Price": 500,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Name": "Dubbelrum",
          "Content": {
            "PriceFrom": null,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Dubbelrum"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "IncludedSubProducts": [
            {
              "Name": "Trädgårdstomte",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Trädgårdstomte"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "Price": 150,
              "Amount": 1,
              "Currency": "SEK",
              "PriceIncluded": false,
              "IsExtraBed": false,
              "PayOnSite": false
            }
          ],
          "MaxPopopulation": 3,
          "MinPopulation": 1,
          "ExtraBeds": 1,
          "PersonConfiguration": {
            "Adults": 1,
            "ChildrenAges": [
              0
            ]
          },
          "PricePeriods": [
            {
              "DateStart": "2017-10-14T00:00:00",
              "DateEnd": "2017-10-15T00:00:00",
              "AdultPrice": 250,
              "ChildPrice": 100,
              "TotalPrice": 350,
              "Currency": "SEK"
            }
          ],
          "BookingConditions": {
            "Name": null,
            "Terms": null
          },
          "BookingKey": "19-A"
        }
      ],
      "TotalResults": 2
    }
  ],
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh",
  "ExpirationDate": "2017-09-15T09:15:46.0619347Z",
  "TotalResults": 1
}

This is a POST request that requires a filter with some mandatory properties, such as arrival and departure dates. The filter can also include content filtering, such as only including those hotels associated with a particular CBIS category or that have 24 hr reception. Content filtering possibilities can be found in the Content Section You can see a bare minimum version of this search in the examples. The Most important return values in this response are the SearchId and the BookingKey used in the Basket, also pay attention to the ExpirationDate of the SearchId

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation/noplacement

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Arrival": "2018-11-23T15:23:15.087Z", //DateTime - Mandatory "Departure": "2018-11-23T15:23:15.088Z", //DateTime - Mandatory "Currency": "string", //string - Mandatory e.g SEK or EUR "PageSize": 0, //int Mandatory "Sort": { // Optional - defaults to Price Ascending "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Random }, //List of configurations for guest numbers. Each item represents a room price you're looking for. //Cannot be empty, must represent at least one guest "PersonConfigurations": [ { "Adults": 0, //int - represents number of adults "ChildrenAges": [ //List of ints - each int represents the age of a child guest 0 ] } ], "ContentFilter": { // Optional - See ContentFilter }, "OutputFilter": { // Optional - See OutputFilter } }

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "Page": 1,
  "PageSize": 20,
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh"
}' 'https://galaxy.citybreak.com/v3/api/availability/accommodation/noplacement/get'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/noplacement/get",
{
	method: "POST",
	headers: {
	   "ApiKey:" "APIKEY132456789EWOK",
	   "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "Page": 1,
    "PageSize": 20,
    "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh"
  })  
});

Example of response:

{
  "AccommodationSearch": {
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14T00:00:00Z",
    "Departure": "2017-10-15T00:00:00Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 1,
    "Sort": {
      "Order": 0,
      "Field": "Price"
    },
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ]
      }
    ],
    "ContentFilter": null,
    "OutputFilter": null
  },
  "Accommodations": [
    {
      "Id": "cbis:12345",
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=10101010",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=10101010",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "The absolute Leading e-commerce platform for the DMO and individual hotels in the Nordics!"
          },
          {
            "Id": 100038,
            "Name": "Elevator",
            "Value": "False"
          },
          {
            "Id": 100163,
            "Name": "Reception",
            "Value": "False"
          }
        ],
        "Categories": null,
        "Geos": [],
        "Pois": [],
        "Position": null
      },
      "Products": [
        {
          "Price": {
            "Price": 450,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Name": "Dubbelrum med extra säng",
          "Content": {
            "PriceFrom": null,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Dubbelrum med extra säng"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "IncludedSubProducts": [],
          "MaxPopopulation": 3,
          "MinPopulation": 1,
          "ExtraBeds": 1,
          "PersonConfiguration": {
            "Adults": 1,
            "ChildrenAges": [
              1
            ]
          },
          "PricePeriods": [
            {
              "DateStart": "2017-10-14T00:00:00",
              "DateEnd": "2017-10-15T00:00:00",
              "AdultPrice": 300,
              "ChildPrice": 150,
              "TotalPrice": 450,
              "Currency": "SEK"
            }
          ],
          "BookingConditions": {
            "Name": null,
            "Terms": null
          },
          "BookingKey": "18-A"
        },
        {
          "Price": {
            "Price": 500,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Name": "Dubbelrum",
          "Content": {
            "PriceFrom": null,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Dubbelrum"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "IncludedSubProducts": [
            {
              "Name": "Trädgårdstomte",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Trädgårdstomte"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "Price": 150,
              "Amount": 1,
              "Currency": "SEK",
              "PriceIncluded": false,
              "IsExtraBed": false,
              "PayOnSite": false
            }
          ],
          "MaxPopopulation": 3,
          "MinPopulation": 1,
          "ExtraBeds": 1,
          "PersonConfiguration": {
            "Adults": 1,
            "ChildrenAges": [
              1
            ]
          },
          "PricePeriods": [
            {
              "DateStart": "2017-10-14T00:00:00",
              "DateEnd": "2017-10-15T00:00:00",
              "AdultPrice": 250,
              "ChildPrice": 100,
              "TotalPrice": 350,
              "Currency": "SEK"
            }
          ],
          "BookingConditions": {
            "Name": null,
            "Terms": null
          },
          "BookingKey": "19-A"
        }
      ],
      "TotalResults": 2
    }
  ],
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh",
  "ExpirationDate": "2017-09-15T09:15:46.0619347Z",
  "TotalResults": 1
}

This is a POST request that requires a filter with a valid (non-expired) SearchId. The filter otherwise has the same constraints as in the original Accommodation availability search. You can see a bare minimum version of this search in the examples.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation/get/noplacement

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "Page":1, //int mandatory - the pager is 0-indexed so 1 is the second page "PageSize": 0, //int Mandatory "Sort": { // Optional "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Random }, //string - Mandatory - the search Id of a still valid accommodation availability search "SearchId":"string", "OutputFilter": { // Optional - See OutputFilter } }

Fuzzy Accommodation Search

The fuzzy accommodation search will look for available accommodation options in the vicinity of the requested Arrival/Departure of the stay definition. The result will give you options that match or partially match the stay definition. A score will tell how good of a match it was. You can use the related methods to navigate in the search result until it is resolved into a bookable match. Once you have found the accommodation product you are looking for (or the end user has selected it) you can put that selection and required stay dates in the basket.

How to add a result to basket

Call Scan

First you call the Scan method to get perform a search. You will get a partial listing back describing the first set of results. The SearchId will be used in all other methods to refer back to the original search you made. The scan operation will examine dates around the stay (-10 days before arrival and +10 days after the selected departure), and give you bookkeys to pass to the next methods.

Page through the result

By using the Get method you will be able to page through the result.

Get arrival dates in search span

Once you get a result you like and would like to investigate further you can get more details of the possible stays with that result by calling arrivaldates with a bookKey obtained with the scan or get methods. That will give you all valid arrival dates available in scan sector that was used.

Get departure dates

By calling the departuredates with a bookKey obtained with the scan method, given an arrival date you will get all valid departures from that date.

List bookable alternatives

By calling bookablealternatives you will get back actual bookable items between a specified arrival and departure. You will get a list of items back. Since an accommodation product may be sold under certain conditions, you may get more than one back. Each describing a price and the conditions under it will be sold. Included subproducts can differ between the items for instance.

Add to basket

Once you have a bookable alternative you can add it to the basket by calling PUT api/basket/add/cabin/{basketId}/{searchId}/{bookKey}

Scan

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "PointOfSalesId": 0,
  "Currency": "EUR",
  "PageSize": 20,
  "Stay": {
    "ArrivalDaysMask": 0x7F, 
    "DepartureDayMask": 0x7F,
    "MinStayLength": 3,
    "MaxStayLength": 5,
    "Arrival": "2018-12-04",
    "Departure": "2018-12-08"
  },
  "PersonConfiguration": {
    "Adults": 2,
    "ChildrenAges": [
    ]
  },
  "OutputFilter":{
    "Attributes":[
      99
    ]
  }
  "Sort": {
    "Order": "Asc",
    "Field": "Score"
    } 
}' 'http://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/scan'
var r = fetch("http://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/scan",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "PointOfSalesId": 0,
    "Currency": "SEK",
    "PageSize": 20,
    "Stay": {
      "ArrivalDaysMask": 0x7F,
      "DepartureDayMask": 0x7F, 
      "MinStayLength": 3,
      "MaxStayLength": 5,
      "Arrival": "2018-12-04",
      "Departure": "2018-12-08"
    },
    "PersonConfiguration": {
      "Adults": 2,
      "ChildrenAges": [
      ]
    },
    "Sort": {
      "Order": "Asc",
      "Field": "Score"
    }
  })  
});

Example of response:

{
  "SearchId": "1234abcd-a1b2-1234-a10f-abcd1234abcd",
  "TotalResults": 2,
  "Accommodations": [
    {
      "Id": "cbis:12345",
      "Name": "First hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=123456",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Namn",
            "Value": "First hotel"
          }
        ],
        "Categories": null,
        "Geos": null,
        "Pois": null,
        "Position": {
          "Latitude": 60.12345,
          "Longitude": 18.00000
        }
      },
      "Products": [
        {
          "Id": "pt:12345",
          "BookingKey": "2-C",
          "Name": "Standard Dubbelrum",
          "Content": {
            "PriceFrom": 0,
            "Images": [],
            "Information": [
              {
                "Id": 101,
                "Name": "Introduction",
                "Value": null
              },
              {
                "Id": 102,
                "Name": "Description",
                "Value": null
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Score": 100,
          "ExampleArrival": "2018-12-04T00:00:00+01:00",
          "ExampleDeparture": "2018-12-08T00:00:00+01:00",
          "Extrabeds": 1,
          "MaxPopluationForAnyItem": 3,
          "MaxPopulation": 2,
          "OriginalPrice": 300,
          "Price": 300
        },
        {
          "Id": "pt:23456",
          "BookingKey": "2-C",
          "Name": "Trippelrum",
          "Content": {
            "PriceFrom": 0,
            "Images": [],
            "Information": [
              {
                "Id": 101,
                "Name": "Introduction",
                "Value": null
              },
              {
                "Id": 102,
                "Name": "Description",
                "Value": null
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Score": 65,
          "ExampleArrival": "2018-12-04T00:00:00+01:00",
          "ExampleDeparture": "2018-12-07T00:00:00+01:00",
          "Extrabeds": 0,
          "MaxPopluationForAnyItem": 3,
          "MaxPopulation": 3,
          "OriginalPrice": 250,
          "Price": 250
        },
        {
          "Id": "pt:34567",
          "BookingKey": "2-C",
          "Name": "Superior Dubbelrum",
          "Content": {
            "PriceFrom": 0,
            "Images": [],
            "Information": [
              {
                "Id": 101,
                "Name": "Introduction",
                "Value": null
              },
              {
                "Id": 102,
                "Name": "Description",
                "Value": null
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Score": 65,
          "ExampleArrival": "2018-12-04T00:00:00+01:00",
          "ExampleDeparture": "2018-12-07T00:00:00+01:00",
          "Extrabeds": 1,
          "MaxPopluationForAnyItem": 3,
          "MaxPopulation": 2,
          "OriginalPrice": 280,
          "Price": 280
        }
      ]
    }
  ],
  "SearchContext": {
    "Arrival": "2018-12-04T00:00:00+01:00",
    "Departure": "2018-12-08T00:00:00+01:00",
    "OutputFilter": {
      "Attributes": [
        99
      ],
      "Categories": false,
      "Geos": false,
      "Pois": false,
      "Position": false
    },
    "ContentFilter": {
      "Geos": [],
      "Categories": [],
      "Pois": [],
      "Search": null,
      "Position": null,
      "Information": null,
      "Ids": []
    },
    "PageSize": 20,
    "Page": 0,
    "PersonConfiguration": {
      "Adults": 1,
      "ChildrenAges": []
    },
    "Currency": "EUR",
    "ArrivalDayMask": 127,
    "DepartureDayMask": 127,
    "MinStayLength": 3,
    "MaxStayLength": 5,
    "Sort": {
      "Order": "Desc",
      "Field": "Score"
    }
  },
  "ExpirationDate": "2018-11-20T12:00:00.1000000+01:00"
}

Use this method first to get a BookKey to be able to proceed with all other operations.

Search parameters

All parameters are submitted through an instance of the CabinSearchFilter object as described below.

Parameter Description
PointOfSalesId The point of sales that should be used. It defines the assortment that could be searched.
Currency The currency the basket search should deliver results for. It must match the currency your basket is in.
PageSize The number of results in the return object. It may not exceed 50 and suggested is between 10 and 20.
Page The page you would like to start with. Normally 0, it will give you the first page with the best matches
Stay The Stay object describes what types of stay results you would like to get.
Stay.ArrivalDayMask The arrival day mask, see DayMask below.
Stay.DepartureDayMask The departure day mask, see DayMask below.
Stay.MinStayLength The minimum length of stay you require.
Stay.MaxStayLength The maximum length of stay you require.
Stay.Arrival The suggested arrival date.
Stay.Departure The suggested departure date.

Using the Stay object

The arrival and departure makes up a sweet spot span where you would like to arrive. The search is performed with the focus on that area. However you can get results that partially matches that span.

The Score property will tell how good of a match a specific result was. It will also give you the best price for the specified stay that the item used to calculate the score. The example properties on that object will tell which ones it was.

Use the arrival/departure day mask to create queries to match like short week, weekends and such. For instance, use 0x18 to create results arriving on Thursday or Friday and use departure mask 0x61 to specify acceptable departures on Saturday, Sunday or Monday. That could be your weekend day filter.

Use the MinStayLength/MaxStayLength stay to specify an acceptable length of you stay. 7/7 will give you exactly seven days of stay. 2/3 will restrict the stay to 2 or 3 days. That could be used in conjunction with the week days filter. 1/7 will give you results where you could stay anywhere between 1 or 7 days - likely to be an expensive and possibly not helpful query

Keep in mind that this is only used to give you relevant stay dates as the result. You can use the get arrival dates and departure dates when you examine a specified result to create a bookable result that does not necessarily matches your original constraints.

Day mask

A bit mask describing which days that are valid for arriving at or depart at. The field is an integer but can also be represented in hex.

Hex Day Bin
0x01 Monday (0000001)
0x02 Tuesday (0000010)
0x04 Wednesday (0000100)
0x08 Thursday (0001000)
0x10 Friday (0010000)
0x20 Saturday (0100000)
0x40 Sunday (1000000)

Examples

Mask Meaning
0x7F Any day, this is the default if 0 is submitted.
0x18 Thursday or Friday.
0xF Monday, Tuesday, Wednesday, Thursday or Friday.

Sort definition

The sort definition is used to order the paged results you get.

Order Meaning
Asc Ascending - The item with the lowest field value first. Suggested when sorting by Price.
Desc Descending - The item the highest field value first. Suggested when sorting by Score.
Field Meaning
Name Sort by the name of the Cabin
Price Sort by example price
Random Sort by a random order.
Score Sort by the relevance of the example stay.

Suggested sort order is by Score/Descending. That will give you the most relevant items first.

The price may differ heavily if you are in a high season week and low season week. Ordering by Price is therefore not necessarily a good sorting for listing relevant results.

ContentFilter

The content filter specifies that the search result should be narrowed to certain results that only matches that filter. See Availability search for specification.

ContentOutputFilter

The output filter describes which content that should be included with the item. See the availability search for specifications.

This is POST request that requires a filter. You can see a bare minimum version of this search in the examples.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/scan

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Currency": "string", //string - Mandatory e.g SEK or EUR "PageSize": 0, //int Mandatory "Stay": { // Mandatory "ArrivalDaysMask": 0, //int - Optional - use only rightmost seven bits, defaults to 127 (all days) "DepartureDayMask": 0, //int - Optional - use only rightmost seven bits, defaults to 127 (all days) "MinStayLength": 0, // int - Mandatory "MaxStayLength": 0, // int - Mandatory "Arrival": "2018-11-23T15:23:15.087Z", //DateTime - Mandatory, conforms to ISO 8601 "Departure": "2018-11-23T15:23:15.088Z", //DateTime - Mandatory, conforms to ISO 8601 }, //List of configurations for guest numbers. Each item represents a "room". //Cannot be empty, must represent at least one guest "PersonConfigurations": [ { "Adults": 0, //int - represents number of adults "ChildrenAges": [ //List of ints - each int represents the age of a child guest 0 ] } ], "ContentFilter": { // Optional - See the ContentFilter section }, "OutputFilter": { // Optional - See the OutputFilter section }, "Sort": { // Optional - default sort is price ascending "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Score, Random } }

Get

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
    "Page": 1, // Zero indexed so this is the second page
    "PageSize": 10,
    "Sort": {
      "Order": "Desc",
      "Field": "Score"
    },
    "SearchId": "1234abcd-a1b2-1234-a10f-abcd1234abcd",
    "ContentOutputFilter": {
      "Attributes": [
          99
      ],
      "Categories": false,
      "Geos": false,
      "Pois": false,
      "Position": false
    }
}' 'https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/get'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/get",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		  "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
  "Page": 1, // Zero indexed so this is the second page
  "PageSize": 10,
  "Sort": {
    "Order": "Desc",
    "Field": "Score"
  },
  "SearchId": "1234abcd-a1b2-1234-a10f-abcd1234abcd",
  "ContentOutputFilter": {
    "Attributes": [
        99
    ],
    "Categories": false,
    "Geos": false,
    "Pois": false,
    "Position": false
  }
  })  
});

This method is used to get a different page of the scan result as represented by the searchId you find in the initial scan. Each searchId has an expiry but this is not a guarantee of availability on results from previous pages.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/get

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)
{
  "Page":1, //int mandatory - the pager is 0-indexed so 1 is the second page
  "PageSize": 0, //int Mandatory
  "Sort": { // Optional
    "Order": "Asc", //string - Mandatory if parent included
    "Field": "string" //string - Mandatory if parent included - Price, Name, Random
  },
  "SearchId":"string", //string - Mandatory - the search Id of a still valid accommodation availability search
  "OutputFilter": { // Optional -  See the OutputFilter section
  }
}

Arrival dates

curl -X GET 
--header 'Accept: text/plain' 
--header 'apiKey:  APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/arrivaldates?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&firstArrival=2018-12-03&lastArrival=2018-12-05&personConfig.adults=2'

var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/arrivaldates?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&firstArrival=2018-12-03&lastArrival=2018-12-05&personConfig.adults=2",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
    "2018-12-03T00:00:00+01:00",
    "2018-12-04T00:00:00+01:00"
]

Get a set of valid arrival dates for a specified item based on your scan.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/arrivaldates

Query Parameters

Parameter Description
searchId From the result
bookKey From the result.Result[n].BookKey
firstArrival First acceptable date for the result.
lastArrival Last acceptable date for the result.
personConfig.adults Number of adults (usually be same as scan)
personConfig.childrenAges Ages of children (usually be same as scan)

Departure dates

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey:  APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/departuredates?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&arrival=2018-12-03&personConfig.adults=2'

var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/departuredates?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&arrival=2018-12-03&personConfig.adults=2",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
  "2018-12-04T00:00:00+01:00",
  "2018-12-05T00:00:00+01:00",
  "2018-12-06T00:00:00+01:00",
  "2018-12-07T00:00:00+01:00",
  "2018-12-08T00:00:00+01:00",
  "2018-12-09T00:00:00+01:00",
  "2018-12-10T00:00:00+01:00",
  "2018-12-11T00:00:00+01:00",
  "2018-12-12T00:00:00+01:00",
  "2018-12-13T00:00:00+01:00",
  "2018-12-14T00:00:00+01:00",
  "2018-12-15T00:00:00+01:00",
  "2018-12-16T00:00:00+01:00",
  "2018-12-17T00:00:00+01:00"
]

Get a set of valid departure dates for the specified item given the arrival date.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/departuredates

Query Parameters

Parameter Description
searchId From the result
bookKey From the result.Result[n].BookKey
arrival The specified arrival date from which you would like valid departure dates.
personConfig.adults Number of adults (usually be same as scan)
personConfig.childrenAges Ages of children (usually be same as scan)

Detailed Departure Info

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey:  APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/alldepartures?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&arrival=2018-12-03&personConfig.adults=2'

var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/alldepartures?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&arrival=2018-12-03&personConfig.adults=2",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "1.00:00:00",
    "Price": 60,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "2.00:00:00",
    "Price": 120,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "3.00:00:00",
    "Price": 180,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "4.00:00:00",
    "Price": 240,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "5.00:00:00",
    "Price": 500,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "6.00:00:00",
    "Price": 600,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "7.00:00:00",
    "Price": 700,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "8.00:00:00",
    "Price": 800,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "9.00:00:00",
    "Price": 900,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "10.00:00:00",
    "Price": 1000,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "11.00:00:00",
    "Price": 1100,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "12.00:00:00",
    "Price": 1200,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "13.00:00:00",
    "Price": 1300,
    "OriginalPrice": null
  },
  {
    "Arrival": "2018-12-03T00:00:00+01:00",
    "Stay": "14.00:00:00",
    "Price": 1400,
    "OriginalPrice": null
  }
]

Similar to the departure dates query, this call will return a more detailed list of departure information, with stay time from your requested arrival date and the lowest price of the placement.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/alldepartures

Query Parameters

Parameter Description
searchId From the result
bookKey From the result.Result[n].BookKey
arrival The specified arrival date from which you would like valid departure dates.
personConfig.adults Number of adults (usually be same as scan)
personConfig.childrenAges Ages of children (usually be same as scan)

Get bookable alternatives

curl -X GET --header 'Accept: application/json' --header 'apiKey:  APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/bookablealternatives?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&arrival=2018-12-03&personConfig.adults=2'

var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/bookablealternatives?searchId=1234abcd-a1b2-1234-a10f-abcd1234abcd&bookKey=2-C&arrival=2018-12-03&personConfig.adults=2",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
  {
    "BookId": 3,
    "DiscountInformation": null,
    "Arrival": "2018-12-04T00:00:00+01:00",
    "Departure": "2018-12-07T00:00:00+01:00",
    "Subproducts": [
      {
        "Name": "Frukost",
        "Currency": "EUR",
        "Description": null,
        "IncludedInPrice": true,
        "PayOnSite": false,
        "Price": 0
      }
    ],
    "OriginalPrice": null,
    "Price": 180,
    "RateInformation": {
      "Name": null,
      "CancellationLatest": null,
      "Terms": null
    }
  },
  {
    "BookId": 4,
    "DiscountInformation": null,
    "Arrival": "2018-12-04T00:00:00+01:00",
    "Departure": "2018-12-07T00:00:00+01:00",
    "Subproducts": [
      {
        "Name": "Frukost",
        "Currency": "EUR",
        "Description": null,
        "IncludedInPrice": true,
        "PayOnSite": false,
        "Price": 0
      }
    ],
    "OriginalPrice": null,
    "Price": 300,
    "RateInformation": {
      "Name": null,
      "CancellationLatest": "2018-06-10T02:00:00+02:00",
      "Terms": null
    }
  }
]

This call returns a list of valid alternatives to book. Use the BookId (different to the bookKey) when referring to this specific result when adding it to the fuzzy search basket.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/availability/accommodation/fuzzy/bookablealternatives

Query Parameters

Parameter Description
searchId From the result
bookKey From the result.Result[n].BookKey
arrival The specified arrival date
departure The specified departure date
personConfig.adults Number of adults (usually be same as scan)
personConfig.childrenAges Ages of children (usually be same as scan)

Availability - Activity

Availability - Activity calls provide information about the availability of activity products. The search will return products with availability, including content, pricing groups, as well as a Search ID with its Expiry.

The SearchId can be used to retrieve prior, cached searches in a much shorter amount of time for Activity Search if used before its Expiry. The object recalled by the search contains all the unfiltered information retrieved in the first search, so further or different filtering on content, etc. can be done in this call.

The SearchId and the BookKey of each activity quote are used in the basket operations to add the product found to the Basket

GET and POST operations

Activity

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Date": "2019-02-18",
   "Currency": "NOK",
   "PageSize": 20
 }' 'https://galaxy.citybreak.com/v3/api/availability/activity'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/activity",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Date": "2019-02-18",
	   "Currency": "NOK",
	   "PageSize": 20
	})  
});

Example of response:

{
  "ActivitySearch": {
    "PointOfSalesId": 0,
    "Date": "2019-02-18T00:00:00",
    "Currency": "NOK",
    "PageSize": 20,
    "Page": 0,
    "Sort": {
      "Order": "Asc",
      "Field": "Price"
    },
    "ContentFilter": null,
    "OutputFilter":{
      "Attributes":[99],
      "Categories": false,
      "Geos": false,
      "Pois": false,
      "Position": false
    }
}
  },
  "ActivityGroups": [
    {
      "Id": "cbis:12345",
      "Name": "Ski Lessons at Lake Tahoe",
      "Content": {
        "PriceFrom": 0,
        "Images": [                            
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=123",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "Ski Lessons at Lake Tahoe"
          }
        ],
        "Categories": null,
        "Geos": null,
        "Pois": null,
        "Position": null
      },
      "Activities": [
        {
          "Id": "cbis:1501474",
          "Name": "Ski Lessons for Beginners",
          "MaximumItemsBookable": null,
          "MinimumItemsBookable": 1,
          "Content": {
            "PriceFrom": 0,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Ski Lessons for Beginners"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Occasions": [
            {
              "Start": "2019-02-18T09:00:00",
              "Duration": "03:00:00",
              "Quotes": [
                {
                  "BookKey": "123-T",
                  "AvailableCapacity": 4,
                  "Price": {
                    "PriceGroupCode": "ADT",
                    "PriceGroupName": "Adult",
                    "Age": null,
                    "Price": 1000,
                    "OriginalPrice": 1000,
                    "Currency": "NOK"
                  },
                  "BookingConditions": {
                    "Name": null,
                    "Terms": null
                  },
                  "DiscountInformation": {
                    "Name": null,
                    "Description": null
                  },
                  "IncludedAddons": []
                }
                {
                  "BookKey": "124-T",
                  "AvailableCapacity": 3,
                  "Price": {
                    "PriceGroupCode": "CHD",
                    "PriceGroupName": "Youth 7-15",
                    "Age": null,
                    "Price": 500,
                    "OriginalPrice": 500,
                    "Currency": "NOK"
                  },
                  "BookingConditions": {
                    "Name": null,
                    "Terms": null
                  },
                  "DiscountInformation": {
                    "Name": null,
                    "Description": null
                  },
                  "IncludedAddons": []
                },
                {
                  "BookKey": "125-T",
                  "AvailableCapacity": 3,
                  "Price": {
                    "PriceGroupCode": "CHD-DIS",
                    "PriceGroupName": "Youth 7-15",
                    "Age": null,
                    "Price": 410,
                    "OriginalPrice": 0,
                    "Currency": "NOK"
                  },
                  "BookingConditions": {
                    "Name": null,
                    "Terms": null
                  },
                  "DiscountInformation": {
                    "Name": "Sportlovet2019",
                    "Description": "Rabatt för Sportlovet"
                  },
                  "IncludedAddons": [
                    {
                      "Name": "Sportlovet 2019 Hatt",
                      "Content": {
                          "PriceFrom": 0,
                          "Images": [],
                          "Information": [
                              {
                                  "Id": 99,
                                  "Name": "Name",
                                  "Value": "Sportlovet 2019 Hatt"
                              }
                          ],
                          "Categories": null,
                          "Geos": null,
                          "Pois": null,
                          "Position": null
                      },
                      "Price": 10,
                      "Amount": 1,
                      "Currency": "NOK",
                      "PriceIncluded": true
                    }
                  ]
                }
              ]
            },
            {
              "Start": "2019-02-18T14:00:00",
              "Duration": "03:00:00",
              "Quotes": [
                {
                  "BookKey": "126-T",
                  "AvailableCapacity": 7,
                  "Price": {
                    "PriceGroupCode": "ADT",
                    "PriceGroupName": "Adult",
                    "Age": null,
                    "Price": 1000,
                    "OriginalPrice": 1000,
                    "Currency": "NOK"
                  },
                  "BookingConditions": {
                    "Name": null,
                    "Terms": null
                  },
                  "DiscountInformation": {
                    "Name": null,
                    "Description": null
                  },
                  "IncludedAddons": []
                }
              ]
            }
          ]
        },
        {
          "Id": "cbis:1501474",
          "Name": "Advanced Ski Lessons",
          "MaximumItemsBookable": null,
          "MinimumItemsBookable": 1,
          "Content": {
            "PriceFrom": 0,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Advanced Ski Lessons"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Occasions": [
            {
              "Start": "2019-02-18T09:00:00",
              "Duration": "04:00:00",
              "Quotes": [
                {
                  "BookKey": "127-T",
                  "AvailableCapacity": 4,
                  "Price": {
                    "PriceGroupCode": "ADT",
                    "PriceGroupName": "Adult",
                    "Age": null,
                    "Price": 1100,
                    "OriginalPrice": 1100,
                    "Currency": "NOK"
                  },
                  "BookingConditions": {
                    "Name": null,
                    "Terms": null
                  },
                  "DiscountInformation": {
                    "Name": null,
                    "Description": null
                  },
                  "IncludedAddons": []
                }
              ]
            }
          ]
        }
      ],
      "TotalResults": 2
    }
  ],
  "SearchId": "2121as12-1a2s-1s2a-2a1s-12as21sa12as",
  "ExpirationDate": "2019-01-29T15:15:46.2172447+01:00",
  "TotalResults": 2
}

This is a POST request that requires a filter with some mandatory properties, such as date. The filter can also include content filtering, such as only including those activities associated with a particular CBIS category or with certain attributes. Content filtering possibilities can be found in the Content Section You can see a bare minimum version of this search in the examples. The return structure is a list of Activity Groups (such as ski lessons) which contain activities (e.g one for each skill level). Each activity contains Occasions, each of which defines a possible start date, time and duration for the Activity (e.g. morning lessons, afternoon lessons). Finally each occasion has a list of quotes, which are the bookable objects, in each of these you will find all the information related to price groups, prices and other pertinent information and the BookKey (e.g. one price for adults, another for children). The most important return values in the response are the SearchId and the BookKey found in each Quote object, they are used in the Basket, also pay attention to the ExpirationDate of the SearchId. It is also worth paying attention to the Minimum and Maximum Items to Book. These are often values set by external systems and if your basket item is outside these parameters it may fail to commit. A null value means unrestricted. Booking Conditions and Discount Information relate can contain specific supplier information or Campaign information respectively. IMPORTANT: Paging is 0-indexed.

HTTP Request

POST https://galaxy.citybreak.com/availability/activity

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Date": "2018-12-30", //DateTime - Mandatory "Currency": "string", //string - Mandatory e.g SEK or EUR "PageSize": 0, //int Mandatory, 0-Indexed "Sort": { // Optional - defaults to Price Ascending "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Random }, "ContentFilter": { // Optional - See ContentFilter }, "OutputFilter": { // Optional - See OutputFilter } }

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "Page": 0,
  "PageSize": 20,
  "SearchId": "2121as12-1a2s-1s2a-2a1s-12as21sa12as"
}' 'https://galaxy.citybreak.com/v3/api/availability/activity/get'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/activity/get",
{
	method: "POST",
	headers: {
	   "ApiKey:" "APIKEY132456789EWOK",
	   "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "Page": 0,
    "PageSize": 20,
    "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh"
  })  
});

Example of response:

{
  "ActivitySearch": {
    "PointOfSalesId": 0,
    "Date": "2019-02-18T00:00:00",
    "Currency": "NOK",
    "PageSize": 20,
    "Page": 0,
    "Sort": {
      "Order": "Asc",
      "Field": "Price"
    },
    "ContentFilter": null,
    "OutputFilter": null
  },
  "ActivityGroups": [
    {
      "Id": "cbis:12345",
      "Name": "Off Piste Ski Lessons",
      "Content": {
        "PriceFrom": 0,
        "Images": [                            
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=123",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "Off Piste Ski Lessons"
          }
        ],
        "Categories": null,
        "Geos": null,
        "Pois": null,
        "Position": null
      },
      "Activities": [
        {
          "Id": "cbis:1501474",
          "Name": "Advanced Off Piste Ski Lessons",
          "MaximumItemsBookable": null,
          "MinimumItemsBookable": 2,
          "Content": {
            "PriceFrom": 0,
            "Images": [],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Advanced Off Piste Ski Lessons"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Occasions": [
            {
              "Start": "2019-02-18T09:00:00",
              "Duration": "08:00:00",
              "Quotes": [
                {
                  "BookKey": "127-T",
                  "AvailableCapacity": 4,
                  "Price": {
                    "PriceGroupCode": "ADT",
                    "PriceGroupName": "Adult",
                    "Age": null,
                    "Price": 2100,
                    "OriginalPrice": 0,
                    "Currency": "NOK"
                  },
                  "BookingConditions": {
                    "Name": null,
                    "Terms": null
                  },
                  "DiscountInformation": {
                    "Name": null,
                    "Description": null
                  },
                  "IncludedAddons": []
                }
              ]
            }
          ]
        }
      ],
      "TotalResults": 1
    }
  ],
  "SearchId": "2121as12-1a2s-1s2a-2a1s-12as21sa12as",
  "ExpirationDate": "2019-01-29T15:15:46.2172447+01:00",
  "TotalResults": 2
}

This is a POST request that requires a filter with a valid (non-expired) SearchId. The filter otherwise has the same constraints as in the original Activity availability search. You can see a bare minimum version of this search in the examples. IMPORTANT: Paging is 0-indexed.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/activity/get

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "Page":1, //int mandatory - the pager is 0-indexed so 1 is the second page "PageSize": 0, //int Mandatory "Sort": { // Optional "Order": "Asc", //string - Mandatory if parent included "Field": "string" //string - Mandatory if parent included - Price, Name, Random }, //string - Mandatory - the search Id of a still valid activity availability search "SearchId":"string", "OutputFilter": { // Optional - See OutputFilter } }

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "PointOfSalesId": 0,
  "Start": "2018-12-14",
  "End": "2018-12-16",
  "Currency": "DKK"
}' 'https://galaxy.citybreak.com/v3/api/availability/activity/calendar'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/activity/calendar",
{
	method: "POST",
	headers: {
	   "ApiKey:" "APIKEY132456789EWOK",
	   "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "PointOfSalesId": 0,
    "Start": "2018-12-13",
    "End": "2018-12-16",
    "Currency": "DKK"
  })  
});

Example of response:

{
  "Days": [
    {
      "Date": "2018-12-14T00:00:00",
      "IsAvailable": true,
      "Activities": [
        "cbis:1234",
        "cbis:1235"
      ]
    },
    {
      "Date": "2018-12-14T00:00:00",
      "IsAvailable": false,
      "Activities": null
    },
    {
      "Date": "2018-12-15T00:00:00",
      "IsAvailable": true,
      "Activities": [
        "cbis:1234",
        "cbis:1235"
        "cbis:1236"
      ]
    },
    {
      "Date": "2018-12-16T00:00:00",
      "IsAvailable": true,
      "Activities": [
        "cbis:1234",
        "cbis:1236"
      ]
    }
  ],
  "CalendarContext": {
    "PointOfSalesId": 0,
    "Start": "2018-12-14T00:00:00",
    "End": "2018-12-16T00:00:00",
    "Currency": "DKK",
    "ContentFilter": {
      "Ids":[
          "cbis:1234",
          "cbis:1235"
          "cbis:1236"
        ]
    }
  }
}

This is a POST request that requires a filter with some mandatory properties, such as the start and end dates of the calendar, the pointOfSalesId and the currency. As in other availability queries, the filter can also include a content filter, such as only those activities associated with a particular CBIS category or with certain attributes. This is especially handy if you want a very quick look at availability for a specific product or products over a range of days. Content possibilities can be found in the Content Section You can see a bare minimum version of this search in the examples. The return of this call is a set of dates with an IsAvailable boolean value indicating any availability at all and (if there is availability) an entity called Activities which is a set of the cbis IDs of the activities (as opposed to activity groups) available on that day. This is useful for, say, quickly displaying days on which you can find available activities. You can use the Activity content call with if you also wish to populate a specific activity with content (check the relations field if you want the content of the encapsulating group)

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/activity/calendar/byday

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Start": "2018-12-14", //DateTime - Mandatory, conforms to ISO 8601 "End": "2018-12-16", //DateTime - Mandatory, conforms to ISO 8601 "Currency": "string", //string - Mandatory e.g SEK or EUR "ContentFilter": { // Optional - See ContentFilter }, }

Calendar Search By Product

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "PointOfSalesId": 0,
  "Start": "2019-02-16",
  "End": "2019-02-19",
  "Currency": "EUR",
  "ContentFilter": {
    "Ids": [
      "cbis:12345",
      "cbis:12346"
    ]
  },
  "OutputFilter":{
    "Attributes":[99],
    "Categories": false,
    "Geos": false,
    "Pois": false,
    "Position": false
  }
}' 'https://galaxy.citybreak.com/v3/api/availability/activity/calendar/byproduct'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/activity/calendar/byproduct",
{
	method: "POST",
	headers: {
	   "ApiKey:" "APIKEY132456789EWOK",
	   "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "PointOfSalesId": 0,
    "Start": "2019-02-16",
    "End": "2019-02-19",
    "Currency": "EUR",
    "ContentFilter": {
      "Ids": [
      "cbis:12345",
      "cbis:12346"
      ]
    },
    "OutputFilter":{
      "Attributes":[99],
      "Categories": false,
      "Geos": false,
      "Pois": false,
      "Position": false
    }
  })  
});

Example of response:

{
  "CalendarContentContext": {
      "PointOfSalesId": 18280,
      "Start": "2019-02-16T00:00:00",
      "End": "2019-02-19T00:00:00",
      "Currency": "EUR",
      "ContentFilter": null,
      "OutputFilter": {
        "Attributes": [
          99
        ],
        "Categories": false,
        "Geos": false,
        "Pois": false,
        "Position": false
      }
  },
  "ActivityGroups": [
    {
      "Id": "cbis:123245",
      "Name": "Rappeling Down the Ice Wall in Pyhä-Luosto",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1235",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1235",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "Rappeling Down the Ice Wall in Pyhä-Luosto"
          }
        ],
        "Categories": null,
        "Geos": null,
        "Pois": null,
        "Position": null
      },
      "Activities": [
        {
          "Id": "cbis:12347",
          "Name": "Rappeling Down the Ice Wall in Pyhä-Luosto",
          "Content": {
            "PriceFrom": null,
            "Images": [],
              "Information": [
                {
                  "Id": 99,
                  "Name": "Name",
                  "Value": "Rappeling Down the Ice Wall in Pyhä-Luosto"
                }
              ],
              "Categories": null,
              "Geos": null,
              "Pois": null,
              "Position": null
          },
          "AvailableDates": [
            "2019-02-16T00:00:00Z",
            "2019-02-18T00:00:00Z",
            "2019-02-19T00:00:00Z"
          ]
        }
      ],
      "TotalResults": 1
    },
    {
      "Id": "cbis:123246",
      "Name": "Climbing up the Ice Wall in Pyhä-Luosto",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1234",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1234",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "Climbing up the Ice Wall in Pyhä-Luosto"
          }
        ],
        "Categories": null,
        "Geos": null,
        "Pois": null,
        "Position": null
      },
      "Activities": [
        {
          "Id": "cbis:12348",
          "Name": "Climbing up the Ice Wall in Pyhä-Luosto",
          "Content": {
            "PriceFrom": null,
            "Images": [],
              "Information": [
                {
                  "Id": 99,
                  "Name": "Name",
                  "Value": "Climbing up the Ice Wall in Pyhä-Luosto"
                }
              ],
              "Categories": null,
              "Geos": null,
              "Pois": null,
              "Position": null
          },
          "AvailableDates": [
            "2019-02-17T00:00:00Z",
            "2019-02-18T00:00:00Z",
            "2019-02-19T00:00:00Z"
          ]
        }
      ],
      "TotalResults": 1
    },
  ],
  "TotalResults": 2
}

This is a POST request that requires a filter with some mandatory properties, such as the start and end dates of the calendar, the pointOfSalesId and the currency. As in other availability queries, the filter can also include a content filter, such as only those activities associated with a particular CBIS category or with certain attributes. As there is no paging for the calendar content search it is sensible to request the bare minimum both in terms of products searched and content returned. Content possibilities can be found in the Content Section You can see a bare minimum version of this search in the examples. The return of this call the activity groups and activities that have availabilities within the time range you are looking for, instead of occasions and quotes you simply get a list of days the product is available.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/availability/activity/calendar/byproduct

Query Parameters

Parameter Description
filter the POST filter
Accept-Language The language culture (e.g en-us)

{ "PointOfSalesId": 0, //int - Mandatory "Start": "2018-12-14", //DateTime - Mandatory, conforms to ISO 8601 "End": "2018-12-16", //DateTime - Mandatory, conforms to ISO 8601 "Currency": "string", //string - Mandatory e.g SEK or EUR "ContentFilter": { // Optional - See ContentFilter }, "OutputFilter": { // Optional - See OutputFilter } }

Content Filter

Content filters used in availability queries. All individual filters are optional, i.e. you can filter just on Categories and Search

{ "Geos": [], "Categories": [], "Pois": [], "Search": "", "Position": {}, "Information": {}, "Ids": [] }

Categories, Geonodes, Pois

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Arrival": "2017-10-14",
   "Departure": "2017-10-15",
   "Currency": "SEK",
   "PageSize": 20,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         0
       ] 
     }
   ],
   ContentFilter{
    "Categories": [
		  123, 124
	  ],
	  "Geos": [
	  	123, 124
	   ],
	  "Pois": [
		123, 124
	  ]
   }
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ],
    "ContentFilter"{
      "Categories": [
        123, 124
      ],
      "Geos": [
        123, 124
      ],
      "Pois": [
        123, 124
      ]
    }
	})  
});

Categories, Geonodes and Pois are list of integers. The example query can be translated to products (in category 123 OR 124) AND (in geonode 123 OR 124) AND (in poi 123 OR 124).

Parameters

Parameter Type Description
Categories int[] List of categories Ids.
Geos int[] List of geonodes Ids.
Pois int[] List of pois Ids.

Search in Name

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Arrival": "2017-10-14",
   "Departure": "2017-10-15",
   "Currency": "SEK",
   "PageSize": 20,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         0
       ] 
     }
   ],
   ContentFilter{
    "Search":"My Hotel"
   }
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ],
    "ContentFilter"{
      "Search":"My Hotel"
    }
	})  
});

Shorthand to search in products name.

Parameters

Parameter Type Description
Search string String you are looking for, handles typos.

Position

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Arrival": "2017-10-14",
   "Departure": "2017-10-15",
   "Currency": "SEK",
   "PageSize": 20,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         0
       ] 
     }
   ],
   ContentFilter{
    "Position": {
      "Latitude": 57.7089,
      "Longitude": 11.9746,
      "Distance": 10
	  }
   }
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ],
    "ContentFilter"{
      "Position": {
        "Latitude": 57.7089,
        "Longitude": 11.9746,
        "Distance": 10
      }
    }
	})  
});

Filter products by their position. You need to supply a reference point and a Distance (radius in Km).

Parameters

Parameter Type Description
Latitude double Latitude of reference point.
Longitude double Longitude of reference point.
Distance int Distance from reference point (km).

Ids

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
   "PointOfSalesId": 0,
   "Arrival": "2017-10-14",
   "Departure": "2017-10-15",
   "Currency": "SEK",
   "PageSize": 20,
   "PersonConfigurations": [
     {
       "Adults": 1,
       "ChildrenAges": [
         0
       ] 
     }
   ],
   ContentFilter{
      "Ids": [
        "cbis:12345", "ptg:987654"
      ]
   }
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ],
    "ContentFilter"{
      "Ids": [
        "cbis:12345", "ptg:987654"
      ]
    }
	})  
});

Only return the products matching the ids supplied in Ids. These can be cbis product Id references (“cbis123456”) or any unique product reference as stored in CBIS (“ptg:12345”, “yourexternalref:12345”)

Parameters

Parameter Type Description
Ids string[] The product Ids.

Information

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
  "PointOfSalesId": 0,
  "Arrival": "2017-10-14",
  "Departure": "2017-10-15",
  "Currency": "SEK",
  "PageSize": 20,
  "PersonConfigurations": [
    {
      "Adults": 1,
      "ChildrenAges": [
        0
      ] 
    }
  ],
  ContentFilter{
      "Information": {
        "Operator": "AND",
        "Queries": [
          {
          "Id": 0,
          "Type": "Value",
          "Value": "string",
          "SubQuery": {
            "Operator": "OR",
            "Queries": [
              {
                "Id": 100059,
                "Type": "Value",
                "Value": "true"
              },
            "SubQuery": {}
            }
          }
        ]
      }
  }
}' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
	    "ApiKey:" "APIKEY132456789EWOK",
	    "Accept": "application/json",
		 "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
	   "PointOfSalesId": 0,
	   "Arrival": "2017-10-14",
	   "Departure": "2017-10-15",
	   "Currency": "SEK",
	   "PageSize": 20,
	   "PersonConfigurations": [
	     {
	       "Adults": 1,
	       "ChildrenAges": [
	         0
	       ] 
	     }
	   ],
"ContentFilter":{
  "Information": {
    "Operator": "AND",
    "Queries": [
      {
        "Id": 110,
        "Type": "Has",
        "Value": null
      },
      {
        "Id": 100651,
        "Type": "Value",
        "Value": "false",
        "SubQuery":{
          "Operator": "AND",
          "Queries": [
            {
              "Id": 100666,
              "Type": "Value",
              "Value": "false"
            },
            {
              "Id": 100670,
              "Type": "Value",
              "Value": "true"
            }
          ]
        }
      }
    ]
  }
}
	})  
});

Filter products by the content of the Information they carry. You can filter on the existence of an attribute or on its content. Subqueries are a bit tricky but essentially allow you to mix AND and OR operators. For example the sample query asks for products where the following boolean logic is met Has attribute 110 **OR** Attribute 100651 is false **OR** (100666 is false **AND** 100666 is true)

Operator

MatchType

Information & SubQuery objects

Parameter Type Description
Operator Operator The operator to apply between the queries.
Queries Query[] A list of query.

Query object

Parameter Type Description
Id int Attribute Id.
Type MatchType See above.
Value string The value.
SubQuery SubQuery See above.

Output Filter

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
-d '{
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14",
    "Departure": "2017-10-15",
    "Currency": "SEK",
    "PageSize": 20,
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ] 
      }
    ],
    "OutputFilter": { 
      "Attributes": [
        0
      ],
      "Categories": true,
      "Geos": true,
      "Pois": true,
      "Position": true
    }
 }' 'https://galaxy.citybreak.com/v3/api/availability/accommodation'
var r = fetch("https://galaxy.citybreak.com/v3/api/availability/accommodation",
{
	method: "POST",
	headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
	},
	body: JSON.Stringify({
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14",
    "Departure": "2017-10-15",
    "Currency": "SEK",
    "PageSize": 20,
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ] 
      }
    ],
    "OutputFilter": { 
      "Attributes": [
        99
      ],
      "Categories": false,
      "Geos": true,
      "Pois": false,
      "Position": true
    }
	})  
});

Example of response:

{
  "AccommodationSearch": {
    "PointOfSalesId": 0,
    "Arrival": "2017-10-14T00:00:00Z",
    "Departure": "2017-10-15T00:00:00Z",
    "Currency": "SEK",
    "PageSize": 20,
    "Page": 1,
    "Sort": {
      "Order": 0,
      "Field": "Price"
    },
    "PersonConfigurations": [
      {
        "Adults": 1,
        "ChildrenAges": [
          0
        ]
      }
    ],
    "ContentFilter": null,
    "OutputFilter": null
  },
  "Accommodations": [
    {
      "Id": "cbis:12345",
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=101010101",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=101010101",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          }
        ],
        "Categories": null,
        "Geos": [
          {
            "Id": 12345,
            "Path": "Sweden"
          },
          {
            "Id": 12346,
            "Path": "Vastra Gotaland"
          },
          {
            "Id": 12347,
            "Path": "Goteborg"
          }
        ],
        "Pois": null,
        "Position": {
          "Latitude": 57.7089,
          "Longitude": 11.9746
        }
      },
      "Placements": [
        {
          "Price": {
            "Price": 450,
            "TotalPersons": 2,
            "Currency": "SEK",
            "DateStart": "2017-10-14T00:00:00Z",
            "DateEnd": "2017-10-15T00:00:00Z"
          },
          "Placements": [
            {
              "Name": "Dubbelrum med xbädd ÖSD",
              "Content": {
                "PriceFrom": null,
                "Images": [],
                "Information": [
                  {
                    "Id": 99,
                    "Name": "Name",
                    "Value": "Dubbelrum med xbädd ÖSD"
                  }
                ],
                "Categories": null,
                "Geos": null,
                "Pois": null,
                "Position": null
              },
              "IncludedSubProducts": [],
              "MaxPopopulation": 3,
              "MinPopulation": 1,
              "ExtraBeds": 1,
              "PersonConfiguration": {
                "Adults": 1,
                "ChildrenAges": [
                  1
                ]
              },
              "PricePeriods": [
                {
                  "DateStart": "2017-10-14T00:00:00",
                  "DateEnd": "2017-10-15T00:00:00",
                  "AdultPrice": 300,
                  "ChildPrice": 150,
                  "TotalPrice": 450,
                  "Currency": "SEK"
                }
              ],
              "BookingConditions": {
                "Name": null,
                "Terms": null
              }
            }
          ],
          "BookingKey": "18-A"
        }
      ],
      "TotalResults": 1
    }
  ],
  "SearchId": "aaaa1234-4321-1a2b-asdf-123456asdfgh",
  "ExpirationDate": "2018-09-15T09:15:46.0619347Z",
  "TotalResults": 1
}

Output filters used in Availability queries. All the properties in the filter relate to content. Each property is optional but Attributes is an inclusive filter, if no attributes to filter on are provided all attributes are sent, while the boolean properties such as Categories default to false (which will return null for that content property)

{ "OutputFilter": { // Optional // List of ints - Optional, defaults to showing all attributes if not included "Attributes": [ 0 ], "Categories": true, // bool - Optional, defaults to false if not included "Geos": true, // bool - Optional, defaults to false if not included "Pois": true, // bool - Optional, defaults to false if not included "Position": true // bool - Optional, defaults to false if not included } }

Parameters

Parameter Type Description
Attributes int[] List of ids of product attribute content to display.
Categories bool If true display product Category content
Geos bool If true display product Geonode content
Pois bool If true display Position of Interest content
Position bool If true display product Position lat and long

Content

Content calls provide information about several content types used by your org, Attributes, GeoNodes, Points of Interest and Categories. This can be useful when creating content filters on your site as each of these types are suitable for content filtering on Availability searches. As with other calls, these are available in the languages your organisation supports and has translated (for non-system content). You need the relevant pointOfSalesId for all these calls.

All GET operations

Attributes

curl -X GET
--header 'apiKey: APIKEY132456789EWOK'  
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/content/attribute/{pointOfSaleId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/content/attribute/{pointOfSaleId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
	 "Accept-Language": "en-US"
  }  
});

Example of response:

[
  {
    "Id": 99,
    "Name": "Name",
    "Type": "String"
  },
  {
    "Id": 101,
    "Name": "Introduction",
    "Type": "String"
  },
  {
    "Id": 102,
    "Name": "Description",
    "Type": "String"
  },
  {
    "Id": 103,
    "Name": "Directions",
    "Type": "String"
  },
  {
    "Id": 104,
    "Name": "Opening hours",
    "Type": "String"
  },
   {
    "Id": 102728,
    "Name": "1 level apartment",
    "Type": "Boolean"
  },
  {
    "Id": 102729,
    "Name": "2 level apartment",
    "Type": "Boolean"
  },
  {
    "Id": 102732,
    "Name": "Cleaning included",
    "Type": "Boolean"
  },
  {
    "Id": 102733,
    "Name": "Shop",
    "Type": "Boolean"
  },
  {
    "Id": 102734,
    "Name": "Ski buses",
    "Type": "Boolean"
  }
]

Get localised Attribute information.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/content/attribute

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.

GeoNodes

curl -X GET
--header 'apiKey: APIKEY132456789EWOK'  
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/content/geo/{pointOfSaleId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/content/geo/{pointOfSaleId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Id": 69962,
  "Children": [
    {
      "Id": 105634,
      "Children": []
    },
    {
      "Id": 106922,
      "Children": [
        {
          "Id": 106923,
          "Children": []
        }
      ]
    },
    {
      "Id": 70494,
      "Children": [
        {
          "Id": 70505,
          "Children": [
            {
              "Id": 70495,
              "Children": []
            }
          ]
        }
      ]
    }
  ]
}

Get the GeoNode tree. This is a nested list of client-defined geo-locations that can be associated with products, e.g. a hotel in Gothenburg might have both the node representing Sweden and the node representing Gothenburg included in its content, enabling you to filter on either.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/content/geo

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.

Category

curl -X GET
--header 'apiKey: APIKEY132456789EWOK'  
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/content/category/{pointOfSaleId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/content/category/{pointOfSaleId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Id": 5946,
  "Children": [
    {
      "Id": 30701,
      "Children": [
        {
          "Id": 26219,
          "Children": [
            {
              "Id": 26218,
              "Children": []              
            }
          ]
        },
        {
          "Id": 26217,
          "Children": []
        },
        {
          "Id": 26220,
          "Children": [
            {
              "Id": 30610,
              "Children": []
            }
          ]
        }
      ],
    }
  ]
}

Get the Category tree. This is a nested list of client-defined categories that can be associated with products, e.g. a hotel might have both the node representing Hotel and the child node representing Boutique Hotel included in its content, enabling you to filter on either.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/content/category

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.

Point Of Interest

curl -X GET
--header 'apiKey: APIKEY132456789EWOK'  
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/content/poi/{pointOfSaleId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/content/poi/{pointOfSaleId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
   "Accept-Language": "en-US"
  }  
});

Example of response:

[
  {
    "Id": 16,
    "Name": "Leksand",
    "Position": {
      "Longitude": 15.0032043457031,
      "Latitude": 60.7338905334473
    }
  },
  {
    "Id": 17,
    "Name": "Mora (Mora-Siljan flygplats)",
    "Position": {
      "Longitude": 14.5049390792847,
      "Latitude": 60.958568572998
    }
  },
  {
    "Id": 18,
    "Name": "Borlänge (Dala Airport)",
    "Position": {
      "Longitude": 15.5104637145996,
      "Latitude": 60.4233436584473
    }
  },
  {
    "Id": 8305,
    "Name": "Inlandsbanan",
    "Position": {
      "Longitude": 16.2033634185791,
      "Latitude": 64.113899230957
    }
  },
]

Get a list of Points of Interest. This is a mixed list of system and client-defined geographic Points of Interest that can be associated with products, e.g. a hotel might be nearby a train station or a key landmark and this information can be associated with the product and used for content filtering.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/content/poi

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.

Languages

curl -X GET
--header 'apiKey: APIKEY132456789EWOK'  
--header 'Accept: application/json' 
'https://galaxy.citybreak.com/v3/api/content/language/{pointOfSaleId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/content/language/{pointOfSaleId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

[
  "en-us",
  "sv-se",
  "fr-fr"
]

Get a list of languages available for a given point of sales.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/content/language

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.

Basket

Basket calls are the most complicated in the API workflow as they encapsulate the booking process in typical “shopping basket” object that can have many operations performed on it and which has a limited life span, connected as it is to availability/bookability of products, both internal to Citybreak and from external inventories. It is NOT a reservation but products in a basket are “held” for 60 mins from the time of the Accommodation or Activity Availability Search where possible (i.e. where external inventories allow).

Create Basket

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' -d '{
  "PointOfSalesId": 1234570,
  "Currency": "SEK"
}' 'https://galaxy.citybreak.com/v3/api/basket/create'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/create",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  },
  body: JSON.Stringify({
    "PointOfSalesId": 1234570,
    "Currency": "SEK"
  })
});

Example of response:

{
  "BasketId": 12345678,
  "Success": true
}

Create a new basket object, you’ll need to preserve this ID in order to process further operations on the basket.

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/create

Parameters

Parameter Description
PointOfSalesId The point of sales identifier.
Currency The currency of the basket

Create Basket for hybrid checkout in Citybreak Online3

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' -d '{
  "PointOfSalesId": 1234570,
  "Currency": "SEK",
  "Online3Session": {
    "Id": "abcdefg12345678,
    "OnlineId": 123456789
  }
}' 'https://galaxy.citybreak.com/v3/api/basket/create'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/create",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  },
  body: JSON.Stringify({
  "PointOfSalesId": 1234570,
  "Currency": "SEK",
  "Online3Session": {
    "Id": "abcdefg12345678,
    "OnlineId": 123456789
	}
  })
});

Example of response:

{
  "BasketId": 12345678,
  "Success": true
}

This alternative way to create a basket is used when you intend to link the customer basket to a Citybreak Online3 guide for customer details & payments

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/create

Parameters

Parameter Description
PointOfSalesId The point of sales identifier.
Currency The currency of the basket.
Online3Session.Id The user session identifier.
Online3Session.OnlineId The online3 identifier.

Delete Basket

curl -X DELETE 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/delete/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/delete/{basketId}",
{
  method:"DELETE"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

true

Delete a basket. This will remove all associated information attached to the basket as well.

HTTP Request

DELETE https://galaxy.citybreak.com/v3/api/basket/delete/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket to delete.

Get Basket

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK'
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/{basketId}",
{
  method:"GET"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "BasketId": 48869100,
  "Groups": [
    {
      "Id": 1136433,
      "Name": "BookVisit Hotel",
      "Content": {
        "PriceFrom": 0,
        "Images": [
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=101010101010",
            "IsMain": true,
            "Name": null,
            "Copyright": null,
            "Description": null
          },
          {
            "Uri": "//images.citybreak.com/image.aspx?ImageId=1010101010",
            "IsMain": false,
            "Name": null,
            "Copyright": null,
            "Description": null
          }
        ],
        "Information": [
          {
            "Id": 99,
            "Name": "Name",
            "Value": "BookVisit Hotel"
          },
          {
            "Id": 101,
            "Name": "Introduction",
            "Value": "Leading e-commerce platform for the DMO and individual hotels in the Nordics."
          },
          {
            "Id": 102,
            "Name": "Description",
            "Value": "The absolute Leading e-commerce platform for the DMO and individual hotels in the Nordics!"
          },
          {
            "Id": 100038,
            "Name": "Elevator",
            "Value": "False"
          },
          {
            "Id": 100163,
            "Name": "Reception",
            "Value": "False"
          }
        ],
        "Categories": null,
        "Geos": [],
        "Pois": [],
        "Position": null
      },
      "Products": [
        {
          "BookItemId": 8,
          "Addons": [
            {
              "Id": 9,
              "NoUnits": 1,
              "IsExtraBed": false,
              "Name": null,
              "IsDeletable": false,
              "Price": {
                "Price": 150,
                "VatAmount": 30,
                "Currency": "SEK"
              }
            }
          ],
          "Persons": [
            {
              "Name": "Vuxen",
              "No": 1
            },
            {
              "Name": "Barn 0-11",
              "No": 1
            }
          ],
          "Guests": [
            {
              "GuestLinkId": 6,
              "PriceGroupName": "Vuxen",
              "Guest": {
                "GuestId": 1,
                "NameFirst": "Test",
                "NameLast": "User",
                "Age": 35,
                "Sex": "F",
                "Salutation": "Ms"
              }
            },
            {
              "GuestLinkId": 7,
              "PriceGroupName": "Barn 0-11",
              "Guest": {
                "GuestId": 2,
                "NameFirst": null,
                "NameLast": null,
                "Age": 0,
                "Sex": null,
                "Salutation": null
              }
            }
          ],
          "NoUnits": 1,
          "StartDate": "2017-10-14T00:00:00Z",
          "EndDate": "2017-10-15T00:00:00Z",
          "Content": {
            "PriceFrom": null,
            "Images": [
              {
                "Uri": null,
                "IsMain": false,
                "Name": null,
                "Copyright": null,
                "Description": null
              }
            ],
            "Information": [
              {
                "Id": 99,
                "Name": "Name",
                "Value": "Dubbelrum"
              }
            ],
            "Categories": null,
            "Geos": null,
            "Pois": null,
            "Position": null
          },
          "Name": "Dubbelrum",
          "IsDeletable": true,
          "Price": {
            "Price": 350,
            "VatAmount": 5.172413793103448,
            "Currency": "SEK"
          }
        }
      ],
      "Price": {
        "Price": 500,
        "VatAmount": 35.172413793103445,
        "Currency": "SEK"
      },
      "Position": null
    }
  ],
  "OkToBook": true,
  "TotalPrice": {
    "Price": 500,
    "VatAmount": 35.172413793103445,
    "Currency": "SEK"
  },
  "PointOfSalesId": 17692,
  "AutoCancellationDate": "9999-12-31T23:59:59.9999999",
  "CancellationInsurrances": []
}

Get a basket. This will fetch a Basket along with all associated information attached to the Basket (the example has one booking added to it). This includes the product booked, the total price and VAT, possible cancellation insurances (can be added), OkToBook which will be checked before the Basket can be committed and Guest Information which is a separate entity to the number of people included and is used to track and record customer information (also can be added to the booking item later in the basket process). Of note is the BookItemId in the Products section, it is used to delete the item from the basket.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket

Query Parameters

Parameter Description
basketId The Id of the basket to get.

Find basket by session for hybrid checkout in Citybreak Online3

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/findByOnline3Session?pointOfSalesId={pointOfSalesId&online3Session={online3Session}&online3Id={online3Id}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/findByOnline3Session?pointOfSalesId={pointOfSalesId&online3Session={online3Session}&online3Id={online3Id}",
{
  method:"GET"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

48869100

In Online3 hybrid checkout setups, this locates an existing basket by an Online3 session id. Returns the basket id, if found.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/findByOnline3Session?pointOfSalesId={pointOfSalesId&online3Session={online3Session}&online3Id={online3Id}

Query Parameters

Parameter Description
pointOfSalesId The point of sales identifier.
online3Session The online 3 session.
online3Id The online 3 guide identifier

Add Accommodation Booking Item

curl -X PUT 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/add/accommodation/{basketId}/{searchId}/{bookKey}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/add/accommodation/{basketId}/{searchId}/{bookKey}",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Success": true,
  "BookItemIds": [1,2]
}

Add a booking item to the basket, you must first have checked for the Accommodation Availability of a property or properties (or Activity/s) and obtained the search Id and the bookingKey of the product you wish to add to the basket.

PUT https://galaxy.citybreak.com/v3/api/basket/add/accommodation

Query Parameters

Parameter Description
basketId The Id of the basket.
searchId The search Id returned by the Accommodation or Activity Availability Response
bookKey The key of the booking item (product) to add to the basket, found in the Accommodation or Activity Availability Search

Add No Placement Accommodation Booking Item

curl -X PUT 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
--header 'Accept-Language: en-us' -d '[
  {
    "BookKey": "1-A",
    "Amount" 2
  }, {
    "BookKey": "2-A",
    "Amount": 1
  }
]' 'https://galaxy.citybreak.com/v3/api/basket/add/accommodation/noplacement/{basketId}/{searchId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/add/accommodation/noplacement/{basketId}/{searchId}",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  },
  body: JSON.Stringify(
    [
      {
        "BookKey": "1-A",
        "Amount": 1
      }, {
        "BookKey": "2-A",
        "Amount": 2
      }
    ])
});

Example of response:

{
  "Success": true,
  "BookItemIds": [1,2]
}

Adds booking items to the basket, you must first have checked for the No Placement Accommodation Availability of a property or properties and obtained the search Id and the bookingKey of the products you wish to add to the basket.

PUT https://galaxy.citybreak.com/v3/api/basket/add/accommodation/noplacement

Query Parameters

Parameter Description
basketId The Id of the basket.
searchId The search Id returned by the Accommodation Availability Response
BookKey The key of the booking item to add to the basket, found in Availability Response
Amount The amount to book for this item

Add Fuzzy Accommodation Booking Item

curl -X PUT 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/add/accommodation/fuzzy/{basketId}/{searchId}/{bookId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/add/accommodation/fuzzy/{basketId}/{searchId}/{bookId}",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Success": true,
  "BookItemIds": [1,2]
}

Specifically for the Fuzzy search, to add a booking item to the basket you must first have checked for the Fuzzy Availability of a property or properties and obtained the search Id and the bookId of the product you wish to add to the basket. NOTE: the bookId is obtained from the BookableAlternatives and is a separate entity from the bookKey used in the regular basket operation

PUT https://galaxy.citybreak.com/v3/api/basket/add/accommodation/fuzzy/

Query Parameters

Parameter Description
basketId The Id of the basket.
searchId The search Id returned by the Availability Response
bookId The Id of the booking item (product) to add to the basket, found in the Fuzzy Availability Response

Add Activity Booking Item

curl -X PUT 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' -d '[
  {
    "BookKey": "1-T",
    "Amount" 2
  }, {
    "BookKey": "2-T",
    "Amount": 1
  }
]' 'https://galaxy.citybreak.com/v3/api/basket/add/activity/{basketId}/{searchId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/add/activity/{basketId}/{searchId}",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  },
  body: JSON.Stringify(
    [
      {
        "BookKey": "1-T",
        "Amount": 1
      }, {
        "BookKey": "2-T",
        "Amount": 2
      }
    ])
});

Example of response:

{
  "Success": true,
  "BookItemIds": [1,2]
}

Add a booking item to the basket, you must first have checked for the Availability of an activity and obtained the search Id and the bookingKey of the product you wish to add to the basket.

PUT https://galaxy.citybreak.com/v3/api/basket/add/activity

Parameters

Parameter Description
basketId The Id of the basket.
searchId The search Id returned by the Availability Response
BookKey The key of the booking item to add to the basket, found in Availability Response
Amount The amount to book for this item

Delete Booking Item

curl -X DELETE 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/deleteItem/{basketId}/{bookItemId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/deleteItem/{basketId}/{bookItemId}",
{
  method:"DELETE"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

true

Delete a booking item from the basket. In the Get Basket response you can find the bookItemId (this is different to the booking key and is specific to the basket)

HTTP Request

DELETE https://galaxy.citybreak.com/v3/api/basket/deleteItem

Query Parameters

Parameter Description
basketId The Id of the basket.
bookItemId The Id of the booking item to delete from the basket

Toggle Cancellation Insurance

curl -X PUT 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/cancellation/{basketId}/{cancellationId}/{true|false}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/cancellation/{basketId}/{cancellationId}/{true|false}",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

no content

If your basket has a set of cancellation insurances you can use this call to add one (true) or switch it off (false)

HTTP Request

PUT https://galaxy.citybreak.com/v3/api/basket/cancellation

Query Parameters

Parameter Description
basketId The Id of the basket.
cancellationId The Id of the cancellation insurance to toggle
state true (added) or false (not added)

Update Customer Information

curl -X POST 
--header 'Content-Type: application/json' 
--header 'apiKey: APIKEY132456789EWOK'
--header 'Accept-Language: en-us' -d '{
   "NameFirst": "Test",
   "NameLast": "User",
   "Salutation": "Ms",
   "CustomerType": "Private",
   "Culture": "en-US",
   "Address": { 
     "StreetAddress1": "Test Road 123",
     "PostalCode": "41111",
     "City": "Gothenburg",
     "CountryCode": "SE"
   },
   "Email": "testuser%40visit.com",
   "PhoneMobile": { 
     "CountryCode": "46",
     "AreaCode": "07",
     "Number": "2222222"
   }
 }' 'https://galaxy.citybreak.com/v3/api/basket/customer/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/customer/{basketId}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
  body: JSON.Stringify({
    "NameFirst": "Test",
    "NameLast": "User",
    "Salutation": "Ms",
    "CustomerType": "Private",
    "Culture": "en-US",
    "Address": {
      "StreetAddress1": "Test Road 123",
      "PostalCode": "41111",
      "City": "Gothenburg",
      "CountryCode": "SE"
    },
    "Email": "testuser@visit.com",
    "PhoneMobile": {
      "CountryCode": "46",
      "AreaCode": "07",
      "Number": "2222222"
    }
  }
}
});

Example of response:

no content

To commit a Basket you will need to provide customer information. This is fairly standard: name, address, email. phone, etc. for the person conducting the booking (not necessarily the Guests)

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/customer

Query Parameters

Parameter Description
basketId The Id of the basket.

Get Customer Information

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK'
--header 'Accept-Language: en-US' 
'https://galaxy.testcitybreak.com/v3/api/basket/customer/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/customer/{basketId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "NameFirst": "Test",
  "NameLast": "User",
  "Salutation": null,
  "CustomerNumber": null,
  "CustomerType": 1,
  "Culture": "en-US",
  "CivicRegistrationNumber": null,
  "Company": null,
  "CompanyDepartment": null,
  "Address": {
    "StreetAddress1": "Test Road 123",
    "StreetAddress2": null,
    "StreetAddress3": null,
    "PostalCode": "41111",
    "City": "Gothenburg",
    "CountryCode": "SE",
    "State": null
  },
  "Email": "testuser@visit.com",
  "PhoneHome": {
    "CountryCode": null,
    "AreaCode": null,
    "Number": null
  },
  "PhoneWork": {
    "CountryCode": null,
    "AreaCode": null,
    "Number": null
  },
  "PhoneMobile": {
    "CountryCode": "46",
    "AreaCode": "07",
    "Number": "2222222"
  }
}

Get currencies available for a given Point of Sale. Availability searches will require a currency for a valid search.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/customer

Query Parameters

Parameter Description
basketId The Id of the basket.

Commit Basket

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-US' 
'https://galaxy.citybreak.com/v3/api/basket/commit/async/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/commit/async/{basketId}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
}  
});

Example of response:

int32

This is the method used to start a commit job for a basket. You only need to provide the Basket Id for this call. As there may be many products from different internal and external providers this is essentially a two step async operation. Once you have commited the basket you can query Commit Status to get the status of the job and the ReservationID and BookingCode if it is completed. Before you may commit a basket, there is some information you must provide first. Add at least one Booking Item (Accommodation, Fuzzy Accommodation or Activity) and provide Customer Information.

The return value is a job number with which you can check the status of commit

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/commit/async/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket.

Commit Status

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-US'

'https://galaxy.citybreak.com/v3/api/basket/commit/status/{commitJobId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/commit/status/{commitJobId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
    "Accept-Language": "en-US"
  }  
});

Example of response:

{
  "Status": "CompletedOk",
  "Subtasks": [
    {
      "Task": "StartingCommit",
      "Status": "CompletedOk",
      "ExtraInfo": null
    },
    {
      "Task": "CreatingConfirmations",
      "Status": "CompletedOk",
      "ExtraInfo": null
    },
    {
      "Task": "CreditCardAction",
      "Status": "CompletedOk",
      "ExtraInfo": null
    },
    {
      "Task": "CreatingInvoices",
      "Status": "NotStarted",
      "ExtraInfo": null
    },
    {
      "Task": "CreatingStatistics",
      "Status": "NotStarted",
      "ExtraInfo": null
    },
    {
      "Task": "FinishingTransaction",
      "Status": "CompletedOk",
      "ExtraInfo": null
    }
  ],
  "ResvversionId": 1234567,
  "BookingCode": "EWOK12"
}

Gets the ResvversionId (reservation version id) and BookingCode, important for Reservation calls, and the status of a commit job. Get the commit job id when you make the Commit.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/commit/status

Query Parameters

Parameter Description
commitJobId The Id of the commit job returned from Commit Basket

Add Guest

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/guests/add/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/guests/add/{basketId}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
  body: JSON.Stringify([
    {
      "GuestId": 1,
      "NameFirst": "Test",
      "NameLast": "User",
      "Age": 35,
      "Sex": "F",
      "Salutation": "Ms"
    }
  ]
);

Returns Response Code 204 if successful. Add a guest to a Booking Item, this is not the same as Customer Information. The Guest ID in the filter must match one in the Basket or be 0 to create a new guest

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/guests/add

Query Parameters

Parameter Description
basketId The Id of the basket.

Addons products

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/api/basket/addon/{basketId}/{bookItemId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/api/basket/addon/{basketId}/{bookItemId}",
{
  method:"GET"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }
);

Example of response

{
    "BookItemId": 1,
    "ProductName": "My activity name",
    "AvailableAddons": [
        {
            "NeedsToSpecifyPricegroups": false,
            "NeedsToSpecifyQuantity": true,
            "Name": "Sparkling wine",
            "AddonId": 445409,
            "AmountType": "Unlimited",
            "Prices": [
	    	{
	            "PricegroupId": null,
		    "PricegroupName": "",
		    "IsLocalized": false,
		    "Price": {
		        "Price": 175,
		        "VatAmount": 0,
		        "Currency": "NOK"
		    }		    
	        }
            ]
        }
    ]
}

Once a product is added to the basket, all mandatory included sub products are also included. There may however be addon products that are optional.

These calls allows you to get a list of available addons. The main product is refered to by its ID in the basket, the BookItemId. You can get all the addons for a given basket or a given product in a basket.

If NeedsToSpecifyQuantity is set to true you can set it to any value between 0 and 50 depending on the number of units you require.

If NeedsToSpecifyQuantity is set to false you can set quantity to either 0 or 1 depending on if you would like to include the product or not.

If NeedsToSpecifyPricegroups is set to true you need to configure each price group item with the specified quantity.

If the addon is included as one per guest, that configuration must be submitted for each guest, also the price is known at that time and presented with a price group information.

In this case the NeedsToSpecifyQuantity is set and you will have to configure how many items you would like. The price is then presented in the config item so you can tell the price depending on the number of units selected.

The PricegroupId set to null represents that the price is not dependent on pricegroup but on the type Unit, meaning that regardless of the age of the person associated with the item, the price will be the same. In this case you don’t need to supply price group information when adding the addon to a product.

IsLocalized tells the consumer if the price group is generated using the translation of the price group. If set to false you will have to bring your own translation when presenting in to the user.

HTTP Requests

GET https://galaxy.citybreak.com/v3/api/api/basket/addon/{basketId}/{bookItemId}
GET https://galaxy.citybreak.com/v3/api/api/basket/addon/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket.
bookItemId The Id of the booking item on which to operate

Add addon product

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' -d '{
  "Queries": [
    {
      "BookItemId": 1,
      "AddonId": 445409,
      "PriceGroupId": null,
      "Quantity": 2
    }
  ]
}' 'https://galaxy.citybreak.com/v3/api/basket/addon/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/addon/{basketId}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
  body: JSON.Stringify(
    {
      "Queries": [
      {
        "BookItemId": 1,
        "AddonId": 445409,
        "PriceGroupId": null,
        "Quantity": 2
      }
    ]
  }
);

The example call will add 2 sparkling wine to the item with BookItemId 1, PriceGroupId can be null or omitted as it is an addon of type Unlimited and NeedsToSpecifyPricegroups is false.

HTTP Requests

POST https://galaxy.citybreak.com/v3/api/api/basket/addon/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket.
Queries List of addons to add
BookItemId Id in the basket of the product which should receive the addon
AddonId Id of the addon to add
PriceGroupId The price group to use if NeedsToSpecifyPricegroups is true
Quantity Amount to add

Delete addon product

curl -X DELETE 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/basket/addon/{basketId}/{bookItemId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/addon/{basketId}/{bookItemId}",
{
  method:"DELETE"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
);

Deletes the addon with id in basket BookItemId.

HTTP Requests

DELETE https://galaxy.citybreak.com/v3/api/api/basket/addon/{basketId}/{bookItemId}

Query Parameters

Parameter Description
basketId The Id of the basket.
bookItemId Id in the basket of the addon you wish to remove

Get supplier messages

curl -X GET 
--header 'apiKey: APIKEY132456789EWOK'
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/suppliermessage/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/suppliermessage/{basketId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
    "Accept-Language": "en-US"
  }  
});

Example of Response

[
    {
        "SupplierName": "HafjellKvitfjell Booking AS - Hytter",
        "SupplierId": 54705,
        "Message": null
    }
]

It is possible to send a note to the supplier while acting on the basket. This call will result in a list of available suppliers and the configured messages.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/suppliermessage/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket.

Set supplier messages

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' -d '[
  {
    "SupplierId": 54705,
    "Message": "Will arrive late."
  }
]' 'https://galaxy.citybreak.com/v3/api/basket/suppliermessage/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/suppliermessage/{basketId}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
  body: JSON.Stringify([
    {
      "SupplierId": 54705,
      "Message": "Will arrive late."
    }
  ]
);

Update the messages by posting to the same url The example will set the message to the supplier. You can update one or more messages to the suppliers with a single post.

Update Cancellation Insurance status

curl -X PUT 
--header 'apiKey: APIKEY132456789EWOK'
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/cancellation/{basketId}/{insuranceId}/{state}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/cancellation/{basketId}/{insuranceId}/{state}",
{
  method:"PUT"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
);

If an cancellation insurance is available, you can find a reference in the basket to it.

/* parts of the basket */ "CancellationInsurances": [ { "Name": "Avbestillingsforsikring ", "Description": "", "Id": 97, "CurrentCost": 500, "Currency": "NOK", "Selected": false, "PreSelect": false, "CanBeChanged": true, "Introduction": "", "CancellationInsuranceProducts": [] } ]

The state is either true or false.

The basket price will reflect the new total. The insurance is usually based on the types of products that are included in the basket right now. It could be fixed per booking, fixed per product or a percentage of the product cost. Hence the CurrentCost.

Get Complementary Information

curl -X GET 
--header 'apiKey: APIKEY132456789EWOK'
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
'https://galaxy.citybreak.com/v3/api/basket/complementary/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/complementary/{basketId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
    "Accept-Language": "en-US"
  }  
});

Example of Response

{
  "BasketId": 123456,
  "Products": [
    {
      "ProductName": "Generic Activity",
      "ItemId": "1",
      "ComplementaryInfo": [
        {
          "Code": "#COMP-3",
          "Value": "",
          "Type": "Boolean",
          "IsRequired": true,
          "Label": "Require a guide?",
          "Comment": null,
          "Message": null,
          "Constraints": null
        }
      ],
      "Persons": [
        {
          "ItemId": "db2bca44-e134-4709-b604-61e8baa798f4",
          "ComplementaryInfo": [
            {
              "Code": "#COMP-0",
              "Value": "",
              "Type": "Date",
              "IsRequired": false,
              "Label": "Estimated Arrival Date",
              "Comment": null,
              "Message": null,
              "Constraints": {
                "MaxStringLength": null,
                "MinStringLength": null,
                "MinIntValue": null,
                "MaxIntValue": null,
                "MinDecimalValue": null,
                "MaxDecimalValue": null,
                "MinDateValue": "0001-01-01T00:00:00",
                "MaxDateValue": "9999-12-31T00:00:00",
                "MaxImageHeightInPx": null,
                "MaxImageWidthInPx": null,
                "MaxImageSizeInBytes": null
              }
            }
          ]
        }
      ],
      "AddOns": [
        {
          "AddOnName": "Helmet",
          "ItemId": "2",
          "ComplementaryInfo": [
            {
              "Code": "#COMP-1",
              "Value": "",
              "Type": "Integer",
              "IsRequired": false,
              "Label": "Helmet Size",
              "Comment": null,
              "Message": null,
              "Constraints": {
                "MaxStringLength": null,
                "MinStringLength": null,
                "MinIntValue": 1,
                "MaxIntValue": 20,
                "MinDecimalValue": null,
                "MaxDecimalValue": null,
                "MinDateValue": null,
                "MaxDateValue": null,
                "MaxImageHeightInPx": null,
                "MaxImageWidthInPx": null,
                "MaxImageSizeInBytes": null
              }
            }
          ],
        }
      ]
    }
  ]
}

Complementary info for products can be retrieved from a basket. This information is often used for things like arrival dates, the names of participants in an activity or any other information that the activity supplier might require in the booking.

Complementary info can be required or optional and is typed. Currently supported types are Boolean, Integer, Decimal, String, Date and ImageLink. Complementary info may also come with constraints depending on type. If any update attempts are made to info that conflicts with these type restrictions or constraints they will not be successful.

Each Complement is attached to either the main product, the persons who are attached to the product (this may not refer to any specific person but simply the idea of a participant or guest) or to the add on product. These objects are identified by their ItemId (for products and add ons this ItemId is equivalent to the BookItemId in the Get Basket call), each complementary that is attached to an item will also have a unique Code within that context. These two identifiers are important for updating the Value

HTTP Request

GET https://galaxy.citybreak.com/v3/api/basket/complementary/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket.

Set Complementary Information

curl -X POST 
--header 'Content-Type: application/json' 
--header 'Accept: application/json' 
--header 'Accept-Language: en-us' 
--header 'apiKey: APIKEY132456789EWOK' -d '[
  {
    "BookItemId": "f18658ea-6cbd-41cf-b243-30799e3e0598",
    "Code": "#COMP-0",
    "Value": "2019-04-01"
  },
  {
    "BookItemId": "2",
    "Code": "#COMP-1",
    "Value": "1000"
  },
    {
    "BookItemId": "1",
    "Code": "#COMP-3",
    "Value": "This is not a Boolean"
  }
]' 'https://galaxy.citybreak.com/v3/api/basket/complementary/{basketId}'
var r = fetch("https://galaxy.citybreak.com/v3/api/basket/complementary/{basketId}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
    "Accept-Language": "en-US"
  }  
  body: JSON.Stringify([
  {
    "BookItemId": "f18658ea-6cbd-41cf-b243-30799e3e0598",
    "Code": "#COMP-0",
    "Value": "2019-04-01"
  },
  {
    "BookItemId": "2",
    "Code": "#COMP-1",
    "Value": "1000"
  },
    {
    "BookItemId": "1",
    "Code": "#COMP-3",
    "Value": "This is not a Boolean"
  }
]
);

Example of Response

[
    {
        "Code": "#COMP-0",
        "ItemId": "f18658ea-6cbd-41cf-b243-30799e3e0598",
        "Success": true,
        "Error": ""
    },
    {
        "Code": "#COMP-1",
        "ItemId": "2",
        "Success": false,
        "Error": "Value - 1000 - must be between 1 and 20"
    },
    {
        "Code": "#COMP-3",
        "ItemId": "1",
        "Success": false,
        "Error": "Value - This is not a Boolean - must be a Boolean"
    }
]

When setting complementary information you need the basketId of the booking you wish to update and for each complementary, the ItemId and Code. It is important to take note of the type of the information and if there are any constraints. Valid updates will be made, invalid ones won’t. The return type is a list of successful and unsuccessful updates along with a reason why an update failed if Success is false. To the right you can see one successful and two unsuccessful updates in the examples.

The update object is fairly simple:

[ { "ItemId": "f18658ea-6cbd-41cf-b243-30799e3e0598", "Code": "#COMP-0", "Value": "2019-04-01" } ]

HTTP Request

POST https://galaxy.citybreak.com/v3/api/basket/complementary/{basketId}

Query Parameters

Parameter Description
basketId The Id of the basket.
list of updates the POST body with updates

Reservation

Reservation calls provide information on, and the ability to cancel, bookings that have been commited. The BookingCode is a universal reference for a reservation while the ReservationVersionId will show you the different versions of the booking if things have been changed

GET and POST operations

Get Reservation

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/{bookingCode}'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/{bookingCode}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

[
  {
    "BookingCode": "EWOK12",
    "ReservationVersionId": 1234567,
    "Version": 1,
    "Created": "2017-09-27T13:12:54.1938577Z"
  },
  {
    "BookingCode": "EWOK12",
    "ReservationVersionId": 1234568,
    "Version": 2,
    "Created": "2017-09-27T13:14:54.4237553Z"
  }
]

Gets all the versions of a booking that have been created with a Booking Code

HTTP Request

GET https://galaxy.citybreak.com/v3/api/reservation

Query Parameters

Parameter Description
BookingCode The code representing the reservation returned from Commit Status

Get Reservation Version

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/version/{reservationVersionId}}'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/version/{reservationVersionId}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{
  "BookingCode": "EWOK12",
  "Version": 1,
  "BookingDate": "2017-09-27T13:12:54.1938577Z",
  "AutoCancellation": "9999-12-31T23:59:59.9999999",
  "Fees": [],
  "BookingUser": {
    "Id": 113685,
    "NameFirst": "Galaxy",
    "NameLast": "Api user",
    "Email": null
  },
  "CancellationMessage": null,
  "LastCancellation": "2017-10-05T15:48:05.997Z",
  "Customer": {
    "NameFirst": "Test",
    "NameLast": "User",
    "Salutation": null,
    "CustomerNumber": null,
    "CustomerType": 0,
    "Culture": null,
    "CivicRegistrationNumber": null,
    "Company": null,
    "CompanyDepartment": null,
    "Address": {
      "StreetAddress1": "Test Road 123",
      "StreetAddress2": null,
      "StreetAddress3": null,
      "PostalCode": "41111",
      "City": "Gothenburg",
      "CountryCode": "SE",
      "State": null
    },
    "Email": null,
    "PhoneHome": {
      "CountryCode": null,
      "AreaCode": null,
      "Number": null
    },
    "PhoneWork": {
      "CountryCode": null,
      "AreaCode": null,
      "Number": null
    },
    "PhoneMobile": {
      "CountryCode": "46",
      "AreaCode": "07",
      "Number": "2222222"
    }
  },
  "ProductGroups": [
    {
      "Products": [
        {
          "Id": 3,
          "Name": "Dubbelrum",
          "Price": 350
        }
      ],
      "Id": 153663,
      "Name": "BookVisit Hotel"
    }
  ]
}

Gets all the information about a booking by version

HTTP Request

GET https://galaxy.citybreak.com/v3/api/reservation/version

Query Parameters

Parameter Description
reservationVersionId The Id for the specific version of the Reservation

Get Latest Reservation Version

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/latest/{bookingCode}'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/latest/{bookingCode}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{
  "BookingCode": "EWOK12",
  "Version": 1,
  "BookingDate": "2017-09-27T13:12:54.1938577Z",
  "AutoCancellation": "9999-12-31T23:59:59.9999999",
  "Fees": [],
  "BookingUser": {
    "Id": 113685,
    "NameFirst": "Galaxy",
    "NameLast": "Api user",
    "Email": null
  },
  "CancellationMessage": null,
  "LastCancellation": "2017-10-05T15:48:05.997Z",
  "Customer": {
    "NameFirst": "Test",
    "NameLast": "User",
    "Salutation": null,
    "CustomerNumber": null,
    "CustomerType": 0,
    "Culture": null,
    "CivicRegistrationNumber": null,
    "Company": null,
    "CompanyDepartment": null,
    "Address": {
      "StreetAddress1": "Test Road 123",
      "StreetAddress2": null,
      "StreetAddress3": null,
      "PostalCode": "41111",
      "City": "Gothenburg",
      "CountryCode": "SE",
      "State": null
    },
    "Email": null,
    "PhoneHome": {
      "CountryCode": null,
      "AreaCode": null,
      "Number": null
    },
    "PhoneWork": {
      "CountryCode": null,
      "AreaCode": null,
      "Number": null
    },
    "PhoneMobile": {
      "CountryCode": "46",
      "AreaCode": "07",
      "Number": "2222222"
    }
  },
  "ProductGroups": [
    {
      "Products": [
        {
          "Id": 3,
          "Name": "Dubbelrum",
          "Price": 350
        }
      ],
      "Id": 153663,
      "Name": "BookVisit Hotel"
    }
  ]
}

Gets all the information about a booking by version

HTTP Request

GET https://galaxy.citybreak.com/v3/api/reservation/latest

Query Parameters

Parameter Description
BookingCode The code representing the reservation returned from Commit Status

Cancel Reservation

curl -X POST 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/cancel/{bookingCode}'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/cancel/{bookingCode}",
{
  method:"POST"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json",
  }  
});

Example of response: int32

This will cancel a reservation. Similarly to committing a Basket, it returns an integer. Use this value in Commit Status to see the status of your cancel job

HTTP Request

POST https://galaxy.citybreak.com/v3/api/reservation/cancel/{bookingCode}

Query Parameters

Parameter Description
BookingCode The code representing the reservation returned from Commit Status

Get Cancel Information

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/reservation/cancel/info/{bookingCode}'
var r = fetch("https://galaxy.citybreak.com/v3/api/reservation/cancel/info/{bookingCode}",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{
  "BookingCode": "EWOK12",
  "NoProducts": 1,
  "ReservationVersionId": 1234567,
  "LastCancellationDate": "9999-12-31T23:59:59.9999999"
}

[DEPRECATED] After a cancellation, get the cancellation info of the booking based on the booking code.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/reservation/cancel/info

Query Parameters

Parameter Description
BookingCode The code representing the reservation returned from Commit Status

Country Code

Country Code calls provide information about available country codes for your API key. There are two calls, one to provide all available country codes and one HEAD call to check if a specified country code is supported.

GET and HEAD operations

Country Code

curl -X GET 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK' 
'https://galaxy.citybreak.com/v3/api/countrycode'
var r = fetch("https://galaxy.citybreak.com/v3/api/countrycode",
{
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

[
  "SE",
  "US"
]

Gets all available country codes for a specified API key.

HTTP Request

GET https://galaxy.citybreak.com/v3/api/countrycode

Check Country Code

curl -X HEAD 
--header 'Accept: application/json' 
--header 'apiKey: APIKEY132456789EWOK'
'https://galaxy.citybreak.com/v3/api/countrycode/{CountryCode}'
var r = fetch("https://galaxy.citybreak.com/v3/api/countrycode/{CountryCode}",
{
  method: "HEAD"
  headers: {
    "ApiKey:" "APIKEY132456789EWOK",
    "Accept": "application/json"
  }  
});

Example of response:

{}

Returns a 200 status code if country code is supported, otherwise 404.

HTTP Request

HEAD https://galaxy.citybreak.com/v3/api/countrycode/{CountryCode}

Errors

The API uses the following error codes:

Error Code Meaning
400 Bad Request – Could not understand your request
401 Unauthorized – Your API key is not valid for this call
404 Not Found – Could not find what you are looking for
405 Method Not Allowed – Method not supported for this request
500 Internal Server Error – Server trouble, try again later. If recurring, contact us.
503 Service Unavailable – Offline for maintanance. Please try again later.

Breaking changes

V3