Case Updates Webhook Payload Format

As of last update, additional payload objects will be included for different case events.

This article describes these additional payload objects format.


ADD_CASE_COMMENT

{
  "event": "ADD_CASE_COMMENT",
  "payload": {
    <...>
    comment: {
      id: string,
      text: string,
      isRestricted: boolean,
      createdAt: timestamp,
      author: {
        firstName: string,
        lastName: string
      },
      attachments: [{
        id: string,
        isRestricted: boolean,
        isPHI: boolean,
        fileName: string,
        isDeleted: boolean,
        createdAt: timestamp,
        uploadedBy: {
          firstName: string,
          lastName: string
        },
      content: string (base64)
      }]
    }
  }
}


ADD_CASE_DECISION

{
  "event": "ADD_CASE_DECISION",
  "payload": {
    <...>
    decision: {
      id: string,
      isApproved: boolean,
      isNoDecision: boolean,
      startDate: timestamp,
      endDate: timestamp,
      decisionText: string,
      category: string,
      medInfo: {
        medicine: string,
        dosage: string,
        refillCount: number,
        pharmacyInstructions: string,
        dosingFrequency: string,
      },
      createdAt: timestamp
    }
  }
}


ADD_CASE_ATTACHMENT

{
  "event": "ADD_CASE_ATTACHMENT",
  "payload": {
    <...>
    attachment: {
      id: string,
      isRestricted: boolean,
      isPHI: boolean,
      fileName: string,
      isDeleted: boolean,
      createdAt: timestamp,
      uploadedBy: {
        firstName: string,
        lastName: string
      }
      content: string (base64)
    }
  }
}


ADD_FORM_RESPONSE

{
  "event": "ADD_FORM_RESPONSE",
  "payload": {
    <...>
    form: {
      id: string,
      name: string,
      description: string,
    },
    response: {
      id: string,
      question: {
        index: number,
        type: string,
        text: string,
        isPHI: boolean,
        options: string[],
        required: boolean
      },
      text: string,
      createdAt: timestamp,
      respondent: {
        id: string,
        firstName: string,
        lastName: string
      }
    }
  }
}


ADD_CASE_ASSIGNEE

REMOVE_CASE_ASSIGNEE

{
  "event": "ADD_CASE_ASSIGNEE",
  "payload": {
    <...>
    assignees: [{
      assignee: {
        id: string,
        firstName: string,
        lastName: string,
      }
    }]
  }
}

PAYMENT_ADDED

PAYMENT_COMPLETED

{
  "event": "PAYMENT_ADDED",
  "payload": {
    <...>
    payment: {
      id: string,
      isDeleted: boolean,
      description: string,
      amount: number,
      status: string,
      dueDate: timestamp,
      paymentDate: timestamp,
      cancellationDate: timestamp,
      createdAt: timestamp,
      updatedAt: timestamp,
      createdBy: {
        id: string,
        firstName: string,
        lastName: string,
        email: string
      }
    }
  }
}

ORDER_CREATED

ORDER_STATUS_CHANGED

ORDER_TRACKING_ADDED

{
  "event": "ORDER_CREATED",
  "payload": {
    <...>
    order: {
      id: string,
      status: string,
      trackingId: string,
      message: string,
      createdAt: timestamp
    }
  }
}

DELETE_ATTACHMENT

{
  "event": "DELETE_ATTACHMENT",
  "payload": {
    <...>
    deletedAttachment: {
      caseId: string,
      caseAttachmentId: string,
      caller: {
        id: string,
        firstName: string,
        lastName: string
      }
    }
  }
}

CREATE_CASE

{
  "event": "CREATE_CASE",
  "payload": {
    <...>
    case: <full case object>
  }
}

ESCALATE_CASE

DEESCALATE_CASE

{
  "event": "ESCALATE_CASE",
  "payload": {
    <...>
    escalated: {
      caseId: string,
      isEscalated: boolean,
      caller: {
        id: string,
        firstName: string,
        lastName: string
      }
    }
  }
}

DELETE_CASE_COMMENT

{
  "event": "DELETE_CASE_COMMENT",
  "payload": {
    <...>
    deletedComment: {
      caseId: string,
      caseCommentId: string,
      caller: {
        id: string,
        firstName: string,
        lastName: string
      }
    }
  }
}

ARCHIVE_CASE

REOPEN_CASE

{
  "event": "ARCHIVE_CASE",
  "payload": {
    <...>
    archiveCase: {
      caseId: string,
      isArchived: boolean,
      archiveReason: string,
      caller: {
        id: string,
        firstName: string,
        lastName: string
      }
    }
  }
}

CHANGE_CASE_STATUS

{
  "event": "CHANGE_CASE_STATUS",
  "payload": {
    <...>
    changeStatus: {
      caseId: string,
      newStatus: string,
      oldStatus: string,
      changeDate: timestamp,
      caller: {
        id: string,
        firstName: string,
        lastName: string
      }
    }
  }
}


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article