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:
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
The contents simple API call is a GET operation. The following is an example:
https://api.hotelbeds.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:
The API call shown in the example above will return the contents factsheet for the service E-E10-000200515 and the modality 8.
Endpoint:
GET https://api.test.hotelbeds.com/activity-content-api/3.0/activities/ {{language}} / {{serviceCode}} / {{modalityCode}}
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. |
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:
POST https://api.test.hotelbeds.com/activity-content-api/3.0/activities/
{
"language": "en",
"codes": [{
"activityCode": "E-E10-ACUARIOBCN"
}, {
"activityCode": "E-CN1-A9CKNO0003"
}, {
"activityCode": "E-U10-A9CKNO0004"
}, {
"activityCode": "E-CN1-HK-ABERDW"
}, {
"activityCode": "E-E10-HKCENTRA"
}, {
"activityCode": "E-U02-HK-HK360"
}, {
"activityCode": "E-CN1-HK-HKAFTER"
}
]
}
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. |
See response estructure in content by opertation data or API Reference