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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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 componentsSee Legacy Bundle Example
componentsarray of objectsNew Bundle components - See structure belowSee New Bundle Example
extra_datastringRaw JSON string that should be JSON.parse() as key/value store for any extra information."{\"some\": \"extra\", \"fields\": \"here\"}"
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 cancelled.null
cancel_reasonstringPipe-delimited cancel reason code and cancel reason details"4|Overstocked"
cancel_reason_codestringCancel reason code"4"
currency_codestringThree letter ISO currency code"USD"
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 - Returned only if prepaid is enabledSee Prepaid Context Example

Legacy Bundle Example

[{"product": "product_id_1"}]

New Bundle Example

New Bundle components structure: Each component object contains public_id (string), quantity (integer), and product (string).

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

Prepaid Context Example

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

Or empty object: {}

Body Params
string
required

Merchant ID

string
required

Customer ID

string
required

Product ID

string

Price of subscription. To be used with Price Lock.

string
required

Offer ID

string
required

Order ID

string
required

Session ID, obtained from og_session_id cookie

string
required

Payment record ID

string
required

Shipping address record ID

int32
required

Number of items

int32
required

Number of periods

int32
required

Type of period

json

{"cat_name": "Charlie"}

components
array of objects

Multi Item Bundle components: [{"product":"public_id_abc", "quantity": 2}], Legacy Bundle components: [{"product":"public_id_abc"}]

components
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain