Automatic Renewal Enrollment Campaigns
Retrieve the list of active automatic renewal enrollment campaigns a subscription is eligible for. A subscription is eligible when AR is disabled, the subscription is active, and there is at least one active enrollment campaign for its product. The eligibility criteria are the same as in the MyAccount enrollment flow. If several campaigns are active at the same time for the same product, all of them are returned and the vendor decides which one to display. Non-recurring subscriptions return an empty array.
Unique, system-generated subscription identifier.
48F5AC7011application/jsonExample: application/jsonPossible values: Authentication header
code=\"{VENDOR_CODE}\" date=\"{REQUEST_DATE_TIME}\" hash=\"{HASH}\"Successful response
Unique, system-generated campaign identifier.
Campaign name.
True if the campaign is valid for catalog prices only.
Invalid subscription
GET /rest/6.0/subscriptions/{SubscriptionReference}/enrollment-campaigns/eligible/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code=\"{VENDOR_CODE}\" date=\"{REQUEST_DATE_TIME}\" hash=\"{HASH}\"
[
{
"Code": "IHMMYIAZULAZDHZGOLIY",
"Name": "AR enrollment 20% off",
"RestrictedToCatalogPrices": false,
"OfferDiscount": {
"Discount": 20,
"DiscountType": "PERCENT",
"BillingCycles": "1"
}
}
]Record the shopper's intent when they interact with an enrollment offer (a DISPLAY impression). The event stays recorded even if the shopper does not accept the discount. This call does not create a custom renewal price. The discount is applied only when the accept-discount endpoint is called. Recorded events are available in the retention tools enrollment and cancellation reports.
Unique, system-generated subscription identifier.
48F5AC7011Unique, system-generated enrollment campaign identifier.
IHMMYIAZULAZDHZGOLIYapplication/jsonExample: application/jsonPossible values: Authentication header
code=\"{VENDOR_CODE}\" date=\"{REQUEST_DATE_TIME}\" hash=\"{HASH}\"OK
Invalid campaign or subscription
POST /rest/6.0/subscriptions/{SubscriptionReference}/enrollment-campaigns/{CampaignCode}/enter/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code=\"{VENDOR_CODE}\" date=\"{REQUEST_DATE_TIME}\" hash=\"{HASH}\"
trueEnable automatic renewal and apply the discount from an enrollment campaign for a specific subscription. The campaign is re-validated server-side at request time, even if the eligible campaigns endpoint was not called first. The discount is saved as a custom renewal price. Any existing discount from a previous campaign is replaced, not stacked. On success, the LCN notification LICENCE_AR_ENROLLMENT_CAMPAIGN_ACCEPTED is dispatched (if enabled in cPanel LCN settings) and a confirmation email is sent to the shopper.
Unique, system-generated subscription identifier.
48F5AC7011Unique, system-generated enrollment campaign identifier.
IHMMYIAZULAZDHZGOLIYapplication/jsonExample: application/jsonPossible values: Authentication header
code=\"{VENDOR_CODE}\" date=\"{REQUEST_DATE_TIME}\" hash=\"{HASH}\"OK
Invalid campaign or subscription
POST /rest/6.0/subscriptions/{SubscriptionReference}/enrollment-campaigns/{CampaignCode}/accept-discount/ HTTP/1.1
Host: api.2checkout.com
Accept: application/json
X-Avangate-Authentication: code=\"{VENDOR_CODE}\" date=\"{REQUEST_DATE_TIME}\" hash=\"{HASH}\"
trueLast updated
Was this helpful?