Instructions
...
GET {url}/localtrac/location/<location_uuid> | ||||||
---|---|---|---|---|---|---|
This route returns all location “Information” fields, with the exception of schedule related information. | ||||||
Request | ||||||
Headers | ||||||
Authorization | <token> obtained during the Authentication | |||||
Accept | application/json | |||||
Response (200) - Success | ||||||
Headers | ||||||
Content-type | application/json | |||||
Cache-Control | no-cache,private | |||||
Body (Example) This example is a fake location generated by our test system. | ||||||
| ||||||
uuid | LOCALTRAC unique identifier (uuid) of the location. This is the uuid you should use for any further request that requires a <location_uuid> within the url. | |||||
storecode | External id given by the client when the location was created or when imported in LOCALTRAC from a directory. | |||||
name | Array of all the location name translations. Each row of the sub array is an associative value of <locale> : <name>. We currently only support <locale> fr_CA and en_CA. | |||||
address | Array containing the full address. | |||||
description | Array of all the location descriptions. Each row of the sub array is an associative value of <locale> : <description>. We currently only support <locale> fr_CA and en_CA. | |||||
communication | An associative array for the location contact information. Supported keys:
| urls | An associative array for websites and social media URLs. Supported keys: website: Main website of the company or location We support lot of different phone formats, with or without country code. You can set anything with () and - until the total number of numbers do not exceed 20 characters. So, the following formats are accepted:
| |||
urls | An associative array for websites and social media URLs. Supported keys:
| |||||
payments | An associative array of payment methods. The value is a Boolean, true when payment method is accepted or false when it’s not. Supported keys:
| |||||
active | Boolean value representing the status of the location, true for active and false for inactive. When a location is set as inactive, it is not monitored within any directories. | |||||
businessKeywords | An array of keywords, associated to business | |||||
keywords | An array of keywords, associated to loaction | |||||
Response (403) - Forbidden access | ||||||
Headers | ||||||
Content-type | application/json | |||||
Cache-Control | no-cache,private | |||||
Body | ||||||
|
...
POST {url}/localtrac/location/<location_uuid> | |||||||
---|---|---|---|---|---|---|---|
A POST on this route indicates that you want to update the location fields. Each sub key (name, address, description, communication, urls, …) can be updated individually. Any sub key not provided will be ignored and will remain unchanged. | |||||||
Request | |||||||
Headers | |||||||
Authorization | <token> obtained during the Authentication | ||||||
Accept | application/json | ||||||
Content-Type | application/json | ||||||
Body (Example) This example is a fake location generated by our test system. | |||||||
| |||||||
name (optionnal) | Array of all the location name translations. Each row of the sub array is an associative value of <locale> : <name>. We currently only support <locale> fr_CA and en_CA. | ||||||
address (optionnal) | Array containing the full address. | ||||||
description (optionnal) | Array of all the location descriptions. Each row of the sub array is an associative value of <locale> : <description>. We currently only support <locale> fr_CA and en_CA. | ||||||
communication (optionnal) | An associative array for the location contact information. Supported keys:
We support lot of different phone formats, with or without country code. You can set anything with () and - until the total number of numbers do not exceed 20 characters. So, the following formats are accepted:
| ||||||
urls (optionnal) | An associative array for websites and social media URLs. Supported keys:
| ||||||
payments (optionnal) | An associative array of payment methods. The value is a Boolean, true when payment method is accepted or false when it’s not. Supported keys:
| ||||||
Schedules (optionnal) | An associative array where each key is one day of the week. The value of each key is a range of opening hours with “start” and “end” key for each period within a day. The sub array allows multiple values since a day can be opened and closed multiple times per day.
| ||||||
storeLocatorFields | Array of custom store locator fields. For the moment, only “externalId” key is supported. You can use this field to store any data, associated to location. | ||||||
storeLocatorName | Array of custom translations of the location’s name, used by store locator | ||||||
storeLocatorAddress | Array of custom translations of the locations’s address line. | ||||||
Response (200) - Success | |||||||
Headers | |||||||
Content-type | application/json | ||||||
Cache-Control | no-cache,private | ||||||
Body | |||||||
| |||||||
Response (400) - Validation ErrorThis scenario happens if you sent any content who fails the minimum validation process. For instance, providing a wrong zip code would lead to the following result | |||||||
Headers | |||||||
Content-type | application/json | ||||||
Cache-Control | no-cache,private | ||||||
Body | |||||||
| |||||||
message | Always the same error message, indicating that an error happened during the validation process | ||||||
errors | An associative array where the key represents the logical path to the data in error and the value represents the error found with the given data. If a key contains “.” character, this means nested array. In the case of an array without keys, the logical number would be taken (ex: communication.secondaryPhones.1 would represent the first entry provided in secondaryPhones) | ||||||
Response (403) - Forbidden access | |||||||
Headers | |||||||
Content-type | application/json | ||||||
Cache-Control | no-cache,private | ||||||
Body | |||||||
|
...