get_info
get_info is used to pull data from your users. The structure is very straightforward; simply include the fields you would like to get in the doc as true and use clogin_id and group_id to identify which user you'd like to get the information for. If you would only like to get the metadata for the user, then just send doc with no content.
Name | Type | Required | Description |
action | string | true | get_info |
_allfields | boolean | false | Returns all of the fields for the applicant, field_index (provides field metadata, see _allfields section for more), and an error section for incomplete fields. |
fields | boolean | false | These are the fields present in your forms. They are referenced by field id or by mapped name (fields are covered more here). |
_family | boolean | false | This returns meta_info for both the parent and any associated children. The return information will include the key parent and it's value will be their meta_info, and the key children as an array of meta_info for each child. |
_userproducts | boolean | false | This returns information about the products which a user is allowed to select. The return will indicate if they have the product in their cart by including cart_id. |
_userforms | boolean | false | This returns information about the forms a user has in their form set. |
_usercart | boolean, dictionary | false | This returns information about the products that a user has in their cart. |
_userpayments | boolean | false | Returns the list of payments that are associated with the user. |
_utm | boolean | false | Returns infromation about UTM codes associated with the user, including campaign, content, id, medium, source, and term. |
There are two main approaches to getting field information from your applicants. The first is to ask for all fields for a user, and the second is to specifically choose which fields you would like returned. See the documentation to learn more about fields and how to reference them in the API.
This is the default get_info call, so sending doc with no parameters will return all of the fields for the user. If you're making a call with other parameters as well, simply use _allfields: True.
There are a few important things to note about the response. When you request all fields, you will get both the completed fields which appear on forms that the user has in their form set in doc, as well as null for fields which have not been completed (or fields which they have completed but appear on forms which they do not have access to). The incomplete fields will also appear in a separate errors section. Finally, field_index will include metadata about the fields themselves, allowing you to match the fields in your return to the forms on which they appear (via form_id).
By default _allfields includes the empty fields. If you would only like to return the completed fields, you can include with_empty_fields: False. Note that this parameter should be included at the top level, and not inside doc. Further you can inlcude this argument on any request for fields in order to only return completed fields.
Simply provide a list in doc which specifies which fields you would like returned. The return will have a complete list of the fields which you requested, and the fields which have not been answered (or fields with answers which appear on forms that the user does not have access to) will appear as null values. This is the recommended approach if you have a small list of fields to collect.
This returns meta_info for both the parent and any associated children. The return information will include the key parent and it's value will be their meta_info, and the key children as an array of meta_info for each child.
This returns information about the products which a user is allowed to select, and the return will indicate if they actually have the product in their cart by including cart_id.
By default, as soon as you add a product to the product page it will be viewable by your users. There are, however, a number of ways to restrict this access:
- Triggers: If a product is triggered to show or add only when the conditions are met, then users who do not meet those conditions will not see the product. Unless you have the "hide products unless triggered" option turned on (this is off by default), then un-triggered products will be available to everyone. See this article for more on how to edit a product trigger.
- Availability or expiration date: even if a user meets the trigger conditions, a product will not be available prior to its availability date or after its expiration date.
- Admin only: if you set a product to be viewable only to admins, then the only users who will see it are those who have already had it added to their cart. Note that if a product is triggered to add automatically, it will still add even if it is marked as admin only.
As final note, internalid is a helpful product property which allows you to set custom tags for products. This can help you group products according to your internal needs which falls outside the category groupings already provided. See this article for more on how to edit products and add these custom tags.
This returns information about the forms a user has in their form set.
This returns information about the proucts a user has in their cart. Note that you can either use "_usercart":True for just the cart information, or you can use "_usercart": {"with_payment_allocation":True} to include an extra section in the return that shows how the payments for that applicant have been allocated to the products in the cart.
Returns the list of payments that are associated with the user.
This returns information about the proucts a user has in their cart. Note that you can either use "_usercart":True for just the cart information, or you can use "_usercart": {"with_payment_allocation":True} to include an extra section in the return that shows how the payments for that applicant have been allocated to the products in the cart.
Returns information about your UTM codes. If a UTM parameter is not available or provided, it will appear as an error in the errors block of the return.