Update Auto Refill Settings¶
HTTP Request¶
POST /v1/developers/{developerId}/merchants/{postalReportingNumber}/autorefillrule
Summary¶
This operation updates the auto refill settings on a merchant’s PB Postage Account. To retrieve the current settings, see Get 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 |
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 |
X-PB-UnifiedErrorStructure |
Recommended. Set this to |
Request / Response Elements¶
Name |
Data Type |
Description |
---|---|---|
merchantID |
String |
Required. The value of this field depends on whether the object is part of the request or the response:
Note: The merchant’s |
threshold |
Number |
Defines 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? Required if you are doing any of the following:
Important: If you do not include this field, the value is |
addAmount |
Number |
Defines the amount added to the merchant’s PB Postage Account when the balance falls below the Required if you are doing any of the following:
Important: If you do not include this field, the value is |
enabled |
Boolean |
If set to Note: If you do not include this field, the value is set to |
Sample Request¶
curl -X POST ".../v1/developers/12345678/merchants/9024324564/autorefillrule" \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-UnifiedErrorStructure: true" \
-d '
{
"merchantId": "9024324564",
"threshold": 200,
"addAmount": 500,
"enabled": true
}'
Sample Response¶
{
"merchantId": "12345678",
"threshold": 200,
"addAmount": 500,
"enabled": true
}
Error Codes¶
For a list of all error codes returned by the Ecommerce APIs, please see Error Codes.