Unmuting a chw_area using the /api/v2/records API

url: Medic Mobile
payload:

{


  "place_id": "563848ea-6396-44a9-9ade-24bd8d52e0f8",
  "group_mute": {
    "mute_chw": "batch_activation"
  },
  "place_name": "ESE",
  "mute_choice": "Réactivation par lot",
  "_meta": {
    "form": "unmute_chw_area",
    "reported_date": 1726845489
  }

}

Response 500 obtained with message
Server error: “Form not found: UNMUTE_CHW_AREA”

changing _meta.form to “fom:unmute_chw_area” gives the same error 500 and message Server error: “Form not found: FORM:UNMUTE_CHW_AREA”

https://supervisor-moh-mali.dev.medicmobile.org/api/v1/forms/unmute_chw_area.xml works fine

I want to programmaticaly active some chw site, I would perform this posting progrmaticaly data_records to this endpoit
I need your help to figure out which is the form name to send in the payload

Hi @bamatic,

According to the CHT API documentation, the records endpoint can be used to:

Create a new record based on a JSON form that has been configured.

It does not support submitting records for XML forms such as unmute_chw_area.

This is how you can define a JSON form:

Then, add it to the muting forms in the muting transition:

After that, you should be able to post it programmatically using the records endpoint.

2 Likes