Update a Known Shipper¶
HTTP Request¶
PUT /v1/developers/{developerId}/merchant/{merchantId}/updateMerchant
Summary¶
This operation updates the information for a merchant who was registered as a known shipper through the Register a Merchant as a Known Shipper API.
Considerations¶
The API overwrites all the fields listed in the Request Elements table.
All the fields in the Request Elements table are mandatory, except for the conditional
name
andcompany
fields.You must pass at least one of the two conditional fields:
name
andcompany
. However, if you pass only one, the value you pass will be used for both fields.If you pass both
name
andcompany
, you can assign separate values to each.The API validates the address and makes corrections.
Request URLs¶
Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/v1/developers/{developerId}/merchant/{merchantId}/updateMerchant
Production: https://shipping-api.pitneybowes.com/shippingservices/v1/developers/{developerId}/merchant/{merchantId}/updateMerchant
Path Parameters¶
Name |
Description |
---|---|
developerId |
Required. Your Pitney Bowes developer ID. |
merchantId |
Required. The merchant’s Shipper ID. The Shipper ID is found in the |
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-TransactionId |
Required. A unique identifier for the transaction, up to 25 characters. The following characters are allowed: letters, numbers, hyphens ( Important: Ensure this is a unique ID. |
Request Elements¶
Name |
Data Type |
Description |
---|---|---|
addressLines |
Array[String] |
Required. Street address, including apartment number if applicable. You can specify up to 3 address lines. The address cannot be a P.O. Box. |
cityTown |
String |
Required. The city or town. |
stateProvince |
String |
Required. The state or province. For a US or Canadian address, use the 2-letter state or province code. |
postalCode |
String |
Required. The Postal or ZIP code. For US addresses, either the 5-digit or 9-digit ZIP code. |
countryCode |
String |
Required. The two-character country code from the ISO country list. |
name |
String |
Conditional. The merchant’s name. The API requires that either the name field or company field be included in the request. Note, however, that if you include only one of these fields, the value sent for that field will be assigned to both fields. |
company |
String |
Conditional. The company name. The API requires that either the name field or company field be included in the request. Note, however, that if you include only one of these fields, the value sent for that field will be assigned to both fields. |
phone |
String |
Required. A valid 10-digit number. The string should contain 10 numeric characters and no additional characters. For example: |
String |
Required. The email address. |
Response Elements¶
Name |
Data Type |
Description |
---|---|---|
addressLines |
Array[String] |
Street address up to 3 address lines. |
cityTown |
String |
The city or town. |
stateProvince |
String |
The state or province. |
postalCode |
String |
The Postal or ZIP code. |
countryCode |
String |
The two-character country code. |
company |
String |
The company name. If the company field was not passed in the request, then this is the value passed for the name field. |
phone |
String |
The 10-digit phone number. |
String |
The email address. |
Sample Request¶
curl -X PUT ".../v1/developers/{developerId}/merchant/{merchantId}/updateMerchant" \
-H "Authorization: Bearer <oauth_token>" \
-H "Content-Type: application/json" \
-H "X-PB-TransactionId: <unique_id>" \
-d '
{
"addressLines": [
"2360 Mayfair Dr"
],
"cityTown": "Salina",
"stateProvince": "KS",
"postalCode": "67401",
"countryCode": "US",
"name": "Jill Andrews",
"company": "Supplies",
"phone": "7855551212",
"email": "jill@example.com"
}'
Sample Response¶
{
"addressLines": [
"2360 Mayfair Dr"
],
"cityTown": "Salina",
"stateProvince": "KS",
"postalCode": "674016927",
"company": "Supplies",
"phone": "7855551212",
"email": "jill@example.com"
}
Error Codes¶
For a list of all error codes returned by the Ecommerce APIs, please see Error Codes.