Owostack

Record metered usage

Track usage for a feature and return the resulting entitlement state after the increment, including the canonical credits balance object for credit-backed features.

POST
/v1/track

Authorization

bearerAuth

Request Body

application/json

customer*string
feature*string
value?number
Default1
Range0 <= value
customerData?
entity?string
metadata?

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.owostack.com/v1/track" \  -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
}
{
  "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
}
{
  "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
}
{
  "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
}
{
  "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
}
{
  "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
}

AI Chat

Owostack docs assistant

Start a new chat below.