Skip to content

Instantly share code, notes, and snippets.

@kreas
Last active March 14, 2017 22:13
Show Gist options
  • Save kreas/551bcd17a7ab53ae82e458e9a3831e3c to your computer and use it in GitHub Desktop.
Save kreas/551bcd17a7ab53ae82e458e9a3831e3c to your computer and use it in GitHub Desktop.
// GET request to sleepcoach.com
// Authorization "Sleepcoach Authentication Token"
{
"patients": [
{ "first_name": "Tim",
"last_name": "Warren",
//company name has to be same as in Brighttree
"company_name": "MNSLLS",
"deliviery_address": {
"street_addresss": "1234 Test Address",
"city": "Columbia",
"state": "TN",
"zip": "38401"
},
"orders": [
{
"order_number": "12341234",
"order_date": "2017-03-14",
"line_items": [
{ "item_id": "1122446",
"qty": 3
},
{ "item_id": "1122445",
"qty": 2
}
]
}
]
}
]
}
//extension sends to BT
//success Post below
// POST request
// update the state of the order.
{
"invoice_number": "blah",
"post_to_bt_status" "completed"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment