POST api/v2/deliveries

Book a delivery

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": "05538e64-7f0f-4dcd-ac62-5586799571d5",
  "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-07-17T08:33:37.8354541+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-07-17T08:33:37.8354541+00:00",
      "latestTime": "2019-07-17T08:33:37.8354541+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>05538e64-7f0f-4dcd-ac62-5586799571d5</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-07-17T08:33:37.8354541+00:00</EarliestTime>
      <LatestTime>2019-07-17T08:33:37.8354541+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-07-17T08:33:37.8354541+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

DeliveryBookingResponseModel
NameDescriptionTypeAdditional information
Quote

Time and cost estimates

Quote

None.

Delivery

Detail of the delivery

DeliveryDetailsModel

None.

Request

A copy of the data used to book the delivery

DeliveryBookingModel

None.

Response Formats

application/json, text/json

Sample:
{
  "quote": {
    "created": "2019-07-17T08:33:37.8510779+00:00",
    "start": "2019-07-17T08:33:37.8510779+00:00",
    "distanceKm": 3.1,
    "fee": {
      "cost": 1.0,
      "costCents": 100
    },
    "pickup": {
      "time": {
        "average": "2019-07-17T08:33:37.8510779+00:00",
        "earliest": "2019-07-17T08:33:37.8510779+00:00",
        "latest": "2019-07-17T08:33:37.8510779+00:00"
      },
      "address": "sample string 1"
    },
    "dropoff": {
      "time": {
        "average": "2019-07-17T08:33:37.8510779+00:00",
        "earliest": "2019-07-17T08:33:37.8510779+00:00",
        "latest": "2019-07-17T08:33:37.8510779+00:00"
      },
      "address": "sample string 1"
    }
  },
  "delivery": {
    "created": "2019-07-17T08:33:37.8510779+00:00",
    "id": "e6d02a60-95ec-4218-859a-ec517e22d5e9",
    "reference": "sample string 3",
    "pickupLocation": {
      "name": "sample string 1",
      "address": "sample string 2",
      "phone": "sample string 3",
      "postcode": "sample string 4",
      "suburb": "sample string 5"
    },
    "dropoffLocation": {
      "name": "sample string 1",
      "address": "sample string 2",
      "phone": "sample string 3",
      "postcode": "sample string 4",
      "suburb": "sample string 5"
    },
    "lastUpdated": "2019-07-17T08:33:37.8510779+00:00",
    "currentStatus": "sample string 5",
    "driver": {
      "identifier": "25ac53f5-f02f-47a4-ae45-3786b9590aec",
      "name": "sample string 2",
      "phone": "sample string 3",
      "photoUrl": "sample string 4",
      "email": "sample string 5"
    },
    "jobNotes": [
      "sample string 1",
      "sample string 2"
    ],
    "items": [
      "sample string 1",
      "sample string 2"
    ],
    "constraints": [
      {
        "name": "sample string 1",
        "value": "sample string 2"
      },
      {
        "name": "sample string 1",
        "value": "sample string 2"
      }
    ],
    "capacities": [
      {
        "name": "sample string 1",
        "value": "sample string 2"
      },
      {
        "name": "sample string 1",
        "value": "sample string 2"
      }
    ],
    "pickupTime": "2019-07-17T08:33:37.8510779+00:00",
    "dropoffTime": {
      "earliestTime": "2019-07-17T08:33:37.8510779+00:00",
      "latestTime": "2019-07-17T08:33:37.8510779+00:00"
    },
    "deliveryInstructions": "sample string 6",
    "customerReference": "sample string 7",
    "trackingUrls": {
      "www": "sample string 1",
      "api": "sample string 2"
    },
    "proofOfDelivery": {
      "signatureUrl": "sample string 1",
      "attachments": [
        "sample string 1",
        "sample string 2"
      ],
      "jobTags": [
        {
          "name": "sample string 1",
          "value": "sample string 2"
        },
        {
          "name": "sample string 1",
          "value": "sample string 2"
        }
      ]
    },
    "driverTip": 8.0,
    "deliveryFee": 1.0,
    "estimatedDistance": {
      "kilometres": 1.1,
      "miles": 2.1
    },
    "stageHistory": [
      {
        "created": "2019-07-17T08:33:37.8510779+00:00",
        "stage": "sample string 2",
        "notes": "sample string 3"
      },
      {
        "created": "2019-07-17T08:33:37.8510779+00:00",
        "stage": "sample string 2",
        "notes": "sample string 3"
      }
    ]
  },
  "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-07-17T08:33:37.8510779+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-07-17T08:33:37.8510779+00:00",
      "latestTime": "2019-07-17T08:33:37.8510779+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:
<DeliveryBookingResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Swift.DeliveryAPI2">
  <Delivery>
    <Capacities>
      <CustomPodFieldModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </CustomPodFieldModel>
      <CustomPodFieldModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </CustomPodFieldModel>
    </Capacities>
    <Constraints>
      <CustomPodFieldModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </CustomPodFieldModel>
      <CustomPodFieldModel>
        <Name>sample string 1</Name>
        <Value>sample string 2</Value>
      </CustomPodFieldModel>
    </Constraints>
    <Created>2019-07-17T08:33:37.8510779+00:00</Created>
    <CurrentStatus>sample string 5</CurrentStatus>
    <CustomerReference>sample string 7</CustomerReference>
    <DeliveryFee>1</DeliveryFee>
    <DeliveryInstructions>sample string 6</DeliveryInstructions>
    <Driver>
      <Email>sample string 5</Email>
      <Identifier>25ac53f5-f02f-47a4-ae45-3786b9590aec</Identifier>
      <Name>sample string 2</Name>
      <Phone>sample string 3</Phone>
      <PhotoUrl>sample string 4</PhotoUrl>
    </Driver>
    <DriverTip>8</DriverTip>
    <DropoffLocation>
      <Address>sample string 2</Address>
      <Name>sample string 1</Name>
      <Phone>sample string 3</Phone>
      <Postcode>sample string 4</Postcode>
      <Suburb>sample string 5</Suburb>
    </DropoffLocation>
    <DropoffTime>
      <EarliestTime>2019-07-17T08:33:37.8510779+00:00</EarliestTime>
      <LatestTime>2019-07-17T08:33:37.8510779+00:00</LatestTime>
    </DropoffTime>
    <EstimatedDistance>
      <Kilometres>1.1</Kilometres>
      <Miles>2.1</Miles>
    </EstimatedDistance>
    <Id>e6d02a60-95ec-4218-859a-ec517e22d5e9</Id>
    <Items xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </Items>
    <JobNotes xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </JobNotes>
    <LastUpdated>2019-07-17T08:33:37.8510779+00:00</LastUpdated>
    <PickupLocation>
      <Address>sample string 2</Address>
      <Name>sample string 1</Name>
      <Phone>sample string 3</Phone>
      <Postcode>sample string 4</Postcode>
      <Suburb>sample string 5</Suburb>
    </PickupLocation>
    <PickupTime>2019-07-17T08:33:37.8510779+00:00</PickupTime>
    <ProofOfDelivery>
      <Attachments xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>sample string 1</d4p1:string>
        <d4p1:string>sample string 2</d4p1:string>
      </Attachments>
      <JobTags>
        <CustomPodFieldModel>
          <Name>sample string 1</Name>
          <Value>sample string 2</Value>
        </CustomPodFieldModel>
        <CustomPodFieldModel>
          <Name>sample string 1</Name>
          <Value>sample string 2</Value>
        </CustomPodFieldModel>
      </JobTags>
      <SignatureUrl>sample string 1</SignatureUrl>
    </ProofOfDelivery>
    <Reference>sample string 3</Reference>
    <StageHistory>
      <StageEntryModel>
        <Created>2019-07-17T08:33:37.8510779+00:00</Created>
        <Notes>sample string 3</Notes>
        <Stage>sample string 2</Stage>
      </StageEntryModel>
      <StageEntryModel>
        <Created>2019-07-17T08:33:37.8510779+00:00</Created>
        <Notes>sample string 3</Notes>
        <Stage>sample string 2</Stage>
      </StageEntryModel>
    </StageHistory>
    <TrackingUrls>
      <Api>sample string 2</Api>
      <Www>sample string 1</Www>
    </TrackingUrls>
  </Delivery>
  <Quote>
    <Created>2019-07-17T08:33:37.8510779+00:00</Created>
    <DistanceKm>3.1</DistanceKm>
    <Dropoff>
      <Address>sample string 1</Address>
      <Time>
        <Average>2019-07-17T08:33:37.8510779+00:00</Average>
        <Earliest>2019-07-17T08:33:37.8510779+00:00</Earliest>
        <Latest>2019-07-17T08:33:37.8510779+00:00</Latest>
      </Time>
    </Dropoff>
    <Fee>
      <Cost>1</Cost>
    </Fee>
    <Pickup>
      <Address>sample string 1</Address>
      <Time>
        <Average>2019-07-17T08:33:37.8510779+00:00</Average>
        <Earliest>2019-07-17T08:33:37.8510779+00:00</Earliest>
        <Latest>2019-07-17T08:33:37.8510779+00:00</Latest>
      </Time>
    </Pickup>
    <Start>2019-07-17T08:33:37.8510779+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-07-17T08:33:37.8510779+00:00</EarliestTime>
      <LatestTime>2019-07-17T08:33:37.8510779+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-07-17T08:33:37.8510779+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>
</DeliveryBookingResponseModel>