Notification

An alert generated to notify the users about new messages, appoinments, prescriptions filled, etc.

The notification model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the notification.

  • Name
    object
    Type
    string
    Description

    Always 'notification'.

  • Name
    user
    Type
    string
    Description

    Recipient of the notification.

  • Name
    title
    Type
    string
    Description

    Notification's title.

  • Name
    text
    Type
    string
    Description

    Notification text.

  • Name
    read
    Type
    boolean
    Description

    Whether the notification has been read or not.

  • Name
    buttons
    Type
    array of objects
    Description
    List of buttons associated with this notification.
  • Name
    props
    Type
    object
    Description

    The object (e.g. appointment, message, etc.) that this notification is about.

  • Name
    created_by
    Type
    string
    Description

    Creator of the notification.

  • Name
    created_at
    Type
    date-time
    Description

    Timestamp (in ISO 8601 format) of when the notification was created.

Response

{
    "id": "notf_rpwxbZ1zXZKvqznuW6lJ",
    "object": "notification",

    "user": "user_Z1zXZKvqrpwxbznuW6lJ",
    "title": "New Appointment!",
    "text": "You have a new appointment at Friday, June 28, 2024 at 5:00 PM EDT.",
    "read": false,
    "buttons"; [{
        "link": "/calendar/appointment?id=appt_4dc8fb81e1de4f0daec29aafec21b028",
        "title": "View Appointment"
    }],
    "props": {
        "id": "4dc8fb81e1de4f0daec29aafec21b028",
        "host": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
        "name": "Therapy Appointment",
        "group": false,
        "object": "appointment",
        "account": "demo",
        "end_time": "2024-06-28T22:00:00.000Z",
        "internal": false,
        "location": {
            "city": null,
            "line1": null,
            "line2": null,
            "state": null,
            "postal_code": null
        },
        "attendees": [{
            "id": 168,
            "account": null,
            "no_show": false,
            "attendee": "BPJpEJejcMVFPmTx5OQwggCVAun1",
            "appointment": "4dc8fb81e1de4f0daec29aafec21b028",
            "payment_status": "not_applicable",
            "last_updated_at": "2024-06-27T13:16:54.648+00:00",
            "attendance_status": "noResponse"
        }],
        "created_at": "2024-06-27T13:16:54.648Z",
        "created_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
        "start_time": "2024-06-28T21:00:00.000Z",
        "video_call": {
            "join_url": "https://us06web.zoom.us/j/89699004756",
            "meeting_id": "89699004756"
        },
        "visit_note": null,
        "description": "",
        "generated_from": null,
        "status_history": [{
            "id": 1129,
            "parent": "4dc8fb81e1de4f0daec29aafec21b028",
            "status": "scheduled",
            "changed_at": "2024-06-27T13:16:54.715+00:00",
            "changed_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
            "parent_type": null
        }],
        "actual_end_time": null,
        "insurance_claim": null,
        "last_updated_at": "2024-06-27T13:16:54.648Z",
        "appointment_type": "0f3c11aeb52449659f9efcc7e6728dae",
        "interaction_type": "video_call",
        "recurrence_rules": [],
        "actual_start_time": null,
        "charged_externally": null,
        "reference_patients": [],
        "generated_from_type": null
    },
    "created_by": "user_automationBot",
    "created_at": "2024-08-14 17:34:52.669+00"
}


GET/v2/notifications/:id

Retrieve a notification

Retrieves the specified notification.

Request

GET
/v2/notifications/:id
curl "https://{{base_subdomain}}.avonhealth.com/v2/notifications/:id" \
  -H "Authorization: Bearer {{token}}" \
  -H "x-jwt: {{jwt}}"

