curl --request PATCH \
--url https://api.salesbricks.com/api/v2/usage/ \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '
{
"transaction_id": "tx-12345-abc",
"value": 200,
"properties": {
"region": "us-west-2",
"tier": "enterprise"
}
}
'{
"message": "Usage entry updated successfully."
}{
"error": {
"code": "ERR_BAD_REQUEST",
"message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data."
}
}{
"error": {
"code": "ERR_NOT_FOUND",
"message": "Not found — the resource you are looking for does not exist."
}
}Usage
Update a usage entry
Updates an existing usage entry by its unique transaction_id. You can update the value and/or properties fields. At least one field must be provided to update. Returns a 404 error if the transaction_id is not found.
PATCH
/
usage
/
curl --request PATCH \
--url https://api.salesbricks.com/api/v2/usage/ \
--header 'Content-Type: application/json' \
--header 'X-SALESBRICKS-KEY: <api-key>' \
--data '
{
"transaction_id": "tx-12345-abc",
"value": 200,
"properties": {
"region": "us-west-2",
"tier": "enterprise"
}
}
'{
"message": "Usage entry updated successfully."
}{
"error": {
"code": "ERR_BAD_REQUEST",
"message": "Bad request — the input payload is malformed, missing required fields, or contains invalid data."
}
}{
"error": {
"code": "ERR_NOT_FOUND",
"message": "Not found — the resource you are looking for does not exist."
}
}Authorizations
API key for authentication
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Response
Common response message serializer that includes a message from the result of an API operation.
Success message from the result of the previous API operation.