Start a conversation

Example Payload

Here is an example payload for creating a client, case and case action with file attachment in a single request.

➡ Note: That references to configuration elements like client types, case and case action types, fields and enum values will depend on the customer’s own Case Manager configuration, and this information will be supplied separately.

{
  "operations": [
    {
      "type": "ClientCreate",
      "ref": "referee",
      "data": {
        "title": "Mr",
        "firstName": "John",
        "lastName": "Jeffries",
        "dateOfBirth": "1957-04-14",
        "types": ["Client"],
        "flags": ["Vulnerable"],
        "telephone": "0208 555 1234",
        "address": {
          "houseNumber": "4",
          "streetName": "Chadwick Gardens",
          "town": "London",
          "postcode": "NW1 0AZ"
        },
        "email": "john.jeffries@example.com",
        "gender": "Male",
        "contactPreferences": {
          "email": "YES",
          "sms": "NOT_ASKED"
        },
        "fieldValues": [
          {
            "field": "equalityAndDiversity.ethnicity",
            "value": "Mixed: White and Black Caribbean"
          }
        ]
      }
    },
    {
      "type": "CaseCreate",
      "ref": "referral",
      "data": {
        "type": "Portal Referral",
        "client": "$referee",
        "contactChannel": "telephone",
        "owner": "jill.mathers@example-cm.org",
        "openDate": "2021-05-27",
        "summary": "This is a referral from the portal.",
        "fieldValues": [
          {
            "field": "referralDetails.incidentNumber",
            "value": "AB123"
          }
        ]
      }
    },
    {
      "type": "CaseActionCreate",
      "ref": "attachmentAction",
      "data": {
        "case": "$referral",
        "type": 27,
        "fieldValues": []
      }
    },
    {
      "type": "CaseActionAddAttachment",
      "data": {
        "type": "$attachmentAction",
        "file": {
          "name": "myAttachment.txt",
          "data": "YXR0YWNobWVudCBjb250ZW50"
        }
      }
    }
  ]
}
Choose files or drag and drop files
Helpful?
Yes
No
  1. Pete Patel

  2. Posted
  3. Updated

Comments