Quotes

Quotes are the price estimation for a given set of deliveries. They can be selected based on the pickup time windows or delivery time windows. They are expressed based on the proximity time from the time the quote was required: express quote or regular quote.


Generate Quotes

POST /deliveries/quotes

Get a new set of quotes

Description

List the quotes available for a given delivery(or set of deliveries).

date => If you'd like to set the pickup time when the delivery has to get started. (UNIXTIMESTAMP in ms)(Optional)

deliveries => List of deliveries

express => false if you want to avoid listing express quotes.(Default: true, Optional)

flexible => true if you want to list flexible quote times, for same day delivery (Default: false, Optional)

limit => Maximum number of quotes to be returned (Optional, integer)

timeslots => false if you want to avoid listing express with time slots, for same day delivery. (Default: true, Optional)

curl -X POST \
  https://api.shippify.co/v1/deliveries/quotes/ \
  -H 'authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -H 'content-type: application/json' \
  -d '{
    "deliveries": [
        {
            "pickup": {
                "contact": {
                    "name": "John Doe", 
                    "email": "john@doe.com",
                    "phonenumber": "+19209489292"
                },
                "location": {
                    "address": "Central Park, New York, NY, United States",
                    "instructions": "Central Park West, APT 10920"
                },
                "date": 1578787200000
            },
            "dropoff":{
                "contact": {
                    "name": "Mary Doe", 
                    "email": "mary@doe.co",
                    "phonenumber": "+19209085222"
                },
                "location": {
                    "address": "200 Eastern Pkwy, Brooklyn, NY 11238, USA",
                    "instructions": "APT 2094",
                    "lat": 40.6720036,
                    "lng": -73.9593279
                }
            },
            "packages": [
                 {
                    "name": "paperwork1",
                    "size": "xs",
                    "qty": 1
                }
                ]
        }

        ]
}'
var data = JSON.stringify({
  "deliveries": [
    {
      "pickup": {
        "contact": {
          "name": "John Doe",
          "email": "john@doe.com",
          "phonenumber": "+19209489292"
        },
        "location": {
          "address": "Central Park, New York, NY, United States",
          "instructions": "Central Park West, APT 10920"
        },
        "date": 1578787200000
      },
      "dropoff": {
        "contact": {
          "name": "Mary Doe",
          "email": "mary@doe.co",
          "phonenumber": "+19209085222"
        },
        "location": {
          "address": "200 Eastern Pkwy, Brooklyn, NY 11238, USA",
          "instructions": "APT 2094",
          "lat": 40.6720036,
          "lng": -73.9593279
        }
      },
      "packages": [
        {
          "name": "paperwork1",
          "size": "xs",
          "qty": 1
        }
      ]
    }
  ]
});

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/quotes/");
xhr.setRequestHeader("authorization", "Basic XXXXXXXXXXXXXXXXXXXXXXX");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

Responses

200|Success

