POST
/
billableMetrics
curl --request POST \
  --url https://api.sulu.sh/v0/billableMetrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "unit": "<string>",
  "merchantId": "<string>",
  "productId": "<string>",
  "aggregation": "SUM"
}'
{
  "id": "<string>",
  "object": "billableMetric",
  "name": "<string>",
  "description": "<string>",
  "merchantId": "<string>",
  "unit": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "aggregation": "SUM",
  "productId": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

201
application/json
Billable metric created successfully

The response is of type object.