> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Schedule Care Plan Step

> Link an appointment to a care plan step, transitioning it to SCHEDULED.



## OpenAPI

````yaml post /user/patient/care-plans/{care_plan_id}/steps/{step_id}/schedule
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/care-plans/{care_plan_id}/steps/{step_id}/schedule:
    post:
      tags:
        - Care Plans
      summary: Schedule Care Plan Step
      description: Link an appointment to a care plan step, transitioning it to SCHEDULED.
      operationId: >-
        schedule_care_plan_step_user_patient_care_plans__care_plan_id__steps__step_id__schedule_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: care_plan_id
          in: path
          required: true
          schema:
            type: string
            title: Care Plan Id
        - name: step_id
          in: path
          required: true
          schema:
            type: string
            title: Step Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CarePlanStepSchedule'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarePlanDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CarePlanStepSchedule:
      properties:
        eventId:
          type: string
          title: Eventid
      type: object
      required:
        - eventId
      title: CarePlanStepSchedule
      description: Schema for linking an appointment (event) to a care plan step.
    CarePlanDetail:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        patientId:
          type: string
          title: Patientid
        locationId:
          type: string
          title: Locationid
        assignedById:
          type: string
          title: Assignedbyid
        templateId:
          anyOf:
            - type: string
            - type: 'null'
          title: Templateid
        startDate:
          type: string
          format: date-time
          title: Startdate
        stepCount:
          type: integer
          title: Stepcount
          default: 0
        completedStepCount:
          type: integer
          title: Completedstepcount
          default: 0
        tagIds:
          items:
            type: string
          type: array
          title: Tagids
          description: Associated tag IDs
        tags:
          items:
            $ref: '#/components/schemas/CarePlanTagDetail'
          type: array
          title: Tags
          description: Associated tags
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
        steps:
          items:
            $ref: '#/components/schemas/CarePlanStepDetail'
          type: array
          title: Steps
        cycles:
          items:
            $ref: '#/components/schemas/CarePlanCycleDetail'
          type: array
          title: Cycles
      type: object
      required:
        - id
        - name
        - patientId
        - locationId
        - assignedById
        - startDate
      title: CarePlanDetail
      description: Full care plan detail including all steps.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CarePlanTagDetail:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier
        name:
          type: string
          title: Name
          description: Tag name
        color:
          anyOf:
            - type: string
            - type: 'null'
          title: Color
          description: Tag color
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: Creation timestamp
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: Last update timestamp
      type: object
      required:
        - id
        - name
      title: CarePlanTagDetail
      description: Detail view of a care plan tag.
    CarePlanStepDetail:
      properties:
        carePlanId:
          type: string
          title: Careplanid
        stepNumber:
          type: integer
          title: Stepnumber
        carePlanName:
          type: string
          title: Careplanname
          default: ''
        status:
          $ref: '#/components/schemas/CarePlanStepStatus'
        id:
          type: string
          title: Id
        branchId:
          anyOf:
            - type: string
            - type: 'null'
          title: Branchid
        type:
          $ref: '#/components/schemas/CarePlanStepType'
        messageType:
          anyOf:
            - $ref: '#/components/schemas/MessageType'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        minutesAfterPrevious:
          anyOf:
            - type: integer
            - type: 'null'
          title: Minutesafterprevious
        parentStepId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentstepid
        sourceServiceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceserviceid
        serviceIds:
          items:
            type: string
          type: array
          title: Serviceids
        medicationIds:
          items:
            type: string
          type: array
          title: Medicationids
        measurements:
          items:
            $ref: '#/components/schemas/CarePlanTemplateStepMeasurementDetail'
          type: array
          title: Measurements
        smsBody:
          anyOf:
            - type: string
            - type: 'null'
          title: Smsbody
        taskTitle:
          anyOf:
            - type: string
            - type: 'null'
          title: Tasktitle
        taskPriority:
          anyOf:
            - $ref: '#/components/schemas/TaskPriority'
            - type: 'null'
        taskAssigneeId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taskassigneeid
        taskTeamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taskteamid
        taskDescription:
          anyOf:
            - type: string
            - type: 'null'
          title: Taskdescription
        taskDueDateMinutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Taskduedateminutes
        scheduledDate:
          type: string
          format: date-time
          title: Scheduleddate
        eventId:
          anyOf:
            - type: string
            - type: 'null'
          title: Eventid
        taskId:
          anyOf:
            - type: string
            - type: 'null'
          title: Taskid
        completedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completeddate
        isDateEstimated:
          type: boolean
          title: Isdateestimated
          default: false
        cycleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Cycleid
        cyclePass:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cyclepass
        sourceStepId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcestepid
        branches:
          items:
            $ref: '#/components/schemas/CarePlanBranchDetail'
          type: array
          title: Branches
          description: Branches for DECISION steps
        sequences:
          items:
            $ref: '#/components/schemas/CarePlanStepSequenceDetail'
          type: array
          title: Sequences
          description: Step-level sequences attached to this care-plan step
      type: object
      required:
        - carePlanId
        - stepNumber
        - status
        - id
        - type
        - scheduledDate
      title: CarePlanStepDetail
      description: Full detail of a single care plan step.
    CarePlanCycleDetail:
      properties:
        id:
          type: string
          title: Id
        carePlanId:
          type: string
          title: Careplanid
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        branchId:
          anyOf:
            - type: string
            - type: 'null'
          title: Branchid
        templateCycleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Templatecycleid
        parentCycleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Parentcycleid
        passCount:
          type: integer
          title: Passcount
        gapMinutes:
          type: integer
          title: Gapminutes
        position:
          type: integer
          title: Position
        createdDate:
          type: string
          format: date-time
          title: Createddate
        updatedDate:
          type: string
          format: date-time
          title: Updateddate
      type: object
      required:
        - id
        - carePlanId
        - branchId
        - templateCycleId
        - passCount
        - gapMinutes
        - position
        - createdDate
        - updatedDate
      title: CarePlanCycleDetail
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CarePlanStepStatus:
      type: string
      enum:
        - PENDING
        - SCHEDULED
        - COMPLETED
        - SKIPPED
        - MISSED
      title: CarePlanStepStatus
    CarePlanStepType:
      type: string
      enum:
        - APPOINTMENT
        - TASK
        - MESSAGE
        - DECISION
      title: CarePlanStepType
    MessageType:
      type: string
      enum:
        - REMINDER
        - PAYMENT_PLAN_RMNDR
        - OVERRIDE
        - FOLLOW_UP
        - EXPIRED
        - CONFIRMATION
        - INTRODUCTORY
        - CANCELLED
        - UPDATE
        - NO_SHOW
        - OUTREACH
        - MISSED_CALL
      title: MessageType
    CarePlanTemplateStepMeasurementDetail:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier
        measurementField:
          type: string
          title: Measurementfield
          description: Measurement field key (e.g. 'weight', 'blood_pressure')
        displayUnit:
          anyOf:
            - type: string
            - type: 'null'
          title: Displayunit
          description: Display unit (e.g. 'lbs', 'mmHg')
      type: object
      required:
        - id
        - measurementField
      title: CarePlanTemplateStepMeasurementDetail
      description: A measurement configured on a care plan step.
    TaskPriority:
      type: string
      enum:
        - URGENT
        - HIGH
        - NORMAL
        - LOW
      title: TaskPriority
    CarePlanBranchDetail:
      properties:
        id:
          type: string
          title: Id
        decisionStepId:
          type: string
          title: Decisionstepid
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        position:
          type: integer
          title: Position
        tagIds:
          items:
            type: string
          type: array
          title: Tagids
        selectedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Selecteddate
        selectedById:
          anyOf:
            - type: string
            - type: 'null'
          title: Selectedbyid
        steps:
          items:
            $ref: '#/components/schemas/CarePlanStepDetail'
          type: array
          title: Steps
          default: []
      type: object
      required:
        - id
        - decisionStepId
        - position
      title: CarePlanBranchDetail
      description: Detail view of a patient care plan branch.
    CarePlanStepSequenceDetail:
      properties:
        id:
          type: string
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        isActive:
          type: boolean
          title: Isactive
          default: true
        steps:
          items:
            $ref: '#/components/schemas/CarePlanStepSequenceStepDetail'
          type: array
          title: Steps
      type: object
      required:
        - id
      title: CarePlanStepSequenceDetail
      description: A sequence attached to a care-plan(-template) step.
    CarePlanStepSequenceStepDetail:
      properties:
        id:
          type: string
          title: Id
        triggerEvent:
          anyOf:
            - $ref: '#/components/schemas/TriggerEvent'
            - type: 'null'
        delayMinutes:
          type: integer
          title: Delayminutes
        effectType:
          $ref: '#/components/schemas/EffectType'
        config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config
        displayOrder:
          type: integer
          title: Displayorder
          default: 0
        isActive:
          type: boolean
          title: Isactive
          default: true
      type: object
      required:
        - id
        - delayMinutes
        - effectType
      title: CarePlanStepSequenceStepDetail
      description: A step inside a sequence attached to a care-plan(-template) step.
    TriggerEvent:
      type: string
      enum:
        - APPOINTMENT_BOOKED
        - APPOINTMENT_STARTING
        - APPOINTMENT_COMPLETED
        - APPOINTMENT_CANCELLED
        - APPOINTMENT_NO_SHOW
        - CARE_PLAN_STEP_PENDING
      title: TriggerEvent
    EffectType:
      type: string
      enum:
        - SEND_SMS
        - SEND_EMAIL
        - CHANGE_STATUS
        - CREATE_TASK
      title: EffectType

````