Countries List¶
HTTP Request¶
GET /v1/countries?carrier={carrier}&originCountryCode={two-character-ISO-code}
Summary¶
This operation returns a list of supported destination countries to which the carrier offers international shipping services.
Request URLs¶
Sandbox: https://shipping-api-sandbox.pitneybowes.com/shippingservices/v1/countries?carrier={carrier}&originCountryCode={two-character-ISO-code}
Production: https://shipping-api.pitneybowes.com/shippingservices/v1/countries?carrier={carrier}&originCountryCode={two-character-ISO-code}
Query Parameters¶
Name |
Description |
---|---|
carrier |
Required. Carrier. Valid value: |
originCountryCode |
Required. The two-character ISO country code for the origin country. Valid value: |
Request Header¶
Name |
Description |
---|---|
Authorization |
Required. OAuth token generated using the Generate an OAuth Token API. |
X-PB-UnifiedErrorStructure |
Recommended. Set this to |
Response Elements¶
The operation returns an array of Country Objects. A Country Object contains the following fields:
Name |
Data Type |
Description |
---|---|---|
countryCode |
String |
The two-character ISO country code. |
countryName |
String |
Country name. |
Sample Request¶
curl -X GET ".../v1/countries?originCountryCode=US&carrier=USPS" \
-H "Authorization: Bearer <oauth_token>" \
-H "X-PB-UnifiedErrorStructure: true"
Sample Response¶
[
{
"countryCode": "BF",
"countryName": "Burkina Faso"
},
{
"countryCode": "DK",
"countryName": "Denmark"
},
{
"countryCode": "NP",
"countryName": "Nepal"
},
...
]
Error Codes¶
For a list of all error codes returned by the Ecommerce APIs, please see Error Codes.