API ReferenceapientitlementsGET /v1/admin/entitlements/preview

GET /v1/admin/entitlements/preview

Service: entitlements · operationId: (none)

Preview computed entitlements for a user

Required scopes

(no scope declared — review service config)

Query parameters

  • user_id (string) required
  • brand_id (string) —

Responses

200 Computed entitlement set

{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string"
    },
    "tier": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "entitlements": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sources": {
      "type": "object",
      "properties": {
        "tier": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "manual_grants": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "cohorts": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "tier",
        "manual_grants",
        "cohorts"
      ]
    }
  },
  "required": [
    "user_id",
    "tier",
    "brand_id",
    "entitlements",
    "sources"
  ]
}

400 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X GET https://entitlements.platform.loop.health/v1/admin/entitlements/preview \
  -H "Authorization: Bearer $ACCESS_TOKEN"