Hi,
I am trying to call REST end (create/update lead), I am getting the following response:
{ "requestId": "f618#14e76a888a9", "result": [{"status": "skipped","reasons": [{"code": "1003","message": "Value for requried field 'id' not specified"}]}],"success": true}
While the error message is proper and justified, my problem is with the "success" value. Why is it set to "true" when my operation failed? Shouldn't it be false?
I am using this flag to raise exception in my code. In above case, it failed. Either the method should succeed or throw exception.
Thanks,
Rohit
Solved! Go to Solution.
Hi Vishnu
Your situation is your REST API protocol is correct, but lead data is not correct.
After api endpoint received the request, marketo run internal functions for each leads.
eg. new lead, change data value etc.
Finally marketo sends the result of functions.
- {
- "requestId":"e42b#14272d07d78",
- "success":true, <============ API status
- "result":[
- {
- "id":50,
- "status":"created" <========= Each status
- },
- {
- "id":51,
- "status":"created" <========= Each status
- },
- {
- "id":52,
- "status":"created" <========= Each status
- }
- ]
- }
If you are ok, show me your request sample.
Takehiro
Hi Vishnu
Your situation is your REST API protocol is correct, but lead data is not correct.
After api endpoint received the request, marketo run internal functions for each leads.
eg. new lead, change data value etc.
Finally marketo sends the result of functions.
- {
- "requestId":"e42b#14272d07d78",
- "success":true, <============ API status
- "result":[
- {
- "id":50,
- "status":"created" <========= Each status
- },
- {
- "id":51,
- "status":"created" <========= Each status
- },
- {
- "id":52,
- "status":"created" <========= Each status
- }
- ]
- }
If you are ok, show me your request sample.
Takehiro