Skip to main content
PUT
Update product

📌 Endpoint

PUT /stores/{storeId}/products/{productId} Updates the data of an existing product.

🔐 Authentication

  • Private route.
  • Requires header Authorization with your API key and active plan.

🧾 Route parameters


🧍 Body (JSON)

All fields are optional (sending null leaves the field unchanged), but must follow the rules below when sent:
  • name (3-32)
  • image (string up to 512 characters; sending "" clears the image, while null leaves it unchanged)
  • description (12-256)
  • categoryIds (array of category IDs from the store)
  • delivery (DIGITAL or PHYSICAL)
  • price (0.5 to 9999)
  • stock (integer -1 to 9999, -1 unlimited)
  • disabled (true or false)
  • position (integer greater than or equal to 1)
  • metadata (object)

✅ Example request


Standard snippet (cURL)

Use the cURL example from the Request example section above as the official snippet.

📦 Success response (200)


⚠️ Possible errors

  • 400 INVALID_DATA → invalid body, parameters, or categoryIds item
  • 400 INVALID_DATA_NAME_MIN → name shorter than 3 characters
  • 400 INVALID_DATA_NAME_MAX → name longer than 32 characters
  • 400 INVALID_DATA_IMAGE → image longer than 512 characters
  • 400 INVALID_DATA_DESCRIPTION_MIN → description shorter than 12 characters
  • 400 INVALID_DATA_DESCRIPTION_MAX → description longer than 256 characters
  • 400 INVALID_DATA_DELIVERY → delivery other than DIGITAL or PHYSICAL
  • 400 INVALID_DATA_PRICE → price outside 0.5 to 9999
  • 400 INVALID_DATA_STOCK → stock outside -1 to 9999
  • 400 INVALID_DATA_POSITION → position less than 1
  • 400 CATEGORY_NOT_FOUND → one or more categories in categoryIds not found in the store
  • 400 NAME_ALREADY_EXISTS → name already in use
  • 401 API_KEY_NOT_PROVIDED → Authorization header not sent (or TOKEN_NOT_PROVIDED via Bearer)
  • 401 INVALID_API_KEY → invalid API Key (or INVALID_TOKEN / TOKEN_EXPIRED / SESSION_NOT_FOUND / SESSION_EXPIRED / UNAUTHENTICATED via Bearer)
  • 403 USER_DISABLED → user disabled or deleted
  • 403 NO_ACTIVE_SUBSCRIPTION → inactive or expired plan (or PENDING_2FA via Bearer)
  • 404 STORE_NOT_FOUND → store not found
  • 404 PRODUCT_NOT_FOUND → product not found
  • 429 RATE_LIMIT_EXCEEDED → rate limit per minute exceeded
  • 500 INTERNAL_SERVER_ERROR → internal error
  • 503 SERVICE_UNAVAILABLE → service or database unavailable

Authorizations

Authorization
string
header
default:YOUR_API_KEY_HERE
required

Path Parameters

storeId
string
required
Required string length: 1 - 50
productId
string
required
Required string length: 1 - 50

Body

application/json

Product fields to update.

name
string
Required string length: 3 - 32
image
string | null
Maximum string length: 512
description
string
Required string length: 12 - 256
categoryIds
string[]
Required string length: 1 - 50
delivery
enum<string>
Available options:
DIGITAL,
PHYSICAL
price
number
Required range: 0.5 <= x <= 9999
stock
integer
Required range: -1 <= x <= 9999
position
integer
Required range: x >= 1
metadata
object
disabled
boolean

Response

Update product.

code
string
required
Example:

"SUCCESS"

product
object
required

Store product.