# Get Episode

Retrieve episode information for the given ID.

Endpoint: GET /v1/episodes/{id}
Version: 1.0.0
Security: apiKeyAuth, practiceGroupId

## Security:

  - `apiKeyAuth` (unknown)
    apiKey in header x-api-key

  - `practiceGroupId` (unknown)
    apiKey in header x-practice-group-id

## Path parameters:

  - `id` (string, required)

## Response 200:

  - `200` (unknown)
    Ok

## Response 200 fields (application/json):

  - `id` (string, required)

  - `status` (string, required)
    Enum: "open", "closed", "in_progress"

  - `priority` (string, required)
    Enum: "lowest", "low", "medium", "high", "highest"

  - `assignees` (array)

  - `assignees.type` (string, required)
    Enum: "Admin", "AdminTeam", "Unassigned"

  - `assignees.id` (string, required)

  - `assignees.name` (string, required)

  - `tasks` (array)

  - `tasks.id` (string, required)

  - `tasks.type_label` (string, required)

  - `tasks.status` (string, required)
    Enum: "open", "closed", "in_progress"

  - `tasks.details` (string)

  - `tasks.category` (string, required)

  - `tasks.patient` (object, required)

  - `tasks.patient.id` (string, required)

  - `tasks.patient.uid` (string)

  - `tasks.patient.ehr_partner_id` (string)

  - `tasks.patient.emis_id` (string)

  - `tasks.patient.deceased_at` (string)

  - `tasks.patient.ods_code` (string)

  - `tasks.patient.dob` (string, required)

  - `tasks.patient.title` (string)

  - `tasks.patient.first_name` (string)

  - `tasks.patient.last_name` (string)

  - `tasks.patient.sex` (string, required)
    Enum: "unspecified", "male", "female", "other"

  - `tasks.patient.nhs_number` (string)

  - `tasks.patient.email` (string)

  - `tasks.patient.mobile` (string)

  - `tasks.patient.last_sync_at` (string)

  - `tasks.patient.full_name` (string, required)

  - `tasks.patient.contact_emails` (array, required)

  - `tasks.patient.registered_practitioner_name` (string, required)

  - `tasks.patient.notes` (string, required)

  - `tasks.patient.membership_scheme_names` (array, required)

  - `tasks.patient.address` (object, required)

  - `tasks.patient.address.line1` (string)

  - `tasks.patient.address.line2` (string)

  - `tasks.patient.address.line3` (string)

  - `tasks.patient.address.town` (string, required)

  - `tasks.patient.address.county` (string)

  - `tasks.patient.address.country` (string, required)

  - `tasks.patient.address.postcode` (string, required)

  - `tasks.patient.verification_credentials_list` (array)
    An array of unique emails and mobile numbers from the verification credentials associated with the patients practice group, Only applicable for practices using the JS booking flow and marked as private

  - `tasks.form_response` (object)

  - `tasks.form_response.id` (number, required)

  - `tasks.form_response.form_id` (number, required)

  - `tasks.form_response.client_id` (number, required)

  - `tasks.form_response.appointment_id` (number, required)

  - `tasks.form_response.invoice_id` (number, required)

  - `tasks.form_response.practice_group_id` (number, required)

  - `tasks.form_response.created_at` (string, required)

  - `tasks.form_response.updated_at` (string, required)

  - `tasks.form_response.hidden` (boolean, required)

  - `tasks.form_response.emis_file_record_at` (string, required)

  - `tasks.form_response.short_link_id` (number, required)

  - `tasks.form_response.admin_id` (number, required)

  - `tasks.form_response.write_to_record_error` (string, required)

  - `tasks.form_response.title` (string, required)

  - `tasks.form_response.submitted_at` (string, required)

  - `tasks.form_response.form_questions_responses` (array, required)

  - `tasks.form_response.form_questions_responses.id` (string, required)

  - `tasks.form_response.form_questions_responses.question` (string, required)

  - `tasks.form_response.form_questions_responses.answer` (string, required)

  - `tasks.form_response.form_questions_responses.snomed_code` (string)

  - `tasks.form_response.form_questions_responses.type` (string, required)
    Enum: "str", "int", "bool", "datepicker", "text", "radio", "dropdown", "checkboxes", "consent", "paragraph", "attachment", "observation", "problem", "immunisation"

  - `tasks.form_response.form` (object, required)

  - `tasks.form_response.form.id` (string, required)

  - `tasks.form_response.form.title` (string, required)

  - `tasks.form_response.form.description` (string, required)

  - `tasks.form_response.form.patient_title` (string, required)

  - `tasks.form_response.form.patient_description` (string, required)

  - `tasks.form_response.form.reply_form` (boolean, required)

  - `tasks.form_response.form.form_type` (string, required)
    Enum: "questionnaire", "response", "appointment", "care_navigation", "intake_form", "structured_consult"

  - `tasks.form_response.form.snomed_code` (string, required)

  - `tasks.form_response.write_to_record_status` (string, required)

  - `tasks.appointment` (object)

  - `tasks.appointment.id` (string, required)

  - `tasks.appointment.location_id` (string, required)

  - `tasks.appointment.start_time` (string, required)

  - `tasks.appointment.reserved_until` (string)

  - `tasks.appointment.booking_confirmed_at` (string)

  - `tasks.appointment.can_be_cancelled` (boolean)

  - `tasks.appointment.can_be_rescheduled` (boolean)

  - `tasks.appointment.cancellation_policy_hours` (number)

  - `tasks.appointment.appointment_template_name` (string)

  - `tasks.appointment.cancelled_at` (string)

  - `tasks.appointment.confirmed_at` (string)

  - `tasks.appointment.appointment_source` (string)

  - `tasks.appointment.video` (boolean)

  - `tasks.appointment.in_person` (boolean)

  - `tasks.appointment.telephone` (boolean)

  - `tasks.appointment.location_name` (string)

  - `tasks.appointment.service` (string)

  - `tasks.appointment.source` (string)

  - `tasks.appointment.status` (string)

  - `tasks.appointment.appointment_type_id` (string)

  - `tasks.appointment.duration` (number)

  - `tasks.appointment.patient_uid` (string)

  - `tasks.appointment.practitioner_id` (string)

  - `tasks.appointment.booking_status` (string)
    Enum: "reserved", "pending", "confirmed", "cancelling", "rescheduling", "abandoned", "cancelled", "failed", "unknown"

  - `tasks.appointment.booking_mechanism` (string)
    Enum: "hero_confirmed", "ehr_confirmed"

  - `tasks.appointment.created_at` (string)

  - `tasks.appointment.reason` (string)

  - `tasks.appointment.practitioner_name` (string)

  - `tasks.appointment.communication_method` (string)

  - `tasks.appointment.video_url` (string)

  - `tasks.appointment.rescheduled_at` (string)

  - `tasks.communication` (object)

  - `tasks.communication.id` (string, required)

  - `tasks.communication.content` (string)

  - `tasks.communication.contact_method` (string, required)
    Enum: "email", "sms", "hero", "nhs_app"

  - `tasks.communication.write_to_record_timestamp` (string)

  - `tasks.communication.write_to_record_error` (string)

  - `tasks.communication.write_to_record_status` (string, required)

  - `tasks.communication.short_link` (object)

  - `tasks.communication.short_link.id` (string)

  - `tasks.communication.short_link.type` (string)

  - `tasks.communication.short_link.name` (string)

  - `tasks.communication.short_link.status` (string)

  - `tasks.communication.notification` (object, required)

  - `tasks.communication.notification.id` (string, required)

  - `tasks.communication.notification.sent_at` (string, required)

  - `tasks.communication.notification.status` (string, required)

  - `tasks.communication.notification.primary_recipient_contact_detail` (string)

  - `tasks.communication.notification.failure_reason` (string)

  - `tasks.note` (object)

  - `tasks.note.id` (number, required)

  - `tasks.note.description` (string, required)

  - `tasks.note.admin` (object, required)

  - `tasks.note.admin.id` (number, required)

  - `tasks.note.admin.first_name` (string, required)

  - `tasks.note.admin.last_name` (string, required)

  - `tasks.note.admin.full_name` (string, required)

  - `tasks.note.practice_group_id` (number, required)

  - `tasks.note.archived_at` (string, required)

  - `tasks.note.created_at` (string, required)

  - `tasks.note.updated_at` (string, required)

  - `tasks.assignee_id` (string)

  - `tasks.assignee_type` (string)

  - `tasks.assignee_name` (string)

  - `tasks.priority` (string, required)
    Enum: "lowest", "low", "medium", "high", "highest"

  - `tasks.created_at` (string, required)

  - `tasks.title` (string, required)

  - `tasks.title_sub_text` (string, required)

  - `patient` (object, required)

  - `patient.ehr_partner_id` (string)

  - `patient.emis_id` (string)

  - `patient.deceased_at` (string)

  - `patient.ods_code` (string)

  - `patient.dob` (string, required)

  - `patient.title` (string)
    Enum: "Baron", "Baroness", "Brigadier", "Count", "Colonel", "Countess", "Captain", "Dame", "The Dowager Viscountess", "Dr", "Duchess", "Duke", "Earl", "His Excellency", "Father", "H.E. Ambassador Mr", "H.E. Mr", "H.E. Mrs", "Her Grace", "His Grace", "The Hon", "The Hon Mr", "The Hon Mrs", "HRH", "HRH Prince", "HRH Princess", "Insurance", "HM King", "Lady", "Lord", "Major", "Master", "Miss", "Mr", "Mrs", "Ms", "Mss", "Mx", "Pr", "Professor", "HM Queen", "Rabbi", "Reverend", "Sheikh", "Sheikha", "Sir", "The", "", "Viscount", "Viscountess"

  - `patient.first_name` (string)

  - `patient.last_name` (string)

  - `patient.sex` (string)
    Enum: "Not known", "Not specified", "Male", "Female", "Other"

  - `patient.nhs_number` (string)

  - `patient.email` (string)
    The patient's contact email: the primary contact email held on the Hero patient record, or null when none is set. Login and account emails are never returned here. For patients read live from the EHR, the email held on the EHR record.

  - `patient.mobile` (string)

  - `patient.last_sync_at` (string)

  - `patient.data_source` (string)
    Enum: "hero", "emis", "pds", "gha", "systm_one"

  - `patient.restricted` (boolean)

  - `patient.line_1` (string)

  - `patient.line_2` (string)

  - `patient.line_3` (string)

  - `patient.town` (string)

  - `patient.county` (string)

  - `patient.postcode` (string)

  - `patient.hero_id` (string)

  - `patient.hero_uid` (string)

  - `patient.identifiers` (array, required)

  - `patient.identifiers.source` (string, required)
    Enum: "nhs", "gha", "ehr_partner", "hero"

  - `patient.identifiers.name` (string, required)
    Enum: "nhs_number", "gha_number", "ehr_partner_id", "hero_id", "hero_uid"

  - `patient.identifiers.role` (string, required)
    Enum: "main", "secondary"

  - `patient.identifiers.label` (string, required)
    Enum: "NHS", "GHA", "EMIS", "Hero", "Systm One"

  - `patient.identifiers.value` (string, required)

  - `patient.ehr_registered` (boolean, required)

  - `category` (string, required)

  - `label` (string, required)

  - `description` (string, required)

  - `created_at` (string, required)

  - `updated_at` (string, required)

## Response 400:

  - `400` (unknown)
    Validation error

## Response 400 fields (application/json):

  - `error` (boolean, required)
    Example: true

  - `statusCode` (number, required)
    Example: 400

  - `message` (array, required)

  - `message.code` (string, required)
    Example: invalid_type

  - `message.expected` (string, required)
    Example: string

  - `message.path` (array, required)
    Example: ["patient_id"]

  - `message.message` (string, required)
    Example: Required

## Response 401:

  - `401` (unknown)
    Unauthorised

## Response 404:

  - `404` (unknown)
    Not found

## Response 429:

  - `429` (unknown)
    Too Many Requests

## Response 500:

  - `500` (unknown)
    Unknown error

