Intelligent Shipper API - Multi-Piece Shipment Bookings v1.7.11



Intelligent Shipper

Shipping Integration API
Multipiece Shipment Bookings
Technical User Guide
API Version: 1.7
Document Version: 1.7.11


Document Owner

INTERSOFT Systems and Programming Limited

Version

1.7.11

Date

15/07/2022

Description

Describes how to integrate with the Intelligent Shipper Shipment Booking API

Author

Laura Price



Commercial and in Confidence
The information contained in this document is confidential.  No part of this document may be reproduced, disclosed to any third party, or issued in any form or by any means without the express written permission of Intersoft Systems & Programming Ltd.

  1. Contents

2. Introduction
2.1. Implementation of the Service
2.2. Fair Usage Policy
3. API Services
4. Integration Header and Footer
4.1. Request Header
4.2. Response Header
4.3. Response Footer
5. createShipment
5.1. createShipmentRequest
5.2. createShipmentResponse
6. cancelShipment
6.1. cancelShipmentRequest
6.2. cancelShipmentResponse
7. confirmShipment
7.1. confirmShipmentRequest
7.2. confirmShipmentResponse
8. printDocument
8.1. printDocumentRequest
8.2. printDocumentResponse
9. printQRCode
9.1. printQRCodeRequest
9.2. printQRCodeResponse
10. manifestHistory
10.1. manifestHistoryRequest
10.2. manifestHistoryResponse
11. printManifest
11.1. printManifestRequest
11.2. printManifestResponse
12. Terms and Definitions
13. Document Controls

Introduction

This document describes the XML interface for the Intelligent Shipper Multipiece Shipment Bookings functionality. Example XML messages for each service are provided in the document "Intelligent Shipper API – Multipiece Shipment Bookings XML Examples".

Implementation of the Service

The service is implemented using XML messaging. The customer is responsible for sending an XML message in the format displayed in the document "Intelligent Shipper API – Multipiece Shipment Bookings XML Examples". The customer is responsible for maintaining the capability of receiving XML messages in the format displayed in the example XML responses.
XSDs are not required, so do not exist. Communication to Intelligent Shipper endpoints will only utilise HTTPS. TLS version 1.2 (In affect from March 31st, 2020) only will be enabled. TLS cipher suites utilised on the Intelligent Shipper solution can be found via the below link for the Sandbox environment:
https://www.ssllabs.com/ssltest/analyze.html?d=test.intelligentshipper.net&latest
XMLs will be processed via Post actions. XMLs will be secured by data passed in the Integration Header portions of the XMLs provided. Intersoft will provide the required credentials via email as part of the onboarding process.

Fair Usage Policy

In order to maintain optimal performance of our API and ensure that all partners and customers have a good experience, we urge all developers to consider and optimize their calls and flows. Fair use is defined as 20,000 API calls per 24-hour period per agreement.
If an application creates an excessive load on the API, Intersoft is at liberty, without warning, to restrict the integration's access to our APIs. Intersoft will offer help and guidance on how to optimise the technical implementation.

API Services

The Intelligent Shipper Multipiece Shipment Bookings API contains the following services:

Service Name

Description

Mandatory / Optional

Allowed Methods

URL

createShipment

Creates a new shipment and generates the shipping label.

Mandatory

Post

/api/v1.7/shipments/createShipmentRequest

cancelShipment

Cancels a current shipping label for shipments that have not been confirmed.

Optional

Post

/api/v1.7/shipments/cancelShipmentRequest

confirmShipment

Locks down the shipment so that it can no longer be edited and generates the required collection paperwork (e.g. Manifest).

Mandatory

Post

/api/v1.7/shipments/confirmShipmentRequest

printDocument

Returns customs documentation for a shipment in the requested format – CN23, Proforma Invoice or Commercial Invoice.

Optional

Post

/api/v1.7/documents/printDocumentRequest

printQRCode

Generates a QR code for returns shipments using Royal Mail Tracked Returns services. The QR code can then be scanned at the Post Office to generate the returns label

Optional

Post

/api/v1.7/shipments/generateQRCodeRequest

manifestHistory

Returns details of the manifests created on a specified date. The manifest details returned in the response can then be used with the printManifestRequest to return a PDF manifest image.

Optional

Post

/api/v1.7/shipments/manifestHistoryRequest

printManifest

Returns a manifest image in Base64 encoded PDF format.

Optional

Post

/api/v1.7/shipments/printManifestRequest


The document contains a separate section for each of these services, which describes the service in more detail including the request and response XML content.

Integration Header and Footer

The request and response header and response footer use the same format across each API service. The purpose and XML content of these header and footer sections is described below. Content unique to each service is described in the section for that service.

Request Header

The request header confirms the version number being used and denotes the UTF-8 encoding used in the service. The header confirms who the request is coming from and verifies the credentials used in the request.
The request header contains the following elements:

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

serviceNameRequest/integrationHeader




<dateTimeStamp>

D–19

O

YYYY-MM-DD HH:MM:SS
Date/Time Stamp of the request.

<transactionId>

C–32

M

Unique identifier of the request, preserved throughout the lifespan of the transaction. This must be generated by the customer.

<applicationId>

C–10

M

The ID of the Service Requester calling the service. This will be provided by Intersoft.

