Skip to main content

Attach a plan

POST 

https://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/plans/attach

After saving an offering, you can attach new plans to it at any time.

Attaching new plans to an offering does not affect any existing active subscriptions. The changes take effect on all new subscriptions that are created.

Request

Responses

Success. The subscription plan is attached with the offering.

Authorization: http

name: BearerTokentype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/plans/attach");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"plans\": [\n \"11111111-2222-3333-4444-555555555555\"\n ]\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://euwest.api.elasticpath.com/v2
Auth
Parameters
— pathrequired
Body
{
  "data": {
    "plans": [
      "11111111-2222-3333-4444-555555555555"
    ]
  }
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.