var data = JSON.stringify({
"phonenumber": "+19209489292"
"address": "Central Park, New York, NY, United States",
"instructions": "Central Park West, APT 10920 "
"phonenumber": "+19209085222"
"address": "200 Eastern Pkwy, Brooklyn, NY 11238, USA",
"instructions": "APT 2094",
"dueDate": "1628632740000"
"extraInvoice": "INVOICE_1525909_2",
"invoiceGrouping": "GROUP_1"
"referenceId": "INVOICE_1525909",
"tags":["tag1","tag2","tag3"]
"groupId": "7a901210-d46f-11e7-2018-01-01"
// instead of "flexible: true" you can also specify a quoteID
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
xhr.open("POST", "https://api.shippify.co/v1/deliveries/");
xhr.setRequestHeader("authorization", "Basic XXXXXXXXXXXXXXXXXXXX");
xhr.setRequestHeader("content-type", "application/json");