How to chain api calls i.e. GETFIELD contact for fieldID after doing GET profile on profileID?
You probably want the UFField entity, not Profile ...  try:
entity=UFField&amp;action=get&amp;api_key=userkey&amp;key=sitekey&amp;json={&quot;sequential&quot;:1,&quot;profile_id&quot;:22}

Then you can chain getfield:
entity=UFField&amp;action=get&amp;api_key=userkey&amp;key=sitekey&amp;json={&quot;sequential&quot;:1,
&quot;uf_group_id&quot;:22,
&quot;api.Contact.getfield&quot;:{&quot;action&quot;:&quot;get&quot;,&quot;name&quot;:&quot;$value.field_name&quot;}}

That assumes the custom fields are for Contacts.