Skip to content

List invoices that can be paid together

GET/invoices/bulk-payment

Overview

Lists the account's outstanding invoices, newest first, up to 50. Each says whether it can be paid together with others and, if not, why in reason. balance is what is still owed. limit is the most invoices one payment can cover.

Invoices for services with automatic payments on can be included. Their automatic payments stay on, and the next automatic charge moves to the service's new due date once the invoice is paid. A charge too close to move still goes through, and the overpayment is added to account credit. Add funds invoices, invoices for orders placed in the panel and invoices already being paid are left out. available is false when paying invoices together is switched off.

Permissions

Requires the account permission invoices.pay (Pay invoices).

curl --request GET \
  --url 'https://console.advinservers.com/api/v1/client/invoices/bulk-payment' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
{
  "available": true,
  "limit": 20,
  "items": [
    {
      "id": 1042,
      "number": "1042",
      "balance": "12.50",
      "currency": "USD",
      "payable": true,
      "reason": null
    },
    {
      "id": 1041,
      "number": "1041",
      "balance": "8.00",
      "currency": "USD",
      "payable": false,
      "reason": "This invoice is already being paid."
    }
  ]
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Response 200

application/json

The record, as a JSON object. There is no envelope.

availablebooleanrequired

The value of available.

limitintegerrequired

The value of limit.

itemsobject[]required

The outstanding invoices, newest first.

Show child attributes
idintegerrequired

The id ID.

numberstringrequired

The value of number.

balancestringrequired

The value of balance.

currencystring | nullrequired

The three-letter currency code used for monetary amounts.

payablebooleanrequired

The value of payable.

reasonstring | nullrequired

The value of reason.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.