anon27838832 | 2021-01-21 11:43:26 UTC | #1
Hi
I am raising a Data Action - contract with the api / api / v2 / outbound / contactlists / {contactListId} / contacts in which it sends me the following error.
{ "message": "The request could not be understood by the server due to malformed syntax.", "code": "bad.request", "status": 400, "messageParams": {}, "contextId": "82713f01-248d-48fa-8c55-e696ffcbb710", "details": [ { "errorCode": "ACTION.REMOTEENDPOINT" } ], "errors": [ { "message": "REST call for action execute failed. Message:Request to backend service failed. Response from web service: {\"message\":\"The request could not be understood by the server due to malformed syntax.\",\"code\":\"bad.request\",\"status\":400,\"contextId\":\"801181f3-6203-4c33-9452-9644919d9a09\",\"details\":[],\"errors\":[]} [82713f01-248d-48fa-8c55-e696ffcbb710]", "code": "BADREQUEST", "status": 400, "messageParams": {}, "details": [], "errors": [] } ] }
the generated jsons are the following:
INPUT Contract
{ "type": "object", "required": [ "contactListId" ], "properties": { "contactListId": { "type": "string" }, "ARUTCH": { "type": "string" }, "APHONECH": { "type": "string" }, "AAGENTECH": { "type": "string" }, "ACOLACH": { "type": "string" }, "callable": { "type": "boolean" } }, "additionalProperties": true }
Output Contract
{ "type": "object", "properties": { "id": { "type": "string" }, "contactListId": { "type": "string" }, "data": { "type": "object", "properties": { "ARUTCH": { "type": "string" }, "APHONECH": { "type": "string" }, "AAGENTECH": { "type": "string" }, "ACOLACH": { "type": "string" } }, "additionalProperties": true }, "callable": { "type": "string" }, "selfUri": { "type": "string" } }, "additionalProperties": true }
Could you please tell me the cause of the error
I stay tuned for comments
Regards
Jason_Mathison | 2021-01-21 11:59:27 UTC | #2
Hi Jovan,
Based on the contextId it appears that the API you are trying to use was expecting your request to include an array.
You didn't include the "Request Configuration", so I can't see how you were trying to build the body of your request. In general providing an export of your action is much easier to deal with (summary tab -> export) as well as the results of the " Resolve request body template" in test mode, which will show what was actually sent. (Making sure to remove and sensitive information)
If you haven't already, I would recommend making sure you can use the API with the developer tools website, and then model your data action on that.
FYI, the developer forum is generally for customers and partners. You should have an internal process available for support.
--Jason
system | 2021-03-24 23:59:30 UTC | #3
This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 9763