Product Bundles
Update a product bundle
Patches an existing product bundle. Supplying prices replaces the bundle’s full price set.
PATCH
/
bundles
/
{id}
Update a product bundle
curl --request PATCH \
--url https://api.alguna.io/bundles/{id} \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "Updated Plan",
"prices": [
{
"billing_direction": "arrears",
"charge_on_contract_start": true,
"fee_type": "fixed",
"product_id": "<string>",
"type": "unit",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"discount": {
"amount": "<string>",
"duration_unit": "<string>",
"duration_value": 123
},
"display_order": 123,
"expression_pricing_model": {
"charges": [
{
"description": "<string>",
"quantity_expression": "<string>",
"unit_price_expression": "<string>"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "<string>",
"period": "<string>"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "<string>",
"period": "<string>"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "<string>",
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"trial_period_days": 123,
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
}
]
}
'import requests
url = "https://api.alguna.io/bundles/{id}"
payload = {
"description": "<string>",
"name": "Updated Plan",
"prices": [
{
"billing_direction": "arrears",
"charge_on_contract_start": True,
"fee_type": "fixed",
"product_id": "<string>",
"type": "unit",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"discount": {
"amount": "<string>",
"duration_unit": "<string>",
"duration_value": 123
},
"display_order": 123,
"expression_pricing_model": {
"charges": [
{
"description": "<string>",
"quantity_expression": "<string>",
"unit_price_expression": "<string>"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": ["<string>"]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"label": "<string>",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"unit_pricing_model": { "price_per_unit": "<string>" },
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "<string>",
"period": "<string>"
},
"metric_ids": ["<string>"],
"minimum_spend": {
"amount": "<string>",
"period": "<string>"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "<string>",
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"trial_period_days": 123,
"unit_pricing_model": { "price_per_unit": "<string>" },
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
}
]
}
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Alguna-Version': '<alguna-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
name: 'Updated Plan',
prices: [
{
billing_direction: 'arrears',
charge_on_contract_start: true,
fee_type: 'fixed',
product_id: '<string>',
type: 'unit',
billing_interval: 'monthly',
billing_interval_count: 3,
billing_interval_unit: 'month',
discount: {amount: '<string>', duration_unit: '<string>', duration_value: 123},
display_order: 123,
expression_pricing_model: {
charges: [
{
description: '<string>',
quantity_expression: '<string>',
unit_price_expression: '<string>'
}
],
metric_bindings: [{alias: 'api_calls', metric_id: '<string>'}]
},
fixed_pricing_model: {price_per_unit: '<string>', total: '<string>', units: 123},
graduated_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
matrix_pricing_model: {
dimensions: [{key: '<string>', label: '<string>', values: ['<string>']}],
root: {
fallback: '<unknown>',
leaf: {
cell_key: '<string>',
fixed_pricing_model: {price_per_unit: '<string>', total: '<string>', units: 123},
graduated_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
label: '<string>',
tiered_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
unit_pricing_model: {price_per_unit: '<string>'},
volume_percentage_pricing_model: {percentage: '<string>', price_per_unit: '<string>', fixed_fee: '<string>'}
},
splits: [
{
branches: [{child: '<unknown>', value: '<string>'}],
dimension_key: '<string>',
wildcard: '<unknown>'
}
]
},
line_item_template: '<string>'
},
maximum_spend: {amount: '<string>', period: '<string>'},
metric_ids: ['<string>'],
minimum_spend: {amount: '<string>', period: '<string>'},
prepaid_fixed_tiered_pricing_model: {
overages_charge_interval: '<string>',
prepaid_units: 123,
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
]
},
prepaid_tiered_pricing_model: {
prepaid_units: 123,
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
]
},
recurring_instalment_interval_count: 1,
recurring_instalment_interval_unit: 'month',
tiered_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
trial_period_days: 123,
unit_pricing_model: {price_per_unit: '<string>'},
volume_percentage_pricing_model: {percentage: '<string>', price_per_unit: '<string>', fixed_fee: '<string>'}
}
]
})
};
fetch('https://api.alguna.io/bundles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "bnd_01H1VECT",
"name": "Standard Plan",
"prices": [
{
"billing_direction": "arrears",
"charge_on_contract_start": true,
"created_at": "2023-11-07T05:31:56Z",
"currency": "USD",
"fee_type": "fixed",
"id": "<string>",
"product": {
"description": "<string>",
"fee_type": "fixed",
"id": "<string>",
"name": "Platform Fee",
"payment_terms": "arrears",
"billing_frequency": "recurring",
"metric_ids": [
"<string>"
]
},
"product_id": "<string>",
"type": "unit",
"updated_at": "2023-11-07T05:31:56Z",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"discount": {
"amount": "<string>",
"discount_type": "percentage",
"duration_type": "monthly_rolling",
"duration_unit": "<string>",
"duration_value": 123
},
"display_order": 123,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "advance",
"description": "<string>",
"quantity_expression": "<string>",
"unit_price_expression": "<string>"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"type": "unit",
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "<string>",
"period": "<string>",
"billing_direction": "advance"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "<string>",
"period": "<string>",
"billing_direction": "advance"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "<string>",
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"trial_period_days": 123,
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
}
],
"description": "Our standard plan bundle"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}Authorizations
API key authentication. Pass your API key as a Bearer token.
Headers
Available options:
2026-04-01 A unique string used to ensure the request is processed exactly once. If you retry a request with the same idempotency key within 24 hours, the original response is returned without re-executing the operation.
Maximum string length:
255Example:
"ik_a1b2c3d4e5f6"
Path Parameters
Unique identifier for the bundle
Body
application/json
Response
Success
Unique identifier for the bundle
Example:
"bnd_01H1VECT"
The name of the bundle
Example:
"Standard Plan"
Prices included in this bundle
Show child attributes
Show child attributes
A brief description of the bundle
Example:
"Our standard plan bundle"
⌘I
Update a product bundle
curl --request PATCH \
--url https://api.alguna.io/bundles/{id} \
--header 'Alguna-Version: <alguna-version>' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "Updated Plan",
"prices": [
{
"billing_direction": "arrears",
"charge_on_contract_start": true,
"fee_type": "fixed",
"product_id": "<string>",
"type": "unit",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"discount": {
"amount": "<string>",
"duration_unit": "<string>",
"duration_value": 123
},
"display_order": 123,
"expression_pricing_model": {
"charges": [
{
"description": "<string>",
"quantity_expression": "<string>",
"unit_price_expression": "<string>"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "<string>",
"period": "<string>"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "<string>",
"period": "<string>"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "<string>",
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"trial_period_days": 123,
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
}
]
}
'import requests
url = "https://api.alguna.io/bundles/{id}"
payload = {
"description": "<string>",
"name": "Updated Plan",
"prices": [
{
"billing_direction": "arrears",
"charge_on_contract_start": True,
"fee_type": "fixed",
"product_id": "<string>",
"type": "unit",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"discount": {
"amount": "<string>",
"duration_unit": "<string>",
"duration_value": 123
},
"display_order": 123,
"expression_pricing_model": {
"charges": [
{
"description": "<string>",
"quantity_expression": "<string>",
"unit_price_expression": "<string>"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": ["<string>"]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"label": "<string>",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"unit_pricing_model": { "price_per_unit": "<string>" },
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "<string>",
"period": "<string>"
},
"metric_ids": ["<string>"],
"minimum_spend": {
"amount": "<string>",
"period": "<string>"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "<string>",
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"recurring_instalment_interval_count": 1,
"recurring_instalment_interval_unit": "month",
"tiered_percentage_pricing_model": { "tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
] },
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"trial_period_days": 123,
"unit_pricing_model": { "price_per_unit": "<string>" },
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
}
]
}
headers = {
"Alguna-Version": "<alguna-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Alguna-Version': '<alguna-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
description: '<string>',
name: 'Updated Plan',
prices: [
{
billing_direction: 'arrears',
charge_on_contract_start: true,
fee_type: 'fixed',
product_id: '<string>',
type: 'unit',
billing_interval: 'monthly',
billing_interval_count: 3,
billing_interval_unit: 'month',
discount: {amount: '<string>', duration_unit: '<string>', duration_value: 123},
display_order: 123,
expression_pricing_model: {
charges: [
{
description: '<string>',
quantity_expression: '<string>',
unit_price_expression: '<string>'
}
],
metric_bindings: [{alias: 'api_calls', metric_id: '<string>'}]
},
fixed_pricing_model: {price_per_unit: '<string>', total: '<string>', units: 123},
graduated_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
matrix_pricing_model: {
dimensions: [{key: '<string>', label: '<string>', values: ['<string>']}],
root: {
fallback: '<unknown>',
leaf: {
cell_key: '<string>',
fixed_pricing_model: {price_per_unit: '<string>', total: '<string>', units: 123},
graduated_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
graduated_tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
label: '<string>',
tiered_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
unit_pricing_model: {price_per_unit: '<string>'},
volume_percentage_pricing_model: {percentage: '<string>', price_per_unit: '<string>', fixed_fee: '<string>'}
},
splits: [
{
branches: [{child: '<unknown>', value: '<string>'}],
dimension_key: '<string>',
wildcard: '<unknown>'
}
]
},
line_item_template: '<string>'
},
maximum_spend: {amount: '<string>', period: '<string>'},
metric_ids: ['<string>'],
minimum_spend: {amount: '<string>', period: '<string>'},
prepaid_fixed_tiered_pricing_model: {
overages_charge_interval: '<string>',
prepaid_units: 123,
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
]
},
prepaid_tiered_pricing_model: {
prepaid_units: 123,
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
]
},
recurring_instalment_interval_count: 1,
recurring_instalment_interval_unit: 'month',
tiered_percentage_pricing_model: {
tiers: [
{min_units: 123, fixed_fee: '<string>', max_units: 123, percentage: '<string>'}
]
},
tiered_pricing_model: {
tiers: [
{
min_units: 123,
fixed_fee: '<string>',
max_units: 123,
price_per_unit: '<string>',
unit_price: '<string>'
}
],
units: 123
},
trial_period_days: 123,
unit_pricing_model: {price_per_unit: '<string>'},
volume_percentage_pricing_model: {percentage: '<string>', price_per_unit: '<string>', fixed_fee: '<string>'}
}
]
})
};
fetch('https://api.alguna.io/bundles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "bnd_01H1VECT",
"name": "Standard Plan",
"prices": [
{
"billing_direction": "arrears",
"charge_on_contract_start": true,
"created_at": "2023-11-07T05:31:56Z",
"currency": "USD",
"fee_type": "fixed",
"id": "<string>",
"product": {
"description": "<string>",
"fee_type": "fixed",
"id": "<string>",
"name": "Platform Fee",
"payment_terms": "arrears",
"billing_frequency": "recurring",
"metric_ids": [
"<string>"
]
},
"product_id": "<string>",
"type": "unit",
"updated_at": "2023-11-07T05:31:56Z",
"billing_frequency": "recurring",
"billing_interval": "monthly",
"billing_interval_count": 3,
"billing_interval_unit": "month",
"discount": {
"amount": "<string>",
"discount_type": "percentage",
"duration_type": "monthly_rolling",
"duration_unit": "<string>",
"duration_value": 123
},
"display_order": 123,
"expression_pricing_model": {
"charges": [
{
"billing_direction": "advance",
"description": "<string>",
"quantity_expression": "<string>",
"unit_price_expression": "<string>"
}
],
"metric_bindings": [
{
"alias": "api_calls",
"metric_id": "<string>"
}
]
},
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"matrix_pricing_model": {
"dimensions": [
{
"key": "<string>",
"label": "<string>",
"values": [
"<string>"
]
}
],
"root": {
"fallback": "<unknown>",
"leaf": {
"type": "unit",
"cell_key": "<string>",
"fixed_pricing_model": {
"price_per_unit": "<string>",
"total": "<string>",
"units": 123
},
"graduated_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"graduated_tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"label": "<string>",
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
},
"splits": [
{
"branches": [
{
"child": "<unknown>",
"value": "<string>"
}
],
"dimension_key": "<string>",
"wildcard": "<unknown>"
}
]
},
"line_item_template": "<string>"
},
"maximum_spend": {
"amount": "<string>",
"period": "<string>",
"billing_direction": "advance"
},
"metric_ids": [
"<string>"
],
"minimum_spend": {
"amount": "<string>",
"period": "<string>",
"billing_direction": "advance"
},
"prepaid_fixed_tiered_pricing_model": {
"overages_charge_interval": "<string>",
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"prepaid_tiered_pricing_model": {
"prepaid_units": 123,
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
]
},
"tiered_percentage_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"percentage": "<string>"
}
]
},
"tiered_pricing_model": {
"tiers": [
{
"min_units": 123,
"fixed_fee": "<string>",
"max_units": 123,
"price_per_unit": "<string>",
"unit_price": "<string>"
}
],
"units": 123
},
"trial_period_days": 123,
"unit_pricing_model": {
"price_per_unit": "<string>"
},
"volume_percentage_pricing_model": {
"percentage": "<string>",
"price_per_unit": "<string>",
"fixed_fee": "<string>"
}
}
],
"description": "Our standard plan bundle"
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}{
"detail": "<string>",
"status": 123
}