Update a Known Shipper - Partial

HTTP Request

PATCH /v1/developers/{developerId}/merchant/{merchantId}/updateMerchant

Summary

This operation updates the email address or phone number or both for a merchant who was registered as a known shipper through the Register a Merchant as a Known Shipper API.

Considerations

  1. The API overwrites all the fields listed in the Request Elements table.

  2. The phone number, email address, or both can be included in the request.

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 postalReportingNumber field retrieved through 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-TransactionId

Required. A unique identifier for the transaction, up to 25 characters. The following characters are allowed: letters, numbers, hyphens (-), and underscores (_).

Important: Ensure this is a unique ID.

Request Elements

Note

Either the phone or email or both can be sent.

Name

Data Type

Description

phone

String

Required. A valid 10-digit number. The string should contain 10 numeric characters and no additional characters. For example: "8442566444"

email

String

Required. The email address.

Response Elements

Name

Data Type

Description

knownShipperRegistration

object

Confirmed data saved in the Known Shipper Registry.

id

String

Known Shipper ID that matches the merchant’s Shipper ID.

typeOfId

String

Type of ID for the Known Shipper Registration.

productType

String

Product registered with the Merchant.

contactName

String

Merchant’s contact name.

companyName

String

Merchants Company Name.

addressLine1

String

First line of the address registered.

city

String

The city or town.

state

String

The state or province.

zip

String

The Postal or ZIP code.

contactPhone

String

The 10-digit phone number.

contactEmail

String

The email address.

created

String

Date the merchant was registered.

modified

String

Date the merchant was last modified.

Sample Request

curl --location --request PATCH ".../v1/developers/{developerId}/merchant/{merchantId}/updateMerchant" \
  --header 'Authorization: Bearer <oauth_token>" \
  --header 'Content-Type: application/json' \
  --header 'X-PB-TransactionId: <unique_id>" \
  --data-raw '{
       "phone": "7855551212",
       "email": "jill@example.com"
    }'

Sample Response

 {
 "knownShipperRegistration": {
     "id": "123456798",
     "typeOfId": "KnownShipperNumber",
     "productType": "ShippingApi",
     "contactName": "Jill Smith",
     "companyName": "Mayfair Hospital",
     "addressLine1": "2360 Mayfair Dr",
     "city": "Salina",
     "state": "KS",
     "zip": "67401",
     "contactPhone": "7855551212",
     "contactEmail": "jill@example.com",
     "created": "2018-05-08T14:05:15.745808",
     "modified": "2023-09-14T12:38:48.8211103Z"
   }
}

Error Codes

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