Collections
...
Collections API
Requests
Update Request
4min
update request requests within a collection can be updated by making an http put to the /collections/collection id/request id endpoint (where request id is the id of the request and collection id is the id of the collection the request belongs to) the body can be either x www form urlencoded parameters or a json object the parameters https //docs trajectdata com/bluecartapi/walmart product data api/requests/parameters/common for updating a request are the same as those used when making a call via the walmart product data api https //docs trajectdata com/bluecartapi/walmart product data api/overview collection status requests can only be updated when the collection they belong to is not running to check whether a collection is currently running use the get collection https //docs trajectdata com/bluecartapi/collections api/collections/get endpoint updating multiple requests you should make calls to the update request endpoint sequentially, rather than in parallel, as it is designed to update requests one by one if you make too many concurrent calls you will receive an http 429 error for mass update operations consider deleting and re creating the collection as this is typically quicker example put put /collections/collection id/request id in the example below we update a request with id=abcdefghijklmnop within a collection with id=123456 $ curl x put "https //api bluecartapi com/collections/123456/abcdefghijklmnop?api key=demo" \\ d item id="19599042"const axios = require('axios'); const body = { "item id" "19599042" } axios put('https //api bluecartapi com/collections/123456/abcdefghijklmnop?api key=demo', body) then(response => { const apiresponse = response data; console log('collection updated ' + json stringify(apiresponse, 0, 2)); }) catch(error => { console log(error); });import requests body = { "item id" "19599042" } api result = requests put('https //api bluecartapi com/collections/123456/abcdefghijklmnop?api key=demo', json=body) api response = api result json() print "collection updated ", json dumps(api response)$body = http build query(\[ "item id" => "19599042" ]); $ch = curl init('https //api bluecartapi com/collections/123456/abcdefghijklmnop?api key=demo'); 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, "put"); curl setopt($ch, curlopt postfields, $body); $json = curl exec($ch); curl close($ch); $api result = json decode($json, true); echo "collection updated", php eol; bluecart api responds with a json object containing details of the request fields that have been updated { "request info" { "success" true }, "request" { "item id" "19599042" } } next steps delete requests https //docs trajectdata com/bluecartapi/collections api/requests/delete list requests https //docs trajectdata com/bluecartapi/collections api/requests/list