Skip to main content

Updates a plan in an offering

PUT 

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

Updates a plan in an offering

Request

Responses

Success. The plan details are updated on the offering.

Authorization: http

name: BearerTokentype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/plans/:plan_uuid");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"id\": \"11111111-2222-3333-4444-555555555555\",\n \"type\": \"subscription_offering_plan\",\n \"attributes\": {\n \"external_ref\": \"abc123\",\n \"name\": \"Monthly\",\n \"description\": \"A monthly subscription.\",\n \"billing_interval_type\": \"month\",\n \"billing_frequency\": 1,\n \"trial_period\": 7,\n \"plan_length\": 12,\n \"end_behavior\": \"close\",\n \"can_pause\": false,\n \"can_resume\": false,\n \"can_cancel\": false,\n \"base_price_percentage\": 90,\n \"fixed_price\": {\n \"USD\": {\n \"amount\": 100,\n \"includes_tax\": false\n },\n \"GBP\": {\n \"amount\": 90,\n \"includes_tax\": true\n }\n }\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
— pathrequired
Body
{
  "data": {
    "id": "11111111-2222-3333-4444-555555555555",
    "type": "subscription_offering_plan",
    "attributes": {
      "external_ref": "abc123",
      "name": "Monthly",
      "description": "A monthly subscription.",
      "billing_interval_type": "month",
      "billing_frequency": 1,
      "trial_period": 7,
      "plan_length": 12,
      "end_behavior": "close",
      "can_pause": false,
      "can_resume": false,
      "can_cancel": false,
      "base_price_percentage": 90,
      "fixed_price": {
        "USD": {
          "amount": 100,
          "includes_tax": false
        },
        "GBP": {
          "amount": 90,
          "includes_tax": true
        }
      }
    }
  }
}
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.