Skip to main content

Medias

  • Content & referential

Retrieve each media you need to illustrate Accor properties.

Version
1.0.1
Status
Live
Incident
No incident

How to use it?

HTTP Methods

The API is accessible only through the Https protocol and only accepts HTTP GET requests.
It's made to retrieve information only – and not to modify it in any way.

UAT base URL: 
"https://rec-api.accor.com/catalog/"
PRO base URL: 
"https://api.accor.com/catalog/"

UAT Example: "https://rec-api.accor.com/catalog/v1/hotels/0911/medias"

HTTP Response codes

We use conventional HTTP response codes to indicate the success or failure of an API request.

  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an error.
  • Codes in the 5xx range indicate an server error.

Some 4xx errors that could be handled programmatically include an error code that briefly explains the error reported.

Filters

Our API supports, with certain qualifications, the ability to filter the output.
You can filter the category and the type of media you want to retrieve.

Type: VIDEO ; IMAGE ; TEXT

Category: HOTEL ; BEDROOM ; SUITE ; EXECUTIVE_FLOOR ; BAR ;  RESTAURANT ; SERVICE ; FAMILY ; INSTITUTE ; SPA ; THALASSO ; MEETING_ROOM ; WEDDING ; DESTINATION ; HOTEL_ADVANTAGE ; GOLF ; POOL ; BUSINESS_CENTER ; OPTION ; SUSTAINABLE_DEVELOPMENT ; FITNESS ; LOGO ; BREAKFAST ; WELCOME ; ACCESS ; BANNER

Squiggly Filter

Our API supports Squiggly, the Squiggly Filter is a Jackson JSON PropertyFilter, which selects properties of an object/list/map using a subset of the Facebook Graph API filtering syntax.

The easiest way to use this feature is to filter fields on the querystring like so:

  • ?fields=type,formats.format

Doc: https://github.com/bohnman/squiggly

Example

Using CATALOG MEDIA

Using the CATALOG API you will find out that only two medias (in different formats) are returned, even if there are more medias for the hotel. If you want to get all the medias from an Accor hotel you have to use the CATALOG MEDIA API.

{
    "id": "0911",
    "name": "Novotel Marseille Vieux-Port",
    "media": {
        "count": 5,
        "medias": [
            {
                "346x260": "https://www.ahstatic.com/photos/0911_ho_00_p_346x260.jpg",
                "953x385": "https://www.ahstatic.com/photos/0911_ho_00_p_953x385.jpg",
                "120x90": "https://www.ahstatic.com/photos/0911_ho_00_p_120x90.jpg",
                "2048x1536": "https://www.ahstatic.com/photos/0911_ho_00_p_2048x1536.jpg",
                "3000x2250": "https://www.ahstatic.com/photos/0911_ho_00_p_3000x2250.jpg",
                "1024x768": "https://www.ahstatic.com/photos/0911_ho_00_p_1024x768.jpg"
            },
            {
                "1024x768": "https://www.ahstatic.com/photos/0911_ho_01_p_1024x768.jpg",
                "346x260": "https://www.ahstatic.com/photos/0911_ho_01_p_346x260.jpg",
                "120x90": "https://www.ahstatic.com/photos/0911_ho_01_p_120x90.jpg",
                "2048x1536": "https://www.ahstatic.com/photos/0911_ho_01_p_2048x1536.jpg",
                "3000x2250": "https://www.ahstatic.com/photos/0911_ho_01_p_3000x2250.jpg"
            }
        ]
    },

Here a sample of the different types and categories that the API can returns

[
    {
        "category": "HOTEL",
        "type": "IMAGE",
        "formats": [
            {
                "format": "3000x2250",
                "path": "https://www.ahstatic.com/photos/0911_ho_00_p_3000x2250.jpg",
                "generic": false
            },
            {
                "format": "2048x1536",
                "path": "https://www.ahstatic.com/photos/0911_ho_00_p_2048x1536.jpg",
                "generic": false
            },
            {
                "format": "1024x768",
                "path": "https://www.ahstatic.com/photos/0911_ho_00_p_1024x768.jpg",
                "generic": false
            },
            {
                "format": "346x260",
                "path": "https://www.ahstatic.com/photos/0911_ho_00_p_346x260.jpg",
                "generic": false
            },
            {
                "format": "120x90",
                "path": "https://www.ahstatic.com/photos/0911_ho_00_p_120x90.jpg",
                "generic": false
            },
            {
                "format": "953x385",
                "path": "https://www.ahstatic.com/photos/0911_ho_00_p_953x385.jpg",
                "generic": false
            }
        ]
    },
    {
        "category": "BEDROOM",
        "productCode": "DFB",
        "type": "VIDEO",
        "formats": [
            {
                "format": "EMBEDDED_URL",
                "path": "https://media.videopolis.com/1.0/api/getByMetadata/eng/accor_id/0911/accor_product_code/DFB.html?key=2edA73SwAmAx&a=accorhotels",
                "generic": false
            },
            {
                "format": "480p",
                "path": "https://media.videopolis.com/1.0/api/getByMetadata/eng/accor_id/0911/accor_product_code/DFB.mp4?key=aP6t6cSWY0DSSxTr&a=app-accorhotels",
                "generic": false
            },
            {
                "format": "PREVIEW",
                "path": "https://media.videopolis.com/1.0/api/getByMetadata/eng/accor_id/0911/accor_product_code/DFB.jpg?key=aP6t6cSWY0DSSxTr&a=app-accorhotels",
                "generic": false
            }
        ]
    },
    {
        "category": "BEDROOM",
        "productCode": "DFB",
        "type": "IMAGE",
        "formats": [
            {
                "format": "1024x768",
                "path": "https://www.ahstatic.com/photos/0911_rodfb_00_p_1024x768.jpg",
                "generic": false
            },
            {
                "format": "346x260",
                "path": "https://www.ahstatic.com/photos/0911_rodfb_00_p_346x260.jpg",
                "generic": false
            }
        ]
    },
    {
        "category": "RESTAURANT",
        "productCode": "R002",
        "type": "TEXT",
        "formats": [
            {
                "format": "x",
                "path": "https://www.ahstatic.com/pdf/0911_rsr002_00_t_x_gb.pdf",
                "generic": false
            }
        ]
    },

An example of a request using Squiggly

  • "catalog/v1/hotels/0911/medias?fields=type,formats.format"
[
    {
        "type": "IMAGE",
        "formats": [
            {
                "format": "3000x2250"
            },
            {
                "format": "2048x1536"
            },
            {
                "format": "1024x768"
            },
            {
                "format": "346x260"
            },

About us

We are far more than a worldwide leader. We are 300,000 hospitality experts placing people at the heart of what we do, and nurturing real passion for service and achievement beyond limits. We take care of millions of guests in our 5,000 addresses.