Manage Customer Fields - List
Show the fields used to gather customer data:
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.6 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_api_key |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
type |
|
manage_fields |
|
Required |
|
|
|
action |
|
list |
|
Required |
|
|
|
|
|
|
|
|
|
|
|
Output Format: |
|
|
|
output |
|
JSON or XML |
|
Optional. If not provided, defaults to XML |
|
|
|
callback |
|
someFunctionName |
|
Optional: JSONP format |
|
|
|
condensed |
|
yes |
|
Optional (No white space) Applies only to JSON(P) output |
|
|
|
|
|
|
|
|
|
NOTE:
- Almost all users can access this call.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['account_id'] = 'greatwidgets';
- $data['type'] = 'manage_fields';
- $data['action'] = 'list';
Success XML Response:
- <response status="success">
- <account>
- <account_id>test2009050502</account_id>
- <fields>
- <field>
- <name>card_number</name>
- <label>Card #</label>
- <show>Y</show>
- <type>Text</type>
- </field>
- <field>
- <name>custom_field_2</name>
- <label>Marital Status</label>
- <show>Y</show>
- <type>List</type>
- <choices>
- <choice>Single</choice>
- <choice>Married</choice>
- <choice>Divorced</choice>
- <choice>In Civil Union</choice>
- <choice>Other</choice>
- </choices>
- </field>
- ...
- </fields>
- </account>
- </response>
NOTE:
- The <show> response indicates whether or not this field ought to be shown or not. Usually fields with "N" will have nothing in them. However, it is allowed to add content to any defined field through the API regardless of their <show> status.
- The <type> parameter can be: Text, Date, List (Multiple Choice), or Pick (Single Choice)
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|