Update a charge filter
curl --request PUT \
--url https://api.getlago.com/api/v1/plans/{code}/charges/{charge_code}/filters/{filter_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"cascade_updates": true,
"invoice_display_name": "AWS",
"properties": {
"grouped_by": [
"agent_name"
],
"pricing_group_keys": [
"agent_name"
],
"graduated_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"graduated_percentage_ranges": [
{
"from_value": 0,
"to_value": 10,
"rate": "1",
"flat_amount": "10"
}
],
"amount": "30",
"free_units": 100,
"package_size": 1000,
"rate": "1",
"fixed_amount": "0.5",
"free_units_per_events": 5,
"free_units_per_total_aggregation": "500",
"per_transaction_max_amount": "3.75",
"per_transaction_min_amount": "1.75",
"volume_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
]
},
"values": {
"region": [
"us-east-1"
]
}
}
}
'{
"filter": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"charge_code": "api_requests_charge",
"invoice_display_name": "AWS",
"properties": {
"grouped_by": [
"agent_name"
],
"pricing_group_keys": [
"agent_name"
],
"graduated_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"graduated_percentage_ranges": [
{
"from_value": 0,
"to_value": 10,
"rate": "1",
"flat_amount": "10"
}
],
"amount": "30",
"free_units": 100,
"package_size": 1000,
"rate": "1",
"fixed_amount": "0.5",
"free_units_per_events": 5,
"free_units_per_total_aggregation": "500",
"per_transaction_max_amount": "3.75",
"per_transaction_min_amount": "1.75",
"volume_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
]
},
"values": {
"region": [
"us-east-1"
]
}
}
}Filters
Update a charge filter
This endpoint updates a specific filter for a charge.
PUT
/
plans
/
{code}
/
charges
/
{charge_code}
/
filters
/
{filter_id}
Update a charge filter
curl --request PUT \
--url https://api.getlago.com/api/v1/plans/{code}/charges/{charge_code}/filters/{filter_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"cascade_updates": true,
"invoice_display_name": "AWS",
"properties": {
"grouped_by": [
"agent_name"
],
"pricing_group_keys": [
"agent_name"
],
"graduated_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"graduated_percentage_ranges": [
{
"from_value": 0,
"to_value": 10,
"rate": "1",
"flat_amount": "10"
}
],
"amount": "30",
"free_units": 100,
"package_size": 1000,
"rate": "1",
"fixed_amount": "0.5",
"free_units_per_events": 5,
"free_units_per_total_aggregation": "500",
"per_transaction_max_amount": "3.75",
"per_transaction_min_amount": "1.75",
"volume_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
]
},
"values": {
"region": [
"us-east-1"
]
}
}
}
'{
"filter": {
"lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90",
"charge_code": "api_requests_charge",
"invoice_display_name": "AWS",
"properties": {
"grouped_by": [
"agent_name"
],
"pricing_group_keys": [
"agent_name"
],
"graduated_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
],
"graduated_percentage_ranges": [
{
"from_value": 0,
"to_value": 10,
"rate": "1",
"flat_amount": "10"
}
],
"amount": "30",
"free_units": 100,
"package_size": 1000,
"rate": "1",
"fixed_amount": "0.5",
"free_units_per_events": 5,
"free_units_per_total_aggregation": "500",
"per_transaction_max_amount": "3.75",
"per_transaction_min_amount": "1.75",
"volume_ranges": [
{
"from_value": 0,
"to_value": 10,
"flat_amount": "10",
"per_unit_amount": "0.5"
}
]
},
"values": {
"region": [
"us-east-1"
]
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Code of the existing plan.
Example:
"startup"
Code of the existing charge.
Example:
"api_requests_charge"
Unique identifier of the charge filter.
Example:
"1a901a90-1a90-1a90-1a90-1a901a901a90"
Body
application/json
Charge filter payload
Show child attributes
Show child attributes
Response
Charge filter updated
Charge filter values used to apply differentiated pricing based on additional event properties.
Show child attributes
Show child attributes
⌘I