Delete a Customer
Deletes a customer from the account PERMANENTLY.
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 |
|
|
|
user_id |
|
john1970 |
|
Required |
|
|
|
user_password |
|
1959caadac9b13dcb3 |
|
Required if not included in the headers |
|
|
|
type |
|
customer_delete |
|
Required |
|
|
|
account_id |
|
greatwidgets |
|
Required |
|
|
|
code |
|
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 |
|
|
|
|
|
|
|
|
|
WARNING: THIS IS A PERMANENT DELETE. THERE IS NO UNDO!
This call deletes ALL information related to that customer:
- Removes ALL customer data such as name, card number, etc.
- Removes ALL customer transactions in ALL account campaigns.
- Remoces ONLY one customer at a time to avoid accidentally wiping the whole database.
Notes:
Headers: the user_api_key value can be included in either the header section or the body of the request. If the key is provided in both locations, the API will process and validate only the value provided in the headers.
If you want to remove more than one customer at a time, implement a loop in your code that makes this call for each customer that you want removed. This way, if the whole customer database gets erased accidentally, the fault lies with your code, not ours. :)
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'] = 'customer_delete';
- $data['account_id'] = 'greatwidgets';
- $data['code'] = '1234567890123456';
Success XML Response:
- <response status="success">
- <customer status="deleted">
- <code>1234567890123456</code>
- </customer>
- </response>
Error XML Response:
- <response status="error">
- <error>Error message</error>
- </response>
|