<userId>

C–10

M

User ID for system access. This will be provided by Intersoft.

<password>

C–10

M

Password for system access. This will be provided by Intersoft.


Response Header

The response header contains the following elements:

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

serviceNameResponse/integrationHeader




<dateTimeStamp>

D–16

O

YYYY-MM-DD HH:MM
Date/Time Stamp of the response.

<transactionId>

C–32

M

ID preserved throughout the lifespan of the transaction, unique when combined with the applicationId.

<applicationId>

C–10

M

The ID of the Service Provider, unique when combined with the TransactionId.


Response Footer

If the data in the request generated any errors, the response XML will include a footer element containing details of these.
The response footer contains the following elements:

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

serviceNameResponse/errors/errorDetail





<errorCode>

C–5

C

Error Code. Code associated with the error condition

<errorDescription>

C–32

C

Description of the error condition

<errorCause>

C–4

C

Cause of the business error (if known)

<errorResolution>

C–50

C

Description of the resolution and action required to correct the error

<errorContext>

C–50

C

Context of the business error, e.g. client or server


Each section will only be present if any errors were generated. See the document "Intelligent Shipper API – Multipiece Shipment Bookings Appendices" for a list of all the errors that could potentially be returned for each service.



createShipment

The createShipment service is used to generate the final delivery label(s) for your packages.

createShipmentRequest

The createShipmentRequest contains the following sections:

  • Shipper – contains the shipper address and contact details.
  • Destination - delivery address and contact details – it is the shipper's responsibility to provide accurate and concise information to ensure the best possible delivery experience for the consumer.
  • Shipment Information - the package and contents being sent. It is important that accurate information is supplied to ensure correct handling by customs authorities.
  • Item Information - the items being sent in the shipment. One shipment may contain multiple items. This information is used customs authorities to process clearance (where required).


Element Name

Data Type

Mandatory / Conditional / Optional

Notes

createShipmentRequest/shipment/shipper




<shipperCompanyName>

C–35

M

Shipper Company Name.

<shipperAddressLine1>

C–35

M

First line of shipper address.

<shipperAddressLine2>

C–35

O

Second line of shipper address, if applicable.

<shipperAddressLine3>

C–35

O

Third line of shipper address, if applicable.

<shipperCity>

C–30

M

Shipper Town.

<shipperCounty>

C–35

O

Shipper County.

<shipperCountryCode>

C–2

M

2 Digit ISO Country Code, per ISO 3166 Standard.

<shipperPostCode>

C–10

M

Shipper's Postcode.

<shipperContactName>

C–40

O

Shipper's Contact Name.

<shipperPhoneNumber>

C–20

M

Shipper's Contact Phone.
Accepts numeric characters and the following special characters only:
+.()-
No other special characters are accepted.

<shipperVatNumber>

C–15

C

Shipper's VAT Number.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<shipperEoriNumber>

C-18

C

Shipper's EORI Number.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<shipperEmailAddress>

C–254

O

Shipper's Email Address.

<shipperReference>

C–20

M

This is used for Returns processing and is usually the shipper's order number provided to the consumer.

<shipperReference2>

C-20

O

For Royal Mail shipments this must only be used to provide the eBay Virtual Tracking Number (VTN) – no other reference should be provided in this field.
For all other carriers this can be used to provide any further identifiers in addition to shipper reference. See the document "Intelligent Shipper Carrier Integrations and Features" for a list of which integrations use Shipper Reference 2.

<shipperDeptCode>

C–17

O

Shipper's Department Code.

createShipmentRequest/shipment/destination




<destinationCompanyName>

C–35

O

For domestic deliveries, use the contact name here.

<destinationAddressLine1>

C–35

M

Please ensure the address data is presented in line with the destination country formats.

<destinationAddressLine2>

C–35

O

Please ensure the address data is presented in line with the destination country formats.

<destinationAddressLine3>

C–35

O

Please ensure the address data is presented in line with the destination country formats.

<destinationCity>

C–30

M

Destination Town Name.

<destinationCounty>

C–35

C

Required for Australia, USA and Canada.

<destinationCountryCode>

C–2

M

2 Digit ISO Country Code, per ISO 3166 Standard.

<destinationPostCode>

C–10

C

Mandatory for countries where post code is required for delivery.

<destinationContactName>

C–40

M

Delivery Contact Name.

<destinationPhoneNumber>

C–20

M

Delivery Contact phone number. If an SMS notification enhancement is used, this must contain a valid mobile phone number for the destination country.
Accepts numeric characters and the following special characters only:
+.()-
No other special characters are accepted.
For Royal Mail shipments where an SMS notification enhancement is used, the following rules apply:

  • Phone number must start with "0" or "44"
  • Must then be followed by "7" and then any other number
  • If starting with 0, maximum length is 11. If starting with 44, maximum length is 12 e.g. 07123456789 or 447123456789
  • Any premium numbers, like the ones starting 070 are not allowed.

<destinationVatNumber>

C–15

O

Delivery VAT number.

<destinationEmailAddress>

C–254

C

Delivery Email Address. Required when an email notification service enhancement is used.

<deliveryInstructions>

C-50

O

Additional information relating to the delivery address, e.g. instructions on how to find or access the address. If the carrier supports additional delivery instructions this will be printed on the label.

