> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.quivo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Products

This guide shows you how to retrieve article details, update articles, manage product images, and search your catalog. After creating articles, you can manage them by updating details, uploading images, searching your catalog, and validating product data. Each article has a unique SKU that identifies it.

## Prerequisites

Before you start, make sure you have:

* **Session token:** A valid session token. See the [Authentication guide](/api-reference/authentication) to learn how to obtain one.
* **Seller ID:** Use the [`GET /sellers endpoint`](/api-reference/#tag/sellers) to find it.
* **Existing articles:** Create at least one article first. See the [Create Products guide](/docs/quivo-guides/create-products) if you have not created articles yet.

<Note>
  All API examples in this guide use `${BASE_URL}` as a placeholder. Replace it with the correct base URL configured for the correct environment. For more information see [Environments page](/api-reference/environments).
</Note>

## Retrieve article details

Retrieve article details using the article ID or article identifier. Use the [`GET /articles/{sellerId}/{articleId} endpoint`](/api-reference/#tag/articles) to get details by article ID. Use the `articleId` returned when you created the article.

<Tabs>
  <Tab title="Request">
    Use this request to retrieve the full details of an article by its ID:

    ```bash theme={null}
    curl -X GET "${BASE_URL}/articles/<YOUR_SELLER_ID>/<YOUR_ARTICLE_ID>" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>"
    ```
  </Tab>

  <Tab title="Response">
    A successful request returns a `200 OK` status code with the full article details:

    ```json theme={null}
    {
      "articleId": <YOUR_ARTICLE_ID>,
      "sellerId": <YOUR_SELLER_ID>,
      "sku": "<YOUR_SKU>",
      "name": {
        "value": "<PRODUCT_NAME>",
        "language": "EN"
      },
      "grossWeight": {
        "value": <WEIGHT_VALUE>,
        "unit": "KG"
      },
      "images": [
        {
          "id": "<IMAGE_ID>",
          "url": {
            "link": "<IMAGE_URL>"
          },
          "source": "<IMAGE_SOURCE>"
        }
      ],
      "created": "<YYYY-MM-DDTHH:mm:ssZ>",
      "lastModified": "<YYYY-MM-DDTHH:mm:ssZ>"
    }
    ```

    Timestamps use the ISO 8601 format YYYY-MM-DDTHH:mm:ssZ in Coordinated Universal Time UTC.
  </Tab>
</Tabs>

You can also retrieve an article by its identifier using the [`GET /articles/{sellerId}/identifier/{articleIdentifier} endpoint`](/api-reference/#tag/articles).

## Search articles

Search for articles using the [`GET /articles endpoint`](/api-reference/#tag/articles). This endpoint supports query, sorting, and pagination parameters. Use the `query` parameter to filter results, `sort` to order them, and `pageSize` to limit the number of results.

<Tabs>
  <Tab title="Request">
    Use this request to search for articles using query parameters:

    ```bash theme={null}
    curl -X GET "${BASE_URL}/articles?query=sku:<YOUR_SKU>&sort=created:desc&pageSize=50" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>"
    ```
  </Tab>

  <Tab title="Response">
    A successful request returns a `200 OK` status code with a paginated list of articles:

    ```json theme={null}
    {
      "content": [
        {
          "articleId": <ARTICLE_ID>,
          "sku": "<SKU>",
          "name": {
            "value": "<PRODUCT_NAME>",
            "language": "EN"
          }
        }
      ],
      "totalElements": 1,
      "totalPages": 1,
      "page": 0,
      "pageSize": 50
    }
    ```
  </Tab>
</Tabs>

## Update an article

Update an existing article using the [`PUT /articles/{sellerId}/{articleId} endpoint`](/api-reference/#tag/articles). Provide the fields you want to update in the request body. Include all fields you want to keep, not just the ones you are updating. The request body should contain the complete article data.

<Tabs>
  <Tab title="Request">
    Use this request to update an existing article with new information:

    ```bash theme={null}
    curl -X PUT "${BASE_URL}/articles/<YOUR_SELLER_ID>/<YOUR_ARTICLE_ID>" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>" \
      -H "Content-Type: application/json" \
      -d '{
        "sku": "<YOUR_SKU>",
        "name": {
          "value": "<UPDATED_PRODUCT_NAME>",
          "language": "EN"
        },
        "grossWeight": {
          "value": <UPDATED_WEIGHT_VALUE>,
          "unit": "KG"
        }
      }'
    ```
  </Tab>

  <Tab title="Response">
    A successful request returns a `200 OK` status code with the updated article details:

    ```json theme={null}
    {
      "articleId": <YOUR_ARTICLE_ID>,
      "sellerId": <YOUR_SELLER_ID>,
      "sku": "<YOUR_SKU>",
      "name": {
        "value": "<UPDATED_PRODUCT_NAME>",
        "language": "EN"
      },
      "grossWeight": {
        "value": <UPDATED_WEIGHT_VALUE>,
        "unit": "KG"
      },
      "lastModified": "<YYYY-MM-DDTHH:mm:ssZ>"
    }
    ```
  </Tab>
</Tabs>

<Tip>
  **Validation:** Before updating an article, you can validate your request using the [`POST /articles/{sellerId}/validate endpoint`](/api-reference/#tag/articles). This helps catch errors before making changes.
</Tip>

## Upload product images

You can upload product images to articles using the following endpoints:

1. [`POST /articles/{sellerId}/{articleId}/images/upload endpoint`](/api-reference/#tag/articles) - Get an upload URL
2. Upload the image file to the provided URL
3. [`POST /articles/{sellerId}/{articleId}/images endpoint`](/api-reference/#tag/articles) - Store the image information

### Step 1: Get upload link

Request an upload link using the [`POST /articles/{sellerId}/{articleId}/images/upload endpoint`](/api-reference/#tag/articles):

<Tabs>
  <Tab title="Request">
    Use this request to get an upload URL for a product image:

    ```bash theme={null}
    curl -X POST "${BASE_URL}/articles/<YOUR_SELLER_ID>/<YOUR_ARTICLE_ID>/images/upload?mimeType=image/jpeg" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>"
    ```
  </Tab>

  <Tab title="Response">
    A successful request returns a `200 OK` status code with upload details:

    ```json theme={null}
    {
      "id": "<IMAGE_UPLOAD_ID>",
      "uploadUrl": "<UPLOAD_URL>"
    }
    ```

    Save the `uploadUrl` and `id` values. You need these for the next step.
  </Tab>
</Tabs>

### Step 2: Upload the image

Upload your image file to the `uploadUrl` using a PUT request:

<Tabs>
  <Tab title="Request">
    Use this request to upload the image file to the provided upload URL:

    ```bash theme={null}
    curl -X PUT "<UPLOAD_URL>" \
      -H "Content-Type: image/jpeg" \
      --data-binary "@<PATH_TO_IMAGE_FILE>"
    ```

    <Note>
      Replace `<UPLOAD_URL>` with the upload URL from Step 1. Replace `<PATH_TO_IMAGE_FILE>` with the path to your image file. Set the `Content-Type` header to match the mime type you specified in Step 1.
    </Note>
  </Tab>

  <Tab title="Response">
    A successful upload returns a `200 OK` or `204 No Content` status code with no response body.
  </Tab>
</Tabs>

### Step 3: Store image information

After uploading the image, store the image information using the [`POST /articles/{sellerId}/{articleId}/images endpoint`](/api-reference/#tag/articles):

<Tabs>
  <Tab title="Request">
    Use this request to store the uploaded image information on the article:

    ```bash theme={null}
    curl -X POST "${BASE_URL}/articles/<YOUR_SELLER_ID>/<YOUR_ARTICLE_ID>/images" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>" \
      -H "Content-Type: application/json" \
      -d '{
        "id": "<IMAGE_UPLOAD_ID>"
      }'
    ```

    <Note>
      Use the `id` value from Step 1. This is the only required field for storing the image information.
    </Note>
  </Tab>

  <Tab title="Response">
    A successful request returns a `200 OK` status code with image information:

    ```json theme={null}
    {
      "id": "<IMAGE_ID>",
      "url": {
        "link": "<IMAGE_URL>"
      },
      "source": "<IMAGE_SOURCE>"
    }
    ```
  </Tab>
</Tabs>

## Delete an article image

Delete an article image using the [`DELETE /articles/{sellerId}/{articleId}/images/{uuid} endpoint`](/api-reference/#tag/articles). Use the image `id` from the article details.

<Tabs>
  <Tab title="Request">
    Use this request to delete an image from an article:

    ```bash theme={null}
    curl -X DELETE "${BASE_URL}/articles/<YOUR_SELLER_ID>/<YOUR_ARTICLE_ID>/images/<IMAGE_ID>" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>"
    ```
  </Tab>

  <Tab title="Response">
    A successful deletion returns a `200 OK` or `204 No Content` status code with no response body.
  </Tab>
</Tabs>

## Validate article data

Validate article data before creating or updating an article. Use the [`POST /articles/{sellerId}/validate endpoint`](/api-reference/#tag/articles) to check your article data:

<Tabs>
  <Tab title="Request">
    Use this request to validate article data before creating or updating:

    ```bash theme={null}
    curl -X POST "${BASE_URL}/articles/<YOUR_SELLER_ID>/validate" \
      -H "X-Api-Key: <YOUR_STATIC_API_KEY>" \
      -H "Authorization: <YOUR_SESSION_TOKEN>" \
      -H "Content-Type: application/json" \
      -d '{
        "sku": "<YOUR_SKU>",
        "name": {
          "value": "<PRODUCT_NAME>",
          "language": "EN"
        },
        "grossWeight": {
          "value": <WEIGHT_VALUE>,
          "unit": "KG"
        }
      }'
    ```
  </Tab>

  <Tab title="Response">
    A successful validation returns a `200 OK` status code with the validated article data as an `ArticleGetDetail` object:

    ```json theme={null}
    {
      "articleId": <ARTICLE_ID>,
      "sellerId": <YOUR_SELLER_ID>,
      "sku": "<YOUR_SKU>",
      "name": {
        "value": "<PRODUCT_NAME>",
        "language": "EN"
      },
      "grossWeight": {
        "value": <WEIGHT_VALUE>,
        "unit": "KG"
      },
      "created": "<YYYY-MM-DDTHH:mm:ssZ>",
      "lastModified": "<YYYY-MM-DDTHH:mm:ssZ>"
    }
    ```

    The response contains the processed article data if validation passes. If validation fails, the API returns an error response.
  </Tab>
</Tabs>

## Where to go next

Now that you can manage articles, continue with these guides:

<CardGroup cols={2}>
  <Card title="Create Products" icon="plus" href="/docs/quivo-guides/create-products">
    Learn how to create new articles in your catalog.
  </Card>

  <Card title="Send Inventory" icon="warehouse" href="/docs/quickstart/send-inventory">
    Send your products to Quivo warehouses to make them available for fulfillment.
  </Card>
</CardGroup>
