PUT
/api/public/v1/location-hoursUpdate 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
| Property | Type | Description |
|---|---|---|
locationId | string | Location to update. |
hours | array | Array 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- Open the company menu → Locations.
- Open the ⋯ menu beside a location → Business hours.
- Edit the opening times.