Update Product
Update an existing product in your easycart store. This endpoint uses PATCH semantics, meaning only the fields you include in the request body will be updated.
Request
PATCH /products/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Product UUID |
Request Body
All fields are optional. Only include the fields you want to update.
| Parameter | Type | Description |
|---|---|---|
name | string | Product name (max 255 characters) |
description | string | Product description (max 10,000 characters). Set to null to clear. |
slug | string | Custom URL slug. Must match pattern ^[a-z0-9-]+$ and be unique per store. |
image_url | string | URL to the product image (max 255 characters). Set to null to remove. |
file | object | Single downloadable file. Legacy shortcut equivalent to files: [file]. Set to null to remove. See File Object. |
files | array | Up to 5 downloadable files. Each entry is a File Object. When provided, this supersedes file and replaces the product's entire file set. Send [] to remove all files. |
active_from | string | Start selling date (ISO 8601 format). Set to null to clear. |
active_until | string | Stop selling date (ISO 8601 format). Set to null to clear. |
show_active_until_counter | boolean | Show countdown timer on checkout page |
redirect_url | string | Post-purchase redirect URL (max 1000 characters). Set to null to clear. |
redirect_time | integer | Redirect delay in seconds |
add_redirect_params | boolean | Include order parameters in redirect URL |
webhook_url | string | Webhook URL for order events. Set to null to use global webhook. |
terms_url | string | Terms & conditions URL. Set to null to clear. |
policy_url | string | Privacy policy URL. Set to null to clear. |
contact_email | string | Product contact email. Set to null to clear. |
refund_days | integer | Refund period in days. Set to 0 to disable refunds. |
delegable | boolean | Allow order delegation/gifting |
show_discount_field | boolean | Show promo code field on checkout page |
hide_tax_id_field | boolean | Hide tax ID field on checkout page |
require_tax_id | boolean | Require tax ID on checkout page |
photo_zoomable | boolean | Enable image zoom on checkout page |
show_confetti | boolean | Show confetti animation after purchase |
generate_qr_code | boolean | Generate QR code for product |
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. Updating files (or the legacy file) replaces the product's entire file set — include every file you want to keep. Send files: [] (or file: null) to remove all files.
Example Request
Update product name and description:
curl -X PATCH "https://cart.easy.tools/api/v1/products/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Product Name",
"description": "New and improved description"
}'
Update availability settings:
curl -X PATCH "https://cart.easy.tools/api/v1/products/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"active_from": "2026-02-01T00:00:00Z",
"active_until": "2026-03-01T00:00:00Z",
"show_active_until_counter": true
}'
Update checkout options:
curl -X PATCH "https://cart.easy.tools/api/v1/products/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"redirect_url": "https://mysite.com/thank-you",
"redirect_time": 5,
"add_redirect_params": true,
"show_discount_field": true,
"show_confetti": true
}'
Replace the product's downloadable files with multiple files:
curl -X PATCH "https://cart.easy.tools/api/v1/products/550e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"files": [
{ "name": "My ebook.pdf", "url": "https://mysite.com/ebook.pdf" },
{ "name": "Bonus chapter.pdf", "url": "https://mysite.com/bonus-chapter.pdf" }
]
}'
Response
Success Response (200)
Returns the updated product with all fields.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "published",
"name": "Updated Product Name",
"description": "New and improved description",
"slug": "premium-coffee-beans",
"image_url": "https://example.com/images/coffee-beans.jpg",
"checkout_url": "https://cart.easy.tools/checkout/550e8400-e29b-41d4-a716-446655440000",
"currency": "usd",
"file": {
"name": "My ebook.pdf",
"url": "https://mysite.com/ebook.pdf"
},
"files": [
{
"name": "My ebook.pdf",
"url": "https://mysite.com/ebook.pdf"
},
{
"name": "Bonus chapter.pdf",
"url": "https://mysite.com/bonus-chapter.pdf"
}
],
"active_from": "2026-02-01T00:00:00+00:00",
"active_until": "2026-03-01T00:00:00+00:00",
"show_active_until_counter": true,
"redirect_url": "https://mysite.com/thank-you",
"redirect_time": 5,
"add_redirect_params": true,
"webhook_url": null,
"terms_url": null,
"policy_url": null,
"contact_email": null,
"refund_days": 14,
"delegable": false,
"show_discount_field": true,
"hide_tax_id_field": false,
"require_tax_id": false,
"photo_zoomable": false,
"show_confetti": true,
"generate_qr_code": false,
"variants": [
{
"id": "550e8400-e29b-41d4-a716-446655440002",
"type": "one_time",
"recurring_options": null,
"name": "250g Package",
"amount": 1999
}
]
}
Response Fields
See Get Product for a complete list of response fields.
Error Responses
Bad Request (400)
{
"message": "Invalid product ID"
}
Product Not Found (404)
{
"message": "Product with ID <UUID> not found"
}
Validation Error (422)
{
"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."
]
}
}
Notes
- PATCH semantics: Only fields included in the request body are updated. Omitted fields remain unchanged.
- Null values: Setting a field to
nullwill clear its value (where applicable). - Downloadable files: A product supports up to 5 files. Sending
files(or the legacyfile) replaces the entire set, so include every file you want to keep. The response always returns bothfiles(the full list) andfile(the first entry, for backward compatibility). - Slug uniqueness: The
slugmust be unique within your store. The API will return a validation error if you try to use a slug that's already in use by another product. - Currency: The
currencyfield cannot be changed via this endpoint. To change a product's currency, you need to create a new product.