Get Carrier License Agreement

Note

This feature is available in the Sandbox environment.

HTTP Request

GET /v1/carrier/licenseagreements?carrier={carrier}&originCountryCode={two-character-ISO-code}

Summary

This operation retrieves a carrier’s license agreement. The operation is used in the Carrier Registration Tutorial.

Consideration

If you are retrieving the license agreement for UPS, UPS might return the agreement with escape characters (e.g. \n, \t, \"). You should substitute the escape characters with the control characters or punctuation marks.

Request URIs

Sandbox: https://api-sandbox.pitneybowes.com/shippingservices/v1/carrier/licenseagreements?carrier={carrier}&originCountryCode={two-character-ISO-code}
Production: https://api.pitneybowes.com/shippingservices/v1/carrier/licenseagreements?carrier={carrier}&originCountryCode={two-character-ISO-code}

Query Parameters

Name Description
carrier

Required. The carrier.

Valid value:

  • UPS
originCountryCode

Required. The two-character ISO country code for the origin country.

Valid values: US

Request Headers

Name Description
Authorization Required. OAuth token generated using the Generate an OAuth Token API.
X-PB-UnifiedErrorStructure
Recommended. Set this to true to use the standard error object if an error occurs.

Response Element

Name Description
licenseText The license agreement.

Sample Request

curl -X GET .../v1/carrier/licenseagreements?carrier=UPS&originCountryCode=US \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-UnifiedErrorStructure: true"

Sample Response

{
    "licenseText": "<text>"
}

Error Codes

For a list of all PB Complete Shipping APIs error codes, see Error Codes.