Update Prepaid Subscription

This endpoint will allow you to modify the number of orders remaining, the number of orders per billing, and the renewal behavior for a prepaid subscription at any time during the lifecycle of the prepaid subscription

patch/subscriptions/{subscription_id}/update_prepaid_context/

Request

  • Base URL
    https://restapi.ordergroove.com
  • Auth
    • none
    • or API key in header x-api-key

Path parameters

subscription_idstring required

Unique subscription ID

Request body

orders_per_billinginteger

A number greater than 1

orders_remaininginteger

A number greater than or equal to 0

renewal_behavior'autorenew' | 'cancel' | 'downgrade'

Response

200

customerstring
merchantstring
productstring
paymentstring
shipping_addressstring
offerstring
subscription_typestring
raw_subscription_typestring
componentsobject[]
public_idstring
quantityinteger
priceunknown
frequency_daysinteger
reminder_daysinteger
everyinteger
every_periodinteger
start_datestring
cancelledunknown
cancel_reasonunknown
iterationunknown
sequenceunknown
session_idstring
merchant_order_idstring
createdstring
updatedstring
liveboolean
external_idstring
product_attributeunknown
cancel_reason_codeunknown
customer_repunknown
clubunknown
queued_actionsobject[]

Example response

{
  "customer": "{customer_id}",
  "merchant": "{merchant_id",
  "product": "{product_id}",
  "payment": "{payment_id}",
  "shipping_address": "{shipping_address_id}",
  "offer": "{offer_id}",
  "subscription_type": "replenishment",
  "raw_subscription_type": "replenishment",
  "extra_data": {
    "shopify_contract_id": "gid://shopify/SubscriptionContract/{shopify_contract_id}"
  },
  "public_id": "{public_id}",
  "quantity": 1,
  "frequency_days": 30,
  "reminder_days": 4,
  "every": 1,
  "every_period": 3,
  "start_date": "2023-05-30",
  "session_id": "{session_id}",
  "merchant_order_id": "#1144",
  "created": "2023-05-30 13:20:41",
  "updated": "2023-10-03 10:22:11",
  "live": true,
  "external_id": "{external_id",
  "prepaid_subscription_context": {
    "prepaid_orders_remaining": 4,
    "prepaid_orders_per_billing": 6,
    "renewal_behavior": "autorenew"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.