Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

API Next is Softrip's latest version of the CMS API, using new technologies and structures to publish your content for third-parties to display on their own websites.

Edit this section

Endpoint

Softrip's API Next exposes regions, destinations, TOCs, and packages through a JSON API. The root URL for all API calls is:

Code Block
/api/

Edit this section

Structure

CMS content is organized into four nested levels:

  • Regions

    • Subregions

      • Destinations

        • TOCs (Tables of Content)

          • Packages

...

Required input parameters

...

Code Block
/api/cms/regions/?brandid=MYBRAND

...

CMS Calls

In order to pull all CMS and package content from the API, your code will have to run multiple calls to the API:

  1. Get all the regions ("Regions" API call) - The response contains all regions, subregions, destinations, and TOCs, and each TOC will have a list of packages.

  2. For each region, parse the subregion

  3. For each subregion, parse the destinations

  4. For each destination, parse the TOCs

  5. For each TOC, parse the packages and get their IDs to pull their details using the "Packages" CMS API call

  6. For each package, request its details ("Package" API call)

Edit this section

Regions

Regions represent groups of destinations, and reflect the organization of the main website. For example, there is a region for "Italy and Europe"
To get a list of all regions, use the API call:

...

The JSON response contains a list of region objects. Each region object contains a list of destination objects, each destination object contains a list of TOCs, and each TOC contains a list of packages.Edit this section

Subregions

Subregions represent a subdivision of the regions loaded in the system, and reflect the organization of the main website. For example, the "Italy and Europe" region has a "Italy and Sicily" subregion.

Code Block
/api/cms/subregions/[SUBREGIONID]?brandid=[MYBRAND]

...

Destinations

Destinations represent groups of TOCs, and reflect the organization of the main website.
Destinations can be pulled from the "Regions" API call (for all regions and destinations), or on an individual basis:

...

The JSON response contains a list of TOCobjects.Edit this sectionTOC objects.

TOCs

TOCs represent groups of packages in a given destination, and reflect the organization of the main website.
TOCs can be pulled from the "Regions" API call (for all regions and destrinations), or on an individual basis:

...

The JSON response contains a list of Package objects.Edit this section

Packages

Packages represent a particular offering for a given tour. This includes detailed itinerary, travel tips, departure dates, and prices.
Packages can be pulled using the "Package" API call:

Code Block
/api/cms/packages/[PACKAGEID]?brandid=[MYBRAND]

Edit this section

Object definitions

Edit this section

Regions

Edit this section

Region members:

  • ID (string) - A globally unique ID for this Region object

  • Title (string) - The title or name of this Region

  • Description (string) - A short paragraph describing this Region

  • Subregions (array of Subregion objets) - The list of Subregions that belong to this Region object

...

Subregions

...

Subregion members:

  • ID (string) - A globally unique ID for this Subregion object

  • Title (string) - The title or name of this Subregion

  • Description (string) - A short paragraph describing this Subregion

  • Destinations (array of Destination objects) - The list of destinations that belong to this Subregion object

Edit this section

Destinations

Edit this section

Destination members:

  • ID (string) - A globally unique ID for this Destination object

  • Title (string) - The title or name of this Destination

  • Description (string) - A short paragraph describing this Destination

  • TOCs (array of TOC objects) - The list of TOCs that belong to this Destination object

...

TOCs

Edit this section

TOC members:

  • ID (string) - A globally unique ID for this TOC object

  • Title (string) - The title or name of this TOC

  • Description (string) - A short paragraph describing this TOC

  • Packages (array of Package objects) - The list of Packages that belong to this TOC object

Edit this section

Packages

Some package members are only exposed when requesting details on a specific package (e.g. /api/cms/packages/[PACKAGEID]), as opposed to the list of packages you would get from a Regions call (e.g. /api/cms/regions/).Edit this section

Package members (always exposed):

  • ID (string) - A globally unique ID for this Package object

  • Title (string) - The title or name of this Package

  • Description (string) - A short paragraph describing this Package

  • LeadPriceLandOnly (numeric) - The lead price for this package when booked without flights

  • LeadPriceLandAndAir (numeric) - The lead price for this package when booked with flights

  • Season (string) - The departure date range for this package (e.g. "Feb - Dec '16")

  • Duration (integer) - The duration in number of days for this package

  • Countries (array of strings) - The list of countries visited on this package (e.g. "Italy", "Croatia")

  • PackageCategories (array of strings) - The array of categories this package belongs to (e.g. "Small Groups", "Adventure Travel")

  • URL (string) - The URL to the landing page for this package

...

Package members - only exposed with a Package details call (/api/cms/packages/[PACKAGEID]):

...