Skip to main content

Updates a feature in an offering

PUT 

https://euwest.api.elasticpath.com/v2/subscriptions/offerings/:offering_uuid/features/:feature_uuid

Use the unique identifier of the feature in the offering that you want to update. Any modifications that you make to the features in an offering, does not affect any active subscriptions. The changes take effect on all new subscriptions that are created.

Request

Path Parameters

    offering_uuid UUIDrequired

    The unique identifier of the offering.

    feature_uuid UUIDrequired

    The unique identifier of the feature.

Body

    data OfferingFeatureUpdaterequired
    idUUID (string)required

    The unique identifier.

    Example: 11111111-2222-3333-4444-555555555555
    typeSubscriptionOfferingFeatureType (string)required

    Possible values: [subscription_offering_feature]

    Example: subscription_offering_feature
    attributes FeatureUpdateAttributesrequired
    external_refExternalRefUpdate (string)nullable

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

    Possible values: <= 2048 characters

    Example: abc123
    namestring

    The name of the feature.

    Possible values: >= 3 characters and <= 1024 characters

    Example: Digital library access
    descriptionstringnullable

    The feature description to display to customers.

    Possible values: <= 1024 characters

    Example: Access to over 100 ebooks via the digital library.
    configuration object
    typerequired

    Possible values: [access, promotion, usage]

    tagFeatureTag (string)required

    A tag to add to the customer's account when entitled to the feature.

    Possible values: non-empty and <= 64 characters, Value must match regular expression ^[0-9A-Za-z_-]+$

    Example: digital_library_access

Responses

Success. The feature details are updated on the offering.

Schema
    data Feature
    idUUID (string)

    The unique identifier.

    Example: 11111111-2222-3333-4444-555555555555
    typeSubscriptionFeatureType (string)required

    Possible values: [subscription_feature]

    Example: subscription_feature
    attributes FeatureResponseAttributes
    external_refExternalRef (string)

    A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.

    Possible values: <= 2048 characters

    Example: abc123
    namestringrequired

    The name of the feature.

    Possible values: >= 3 characters and <= 1024 characters

    Example: Digital library access
    descriptionstring

    The feature description to display to customers.

    Possible values: <= 1024 characters

    Example: Access to over 100 ebooks via the digital library.
    configuration objectrequired
    typerequired

    Possible values: [access, promotion, usage]

    tagFeatureTag (string)required

    A tag to add to the customer's account when entitled to the feature.

    Possible values: non-empty and <= 64 characters, Value must match regular expression ^[0-9A-Za-z_-]+$

    Example: digital_library_access
    meta FeatureMetarequired
    ownerstringrequired

    The owner of a resource, either store or organization.

    Example: store
    timestamps Timestampsrequired
    updated_atstringrequired

    The date and time a resource was updated.

    Example: 2017-01-10T11:41:19.244842Z
    created_atstringrequired

    The date and time a resource was created.

    Example: 2017-01-10T11:41:19.244842Z

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/features/:feature_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_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());
Request Collapse all
Base URL
https://euwest.api.elasticpath.com/v2
Auth
Parameters
— pathrequired
— pathrequired
Body
{
  "data": {
    "id": "11111111-2222-3333-4444-555555555555",
    "type": "subscription_offering_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.