Skip to content

Instantly share code, notes, and snippets.

@robertbanh
Last active November 20, 2017 21:53
Show Gist options
  • Save robertbanh/31ab61f79f196528e8f34f235397fb3a to your computer and use it in GitHub Desktop.
Save robertbanh/31ab61f79f196528e8f34f235397fb3a to your computer and use it in GitHub Desktop.
Shipping API
curl 'https://api.shipengine.com/v1/labels' -X POST \
-H "Content-type: application/json" \
-H "api-key: dmtzyBFq9DsGMGd1GkzHilzeEAKsyyRyxQH3cz7M+Lo" \
-d '
{
"shipment": {
"service_code": "usps_priority_mail",
"ship_to": {
"name": "Dade Murphy",
"phone": "+1 (212) 555-5555",
"company_name": "Zero Cool",
"address_line1": "345 Chambers Street",
"city_locality": "New York City",
"state_province": "NY",
"postal_code": "10282",
"country_code": "US"
},
"ship_from": {
"name": "Shippy",
"phone": "512-485-4282",
"company_name": "ShipStation",
"address_line1": "3800 N. Lamar Blvd.",
"address_line2": "Suite 220",
"city_locality": "Austin",
"state_province": "TX",
"postal_code": "78756",
"country_code": "US"
},
"packages": [
{
"weight": {
"value": 1.0,
"unit": "ounce"
}
}
]
},
"test_label": true
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment