POST api/v2/quotes

Request Information

URI Parameters

None.

Body Parameters

MerchantDeliveryBookingModel
NameDescriptionTypeAdditional information
ApiKey

Your merchant API key

globally unique identifier

Required

Booking

DeliveryBookingModel

Required

Request Formats

application/json, text/json

Sample:
{
  "apiKey": "630f252f-66b8-4b02-bfad-822ab907b782",
  "booking": {
    "reference": "sample string 1",
    "deliveryInstructions": "sample string 2",
    "itemsRequirePurchase": false,
    "items": [
      {
        "quantity": 1,
        "sku": "sample string 2",
        "description": "sample string 3",
        "price": 4.0
      },
      {
        "quantity": 1,
        "sku": "sample string 2",
        "description": "sample string 3",
        "price": 4.0
      }
    ],
    "pickupTime": "2019-10-15T11:11:40.8407042+00:00",
    "pickupDetail": {
      "name": "sample string 1",
      "phone": "sample string 2",
      "email": "sample string 3",
      "description": "sample string 4",
      "address": "sample string 5",
      "additionalAddressDetails": {
        "stateProvince": "sample string 1",
        "country": "sample string 2",
        "suburbLocality": "sample string 3",
        "postcode": "sample string 4",
        "latitude": 5.1,
        "longitude": 6.1
      }
    },
    "dropoffWindow": {
      "earliestTime": "2019-10-15T11:11:40.8407042+00:00",
      "latestTime": "2019-10-15T11:11:40.8407042+00:00"
    },
    "dropoffDetail": {
      "name": "sample string 1",
      "phone": "sample string 2",
      "email": "sample string 3",
      "description": "sample string 4",
      "address": "sample string 5",
      "additionalAddressDetails": {
        "stateProvince": "sample string 1",
        "country": "sample string 2",
        "suburbLocality": "sample string 3",
        "postcode": "sample string 4",
        "latitude": 5.1,
        "longitude": 6.1
      }
    },
    "customerFee": 4.0,
    "customerReference": "sample string 5",
    "tax": 1.0,
    "taxInclusivePrice": false,
    "tip": 1.0,
    "driverFeePercentage": 6.0,
    "driverMatchCode": "sample string 7",
    "deliverySequence": 8,
    "constraints": [
      {
        "name": "sample string 1",
        "value": "sample string 2"
      },
      {
        "name": "sample string 1",
        "value": "sample string 2"
      }
    ],
    "deliveryRouteIdentifier": "sample string 9",
    "webhooks": [
      {
        "eventName": "sample string 1",
        "url": "sample string 2"
      },
      {
        "eventName": "sample string 1",
        "url": "sample string 2"
      }
    ],
    "template": "sample string 10",
    "orderPrice": 1.0,
    "payments": [
      {
        "method": "CashOnDelivery",
        "amount": 1.0
      },
      {
        "method": "CashOnDelivery",
        "amount": 1.0
      }
    ]
  }
}

text/xml

Sample:
<MerchantDeliveryBookingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Swift.DeliveryAPI2">
  <ApiKey>630f252f-66b8-4b02-bfad-822ab907b782</ApiKey>
  <Booking>
    <Constraints>
      <JobConstraintModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </JobConstraintModel>
      <JobConstraintModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </JobConstraintModel>
    </Constraints>
    <CustomerFee>4</CustomerFee>
    <CustomerReference>sample string 5</CustomerReference>
    <DeliveryInstructions>sample string 2</DeliveryInstructions>
    <DeliveryRouteIdentifier>sample string 9</DeliveryRouteIdentifier>
    <DeliverySequence>8</DeliverySequence>
    <DriverFeePercentage>6</DriverFeePercentage>
    <DriverMatchCode>sample string 7</DriverMatchCode>
    <DropoffDetail>
      <AdditionalAddressDetails>
        <Country>sample string 2</Country>
        <Latitude>5.1</Latitude>
        <Longitude>6.1</Longitude>
        <Postcode>sample string 4</Postcode>
        <StateProvince>sample string 1</StateProvince>
        <SuburbLocality>sample string 3</SuburbLocality>
      </AdditionalAddressDetails>
      <Address>sample string 5</Address>
      <Description>sample string 4</Description>
      <Email>sample string 3</Email>
      <Name>sample string 1</Name>
      <Phone>sample string 2</Phone>
    </DropoffDetail>
    <DropoffWindow>
      <EarliestTime>2019-10-15T11:11:40.8407042+00:00</EarliestTime>
      <LatestTime>2019-10-15T11:11:40.8407042+00:00</LatestTime>
    </DropoffWindow>
    <Items>
      <DeliveryBookingItemModel>
        <Description>sample string 3</Description>
        <Price>4</Price>
        <Quantity>1</Quantity>
        <Sku>sample string 2</Sku>
      </DeliveryBookingItemModel>
      <DeliveryBookingItemModel>
        <Description>sample string 3</Description>
        <Price>4</Price>
        <Quantity>1</Quantity>
        <Sku>sample string 2</Sku>
      </DeliveryBookingItemModel>
    </Items>
    <ItemsRequirePurchase>false</ItemsRequirePurchase>
    <OrderPrice>1</OrderPrice>
    <Payments>
      <OrderPaymentModel>
        <Amount>1</Amount>
        <Method>CashOnDelivery</Method>
      </OrderPaymentModel>
      <OrderPaymentModel>
        <Amount>1</Amount>
        <Method>CashOnDelivery</Method>
      </OrderPaymentModel>
    </Payments>
    <PickupDetail>
      <AdditionalAddressDetails>
        <Country>sample string 2</Country>
        <Latitude>5.1</Latitude>
        <Longitude>6.1</Longitude>
        <Postcode>sample string 4</Postcode>
        <StateProvince>sample string 1</StateProvince>
        <SuburbLocality>sample string 3</SuburbLocality>
      </AdditionalAddressDetails>
      <Address>sample string 5</Address>
      <Description>sample string 4</Description>
      <Email>sample string 3</Email>
      <Name>sample string 1</Name>
      <Phone>sample string 2</Phone>
    </PickupDetail>
    <PickupTime>2019-10-15T11:11:40.8407042+00:00</PickupTime>
    <Reference>sample string 1</Reference>
    <Tax>1</Tax>
    <TaxInclusivePrice>false</TaxInclusivePrice>
    <Template>sample string 10</Template>
    <Tip>1</Tip>
    <Webhooks>
      <DeliveryEventWebhookModel>
        <EventName>sample string 1</EventName>
        <Url>sample string 2</Url>
      </DeliveryEventWebhookModel>
      <DeliveryEventWebhookModel>
        <EventName>sample string 1</EventName>
        <Url>sample string 2</Url>
      </DeliveryEventWebhookModel>
    </Webhooks>
  </Booking>
</MerchantDeliveryBookingModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

QuoteResponse
NameDescriptionTypeAdditional information
Quote

Quote

None.

Request

DeliveryBookingModel

None.

Response Formats

application/json, text/json

Sample:
{
  "quote": {
    "created": "2019-10-15T11:11:40.8407042+00:00",
    "start": "2019-10-15T11:11:40.8407042+00:00",
    "distanceKm": 3.1,
    "fee": {
      "cost": 1.0,
      "costCents": 100
    },
    "pickup": {
      "time": {
        "average": "2019-10-15T11:11:40.8407042+00:00",
        "earliest": "2019-10-15T11:11:40.8407042+00:00",
        "latest": "2019-10-15T11:11:40.8407042+00:00"
      },
      "address": "sample string 1"
    },
    "dropoff": {
      "time": {
        "average": "2019-10-15T11:11:40.8407042+00:00",
        "earliest": "2019-10-15T11:11:40.8407042+00:00",
        "latest": "2019-10-15T11:11:40.8407042+00:00"
      },
      "address": "sample string 1"
    }
  },
  "request": {
    "reference": "sample string 1",
    "deliveryInstructions": "sample string 2",
    "itemsRequirePurchase": false,
    "items": [
      {
        "quantity": 1,
        "sku": "sample string 2",
        "description": "sample string 3",
        "price": 4.0
      },
      {
        "quantity": 1,
        "sku": "sample string 2",
        "description": "sample string 3",
        "price": 4.0
      }
    ],
    "pickupTime": "2019-10-15T11:11:40.8407042+00:00",
    "pickupDetail": {
      "name": "sample string 1",
      "phone": "sample string 2",
      "email": "sample string 3",
      "description": "sample string 4",
      "address": "sample string 5",
      "additionalAddressDetails": {
        "stateProvince": "sample string 1",
        "country": "sample string 2",
        "suburbLocality": "sample string 3",
        "postcode": "sample string 4",
        "latitude": 5.1,
        "longitude": 6.1
      }
    },
    "dropoffWindow": {
      "earliestTime": "2019-10-15T11:11:40.8407042+00:00",
      "latestTime": "2019-10-15T11:11:40.8407042+00:00"
    },
    "dropoffDetail": {
      "name": "sample string 1",
      "phone": "sample string 2",
      "email": "sample string 3",
      "description": "sample string 4",
      "address": "sample string 5",
      "additionalAddressDetails": {
        "stateProvince": "sample string 1",
        "country": "sample string 2",
        "suburbLocality": "sample string 3",
        "postcode": "sample string 4",
        "latitude": 5.1,
        "longitude": 6.1
      }
    },
    "customerFee": 4.0,
    "customerReference": "sample string 5",
    "tax": 1.0,
    "taxInclusivePrice": false,
    "tip": 1.0,
    "driverFeePercentage": 6.0,
    "driverMatchCode": "sample string 7",
    "deliverySequence": 8,
    "constraints": [
      {
        "name": "sample string 1",
        "value": "sample string 2"
      },
      {
        "name": "sample string 1",
        "value": "sample string 2"
      }
    ],
    "deliveryRouteIdentifier": "sample string 9",
    "webhooks": [
      {
        "eventName": "sample string 1",
        "url": "sample string 2"
      },
      {
        "eventName": "sample string 1",
        "url": "sample string 2"
      }
    ],
    "template": "sample string 10",
    "orderPrice": 1.0,
    "payments": [
      {
        "method": "CashOnDelivery",
        "amount": 1.0
      },
      {
        "method": "CashOnDelivery",
        "amount": 1.0
      }
    ]
  }
}

