Skip to main content

US Post Office Workflows

The US Post Office has a number of APIs to simplify shipping.

The workflows below further abstract the APIs - taking account of many important features. The USPS requests and responses are all XML, and these workflows manage the conversions so that the inputs and outputs are JSON.

check_address

The USPS can verify 160M addresses in the USA. This workflow wither either respond with the USPS version of the address (often in all CAPS), or with an error that the address was not found.

See it in Orkes Playground

Note: This workflow requires a USPS username to be run. Change the name of the workflow - to save in your Playground, and add your USPS Username in the Set_USPS_Name task. The API access is free.

check address workflow

Sample input:

{
"street": "100 Winchester Circle",
"city": "Los Gatos",
"state": "CA"
}

postage_rate

Given a toZip and fromZip, and some dimensions of the box (and the shipping type), this workflow will output the price for that shipping type.

See it in Orkes Playground

Note: This workflow requires a USPS username to be run. Change the name of the workflow - to save in your Playground, and add your USPS Username in the Set_USPS_Name task. The API access is free.

postage rate workflow

sample input:

{
"service": "priority",
"zipFrom": "04046",
"zipTo": "98260",
"pounds": 20,
"ounces": 0,
"container": "variable",
"width": 12,
"height": 12,
"length": 12
}

Run this workflow multiple times inside a fork to obtain mailing rates for different services (e.g. compare ground vs. priority vs express by calling this workflow asynchronously 3 times).