Skip to main content

Replace a product

PUT 

https://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/products/replace

After saving an offering, you can replace its products at any time.

Replacing products on 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 product is replaced 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/products/replace");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"products\": [\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": {
    "products": [
      "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.