Querying for accounts

Use the following endpoints to query for accounts:

  • GET /billing/v1/accounts
  • GET /billing/v1/accounts/{accountId}

The GET /billing/v1/accounts endpoint is "potentially large". Cloud API returns an error if you attempt to sort on this endpoint and the sort cannot be accomplished efficiently. For more information, see Potentially large endpoints.

For example, the following is a portion of the payload that is returned when retrieving account bc:477.

GET /billing/v1/accounts/bc:477

{
    "data": {
        "attributes": {
            "accountNumber": "Standard Account",
            "billDateOrDueDateBilling": {
                "code": "BillDateBilling",
                "name": "Bill Date"
            },
            "billingLevel": {
                "code": "Account",
                "name": "Account/Default Unapplied"
            },
            "billingPlan": {
                "displayName": "Standard Mail",
                "id": "bc:SOnd0wA7MbOlNtrgseYVU"
            },
            "currency": {
                "code": "usd",
                "name": "USD"
            },
            "delinquencyPlan": {
                "displayName": "Standard Delinquency Plan",
                "id": "bc:S1jtHjvdt5htTf4qDFCWB"
            },
            "everyOtherWeekInvoiceAnchorDate": "2022-08-09",
            "firstTwicePerMonthInvoiceDayOfMonth": 1,
            "id": "bc:SkCdQLAh9lsqwdYcYv9gB",
            "invoiceDayOfMonth": 1,
            "invoiceDayOfWeek": {
                "code": "Friday",
                "name": "Friday"
            },
            "paymentAllocationPlan": {
                "displayName": "Default Payment Allocation Plan",
                "id": "cash_plan:1"
            },
            "secondTwicePerMonthInvoiceDayOfMonth": 15
        },
        ...