|
Campaign Depreciations List
Returns a list of the depreciations for a given campaign.
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959caadac9b13dcb3 |
|
Required |
|
|
|
type |
|
campaign_depreciations |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
campaign_id |
|
1234567890123456 |
|
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 |
|
|
|
|
|
|
|
|
|
Notes:
- Depreciations are only available for Points and GiftCard (Stored Value) type of campaigns.
Example PHP Request:
If you are using PHP, the $data array would look like this:
- $data['user_id'] = 'john1970';
- $data['user_password'] = '1959caadac9b13dcb3';
- $data['type'] = 'campaign_depreciations';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_id'] = '1234567890123456';
Success XML Response:
- <response status="success">
- <campaign>
- <id>1111222233334444</id>
- </campaign>
- <depreciations>
- <depreciation>
- <id>356</id>
- <depreciation_interval>18</depreciation_interval>
- <depreciation_interval_type>months</depreciation_interval_type>
- <depreciation_percentage>50</depreciation_percentage>
- </depreciation>
- <depreciation>
- <id>417</id>
- <depreciation_interval>4</depreciation_interval>
- <depreciation_interval_type>years</depreciation_interval_type>
- <depreciation_percentage>100</depreciation_percentage>
- </depreciation>
- ...
- </depreciations>
- </response>
Notes:
- When identifying a depreciation entry to another API call, you use the <id> that is returned in the XML construct such as the one above.
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|
|