v1

latestOpenAPI 3.1.02026-07-24920300.7 KB

Create in Order

Creates a subscription with its first shipment in an existing order (dictated by the 'order' field in the request). This will be tracked by OrderGroove as an 'Impulse Upsell' order.

post/subscriptions/iu/

Request body

merchantstring required

Merchant ID

customerstring required

Customer ID

productstring required

Product ID

pricestring

Price of subscription. To be used with Price Lock.

offerstring required

Offer ID

orderstring required

Order ID

session_idstring required

Session ID, obtained from og_session_id cookie

paymentstring required

Payment record ID

shipping_addressstring required

Shipping address record ID

quantityinteger required

Number of items

everyinteger required

Number of periods

every_periodinteger required

Type of period

extra_datastring json

{"cat_name": "Charlie"}

Response

200

public_idstring
{"stackTrail":"paths:/subscriptions/iu/:post:responses:200:content:application/json:schema:properties:product_attribute","oasType":"schema","type":"unknown"}
pricestring
frequency_daysinteger
reminder_daysinteger
start_datestring
{"stackTrail":"paths:/subscriptions/iu/:post:responses:200:content:application/json:schema:properties:cancelled","oasType":"schema","type":"unknown"}
cancel_reason_codestring
cancel_reasonstring
merchant_order_idstring
subscription_typestring
createdstring
updatedstring
extra_datastring
livestring

Example response

{
  "public_id": "f9cb2f93e1c845eb9de9eff46ddb3cbf",
  "price": "12.99",
  "frequency_days": 42,
  "reminder_days": 42,
  "start_date": "2017-02-29 12:00:00",
  "cancel_reason_code": "4|",
  "cancel_reason": "4|Overstocked",
  "merchant_order_id": "301617",
  "subscription_type": "Replenish",
  "components": [
    {
      "product": "product_id_1"
    }
  ],
  "created": "2017-02-29 12:00:00",
  "updated": "2017-02-29 12:00:00",
  "extra_data": "{\"some\": \"extra\", \"fields\": \"here\"}",
  "live": "True"
}