Browse documentation

Carebit API

Availability Periods

Set when Clinicians can and cannot be booked, including repeating schedules.

Required API scopes: availability_periods.createavailability_periods.deleteavailability_periods.update

Endpoints

Scroll this page to read every Availability Periods endpoint, or jump to one below.

post/v1/availability_periods

Create an availability or unavailability period

Set is_recurring to false for a one-off period and supply start_time and end_time. Set is_recurring to true for a repeating period and choose simple or advanced as the recurring_strategy. A simple weekly Tuesday uses recurring_strategy: "simple", recurring_day_number_of_week: 2, recurring_interval_in_seconds: 604800, and a Tuesday recurring_start_date. A simple fortnightly period uses 1209600 seconds. The second Thursday of every month uses recurring_strategy: "advanced", recurring_nth_day_in_month: 2, recurring_day_number_of_week: 4, and a matching start date such as 2026-01-08. Add recurring_dates_to_skip: ["2026-02-12"] to omit that specific monthly occurrence. Recurring start and end times use the Organization's local time.

Required API scopes: availability_periods.create

Parameters

  • Idempotency-Key

    header · required

    string

    Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an Idempotency-Replayed: true header. Same key + different body returns 422 idempotency_key_reused. A duplicate that arrives while the first request is still in flight returns 409 idempotency_conflict with Retry-After: 1.

Request body

application/json

  • availability_typestringrequired

    Whether the period makes the Clinician available or unavailable.

    Allowed values: availability | unavailability

  • clinician_idstring | null · uuidrequired

    The Clinician affected by the period.

  • end_timestring | null · date-time

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • is_activebooleanrequired

    Whether the period contributes to the diary.

  • is_recurringbooleanrequired

    Whether the period repeats. When false, supply start_time and end_time; recurring fields are cleared.

  • notesstring | null

    Internal notes about the period.

  • recurring_dates_to_skiparray

    Specific ISO 8601 dates on which a recurring period must not occur. For example, ["2026-02-12"] skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.

    • itemsstring · date
  • recurring_day_number_of_weekinteger | null

    The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.

  • recurring_end_datestring | null · date

    The optional final recurrence date. It must be after recurring_start_date.

  • recurring_end_timestring | null

    The end time for each recurring occurrence in the Organization's local time.

  • recurring_interval_in_secondsinteger | null

    Required for simple. Use 604800 for weekly or 1209600 for every two weeks.

  • recurring_nth_day_in_monthinteger | null

    Required for advanced. Use 2 with weekday 4 for the second Thursday of each month.

  • recurring_start_datestring | null · date

    The first recurrence date. Supply a date that matches recurring_day_number_of_week.

  • recurring_start_timestring | null

    The start time for each recurring occurrence in the Organization's local time.

  • recurring_strategystring | null

    Select simple for a fixed interval measured in seconds, such as every week or every two weeks. Select advanced for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.

    Allowed values: simple | advanced | null

  • room_idstring | null · uuid

    The Room affected by the period.

  • service_variant_idsarray

    The ServiceVariants offered during an availability period.

    • itemsstring · uuid
  • start_timestring | null · date-time

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

Responses

201

