API Next

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:

/api/

Edit this section

Structure

CMS content is organized into four nested levels:

Edit this section

Required input parameters

Every CMS API call requires a input for "BrandID" that should be passed in the query string for your API call. Check with your Softrip subscriber to get their brand IDs for the content you wish to retrieve.

/api/cms/regions/?brandid=MYBRAND

Edit this section

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:

/api/cms/regions/?brandid=[MYBRAND]

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.

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

Edit this section

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:

/api/cms/destinations/[DESTINATIONID]?brandid=[MYBRAND]

The JSON response contains a list of TOCobjects.

Edit this section

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:

/api/cms/TOCs/[TOCID]?brandid=[MYBRAND]

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:

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

Edit this section

Object definitions

Edit this section

Regions

Edit this section

Region members:

Edit this section

Subregions

Edit this section

Subregion members:

Edit this section

Destinations

Edit this section

Destination members:

Edit this section

TOCs

Edit this section

TOC members:

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):

Edit this section

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