Skip to main content

Create an offering

POST 

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

Create an offering

Request

Responses

Success. The offering 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/offerings");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"type\": \"subscription_offering\",\n \"attributes\": {\n \"external_ref\": \"abc123\",\n \"name\": \"Magazine\",\n \"description\": \"A lovely magazine that is published every month.\"\n },\n \"relationships\": {\n \"proration_policy\": {\n \"type\": \"subscription_proration_policy\",\n \"id\": \"11111111-2222-3333-4444-555555555555\"\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_offering",
    "attributes": {
      "external_ref": "abc123",
      "name": "Magazine",
      "description": "A lovely magazine that is published every month."
    },
    "relationships": {
      "proration_policy": {
        "type": "subscription_proration_policy",
        "id": "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.