Skip to main content

Create a feature

POST 

https://euwest.api.elasticpath.com/v2/subscriptions/features

Create a feature

Request

Responses

Success. The feature is created.

Authorization: http

name: BearerTokentype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://euwest.api.elasticpath.com/v2/subscriptions/features");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"subscription_feature\",\n \"attributes\": {\n \"external_ref\": \"abc123\",\n \"name\": \"Digital library access\",\n \"description\": \"Access to over 100 ebooks via the digital library.\",\n \"configuration\": {\n \"type\": \"access\",\n \"tag\": \"digital_library_access\"\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
— query
Body
{
  "data": {
    "type": "subscription_feature",
    "attributes": {
      "external_ref": "abc123",
      "name": "Digital library access",
      "description": "Access to over 100 ebooks via the digital library.",
      "configuration": {
        "type": "access",
        "tag": "digital_library_access"
      }
    }
  }
}
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.