# Put provider calendar timeslots This endpoint is used to set all slots for a given provider and date, replacing any existing slots. Sending an empty body will erase all slots for the specified date. : 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. : * The user must have access to the specified . : * : * Must match the specified in the endpoint parameter. * : * Must be a valid "local date-time" string in ISO 8601 format, e.g., . The seconds component is optional. * The date component must match the parameter. * : * Must be a valid IANA time zone ID (e.g., or ). Endpoint: PUT /v1/providers/{provider_id}/calendar/timeslots Version: 1.22 Security: ClientCredentialsFlow ## Path parameters: - `provider_id` (string, required) Example: "pr_abc123-def456_wxyz7890" ## Query parameters: - `date` (string, required) The date for which to put timeslots in YYYY-MM-DD format. Example: "2024-10-16" ## Request fields (application/json): - `timeslots` (array) - `timeslots.provider_id` (string, required) Provider id Example: "pr_abc123-def456_wxyz7890" - `timeslots.location_id` (string, required) Location id Example: "lo_abc123-def456_wxyz7890" - `timeslots.start_time` (string, required) the local date and time within the timezone. The seconds may be omitted. Example: "2024-10-16T09:30:00" - `timeslots.time_zone` (string, required) The IANA time zone id of the appointment. Must be valid. Example: "America/New_York" - `timeslots.allowed_visit_reason_ids` (array) Restrict the timeslot to these visit reasons. Both and an empty array will not restrict the timeslot. Can work in conjunction with . are superceded by . So if a visit reason is included in both and , 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 | Example: ["pc_TlZW-r06U0W3pCsIGtSI5B"] - `timeslots.excluded_visit_reason_ids` (array) Exclude these visit reasons. Both and an empty array means no visit reasons will be excluded. Can work in conjunction with . are superceded by . So if a visit reason is included in both and , 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 | Example: ["pc_TAZW-r16U0B3pZeIutSI3L"] - `timeslots.patient_type` (string) Whether or not the patient has been to the provider's practice. Enum: "existing", "new" ## Response 400 fields (application/json): - `request_id` (string, required) - `error_type` (string, required) Enum: "api_error", "invalid_request" - `errors` (array, required) - `errors.field` (string) - `errors.message` (string, required)