Get Account Balances

HTTP Request

GET /v1/developers/{developerId}/merchants/{postalReportingNumber}/account-balance

Summary

This operation retrieves the current balances for the PB Postage Account and, if present, the PB Line of Credit. The operation retrieves the balances at the time the API call was made and does not reflect transactions still in progress.

The PB Postage Account is the account from which the merchant pays for postage. A PB Line of Credit is an account that a merchant can use to fund a PB Postage Account. Note that a merchant might instead fund the PB Postage Account using a non-Pitney Bowes payment method, such as a credit card. In that case, the API returns only the merchant’s PB Postage Account.

Request URIs

Sandbox: https://api-sandbox.pitneybowes.com/shippingservices/v1/developers/{developerId}/merchants/{postalReportingNumber}/account-balance
Production: https://api.pitneybowes.com/shippingservices/v1/developers/{developerId}/merchants/{postalReportingNumber}/account-balance

Path Parameters

Name Description
developerId
Required. Your Pitney Bowes developer ID. To retrieve your developer ID, log into Developer Hub and click your username and select Profile.
postalReportingNumber Required. The unique ID used to identify the merchant. To retrieve the merchant’s postalReportingNumber, issue the Get All Merchants API call.

Request Header

Name Description
Authorization Required. OAuth token generated using the Generate an OAuth Token API.
X-PB-UnifiedErrorStructure
Recommended. Set this to true to use the standard error object if an error occurs.

Response Elements

Name Data Type Description
accounts Array[Object] An array that contains a different object for each of the merchant’s Pitney Bowes accounts. If the merchant has only a PB Postage account, the array contains just one object.
    accountType String

The type of account. Possible values are:

  • Postage Account: The balance in your PB Postage Account. The accounts array always includes an object for the PB Postage Account.
  • PB Line of Credit: The balance of your PB Line of Credit, if applicable.
    accountNumber String The account number.
    currencyCode String The ISO currency code. Currently supported currency code: USD
    availableBalance Number The balance on the PB Postage Account.
    balanceOwed Number PB Line of Credit only. The amount of used credit and therefore the total amount owed.
    availableCredit Number PB Line of Credit only. The amount of unused credit.
    creditLimit Number PB Line of Credit only. The maximum credit allowed.
    minimumAmountDue Number PB Line of Credit only. The minimum amount that must be paid by the due date.
    minimumDueDate
String PB Line of Credit only. The date on which the minimum amount must be paid.

Sample Request

curl -X GET .../v1/developers/<developer_id>/merchants/<postal_reporting_number>/account-balance \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-UnifiedErrorStructure: true"

Sample Response for a Merchant with a Postage Account Only

{
    "accounts": [ {
        "accountType": "Postage Account",
        "accountNumber": "****6051",
        "currencyCode": "USD",
        "availableBalance": 457.22
    } ]
}

Sample Response for a Merchant with a PB Line of Credit

{
    "accounts": [ {
        "accountType": "Postage Account",
        "accountNumber": "****6052",
        "currencyCode": "USD",
        "availableBalance": 71.89
    }, {
        "accountType": "PB Line of Credit",
        "accountNumber": "************8952",
        "currencyCode": "USD",
        "balanceOwed": 0,
        "availableCredit": 500,
        "creditLimit": 5000,
        "minimumAmountDue": 45,
        "minimumDueDate": "2018-02-01"
    } ]
}

Error Codes

For a list of all PB Complete Shipping APIs error codes, see Error Codes.