2016-11-15 58 views
0

我試圖根據自己的需要調整https://github.com/Marketo/REST-Sample-Code/blob/master/php/LeadDatabase/Leads/SyncLeads.php。我希望能夠使用REST API將主持人的狀態從「註冊」更新爲「參與」。 (該的Marketo活動的應用程序做到這一點,當有人簽入的事件。)更新Marketo lead的會員 - > progressionStatus使用REST API

然而,當我嘗試發送類似:

{"input":[{"email":"[email protected]", 
      "membership":{"progressionStatus":"Attended"}}]} 

我回去:

{"requestId":"168be#15868ee5bff", 
"result":[{"status":"skipped","reasons":[ 
    {"code":"1006","message":"Field 'membership' not found"}]}], 
"success":true} 

我明白消息就好 - '會員'不是一個領域,因此它不能這樣更新。但有沒有另一種方法來更新progressionStatus使用API​​?

回答

1

嘗試使用此格式:

{ 
    'status': 'Member', 
    'input': [ 
     {'id': 23}, 
     {'id': 445} 
    ] 
} 

您必須使用的Marketo鉛ID (而不是電子郵件),每個API調用只能指定1個狀態值。最大批量大小爲300個潛在客戶ID。