Retrieve a Usage Record

POST

/v1/usage-records/:id

Retrieves the usage record with the given ID.


curl "https://api.lemonsqueezy.com/v1/usage-records/1" \
  -H 'Accept: application/vnd.api+json' \
  -H 'Content-Type: application/vnd.api+json' \
  -H 'Authorization: Bearer {api_key}'

Returns

Returns a Usage Record object.

{
  "jsonapi": {
    "version": "1.0"
  },
  "links": {
    "self": "https://api.lemonsqueezy.com/v1/usage-records/1"
  },
  "data": {
    "type": "usage-records",
    "id": "1",
    "attributes": {
      "subscription_item_id": 1,
      "quantity": 5,
      "action": "increment",
      "created_at": "2023-07-24T14:44:38.000000Z",
      "updated_at": "2023-07-24T14:44:38.000000Z"
    },
    "relationships": {
      "subscription-item": {
        "links": {
          "related": "https://api.lemonsqueezy.com/v1/usage-records/1/subscription-item",
          "self": "https://api.lemonsqueezy.com/v1/usage-records/1/relationships/subscription-item"
        }
      }
    },
    "links": {
      "self": "https://api.lemonsqueezy.com/v1/usage-records/1"
    }
  }
}

Was this page helpful?