Shipping Tools & Developer Guide

Shipments


Add a shipment

Add a shipment to the Shipping Manager, where it can then be manually edited and booked.

Endpoint

POST
https://api.interparcel.com/shipments/add

Request Headers

NameTypeRequiredExampleDescription
AcceptStringtrueapplication/jsonRequest the content in the correct format
Content-TypeStringtrueapplication/jsonEnsure the content sent is in the correct format
X-Interparcel-AuthStringtrueYOUR_API_KEYYour API Key provided by Interparcel
X-Interparcel-API-VersionStringtrue2The latest API version

Request Body

  • validate
  • reference
  • collection
    • city
    • state
    • postcode
    • country
  • delivery
    • city
    • state
    • postcode
    • country
  • parcels
    • weight
    • length
    • width
    • height
  • contents
  • value
  • service
  • pickup
    • date
    • earliest
    • latest
  • transitCover

Example Request

{
    "validate": true,
    "reference": "ABC12345",
    "collection": {
        "name": "John Smith",
        "company": "",
        "add1": "1 Test Road",
        "add2": "Keymer",
        "city": "",
        "state": "",
        "postcode": "BN6 8QZ",
        "country": "GB",
        "telephone": "+3313030477",
        "email": "test@test.com"
    },
    "delivery": {
        "name": "Sam Spade",
        "company": "Testco Ltd",
        "add1": "1 Barr Ind Est",
        "add2": "Fredrick Road",
        "city": "Hailsham",
        "state": "",
        "postcode": "BN27 3JU",
        "country": "UK",
        "telephone": "+447880532203",
        "email": "test@test.com"
    },
    "parcels": [
        {
            "weight": 2,
            "length": 5,
            "width": 4,
            "height": 12
        },
        {
            "weight": 3,
            "length": 4,
            "width": 5,
            "height": 7
        }
    ],
    "contents": "Books and pens",
    "value": 37,
    "service": "UPS UK Standard",
    "pickup": {
        "date": "2021-11-12",
        "earliest": "10:00",
        "latest": "17:00"
    },
    "transitCover": true,
    "customs": {
        "taxStatus": 1,
        "reasonForExport": 1,
        "senderEoriNumber": "12345678",
        "receiverEoriNumber": "87654321",
        "iossNumber": "GB123456789",
        "items": [
            {
                "parcel": 1,
                "description": "Big book",
                "hsCode": "9864542",
                "quantity": 1,
                "value": "2.37",
                "currency": "GBP",
                "country": "France"
            },
            {
                "parcel": 1,
                "description": "Tennis racket",
                "hsCode": "3864542",
                "quantity": 1,
                "value": "19.55",
                "currency": "GBP",
                "country": "ES"
            }
        ]
    }
}

Example Responses

Success
{
    "status": 0,
    "services": [
        {
            "id": "DXEXP",
            "carrier": "DX",
            "name": "Express",
            "service": "DX Express",
            "serviceLevel": "express",
            "price": 17.99,
            "currency": "GBP",
            "taxable": true,
            "includedCover": 20,
            "maxCover": 1000,
            "printerNeeded": false,
            "restrictions": {
                "maximumWeight": 20,
                "maximumLength": 95
            },
            "pickupType": "collection",
            "delivery": {
                "daysFrom": 0,
                "daysTo": 0
            }
        }
    ]
}
Success - No services found
{
    "status": 0,
    "services": []
}
Error - Invalid Collection Country
{
    "status": 1,
    "errorMessage": "Invalid collection country",
    "errorCode": "100001"
}

Definitions

NameTypeRequiredDescription
collectionAddress ObjecttrueCollection address
deliveryAddress ObjecttrueDelivery address
parcelsParcels Array of ObjectstrueParcel details

Address

NameTypeRequiredDescription
cityStringtrueTown / City
stateStringconditionalState
postcodeStringtruePostcode
countryStringtrueCountry

Parcels

NameTypeRequiredDescription
weightDecimaltrueParcel weight in kg
lengthIntegertrueParcel length in cm
widthIntegertrueParcel width in cm
heightIntegertrueParcel height in cm