Create Product
Create a new product in your easycart store.
Request
POST /products
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Product status ("draft" or "published") |
name | string | Yes | Product name (max 255 characters) |
description | string | No | Product description (max 10,000 characters) |
image_url | string | No | URL to the product image (max 255 characters) |
currency | string | Yes | ISO currency code (3 characters, e.g., "usd", "eur") |
slug | string | No | Custom URL slug. Must match pattern ^[a-z0-9-]+$ and be unique per store. |
active_from | string | No | Start selling date (ISO 8601 format) |
active_until | string | No | Stop selling date (ISO 8601 format). Must be after or equal to active_from. |
redirect_url | string | No | Post-purchase redirect URL (max 1000 characters) |
webhook_url | string | No | Webhook URL for order events |
terms_url | string | No | Terms & conditions URL |
policy_url | string | No | Privacy policy URL |
contact_email | string | No | Product contact email (max 255 characters) |
refund_days | integer | No | Refund period in days. Set to 0 to disable refunds. |
show_discount_field | boolean | No | Show promo code field on checkout page |
delegable | boolean | No | Allow order delegation/gifting |
file | object | No | Single downloadable file. Legacy shortcut equivalent to files: [file]. See File Object. |
files | array | No | Up to 5 downloadable files. Each entry is a File Object. When provided, this supersedes file. |
File Object
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name shown in the customer portal (max 100 characters) |
url | string | Yes | External URL to download the file (max 2048 characters) |
note
A product can have up to 5 downloadable files. Use files (array) to attach more than one. The singular file field is a backward-compatible shortcut for a single file; if both are sent, files wins.
Example Request
Basic product creation:
curl -X POST "https://cart.easy.tools/api/v1/products" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "published",
"name": "Premium Coffee Beans",
"description": "High-quality arabica coffee beans from Colombia",
"image_url": "https://example.com/images/coffee-beans.jpg",
"currency": "usd",
"file": {
"name": "My ebook.pdf",
"url": "https://mysite.com/ebook.pdf"
}
}'
Product with multiple downloadable files:
curl -X POST "https://cart.easy.tools/api/v1/products" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "published",
"name": "Premium Coffee Bundle",
"currency": "usd",
"files": [
{ "name": "My ebook.pdf", "url": "https://mysite.com/ebook.pdf" },
{ "name": "Bonus chapter.pdf", "url": "https://mysite.com/bonus-chapter.pdf" }
]
}'
Product with advanced options:
curl -X POST "https://cart.easy.tools/api/v1/products" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "published",
"name": "Premium Coffee Beans",
"description": "High-quality arabica coffee beans from Colombia",
"image_url": "https://example.com/images/coffee-beans.jpg",
"currency": "usd",
"slug": "premium-arabica-coffee",
"active_from": "2026-02-01T00:00:00Z",
"active_until": "2026-03-01T00:00:00Z",
"redirect_url": "https://mysite.com/thank-you",
"terms_url": "https://mysite.com/terms",
"contact_email": "support@mysite.com",
"refund_days": 14,
"show_discount_field": true,
"delegable": true
}'
Response
Success Response (201)
Returns the created product with its empty variants array and all fields.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "published",
"name": "Premium Coffee Beans",
"description": "High-quality arabica coffee beans from Colombia",
"slug": "premium-arabica-coffee",
"image_url": "https://example.com/images/coffee-beans.jpg",
"checkout_url": "https://cart.easy.tools/checkout/550e8400-e29b-41d4-a716-446655440000",
"currency": "usd",
"file": null,
"files": [],
"active_from": "2026-02-01T00:00:00+00:00",
"active_until": "2026-03-01T00:00:00+00:00",
"show_active_until_counter": null,
"redirect_url": "https://mysite.com/thank-you",
"redirect_time": null,
"add_redirect_params": null,
"webhook_url": null,
"terms_url": "https://mysite.com/terms",
"policy_url": null,
"contact_email": "support@mysite.com",
"refund_days": 14,
"delegable": true,
"show_discount_field": true,
"hide_tax_id_field": false,
"require_tax_id": false,
"photo_zoomable": false,
"show_confetti": false,
"generate_qr_code": false,
"variants": []
}
Response Fields
See Get Product for a complete list of response fields.
Error Responses
Validation Error (422)
{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is required."
],
"status": [
"The status field must be one of: draft, published."
],
"currency": [
"The currency field must be exactly 3 characters."
]
}
}
Slug validation errors:
{
"message": "The given data was invalid.",
"errors": {
"slug": [
"The slug 'existing-slug' is already in use by another product."
]
}
}
{
"message": "The given data was invalid.",
"errors": {
"slug": [
"The slug field format is invalid."
],
"active_until": [
"The active until field must be a date after or equal to active from."
]
}
}