NOTE: To specify a safe place for delivery when using Royal Mail and Parcelforce services, use the <safePlace> element instead.

<destinationPudoId>

C–20

O

PUDO Store ID or Postcode.

createShipmentRequest/shipment/shipmentInformation




<shipmentDate>

D–10

M

Date of despatch – YYYY-MM-DD.

<serviceCode>

C–4

M

Service Code.

createShipmentRequest/shipment/shipmentInformation/offLineShipment




<trackingNumber>

C-30

C

NOTE: The offLineShipment section is optional. This should only be included in the createShipmentRequest when you want to create an offline shipment (i.e. create a shipment record in Intelligent Shipper for a shipment that had a tracking number allocated outside of the system). For online/standard shipments do not include this section in the request.

When creating an offline shipment, this element is mandatory. Provide the tracking number allocated to the shipment.

<itemId>

C-8

C

Unique sequence number used in the 2D barcode.
Mandatory for Royal Mail offline shipments only; this does not need to be provided for any other carriers.

<carrierCode>

C-4

C

When creating an offline shipment, this element is mandatory. Provide the carrier code of the shipment carrier.
NOTE: The carrier code provided must be valid for the shipment service code, else an error will be returned.

<status>

C-30

O

Defaulted to printedOffline.

createShipmentRequest/shipment/shipmentInformation/serviceOptions




<postingLocation>

C-10

C

RMG Posting location.
Mandatory if using a Royal Mail service and your customer account has more than one posting location. Not required if your Royal Mail account only has one posting location.

Not required for non-Royal Mail shipments.

<serviceLevel>

C-2

O

Service level code. Valid values are 01-99.
Only used for Royal Mail services. If service level is not provided then the lowest available service level will be used.

Not required for non-Royal Mail shipments.

<serviceFormat>

C-1

O

Service format code. Valid values are L, F, P, G, E, N, H.
Only used for Royal Mail services. If service format is not provided, the default service format set in the system will be used.

Not required for non-Royal Mail shipments.

<safePlace>

C-30

O

Free text to describe a safe place to leave the parcel, if the service allows it.

If safe place is being used with Parcelforce service enhancements then a valid Parcelforce safe place must be used, else the safe place will be defaulted to "Driver Choice". See the Appendices document for a list of valid Parcelforce safe places.

createShipmentRequest/shipment/shipmentInformation/serviceOptions/serviceEnhancements




<serviceEnhancementCode>

C-10

O

May contain either a service enhancement code setup by the System Administrator or a Royal Mail service enhancement code. The System Administrator can provide a list of the service enhancement codes available in the system.
A list of valid Royal Mail service enhancement codes is provided in the Appendices document.
Multiple service enhancements can be used for a shipment; repeat the element for each service enhancement code required. For Royal Mail service enhancements, a maximum of four enhancement codes can be supplied per shipment.

If the requested enhancement(s) are not available for the service or if more than one enhancement is requested from a single enhancement group then an error will be returned in the response. See the Appendices document for a list of all potential errors that may be returned.

createShipmentRequest/shipment/shipmentInformation




<totalPackages>

N–2

M

Total number of packages.
Min=1 max=99.
For a list of the carriers that support multipackage shipments, see the document "Intelligent Shipper Carrier Integrations and Features".

<totalWeight>

N–7,3

M

Total weight of the parcel including packaging.

<weightId>

C–1

O

Weight unit of measurement.
K = Kgs / L = Lbs.
Defaults to K if blank.

<unitOfMeasurement>

C–1

O

Dimensions unit of measurement.
Always "C" for Centimetres.

<product>

C–3

M

Product type.
DOX for Document Shipments or NDX for any other content type.

<descriptionOfGoods>

C–70

M

General description of the goods being sent.

<reasonForExport>

C-50

O

Used to provide the reason an international shipment is being sent e.g. Sale, Gift, Return etc.
Currently only used with Royal Mail shipments. For Royal Mail shipments, only the following values should be provided:

  • Gift
  • Commercial Sample
  • Documents
  • Returned Goods
  • Other
  • Sale of goods
  • Mixed Content
    If Reason for Export is provided for a Royal Mail shipment, this will override the Default Reason for Export set on the customer's Royal Mail account record.

<declaredValue>

N–10,2

M

Total Shipment Value.

<declaredCurrencyCode>

C–3

M

3-digit ISO Currency code for shipment value.

<terms>

C–3

O

Incoterms / terms of trade for international NDX shipments.
Valid values are DDU, DDP, DAP and DAT.
If DDP is requested for a carrier that does not support it an error will be returned in the createShipmentResponse. See the Appendices document for details of the error.
If this field is not populated for International NDX shipments then DDU will be used by default.
Terms does not need to be provided for International DOX shipments.

<labelImageFormat>

C-10

O

Supported formats are PDF, and PNG. For Royal Mail shipments only, the ZPL formats , ZPL203DPI and ZL300DPI are also supported.. The ZPL formats are available for Royal Mail shipments only.
A PDF will be returned as default if a format is not specified.
Only PDF format will return customs documents.
Only PDF format can be used with multipiece shipments.

<silentPrintProfile>

C-36

O