{
  message: "quotes created successfully",
  payload: {
            "slots": [
            {
                "quoteId": 136498,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518267600000,
                "pickupEndTime": 1518271200000,
                "dropoffStartTime": 1518271200000,
                "dropoffEndTime": 1518274800000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518274800000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },

            {
                "quoteId": 136507,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518300000000,
                "pickupEndTime": 1518303600000,
                "dropoffStartTime": 1518303600000,
                "dropoffEndTime": 1518307200000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518307200000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },
            {
                "quoteId": 136508,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518303600000,
                "pickupEndTime": 1518307200000,
                "dropoffStartTime": 1518307200000,
                "dropoffEndTime": 1518310800000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518310800000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },
            {
                "quoteId": 136509,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518307200000,
                "pickupEndTime": 1518310800000,
                "dropoffStartTime": 1518310800000,
                "dropoffEndTime": 1518314400000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518314400000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },
            {
                "quoteId": 136510,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518310800000,
                "pickupEndTime": 1518314400000,
                "dropoffStartTime": 1518314400000,
                "dropoffEndTime": 1518318000000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518318000000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            }
        ],
        "express": {
            "quoteId": 136514,
            "city": 2,
            "pickup": [
                {
                    "contact": {
                        "name": "Wander b",
                        "email": "wander@me.cu"
                    },
                    "location": {
                        "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                        "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                        "lat": -2.1629639,
                        "lng": -79.89776359999999
                    }
                }
            ],
            "dropoff": [
                {
                    "contact": {
                        "name": "Andres b",
                        "email": "andresr@me.cu"
                    },
                    "location": {
                        "instructions": "Sauces 9, Guayaquil",
                        "address": "Sauces 9, Guayaquil 090505, Ecuador",
                        "lat": -2.1323186,
                        "lng": -79.8926809
                    }
                }
            ],
            "cost": 3.26,
            "currencyCode": "USD",
            "currency": "USD",
            "pickupStartTime": 1518304378591,
            "pickupEndTime": 1518306178591,
            "dropoffStartTime": 1518306178591,
            "dropoffEndTime": 1518307978591,
            "expiration": 30,
            "pickupMaxAvailableTime": 1518307978591,
            "isFlexible": false,
            "companyId": "654",
            "size": [
                "3"
            ],
            "distance": [
                "5.1"
            ],
            "subtotal": [
                "3.26"
            ]
        },
        "flex": {
            "quoteId": 136497,
            "city": 2,
            "pickup": [
                {
                    "contact": {
                        "name": "Wander b",
                        "email": "wander@me.cu"
                    },
                    "location": {
                        "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                        "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                        "lat": -2.1629639,
                        "lng": -79.89776359999999
                    }
                }
            ],
            "dropoff": [
                {
                    "contact": {
                        "name": "Andres b",
                        "email": "andresr@me.cu"
                    },
                    "location": {
                        "instructions": "Sauces 9, Guayaquil",
                        "address": "Sauces 9, Guayaquil 090505, Ecuador",
                        "lat": -2.1323186,
                        "lng": -79.8926809
                    }
                }
            ],
            "cost": 3.26,
            "currencyCode": "USD",
            "currency": "USD",
            "pickupStartTime": 1518008400000,
            "pickupEndTime": 1518026400000,
            "dropoffStartTime": 1518026400000,
            "dropoffEndTime": 1518044400000,
            "expiration": 30,
            "pickupMaxAvailableTime": 1518030000000,
            "isFlexible": true,
            "companyId": "654",
            "size": [
                "3"
            ],
            "distance": [
                "5.1"
            ],
            "subtotal": [
                "3.26"
            ]
        },
        "steps": {}
  }
}

