curl --request POST \
--url https://api.withorb.com/v1/plans/{plan_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": 123,
"add_prices": [
{
"price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"metadata": {},
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123
},
"filters": [
{
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>",
"license_type_id": "<string>"
},
"license_allocation_price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"license_allocations": [
{
"currency": "<string>",
"amount": "<string>",
"write_off_overage": true
}
],
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"plan_phase_order": 123
}
],
"remove_prices": [
{
"price_id": "<string>",
"plan_phase_order": 123
}
],
"replace_prices": [
{
"replaces_price_id": "<string>",
"price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"metadata": {},
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123
},
"filters": [
{
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>",
"license_type_id": "<string>"
},
"license_allocation_price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"license_allocations": [
{
"currency": "<string>",
"amount": "<string>",
"write_off_overage": true
}
],
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"plan_phase_order": 123
}
],
"add_adjustments": [
{
"adjustment": {
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"filters": [
{
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"is_invoice_level": true
},
"plan_phase_order": 123
}
],
"remove_adjustments": [
{
"adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"replace_adjustments": [
{
"adjustment": {
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"filters": [
{
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"is_invoice_level": true
},
"replaces_adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"set_as_default": true
}
'{
"created_at": "2023-11-07T05:31:56Z",
"version": 123,
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"name": "<string>",
"order": 123
}
],
"prices": [
{
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123
},
"filters": [
{
"values": [
"<string>"
]
}
],
"license_type_id": "<string>"
},
"composite_price_filters": [
{
"values": [
"<string>"
]
}
],
"invoice_grouping_key": "<string>",
"discount": {
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"license_type": {
"id": "<string>",
"name": "<string>",
"grouping_key": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"usage_discount": 123,
"plan_phase_order": 123
}
]
}This endpoint allows the creation of a new plan version for an existing plan.
curl --request POST \
--url https://api.withorb.com/v1/plans/{plan_id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version": 123,
"add_prices": [
{
"price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"metadata": {},
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123
},
"filters": [
{
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>",
"license_type_id": "<string>"
},
"license_allocation_price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"license_allocations": [
{
"currency": "<string>",
"amount": "<string>",
"write_off_overage": true
}
],
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"plan_phase_order": 123
}
],
"remove_prices": [
{
"price_id": "<string>",
"plan_phase_order": 123
}
],
"replace_prices": [
{
"replaces_price_id": "<string>",
"price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"allocation_price": {
"currency": "<string>",
"amount": "<string>",
"metadata": {},
"expires_at_end_of_cadence": true,
"custom_expiration": {
"duration": 123
},
"filters": [
{
"values": [
"<string>"
]
}
],
"per_unit_cost_basis": "0.00",
"item_id": "<string>",
"license_type_id": "<string>"
},
"license_allocation_price": {
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"name": "<string>",
"item_id": "<string>",
"license_allocations": [
{
"currency": "<string>",
"amount": "<string>",
"write_off_overage": true
}
],
"metadata": {},
"external_price_id": "<string>",
"dimensional_price_configuration": {
"dimension_values": [
"<string>"
],
"dimensional_price_group_id": "<string>",
"external_dimensional_price_group_id": "<string>"
},
"license_type_id": "<string>",
"billable_metric_id": "<string>",
"billed_in_advance": true,
"fixed_price_quantity": 123,
"invoice_grouping_key": "<string>",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"currency": "<string>",
"reference_id": "<string>"
},
"plan_phase_order": 123
}
],
"add_adjustments": [
{
"adjustment": {
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"filters": [
{
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"is_invoice_level": true
},
"plan_phase_order": 123
}
],
"remove_adjustments": [
{
"adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"replace_adjustments": [
{
"adjustment": {
"percentage_discount": 123,
"applies_to_price_ids": [
"price_1",
"price_2"
],
"applies_to_item_ids": [
"item_1",
"item_2"
],
"filters": [
{
"values": [
"<string>"
]
}
],
"currency": [
"USD",
"JPY",
"credits"
],
"is_invoice_level": true
},
"replaces_adjustment_id": "<string>",
"plan_phase_order": 123
}
],
"set_as_default": true
}
'{
"created_at": "2023-11-07T05:31:56Z",
"version": 123,
"plan_phases": [
{
"id": "<string>",
"description": "<string>",
"duration": 123,
"name": "<string>",
"order": 123
}
],
"prices": [
{
"unit_config": {
"unit_amount": "<string>",
"prorated": false
},
"metadata": {},
"id": "<string>",
"name": "<string>",
"external_price_id": "<string>",
"replaces_price_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"billing_cycle_configuration": {
"duration": 123
},
"invoicing_cycle_configuration": {
"duration": 123
},
"billable_metric": {
"id": "<string>"
},
"fixed_price_quantity": 123,
"plan_phase_order": 123,
"currency": "<string>",
"conversion_rate": 123,
"conversion_rate_config": {
"unit_config": {
"unit_amount": "<string>"
}
},
"item": {
"id": "<string>",
"name": "<string>"
},
"credit_allocation": {
"currency": "<string>",
"allows_rollover": true,
"custom_expiration": {
"duration": 123
},
"filters": [
{
"values": [
"<string>"
]
}
],
"license_type_id": "<string>"
},
"composite_price_filters": [
{
"values": [
"<string>"
]
}
],
"invoice_grouping_key": "<string>",
"discount": {
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"minimum": {
"minimum_amount": "<string>",
"filters": [
{
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"minimum_amount": "<string>",
"maximum": {
"maximum_amount": "<string>",
"filters": [
{
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
]
},
"maximum_amount": "<string>",
"dimensional_price_configuration": {
"dimensional_price_group_id": "<string>",
"dimension_values": [
"<string>"
]
},
"license_type": {
"id": "<string>",
"name": "<string>",
"grouping_key": "<string>"
}
}
],
"adjustments": [
{
"id": "<string>",
"is_invoice_level": true,
"filters": [
{
"values": [
"<string>"
]
}
],
"applies_to_price_ids": [
"<string>"
],
"reason": "<string>",
"replaces_adjustment_id": "<string>",
"usage_discount": 123,
"plan_phase_order": 123
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.withorb.com/llms.txt
Use this file to discover all available pages before exploring further.
API Keys can be issued in the Orb's web application.
New version number.
Additional prices to be added to the plan.
Show child attributes
Prices to be removed from the plan.
Show child attributes
Prices to be replaced with additional prices on the plan.
Show child attributes
Additional adjustments to be added to the plan.
Show child attributes
Adjustments to be removed from the plan.
Show child attributes
Adjustments to be replaced with additional adjustments on the plan.
Show child attributes
Set this new plan version as the default
Created
The PlanVersion resource represents the prices and adjustments present on a specific version of a plan.
Show child attributes
Prices for this plan. If the plan has phases, this includes prices across all phases of the plan.
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.
For more on the types of prices, see the core concepts documentation
Show child attributes
Adjustments for this plan. If the plan has phases, this includes adjustments across all phases of the plan.
Show child attributes
Was this page helpful?