Documentation

Content Simple and Multi Request Transfers logo icon

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

  • 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.

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.

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:

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