Support Topics Documentation Slack YouTube Blog

Illegal unquoted character

I seem to have a problem with the mission “Invoke the API Service using generated client SDK” requests. For the purchase event:

curl --request POST
–url ‘https://api.backendless.com/79A5BE33-9B49-459A-FF51-A867D9C60D00/AFF3D37A-973F-4A81-BD7D-599793C9B316/services/CodelessShoppingCartService/purchase?=
–header ‘accept: application/json’
–header ‘content-type: application/json’
–data '{
“cartName”: “string5”
}’

I get back this error:

{
“code”: 14004,
“message”: “Service invocation failed: Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\n at [Source: (String)”"{\n\t"cartName": “string5”\n}""; line: 1, column: 4]",
“errorData”: {}
}

What am I doing wrong here?

Hi @nicolasn

I believe your curl request should look like this:

curl -X “POST” “https://api.backendless.com/79A5BE33-9B49-459A-FF51-A867D9C60D00/AFF3D37A-973F-4A81-BD7D-599793C9B316/services/CodelessShoppingCartService/purchase
-H ‘Content-Type: application/json’
-H ‘Accept: application/json’
-d “string5”

Best Regards,
Maksym