Check feature entitlements
Check whether a customer can use a feature and return the current entitlement state, including the canonical credits balance object for credit-backed features. Optionally track usage atomically if allowed via sendEvent.
Authorization
bearerAuth Request Body
application/json
customer*string
feature*string
value?number
Default
1Range
0 <= valuecustomerData?
sendEvent?boolean
Default
falseentity?string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.owostack.com/v1/check" \ -H "Content-Type: application/json" \ -d '{ "customer": "string", "feature": "string" }'{
"allowed": true,
"code": "string",
"usage": 0,
"limit": 0,
"balance": 0,
"resetsAt": "2019-08-24T14:15:22Z",
"resetInterval": "string",
"credits": {
"source": "credit_system",
"systemSlug": "string",
"costPerUnit": 0,
"bonusBalance": 0,
"addonBalance": 0,
"totalBalance": 0,
"plan": {
"used": 0,
"limit": 0,
"balance": 0,
"resetsAt": "2019-08-24T14:15:22Z"
}
},
"details": {
"message": "string",
"pricing": {
"usageModel": "included",
"ratingModel": "package",
"pricePerUnit": 0,
"billingUnits": 0,
"currentTier": {
"index": 0,
"startsAt": 0,
"endsAt": 0,
"unitPrice": 0,
"flatFee": 0
}
},
"tierBreakdown": [
{
"tier": 0,
"units": 0,
"unitPrice": 0,
"flatFee": 0,
"amount": 0
}
],
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"success": true,
"error": "string",
"code": "string",
"message": "string",
"property1": null,
"property2": null
}{
"success": true,
"error": "string",
"code": "string",
"message": "string",
"property1": null,
"property2": null
}{
"success": true,
"error": "string",
"code": "string",
"message": "string",
"property1": null,
"property2": null
}{
"success": true,
"error": "string",
"code": "string",
"message": "string",
"property1": null,
"property2": null
}{
"allowed": true,
"code": "string",
"usage": 0,
"limit": 0,
"balance": 0,
"resetsAt": "2019-08-24T14:15:22Z",
"resetInterval": "string",
"credits": {
"source": "credit_system",
"systemSlug": "string",
"costPerUnit": 0,
"bonusBalance": 0,
"addonBalance": 0,
"totalBalance": 0,
"plan": {
"used": 0,
"limit": 0,
"balance": 0,
"resetsAt": "2019-08-24T14:15:22Z"
}
},
"details": {
"message": "string",
"pricing": {
"usageModel": "included",
"ratingModel": "package",
"pricePerUnit": 0,
"billingUnits": 0,
"currentTier": {
"index": 0,
"startsAt": 0,
"endsAt": 0,
"unitPrice": 0,
"flatFee": 0
}
},
"tierBreakdown": [
{
"tier": 0,
"units": 0,
"unitPrice": 0,
"flatFee": 0,
"amount": 0
}
],
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}