Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    //"project": string. LAC_HIV/ LAC_FP // not implemented
    //"id": string. DHIS2 TEI or Mongo ID // not implemented
    "tei": string. DHIS2 TEI, // to be discontinue (replaced by id)
    "msg": string. Message text to send,
    "channel": string. Accepted values: facebook whatsapp SMS,
    "to": string. It could be a phoneNumber or facebook/whatsapp ID,
    "templateId": string. The template ID. This ID is used for sending FBM/WA as well as for rquesting a reminder cancelation (see below),
    "templateParams": string. Template parameter. Needs parse to string the value,
    "eventDate": String. The datetime. You can check the format in the below example,
    "sendNow": boolean. Indicates if the notification is an instant message. We don't want schedule the notification.
}

...

Example Request for Facebook Messenger template:

Code Block
{
    //project id
    "tei": "cMyjKYJtgSI", // change for id
    "channel": "facebook",
    "templateId": "template_3",
    "templateParams": "{'quick_replies':[{'content_type':'text','image_url':'http://example.com/img/red.png','payload':'<POSTBACK_PAYLOAD>','title':'Red'},{'content_type':'text','image_url':'http://example.com/img/green.png','payload':'<POSTBACK_PAYLOAD><','title':'Green'}],'text':'Pick a color:'}",
    "to": "1234jdj204",
    "eventDate": "2023-11-23T13:18:30.800Z",
    "sendNow": true
}

...

Code Block
{
  "notifications": [
    {
        //project --> to be added
        "tei": "cMyjKYJtgSI", // replace by id
        "msg": "hi",
        "channel": "facebook",
        "to": "+26658636836",
        "templateId": "1",
        "templateParams": "",
        "eventDate": "2023-11-23T13:18:30.800Z"
    },
    {
        "tei": "cMyjKYJtgSI",
        "msg": "hi",
        "channel": "facebook",
        "to": "+26658636836",
        "templateId": "3",
        "templateParams": "",
        "eventDate": "2023-11-23T13:18:30.800Z"
    }
  ]
}

...

  • tei: The unique identifier associated with the Track Entity.

Body Request:

Code Block
{ 
  //project --> to be added
  "tei": "019283SFD" // replace by id
}

Input by Event ID

Request: PUT {openHIM-env}/dhis2/cancel-notification

...

  • eventId: The unique identifier associated with the Event.

Body Request:

Code Block
{ 
  //project --> to be added
  "eventId": "A019283FD"  // add project
}

Input by TrackEntity ID & TemplateId

...

  • tei: The unique identifier associated with the Track Entity.

  • templateId: It could be a string or array. Its value is the template identifier associated with the type of message to be canceled.

Body Request:

Code Block
{ 
  //project --> to be added
  "tei": "019283SFD", // replace by id
  "templateId": ["template_3","appointment"],
}

Body Request:

Code Block
{ 
  //project --> to be added
  "tei": "019283SFD", // replace by id
  "templateId": "template_3",
}

...