Collections
...
Collections API
Requests
Delete Request
4min
delete request requests can be deleted by making an http delete request to the /collections/collection id/request id endpoint (where request id is the id of the request to delete and collection id is the id of the collection the request belongs to) collection status requests can only be deleted from a collection when it is not running to check whether a collection is currently running use the get collection https //docs trajectdata com/asindataapi/collections api/collections/get endpoint deleting multiple requests you should make calls to the delete request endpoint sequentially, rather than in parallel, as it is designed to remove requests one by one if you make too many concurrent calls you will receive an http 429 error for mass delete operations consider deleting and re creating the collection as this is typically quicker alternatively if your use case requires mass deletion of requests you may make an http delete request to the /collections/collection id/requests endpoint with the content type http header set to application/json and the body of the request being an array of request id strings the platform will then delete each of the ids specified example delete delete /collections/collection id/request id in the example below we delete a request with id=abcdefghijklmnop from collection with id=123456 $ curl x delete "https //api asindataapi com/collections/123456/abcdefghijklmnop?api key=demo"const axios = require('axios'); const params = { api key 'demo' } axios delete('https //api asindataapi com/collections/123456/abcdefghijklmnop', { params }) then(response => { console log('request deleted '); }) catch(error => { console log(error); });import requests api result = requests delete('https //api asindataapi com/collections/123456/abcdefghijklmnop?api key=demo') print ("request deleted ")\<?php $querystring = http build query(\[ 'api key' => 'demo', ]); $ch = curl init(sprintf('%s?%s', 'https //api asindataapi com/collections/123456/abcdefghijklmnop', $querystring)); curl setopt($ch, curlopt returntransfer, true); curl setopt($ch, curlopt followlocation, true); \# the following options are required if you're using an outdated openssl version \# more details https //www openssl org/blog/blog/2021/09/13/letsencryptrootcertexpire/ curl setopt($ch, curlopt ssl verifyhost, false); curl setopt($ch, curlopt ssl verifypeer, false); curl setopt($ch, curlopt timeout, 180); curl setopt($ch, curlopt customrequest, "delete"); $json = curl exec($ch); curl close($ch); echo "request deleted ", php eol; ?> asin data api responds with a json object confirming that the request has been deleted, or detailing the error if it has not been possible to delete the request ✅success json { "request info" { "success" true, "message" "request deleted" } } ❌no request { "request info" { "success" false, "message" "no request with id 'abcdefghijklmnop' was found in this collection, please check the id and try again" } } ❌no collection { "request info" { "success" false, "message" "collection with id '123456' was not found" } } next steps update request https //docs trajectdata com/asindataapi/collections api/requests/update list request https //docs trajectdata com/asindataapi/collections api/requests/list