patch https://restapi.ordergroove.com/subscriptions//update/
Updates the "extra_data", "price", "components", "offer", and "cancel_reason" fields.
Update Endpoint
📋 Authentication
✔️ Application API Scope
✔️ Storefront API Scope
Note: Application API Scope is required to update the price or components values.
Important: New Bundle Components should not be updated using this endpoint.
Response Body Definitions
| Name | Type | Description | Example |
|---|---|---|---|
| customer | string | Customer ID | "00026001" |
| merchant | string | Merchant ID | "ac4f7938383a11e89ecbbc764e1107f2" |
| product | string | Product ID | "0070000693" |
| payment | string | Payment record ID | "070001bc02fd11e99542bc764e1043b0" |
| shipping_address | string | Shipping address record ID | "66c25cd0564011e9abc5bc764e107990" |
| offer | string | Offer ID | "a748aa648ac811e8af3bbc764e106cf4" |
| subscription_type | string | Subscription Type | "Replenish" |
| components | string | Legacy Bundle components | See Legacy Bundle Components below |
| components | array of objects | New Bundle components | See New Bundle Components below |
| extra_data | JSON | JSON object that should be JSON.parse() as key/value store for any extra information | {"some": "extra", "fields": "here"} |
| public_id | string | Subscription ID | "f9cb2f93e1c845eb9de9eff46ddb3cbf" |
| product_attribute | string | "null" | |
| quantity | integer | Number of items | 21 |
| price | string | Price | "12.99" Note: subscription.price accepts $0.00. Ordergroove sets the subscription price and updates future orders according to the price. |
| frequency_days | integer | Order placement interval in days | 42 |
| reminder_days | integer | Days before order placement to email reminder (minimum of 5) | 42 |
| every | integer | Number of periods | 6 |
| every_period | integer | Type of period | 3 |
| start_date | string | Date of subscription start, in format YYYY-MM-DD | "2019-07-21" |
| cancelled | string | Date of subscription cancellation; null=not cancelled | "null" |
| cancel_reason | string | Pipe-delimited cancel reason code and cancel reason details | "4|Overstocked" |
| cancel_reason_code | string | Cancel reason code | "4" |
| string | Deprecated | ||
| string | Deprecated | ||
| session_id | string | Session ID, obtained from og_session_id cookie | "ac4f7938383a11e89ecbbc764e1107f2.896371.1539022086" |
| merchant_order_id | string | Order ID in your system | "301617" |
| string | Deprecated | ||
| string | Deprecated | ||
| created | string | Date created | "2017-02-29 12:00:00" |
| updated | string | Date updated | "2017-02-29 12:00:00" |
| live | boolean | true=active subscription; false=inactive subscription | true |
| external_id | string | External subscription ID. Shopify subscription contract | "gid://shopify/SubscriptionContract/10831298836" or "{external_id}" |
| prepaid_subscription_context | object | Prepaid information - Returned only if prepaid is enabled | See Prepaid Subscription Context below |
Legacy Bundle Components
"components": [
{"product": "123"},
{"product": "456"},
{"product": "789"}
]New Bundle Components
Type: Array of objects with structure: {public_id: string, quantity: integer, product: string}
[
{
"public_id": "79d2dc76245111eeb185acde48001122",
"quantity": 1,
"product": "0070067690"
},
{
"public_id": "7eeaa504245111eeb185acde48001122",
"quantity": 3,
"product": "0070067691"
}
]Prepaid Subscription Context
{
"prepaid_orders_remaining": 0,
"prepaid_orders_per_billing": 3,
"renewal_behavior": "autorenew",
"last_renewal_revenue": 100.8,
"prepaid_origin_merchant_order_id": "#3082"
}If prepaid is not enabled, this will return an empty object: {}
