PUT
/api/public/v1/location-hours

Update location hours

Bulk upsert location hours by day of week.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.

location:hours:write

Request Body

PropertyTypeDescription
locationIdstringLocation to update.
hoursarrayArray of `{ dayOfWeek, openTime, closeTime, isClosed, is24Hours }`. dayOfWeek is 0-6 (Sun-Sat).
PUTExample request
curl
curl -X PUT "https://www.pxb.app/api/public/v1/location-hours" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "locationId": "loc_abc",
    "hours": [
      {
        "dayOfWeek": 1,
        "openTime": "09:00",
        "closeTime": "17:00",
        "isClosed": false,
        "is24Hours": false
      }
    ]
  }'
200Example response
json
{
  "message": "Location hours updated successfully!",
  "content": {}
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Company menu → Locations → Business hours
/dashboard
  1. Open the company menu → Locations.
  2. Open the ⋯ menu beside a location → Business hours.
  3. Edit the opening times.