How can I submit a checkbox field using Rest Service?

I am new to this system. I would like to send a checkbox type field to another system using REST SERVICE. I’m trying but it always gives me an error.

Hi @viperboys can you please send me a private message with the following details so that I can take a look:

  • Server (OCHA/HHI)
  • Username
  • Project name

Hi my project name is only a test… Is it necessary to send all this data? I am sending a lot of data to other systems through Rest service. The only data that I need to send is the checkbox. I still can’t find a way to send it.

My project name is: xxxxxxx

Hi @viperboys, I will need those three pieces of information if you would like me to take a look.

I’m unsure what the issue with the checkbox is that you are referring to, so it will be easier if I can see it and test it out.

1 Like

Hi @Josh Sorry but I can’t share credentials due to company policy.
I will share a video of what I am trying to do.

Video: Loom | Free Screen & Video Recording Software

In this example I do not send a checkbox type field or a file type field. What I want is to know how is the correct way to send a check box type field and file type fields. As you can see in the video. IN the option REst Service there is no configuration. I just added the end point.

Thank you Josh…

Hi @viperboys, thank you for sending the video link.

Can you please clarify what you mean exactly by a “check box type field”? I have tested with select_one, select_multiple and acknowledge types and they all seem to work fine. As I mentioned in Sending files to other systems via Rest API - #4 by Josh, you are only able to send JSON or XML with the REST Service and not media files.

1 Like

Hi @Josh
I mean select_multiple. I am trying to submit it and I am getting this error.
{“code”:“not_created”,“message”:“Entry was not created because no values were mapped to fields.”,“data”:null}

Then I want to know how is the correct way to send these fields.

Hi @viperboys, thanks for clarifying. It seems as though the issue is likely on the side where the data is being consumed, rather than the REST Service not sending it.

Can you try following the example in the support docs here:

https://support.kobotoolbox.org/rest_services.html

And use beeceptor to see what the REST Service gives you — then see if your fields are being mapped correctly in the application you’re using.

2 Likes