Skip to main content

Booking

This API is used to make bookings on the ParcelBroker system.

Example

Json / XML

// Booking Example
{
    "booking" : {
        "shipment": {
            "hash" : "JHCiNcLT5l4t7474nOnYW2I7g7R1K57Z5yQR4CqI",
            "customref" : "Order# 123",
            "contents" : "Green Widgets",
            "estvalue" : 50,
            "liability" : true,
            "type" : "PARCEL",
            "collection": {
                "name" : "John Smith",
                "company" : "Blue Widgets Ltd",
                "phone" : "01123 456789",
                "email" : "john@bluewidgets.shop",
                "line1" : "Unit 4",
                "line2" : "Testing Way",
                "town" : "Braintree",
                "county" : "Essex",
                "postcode" : "CM7 1AA",
                "countrycode" : "GB"
            },
            "destination": {
                "name" : "Billy Bob",
                "company" : "Red Things",
                "phone" : "09987 654321",
                "email" : "info@red-things.shop",
                "line1" : "1234 Star Street",
                "town" : "Beverly Hills",
                "county" : "Los Angeles",
                "postcode" : "90210",
                "countrycode" : "US",
                "residential" : 0
            },
            "parcels":[
                {
                    "height" :5,
                    "weight": 5,
                    "length" : 5,
                    "width" : 5,
                    "packaging" : "CARDBOARD",
                    "non_stackable" : 0
                }
            ],
            "pickup" : {
                "date" : "2023-03-31"
            },
            "customs" :{
                "reason" : "SALE",
                "declaredname" : "John Smith",
                "movement" : "EXPORT",
                "weightunit" : "KG",
                "currency" : "GBP",
                "costs" : {
                    "usebilled": 1,
                    "cover" : 0
                },
                "items" : [
                    {
                        "qty": 10,
                        "description" : "Plastic Green Widgets",
                        "value" : 10,
                        "origin": "CN",
                        "tariff" : "392690",
                        "weight" : 2
                    }
                ],
                "exporter" : {
                    "type" : "BUSINESS",
                    "vat" : "GB12345423465",
                    "diffrecord" : 0
                },

                "importer" : {
                    "type" : "INDIVIDUAL",
                    "diffrecord" : 1,
                    "address" : {
                        "name" : "Billy Bob",
                        "line1" : "Test 1",
                        "town" : "San Marino",
                        "county" : "Los Angeles",
                        "postcode": "91108",
                        "phone" : "00987654321",
                        "email" : "billy@red-things.shop"
                    }
                }
            }
        }
    }
}
// Booking Example
<booking>
    <shipment>
        <hash>JHCiNcLT5l4t7474nOnYW2I7g7R1K57Z5yQR4CqI</hash>
        <customref>Order# 123</customref>
        <contents>Green Widgets</contents>
        <estvalue>50.00</estvalue>
        <liability>1</liability>
        <type>PARCEL</type>
        <collection>
            <name>John Smith</name>
            <company>Blue Widgets Ltd</company>
            <phone>01123 456789</phone>
            <email>john@bluewidgets.shop</email>
            <line1>Unit 4</line1>
            <line2>Testing Way</line2>
            <line3 />
            <town>Braintree</town>
            <county>Essex</county>
            <postcode>CM7 1AA</postcode>
            <countrycode>GB</countrycode>
        </collection>
        <destination>
            <name>Billy Bob</name>
            <company>Red things</company>
            <phone>09987 654321</phone>
            <email>info@red-things.shop</email>
            <line1>1234 Star Street</line1>
            <town>Beverly Hills</town>
            <county>Los Angeles</county>
            <postcode>90210</postcode>
            <countrycode>US</countrycode>
            <residential>0</residential>
        </destination>
        <parcels>
            <parcel>
                <weight>5</weight>
                <length>5</length>
                <width>5</width>
                <height>5</height>
                <packaging>CARDBOARD</packaging>
                <non_stackable>0</non_stackable>
            </parcel>
        </parcels>
        <pickup>
            <date>2023-03-31</date>
        </pickup>
        <customs>
            <reason>SALE</reason>
            <declaredname>John Smith</declaredname>
            <movement>EXPORT</movement>
            <weightunit>KG</weightunit>
            <currency>GBP</currency>
            <costs>
                <usebilled>1</usebilled>
                <cover>0</cover>
            </costs>
            <items>
                <item>
                    <qty>10</qty>
                    <description>Plastic Green Widgets</description>
                    <value>10</value>
                    <tariff>392690</tariff>
                    <origin>CN</origin>
                    <weight>2</weight>
                </item>
            </items>
            <exporter>
                <type>BUSINESS</type>
                <vat>GB12345423465</vat>
                <diffrecord>0</diffrecord>
            </exporter>
            <importer>
                <type>INDIVIDUAL</type>
                <diffrecord>1</diffrecord>
                <address>
                    <name>Billy Bob</name>
                    <line1>Test 1</line1>
                    <town>San Marino</town>
                    <county>Los Angeles</county>
                    <postcode>91108</postcode>
                    <phone>00987654321</phone>
                    <email>billy@red-things.shop</email>
                </address>
            </importer>
        </customs>
    </shipment>
