|
Manage Custom Reward Fields - Delete Field
Remove a field used to gather rewards 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_reward_fields |
|
Required |
|
|
|
action |
|
delete |
|
Required |
|
|
|
field_list |
|
custom_field_3|custom_field_4 |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
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.
- Valid fields that can be deleted have the following field_name structure:
- "reward_custom_field_#
Example:
- reward_custom_field_1
- reward_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_reward_fields';
- $data['action'] = 'delete';
Success XML Response (lists ALL the existing fields):
- <response status="success">
- <account>
- <account_id>greatwidgets</account_id>
- <fields>
- <field>
- <name>reward_custom_field_1</name>
- <label>PCU</label>
- <show>Y</show>
- <type>Text</type>
- </field>
- <field>
- <name>reward_custom_field_2</name>
- <label>Category</label>
- <show>Y</show>
- <type>List</type>
- <choices>
- <choice>Beverages</choice>
- <choice>Food</choice>
- <choice>Other</choice>
- </choice>
- </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.
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|
|