Assignment using Survey Solutions API client for Stata

Hi everyone,
I tried to use Survey Solutions API client for Stata to make assignment by preloading data but without success. Here is the syntax I used:
.sse.assignments_create , responsible (“Enqueteur2”) qxguid (“6c2d749b-0363-47f4-b719-2075aaa43bde”) qxversion (1) quantity (1) data (““Variable”:“dep”, “Answer”:1”)

Here is the error message that is returned:
Server responded: 400

Could you help me to fix this issue?

Please, note that when I try the syntax without preloading the data (without data (““Variable”:“dep”, “Answer”:1”)), everything works fine.

Hello @somson4,

the issue is related to the use of quotes. When your content contains quotes, enclose it in the compound double quotes. I have updated the users’ manual for susoapi and added a couple of bugfixes for other issues that have accumulated. Please update to v1.31:

Best, Sergiy

1 Like

Hi Sergiy,
Thanks a lot for your reply and for sharing the updated version of the users’ manual. I took a look at it and I found it even more detailed. My problem is solved.
Thanks again.

Regards

You are welcome!
Thank you for confirming!

1 Like