GET products

Pull a list of random products from the Travel Products Catalog.

Endpoint

GET https://app.airkit.com/travel-products-catalog/products

cURL

curl --request GET \
     --url 'https://app.airkit.com/travel-products-catalog/products?collection=all&instances=3' \
     --header 'accept: application/json'

Query Params

collection (String; optional; default: "all")

The product collection to pull products from:

  • all

  • basics

  • ultramodern

instances (Number; optional; default: 3)

The desired number of random products to pull from the product catalog. If the given number exceeds the number of products in the catalog, this endpoint will return all available products.

Responses

200

Returns list of Product Objects.

Example

[
  {
    "__id": "20b544f2-b413-4f14-ad62-490fde66c60e",
    "invention_date": {
      "year": 1804,
      "month": 2,
      "day": 21
    },
    "image": "https://media4.giphy.com/media/8F3bK4aq1tCo0TLkf7/giphy.gif?cid=794be903jrapsn5xqr77pmkphfjqnzlpslj6u7w4vuqjekag&rid=giphy.gif&ct=g",
    "product_description": "A series of connected vehicles that run along a railway track and transport people or freight.",
    "product_name": "Train",
    "price": {
      "amount": 50000000,
      "precision": 2,
      "code": "USD"
    },
    "product_collection": "Basics"
  },
  {
    "__id": "308ed89f-c778-4643-9d57-15456e9ede06",
    "invention_date": {
      "year": 2059,
      "month": 8,
      "day": 6
    },
    "image": "https://media1.giphy.com/media/pNmNFCnsLhIKlqYK7G/giphy.gif?cid=794be903bk0y9avvqc3ogf7j2kgivtwr6jdckvjgog7kire2&rid=giphy.gif&ct=g",
    "product_description": "Travel from one location to another in a matter of milliseconds!",
    "product_name": "Personal Teleporter",
    "price": {
      "amount": 500000,
      "precision": 0,
      "code": "USD"
    },
    "product_collection": "Ultramodern"
  },
  {
    "__id": "fe2e9c82-980e-481d-a73a-35b4859df246",
    "invention_date": {
      "year": 1791,
      "month": 8,
      "day": 26
    },
    "image": "https://media1.giphy.com/media/r1jbtDXIAjq92/giphy.gif?cid=794be9033vyacn7clqv79ndhwca58e2jmgq3oeoobrmvmiz9&rid=giphy.gif&ct=g",
    "product_description": "An insular, steam-powered boat for traveling on lakes and rivers, just like the 1787 delegates from the Constitutional Convention.",
    "product_name": "Steamboat",
    "price": {
      "amount": 14000,
      "precision": 0,
      "code": "USD"
    },
    "product_collection": "Basics"
  }
]

400

Returns Error Object.

Example

{
  "error": "Invalid Query Parameters",
  "description": "Valid collection value required: 'all', 'ultramodern', or 'basics'."
}

Last updated