Skip to main content

Update dunning rule policy

PUT 

https://euwest.api.elasticpath.com/v2/subscriptions/dunning-rules/:dunning_rule_uuid

Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the rule is not updated. For fields that are optional, an existing value can be removed by specifying a value of null.

Request

Responses

Success. The dunning rule set has been updated.

Authorization: http

name: BearerTokentype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/v2/subscriptions/dunning-rules/:dunning_rule_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_dunning_rule\",\n \"attributes\": {\n \"payment_retry_type\": \"fixed\",\n \"payment_retry_interval\": 1,\n \"payment_retry_unit\": \"day\",\n \"payment_retry_multiplier\": 1,\n \"payment_retries_limit\": 5,\n \"action\": \"none\",\n \"default\": false\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": {
    "id": "11111111-2222-3333-4444-555555555555",
    "type": "subscription_dunning_rule",
    "attributes": {
      "payment_retry_type": "fixed",
      "payment_retry_interval": 1,
      "payment_retry_unit": "day",
      "payment_retry_multiplier": 1,
      "payment_retries_limit": 5,
      "action": "none",
      "default": false
    }
  }
}
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.