Response

   {
        "id": "notf_rpwxbZ1zXZKvqznuW6lJ",
        "object": "notification",

        "user": "user_Z1zXZKvqrpwxbznuW6lJ",
        "title": "New Appointment!",
        "text": "You have a new appointment at Friday, June 28, 2024 at 5:00 PM EDT.",
        "read": false,
        "buttons"; [{
            "link": "/calendar/appointment?id=appt_4dc8fb81e1de4f0daec29aafec21b028",
            "title": "View Appointment"
        }],
        "props": {
            "id": "4dc8fb81e1de4f0daec29aafec21b028",
            "host": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
            "name": "Therapy Appointment",
            "group": false,
            "object": "appointment",
            "account": "demo",
            "end_time": "2024-06-28T22:00:00.000Z",
            "internal": false,
            "location": {
                "city": null,
                "line1": null,
                "line2": null,
                "state": null,
                "postal_code": null
            },
            "attendees": [{
                "id": 168,
                "account": null,
                "no_show": false,
                "attendee": "BPJpEJejcMVFPmTx5OQwggCVAun1",
                "appointment": "4dc8fb81e1de4f0daec29aafec21b028",
                "payment_status": "not_applicable",
                "last_updated_at": "2024-06-27T13:16:54.648+00:00",
                "attendance_status": "noResponse"
            }],
            "created_at": "2024-06-27T13:16:54.648Z",
            "created_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
            "start_time": "2024-06-28T21:00:00.000Z",
            "video_call": {
                "join_url": "https://us06web.zoom.us/j/89699004756",
                "meeting_id": "89699004756"
            },
            "visit_note": null,
            "description": "",
            "generated_from": null,
            "status_history": [{
                "id": 1129,
                "parent": "4dc8fb81e1de4f0daec29aafec21b028",
                "status": "scheduled",
                "changed_at": "2024-06-27T13:16:54.715+00:00",
                "changed_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                "parent_type": null
            }],
            "actual_end_time": null,
            "insurance_claim": null,
            "last_updated_at": "2024-06-27T13:16:54.648Z",
            "appointment_type": "0f3c11aeb52449659f9efcc7e6728dae",
            "interaction_type": "video_call",
            "recurrence_rules": [],
            "actual_start_time": null,
            "charged_externally": null,
            "reference_patients": [],
            "generated_from_type": null
        },
        "created_by": "user_automationBot",
        "created_at": "2024-08-14 17:34:52.669+00"
   }


POST/v2/notifications/:id

Update a notification

Updates the specified notification object by setting the values of the parameters passed. Any other parameters not provided will not be modified.