The Silent Print application allows labels to be automatically printed to a chosen printer when shipments are created.
To automatically print the shipment label, provide the Silent Print Profile ID of the API user. When the shipment is created the labels will be sent automatically to the configured printer.
See the Silent Print Manual for more information on silent printing.

<shipmentAction>

C-8

O

Valid values = Create, Allocate.
If this element is left blank or not populated the shipment will be created as a processed shipment, and a label and tracking number will be returned in the response.
shipmentAction = Create will create the shipment in unprocessed state and the label and tracking number will not be generated. The unprocessed shipment must be scanned to generate the label and tracking number.
shipmentAction = Allocate will create the shipment in unprocessed state, return a tracking number in the response and create the label but not return it in the response. When the unprocessed shipment is scanned the label will be printed and the shipment will be moved to processed state.

createShipmentRequest/shipment/shipmentInformation/customsInformation




<preRegistrationNumber>

C-50

C

Certain countries operate a Tax Pre-Registration scheme (e.g., VOEC in Norway, GST in Australia). If you are registered for a Tax Pre-Registration scheme for the destination country and are shipping under the scheme rules then provide the pre-registration number for the destination country.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

NOTE: VAT and EORI numbers should be provided in the shipperVatNumber and shipperEoriNumber elements, not in the preRegistrationNumber element.

<preRegistrationType>

C-18

C

Provide the type of pre-registration scheme being used e.g., IOSS, GST, VOEC, OSS etc.
Mandatory if pre-registration number is provided and ignored if pre-registration number is not provided.
NOTE: VAT and EORI numbers should be provided in the shipperVatNumber and shipperEoriNumber elements, not in the preRegistrationNumber element.

<shippingCharges>

N-7,2

C

The amount the end customer was charged for shipping. This should not be populated with the amount you were charged by the carrier for shipping.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.
If provided, this will be displayed on customs documents generated for the shipment.

<otherCharges>

N-7,2

O

Any costs the end customer has been charged additional to the standard shipping cost e.g., insurance charges.

<quotedLandedCost>

N-7,2

C

The total cost quoted to the end customer for delivering the shipment. This includes shipping charges, other charges and any customs taxes and duties charges that were quoted to the end customer. Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<invoiceNumber>

C-35

C

Provide the invoice number of the Proforma Invoice or Commercial Invoice associated with the shipment, if applicable.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.
For Royal Mail shipments only, invoice number is mandatory if invoice date is provided.
If provided, this will be displayed on customs documents generated for the shipment.

<invoiceDate>

D-10

C

The invoice data of the Proforma/Commercial invoice.
Mandatory if an invoice number is provided, ignored if invoice number is not provided.

<exportLicense>

C-5

O

True/False
Indicates whether an export license is required for the shipment.
An export license is needed for a specific type of goods used predominantly for military purposes. You can find out more about the type of items requiring an export licence on the UK Government website.

<addresseeIdentificationReferenceNumber>

C-20

O

Provide Addressee Identification Reference Number if supported by the destination country. This is a numeric code used to track a consumers purchasing history in countries such as Russia and Brazil.

createShipmentRequest/shipment/shipmentInformation/packages/package




<packageTypeName>

C-40

O

If you are using packaging provided by the carrier, populate with the carrier's exact packaging name e.g. FEDEX_BOX. If the correct carrier packaging name is not used this may result in overcharges from the carrier.
The Appendices document contains a list of the carrier package type names supported in the system. Further details on carrier packaging types are available on the carrier's website.

<packageId>

C-15

C

Required if a dutiable multipiece shipment is created using a single piece service.
Unique Package ID.
Occurs Min=1 Max=99
If provided, occurrence must match <totalPackages>.

<weight>

N–7,3

C

Required if a multipiece shipment is created using a single piece service.
Total Weight of Package. This field will be used as the Shipment Weight for Single-package Services such as RMG.
For single piece shipments, the sum of all package weight must be greater than or equal to the sum of all item weights if item information is provided.
For dutiable multipiece shipments created on single piece services, the package weight must be greater than or equal to the sum of the item weights in the package.

<length>

N–3

C

Parcel Length.
Dimensions are optional, however supplying accurate information helps ensure a smooth delivery experience.
Max overall length is 250cm.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<width>

N–3

C

Parcel Width.
Dimensions are optional, however supplying accurate information helps ensure a smooth delivery experience.
Max overall length is 250cm.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<height>

N–3

C

Parcel Height.
Dimensions are optional, however supplying accurate information helps ensure a smooth delivery experience.
Max overall length is 250cm.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

createShipmentRequest/shipment/shipmentInformation/itemInformation




<packageId>

C-15

O

Used to indicate which package the item has been packed into.
Package ID must be unique.

<itemHsCode>

N–10

C

Used by Customs to calculate potential duties / taxes. For more information on HS codes and to find the correct HS codes for your products, see https://www.gov.uk/trade-tariffMandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.
If provided, this will be displayed on customs documents generated for the shipment.

<itemDescription>

C–255

C

Description of item. This must describe the specific item being shipped rather than the general nature of the item e.g. 'skirt' instead of 'ladies clothing'.
Mandatory for international shipments. Item information is optional for domestic shipments, but if is included the field must be populated.

<itemQuantity>

N–5

C

Quantity of items.
Mandatory for international shipments. Item information is optional for domestic shipments, but if is included the field must be populated.

