HAAT Integration Docs

Get working hours

Read the regular weekly working hours for a business.

GET/api/pos/business/{businessId}/working-hours

Read-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
PATH SCHEMA
businessIdrequired
integer

HAAT business id from List businesses. No query parameters.

RESPONSE BODY SCHEMA: application/json
daysrequired
object[]

Active open days only, ordered by day ascending. Closed days are omitted. If every day is closed, days is [].

dayrequired
integer

1 Sunday … 7 Saturday.

hoursrequired
object[]

UTC ranges, ordered by fromHour ascending. Empty [] when type is 2.

fromHourrequired
string

HH:mm UTC, 24-hour clock. Overnight ranges allowed (fromHour may be later than toHour).

toHourrequired
string

HH:mm UTC, 24-hour clock.

typerequired
integer

Numeric enum (not a string). Always present on returned days.

type values

typeMeaning on GET
0Open with specific hours (hours has one or more ranges)
1Closed — never returned; the day is omitted instead
2Open 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 type values 0 / 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 days into 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.

Request example
cURL
bash
curl "http://ext-integration.haat-delivery.io/api/pos/business/1021/working-hours" \
  -H "X-Api-Key: YOUR_API_KEY"
Response example
200
json
{
  "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
    }
  ]
}
200 Empty week
json
{ "days": [] }

Type to search…

↑↓ navigate↵ openesc close