Content Simple and Multi Request

The following are the details to call the contents API: 

There are two different ways to retrieve contents factsheets: one by one or by providing a set of service codes and getting all the contents information for the given codes. That’s what is called “Simple” and “Multi” API calls:

  • Simple: Returns a single contents factsheet by service code and, optionally, modality by performing a GET call.
  • Multi: Returns a set of contents factsheet by a given set of service codes and, optionally, modalities  by performing a POST call. 

Both API calls return the same response (see that the root attribute is an array: "activitiesContent": []). The following is the specification for both requests and for the response: 

Content Simple Request

The contents simple API call is a GET operation. The following is an example:

https://actapiint.activitiesbank.com/activity-content-api/3.0/activities/en/E-E10-000200515/8

In the example above, the parameters in the query string have the following meaning:

  • en: Language code. See here for a list of available language codes
  • E-E10-000200515: Activity code. Service codes can be retrieved from the search operation results
  • 8: Modality code. Modality codes are also returned by the Search operation.

The API call shown in the example above will return the contents factsheet for the service E-E10-000200515 and the modality 8. 

Specification

Live URL: https://api.hotelbeds.com/activity-content-api/3.0/activities/{{language}}/{{serviceCode}}/{{modalityCode}}

Test URL: https://api.test.hotelbeds.com/activity-content-api/3.0/activities/{{language}}/{{serviceCode}}/{{modalityCode}}

Method: GET 

NAME

DESCRIPTION

language

Language in which the contents factsheet will be returned.

See here for language replacement rules.

activityCode

The code that identify a particular activity or service. This code is the one that is assigned to a content factsheet. See search api call or detail api call for details on how to obtain an activity code.

modalityCode

Optionally, a modality code can be provided to get the specific details of a factsheet for a modality. See response for more details regarding how the services and modalities are linked to a contents factsheet.

Content Multi Request

The multi API call retrieves a set of content factsheets by a set of service codes and (optionally) modalities.

The following is a JSON example to be sent in a POST method to the call:

{
  "codes": [
            {"activityCode": "E-E10-000200515", "modalityCodes": ["8:00", "12:00"]},
            {"activityCode": "E-E10-JAMONEXPER","modalityCodes": ["ENGLISH"]}
  ],
  "language": "en"

As detailed, the information provided is the same as the simple operation, but in this specific case, more than one combination of services and modalities can be provided.

The system will return a list of contents factsheets assigned to the services specified in the request in the language determined by the “language” parameter. 

Specifications

Live URL: https://api.hotelbeds.com/activity-content-api/3.0/activities/

Test URL: https://api.test.hotelbeds.com/activity-content-api/3.0/activities/

Method: POST 

NAME

DESCRIPTION

language

Language in which the contents are being requested.

codes

Service and modality codes

codes/@activityCode

Service code of the activity whose contents are being requested.

codes/@modalityCodes

Optional list of modality codes for the service if specific modality contents are requested.

Docs Navigation