text/xml

Sample:
<QuoteResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Swift.DeliveryAPI2">
  <Quote>
    <Created>2019-10-15T11:11:40.8407042+00:00</Created>
    <DistanceKm>3.1</DistanceKm>
    <Dropoff>
      <Address>sample string 1</Address>
      <Time>
        <Average>2019-10-15T11:11:40.8407042+00:00</Average>
        <Earliest>2019-10-15T11:11:40.8407042+00:00</Earliest>
        <Latest>2019-10-15T11:11:40.8407042+00:00</Latest>
      </Time>
    </Dropoff>
    <Fee>
      <Cost>1</Cost>
    </Fee>
    <Pickup>
      <Address>sample string 1</Address>
      <Time>
        <Average>2019-10-15T11:11:40.8407042+00:00</Average>
        <Earliest>2019-10-15T11:11:40.8407042+00:00</Earliest>
        <Latest>2019-10-15T11:11:40.8407042+00:00</Latest>
      </Time>
    </Pickup>
    <Start>2019-10-15T11:11:40.8407042+00:00</Start>
  </Quote>
  <Request>
    <Constraints>
      <JobConstraintModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </JobConstraintModel>
      <JobConstraintModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </JobConstraintModel>
    </Constraints>
    <CustomerFee>4</CustomerFee>
    <CustomerReference>sample string 5</CustomerReference>
    <DeliveryInstructions>sample string 2</DeliveryInstructions>
    <DeliveryRouteIdentifier>sample string 9</DeliveryRouteIdentifier>
    <DeliverySequence>8</DeliverySequence>
    <DriverFeePercentage>6</DriverFeePercentage>
    <DriverMatchCode>sample string 7</DriverMatchCode>
    <DropoffDetail>
      <AdditionalAddressDetails>
        <Country>sample string 2</Country>
        <Latitude>5.1</Latitude>
        <Longitude>6.1</Longitude>
        <Postcode>sample string 4</Postcode>
        <StateProvince>sample string 1</StateProvince>
        <SuburbLocality>sample string 3</SuburbLocality>
      </AdditionalAddressDetails>
      <Address>sample string 5</Address>
      <Description>sample string 4</Description>
      <Email>sample string 3</Email>
      <Name>sample string 1</Name>
      <Phone>sample string 2</Phone>
    </DropoffDetail>
    <DropoffWindow>
      <EarliestTime>2019-10-15T11:11:40.8407042+00:00</EarliestTime>
      <LatestTime>2019-10-15T11:11:40.8407042+00:00</LatestTime>
    </DropoffWindow>
    <Items>
      <DeliveryBookingItemModel>
        <Description>sample string 3</Description>
        <Price>4</Price>
        <Quantity>1</Quantity>
        <Sku>sample string 2</Sku>
      </DeliveryBookingItemModel>
      <DeliveryBookingItemModel>
        <Description>sample string 3</Description>
        <Price>4</Price>
        <Quantity>1</Quantity>
        <Sku>sample string 2</Sku>
      </DeliveryBookingItemModel>
    </Items>
    <ItemsRequirePurchase>false</ItemsRequirePurchase>
    <OrderPrice>1</OrderPrice>
    <Payments>
      <OrderPaymentModel>
        <Amount>1</Amount>
        <Method>CashOnDelivery</Method>
      </OrderPaymentModel>
      <OrderPaymentModel>
        <Amount>1</Amount>
        <Method>CashOnDelivery</Method>
      </OrderPaymentModel>
    </Payments>
    <PickupDetail>
      <AdditionalAddressDetails>
        <Country>sample string 2</Country>
        <Latitude>5.1</Latitude>
        <Longitude>6.1</Longitude>
        <Postcode>sample string 4</Postcode>
        <StateProvince>sample string 1</StateProvince>
        <SuburbLocality>sample string 3</SuburbLocality>
      </AdditionalAddressDetails>
      <Address>sample string 5</Address>
      <Description>sample string 4</Description>
      <Email>sample string 3</Email>
      <Name>sample string 1</Name>
      <Phone>sample string 2</Phone>
    </PickupDetail>
    <PickupTime>2019-10-15T11:11:40.8407042+00:00</PickupTime>
    <Reference>sample string 1</Reference>
    <Tax>1</Tax>
    <TaxInclusivePrice>false</TaxInclusivePrice>
    <Template>sample string 10</Template>
    <Tip>1</Tip>
    <Webhooks>
      <DeliveryEventWebhookModel>
        <EventName>sample string 1</EventName>
        <Url>sample string 2</Url>
      </DeliveryEventWebhookModel>
      <DeliveryEventWebhookModel>
        <EventName>sample string 1</EventName>
        <Url>sample string 2</Url>
      </DeliveryEventWebhookModel>
    </Webhooks>
  </Request>
</QuoteResponse>