Developers

Search the docs

Search guides and headings.

Book a visit

POST/care/v1/booking/create/document
Scope: booking:writeBAA required

Books one of the open times of a service for a patient. The patient must have an active connection with your company that allows bookings. Insurance cannot be used for a booking made through this API.

The order of calls is: connect the patient, save a card, book. A visit charges nothing when it is booked; the visit, a late-cancellation fee and a no-show fee are charged later to the patient's default card, so a patient with no default card cannot be booked. Save one first with POST /care/v1/patient/{patient_id}/payment-method/setup/create/document and its confirm route.

Booking the same patient, specialist and start again returns the first booking, so a retry is safe. A new booking raises one booking.created event; a repeat raises none.

Needs the booking:write scope.

Request body

  • client_notestringnullable

    A note for the specialist, at most 2000 characters. It cannot contain $, { or }.

    Max length 2000 · Pattern ^[^${}]*$

  • service_idstringrequired

    The ID of the service.

    Min length 1 · Max length 200

  • specialist_idstring (uuid)required

    The ID of the specialist.

  • start_timestring (date-time)required

    The start of the open time you chose, with a UTC offset. Take it from the open times of the service.

  • timezonestringrequired

    The patient's IANA timezone, for example America/Toronto.

    Min length 1 · Max length 64

  • userstring (uuid)required

    The ID of the patient the visit is for. The patient must have an active connection with your company that allows bookings.

Response 201

  • booking_idstringrequired

    The ID of the booking.

  • booking_namestringrequired

    The name of the booking.

  • client_notestringnullable

    The note for the specialist. Only when you read one booking.

  • created_atstring (date-time)required

    When your company booked the visit.

  • end_datestring (date-time)required

    When the visit ends, in UTC.

  • has_reportbooleanrequired

    Whether a report exists for the visit.

  • is_insurance_selectedbooleanrequired

    Whether insurance was selected. Always false for a booking made through this API.

  • service_snapshotBookingServicerequired

    The service, as of the booking.

    Show child attributesHide child attributes
    • accepted_insurance_providersarray of string

      The insurance providers accepted for the service.

    • is_insurance_acceptedbooleanrequired

      Whether insurance was accepted for the service.

    • service_currencystringrequired

      The currency of the price.

    • service_descriptionstringnullable

      The description of the service.

    • service_duration_in_minutesintegerrequired

      The length of the visit in minutes.

    • service_idstringrequired

      The ID of the service.

    • service_image_urlstringnullable

      The URL of an image of the service.

    • service_mode_of_deliveryenumrequired

      How the visit is delivered: In Person or Virtual.

      • In Person
      • Virtual
    • service_namestringrequired

      The name of the service.

    • service_price_in_centsintegerrequired

      The price in cents, as it was when the visit was booked.

  • specialiststringrequired

    The ID of the specialist.

  • specialist_snapshotBookingSpecialistrequired

    The specialist, as of the booking.

    Show child attributesHide child attributes
    • first_namestringrequired

      The first name.

    • last_namestringrequired

      The last name.

    • profile_picture_urlstringnullable

      The URL of the photo.

    • specialist_idstringrequired

      The ID of the specialist.

    • specialist_typeenumrequired

      The kind of specialist.

      • Dietitian
      • Certified Nutrition Specialist
      • Physical Trainer
  • start_datestring (date-time)required

    When the visit starts, in UTC.

  • statusenumrequired

    The status of the booking: booked, meeting_rescheduled, meeting_completed, meeting_cancelled or no_show.

    • booked
    • meeting_rescheduled
    • meeting_completed
    • meeting_cancelled
    • no_show
  • timezonestringrequired

    The IANA timezone the visit was booked in.

  • updated_atstring (date-time)required

    When the record of the visit last changed.

  • userstringrequired

    The ID of the patient.

Errors

Every error has this shape. Branch on code, not on message. request_id equals the X-Request-Id response header.

jsonError response
{
  "error": {
    "code": "not_found",
    "message": "The object does not exist.",
    "request_id": "req_0123456789abcdef0123456789abcdef"
  }
}
StatusCodeMeaning
401invalid_api_keyThe API key is missing or not valid.
403company_archivedThis company is archived.
403company_not_liveThe company must be live to use prod keys.
403company_suspendedThis company is suspended.
403connection_scope_not_grantedWhen the patient did not allow bookings
403scope_not_grantedThis API key does not have the booking:write scope.
404not_foundWhen the patient has no connection with your company that allows care
409agreements_not_signedWhen the patient has not signed the agreements a visit needs
409connection_not_activeWhen the connection is pending or was revoked
409not_licensed_hereWhen the specialist cannot serve the booking yet
409payment_method_requiredWhen the patient has no card saved to their account. Nothing is booked
409service_not_bookableWhen the service cannot be booked online, or the specialist or the service does not exist
409slot_takenWhen the time is no longer open
422validation_errorbody.user: Field required
429rate_limitedToo many requests. Wait before calling again.
500internal_errorSomething went wrong on our side. Please try again later.
502upstream_errorA Nurish'd service could not complete the request.
503upstream_unavailableA Nurish'd service is unavailable. Please try again later.
504upstream_timeoutA Nurish'd service did not answer in time. Please try again.

All error codes and what to do about them