Manage Customer Fields - Delete Field
Remove a field 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 |
|
|
|
type |
|
manage_fields |
|
Required |
|
|
|
action |
|
delete |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
field_list |
|
custom_field_3|custom_field_4 |
|
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:
- Only users with proper permissions can access this call.
- Multiple fields can be deleted at the same time.
- The following default field_names cannot be deleted (you can update them to show=N, however.)
- card_number
- first_name
- last_name
- phone
- email
- street1
- street2
- city
- state
- zip
- country
- customer_username
- customer_PIN
- customer_password
- custom_date
- custom_field_1
- Valid fields that can be deleted have the following field_name structure:
- "custom_field_#" where the "#" is any integer above 1
(one of the default fields is "custom_field_1")
Example:
- custom_field_2
- custom_field_14
- ...
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['API'] = '1.5';
- $data['user_id'] = 'john1970';
- $data['user_api_key'] = '1959caadac9b13dcb3';
- $data['account_id'] = 'greatwidgets';
- $data['type'] = 'manage_fields';
- $data['action'] = 'delete';
- $data['field_list'] = 'custom_field_3|custom_field_4';
Success XML Response (lists ALL the existing fields):
- <response status="success">
- <account>
- <account_id>test2009050502</account_id>
- <fields>
- <field>
- <name>card_number</name>
- <label>Member #</label>
- <show>Y</show>
- <type>Text</type>
- </field>
- <field>
- <name>first_name</name>
- <label>First Name</label>
- <show>Y</show>
- <type>Text</type>
- </field>
- ...
- <field>
- <name>custom_field_2</name>
- <label>Middle Name</label>
- <show>Y</show>
- <type>Text</type>
- </field>
- </fields>
- </account>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|