openapi: 3.2.0 info: title: Reference Notes API version: 1.0.0 servers: - url: https://pre-api.joincandidhealth.com description: Production - url: https://pre-api-staging.joincandidhealth.com description: Staging - url: https://sandbox-pre-api.joincandidhealth.com description: CandidSandbox - url: https://staging-pre-api.joincandidhealth.com description: CandidStaging - url: http://localhost:4000 description: Local - url: https://api.joincandidhealth.com description: Production - url: https://api-staging.joincandidhealth.com description: Staging - url: https://sandbox-api.joincandidhealth.com description: CandidSandbox - url: https://staging-api.joincandidhealth.com description: CandidStaging - url: http://localhost:5050 description: Local tags: - name: Notes paths: /notes/v1/{id}: get: operationId: get summary: Get description: Gets a note by NoteId. tags: - Notes parameters: - name: id in: path required: true schema: $ref: '#/components/schemas/type_pre-encounter_common_NoteId' - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter_notes_v1_Note' /notes/v1: post: operationId: create summary: Create description: Adds a new note. tags: - Notes parameters: - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter_notes_v1_Note' requestBody: content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter_notes_v1_MutableNote' /notes/v1/{id}/{version}: put: operationId: update summary: Update description: Updates a note. The path must contain the most recent version to prevent races. tags: - Notes parameters: - name: id in: path required: true schema: $ref: '#/components/schemas/type_pre-encounter_common_NoteId' - name: version in: path required: true schema: type: string - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter_notes_v1_Note' requestBody: content: application/json: schema: $ref: '#/components/schemas/type_pre-encounter_notes_v1_MutableNote' delete: operationId: deactivate summary: Deactivate description: Sets a note as deactivated. The path must contain the most recent version to prevent races. tags: - Notes parameters: - name: id in: path required: true schema: $ref: '#/components/schemas/type_pre-encounter_common_NoteId' - name: version in: path required: true schema: type: string - name: Authorization in: header description: OAuth authentication required: true schema: type: string responses: '200': description: Successful response components: schemas: type_pre-encounter_notes_v1_Note: type: object properties: organization_id: $ref: '#/components/schemas/type_pre-encounter_common_OrganizationId' description: The organization that owns this object. deactivated: type: boolean description: True if the object is deactivated. Deactivated objects are not returned in search results but are returned in all other endpoints including scan. version: type: integer description: The version of the object. Any update to any property of an object object will create a new version. updated_at: type: string format: date-time updating_user_id: $ref: '#/components/schemas/type_pre-encounter_common_UserId' description: The user ID of the user who last updated the object. value: type: string type: $ref: '#/components/schemas/type_pre-encounter_notes_v1_NoteType' description: Defaults to GENERAL when omitted. author_email: type: string author_name: type: string id: $ref: '#/components/schemas/type_pre-encounter_common_NoteId' created_at: type: string format: date-time required: - organization_id - deactivated - version - updated_at - updating_user_id - value - id - created_at description: A Note object with immutable server-owned properties. title: Note type_pre-encounter_common_NoteId: type: string description: The unique identifier for a Note. title: NoteId type_pre-encounter_notes_v1_NoteType: type: string enum: - GENERAL - ELIGIBILITY description: Distinguishes what a note is about. `GENERAL` = a plain patient note; `ELIGIBILITY` = a note regarding the patient's eligibility. title: NoteType type_pre-encounter_common_OrganizationId: type: string description: The unique identifier for an Organization in the database title: OrganizationId type_pre-encounter_common_UserId: type: string description: The unique identifier for a User in the database title: UserId type_pre-encounter_notes_v1_MutableNote: type: object properties: value: type: string type: $ref: '#/components/schemas/type_pre-encounter_notes_v1_NoteType' description: Defaults to GENERAL when omitted. author_email: type: string author_name: type: string required: - value description: An object representing a Note. title: MutableNote securitySchemes: OAuthScheme: type: http scheme: bearer description: OAuth 2.0 authentication