---
title: Update Request
slug: bigboxapi/collections-api/requests/update
docTags: 
createdAt: 2024-07-22T08:01:06.003Z
---

# 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/bigboxapi/homedepot-product-data-api/requests/parameters/common) for updating a Request are the same as those used when making a call via the [Home Depot Product Data API](https://docs.trajectdata.com/bigboxapi/homedepot-product-data-api).

:::hint{type="info"}
**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/bigboxapi/collections-api/collections/get) endpoint.
:::

:::hint{type="info"}
**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

<font color="#faad14">`PUT`</font>  `/collections/COLLECTION_ID/REQUEST_ID`

In the example below we update a Request with `id=ABCDEFGHIJKLMNOP` within a Collection with `id=123456` .

:::CodeblockTabs
```curl
$ curl -X PUT "https://api.bigboxapi.com/collections/123456/ABCDEFGHIJKLMNOP?api_key=demo" \
  -d item_id="309792479"
```

```nodejs
const axios = require('axios');
const body = {
  "item_id": "309792479"
}

axios.put('https://api.bigboxapi.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);
  });
```

```python
import requests

body = {
  "item_id": "309792479"
}

api_result = requests.put('https://api.bigboxapi.com/collections/123456/ABCDEFGHIJKLMNOP?api_key=demo', json=body)

api_response = api_result.json()

print "Collection Updated: ", json.dumps(api_response)
```

```php
$body = http_build_query([
  
  "item_id" => "309792479"

]);

$ch = curl_init('https://api.bigboxapi.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;
```
:::

BigBox API responds with a JSON object containing details of the Request fields that have been updated:

```json
{
  "request_info": {
    "success": true
  },
  "request": {
    "item_id": "309792479"
  }
}
```

***

**Next Steps**
     [Delete Requests](https://docs.trajectdata.com/bigboxapi/collections-api/requests/delete)
     [List Requests](https://docs.trajectdata.com/bigboxapi/collections-api/requests/list)
