# Update Delivery Zone Default Intervals

Intervals can be managed as follows:
* **Creation**
: This is achieved when only the
`start`
,
`end`
, and
`slots`
 fields are provided, resulting in the generation of a new interval template.
* **Update**
: If the
`id`
 field along with the
`start`
,
`end`
, and
`slots`
 fields are given, the existing interval template is modified.
* **Deletion**
: By providing only the
`id`
 field, the corresponding interval template gets deleted.

Note that this API does not affect intervals scheduled for the upcoming two weeks.

Endpoint: PATCH /api/webhooks/delivery-zones/{delivery_zone_id}/intervals/
Version: 1.0
Security: key

## Security:

  - `key` (unknown)
    apiKey in query key

## Path parameters:

  - `delivery_zone_id` (string, required)

## Request fields (application/json):

  - `constant` (object)
    Object containing default daily slot availability.

  - `constant.mon` (object)

  - `constant.mon.slots` (integer)
    Total available slots for Monday.

  - `constant.mon.availability` (boolean)
    Indicates whether slots are available on Monday.

  - `constant.mon.intervals` (array)
    List of available time intervals for Monday.

  - `constant.mon.intervals.id` (string)
    Unique identifier for the interval.

  - `constant.mon.intervals.start` (string)
    Start time of the interval.

  - `constant.mon.intervals.end` (string)
    End time of the interval.

  - `constant.mon.intervals.slots` (integer)
    Total available slots within the interval.

## Request examples:

  - `Request Example` (unknown)

## Response 200:

  - `200` (unknown)
    200

## Response 200 fields (application/json):

  - `constant` (object)

  - `constant.mon` (object)

  - `constant.mon.slots` (integer)
    Example: 0

  - `constant.mon.availability` (boolean)
    Example: true

  - `constant.mon.message` (string | null)
    Example: null

  - `constant.mon.intervals` (array)

  - `constant.mon.intervals.start` (string)
    Example: 06:00

  - `constant.mon.intervals.end` (string)
    Example: 07:01

  - `constant.mon.intervals.slots` (integer)
    Example: 0

  - `constant.mon.intervals.id` (string)
    Example: KDM2MCwgNDIxKQ

## Response 200 examples:

  - `Result` (unknown)

