AnsweredAssumed Answered

1003 Error Code - custom objects not specified

Question asked by Thomas Goirand on Oct 25, 2019
Latest reply on Oct 25, 2019 by Sanford Whiteman

Hi there,

 

I am stuck on a issue here with a custom object record creation query and a 1003 error code I do not know hot to avoid. The 1003 error is displaying a "customobjects not specified" which I highlighted in bold in my request and is approved with this specific API name in our marketo instance.

 

Here is my request hereby. The "XXXX" are just covering our endpoints and tokens I prefer to keep secret ;-) 

 

Thanks you very much for any help / advice / hint in resolving this.

 

<?php

$request = new HttpRequest();
$request->setUrl('https://XXXX.mktorest.com/rest/v1/customobjects/cRM_Leads_c.json');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
'cache-control' => 'no-cache',
'Connection' => 'keep-alive',
'Content-Length' => '233',
'Accept-Encoding' => 'gzip, deflate',
'Host' => 'XXXXX.mktorest.com',
'Authorization' => 'Bearer XXXXXXXXXXXXXXXXXXXXXXXX',
'Content-Type' => 'application/json'
));

$request->setBody('{
"action": "createOnly",
"dedupeBy": "crm_lead_id",
"inputs": [
{
"contact_id": "5492761",
"email": "",
"crm_lead_id": "35d277d6-64f6-e911-a813-000d3a2c59f1"
}
]

}');

try {
$response = $request->send();

echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}

Outcomes