Skip to main content
PUT
Node.js

Authorizations

Authorization
string
header
required

A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...

Headers

Idempotency-Key
string

A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.

Path Parameters

storeId
string
required

The store's ID. A key reaches the store it was made in: GET /key answers which.

productId
string
required

The product.

Body

application/json
name
string
required

The product's name.

Example:

"Pro licence"

variants
object[]
required

The product's options, 1 to 100 of them, in the order buyers see them. A variant of the product that is not in this list is removed.

slug
string

The last part of its address on the storefront. Left out, it is made from the name.

description
string

What the product page says. Plain text with a few marks: a line that starts with # is a heading, one that starts with - is a point of a list, a blank line ends a paragraph, and **bold** and backticks for code work inside a line.

visibility
enum<string>
default:public

public is listed and can be bought. unlisted can be bought by whoever has its link. private cannot be bought.

Available options:
public,
unlisted,
private
deliveryInstructions
string

Text sent to the buyer with every variant of the product once the order is paid, whatever the variant delivers, up to 5,000 characters. A variant's own instructions are sent after it. Empty is none. Left out on an update, it stays as it is.

categoryIds
string[]

The categories it is in. Left out on an update, they stay as they are.

isBestSeller
boolean
default:false

Whether the storefront marks it as a best seller.

badges
object[]

Up to 3 short labels on the product. Left out on an update, they stay as they are.

features
object[]

What the product does, as a list. Each entry is a feature on its own or a named group of features. Up to 500 features and 30 groups. Left out on an update, they stay as they are.

blockedPaymentMethods
string[]

Payment methods the product cannot be bought with, by their names in the payment methods list. Left out on an update, they stay as they are.

paymentFees
object

What a payment method adds to this product's price: a payment method's name, and under it percent and fixed. A fee can only add. Left out on an update, the fees stay as they are.

Example:
salesWindow
enum<string>
default:all

The period the storefront's "sold" figure for this product counts.

Available options:
all,
1h,
6h,
12h,
24h,
7d,
30d
metadata
object

Anything of your own to keep with the product, as JSON. Shoply stores it and does nothing with it. It is answered as text.

seoTitle
string

The product's own title in search results, up to 70 characters. Empty is its name.

seoDescription
string

Its own description in search results, up to 200 characters. Empty is its description.

expectedUpdatedAt
string

The updatedAt you last read. Sent, the change is refused with stale_write if the record has changed since. Left out, it is saved whatever happened in between.

Response

It worked.

success
boolean
message
unknown
code
unknown
data
object