Admin Create Plan Matrices By Type
Developing
POST
/admin/plans/{planId}/metrices/
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.vidinfra.com/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"
}'
Response Response Example
200 - OK - Success
{"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}
Request
Path Params
planId
stringÂ
required
Example:
fa95721a-6214-4568-9415-e41e059e8059
Body Params application/json
Responses
Modified at 2025-06-19 04:59:01