Skip to main content
POST
/
v1
/
contracts
/
getSubscriptionSeatsHistory
Get subscription seats history
curl --request POST \
  --url https://api.metronome.com/v1/contracts/getSubscriptionSeatsHistory \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
  "contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
  "subscription_id": "1a824d53-bde6-4d82-96d7-6347ff227d5c",
  "covering_date": "2024-01-15T00:00:00.000Z",
  "limit": 10
}'
{
  "data": [
    {
      "starting_at": "2024-01-01T00:00:00.000Z",
      "ending_before": "2024-01-15T00:00:00.000Z",
      "total_quantity": 5,
      "assigned_seat_ids": [
        "seat-1",
        "seat-2",
        "seat-3",
        "seat-4",
        "seat-5"
      ]
    },
    {
      "starting_at": "2024-01-15T00:00:00.000Z",
      "ending_before": null,
      "total_quantity": 3,
      "assigned_seat_ids": [
        "seat-1",
        "seat-2",
        "seat-3"
      ]
    }
  ],
  "next_page": "eyJzdGFydGluZ19hdCI6IjIwMjQtMDEtMTVUMDA6MDA6MDAuMDAwWiJ9"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
customer_id
string<uuid>
required
contract_id
string<uuid>
required
subscription_id
string<uuid>
required
limit
integer | null
default:10

Maximum number of seat schedule entries to return. Defaults to 10. Required range: 1 <= x <= 10.

cursor
string | null

Cursor for pagination. Use the value from the next_page field of the previous response to retrieve the next page of results.

covering_date
string<date-time> | null

Get the seats history segment for the covering date. Cannot be used with starting_at or ending_before.

starting_at
string<date-time> | null

Include seats history segments that are active at or after this timestamp. Use with ending_before to get a specific time range. If not set, there's no lower bound.

ending_before
string<date-time> | null

Include seats history segments that are active at or before this timestamp. Use with starting_at to get a specific time range. If not set, there's no upper bound.

Response

Success

data
object[]
required
next_page
string | null
required

Cursor for the next page of results

I