I tried to use de old API but I got always the same 500 error message when I send a submission. Now trying to use the new I found the entry point: /assets/uid/submissions but in the documentation say:
**It's not allowed to create submissions with kpi 's API**
How can I send data to kobo, via curl or using some programming language like JavaScript or python?
Would you mind sharing the screenshot of the curl command that you had used along with a description of what you wish to do and the error message that you see at your end. Maybe the community could help you out if there is any typo in your curl command.
Looks like you might be missing an @ symbol before submissions.xml.
Since your submissions.xml has a plural filename, I advise you that xml_submission_file must contain only one submission. If you have multiple submissions, POST multiple times.
Try your command with kc.kobotoolbox.org (create a free account there if you haven’t already) before trying on your private instance (assuming you have one based on kc.domain.tld in your example). If you still receive a 500 error, we can review our logs to see why.
Great, I’m glad it’s working for you. Some of your XML looks a bit odd; I’m not sure what type="str" is doing, and you really should include <meta><instanceID> (the specification requires it) even if KoBoCAT accepts a submission without it.
Here’s an example of an expert creating XML submissions programmatically. I reformatted the XML template he uses to be more readable and included it below.