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

# Bulk Import Products

> Import multiple products at once into your catalog

## Overview

The bulk import endpoint allows you to add multiple products to your catalog by providing a URL to a JSONL file containing your products data. This is used only initial catalog.

## Authentication

This endpoint requires a valid JWT token in the `x-auth-token` header. You can find your token in the [Developers section](https://ai.textyess.com/developers):

```bash theme={null}
x-auth-token: your_jwt_token
```

## Body Parameters

<ParamField body="file_url" type="string" required initialValue="https://example.com/products.json">
  A valid URL pointing to a JSONL file containing your products data. The file should be publicly accessible.
</ParamField>

### Expected JSONL File Structure

Your JSONL file should contain an array of products with the following structure:

```json theme={null}
[
  {
    "id": "prod_12345",
    "title": "Sample Product",
    "description": "A detailed product description",
    "image": "https://example.com/image.jpg",
    "url": "https://yourstore.com/products/sample-product",
    "variants": [
      {
        "id": "var_12345",
        "title": "Default Variant",
        "price": "29.99",
        "inventory_quantity": 100,
        "variant_url": "https://yourstore.com/products/sample-product/variant"
      }
    ],
    "collections": ["New Arrivals", "Featured"]
  }
]
```

## Response

<ResponseField name="success" type="boolean">
  Indicates if the import was successful
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable message describing the result
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Products update queued successfully"
  }
  ```

  ```json 400 theme={null}
  {
    "message": "You hit rate limit"
  }
  ```

  ```json 401 theme={null}
  {
    "message": "Unauthorized"
  }
  ```
</ResponseExample>

## Best Practices

1. **File Hosting**: Ensure your JSONL file is hosted on a reliable, publicly accessible URL.
2. **File Size**: Keep your JSONL file under 10MB for optimal processing.
3. **Data Validation**: Validate your JSONL structure before uploading to avoid failed imports.
4. **Error Handling**: Implement retry logic with exponential backoff for rate limit errors.
5. **Idempotency**: The operation is NOT idempotent - uploading the same file multiple times will create duplicate products.
