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 |
Request Headers¶
Name |
Description |
---|---|
Authorization |
Required. OAuth token generated using the Generate an OAuth Token API. |
Accept-Language |
Language and country code. Default: |
X-PB-UnifiedErrorStructure |
Recommended. Set this to |
Response Elements¶
Name |
Data Type |
Description |
---|---|---|
accountNumber |
String |
The |
balance |
BigDecimal |
Account balance. |
currencyCode |
String |
ISO Currency Code. Currently supported currency code: |
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.