> ## Documentation Index
> Fetch the complete documentation index at: https://developers.leadwaycrm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Product Collection

> Update a specific product collection with Id :collectionId

Update a specific product collection with Id :collectionId

```http theme={null}
PUT https://services.leadconnectorhq.com/products/collections/{collectionId}
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Path parameters

<ParamField path="collectionId" type="string" required default="65d71377c326ea78e1c47df5">
  MongoId of the collection
</ParamField>

## Body

<ParamField body="altId" type="string" required default="6578278e879ad2646715ba9c">
  Account Id
</ParamField>

<ParamField body="altType" type="string" required default="LOCATION">
  The type of alt. For now it is only LOCATION Posibles valores: 'account'
</ParamField>

<ParamField body="name" type="string" default="Best Sellers">
  Name of the Product Collection
</ParamField>

<ParamField body="slug" type="string" default="best-sellers">
  Slug of the Product Collection which helps in navigation
</ParamField>

<ParamField body="image" type="string" default="http://example.com/watermark.png">
  The URL of the image that is going to be displayed as the collection Thumbnail
</ParamField>

<ParamField body="seo" type="object">
  The metadata information which will be displayed in SEO previews
</ParamField>

## Respuestas

<Accordion title="200 - Successful response">
  <ResponseField name="status" type="boolean" required default="True">
    Status of api action
  </ResponseField>

  <ResponseField name="message" type="string" default="Successfully created">
    Success message
  </ResponseField>

  ```json theme={null}
  {
    "status": true,
    "message": "Successfully created"
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="422 - Unprocessable Entity">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT 'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28' \
    -H 'Content-Type: application/json' \
    -d '{
    "altId": "6578278e879ad2646715ba9c",
    "altType": "LOCATION",
    "name": "Best Sellers",
    "slug": "best-sellers",
    "image": "http://example.com/watermark.png"
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId', {
    method: 'PUT',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"}),
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'PUT',
      'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
          'Content-Type': 'application/json',
      },
      json={"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"},
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'PUT',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
          'Content-Type: application/json',
      ],
      CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'LOCATION', 'name': 'Best Sellers', 'slug': 'best-sellers', 'image': 'http://example.com/watermark.png'}),
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
