Create a feature directly inside an offering
POSThttps://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/features
After saving an offering, you can add new features to it at any time.
Request
Responses
- 201
- 400
- 403
- 404
- 409
- 500
Success. The feature is created.
Bad request. The request failed validation.
Forbidden. The operation is forbidden on this entity.
Not found. The requested entity does not exist.
Write conflict. Unable to perform the operation at this time.
Internal server error. There was a system failure in the platform.
Authorization: http
name: BearerTokentype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/features");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"subscription_offering_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());
ResponseClear