Skip to main content
POST
/
merchant
/
metric
/
event
/
current_value
Get Merchant Metric Event Current Value
curl --request POST \
  --url https://api.unibee.dev/merchant/metric/event/current_value \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metricCode": "<string>",
  "email": "[email protected]",
  "externalUserId": "<string>",
  "productId": 123,
  "userId": 123
}
'
{
  "code": 123,
  "data": {
    "currentValue": 123,
    "metricLimit": {
      "MerchantId": 123,
      "MetricId": 123,
      "PlanLimits": [
        {
          "createTime": 123,
          "gmtModify": 123,
          "id": 123,
          "merchantId": 123,
          "merchantMetric": {
            "aggregationProperty": "<string>",
            "aggregationType": 123,
            "archived": true,
            "code": "<string>",
            "createTime": 123,
            "gmtModify": 123,
            "id": 123,
            "merchantId": 123,
            "metaData": {},
            "metricDescription": "<string>",
            "metricName": "<string>",
            "type": 123,
            "unit": "<string>"
          },
          "metricId": 123,
          "metricLimit": 123,
          "planId": 123,
          "quantity": 123
        }
      ],
      "TotalLimit": 123,
      "UserId": 123,
      "aggregationProperty": "<string>",
      "aggregationType": 123,
      "code": "<string>",
      "metricName": "<string>",
      "quotaAdjustments": [
        {
          "adjustmentTime": 123,
          "id": 123,
          "merchantMemberEmail": "<string>",
          "merchantMemberId": 123,
          "previousPeriodLimit": 123,
          "previousPeriodUsed": 123,
          "quotaAmount": 123,
          "quotaType": "<string>",
          "reason": "<string>"
        }
      ],
      "type": 123
    },
    "totalLimit": 123
  },
  "merchantId": 123,
  "message": "<string>",
  "redirect": "<string>",
  "requestId": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
metricCode
string<string>
required

MetricCode

email
string<string>

Email, UserId, ExternalUserId, or Email provides one of three options

externalUserId
string<string>

ExternalUserId, UserId, ExternalUserId, or Email provides one of three options

productId
integer<int64>

Id of product. Default product will use if productId not specified and subscriptionId is blank

userId
integer<int64>

UserId, UserId, ExternalUserId, or Email provides one of three options

Response

200 - application/json
code
integer<int>
data
object
merchantId
integer<int64>
message
string<string>
redirect
string<string>
requestId
string<string>