Create add-on
Changed onCreate a new add-on.
Request
- Base URL: http://localhost:8888/api/v3
- URL: http://localhost:8888/api/v3/openmeter/addons
- Auth: none declared
Request body
Example request
{
"labels": {
"env": "test"
},
"key": "resource_key",
"currency": "USD",
"rate_cards": [
{
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
]
}Response
Addon created response.
Example response
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"key": "resource_key",
"currency": "USD",
"effective_from": "2023-01-01T01:01:01.001Z",
"effective_to": "2023-01-01T01:01:01.001Z",
"rate_cards": [
{
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
],
"validation_errors": [
{
"field": "addons/pro/ratecards/token/featureKey"
}
]
}Changes
- breaking
added to the
//request propertyallOflist - warning
removed from the
//request propertyallOflist - info
added to the
//response propertyallOflist for the response status - info
removed from the
//response propertyallOflist for the response status
- breaking
- breaking
removed from the
////request propertyanyOflist - breaking
removed from the
//////request propertyanyOflist - breaking
added to the
////response propertyoneOflist for the response status - breaking
added to the
//////response propertyoneOflist for the response status - info
added to the
////request propertyoneOflist - info
added to the
//////request propertyoneOflist - info
removed from the
////response propertyanyOflist for the response status - info
removed from the
//////response propertyanyOflist for the response status
- breaking