The requested AvailabilityPeriod.

  • availability_typestringrequired

    Whether the period makes the Clinician available or unavailable.

    Allowed values: availability | unavailability

  • clinician_idstring | null · uuidrequired

    The Clinician affected by the period.

  • created_atstring · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • end_timestring | null · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • idstring · uuidrequired

    The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.

  • is_activebooleanrequired

    Whether the period contributes to the diary.

  • is_recurringbooleanrequired

    Whether the period repeats. When false, use start_time and end_time; recurring fields are cleared.

  • linksobjectrequired

    URLs to related resources.

    • clinicianstring | null · urirequired

      The full URL of a related resource.

  • notesstring | nullrequired

    Internal notes about the period.

  • objectanyrequired

    Discriminator value emitted at object.

  • recurring_dates_to_skiparrayrequired

    Specific ISO 8601 dates on which a recurring period must not occur. For example, ["2026-02-12"] skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.

    • itemsstring · date
  • recurring_day_number_of_weekinteger | nullrequired

    The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.

  • recurring_end_datestring | null · daterequired

    The optional final date on which the recurrence can apply. It must be after recurring_start_date.

  • recurring_end_timestring | nullrequired

    The end time for each recurring occurrence in the Organization's local time.

  • recurring_interval_in_secondsinteger | nullrequired

    Required for the simple strategy. Use 604800 for weekly or 1209600 for every two weeks.

  • recurring_nth_day_in_monthinteger | nullrequired

    Required for the advanced strategy. For example, use 2 with weekday 4 for the second Thursday of each month.

  • recurring_start_datestring | null · daterequired

    The first date on which the recurrence can apply. Supply a date that matches recurring_day_number_of_week.

  • recurring_start_timestring | nullrequired

    The start time for each recurring occurrence in the Organization's local time.

  • recurring_strategystring | nullrequired

    Select simple for a fixed interval measured in seconds, such as every week or every two weeks. Select advanced for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.

    Allowed values: simple | advanced | null

  • room_idstring | null · uuidrequired

    The Room affected by the period.

  • service_variant_idsarrayrequired

    The ServiceVariants offered during an availability period.

    • itemsstring · uuid
  • start_timestring | null · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • updated_atstring · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

Example
{
  "id": "5267a739-2a80-4eaa-80c5-4baeb6a766a9",
  "object": "availability_period",
  "availability_type": "availability",
  "clinician_id": "00000000-0000-4000-8000-000000000002",
  "created_at": "2026-01-01T09:00:00Z",
  "end_time": "2026-01-01T10:00:00Z",
  "is_active": true,
  "is_recurring": true,
  "links": 
    "clinician": "https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002"
  },
  "notes": "Please confirm the appointment by email.",
  "recurring_dates_to_skip": 
    "2026-01-01"
  ],
  "recurring_day_number_of_week": 1,
  "recurring_end_date": "2026-12-31",
  "recurring_end_time": "17:00:00",
  "recurring_interval_in_seconds": 1,
  "recurring_nth_day_in_month": 1,
  "recurring_start_date": "2026-01-01",
  "recurring_start_time": "09:00:00",
  "recurring_strategy": "simple",
  "room_id": "eff69f7b-74ec-437f-8cc8-5be1dc711d73",
  "service_variant_ids": 
    "00000000-0000-4000-8000-000000000006"
  ],
  "start_time": "2026-01-01T09:00:00Z",
  "updated_at": "2026-01-01T09:00:00Z"
}
400

The Idempotency-Key header is missing (idempotency_key_required) or exceeds 255 characters (idempotency_key_too_long).

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
401

The access token is missing, invalid, expired, or revoked.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
403

The access token lacks the required scope, or the project is disabled.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
404

A referenced resource was not found in the Organization.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
409

A concurrent request holds the idempotency lease (idempotency_conflict). Retry after the delay indicated by Retry-After.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
422

The Idempotency-Key was previously used with a different request body (idempotency_key_reused), or the request body failed validation.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
429

Too many requests. Retry after the delay indicated by Retry-After.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
patch/v1/availability_periods/:id

Update an availability or unavailability period

Set is_recurring to false for a one-off period and supply start_time and end_time. Set is_recurring to true for a repeating period and choose simple or advanced as the recurring_strategy. A simple weekly Tuesday uses recurring_strategy: "simple", recurring_day_number_of_week: 2, recurring_interval_in_seconds: 604800, and a Tuesday recurring_start_date. A simple fortnightly period uses 1209600 seconds. The second Thursday of every month uses recurring_strategy: "advanced", recurring_nth_day_in_month: 2, recurring_day_number_of_week: 4, and a matching start date such as 2026-01-08. Add recurring_dates_to_skip: ["2026-02-12"] to omit that specific monthly occurrence. Recurring start and end times use the Organization's local time.

Required API scopes: availability_periods.update

