Skip to main content
Delete Collection
Fin avatar
Written by Fin
Updated over 2 years ago

Delete Collection

URL:

https://app.detrack.com/api/v1/collections/delete.json

Limit:

100 collections per request (send separate requests if you are deleting more than 100 collections)

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.

Field

Description

date

The collection date. Format: YYYY-MM-DD e.g. 2014-02-28. Required field.

do

The D.O. #. The D.O. # of the collection to delete. Required field.

HTTP POST RESPONSE (JSON)

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.

error

Contains the error details if the request failed. Note: this field is set only if the request failed.

Field

Description

date

The date of the collection. Format: YYYY-MM-DD e.g. 2014-02-28

do

The D.O. # of the collection.

status

The status of the collection delete request. The value will be “ok” if the collection is successfully deleted or “failed” if the collection is not deleted.

errors

Contains an array of error messages if the collection delete request failed. Note: this field is set only if the collection delete request failed.

SAMPLE REQUEST JSON

[
   {
      "date":"2014-02-13",
      "do":"DO140213001"
   },
   {
      "date":"2014-02-13",
      "do":"DO140213002"
   }
]

SAMPLE RESPONSE JSON #1

{
   "info":{
      "status":"ok",
      "failed":0
   },
   "results":[
      {
         "date":"2014-02-13",
         "do":"DO140213001",
         "status":"ok"
      },
      {
         "date":"2014-02-13",
         "do":"DO140213002",
         "status":"ok"
      }
   ]
}

SAMPLE RESPONSE JSON #2

{
   "info":{
      "status":"ok",
      "failed":2
   },
   "results":[
      {
         "date":"2014-02-13",
         "do":"DO140213001",
         "status":"failed",
         "errors":[
            {
               "code":1003,
               "message":"Collection with D.O. # DO140213001 not found on 2014-02-13."
            }
         ]
      },
      {
         "date":"2014-02-13",
         "do":"DO140213002",
         "status":"failed",
         "errors":[
            {
               "code":1003,
               "message":"Collection with D.O. # DO140213002 not found on 2014-02-13."
            }
         ]
      }
   ]
}
Did this answer your question?