SOLVED

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Go to solution
Anonymous
Not applicable

Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Hi,

I'm trying to add member to program via REST API.

It seems like pushToMarketo endpoint works good.

http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/...

But actually pushToMarketo endpoint returns error like below.

{

  "requestId": "7987#15728dda713",

  "success": false,

  "errors": [

    {

      "code": "605",

      "message": "Request method 'POST' not supported"

    }

  ]

}

I send POST request but response said POST not supported.

Is the pushToMaketo API is not supported?

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Sorry, that endpoint isn't available until the Q3 release.  I will fix the docs.  Please use Create/Update Leads instead.

View solution in original post

13 REPLIES 13
Dory_Viscoglio
Level 10

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Strange, the API documentation says that the 605 Error is related to GET, not POST. Maybe Kenny Elkington​ can help out here?

pastedImage_0.png

Kenny_Elkington
Marketo Employee

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Sorry, that endpoint isn't available until the Q3 release.  I will fix the docs.  Please use Create/Update Leads instead.

Anonymous
Not applicable

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Hi Kenny,

Thank you for your answer.

Can i use Sync Leads endpoint for add member(leads) to program?

http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/...

I can't find  program identifier in SyncLeasdRequest.

Is there any other endpoint which can add member to program?

Kenny_Elkington
Marketo Employee

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Program status is managed through a separate endpoint from lead sync: http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#/Leads/c...

Anonymous
Not applicable

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Is this available yet? I am trying to create and add lead to a program as a member and cannot do the latter.

URL I am using:

$program_url = $this->host . "/rest/v1/leads/programs/" . $programId . "/status.json?access_token=" . $token;

Results I am echoing:

Program request body: {"lookupField":"id","input":[{"id":1532589,"status":"new status"}]}

Program request response: {"requestId":"f108#15863ca68a7","success":false,"errors":[{"code":"605","message":"Request method 'POST' not supported"}]}

Kenny_Elkington
Marketo Employee

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Well, this is a separate endpoint.  I'm not sure why the error is incorrect, but status is a member at the top-level of the JSON body, not in each individual lead, which is likely why the call is failing.

Anonymous
Not applicable

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

Program request body: {"status":"new status","lookupField":"id","input":[{"id":1532589}]}

Program request response: {"requestId":"32b0#15863ef880f","success":false,"errors":[{"code":"605","message":"Request method 'POST' not supported"}]}

Is that were status is supposed to go? Yeah I'm not sure why it's not receiving 'POST' since that's what it says on the documentation... any advice on how to troubleshoot?

Kenny_Elkington
Marketo Employee

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

I think maybe you're URL isn't incorrect.  It doesn't look like the 605 can be thrown at any point if the method is actually invoked.  Can you share the full URL/Headers/Body that you're using?

Anonymous
Not applicable

Re: Receiving 605 Request method 'POST' not supported for pushToMarketo endpoint

This is my code:

$program_url = $this->host . "/rest/v1/leads/programs/" . $programId . "/status.json?access_token=" . $token;

  $lead = new stdClass();

  $lead->id = $lead_id;

  $body = new stdClass();

  $body->status = 'new status';

  $body->lookupField = 'id';

  $body->input = array($lead);

  $program_requestBody = json_encode($body);

  $program_ch = curl_init($program_url);

  curl_setopt($program_ch,  CURLOPT_RETURNTRANSFER, 1);

  curl_setopt($program_ch, CURLOPT_HTTPHEADER, array('accept: application/json','Content-Type: application/json'));

  curl_setopt($program_ch, CURLOPT_POST, 1);

  curl_setopt($program_ch, CURLOPT_POSTFIELDS, $program_requestBody);

  curl_getinfo($program_ch);

  $program_response = curl_exec($program_ch);

The output that I gave before is $program_requestBody and $program_response