Required attributes

    Optional attributes

    • Name
      read
      Type
      boolean
      Description

      Whether the notification has been read.

    Request

    POST
    /v2/notifications/:id
    curl -X POST "https://{{base_subdomain}}.avonhealth.com/v2/notifications/:id" \
      -H "Authorization: Bearer {{token}}" \
      -H "x-jwt: {{jwt}}" \
      -H "Content-Type: application/json" \
      --data '{}'
    

    Response

       {
            "id": "notf_rpwxbZ1zXZKvqznuW6lJ",
            "object": "notification",
    
            "user": "user_Z1zXZKvqrpwxbznuW6lJ",
            "title": "New Appointment!",
            "text": "You have a new appointment at Friday, June 28, 2024 at 5:00 PM EDT.",
            "read": false,
            "buttons"; [{
                "link": "/calendar/appointment?id=appt_4dc8fb81e1de4f0daec29aafec21b028",
                "title": "View Appointment"
            }],
            "props": {
                "id": "4dc8fb81e1de4f0daec29aafec21b028",
                "host": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                "name": "Therapy Appointment",
                "group": false,
                "object": "appointment",
                "account": "demo",
                "end_time": "2024-06-28T22:00:00.000Z",
                "internal": false,
                "location": {
                    "city": null,
                    "line1": null,
                    "line2": null,
                    "state": null,
                    "postal_code": null
                },
                "attendees": [{
                    "id": 168,
                    "account": null,
                    "no_show": false,
                    "attendee": "BPJpEJejcMVFPmTx5OQwggCVAun1",
                    "appointment": "4dc8fb81e1de4f0daec29aafec21b028",
                    "payment_status": "not_applicable",
                    "last_updated_at": "2024-06-27T13:16:54.648+00:00",
                    "attendance_status": "noResponse"
                }],
                "created_at": "2024-06-27T13:16:54.648Z",
                "created_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                "start_time": "2024-06-28T21:00:00.000Z",
                "video_call": {
                    "join_url": "https://us06web.zoom.us/j/89699004756",
                    "meeting_id": "89699004756"
                },
                "visit_note": null,
                "description": "",
                "generated_from": null,
                "status_history": [{
                    "id": 1129,
                    "parent": "4dc8fb81e1de4f0daec29aafec21b028",
                    "status": "scheduled",
                    "changed_at": "2024-06-27T13:16:54.715+00:00",
                    "changed_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                    "parent_type": null
                }],
                "actual_end_time": null,
                "insurance_claim": null,
                "last_updated_at": "2024-06-27T13:16:54.648Z",
                "appointment_type": "0f3c11aeb52449659f9efcc7e6728dae",
                "interaction_type": "video_call",
                "recurrence_rules": [],
                "actual_start_time": null,
                "charged_externally": null,
                "reference_patients": [],
                "generated_from_type": null
            },
            "created_by": "user_automationBot",
            "created_at": "2024-08-14 17:34:52.669+00"
        }
    

    GET/v2/notifications

    List all notifications

    Returns a list of all notifications. Pass attributes to filter the list of notifications based on that criteria.

    Optional query parameters

    • Name
      user
      Type
      string
      Description

      Recipient of the notification to filter by.

    • Name
      search_from
      Type
      date-time
      Description

      Date (in ISO 8601 format) from which to filter the notifications. Only notifications that were created after this time will be returned.

    • Name
      search_until
      Type
      date-time
      Description

      Date (in ISO 8601 format) until which to filter the notifications. Only notifications that were created before this time will be returned.

    • Name
      search_on
      Type
      date-time
      Description

      Date (in ISO 8601 format) on which to filter the notifications. Only notifications that were created on this date will be returned. Can either use search_on or search_from and search_until but not both.

    Request

    GET
    /v2/notifications
    curl "https://{{base_subdomain}}.avonhealth.com/v2/notifications?user=user_Z1zXZKvqrpwxbznuW6lJ&search_from=Example" \
      -H "Authorization: Bearer {{token}}" \
      -H "x-jwt: {{jwt}}"
    

    Response

        {
          "object": "list",
          "data": [{
            "id": "notf_rpwxbZ1zXZKvqznuW6lJ",
            "object": "notification",
    
            "user": "user_Z1zXZKvqrpwxbznuW6lJ",
            "title": "New Appointment!",
            "text": "You have a new appointment at Friday, June 28, 2024 at 5:00 PM EDT.",
            "read": false,
            "buttons"; [{
                "link": "/calendar/appointment?id=appt_4dc8fb81e1de4f0daec29aafec21b028",
                "title": "View Appointment"
            }],
            "props": {
                "id": "4dc8fb81e1de4f0daec29aafec21b028",
                "host": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                "name": "Therapy Appointment",
                "group": false,
                "object": "appointment",
                "account": "demo",
                "end_time": "2024-06-28T22:00:00.000Z",
                "internal": false,
                "location": {
                    "city": null,
                    "line1": null,
                    "line2": null,
                    "state": null,
                    "postal_code": null
                },
                "attendees": [{
                    "id": 168,
                    "account": null,
                    "no_show": false,
                    "attendee": "BPJpEJejcMVFPmTx5OQwggCVAun1",
                    "appointment": "4dc8fb81e1de4f0daec29aafec21b028",
                    "payment_status": "not_applicable",
                    "last_updated_at": "2024-06-27T13:16:54.648+00:00",
                    "attendance_status": "noResponse"
                }],
                "created_at": "2024-06-27T13:16:54.648Z",
                "created_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                "start_time": "2024-06-28T21:00:00.000Z",
                "video_call": {
                    "join_url": "https://us06web.zoom.us/j/89699004756",
                    "meeting_id": "89699004756"
                },
                "visit_note": null,
                "description": "",
                "generated_from": null,
                "status_history": [{
                    "id": 1129,
                    "parent": "4dc8fb81e1de4f0daec29aafec21b028",
                    "status": "scheduled",
                    "changed_at": "2024-06-27T13:16:54.715+00:00",
                    "changed_by": "CqROAfbTOjTD03Tg3A4CAKU8vXs2",
                    "parent_type": null
                }],
                "actual_end_time": null,
                "insurance_claim": null,
                "last_updated_at": "2024-06-27T13:16:54.648Z",
                "appointment_type": "0f3c11aeb52449659f9efcc7e6728dae",
                "interaction_type": "video_call",
                "recurrence_rules": [],
                "actual_start_time": null,
                "charged_externally": null,
                "reference_patients": [],
                "generated_from_type": null
            },
            "created_by": "user_automationBot",
            "created_at": "2024-08-14 17:34:52.669+00"
          }]
        }