/
Schedules / Schedule Exception

Schedules / Schedule Exception

Instructions

 

GET {url}/localtrac/location/<location_uuid>/schedules

GET {url}/localtrac/location/<location_uuid>/schedules

This route will return the list of the location’s regular opening hours.

If one day is different (abnormal), use Schedule Exceptions instead.

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

{ "sunday": [ { "start": "00:00", "end": "24:00" }, (...) ], "monday": [ { "start": "00:00", "end": "24:00" }, (...) ], "tuesday": [ { "start": "00:00", "end": "24:00" }, (...) ], "wednesday": [ { "start": "00:00", "end": "24:00" }, (...) ], "thursday": [ { "start": "00:00", "end": "24:00" }, (...) ], "friday": [ { "start": "00:00", "end": "24:00" }, (...) ], "saturday": [ { "start": "00:00", "end": "24:00" } , (...) ] }

<day>

Each row represents a day of the week. This row contains an array of intervals representing the opening hours of that day.

  • If there is no key provided for a specific day of the week, this means the day is closed

  • If “start: HH:ii” and “end: HH:ii” is provided, this interval will be considered open. Multiple intervals can be provided.

    "sunday": [ { "start": "08:00", "end": "12:00" }, { "start": "13:00", "end": "23:00" } ],

GET {url}/localtrac/location/<location_uuid>/scheduleexceptions

GET {url}/localtrac/location/<location_uuid>/scheduleexceptions

This route will return the list of special opening hours (exceptions) where the opening hours of the location differ from the regular opening hours.

Request

Query

p

<int> Page to obtain

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Response (200) - Success

Headers

Content-type

application/json

Cache-Control

no-cache,private

Body

{ "2020-10-20": [ { "start": <DateTime H:i>, "end": <DateTime H:i> } ], (...) }

<day>

Each row represents a specific day where the opening hours differ from the regular opening hours. This row contains an array of intervals representing the opening hours of that day.

The change will only apply to normal business hours and not to additional business hours.

  • If null values is provided, this means the day is closed

  • If “start: HH:ii” and “end: HH:ii” is provided, this interval will be considered open. Multiple intervals can be provided.

  • If you want to delete a schedule exception

     

POST {url}/localtrac/location/<location_uuid>/scheduleexceptions

POST {url}/localtrac/location/<location_uuid>/scheduleexceptions

This route will add/update the schedule exception for each given day provided.

The change will only apply to normal business hours and not to additional business hours.

  • If null values is provided, this means the day is closed

  • If “start: HH:ii” and “end: HH:ii” is provided, this interval will be considered open. Multiple intervals can be provided.

  • If you want to delete a schedule exception

     

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Content-Type

application/json

Body

Response (200) - Success

Headers

Content-type

application/json

Cache-Control

no-cache,private

Body

Response (400) - Validation Error

Headers

Content-type

application/json

Cache-Control

no-cache,private

Body

message

Always the same error message, indicating that an error occured 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.

GET {url}/localtrac/location/<location_uuid>/allSchedules

GET {url}/localtrac/location/<location_uuid>/allSchedules

This route will return the list of the location’s opening hours.

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

<schedule>

  • This route returns an array of schedules.

  • Each element of the array represents a schedule of a specific type.

  • If the “scheduleType” has a null value, then this schedule is the list of the location’s regular opening hours.

  • Each row of a specific schedule represents a day of the week. This row contains an array of intervals representing the opening hours of that day.

  • If there is no key provided for a specific day of week, this means the day is closed

  • If “start: HH:ii” and “end: HH:ii” is provided, this interval will be considered open. Multiple intervals can be provided.

POST {url}/localtrac/location/<location_uuid>/allSchedules

POST {url}/localtrac/location/<location_uuid>/allSchedules

This route will add/update the schedule for each provided day of each provided schedule type

Request

Headers

Authorization

<token> obtained during the Authentication

Accept

application/json

Content-Type

application/json

Body (Example)

Schedule (optional)

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.

Response (200) - Success

Headers

Content-type

application/json

Cache-Control

no-cache,private

Body

Response (400) - Validation Error

Headers

Content-type

application/json

Cache-Control

no-cache,private

Body

message

Always the same error message, indicating that an error occured 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.

GET {url}/localtrac/schedules

GET {url}/localtrac/schedules

This route will return the list of custom schedule types.

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

<schedule type>

  • Each row represents a specific custom schedule type. The “uuid' key is a unique id of a custom schedule type.

  • The “name” key contains the English and French version of the name for this schedule type.

 

Related content

Heures d’ouverture (Schedules) / Heures d’ouverture spéciales (Schedule Exception)
Heures d’ouverture (Schedules) / Heures d’ouverture spéciales (Schedule Exception)
More like this
Succursales (Locations)
Succursales (Locations)
More like this
Locations
More like this
5- Master profile
5- Master profile
More like this
Store Locator
More like this