<itemValue>

N–7,2

C

Individual Item value.
Mandatory for international shipments. Item information is optional for domestic shipments, but if is included the field must be populated. For domestic shipments this can be populated with 0.

<itemCOO>

C–2

C

Item country of origin.
ISO Country Code of item country of origin, per ISO 3166 Standard.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<itemSku>

C–30

C

Used by Customs to calculate potential duties / taxes.
Mandatory for some carriers. See the document "Intelligent Shipper Carrier Integrations and Features" for more information.

<itemNetWeight>

N–7,3

C

Individual item weight.
Mandatory for international shipments. Item information is optional for domestic shipments, but if is included the field must be populated.

<imageURL>

C-1000

O

Used to save a link to an image of the item with the shipment details, so that this can be used in the Returns system for consumers to see an image of the item when selecting items for return.

createShipmentRequest/shipment/shipmentInformation/itemInformation/Hazmat




<properShippingName>

C-100

O

Proper Shipping Name of the hazardous product being shipped.
NOTE: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section.

<unIdNumber>

C-4

O

UN Identification Number of the hazardous product. This will be displayed on the hazmat label.
NOTE: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section

<class>

C-3

C

Mandatory if hazmat information is provided.
Used to provide the class number of the hazardous product being shipped. This ensures the correct hazardous label is returned with the label image in the createShipmentResponse.
NOTE: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section
See the document "Intelligent Shipper Carrier Integrations and Features" for details of which carriers support hazmat shipments and the class supported by each carrier.
See the Appendices document for an example of the hazmat label.

<id8000Category>

C-100

O

If an ID8000 label is required for class 9 hazardous products, provide the applicable ID8000 category from the following:
Medicines
Perfume/Aftershave
Nail Varnish
Toiletry or Medicinal Aerosols
An ID8000 label will be returned with the label image in the createShipmentResponse and the category provided in the request will be selected on the label. See the Appendices document for an example of the ID8000 label.

NOTE 1: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section
NOTE 2: If the ID8000 category description does not exactly match one of the category descriptions listed, the category will not be selected on the ID8000 label and the category will need to be completed by hand.
NOTE 3: An ID8000 label can only be used with UK domestic shipments.

<hazchemNumber>

C-3

O

Hazchem Number of the hazardous product being shipped.

NOTE 1: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section

<emergencyActionCode>

C-4

O

Emergency Action Code of the hazardous product. This will be displayed on the hazmat label.

NOTE 1: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section

<specialistAdvicePhoneNumber>

C-20

O

Specialist advice phone number to contact if any issues occur with the hazardous product. This will be displayed on the hazmat label.
If not provided, the phone number set on the customer account record will be displayed on the hazmat label instead.
Accepts numeric characters and the following special characters only:
+.()-
No other special characters are accepted.

NOTE: If a shipment contains multiple hazardous items, the hazmat details must be provided in this section, 'and not the 'shipmentInformation/hazmat' section

createShipmentRequest/shipment/shipmentInformation/hazmat




<properShippingName>

C-100

O

Proper Shipping Name of the hazardous product being shipped.

NOTE The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead. instead

<unIdNumber>

C-4

O

UN Identification Number of the hazardous product. This will be displayed on the hazmat label.

NOTE: The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead.

<class>

C-3

C

Mandatory if hazmat information is provided.
Used to provide the class number of the hazardous product being shipped. This ensures the correct hazardous label is returned with the label image in the createShipmentResponse.
See the document "Intelligent Shipper Carrier Integrations and Features" for details of which carriers support hazmat shipments and the class supported by each carrier.
See the Appendices document for an example of the hazmat label.

NOTE: The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead.

<id8000Category>

C-100

O

If an ID8000 label is required for class 9 hazardous products, provide the applicable ID8000 category from the following:
Medicines
Perfume/Aftershave
Nail Varnish
Toiletry or Medicinal Aerosols
An ID8000 label will be returned with the label image in the createShipmentResponse and the category provided in the request will be selected on the label. See the Appendices document for an example of the ID8000 label.

NOTE 1: If the ID8000 category description does not exactly match one of the category descriptions listed, the category will not be selected on the ID8000 label and the category will need to be completed by hand.
NOTE 2: An ID8000 label can only be used with UK domestic shipments.
NOTE 3: The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead.

<hazchemNumber>

C-3

O

Hazchem Number of the hazardous product being shipped.

NOTE: The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead.

<emergencyActionCode>

C-4

O

Emergency Action Code of the hazardous product. This will be displayed on the hazmat label.

NOTE: The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead.

<specialistAdvicePhoneNumber>

C-20

O

Specialist advice phone number to contact if any issues occur with the hazardous product. This will be displayed on the hazmat label.
If not provided, the phone number set on the customer account record will be displayed on the hazmat label instead.
Accepts numeric characters and the following special characters only:
+.()-
No other special characters are accepted.

NOTE: The fields in this section should only be populated when the shipment contains one or more hazardous items. If the shipment contains multiple hazardous items, then the hazmat fields in the itemInformation section of the request must be populated instead.

createShipmentResponse

