> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/api-reference/reference/automatic-renewal-enrollment-campaigns.md).

# Automatic Renewal Enrollment Campaigns

## Retrieve enrollment campaigns for a subscription

> 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.<br>

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/enrollment-campaigns/eligible/":{"get":{"tags":["Automatic renewal enrollment campaigns"],"summary":"Retrieve enrollment campaigns for a subscription","description":"Retrieve the list of active automatic renewal enrollment campaigns a subscription is eligible for.\nA 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.\nIf 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.\nNon-recurring subscriptions return an empty array.\n","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEligibleEnrollmentCampaignsResponse"}}}},"400":{"description":"Invalid subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"GetEligibleEnrollmentCampaignsResponse":{"type":"array","items":{"type":"object","properties":{"Code":{"type":"string","description":"Unique, system-generated campaign identifier."},"Name":{"type":"string","description":"Campaign name."},"RestrictedToCatalogPrices":{"type":"boolean","description":"True if the campaign is valid for catalog prices only."},"OfferDiscount":{"type":"object","nullable":true,"properties":{"Discount":{"type":"number","format":"double","description":"Discount value."},"DiscountType":{"type":"string","description":"Type of the discount.","enum":["PERCENT"]},"BillingCycles":{"type":"string","description":"Number of renewal cycles the discount applies to. Returns \"ALL\" when the discount applies to all cycles."}}}}}},"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Enter enrollment campaign

> 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.<br>

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/enrollment-campaigns/{CampaignCode}/enter/":{"post":{"tags":["Automatic renewal enrollment campaigns"],"summary":"Enter enrollment campaign","description":"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.\nThis call does not create a custom renewal price. The discount is applied only when the accept-discount endpoint is called.\nRecorded events are available in the retention tools enrollment and cancellation reports.\n","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"CampaignCode","in":"path","description":"Unique, system-generated enrollment campaign identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid campaign or subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```

## Accept enrollment campaign for a subscription

> Enable 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.<br>

```json
{"openapi":"3.0.0","info":{"title":"API REST Documentation","version":"6.0-oas3"},"servers":[{"url":"https://api.2checkout.com/rest/6.0"}],"paths":{"/subscriptions/{SubscriptionReference}/enrollment-campaigns/{CampaignCode}/accept-discount/":{"post":{"tags":["Automatic renewal enrollment campaigns"],"summary":"Accept enrollment campaign for a subscription","description":"Enable automatic renewal and apply the discount from an enrollment campaign for a specific subscription.\nThe campaign is re-validated server-side at request time, even if the eligible campaigns endpoint was not called first.\nThe discount is saved as a custom renewal price. Any existing discount from a previous campaign is replaced, not stacked.\nOn 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.\n","parameters":[{"name":"Accept","in":"header","required":true,"style":"simple","explode":false,"schema":{"type":"string","default":"application/json","enum":["application/json"]}},{"name":"X-Avangate-Authentication","in":"header","description":"Authentication header","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"SubscriptionReference","in":"path","description":"Unique, system-generated subscription identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"CampaignCode","in":"path","description":"Unique, system-generated enrollment campaign identifier.","required":true,"style":"simple","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{}}},"400":{"description":"Invalid campaign or subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"inline_response_400":{"type":"object","properties":{"error_code":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.2checkout.com/api-reference/reference/automatic-renewal-enrollment-campaigns.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
