Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Retrieve Subscription Quantity History

Get subscription quantity history
post/v1/contracts/getSubscriptionQuantityHistory

Fetch the quantity and price for a subscription over time. End-point does not return future scheduled changes.

Body Parameters
contract_idstring
formatuuid
customer_idstring
formatuuid
subscription_idstring
formatuuid
Returns
dataobject
Hide ParametersShow Parameters
fiat_credit_type_idstring
optional
formatuuid
historyarray of object
optional
Hide ParametersShow Parameters
dataarray of object
Hide ParametersShow Parameters
quantitynumber
totalnumber
unit_pricenumber
starting_atstring
formatdate-time
subscription_idstring
optional
formatuuid
curl https://api.metronome.com/v1/contracts/getSubscriptionQuantityHistory \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
    -d '{
          "contract_id": "d7abd0cd-4ae9-4db7-8676-e986a4ebd8dc",
          "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d",
          "subscription_id": "1a824d53-bde6-4d82-96d7-6347ff227d5c"
        }'
200 Example
{
  "data": {
    "fiat_credit_type_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "history": [
      {
        "data": [
          {
            "quantity": 0,
            "total": 0,
            "unit_price": 0
          }
        ],
        "starting_at": "2019-12-27T18:11:19.117Z"
      }
    ],
    "subscription_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}