Exporting Tracking Summaries from Royal Mail
This task will export tracking summary information from Royal Mail to an XML file. You must provide one or more tracking numbers to export summaries for.
Settings
Royal Mail Connection
Required
The Royal Mail connection to use. See the Connecting to Royal Mail article if you require more information on how to create/manage connections.
Tracking Numbers
Required
The list of tracking numbers to fetch summaries of from Royal Mail. This can be provided in the form of a comma separated list of tracking numbers, or as a Zynk Object list.
Output File
Required
The name of the file to export the data to. The data will be output in XML format, a sample of which is shown below.
Zynk Settings
Examples
Sample output file:
<?xml version="1.0" encoding="utf-8"?>
<MailPieces xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MailPiece>
<MailPieceId>TK7123456789GB</MailPieceId>
<Status>200</Status>
<CarrierShortName>RM</CarrierShortName>
<CarrierFullName>Royal Mail Group Ltd</CarrierFullName>
<Summary>
<UniqueItemId>00012345678901A234B56</UniqueItemId>
<OneDBarcode>TK7123456789GB</OneDBarcode>
<ProductId>TPN01</ProductId>
<ProductName>Royal Mail Tracked 24</ProductName>
<ProductDescription>Aims to deliver next working day with online tracking</ProductDescription>
<PoductCategory>NON-INTERNATIONAL</PoductCategory>
<DestinationCountryCode>GB</DestinationCountryCode>
<DestinationCountryName>United Kingdom</DestinationCountryName>
<OriginCountryCode>GB</OriginCountryCode>
<OriginCountryName>United Kingdom</OriginCountryName>
<LastEventCode>EVKOP</LastEventCode>
<LastEventName>Delivered by</LastEventName>
<LastEventDateTime>2022-07-22T09:39:56+01:00</LastEventDateTime>
<LastEventLocationName>Salisbury DO</LastEventLocationName>
<StatusDescription>Delivered</StatusDescription>
<StatusCategory>Delivered</StatusCategory>
<StatusHelpText> </StatusHelpText>
<SummaryLine>Your item was delivered on 22-07-2022. </SummaryLine>
</Summary>
<Links>
<Events>
<Href>/mailpieces/v2/TK7123456789GB/events</Href>
<Title>Events</Title>
<Description>Get events</Description>
</Events>
</Links>
</MailPiece>
</MailPieces>