Download and Import OpenAPI Specifications
To simplify testing, download the OpenAPI specifications for the OAuth and Address Verification APIs:
1.Navigate to the OAuth API section and click Download to get the OpenAPI (YAML) specification for version 3.0.2.
2.Download the OpenAPI specification for Address Verification version 3.1.0.
3.Import these YAML files into Postman for testing purposes.
Install and Configure Postman
To begin testing USPS® endpoints, install Postman:
1.Go to Postman Download and download the appropriate version for your operating system.
2.Install and open Postman.
3.Import the downloaded YAML files into Postman by clicking Import in the top left corner and selecting the YAML files.
4.Once imported, you will see the endpoints and can test the USPS integration using the credentials you obtained.
Test OAuth and Address Verification Endpoints
With Postman configured, proceed to test the USPS APIs:
1.Generate OAuth Tokens:
a.Open the USPS OAuth 2.0 folder and select the Generate OAuth tokens request.
b.Enter the required parameters, such as grant_type, client_id, and client_secret.
c.Click Send to generate an access token. If successful, you will see a response containing an access_token.
2.Test Address Verification Endpoint:
a.Open the USPS Addresses folder and select the StreetAddress request.
b.Enter the required parameters, such as streetAddress, city, state, ZIPCode, and ZIPPlus4.
c.Click Send to verify the address. The response will contain details about the verified address.
Monitor API Usage and Test Credentials
1.After setting up the credentials, access the Analytics section of your app to monitor API usage.
2.Use Test Credentials to ensure your connection works as expected before integrating with PerfectApps.
Next Step: Integrate USPS in PerfectApps