URL: /kits/advanced-api/working-hours

---
title: "Update working hours"
description: "Replace the weekly working hours for a business."
api: "PUT http://ext-integration.haat-delivery.io/api/pos/business/{businessId}/working-hours"
---

<div class="haat-endpoint"><span class="haat-endpoint-method haat-endpoint-put">PUT</span><code>{"/api/pos/business/{businessId}/working-hours"}</code></div>


Full replacement. Any day you leave out is treated as closed. `day`: 1 = Sunday … 7 = Saturday. Times are `HH:mm` UTC.

To read the schedule after an update, call [Get working hours](/kits/advanced-api/get-working-hours). GET uses the same `days` / `day` / `hours` / `type` / `fromHour` / `toHour` shape and the same UTC `HH:mm` convention. GET does not return a `requestId`.

**Example:**

<pre class="redoc-example"><code>X-Api-Key: YOUR_API_KEY</code></pre>

<div class="redoc-schema-label">PATH SCHEMA</div>

<div class="redoc-tree">
  <div class="redoc-field">
    <div class="redoc-field-name"><code>businessId</code><span class="redoc-required">required</span></div>
    <div class="redoc-field-meta"><div class="redoc-type">integer</div><p>HAAT business id from List businesses.</p></div>
  </div>
</div>

<div class="redoc-schema-label">REQUEST BODY SCHEMA: <strong>application/json</strong></div>

<div class="redoc-tree">
  <div class="redoc-field">
    <div class="redoc-field-name"><code>days</code><span class="redoc-required">required</span></div>
    <div class="redoc-field-meta"><div class="redoc-type">object[]</div><p>Weekly hours. Any day you leave out is treated as closed. Do <strong>not</strong> send <code>type: 1</code>; omit the day instead.</p></div>
  </div>
  <div class="redoc-children">
    <div class="redoc-field">
      <div class="redoc-field-name"><code>day</code><span class="redoc-required">required</span></div>
      <div class="redoc-field-meta"><div class="redoc-type">integer</div><p><code>1</code> Sunday … <code>7</code> Saturday.</p></div>
    </div>
    <div class="redoc-field">
      <div class="redoc-field-name"><code>type</code></div>
      <div class="redoc-field-meta"><div class="redoc-type">integer</div><p>Optional numeric enum (not a string). Default <code>0</code> if omitted. See table below.</p></div>
    </div>
    <div class="redoc-field">
      <div class="redoc-field-name"><code>hours</code></div>
      <div class="redoc-field-meta"><div class="redoc-type">object[]</div><p>UTC ranges. Must not overlap. Required when <code>type</code> is <code>0</code>; empty / not required when <code>type</code> is <code>2</code>.</p></div>
    </div>
    <div class="redoc-children">
      <div class="redoc-field">
        <div class="redoc-field-name"><code>fromHour</code><span class="redoc-required">required</span></div>
        <div class="redoc-field-meta"><div class="redoc-type">string</div><p><code>HH:mm</code> UTC, 24-hour clock. Example: <code>08:00</code>.</p></div>
      </div>
      <div class="redoc-field">
        <div class="redoc-field-name"><code>toHour</code><span class="redoc-required">required</span></div>
        <div class="redoc-field-meta"><div class="redoc-type">string</div><p><code>HH:mm</code> UTC, 24-hour clock. Example: <code>14:00</code>.</p></div>
      </div>
    </div>
  </div>
</div>

### `type` values

| `type` | Meaning on PUT |
| --- | --- |
| `0` | Open with specific hours (`hours` required, one or more non-overlapping UTC ranges). **Default if `type` is omitted.** |
| `1` | Closed — **do not send**. Omit the day from `days` instead. |
| `2` | Open 24 hours (`hours` empty / not required) |

<div class="redoc-schema-label">RESPONSE BODY SCHEMA: <strong>application/json</strong></div>

<div class="redoc-tree">
  <div class="redoc-field">
    <div class="redoc-field-name"><code>requestId</code><span class="redoc-required">required</span></div>
    <div class="redoc-field-meta"><div class="redoc-type">string</div><p>Tracking id. Use it on Get request status.</p></div>
  </div>
  <div class="redoc-field">
    <div class="redoc-field-name"><code>status</code><span class="redoc-required">required</span></div>
    <div class="redoc-field-meta"><div class="redoc-type">string</div><p><code>Success</code>, <code>Pending</code>, or <code>Failed</code>.</p></div>
  </div>
  <div class="redoc-field">
    <div class="redoc-field-name"><code>message</code></div>
    <div class="redoc-field-meta"><div class="redoc-type">string | null</div><p>Human-readable result.</p></div>
  </div>
</div>

## Responses

<AccordionGroup>
  <Accordion title="200 — Success or queued">
    If `status` is `Pending`, poll Get request status.
  </Accordion>
  <Accordion title="400 — Validation failed">
    Overlapping hours or a bad `day` value.
  </Accordion>
</AccordionGroup>

<RequestExample>
```bash cURL
curl -X PUT http://ext-integration.haat-delivery.io/api/pos/business/1021/working-hours \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days":[{"day":1,"hours":[{"fromHour":"08:00","toHour":"14:00"}]}]}'
```
</RequestExample>

<ResponseExample>
```json 200
{"requestId":"6651a3f2e1b2c3d4e5f60001","status":"Success","message":"Updated successfully"}
```
</ResponseExample>