Parameters

  • id

    path · required

    string

    -

  • Idempotency-Key

    header · required

    string

    Client-generated idempotency key. Required for every POST/PATCH write. Replay of the same key with the same body returns the stored response with an Idempotency-Replayed: true header. Same key + different body returns 422 idempotency_key_reused. A duplicate that arrives while the first request is still in flight returns 409 idempotency_conflict with Retry-After: 1.

Request body

application/json

  • availability_typestring

    Whether the period makes the Clinician available or unavailable.

    Allowed values: availability | unavailability

  • clinician_idstring | null · uuid

    The Clinician affected by the period.

  • end_timestring | null · date-time

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • is_activeboolean

    Whether the period contributes to the diary.

  • is_recurringboolean

    Whether the period repeats. When false, supply start_time and end_time; recurring fields are cleared.

  • notesstring | null

    Internal notes about the period.

  • recurring_dates_to_skiparray

    Specific ISO 8601 dates on which a recurring period must not occur. For example, ["2026-02-12"] skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.

    • itemsstring · date
  • recurring_day_number_of_weekinteger | null

    The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.

  • recurring_end_datestring | null · date

    The optional final recurrence date. It must be after recurring_start_date.

  • recurring_end_timestring | null

    The end time for each recurring occurrence in the Organization's local time.

  • recurring_interval_in_secondsinteger | null

    Required for simple. Use 604800 for weekly or 1209600 for every two weeks.

  • recurring_nth_day_in_monthinteger | null

    Required for advanced. Use 2 with weekday 4 for the second Thursday of each month.

  • recurring_start_datestring | null · date

    The first recurrence date. Supply a date that matches recurring_day_number_of_week.

  • recurring_start_timestring | null

    The start time for each recurring occurrence in the Organization's local time.

  • recurring_strategystring | null

    Select simple for a fixed interval measured in seconds, such as every week or every two weeks. Select advanced for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.

    Allowed values: simple | advanced | null

  • room_idstring | null · uuid

    The Room affected by the period.

  • service_variant_idsarray

    The ServiceVariants offered during an availability period.

    • itemsstring · uuid
  • start_timestring | null · date-time

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

Responses

200

The requested AvailabilityPeriod.

  • availability_typestringrequired

    Whether the period makes the Clinician available or unavailable.

    Allowed values: availability | unavailability

  • clinician_idstring | null · uuidrequired

    The Clinician affected by the period.

  • created_atstring · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • end_timestring | null · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • idstring · uuidrequired

    The resource's unique identifier, formatted as an RFC 4122 version 4 UUID.

  • is_activebooleanrequired

    Whether the period contributes to the diary.

  • is_recurringbooleanrequired

    Whether the period repeats. When false, use start_time and end_time; recurring fields are cleared.

  • linksobjectrequired

    URLs to related resources.

    • clinicianstring | null · urirequired

      The full URL of a related resource.

  • notesstring | nullrequired

    Internal notes about the period.

  • objectanyrequired

    Discriminator value emitted at object.

  • recurring_dates_to_skiparrayrequired

    Specific ISO 8601 dates on which a recurring period must not occur. For example, ["2026-02-12"] skips the occurrence on 12 February 2026. Only dates that are today or in the future are retained.

    • itemsstring · date
  • recurring_day_number_of_weekinteger | nullrequired

    The ISO weekday number used by a recurring period. The values start at 1, not 0: 1 is Monday, 2 is Tuesday, 3 is Wednesday, 4 is Thursday, 5 is Friday, 6 is Saturday, and 7 is Sunday.

  • recurring_end_datestring | null · daterequired

    The optional final date on which the recurrence can apply. It must be after recurring_start_date.

  • recurring_end_timestring | nullrequired

    The end time for each recurring occurrence in the Organization's local time.

  • recurring_interval_in_secondsinteger | nullrequired

    Required for the simple strategy. Use 604800 for weekly or 1209600 for every two weeks.

  • recurring_nth_day_in_monthinteger | nullrequired

    Required for the advanced strategy. For example, use 2 with weekday 4 for the second Thursday of each month.

  • recurring_start_datestring | null · daterequired

    The first date on which the recurrence can apply. Supply a date that matches recurring_day_number_of_week.

  • recurring_start_timestring | nullrequired

    The start time for each recurring occurrence in the Organization's local time.

  • recurring_strategystring | nullrequired

    Select simple for a fixed interval measured in seconds, such as every week or every two weeks. Select advanced for an occurrence such as the second Thursday of every month. Use null for a non-recurring period.

    Allowed values: simple | advanced | null

  • room_idstring | null · uuidrequired

    The Room affected by the period.

  • service_variant_idsarrayrequired

    The ServiceVariants offered during an availability period.

    • itemsstring · uuid
  • start_timestring | null · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

  • updated_atstring · date-timerequired

    An ISO 8601 timestamp in UTC, with a Z suffix. For example, 2026-07-01T09:00:00Z.

