Skip to main content
POST
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.

Query Parameters

tz
string

The time zone startsAt and endsAt are read in when they name none, as an IANA name. Left out, UTC.

Example:

"Europe/Berlin"

Body

application/json
kind
enum<string>
required

What kind of upsell it is. Set when it is made, and never changes.

Available options:
addon,
cart,
checkout,
together,
upgrade
name
string

Up to 80 characters. An add-on that is a plain extra needs one: it is what the buyer reads.

Example:

"Priority Setup"

sells
enum<string>
default:product

An add-on only: a plain extra, or one of the store's products.

Available options:
extra,
product
productId
string

What it sells, or for together what is shown. Not for a plain extra.

variantId
string

Which of the product's variants. Optional for together.

price
number

An add-on's price as an add-on, in the store's currency.

Example:

4.99

cost
number

A plain extra's cost for one, for Finance.

message
string

A plain extra's message to the buyer after payment, up to 2,000 characters.

offered
enum<string>
default:optional

An add-on: the buyer ticks it, it is ticked for them, or it is always in the order.

Available options:
optional,
ticked,
included
charged
enum<string>
default:order

An add-on: once an order, or for each unit of its line.

Available options:
order,
item
trigger
enum<string>
default:product

A cart or checkout offer: what it asks for in the cart.

Available options:
product,
category,
amount
minSubtotal
number

With trigger amount: the cart total it asks for.

discountType
enum<string>
default:none

A cart, checkout or upgrade offer: what it takes off its product, on that order only.

Available options:
none,
percent,
amount
discountValue
number

How much: above 0 and up to 100 for percent, an amount for amount.

targets
object[]

Up to 100. What an add-on is offered with (products or categories), what a cart or checkout offer asks for, what together is shown under and what an upgrade replaces (products).

words
string

The line over it where the buyer meets it, up to 80 characters. Left out, the buyer's language's own words.

startsAt
string

When it starts, as a date and time. Left out, now.

endsAt
string

When it ends, as a date and time. Left out, never.

firstOrders
boolean
default:false

A checkout offer only, since the checkout is where the buyer is known: offered only to a buyer who has never paid at the store.

hideOwned
boolean
default:false

A checkout offer only: not offered to a buyer who has bought it before.

enabled
boolean
default:true

Whether it is offered.

Response

It worked.

success
boolean
message
unknown
code
unknown
data
object