Skip to content

Instantly share code, notes, and snippets.

@kevin-chau
Created November 18, 2016 06:44
Show Gist options
  • Save kevin-chau/7a8f381b6240f8cae1cdb2113d122cf9 to your computer and use it in GitHub Desktop.
Save kevin-chau/7a8f381b6240f8cae1cdb2113d122cf9 to your computer and use it in GitHub Desktop.
orders endpoint
curl https://api.goshippo.com/v1/orders/ \
-H "Authorization: ShippoToken <PRIVATE_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"to_address": {
"object_purpose": "PURCHASE",
"name": "Mrs. Hippo",
"company": "Shippo",
"street1": "965 Mission St.",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "US",
"phone": "+1 555 341 1111",
"email": "support@goshippo.com",
"metadata": "Customer ID 123456"
},
"items": [
{
"title": "Item 1",
"quantity": 12,
"weight": 12.12, # per item. *
"weight_unit": "lb", # *
"price": 45.00, # per item. *
"currency": "USD", # *
"variant_title": "blue",
"sku": "12222"
}
],
"total_tax": "12.00",
"total_price": "133.00",
"subtotal_price": "1.00",
"currency": "USD", # *
"shipping_method": "USPS-Box",
"shipping_cost": "3.45",
"shipping_cost_currency": "USD" # *
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment