Adding a Store's Opening Times

It is important that, after you create a store, you go on and create the associated opening times - otherwise, the assumption is that the stores are never open and they will not appear as service points in other Metapack applications.

Request

Perform a POST request to:

https://dmo.metapack.com/locations/<Location ID>/openingTimesRules

of content type:

application/json

with the following authorisation (the token is copied from the access_token field that is returned from Generating a Bearer Token):

Bearer <Bearer Token>

Note

The token must be within its TTL and associated with a can-manage-opening-times-rules permission.

The body should use the rule object, as in the following example:

{
   "openingTimesRules":[
      {
         "rule":"every Monday",
         "openingClosingTimes":[
            {
               "openingAt":"08:00",
               "closingAt":"18:00"
            }
         ]
      },
      {
         "rule":"every Tuesday",
         "openingClosingTimes":[
            {
               "openingAt":"08:00",
               "closingAt":"18:00"
            }
         ]
      }
   ]
}

Response

The response from Delivery Options is in JSON format, and will be in the form of an HTTP 201 CREATED response if the request is successful. For other possible responses, refer to What are the possible Server Responses?.