</booking>
Element Required Description
booking Yes Root element
shipment Yes Shipment details
Shipment
test No Test mode. Set to 1 to return a mock booking.
hash Yes Hash of the service to book
customref Yes Your reference
contents Yes Contents of the shipment
estvalue Yes Shipment Value in GBP
liablity Yes Whether liability is required. If true then the % value of extended liabilty rate from the service of estvalue will be added your order.
type Yes Shipment type. One of PARCEL, DOCUMENT, PALLET
collection Yes Collection address
Collection Address
name Yes Collection contact name
company No Collection company name
phone Yes Collection contact phone number
email Yes* Contact email
This element may be required based on other address and international factors
line1 Yes Collection address line 1
line2 No Collection address line 2
line3 No Collection address line 3
town Yes Collection town
county No Collection county
postcode Yes Collection postcode
countrycode Yes Collection country
delivery Yes Delivery address
Delivery Address
name Yes Delivery contact name
company No Delivery company name
phone Yes Delivery contact phone number
email Yes* Contact email
This element may be required based on other address and international factors
line1 Yes Delivery address line 1
line2 No Delivery address line 2
line3 No Delivery address line 3
town Yes Delivery town
county No Delivery county
postcode Yes Delivery postcode
countrycode Yes Delivery country
parcels Yes Array of parcels
Parcels
parcel Yes Parcel data
weight Yes Parcel weight in KG
length Yes Parcel depth in CM
width Yes Parcel width in CM
height Yes Parcel height in CM
packaging Yes Parcel type of outer packaging. One of; CARD, CARDBOARD, METAL, PLASTIC, WOOD, WRAPPED, PLASTIC, OTHER
Card remains for backwards compatibility and should be updated to CARDBOARD
non_stackable No Parcel is non stackable
pickup Yes Pickup details must contain one of the following elements; data, dropoff, today, daily
Pickup
date Yes* Pickup date in YYYY-MM-DD format
dropoff Yes If you want to drop off your parcel at a drop off point. See Drop off points for more information.
daily Yes If you have a daily collection arranged with a courier. Note; a collection may not be arranged via our system unless required to generate labels.
customs Yes* Customs information
This element is not required unless sending internationally.
Customs
reason Yes Customs reason for sending. One of; SALE, GIFT, PERSONALEFFECTS, SAMPLE, RETURN, REPAIR, REPLACEMENT, TRANSFER
declaredname Yes The declared name which will be printed onto the generated customs paperwork.
movement Yes Is this shipment an EXPORT or IMPORT
weightunit Yes The declared weight unit, must be one of; KG, LBS
currency Yes The declared currency, must be one of; GBP, USD, EUR
More currencies will be added as we provide support for them.
costs Yes Additional declared costs
Costs
usebilled Yes* Use the billed shipping amount customs
This is required if you are not declaring a seperate freight cost.
freight Yes* Declared freight cost
This is required if you wish to use a different cost than what you are billed.
cover Yes Declared cover cost
This is for insurance cover, not for our extended liability cover.
items Yes Array of items
item Yes Item data
Items
description Yes Item description
qty Yes Item quantity
weight Yes Individual item weight in the declared unit of weight
value Yes Individual item value in the declared currency
tariff Yes* Item HS code
HS codes are required for all international movement. If you do not supply a tariff code, we may attempt to categorise your items based on descriptions.
origin Yes Item origin country
exporter Yes Exporter of record details
Exporter
type Yes Exporter type. One of; INDIVIDUAL, BUSINESS
vat Yes* Exporter VAT number
This is required if the exporter type is BUSINESS.
eori Yes* Exporter EORI number
This is required if the exporter type is BUSINESS is based in the EU.
diffrecord Yes Is the exporter of record different to the sender?
address Yes* Exporter of record address
This is required if the exporter of record is different to the sender.
Exporter Address
name Yes Contact name
company No Company name
email No* Contact email
This element may be required based on other address and international factors
phone Yes Contact phone number
line1 Yes Address line 1
line2 No Address line 2
line3 No Address line 3
town Yes Town
county No* County
Some countries do not use postcodes so must have a county provided instead
postcode Yes* Postcode
Some countries do not use postcodes
importer Yes Importer of record details
Importer
type Yes Importer type. One of; INDIVIDUAL, BUSINESS
vat Yes* Importer VAT number
This is required if the importer type is BUSINESS.
eori Yes* Impoerter EORI number
This is required if the importer type is BUSINESS is based in the EU.
diffrecord Yes Is the importer of record different to the receiver?
address Yes* Importer of record address
This is required if the importer of record is different to the receiver.
Importer Address
name Yes Contact name
company No Company name
email No* Contact email
This element may be required based on other address and international factors
phone Yes Contact phone number
line1 Yes Address line 1
line2 No Address line 2
line3 No Address line 3
town Yes Town
county No* County
Some countries do not use postcodes so must have a county provided instead
postcode Yes* Postcode
Some countries do not use postcodes

Example Response

// Booking Response Example
{
    "header": {
        "status": "success"
    },
    "shipment": {
        "order_reference": "PB985523",
        "shipment_reference": "TST804860",
        "ordernumber": "TST804860",
        "net": 50.29,
        "vat": 0
    }
}
// Booking Response Example
<response>
    <header>
        <status>Success</status>
    </header>
    <shipment>
        <order_reference>PB551383</order_reference>
        <shipment_reference>TST974074</shipment_reference>
        <ordernumber>TST974074</ordernumber>
        <net>75.42</net>
        <vat>0</vat>
    </shipment>
</response>
Element Description
response Root element
header Header element
status Response status. Can be success or error
shipment Shipment Details
order_reference Order reference of the shipment
shipment_reference Shipment reference number
ordernumber Shipment reference number
This element is deprecated and remains for backwards compatibility
net This is the net cost of the order.
vat This is the VAT cost of the order.