---
title: "Put provider calendar timeslots"
method: PUT
path: "/v1/providers/{provider_id}/calendar/timeslots"
tags: ["calendar-integration-timeslots"]
---

# Put provider calendar timeslots

`PUT /v1/providers/{provider_id}/calendar/timeslots`

## Request

- Base URL: `https://api-developer-sandbox.zocdoc.com`
- URL: `https://api-developer-sandbox.zocdoc.com/v1/providers/{provider_id}/calendar/timeslots`
- Auth: none declared

This endpoint sets the complete list of available slots for a specific provider on a specific date. Each request must include the entire set of slots for that date. If a provider wishes to list times at multiple locations for a single date, each location must have its own timeslot object added to the array. A new request made for the same provider and date will overwrite the previous set of slots. If you send an empty array, all slots for that provider across all locations on that date will be deleted.

**Note**: The timeslots are stored in an eventually consistent data store. This means there is a small
possibility that a fetch might not include recently created slots if you fetch timeslots immediately after inserting them.

**Parameter Validations**:
* The user must have access to the specified `provider_id`.

**Validations for each timeslot in the request body**:
* `slot.provider_id`:
    * Must match the `provider_id` specified in the endpoint parameter.
* `slot.start_time`:
    * Must be a valid "local date-time" string in ISO 8601 format, e.g., `2024-09-15T12:13:00`. The seconds component is optional.
    * The date component must match the `date` parameter.
* `slot.time_zone`:
    * Must be a valid IANA time zone ID (e.g., `America/New_York` or `America/Denver`).

## Path parameters

- `provider_id` string, required

## Query parameters

- `date` string, date, required

## Request body

- TimeslotPutRequest
  - `timeslots` TimeslotBaseRequest[], required
    - `provider_id` string, required: Provider id
    - `location_id` string, required: Location id
    - `start_time` string, date-time-local, required: the local date and time within the timezone. The seconds may be omitted.
    - `time_zone` string, required: The IANA time zone id of the appointment. Must be valid.
    - `allowed_visit_reason_ids` string[]: Restrict the timeslot to these visit reasons. Both `null` and an empty array will not restrict the timeslot. Can work in conjunction with `excluded_visit_reason_ids`. `allowed_visit_reason_ids` are superceded by `excluded_visit_reason_ids`. So if a visit reason is included in both `allowed_visit_reason_ids` and `excluded_visit_reason_ids`, the net effect is that visit reason being excluded. | allowed | excluded | => Result | | ----- | -------- | --------- | | null | null | all visit reasons allowed | | [A,B] | null | only A & B are allowed | | null | [A,B] | all visit reasons except A & B are allowed | | [A,B] | [B,C] | only A is allowed (C is irrelevant) | | [A,B] | [A,B] | No visit reasons allowed, unbookable timeslot |
    - `excluded_visit_reason_ids` string[]: Exclude these visit reasons. Both `null` and an empty array means no visit reasons will be excluded. Can work in conjunction with `allowed_visit_reason_ids`. `allowed_visit_reason_ids` are superceded by `excluded_visit_reason_ids`. So if a visit reason is included in both `allowed_visit_reason_ids` and `excluded_visit_reason_ids`, the net effect is that visit reason being excluded. | allowed | excluded | => Result | | ----- | -------- | --------- | | null | null | all visit reasons allowed | | [A,B] | null | only A & B are allowed | | null | [A,B] | all visit reasons except A & B are allowed | | [A,B] | [B,C] | only A is allowed (C is irrelevant) | | [A,B] | [A,B] | No visit reasons allowed, unbookable timeslot |
    - `patient_type` 'existing' | 'new': Whether or not the patient has been to the provider's practice.

## Response `200`

OK

- TimeslotPutResponse
  - `errors` TimeslotPutErrors
    - `not_found_location_ids` string[], required: Location IDs that were not found on the Zocdoc side.

## Other responses

- `400`: Invalid request parameters.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found

---

[API](https://skmtc.dev/zocdoc/apis/zocdoc-bundle-api.md) - [All operations](https://skmtc.dev/zocdoc/apis/zocdoc-bundle-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zocdoc/apis/zocdoc-bundle-api/revisions/965a6ca4ed12?raw)
