Skip to content

Commit 2676736

Browse files
Merge pull request #58 from USPS/jared-i-cohen-usps-patch-2
Update README.md - Language/Formatting Updates
2 parents 452f5a1 + 80ce739 commit 2676736

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

README.md

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
# USPS API
22
The USPS Developer Portal is for software developers who would like to integrate Postal Service functionality into their ecommerce, shipping, or logistics systems. Access and use USPS tools and resources conveniently within your site or application. You have the ability to try out the APIs in our Test environment.
33

4-
## Getting Started in Test Environment
5-
To use the USPS APIs in the Test Environment you must be a registered user.
6-
1. Apply for a free USPS.com account.
7-
2. Access the [USPS Test (CAT) Business Customer Gateway](https://gateway-cat.usps.com/eAdmin/view/signin) and follow the prompts to create a USPS.com business account.
8-
3. Using your USPS account, access the [USPS Test (CAT) Developer Portal](https://developers-cat.usps.com) by clicking the Sign Up / Login link.
9-
4. Registering your application and retrieve your consumer key and consumer secret from the credential section.
10-
5. Additionally you will need to have a Customer ID (CRID) and Mailer ID (MID)
11-
12-
## Getting Started in Production
13-
To use the USPS APIs you must be a registered user.
4+
## Getting Started
5+
To use the USPS APIs in Production and the Test Environment you must be a registered user.
146
1. Apply for a free USPS.com account.
157
2. Access the [Business Customer Gateway](https://gateway.usps.com/eAdmin/view/signin) and follow the prompts to create a USPS.com business account.
168
3. Using your USPS account, access the [USPS Developer Portal](https://developers.usps.com) by clicking the Sign Up / Login link.
179
4. Registering your application and retrieve your consumer key and consumer secret from the credential section.
1810
5. Additionally, you will need to have a Customer ID (CRID) and Mailer ID (MID)
1911

2012
## Using the APIs in the USPS Test Environment
21-
All USPS APIs listed below are Production URL. To use the API in Test Environment you need to change the URL from https://apis.usps.com to https://apis-cat.usps.com.
13+
All USPS APIs listed below are Production URL. To use the API in Test Environment you need to change the URL from https://apis.usps.com to https://apis-tem.usps.com.
2214

2315
## OAuth Token
2416
Your exclusive access to USPS APIs is protected using OAuth 2.0 industry standards. All USPS APIs require an OAuth 2.0 access token to be conveyed in the `Authorization` header, using the `Bearer` token scheme. Once you sign-in to the API developer portal, you may get the OAuth credentials you will need to register your application `Add App`. See "Getting Started" for further information about signing-in, registering your application, and additional USPS account credentials you will need to integrate your application with USPS APIs. You are responsible for securing the application credentials once issued. Please contact USPS if your credentials have been disclosed to external parties and we will issue new credentials.
@@ -53,7 +45,7 @@ curl -X 'POST' 'https://apis.usps.com/oauth2/v3/token' \
5345
"expires_in": "11111",
5446
"status": "approved",
5547
"scope": "addresses service-delivery-standards locations prices tracking labels",
56-
"issuer": "api.usps.com",
48+
"issuer": "https://keyc.usps.com/realms/USPS",
5749
"client_id": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
5850
"application_name": "XXXXXX-XXXX-XXXX-XXX-XXXXXXXXXXXX",
5951
"api_products": "[XXXXXXX]",
@@ -156,7 +148,6 @@ This API supports ZIP Code and City/State lookups and validates and standardizes
156148
```sh
157149
curl -X 'GET' 'https://apis.usps.com/addresses/v3/address?streetAddress=3120%20M%20St&secondaryAddress=NW&city=Washington&state=DC&ZIPCode=20027&ZIPPlus4=3704' \
158150
--header 'accept: application/json' \
159-
--header 'x-user-id: XXXXXXXXXXXX' \
160151
--header 'authorization: Bearer $TOKEN' \
161152
```
162153
Response:
@@ -196,7 +187,6 @@ Returns city and state corresponding to a given ZIP code.
196187
```sh
197188
curl -X 'GET' 'https://apis.usps.com/addresses/v3/city-state?ZIPCode=30022' \
198189
--header 'accept: application/json' \
199-
--header 'X-User-Id: XXXXXXXXXXX' \
200190
--header 'Authorization: Bearer $TOKEN' \
201191
```
202192
Response:
@@ -211,7 +201,6 @@ Returns the ZIP Code and ZIP Code + 4 corresponding to the given address, city,
211201
```sh
212202
curl -X 'GET' 'https://apis.usps.com/addresses/v3/zipcode?streetAddress=1273%20Pale%20San%20Vitores%20RD&city=Tamuning&state=GU' \
213203
--header 'accept: application/json' \
214-
--header 'x-user-id: XXXXXXXXXXXX' \
215204
--header 'authorization: Bearer $TOKEN' \
216205
```
217206
Response:

0 commit comments

Comments
 (0)