curl --request POST \
--url https://api.withorb.com/v1/plans/external_plan_id/{external_plan_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"add_prices": [
{
"price": {
"metadata": {},
"external_price_id": "<string>",
"name": "Annual fee",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"billable_metric_id": "<string>",
"item_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"cadence": "annual",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>"
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "USD",
"amount": "10.00",
"cadence": "monthly",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
}
},
"plan_phase_order": 123
}
],
"remove_prices": [
{
"price_id": "<string>",
"plan_phase_order": 123
}
],
"replace_prices": [
{
"price": {
"metadata": {},
"external_price_id": "<string>",
"name": "Annual fee",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"billable_metric_id": "<string>",
"item_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"cadence": "annual",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>"
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "USD",
"amount": "10.00",
"cadence": "monthly",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
}
},
"replaces_price_id": "<string>",
"plan_phase_order": 123
}
],
"add_adjustments": [
{
"adjustment": {
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true,
"adjustment_type": "percentage_discount",
"percentage_discount": 123
},
"plan_phase_order": 123
}
],
"remove_adjustments": [
{
"adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"replace_adjustments": [
{
"adjustment": {
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true,
"adjustment_type": "percentage_discount",
"percentage_discount": 123
},
"replaces_adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"set_as_default": true,
"version": 123
}'
{
"created_at": "2023-11-07T05:31:56Z",
"version": 123,
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"duration_unit": "daily",
"name": "<string>",
"order": 123
}
],
"prices": [
{
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
}
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
}
This API endpoint is in beta and its interface may change. It is recommended for use only in test mode.
This endpoint allows the creation of a new plan version for an existing plan.
curl --request POST \
--url https://api.withorb.com/v1/plans/external_plan_id/{external_plan_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"add_prices": [
{
"price": {
"metadata": {},
"external_price_id": "<string>",
"name": "Annual fee",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"billable_metric_id": "<string>",
"item_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"cadence": "annual",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>"
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "USD",
"amount": "10.00",
"cadence": "monthly",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
}
},
"plan_phase_order": 123
}
],
"remove_prices": [
{
"price_id": "<string>",
"plan_phase_order": 123
}
],
"replace_prices": [
{
"price": {
"metadata": {},
"external_price_id": "<string>",
"name": "Annual fee",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"billable_metric_id": "<string>",
"item_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"cadence": "annual",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"model_type": "unit",
"unit_config": {
"unit_amount": "<string>"
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "USD",
"amount": "10.00",
"cadence": "monthly",
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
}
},
"replaces_price_id": "<string>",
"plan_phase_order": 123
}
],
"add_adjustments": [
{
"adjustment": {
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true,
"adjustment_type": "percentage_discount",
"percentage_discount": 123
},
"plan_phase_order": 123
}
],
"remove_adjustments": [
{
"adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"replace_adjustments": [
{
"adjustment": {
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"applies_to_all": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"price_type": "usage",
"is_invoice_level": true,
"adjustment_type": "percentage_discount",
"percentage_discount": 123
},
"replaces_adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"set_as_default": true,
"version": 123
}'
{
"created_at": "2023-11-07T05:31:56Z",
"version": 123,
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"duration_unit": "daily",
"name": "<string>",
"order": 123
}
],
"prices": [
{
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"price_type": "usage_price",
"model_type": "unit",
"created_at": "2023-11-07T05:31:56Z",
"cadence": "one_time",
"billing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"invoicing_cycle_configuration": {
"duration": 123,
"duration_unit": "day"
},
"billable_metric": {
"id": "<string>"
},
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"conversion_rate_type": "unit",
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123,
"duration_unit": "day"
}
},
"composite_price_filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"discount": {
"discount_type": "percentage",
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>",
"percentage_discount": 0.15
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"unit_config": {
"unit_amount": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"adjustment_type": "usage_discount",
"usage_discount": 123,
"plan_phase_order": 123
}
]
}
API Keys can be issued in the Orb's web application.
Created
The PlanVersion resource represents the prices and adjustments present on a specific version of a plan.
Was this page helpful?