Skip to main content

Update an offering

PUT 

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

After saving an offering, you can update an offering at any time. Updating an offering does not affect any active subscriptions. The changes take effect on all new subscriptions that are created. For fields that are optional, an existing value can be removed by specifying a value of null.

Request

Path Parameters

    offering_uuid UUIDrequired

    The unique identifier of the offering.

Body

    data objectrequired
    anyOf
    idUUID (string)required

    The unique identifier.

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

    Possible values: [subscription_offering]

    Example: subscription_offering
    attributes OfferingUpdateAttributes
    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 offering.

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

    Example: Magazine
    descriptionstringnullable

    The offering description to display to customers.

    Possible values: <= 1024 characters

    Example: A lovely magazine that is published every month.
    relationships OfferingUpdateRelationships
    proration_policy objectnullable
    typeProrationPolicyType (string)required

    Possible values: [subscription_proration_policy]

    Example: subscription_proration_policy
    idUUID (string)required

    The unique identifier.

    Example: 11111111-2222-3333-4444-555555555555

Responses

Success. The details of the subscription offering are updated.

Schema
    data Offering
    idUUID (string)

    The unique identifier.

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

    Possible values: [subscription_offering]

    Example: subscription_offering
    attributes OfferingResponseAttributes
    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 offering.

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

    Example: Magazine
    descriptionstring

    The offering description to display to customers.

    Possible values: <= 1024 characters

    Example: A lovely magazine that is published every month.
    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
    relationships Relationships

    Relationships are established between different subscription entities. For example, a plan and a pricing option are related to an offering, as both are attached to it.

    property name* Relationship
    anyOf
    data object
    idUUID (string)required

    The unique identifier.

    Example: 11111111-2222-3333-4444-555555555555
    typestringrequired

    This represents the type of resource being returned.

    Example: 11111111-2222-3333-4444-555555555555
    links object

    Links are used to allow you, as an API consumer, to move between requests. Single entities use a self parameter with a link to that specific resource. Sometimes, there aren’t enough entities for a project to fill multiple pages. In this situation, we return some defaults, instead of expecting you to check for these special cases.

    • current - Always the current page.
    • first - Always the first page.
    • last - always null.
    • next - null if the user is on the first page.
    • previous - null if there is only one page.
    relatedstring
    Example: foo.bar
    meta OfferingMetarequired
    external_plan_refsstring<string>[]required
    ownerstring<string>required

    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");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{}", 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
{}
ResponseClear

Click the Send API Request button above and see the response here!