Skip to main content
POST
/
api
/
public
/
v1
/
offers
/
create
Create offer
curl --request POST \
  --url http://app.localhost:3000/api/public/v1/offers/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "offerTitle": "<string>",
  "enabled": true,
  "triggers": [
    {
      "productId": "<string>"
    }
  ],
  "offers": [
    {
      "productId": "<string>",
      "variantId": "<string>",
      "priceId": "<string>",
      "title": "<string>",
      "titleTrans": {}
    }
  ],
  "orderBumpOffers": [
    {
      "productId": "<string>",
      "variantId": "<string>",
      "priceId": "<string>",
      "precheck": true,
      "overrideImageUrl": "<string>",
      "id": "<string>",
      "quantity": 1,
      "titleTrans": {},
      "descriptionTrans": {},
      "displayPrice": true,
      "displayCompareAtPrice": false,
      "compareAtPriceDiscount": 20,
      "rules": []
    }
  ],
  "storeId": "<string>"
}
'
{
  "message": "<string>",
  "code": "<string>",
  "issues": [
    {
      "message": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
offerTitle
string
required
Minimum string length: 1
enabled
boolean
required
type
enum<string>
required
Available options:
orderbump,
upsell
triggers
object[]
required
offers
object[]
required
orderBumpOffers
object[]
required
storeId
string
required

Response

Successful response