Search Product (change detection / diff version)#

Change detection endpoint : Optimize your regular sourcing of Amadeus Discover Content

Change detection endpoint has been designed for Consumer API users willing to persist a copy of a subset of Amadeus Discover Platform content on their side. It can be required to optimize interactions with an existing UI, or in case curation or data enrichment is needed.

Rather than updating daily all the products matching the consumer’s criteria, this endpoint allows to perform an initial import and then obtain regularly information about products that have actually experienced an update in the period.

The endpoint returns products matching the criteria that:
  • Are NEW

  • Have been DELETED

  • Have been UPDATED (with an actual change in the data)

  • Have been DEPRECATED

  • Have been UNDEPRECATED

The endpoint can be called
  • without any input date for an initial import : in that case all products matching the search criteria will be returned

  • with a past input UTC date (8 days back at maximum) : in that case, only the products having experienced one of the listed


Output will be a list of products that would match the query inputs considering:

  • searched terms within the title/description AND/OR Taxonomy

  • searched criteria for the changeType = [ALL, NEW, UPDATED, DELETED] (if NEW is selected the endpoint will return only new products, if ALL is selected the endpoint will return ALL products: NEW or UPDATED or DELETED)

  • the timeframe from the UTC date input until present time.

Taxonomy

As part of this endpoint and search by taxonomy filter, when searching by taxonomy, we will query the catalogue on DB based on the slugs created for taxonomy. So when the user is searching by taxonomy, we will query the catalogue and show the results only belonging to the specific slugs used in the search.

How slug is defined

The current taxonomy is defined to have 3 different levels, although only 2 levels have been implemented so far.

Level 1 taxonomy e.g.: “Culture”, “Food & drink”, “Nature & outdoors”,… Level 2 e.g.: “Shows & events”, “Restaurants & bars”, “Land activities”,…

Taxonomy Slug is the combination of the fields: family + level1 + level2 (e.g.: activities-culture-shows-events)

Please note that family field is referring to the “Activities” taxonomy in this case.

For the search by taxonomy we will use slugs for the query, terms should be an exact match, e.g.:

Search Term

Slug Term

Output

activities-action-entertainment-land

activities-action-entertainment-land

All products that match the search criteria

activities-culture-tickets-passes

activities-culture-tickets-passes

All products that match the search criteria


Path

GET /api/consumer/diff/products


Input parameters

Field

Mandatory

Type

Format

Description

Example

Accept-Language

N

String

ISO 639-1

Default value : en

en

Search

N

String

field:value [ AND/OR field:value]

Search query. This will search any information based on products fields, supplierExternalId and taxonomy

Cannes by night

resultsPerPage

N

integer

N/A

Number of result per page (default value : 100)

100

pageNumber

N

integer

N/A

Number of page

3

sortingField

N

String

N/A

Sorting field (default value : title)

title

sortingOrder

N

String

asc, desc

sorting order

asc

changeType

N

String

N/A

Filter to output only “NEW” or “UPDATED” or “DELETED” or “DEPRECATED” or “UNDEPRECATED” or “ALL” (default) products which are new or updated or deleted

NEW

date

N

String

ISO 8601 date only

Starting date from which you want to retrieve products (8 days back at most)

2023-07-14

externalClientId

N

string

255 alphanumeric characters maximum

Identifier that is appended to the Booking URL to allow Consumer Systems to track traveler bookings

ABCDEF


Output

Response body example
{
"pageNumber": 1,
"totalResults": 4060,
"resultsPerPage": 100,
"items": [{
        "product": {
            "id": 107009267,
            "externalId": "108558",
            "title": "Rajpoot Restaurant",
            "creationDate": "2023-04-13T14:24:17.647+00:00",
            "updateDate": "2023-07-27T13:28:20.565+00:00",
            "description": "Indian",
            "thumbnailImage": "d075ccf8-5496-4a54-a4ef-698c4fc270af",
            "bookingEngine": "OPEN_TABLE",
            "bookingEngineName": "Open Table",
            "bookingUrl": "https://api-test-pr-1105-23.test.amadeus-discover.com/to/2nmwtXORQGm-4BJp0?externalClientId=ABCDEF",
            "minPrice": 0.0,
            "maxPrice": 0.0,
            "priceCurrency": "GBP",
            "pricingUnit": "PER_PERSON",
            "minParticipants": 1,
            "address": "43 High West Street",
            "geoLocation": {
                "latitude": 50.71507,
                "longitude": -2.441106
            },
            "duration": "",
            "galleryImages": [{
                    "url": "https://resizer.otstatic.com/v2/photos/wide-large/1/23889845.jpg",
                    "order": 0
                }
            ],
            "categories": [{
                    "level": 1,
                    "code": "restaurants"
                }
            ],
            "supplier": {
                "id": 107007132,
                "name": "Rajpoot Restaurant",
                "externalId": "108558",
                "creationDate": "2023-05-03T21:08:03.301+00:00",
                "updateDate": "2023-07-27T13:28:10.545+00:00",
                "contact": {
                    "telephone": "01305257492",
                    "address": "43 High West Street, Dorchester, DT1 1UT"
                },
                "geoLocation": {
                    "latitude": 50.71507,
                    "longitude": -2.441106,
                    "geoHash": "gcn282qkwn72"
                },
                "countryCode": "GB",
                "countryName": "United Kingdom"
            },
            "onlineBookable": true,
            "descriptors": [],
            "availableLanguages": [
                "en"
            ],
            "priceLevel": 2,
            "periods": [{
                    "id": 107009272,
                    "type": "OPENING",
                    "description": "Opening times",
                    "startDate": "2023-07-25",
                    "weekDays": {
                        "monday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ],
                        "tuesday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ],
                        "wednesday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ],
                        "thursday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ],
                        "friday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ],
                        "saturday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ],
                        "sunday": [{
                                "start": "T1200",
                                "end": "T1400"
                            }, {
                                "start": "T1730",
                                "end": "T2300"
                            }
                        ]
                    }
                }
            ],
            "cityName": "Dorchester",
            "zipCode": "DT1 1UT",
            "rating": 4.0,
            "numberOfRatings": 39,
            "countryName": "United Kingdom",
            "availabilityPeriods": {
                "weeklyPeriods": []
            }
        },
        "changeLog": [{
                "status": "UPDATED",
                "date": "2023-07-27T13:28:20.565911Z"
            }
        ]
    }
]
}

Note

The changeLog field gives a log of operation(s) done since the input UTC date so you may track what has happened between your calls

Status code

List of HTTP codes#

HTTP code

Code description

200

Successful search of products

400

Results per page can’t be negative or equals to zero

400

Offset can’t be negative or equals to zero

400

Invalid value for sorting field

400

Invalid value for sorting order

400

Search parameter must contain at least 1 valid criteria: . Valid operators are : ^ < > ~

401

Unauthorized

403

Forbidden

404

Non existing products

500

Internal server error