Create Pricing Metric Summary
/pricing-metrics/{pricing_metric_id}/summary
Create Pricing Metric Summary
Path Parameters
pricing_metric_id: string
Body Parameters
subject_id: string
The ID or external ID of the subject that the summary should be computed for.
Returns
id: string
The ID of the pricing metric summary.
pricing_metric_id: string
The ID of the pricing metric that the summary is for.
subject_id: string
The ID of the subject that the summary is for.
value: string
The computed value of the pricing metric for the period. If the pricing metric does not have any usage events for the period, this will be null.
Create Pricing Metric Summary
curl https://api.uselark.ai/pricing-metrics/$PRICING_METRIC_ID/summary \
-H 'Content-Type: application/json' \
-H "X-API-Key: $LARK_API_KEY" \
-d '{
"period": {
"end": "2025-11-01T00:00:00Z",
"start": "2025-10-01T00:00:00Z"
},
"subject_id": "subj_VyX6Q96h5avMho8O7QWlKeXE"
}'
{
"id": "pmtr_sum_vqXWIKBYia15D5dNyCLLlsa4",
"period": {
"end": "2025-11-01T00:00:00Z",
"start": "2025-10-01T00:00:00Z",
"inclusive_end": false,
"inclusive_start": true
},
"pricing_metric_id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
"subject_id": "subj_VyX6Q96h5avMho8O7QWlKeXE",
"value": "22.5"
}Returns Examples
{
"id": "pmtr_sum_vqXWIKBYia15D5dNyCLLlsa4",
"period": {
"end": "2025-11-01T00:00:00Z",
"start": "2025-10-01T00:00:00Z",
"inclusive_end": false,
"inclusive_start": true
},
"pricing_metric_id": "pmtr_GlX5Tcm2HOn00CoRTFxw2Amw",
"subject_id": "subj_VyX6Q96h5avMho8O7QWlKeXE",
"value": "22.5"
}