The response contents can differ based on the content in the request – if the request is successful, the shipmentAction was not set as Create or Allocate, and the shipment was not an offline shipment, then the response will contain the following elements to integrate into your own systems:

  • Label Image - All labels images are returned as Base64 Encoded PDF or PNG images. All Labels generated using this service are designed to print to 6x4 inch thermal label printers – other (larger) sizes can be used, but the image must not be re-sized. NOTE: It is recommended to use a minimum of 300DPI thermal printers when producing shipping labels to ensure bar code print quality and help ensure effective tracking status updates.

NOTE 2: Some carriers may require more than one label be produced, therefore in some cases the PDF image returned may include more than a single page print.

  • Tracking URL - A tracking URL is supplied with each successful response – this can be used when advising your customers that the delivery is on its way.
  • Tracking Number - This is the unique tracking number that can be used to track delivery of the shipment on the relevant tracking portals.


If the shipmentAction was set as Create or Allocate, the OffLineShipment section was included or if the request was unsuccessful, then a label will not be returned in the response.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

createShipmentResponse/completedShipment




<consignmentNumber>

C–14

O

The shipment consignment number. This element will only be populated for Multipiece shipments.

<consignmentTrackingURL>

C–250

O

This element will only be populated for Multipiece shipments.

createShipmentResponse/completedShipment/packages




<packageId>

C-15

M

Unique Package ID.
Occurs Min=1 Max=99.

<trackingNumber>

C–70

O

The package tracking number of each package within the shipment. For multipiece shipments, a tracking number will be provided for every package.

<uniqueId>

C–70

O

Secondary tracking number.
Only available for Royal Mail Labels. Used as primary tracking number for non-barcoded service.

<packageTrackingUrl>

C–250

O

Package tracking URL.

createShipmentResponse/completedShipment




<carrierCode>

C–4

O

Allocated Carrier Code.

<labelImage>

O

Base64 encoded Label image.

<labelImageFormat>

C–3

O

Format the label is returned in. Either PDF, PNG, ZPL203DPI or ZL300DPI. The ZPL formats are supported for Royal Mail shipments only .
If hazmat information was provided in the createShipmentRequest, the label image will include a hazmat label for the class of hazardous goods being shipped.
NOTE: Only PDF format will return customs documents.


cancelShipment

This service can be used to cancel/void a current shipping label. It can only be used before the shipment has been confirmed either by using the confirmShipment service or by closing out via the User Interface.

cancelShipmentRequest

To cancel a shipment the tracking number must be provided.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

cancelShipmentRequest/cancel




<trackingNumber>

C–70

M

Tracking number returned in createShipmentResponse.


cancelShipmentResponse

A successful response confirms the shipment has been cancelled.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

cancelShipmentResponse/cancelled




<trackingNumber>

C–70

M

Confirmation of Tracking Number Cancelled.







confirmShipment

This is a mandatory service in the Intelligent Shipper API. It is used to closeout shipments, which produces the collection manifest to be handed over the driver and may trigger electronic pre-advice and billing data to be sent to the carrier.
NOTE: Once shipments have been closed out they can no longer be edited in the User Interface or cancelled via either API or the UI.

confirmShipmentRequest

There are three ways shipments can be closed out, with the recommended methods shown in bold:

  1. Closeout by carrier – closes out all unmanifested shipments for a single carrier at once by sending the carrier code in the request
  2. Closeout by service – closes out all unmanifested shipments for a single service at once by sending the service code in the request
  3. Closeout by tracking number – closes out specified shipments by sending batches of the tracking number for those required shipments in the request. If using this method, multiple tracking numbers must be sent per request to maintain optimal performance of the API. A maximum of 250 tracking numbers can be sent in each request. If closing out by tracking number there is a risk that Royal Mail volume related discounts may not be met.


NOTE 1: Closeout out by carrier, service and tracking number are mutually exclusive, therefore only one method can be used per request else an error will be returned in the response.
NOTE 2: Royal Mail shipments cannot be confirmed in the same request as other carriers. If you attempt to confirm Royal Mail shipments and other carriers in the same request an error will be returned in the response.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

confirmShipmentRequest




<manifestImageType>

C-3

O

PDF only. Base64 manifest returned in response when set to PDF.

<silentPrintProfile>

C-36

O

The Silent Print application allows manifests to be automatically printed to a chosen printer when shipments are created.
To automatically print the manifest image, provide the Silent Print Profile ID of the API user. When the shipment is created the labels will be sent automatically to the configured printer.
See the Silent Print Manual for more information on silent printing.

confirmShipmentRequest/trackingNumbers




<trackingNumber>

C–50

C

Include the trackingNumbers element to closeout specific shipments. Multiple tracking numbers must be sent per request. A maximum of 250 shipments can be sent in a single request.

confirmShipmentRequest/carrierCodes




<carrierCode>

C–4

C

To closeout all unmanifest shipments for a carrier, provide the carrier code (agent code) of that carrier in the request.

confirmShipmentRequest/serviceCodes




<serviceCode>

C-4

C

To closeout all unmanifest shipments for a single service, provide the service code of that service in the request.


confirmShipmentResponse

A successful response may include a Base64 encoded PDF image of a Customer Collection Receipt (Royal Mail Labels only) or Export Manifest if the manifestImageType element was included in the request.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

confirmShipmentResponse/manifestDetail




<manifestImage>

Base 64 String

