Blazemonger
Blazemonger

Reputation: 92953

Update Marketo lead's membership->progressionStatus using REST API

I'm trying to adapt https://github.com/Marketo/REST-Sample-Code/blob/master/php/LeadDatabase/Leads/SyncLeads.php for my own needs. I want to be able to update a lead's status from "Registered" to "Attended" using the REST API. (The Marketo Events app does this when someone is checked into an event.)

However, when I try sending something like:

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

I get back:

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

I understand the message just fine -- 'membership' isn't a field, therefore it can't be updated this way. But is there another way to update the progressionStatus using the API?

Upvotes: 0

Views: 243

Answers (2)

Jep
Jep

Reputation: 384

Try to use this format:

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

You have to use the Marketo Lead ID (not email) and you can only specify 1 status value per API call. Max batch size is 300 Lead IDs.

Upvotes: 1

michaelroper
michaelroper

Reputation: 293

You need to be looking at that lead's membership of the program - see this method for more information: http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/changeLeadProgramStatusUsingPOST

Upvotes: 1

Related Questions