We're performing an instance-to-instance migration and at the point where we're migrating Program Membership details. However, the Push Lead endpoint is not accepting the membership details. If I remove the membership details, the lead is added to the Program just fine, but the required details are not represented in Marketo of course.
Per the API documentation(https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads... ), the details I want in Marketo are to be provided under a "membership" key/section of the input. However, when I provide this info, I receive the following error:
{"status": "skipped", "reasons": [{"code": "1006", "message": "Field 'membership' not found"}]}
These are the input details that are failing (formatted with hard returns for easier reading in this text box):
{'id': 2194844,
'membership': {'progressionStatus': 'Downloaded', 'isExhausted': False, 'acquiredBy': False,
'reachedSuccess': True, 'membershipDate': '2017-08-02T11:18:48Z'}}
Simplifying the payload to the data below works just fine, but it's a just a partial solution:
{'id': 2194844}
Anyone have any tips or tricks to get the endpoint to recognize the membership data?
Many thanks in advance!
The Advanced Editor has a syntax highlighter, please use that.
And no, you can't force values like "isExhausted" in this manner. You can set the Program Status.
Thanks, Sanford, but the API documentation states otherwise.
It describes the payload as below and IsExhausted is mentioned as an optional parameter.
PushLeadToMarketoRequest {
}
Lead {
}
ProgramMembership {
}
This has to be a doc bug. ProgramMembership and Reason may be defined (sub)schemas, but they don't belong here, nor are they necessarily writable (they could belong in a response model only).
If you take the PushLeadToMarketoRequest model on its own, it doesn't contain the other schemas (even if the example value does).