Skip to main content

Attach a product

POST 

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

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

Adding new products 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 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/products/attach");
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.