Get the Balance for a PB Postage Account

Note

See also Get Account Balances.

HTTP Request

GET /v1/ledger/accounts/{accountNumber}/balance

Summary

This operation retrieves the balance for a PB Postage Account. This operation does not retrieve information for a PB Line of Credit. To retrieve information for that, as well as the PB Postage Account, use the Get Account Balances API.

Request URLs

Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/v1/ledger/accounts/{accountNumber}/balance
Production: https://shipping-api.pitneybowes.com/shippingservices/v1/ledger/accounts/{accountNumber}/balance

Path Parameter

Name

Description

accountNumber

Required. The paymentAccountNumber, which can be retrieved through the Get Merchants API.

Request Headers

Name


Description

Authorization

Required. OAuth token generated using the Generate an OAuth Token API.

Accept-Language

Language and country code. Default: en-US

X-PB-UnifiedErrorStructure

Recommended. Set this to true to use the standard error object if an error occurs.

Response Elements

Name

Data Type

Description

accountNumber

String

The paymentAccountNumber, which can be retrieved through the Get Merchants API.

balance

BigDecimal

Account balance.

currencyCode

String

ISO Currency Code. Currently supported currency code: USD

Sample Request

curl -X GET ".../v1/ledger/accounts/<account-number>/balance" \
-H "Authorization: Bearer <oauth_token>" \
-H "Accept-Language:en-US" \
-H "X-PB-UnifiedErrorStructure: true"

Sample Response

{
    "accountNumber": "1234567",
    "balance": 71.89,
    "currencyCode": "USD"
}

Error Codes

For a list of all error codes returned by the Ecommerce APIs, please see Error Codes.