Get working hours
Read the regular weekly working hours for a business.
/api/pos/business/{businessId}/working-hoursRead-only. Returns the business’s regular weekly working hours. Use after PUT to confirm what HAAT stored, or to load the schedule into a POS UI.
Does not include occasion overrides, temporary special hours, or days off.
Does not return a requestId and does not create a sync audit entry. For writes, use Update working hours.
GET uses the same days / day / hours / type / fromHour / toHour shape and the same UTC HH:mm convention as PUT.
Example:
X-Api-Key: YOUR_API_KEY
businessIdrequireddaysrequireddayrequiredhoursrequiredfromHourrequiredtoHourrequiredtyperequiredtype values
type | Meaning on GET |
|---|---|
0 | Open with specific hours (hours has one or more ranges) |
1 | Closed — never returned; the day is omitted instead |
2 | Open 24 hours (hours is []) |
UTC and DST
Same convention as PUT: HH:mm UTC. After a successful PUT, GET returns the same UTC values while the country’s UTC offset is unchanged. Operator UIs may show local time (offset from these UTC values).
If the country UTC offset changes (for example daylight saving) and hours are not rewritten, GET’s UTC HH:mm values may shift so local opening times stay consistent. Do not assume UTC clock strings never change after DST without another PUT (or equivalent hours update in HAAT).
Relation to PUT
- Same schedule fields and the same numeric
typevalues0/1/2 - GET = read schedule; PUT = full-replace write + sync response
- On PUT, any day left out of the request is treated as closed (do not send
type: 1) - Partners may round-trip GET
daysinto a PUT body after edits; PUT remains full replacement
Responses
200 — Regular weekly schedule
Body is { "days": [ ... ] } only. Not the PUT sync shape (requestId / status / message).
401 — Auth failed
Missing or invalid X-Api-Key.
403 — Not authorized
Key not authorized for this businessId.
curl "http://ext-integration.haat-delivery.io/api/pos/business/1021/working-hours" \
-H "X-Api-Key: YOUR_API_KEY"{
"days": [
{
"day": 1,
"hours": [
{ "fromHour": "08:00", "toHour": "14:00" },
{ "fromHour": "17:00", "toHour": "23:00" }
],
"type": 0
},
{
"day": 2,
"hours": [
{ "fromHour": "09:00", "toHour": "22:00" }
],
"type": 0
},
{
"day": 6,
"hours": [
{ "fromHour": "10:00", "toHour": "23:00" }
],
"type": 0
},
{
"day": 7,
"hours": [],
"type": 2
}
]
}{ "days": [] }