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
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"
                }
            },
            "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"
        }
      },
      "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);

Parameters

Type Name Schema
Body body
required
body

body

Name Description Schema
deliveries
required
< Delivery > array
express
optional
False if you want to avoid listing express quotes.
Default : true
boolean
flexible
optional
True if you want to list flexible quote times, for same day delivery
Default : false
boolean
limit
optional
Maximum number of quotes to be returned integer
timeslots
optional
False if you want to avoid listing express with time slots, for same day delivery
Default : true
boolean

Responses

HTTP Code Description Schema
200 Success Response 200
400 Bad request Response 400
500 Internal Server error Response 500

Response 200

Name Description Schema
message
optional
Quotes created successfully string
payload
optional
Payload response payload

payload

Name Description Schema
expressQuotes
optional
Quote
flexibleQuotes
optional
Quote
steps
optional
< Step > array
timeQuotes
optional
List of time slot quotes available < Quote > array

Response 400

Name Description Schema
message
optional
Invalid request string
payload
optional
{ } object

Response 500

Name Description Schema
message
optional
An error occurred during the quotes generation. string
payload
optional
object

results matching ""

    No results matching ""