Updating Opening Times Rules

The original opening times rules will be swapped with the newly provided data. An example use case for this would be to disable a location (identified by the ID field on the URL) on a certain weekday - from the previous example, where we had the store open on Mondays and Tuesdays, this example disables it on Tuesdays.

Required Permission

can-update-locations

See Auth* (scopes).

Request

PUT /locations/<id>/openingTimesRules
Content-Type: application/json
{
   "openingTimesRules":[
      {
         "rule":"every Monday",
         "openingClosingTimes":[
            {
               "openingAt":"08:00",
               "closingAt":"18:00"
            }
         ]
      }
   ]
}

Response

HTTP/1.1 200 OK
{
   "rel":"self",
   "href":"/locations/6b2e279d-8afd-4785-8ea4-b06739fb0f14/openingTimesRules"
}

Failure

Request error; e.g. invalid JSON object:

HTTP 400 BAD REQUEST

User doesn't have the required permission:

HTTP/1.1 403 FORBIDDEN

Location id doesn't match an existing location:

HTTP/1.1 404 NOT FOUND

Other errors:

HTTP/1.1 500 INTERNAL SERVER ERROR

results matching ""

    No results matching ""