Reference · Library
PATCH/products/{productId}
Change a product: its words, its price, its pictures
Change one of the person's products, as its page does: any of its words, its price, its brand kit, and its pictures — added (links, or their own files' keys), taken off, or another made its main one. Only what is sent changes. Free (no credits). Read it first with GET /api/v1/products (its pictures’ imageKey).
- Key needs
create· Make things and spend credits- Spends
- Nothing
- Answers
- Data
Request
curl -X PATCH https://vessero.com/api/v1/products/5e4d3c2b-1a0f-4e9d-8c7b-6a5f4e3d2c1b \ -H "Authorization: Bearer $VESSERO_API_KEY" \ -H "Idempotency-Key: 47f8f6f5-ea00-4fb1-925f-76aac956a0ec" \ -H "Content-Type: application/json" \ -d '{ "price": 29, "addPictures": [ "https://example.com/products/glow-serum-box.jpg" ] }'
Path
- productIdstringrequired—
Header
- Idempotency-KeystringYour id for this request: 8–64 letters, digits, - or _. A repeat within 10 minutes gets the first answer back and never runs twice. Use the same one for the quote and the run.
Body
- titlestringIts new name.
- descriptionstringWhat it is, in a few sentences: what the ads, the board and the Creative Director read about it.
- pricenumber | nullIts price, in the currency’s own units, e.g. 49.9; null for none.
- compareAtPricenumber | nullWhat it cost before a sale, shown struck through; null for none.
- currencystringThe price’s currency, by its three-letter code, e.g. "USD" (the default) or "EUR".
- benefitsstring[] · up to 60What it does for the buyer, one each, e.g. "Keeps you cool on hot days".
- sellingPointsstring[] · up to 60What sets it apart, one each, e.g. "100% European linen".
- audiencestring | nullWho it is for, e.g. "Men 25–45 who travel for work".
- brandIdstring | nullThe brand kit it belongs to (GET /api/v1/boards/guide lists theirs); null for none.
- sourceUrlstring · https | nullIts page on their shop, kept as its link. A product already at this link is the one changed, never a second one.
- addPicturesstring[] · up to 8Pictures to add after its own, up to 8 in all.
- removePicturesstring[] · up to 8Pictures to take off it, by their imageKey.
- mainPicturestringThe picture to make its main one, by its imageKey.
Answers
- 200okWhat it did, as data.
- 400invalid_requestA field is missing or not accepted: see details.
- 404not_foundNot found on this account.
- 403feature_unavailableThe studio this needs is switched off for the account right now.