Skip to main content
POST
https://api-ai.textyess.com
/
products
/
bulk-import
Bulk Import Products
curl --request POST \
  --url https://api-ai.textyess.com/products/bulk-import \
  --header 'Content-Type: application/json' \
  --header 'x-auth-token: <api-key>' \
  --data '
{
  "file_url": "<string>"
}
'
{
  "success": true,
  "message": "Products update queued successfully"
}

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:
x-auth-token: your_jwt_token

Body Parameters

file_url
string
required
A valid URL pointing to a JSONL file containing your products data. The file should be publicly accessible.

Expected JSONL File Structure

Your JSONL file should contain an array of products with the following structure:
[
  {
    "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

success
boolean
Indicates if the import was successful
message
string
A human-readable message describing the result
{
  "success": true,
  "message": "Products update queued successfully"
}

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.