C

Base64 encoded PDF image of manifest or RMG Customer Collection Receipt.

<manifestNumber>

C–18

C

Unique identifier for Manifest.



printDocument

This service can be used to generate customs documentation for existing shipments to any country, including domestic shipments. The service can be used to generate either a CN23, Proforma Invoice or Commercial Invoice. A successful response will return the requested document type in a Base64 encoded PDF format.

printDocumentRequest

The service can be used to request either a CN23, Proforma Invoice or Commercial Invoice.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

printDocumentRequest/shipment




<trackingNumber

C-70

M

Tracking number or Unique ID returned in the createShipmentResponse.

<documentType>

C–2

M

CN = CN23 (6x4).
PI = Proforma (A4).
CI = Commercial Invoice (A4).

<numberOfCopies>

N–1

O

Number of copies of the document to return. Valid values are 1-5. If not supplied the default number of copies returned is 1.

<eoriNumber>

C-15

O

EORI registration number.
When an EORI number is not given in the API request, then EORI number from the customer record will be used.
For CN23 documents, if both EORI and VAT numbers are provided (either through the API request or through the customer record), then only EORI number will be printed on the document.

<vatNumber>

C-15

O

VAT registration number.
When a VAT number is not given in the API request, then VAT number from the customer record will be used
For CN23 documents, if both EORI and VAT numbers are provided (either through the API request or through the customer record), then only EORI number will be printed on the document.
When a VAT number is provided and EORI number is not provided, then VAT number will be printed on the CN23.

<reasonForExport>

C-30

M

Brief reason for export e.g. "Sale of goods"
For Royal Mail shipments, only the following values are accepted:

  • Gift
  • Commercial Sample
  • Documents
  • Returned Goods
  • Other
  • Sale of goods
  • Mixed Content

<name>

C-40

O

Shipper name to print on the customs document.

<position>

C-50

O

The shipper's job title in the sender company to print on the customs document.

<signatureImage>

O

Base64 encoded image. Maximum image Size supported is 240 x 35 pixels.
NOTE: This field can only be used with the Proforma Invoice and Commercial Invoice. This field cannot be used with CN23.

< signatureImageFormat>

C-4

C

Must be supplied if Signature Image is passed. Specifies the format of the Signature Image – valid values are PNG or JPEG.

<companyStampImage>

O

Base64 encoded image. Maximum image Size supported is 600 x 66 pixels.

<companyStampImageFormat>

C-4

C

Must be supplied if Company Stamp Image is passed. Specifies the format of the Company Stamp Image – valid values are PNG or JPEG.

<silentPrintProfile>

C–36

O

The Silent Print application allows labels to be automatically printed to a chosen printer when shipments are created.
To automatically print the shipment label, provide the Silent Print Profile ID of the API user. When the shipment is created the labels will be sent automatically to the configured printer.
See the Silent Print Manual for more information on silent printing.


printDocumentResponse

The response will return a customs document image based on the shipment information provided in the request. The successful response may include a Base64 encoded PDF image in A4 format for Proforma or Commercial Invoice and Base64 encoded pdf image in 6x4 format for CN23 document.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

printDocumentResponse/document




<trackingNumber>

C-70

M

Tracking Number or Unique ID of the shipment.

<documentType>

C-2

M

Document Type Requested.

<documentImage>

….

M

Base64 encoded image. PI/CI will be returned inA4 format, CN23 will be returned in 6x4 format.



printQRCode

This service allows a QR code to be requested for returns shipments using the Royal Mail Tracked Returns 24 or Tracked Returns 48 returns services. The end consumer can then take this QR code to the post office, either printed or on a mobile device, and scan the QR code to generate the returns label.

printQRCodeRequest

The printQRCodeRequest allows a QR code image to be requested for shipments using Royal Mail tracked returns services.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

printQRCodeRequest/shipment




<trackingNumber>

C-70

M

Tracking Number of the shipment.


printQRCodeResponse

A successful response returns a QR code for the tracking number sent in the request.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

printQRCodeResponse/shipment




<trackingNumber>

C-70

M

Tracking Number of the shipment.

<QRCodeImage

O

Base 64 encoded QR Code image.






manifestHistory

This is an optional service that can be used to return details of the manifests created on a specified date. The manifest details returned in the manifestHistoryResponse can then be used with the printManifestRequest to return a PDF manifest image.

manifestHistoryRequest

The manifestHistoryRequest can be used to return a list of all manifests created on a specified date, or to return manifests for a specified date and carrier.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

manifestHistoryRequest




<manifestDate>

D-10

M

Specifies the manifest creation date to return manifests for. Provide date in the format YYYY-MM-DD.

<carrierCode>

C-4

O

If carrier code is populated, the response will contain manifests for the specified carrier only. If it is not populated, the response will contain manifests for all carriers for the specified date.

manifestHistoryResponse

A successful manifestHistoryResponse returns a list of the manifests that were created for the details provided in the request.
If no manifests are available for the criteria supplied in the request, then a successful response will be returned but the fields in the manifestDetail element will be blank.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes


manifestHistoryResponse/manifests/manifestDetail




<manifestNumber>

C-13

C

Unique manifest number.


<manifestDate>

D-10

C

Date the manifest was created. Date will be provided in the format YYYY-MM-DD.


