I am trying to use the API to get membership data, including some custom fields. I have the general idea, I think. I can successfully retrieve the memberships, chained in the contact data, and now I need to include some data in custom fields. The table the custom data is stored in is called "college_data_1" and one of the custom fields is called "enrollment_3". So I believe I want entity 1 and field 3. I didn't find documentation that confirms how to find these IDs. So what I current have in API explorer is:

rest.php?entity=Membership&action=get&api_key=userkey&key=sitekey&json={"sequential":1,"membership_type_id":"Membership Name","api.Contact.get":{},"api.CustomValue.get":{"id":3,"entity_id":1}}

however this doesn't work. Help?

I will need to include website data too, next.

1 Answer 1


I don't think you need to chain the calls, you simply need to specify the fields (return custom_xxx) you want to fetch from the membership.

On the API explorer, try to set the return fields you want, and check you can include the custom fields you want

  • It seems that I can only include custom fields for the main query... in this case membership. I need custom fields from the chained Contact query.
    – Rob Brandt
    Commented Jul 4, 2017 at 5:15
  • That's a limitation of the api explorer, do use it to generate the code on the contact.get and re-use the return param when you call it chained from the membership and it will work
    – Xavier
    Commented Jul 5, 2017 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.