Example
{
  "id": "5267a739-2a80-4eaa-80c5-4baeb6a766a9",
  "object": "availability_period",
  "availability_type": "availability",
  "clinician_id": "00000000-0000-4000-8000-000000000002",
  "created_at": "2026-01-01T09:00:00Z",
  "end_time": "2026-01-01T10:00:00Z",
  "is_active": true,
  "is_recurring": true,
  "links": 
    "clinician": "https://api.carebit.co/v1/clinicians/00000000-0000-4000-8000-000000000002"
  },
  "notes": "Please confirm the appointment by email.",
  "recurring_dates_to_skip": 
    "2026-01-01"
  ],
  "recurring_day_number_of_week": 1,
  "recurring_end_date": "2026-12-31",
  "recurring_end_time": "17:00:00",
  "recurring_interval_in_seconds": 1,
  "recurring_nth_day_in_month": 1,
  "recurring_start_date": "2026-01-01",
  "recurring_start_time": "09:00:00",
  "recurring_strategy": "simple",
  "room_id": "eff69f7b-74ec-437f-8cc8-5be1dc711d73",
  "service_variant_ids": 
    "00000000-0000-4000-8000-000000000006"
  ],
  "start_time": "2026-01-01T09:00:00Z",
  "updated_at": "2026-01-01T09:00:00Z"
}
400

The Idempotency-Key header is missing (idempotency_key_required) or exceeds 255 characters (idempotency_key_too_long).

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
401

The access token is missing, invalid, expired, or revoked.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
403

The access token lacks the required scope, or the project is disabled.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
404

Error response.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
409

A concurrent request holds the idempotency lease (idempotency_conflict). Retry after the delay indicated by Retry-After.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
422

The Idempotency-Key was previously used with a different request body (idempotency_key_reused), or the request body failed validation.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
429

Too many requests. Retry after the delay indicated by Retry-After.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
delete/v1/availability_periods/:id

Delete an availability or unavailability period

Required API scopes: availability_periods.delete

Parameters

  • id

    path · required

    string

    -

Responses

204

No content.

401

The access token is missing, invalid, expired, or revoked.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
403

The access token lacks the required scope, or the project is disabled.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
404

Error response.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}
429

Too many requests. Retry after the delay indicated by Retry-After.

  • errorobjectrequired

    The structured details that describe why the request failed.

    • codestringrequired

      The machine-readable error code.

    • errorsarray | null

      Additional errors from a failed validation.

      • itemsobject
        • codestring

          The machine-readable code for this validation error.

        • messagestring

          A message that explains this validation error.

        • paramstring | null

          The name of the parameter that caused this validation error, when known.

    • messagestringrequired

      A message that explains the error and how to resolve it.

    • paramstring | null

      The name of the parameter that caused the error, when known.

    • typestringrequired

      The high-level category of the error.

      Allowed values: authentication_error | permission_error | invalid_request_error | rate_limit_error | api_error

Example
{
  "error": 
    "code": "resource_missing",
    "errors": 
      
        "code": "resource_missing",
        "message": "The requested resource was not found.",
        "param": "patient_id"
      }
    ],
    "message": "The requested resource was not found.",
    "param": "patient_id",
    "type": "authentication_error"
  }
}

Prefer plain text? Append ?format=md or send Accept: text/markdown to receive this page as raw Markdown.