🔌 API Developer Hub

WeUpsell API Reference

Integrate, custom-merchandise, and automate personalized product recommendation offers programmatically using our web APIs.

v1.0.4 Stable

Introduction

The WeUpsell API is structured around REST principles. All request bodies should be formatted as JSON payload values, and all responses return standard JSON structures with conventional HTTP response status codes.

Using this documentation, you can manage active recommendation widgets, push cart tracking events directly from non-Shopify checkouts, and generate dynamic AI recommendation sets based on custom shopping carts.

Authentication

All REST API calls must include your account API Key inside the `X-WeUpsell-API-Key` request header. Your API Key can be retrieved from your WeUpsell Admin dashboard under Settings > Developers. Keep your keys secret!

bash
curl -X GET "https://api.weupsell.com/v1/offers" \
  -H "X-WeUpsell-API-Key: ws_live_1a2b3c4d5e6f7g8h9i"

Javascript SDK

To load WeUpsell widgets on custom storefront themes (headless BigCommerce, custom Astro, or headless Shopify), drop our helper client script inside the document head:

html
<script 
  src="https://cdn.weupsell.com/sdk/client.js" 
  async 
  data-weupsell-id="store_abc123"
></script>

List Active Offers

Retrieve a list of all configured recommendation and upsell offers active on the account.

GET/v1/offers
List active upsell campaigns.

Query Parameters

ParameterTypeRequiredDescription
typestringNoFilter by widget placement (e.g. `product-page`, `checkout`).
limitintegerNoNumber of offers to return. Default is `20`, max is `100`.

Response Example

json
{
  "status": "success",
  "data": [
    {
      "id": "off_01",
      "title": "Frequently Bought Together",
      "type": "product-page",
      "status": "active"
    }
  ]
}

Create Offer

Create a new recommendation campaign or upsell offer.

POST/v1/offers
Create a new upsell rule configuration.

Request Body

FieldTypeRequiredDescription
titlestringYesThe name of the campaign.
typestringYesWidget position (e.g. `cart-drawer`).

Response Example

json
{
  "status": "success",
  "message": "Offer created successfully",
  "id": "off_02"
}

Update Offer

Modify an existing offer config or change its status (active/paused).

PUT/v1/offers/{id}
Update campaign details.

Delete Offer

Delete an offer permanently from your store settings.

DELETE/v1/offers/{id}
Delete campaign.