Creates a new segment for a component with a segmented metric. It allows you to specify properties to bill upon and prices for each Segment. You can only pass as many "property_values" as the related Metric has segmenting properties defined.
You may specify component and/or price point by using either the numeric ID or the handle:gold syntax.
The username is a Maxio Chargify API key and the password is x. Basic authentication works only with the US and EU environments, which connect to chargify.com directly. The Maxio API Gateway environment does not accept Basic authentication.
In: header
ID or Handle for the Component
ID or Handle for the Price Point belonging to the Component
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST \ --url 'https://subdomain.chargify.com/components/COMPONENT_ID/price_points/PRICE_POINT_ID/segments.json' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ --data-raw '{ "segment": { "segment_property_1_value": "France", "segment_property_2_value": "Spain", "pricing_scheme": "volume", "prices": [ { "starting_quantity": 1, "ending_quantity": 10000, "unit_price": 0.19 }, { "starting_quantity": 10001, "unit_price": 0.09 } ] }}'