Get Auto Refill Settings

HTTP Request

GET /v1/developers/{developerId}/merchants/{postalReportingNumber}/autorefillrule

Summary

This operation retrieves the auto refill settings for a merchant’s PB Postage Account. If auto refill is enabled (which is the default), the postage account automatically replenishes by a pre-determined amount when the balance falls below the pre-determined refill threshold.

This API operation retrieves the refill settings; to change the settings, see Update Auto Refill Settings.

For more information on auto refill, see When does auto refill trigger?

Request URLs

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

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, invoke the Get Merchants API.

Request Headers

Name


Description

Authorization

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

Content-Type

Required. The media type of the request entity. Set this to application/json.

X-PB-UnifiedErrorStructure

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

Response Elements

Name

Data Type

Description

merchantID

String

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

Note: The paymentAccountNumber is different from the merchant’s postalReportingNumber.

threshold

Number

The amount at which the merchant’s PB Postage Account is refilled. The account refills when the balance falls below this value. For more information, see When does auto refill trigger?

addAmount

Number

The amount added to the merchant’s PB Postage Account when the balance falls below the threshold value. For more information, see When does auto refill trigger?

enabled

Boolean

If set to true, automatic refill is enabled.

Sample Request

curl -X GET ".../v1/developers/12345678/merchants/9024324564/autorefillrule" \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-UnifiedErrorStructure: true"

Sample Response

{
    "merchantId": "12345678",
    "threshold": 100,
    "addAmount": 400,
    "enabled": true
}

Error Codes

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