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

List Balances

List balances
post/v1/contracts/customerBalances/list

List balances (commits and credits).

Body Parameters
customer_idstring
formatuuid
idstring
optional
formatuuid
covering_datestring
optional

Return only balances that have access schedules that "cover" the provided date

formatdate-time
effective_beforestring
optional

Include only balances that have any access before the provided date (exclusive)

formatdate-time
include_archivedboolean
optional

Include archived credits and credits from archived contracts.

include_balanceboolean
optional

Include the balance of credits and commits in the response. Setting this flag may cause the query to be slower.

include_contract_balancesboolean
optional

Include balances on the contract level.

include_ledgersboolean
optional

Include ledgers in the response. Setting this flag may cause the query to be slower.

limitnumber
optional

The maximum number of commits to return. Defaults to 25.

minimum1
maximum25
next_pagestring
optional

The next page token from a previous response.

starting_atstring
optional

Include only balances that have any access on or after the provided date

formatdate-time
Returns
dataarray of union
Hide ParametersShow Parameters
idstringproductobjecttypeenumaccess_scheduleScheduleDurationamountnumberapplicable_contract_idsarray of stringapplicable_product_idsarray of stringapplicable_product_tagsarray of stringarchived_atstringbalancenumbercontractobjectcustom_fieldsmapdescriptionstringhierarchy_configurationobjectinvoice_contractobjectinvoice_scheduleSchedulePointInTimeledgerarray of unionnamestringnetsuite_sales_order_idstringprioritynumberrate_typeenumrolled_over_fromobjectrollover_fractionnumbersalesforce_opportunity_idstringspecifiersarray of objectuniqueness_keystringCommit
idstringproductobjecttypeenumaccess_scheduleScheduleDurationapplicable_contract_idsarray of stringapplicable_product_idsarray of stringapplicable_product_tagsarray of stringbalancenumbercontractobjectcustom_fieldsmapdescriptionstringhierarchy_configurationobjectledgerarray of unionnamestringnetsuite_sales_order_idstringprioritynumberrate_typeenumsalesforce_opportunity_idstringspecifiersarray of objectuniqueness_keystringCredit
next_pagestring
curl https://api.metronome.com/v1/contracts/customerBalances/list \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $METRONOME_BEARER_TOKEN" \
    -d '{
          "customer_id": "13117714-3f05-48e5-a6e9-a66093f13b4d"
        }'
200 Example
{
  "data": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "product": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "name": "name"
      },
      "type": "PREPAID",
      "access_schedule": {
        "schedule_items": [
          {
            "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            "amount": 0,
            "ending_before": "2019-12-27T18:11:19.117Z",
            "starting_at": "2019-12-27T18:11:19.117Z"
          }
        ],
        "credit_type": {
          "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "name": "name"
        }
      },
      "amount": 0,
      "applicable_contract_ids": [
        "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      ],
      "applicable_product_ids": [
        "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      ],
      "applicable_product_tags": [
        "string"
      ],
      "archived_at": "2019-12-27T18:11:19.117Z",
      "balance": 0,
      "contract": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      },
      "custom_fields": {
        "foo": "string"
      },
      "description": "description",
      "hierarchy_configuration": {
        "child_access": {
          "type": "ALL"
        }
      },
      "invoice_contract": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      },
      "invoice_schedule": {
        "credit_type": {
          "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "name": "name"
        },
        "do_not_invoice": true,
        "schedule_items": [
          {
            "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            "amount": 0,
            "quantity": 0,
            "timestamp": "2019-12-27T18:11:19.117Z",
            "unit_price": 0,
            "invoice_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
          }
        ]
      },
      "ledger": [
        {
          "amount": 0,
          "segment_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "timestamp": "2019-12-27T18:11:19.117Z",
          "type": "PREPAID_COMMIT_SEGMENT_START"
        }
      ],
      "name": "name",
      "netsuite_sales_order_id": "netsuite_sales_order_id",
      "priority": 0,
      "rate_type": "COMMIT_RATE",
      "rolled_over_from": {
        "commit_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "contract_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
      },
      "rollover_fraction": 0,
      "salesforce_opportunity_id": "salesforce_opportunity_id",
      "specifiers": [
        {
          "presentation_group_values": {
            "foo": "string"
          },
          "pricing_group_values": {
            "foo": "string"
          },
          "product_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
          "product_tags": [
            "string"
          ]
        }
      ],
      "uniqueness_key": "x"
    }
  ],
  "next_page": "next_page"
}