<carrierCode>

C-4

C

Carrier code of the carrier the manifest is for.


<serviceCode>

C-4

C

If the manifest only contains one service, the service code will be provided in the response.
If the manifest contains multiple services this field will not be populated.


<weight>

N-7,2

C

Total weight of shipments included in the manifest in KG.


<packages>

N-2

C

Total number of packages included in the manifest.


<docketNumber>

C-10

C

For Royal Mail manifests this will contain the OBA Sales Order number associated with the manifest.
Not populated for any other carriers.



printManifest

This service can be used to request a manifest image. A successful response returns the requested manifest image in a Base64 encoded PDF format.

printManifestRequest

The service must be called for a single manifest at a time.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

printManifestRequest




<manifestNumber>

C-13

M

Unique identifier of the manifest. Manifest number can be obtained from the confirmShipmentResponse or the manifestHistoryResponse.
Only one manifest number can be included per request.

printManifestResponse

A successful response returns the requested manifest image as a Base64 encoded PDF string.

Element Name

Data Type

Mandatory /Conditional / Optional

Notes

printManifestResponse/manifestDetail




<manifestNumber>

C-13

C

Unique manifest number. One manifest will be returned per response.

<manifestImage>

Base 64 string

C

Base64 encoded PDF image of manifest.



Terms and Definitions


Term

Definition

Base64

A standard binary-to-text encoding scheme that is used to represent binary data in an ASCII string format. Used to include binary data with an XML structure

DDU

Delivered Duty Unpaid. International trade term indicating the buyer is responsible for paying customs import duties.

DDP

Delivery Duty Paid. International trade term indicating the seller is response for paying customs import duties.

DAP

Delivered at Place. International trade term where the buyer is responsible for paying customs duties. Introduced in Incoterms 2010 as an updated version of DDU.

DAT

Delivered at Terminal. International trade term where the buyer is responsible for paying customs duties. Introduced in Incoterms 2010 as an updated version of DDU.

EORI Number

Economic Operators Registration and Identification number.

IP

Internet Protocol

Manifested

Manifest or RMG Customer Collection Receipt has been created and Customer Collection Receipt has been printed

PDF

Portable Document Format

UI

User Interface

WSDL

Web Service Description Language

XML

eXtensible Markup Language, a flexible standard for data inside a hierarchical structure of named data items

XSD

XSD is XML Schema Definition – this defines a specific template for the XML used by particular systems






Document Controls


Version History

Version

Amendments

Date

Author

1.7.0

Initial version created for API v1.7.
No change to this document from version 1.6.17 – API v1.7 changes are documented in "Intelligent Shipper API – Multipiece Shipment Bookings with Datastream".

17/03/2020

Laura Lyonette

1.7.1

Added section 11 manifestHistory and section 12 printManifest.

14/05/2020

Laura Price

1.7.2

confirmShipment service description updated

19/06/2020

Laura Price

1.7.3

shipperReference2 added to createShipmentRequest

09/09/2020

Laura Price

1.7.4

offlineShipment section added to createShipmentRequest
Update to confirmShipmentRequest silentPrintProfile field wording
serviceAvailability service removed – this is now covered in a separate document

23/10/2020

Laura Price

1.7.5

New customsInformation fields added to createShipmentRequest.
The following fields in createShipmentRequest changed from Optional to Conditional as they are required by certain carriers: shipperEORI, shipperVAT, length, width, height, item HsCode, itemSku

21/12/2020

Laura Price

1.7.6

createShipmentRequest – format code H added to serviceFormat, packageID and weight (package weight) fields changed to conditional.

03/02/2021

Laura Price

1.7.7

createShipmentRequest – invoiceNumber field Notes updated with new conditional requirement for Royal Mail shipments

27/04/21

Laura Price

1.7.8

createShipmentRequest – ItemInformation element updated with Hazmat items fields to be provided if the shipment contains multiple hazardous items.

27/07/21

Mujeeb Mohammad

1.7.9

createShipmentRequest – shipperCity changed to maximum 30 characters, destinationPhoneNumber validation rules for use with Royal Mail SMS notification enhancement added, new field reasonForExport added, itemCOO field changed to conditional
confirmShipmentResponse – manifestNumber updated to maximum 18 characters
printDocumentRequest – additional validation rules added to reasonForExport field description for Royal Mail shipments

11/04/2022

Winnifred Okalla

1.7.10

createShipmentRequest – shipperEORI – field length extended to 18 length

16/05/2022

Joey Chatterjee

1.7.11

createShipmentRequest and createShipmentResponse- labelImageFormat – updated notes to include ZPL formats for Royal Mail shipments
createShipmentRequest- quotedLandedCost- changed from optional to conditional.
createShipmentRequest – notes updated for some customs fields

15/07/2022

Mohamed Bashir


Review

Name

Title

Date Reviewed

Version Reviewed

Laura Price

Head of Business Analysis

15/07/2022

1.7.11


Referenced Documents

Document Name

Version

Intelligent Shipper API – Multipiece Shipment Bookings Appendices

1.7.11

Intelligent Shipper API – Multipiece Shipment Bookings XML Examples

1.7.11

Silent Printing Manual

2.0

Intelligent Shipper Carrier Integrations and Features

N/A