Skip to main content

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

ParameterTypeRequiredDescription
idstringYesProduct UUID

Request Body

All fields are optional. Only include the fields you want to update.

ParameterTypeDescription
namestringProduct name (max 255 characters)
descriptionstringProduct description (max 10,000 characters). Set to null to clear.
slugstringCustom URL slug. Must match pattern ^[a-z0-9-]+$ and be unique per store.
image_urlstringURL to the product image (max 255 characters). Set to null to remove.
fileobjectSingle downloadable file. Legacy shortcut equivalent to files: [file]. Set to null to remove. See File Object.
filesarrayUp 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_fromstringStart selling date (ISO 8601 format). Set to null to clear.
active_untilstringStop selling date (ISO 8601 format). Set to null to clear.
show_active_until_counterbooleanShow countdown timer on checkout page
redirect_urlstringPost-purchase redirect URL (max 1000 characters). Set to null to clear.
redirect_timeintegerRedirect delay in seconds
add_redirect_paramsbooleanInclude order parameters in redirect URL
webhook_urlstringWebhook URL for order events. Set to null to use global webhook.
terms_urlstringTerms & conditions URL. Set to null to clear.
policy_urlstringPrivacy policy URL. Set to null to clear.
contact_emailstringProduct contact email. Set to null to clear.
refund_daysintegerRefund period in days. Set to 0 to disable refunds.
delegablebooleanAllow order delegation/gifting
show_discount_fieldbooleanShow promo code field on checkout page
hide_tax_id_fieldbooleanHide tax ID field on checkout page
require_tax_idbooleanRequire tax ID on checkout page
photo_zoomablebooleanEnable image zoom on checkout page
show_confettibooleanShow confetti animation after purchase
generate_qr_codebooleanGenerate QR code for product

File Object

ParameterTypeRequiredDescription
namestringYesDisplay name shown in the customer portal (max 100 characters)
urlstringYesExternal 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 null will clear its value (where applicable).
  • Downloadable files: A product supports up to 5 files. Sending files (or the legacy file) replaces the entire set, so include every file you want to keep. The response always returns both files (the full list) and file (the first entry, for backward compatibility).
  • Slug uniqueness: The slug must 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 currency field cannot be changed via this endpoint. To change a product's currency, you need to create a new product.