Change Product

Changes the product that the subscription is tied to.

History will be preserved: it will not affect past items (shipments).

This request must meet two conditions:

  1. The product ID that you are swapping to must already exist in Ordergroove.
  2. The subscription must be active (live) in order to swap it to a new product.

Additional Validations for Prepaid Subscriptions:

  • For prepaid subscriptions that have prepaid orders remaining, the product you are swapping to needs to have the same price as the current product. This ensures that the value and terms of the prepaid subscription are maintained without discrepancies.
  • If you want to allow customers to sku swap for products of lesser value you can contact Ordergroove support to enable it.
🔐

Authentication

✔️ Application API Scope

✔️ Storefront API Scope

Response Body Definitions

NameTypeDescriptionExample
customerstringCustomer ID"00026001"
merchantstringMerchant ID"ac4f7938383a11e89ecbbc764e1107f2"
productstringProduct ID"0070000693"
paymentstringPayment record ID"070001bc02fd11e99542bc764e1043b0"
shipping_addressstringShipping address record ID"66c25cd0564011e9abc5bc764e107990"
offerstringOffer ID"a748aa648ac811e8af3bbc764e106cf4"
subscription_typestringSubscription Type"Replenish"
componentsstringLegacy Bundle components"product_id_1,product_id_2"
componentsarray of objectsNew Bundle components (see example below)See Bundle Components Example
extra_datastringRaw JSON string for key/value store (see example below)See Extra Data Example
public_idstringSubscription ID"f9cb2f93e1c845eb9de9eff46ddb3cbf"
product_attributestringnull
quantityintegerNumber of items21
pricestringPrice"12.99"
frequency_daysintegerOrder placement interval in days42
reminder_daysintegerDays before order placement to email reminder (minimum of 5)42
everyintegerNumber of periods6
every_periodintegerType of period3
start_datestringDate of subscription start, in format YYYY-MM-DD"2019-07-21"
cancelledstringDate of subscription cancellation; null=not cancellednull
cancel_reasonstringPipe-delimited cancel reason code and cancel reason details"4|Overstocked"
cancel_reason_codestringCancel reason code"4"
iterationstringDeprecated
sequencestringDeprecated
session_idstringSession ID, obtained from og_session_id cookie"ac4f7938383a11e89ecbbc764e1107f2.896371.1539022086"
merchant_order_idstringOrder ID in your system"301617"
customer_repstringDeprecated
clubstringDeprecated
createdstringDate created"2017-02-29 12:00:00"
updatedstringDate updated"2017-02-29 12:00:00"
livebooleantrue=active subscription; false=inactive subscriptiontrue
prepaid_subscription_contextobjectPrepaid information (see example below). Returned only if prepaid is enabledSee Prepaid Context Example

Bundle Components Example

New Bundle components structure:

[
  {
    "public_id": "79d2dc76245111eeb185acde48001122",
    "quantity": 1,
    "product": "0070067690"
  },
  {
    "public_id": "7eeaa504245111eeb185acde48001122",
    "quantity": 3,
    "product": "0070067691"
  }
]

Component object properties:

  • public_id (string): Component public ID
  • quantity (integer): Quantity of the component
  • product (string): Product ID

Extra Data Example

Raw JSON string that should be JSON.parse() as key/value store for any extra information:

{
  "some": "extra",
  "fields": "here"
}

Prepaid Context Example

Prepaid subscription information:

{
  "prepaid_orders_remaining": 0,
  "prepaid_orders_per_billing": 3,
  "renewal_behavior": "autorenew",
  "last_renewal_revenue": 100.8,
  "prepaid_origin_merchant_order_id": "#3082"
}

For more details, see Prepaid Subscriptions Data.

Language