Events-Based Billing: Segments

List Segments for a Price Point

GET
/components/{component_id}/price_points/{price_point_id}/segments.json

Lists segments created for a given price point, in order of creation.

You can pass page and per_page parameters in order to access all of the segments. By default it will return 30 records. You can set per_page to 200 at most.

You may specify component and/or price point by using either the numeric ID or the handle:gold syntax.

Authorization

BasicAuth
AuthorizationBasic <token>

The username is a Maxio Chargify API key. The password is x.

In: header

Path Parameters

component_id*string

ID or Handle for the Component

price_point_id*string

ID or Handle for the Price Point belonging to the Component

Query Parameters

page?integer

Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned. Use in query page=1.

Range1 <= value
Default1
per_page?integer

This parameter indicates how many records to fetch in each request. Default value is 30. The maximum allowed values is 200; any per_page value over 200 will be changed to 200. Use in query per_page=200.

Rangevalue <= 200
Default30
filter?

Filter to use for List Segments for a Price Point operation

Response Body

application/json

application/json

curl -X GET "https://example.com/components/string/price_points/string/segments.json"
{  "segments": [    {      "id": 0,      "component_id": 0,      "price_point_id": 0,      "event_based_billing_metric_id": 0,      "pricing_scheme": "stairstep",      "segment_property_1_value": "string",      "segment_property_2_value": "string",      "segment_property_3_value": "string",      "segment_property_4_value": "string",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "prices": [        {          "id": 0,          "component_id": 0,          "starting_quantity": 0,          "ending_quantity": 0,          "unit_price": "string",          "price_point_id": 0,          "formatted_unit_price": "string",          "segment_id": 0        }      ]    }  ]}