Delete All Collections

5. DELETE ALL COLLECTIONS

URL: https://app.detrack.com/api/v1/collections/delete/all.json
HTTP POST REQUEST

Note: the request structure below is for Method #1: Name/Value Pair (NVP) + JSON String . For Method #2: Custom Header + JSON Body , please refer to the json parameter only.

Parameter Description
key Your API key. You can obtain this from your dashboard.
json The JSON string containing the date on which you wish to delete all collections. It should contain the following field:

Field Description
date The collection date. Format: YYYY-MM-DD e.g. 2014-02-28. Required field.
HTTP POST RESPONSE (JSON)
Field Description
info Contains information on the status of the request.

Field Description
status The status of the request. The value will be “ok” if request is processed successfully or “failed” if the key or json parameter is missing.
failed The number of collections that are not deleted due to error.
deleted The number of collections that deleted.
error Contains the error details if the request failed. Note: this field is set only if the request failed.

Field Description
code The error code. Please refer to Collection Error Codes
message The corresponding error message.
SAMPLE REQUEST JSON
{
"date":"2014-02-13"
}
SAMPLE RESPONSE JSON #1
{
"info":{
"status":"ok",
"failed":0,
"deleted":2
}
}
SAMPLE RESPONSE JSON #2
{
"info":{
"status":"ok",
"failed":0,
"deleted":0
}
}