⇡ GET /products

City Connect has 3 different objects that define products: product, option and tour

Product is the parent that can have multiple options. e.g. Romantic Sunset Tour
Option is a variation of a product, e.g. Include Dinner / Excludes Dinner
Tour is returned on the availability callback and defines a departure time and language which the customer must chose from.

Options and Tours are optional. For example a visitor attraction might not need to have options and tours, instead just the travel date the booking is for.

An example is below:

FieldExample
ProductRomantic Sunset Tour
Options- Including Picnic Dinner
- Excluding Picnic Dinner
Tours- 10:30 / English
- 10:30 / French
- 12:30 / English
- 14:30 / English

The /products request must be made as a GET request to https://api.cityconnect.net/v1/products. You must use your email and token created in your account as HTTP Basic Authentication header to authenticate the request.

You must also provide a supplier parameter, indicating the supplier you wish to query products for. This will respond with a 403 Forbidden if you do not have access to that supplier account.

Your response should have an HTTP status code of 200, and be a JSON array of all your products, options. For example:

curl https://api.cityconnect.net/v1/products?supplier=bookings%40bustours.za \
  -H 'Accept: application/json' \
  -u capetowntours.com:XjWNW66RCylqeMU556UaYw
{
  "HOHOZA": {
    "name": "Hop on Hop Off",
    "supplier": "bookingsbustours.za",
    "country": "ZA",
    "city": "CPT",
    "freesale": true,
    "currency": "USD",
    "options": {
      "1DAYPASS": { "name": "1 Day Pass" },
      "2DAYPASS": { "name": "2 Day Pass" }
		}
  },
  "WINETOUR": {
    "name": "Wine Tour",
    "supplier": "[email protected]",
    "country": "ZA",
    "city": "CPT",
    "freesale": false,
    "currency": "USD",
    "options": {}
  }
}

A description of each field is given in the table in the section below.

FieldDescription
nameThe name of the product.
supplierThe supplier account email that owns and supplies this product.

All availability and reservation requests will then defer to that account instead of coming from yours.

Booking notifications will be delivered to both your account and their account.

Leave this blank if you are the original supplier of the product.
codeA unique code that uniquely identifies the product within your account.
countryThe ISO code representing the country
cityThe UN/LOCODE representing the city.
freesaleWhether this product can be sold without having to lookup availability
currencyThe currency all rates will be quoted in
options[*]The option code
options[*][code]The option name