Update Existing Campaign Depreciation
Update a campaign depreciation in an existing account.
Headers
|
|
Key |
|
Value |
|
Note |
|
|
|
api_access_key |
|
user_api_key |
|
Optional |
|
   
The data to be submitted to the API is composed of the following fields:
|
|
field |
|
Example |
|
Note |
|
|
|
API |
|
1.1 |
|
Required |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959caadac9b13dcb3 |
|
Required if not included in the headers |
|
|
|
type |
|
depreciation_update |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
campaign_id |
|
1234567890123456 |
|
Required |
|
|
|
depreciation_id |
|
346 |
|
Required |
|
|
|
depreciation_type |
|
per_transaction or
last_transaction |
|
Optional |
|
|
|
depreciation_interval |
|
18 |
|
Optional |
|
|
|
depreciation_interval_type |
|
days or
months or
years
|
|
Optional |
|
|
|
depreciation_percentage |
|
100 |
|
Optional |
|
|
|
|
|
|
|
|
|
|
|
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:
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'] = 'depreciation_update';
- $data['account_id'] = 'greatwidgets';
- $data['campaign_id'] = '1234567890123456';
- $data['depreciation_id'] = '543';
- $data['depreciation_type'] = 'last_transaction';
- $data['depreciation_interval'] = '18';
- $data['depreciation_interval_type'] = 'months';
- $data['depreciation_percentage'] = '100';
Success XML Response:
- <response status="success">
- <depreciation status="updated">
- <id>543</id>
- <type>last_transaction</type>
- <interval>18</interval>
- <interval_type>months</interval_type>
- <percentage>100</percentage>
- </depreciation>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|