GET
/
usage
curl --request GET \
  --url https://api.sulu.sh/v0/usage \
  --header 'Authorization: Bearer <token>'
{
  "object": "list",
  "data": [
    {
      "id": "<string>",
      "object": "usageEvent",
      "idempotencyKey": "<string>",
      "customerId": "<string>",
      "description": "<string>",
      "merchantId": "<string>",
      "consumerId": "<string>",
      "timestamp": "2023-11-07T05:31:56Z",
      "createdAt": "2023-11-07T05:31:56Z",
      "properties": [
        {
          "billableMetricId": "<string>",
          "quantity": 123,
          "price": "<string>"
        }
      ],
      "metadata": {},
      "billing": {
        "price": 123,
        "billingEventId": "<string>"
      }
    }
  ],
  "pagination": {
    "limit": 123,
    "offset": 123,
    "total": 123
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

customerId
string

Filter by customer ID. This is only available if the caller is member of the merchant organization owning this customer.

merchantId
string

Filter by merchant ID. This is only available if the caller is member of the merchant organization.

consumerId
string

Filter by consumer ID. This is only available if the caller is member of the consumer organization.

startTime
string
required

Filter events created after or at the specified time. ISO 8601 date-time string

endTime
string
required

Filter events created before or at the specified time. ISO 8601 date-time string

limit
integer
default:10

Number of usage events to return

Required range: 1 <= x <= 100
offset
integer
default:0

Number of usage events to skip

Required range: x >= 0

Response

200
application/json
List of usage events
object
enum<string>
Available options:
list
data
object[]
pagination
object

Offset-based pagination response.