{
  message: "quotes created successfully",
  payload: {
        "slots": [
            {
                "quoteId": 136498,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518267600000,
                "pickupEndTime": 1518271200000,
                "dropoffStartTime": 1518271200000,
                "dropoffEndTime": 1518274800000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518274800000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },

            {
                "quoteId": 136507,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518300000000,
                "pickupEndTime": 1518303600000,
                "dropoffStartTime": 1518303600000,
                "dropoffEndTime": 1518307200000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518307200000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },
            {
                "quoteId": 136508,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518303600000,
                "pickupEndTime": 1518307200000,
                "dropoffStartTime": 1518307200000,
                "dropoffEndTime": 1518310800000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518310800000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },
            {
                "quoteId": 136509,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518307200000,
                "pickupEndTime": 1518310800000,
                "dropoffStartTime": 1518310800000,
                "dropoffEndTime": 1518314400000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518314400000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            },
            {
                "quoteId": 136510,
                "city": 2,
                "pickup": [
                    {
                        "contact": {
                            "name": "Wander b",
                            "email": "wander@me.cu"
                        },
                        "location": {
                            "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                            "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                            "lat": -2.1629639,
                            "lng": -79.89776359999999
                        }
                    }
                ],
                "dropoff": [
                    {
                        "contact": {
                            "name": "Andres b",
                            "email": "andresr@me.cu"
                        },
                        "location": {
                            "instructions": "Sauces 9, Guayaquil",
                            "address": "Sauces 9, Guayaquil 090505, Ecuador",
                            "lat": -2.1323186,
                            "lng": -79.8926809
                        }
                    }
                ],
                "cost": 3.26,
                "currencyCode": "USD",
                "currency": "USD",
                "pickupStartTime": 1518310800000,
                "pickupEndTime": 1518314400000,
                "dropoffStartTime": 1518314400000,
                "dropoffEndTime": 1518318000000,
                "expiration": 30,
                "pickupMaxAvailableTime": 1518318000000,
                "isFlexible": false,
                "companyId": "654",
                "size": [
                    "3"
                ],
                "distance": [
                    "5.1"
                ],
                "subtotal": [
                    "3.26"
                ]
            }
        ],
        "express": {
            "quoteId": 136514,
            "city": 2,
            "pickup": [
                {
                    "contact": {
                        "name": "Wander b",
                        "email": "wander@me.cu"
                    },
                    "location": {
                        "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                        "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                        "lat": -2.1629639,
                        "lng": -79.89776359999999
                    }
                }
            ],
            "dropoff": [
                {
                    "contact": {
                        "name": "Andres b",
                        "email": "andresr@me.cu"
                    },
                    "location": {
                        "instructions": "Sauces 9, Guayaquil",
                        "address": "Sauces 9, Guayaquil 090505, Ecuador",
                        "lat": -2.1323186,
                        "lng": -79.8926809
                    }
                }
            ],
            "cost": 3.26,
            "currencyCode": "USD",
            "currency": "USD",
            "pickupStartTime": 1518304378591,
            "pickupEndTime": 1518306178591,
            "dropoffStartTime": 1518306178591,
            "dropoffEndTime": 1518307978591,
            "expiration": 30,
            "pickupMaxAvailableTime": 1518307978591,
            "isFlexible": false,
            "companyId": "654",
            "size": [
                "3"
            ],
            "distance": [
                "5.1"
            ],
            "subtotal": [
                "3.26"
            ]
        },
        "flex": {
            "quoteId": 136497,
            "city": 2,
            "pickup": [
                {
                    "contact": {
                        "name": "Wander b",
                        "email": "wander@me.cu"
                    },
                    "location": {
                        "instructions": "Av. Francisco de Orellana, Guayaquil 090512",
                        "address": "Av. Francisco de Orellana, Guayaquil, Ecuador",
                        "lat": -2.1629639,
                        "lng": -79.89776359999999
                    }
                }
            ],
            "dropoff": [
                {
                    "contact": {
                        "name": "Andres b",
                        "email": "andresr@me.cu"
                    },
                    "location": {
                        "instructions": "Sauces 9, Guayaquil",
                        "address": "Sauces 9, Guayaquil 090505, Ecuador",
                        "lat": -2.1323186,
                        "lng": -79.8926809
                    }
                }
            ],
            "cost": 3.26,
            "currencyCode": "USD",
            "currency": "USD",
            "pickupStartTime": 1518008400000,
            "pickupEndTime": 1518026400000,
            "dropoffStartTime": 1518026400000,
            "dropoffEndTime": 1518044400000,
            "expiration": 30,
            "pickupMaxAvailableTime": 1518030000000,
            "isFlexible": true,
            "companyId": "654",
            "size": [
                "3"
            ],
            "distance": [
                "5.1"
            ],
            "subtotal": [
                "3.26"
            ]
        },
        "steps": {}
  }
}

400|Bad Request

{
  message: "Bad Request",
  payload: { }
}
{
  message: "Bad Request",
  payload: { }
}

500|Internal Server error

{
message: "Error while retrieving the quote",
payload: { }
}
{
  message: "Error while retrieving the quote",
  payload: { }
}

results matching ""

    No results matching ""