Skip to content

Instantly share code, notes, and snippets.

@mikepaszkiewicz
Last active July 19, 2017 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikepaszkiewicz/576bfc5bf337641c762778b98ef581a0 to your computer and use it in GitHub Desktop.
Save mikepaszkiewicz/576bfc5bf337641c762778b98ef581a0 to your computer and use it in GitHub Desktop.
dispatch.orders.post
curl -XPOST 'https://sandbox.tryhabitat.com/api/v1/orders' -H "Content-type: application/json" -d '{
"externalId": 1876,
"externalVendorId": 101,
"sellerId": "gRWS4txHe3g43AtNm",
"method": "Delivery",
"deliveryAddress": "2198 N Broad St",
"status": "pending_runner",
"customer":{
"name": "Tyler Wiest",
"phone": "2169052356",
"email": "tyler@jarv.us"
},
"DaaSType": "cash",
"placedAt": "2017-06-28T11:31:13.-14400Z",
"expectedAt": "2017-06-28T12:11:13.-14400Z",
"plainOrder":[
{
"itemName": "Chicken Teriyaki",
"itemCategory": "Chicken Teriyaki",
"itemInstructions": "Here are some special instructions.",
"itemPrice": 6,
"quantity": 2,
"modifiersText": [{
"name": "Not Spicy",
"category": "Choose your Asian Entree Style",
"price": 0
}]
},
{
"itemName": "Korean Hoagie",
"itemCategory": "Korean Hoagie",
"itemInstructions": "",
"itemPrice": 6,
"quantity": 1,
"modifiersText": []
}],
"payRef": {
"total": 30,
"tax": 2,
"tip": 0
},
"api_key": "YOUR_API_KEY"
}'
@mikepaszkiewicz
Copy link
Author

mikepaszkiewicz commented Jun 28, 2017

Changes:

  • isDelivery -> method: 'Pickup' || 'Delivery'
  • customer:
    • remove firstName / lastName -> name: String
  • orderType -> DaaSType: credit_card, prepaid, or cash
  • order -> plainOrder: []
  • order.modifiers -> plainOrder.modifiersText: []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment