Location Mapping on Request Body


The mapping info is used by AreTheyHappy to map each record from the CSV file provided to the appropriate AreTheyHappy location it belongs to.

Example:
Imagine a company with two locations in AreTheyHappy called 'BE - Ghent' (id: 1) and 'BE - Antwerp' (id: 2), the names of these locations are probably internal names and not ones that would be used in a public platform such as deliveroo. A CSV file might have the following data:

Name,Review Rating,...
Ghent Veldstraat,5,...
Ghent Veldstraat,4,...
Antwerp Station,3,...
Ghent Veldstraat,5,...
Antwerp Station,4,...

Note how the names in the file differ. The mapping for this would be the following (JSON):

[{"id":1,"name":"Ghent Veldstraat"},{"id":2,"name":"Antwerp Station"}]

This tells the system that:

  • rows containing the name 'Ghent Veldstraat', it is for ATH location with id 1,

  • and rows containing the name 'Antwerp Station', it is for ATH location with id 2.

Note: To get a full list of the location ids in your company, you can send a request to the /company/{company_id}/locations endpoint of the Public API.

Did this answer your question?