Authorization: Bearer ********************
{
"user_plan_id": "fa95721a-6214-4568-9415-e41e059e8059",
"type": "metered",
"name": "Plan Matric 1",
"code": "PLN_MTRC_1",
"description": "This is a plan matric.",
"unit": "unit1",
"price_per_unit": 1000,
"aggregate_type": "count",
"aggregation_property": "property1"
}
curl --location --request POST 'http://localhost:8080/v1/admin/plans/fa95721a-6214-4568-9415-e41e059e8059/metrices/' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_plan_id": "fa95721a-6214-4568-9415-e41e059e8059",
"type": "metered",
"name": "Plan Matric 1",
"code": "PLN_MTRC_1",
"description": "This is a plan matric.",
"unit": "unit1",
"price_per_unit": 1000,
"aggregate_type": "count",
"aggregation_property": "property1"
}'
{"message":"metrix created successfully","result":{"id":"75c393b4-b5bd-4303-8247-117b89ae6f9d","user_plan_id":"dad08e78-50f9-4cb7-beb4-d75a9ccc040d","type":"metered","name":"Plan Matric 1","code":"PLN_MTRC_1","description":"This is a plan matric.","unit":"unit1","price_per_unit":1000,"aggregate_type":"count","aggregation_property":"property1","created_at":"2024-03-30T09:27:12.805584529Z","updated_at":"2024-03-30T09:27:12.805584599Z","deleted_at":null},"success":true}