Professional Documents
Culture Documents
CONFIDENTIAL
Preface Contact information
This document is not a statement of In the case of questions, comments
work nor is it a customer sales contract. or requests for clarification regarding
Any proposal issued to the customer will this document, please contact:
be subject to De La Rue’s standard
terms and conditions unless otherwise
agreed in writing. De La Rue International Limited
De La Rue House, Viables, Jays Close,
Basingstoke, RG22 4BS, United
Copyright Kingdom
The copyright in this work is vested in
De La Rue International Limited or Or
De La Rue Authentication Solutions,
hereinafter called De La Rue, and the De La Rue Authentication Solutions
document is issued for the purpose only 1750 N 800 W, LOGAN, UT 84321,
for which it is supplied. It shall not be United States
reproduced in whole or in part or used
for any tendering or manufacturing
purposes except under an agreement
and with the consent in writing of De La Document information
Rue, and then only on the condition that
this notice is included in any such
reproduction. All data provided and all Customer ref:
designs remain the property of De La HMRCGatewayTechSpec1.64
Rue.
Trademarks
De La Rue and the Founder’s Head
device are trademarks of De La Rue
Holdings Limited. All other names and
terms used in this document may be
trademarks belonging to De La Rue’s
licensors or third parties.
02
CONFIDENTIAL
Contents
1. Introduction ......................................................................................................... 6
1.1. Purpose of the document .................................................................................. 6
1.2. Audience .......................................................................................................... 6
1.3. Definitions of terms and abbreviations ............................................................... 6
2. General ............................................................................................................... 7
2.1. Data transmission to the UK National Gateway .................................................. 7
2.2. Data requests to UK UID Issuer ......................................................................... 8
2.3. Access Mechanism ........................................................................................... 8
2.3.1. Authorization ................................................................................................. 8
2.3.1.1. Retry Mechanism...................................................................................... 11
2.4. Recall code ..................................................................................................... 11
2.5. Data Types ..................................................................................................... 11
2.6. Authorized formats (long / short) for UIDs ........................................................ 13
3. XML messages ................................................................................................. 14
3.1.1. Formats ....................................................................................................... 14
3.1.2. HTTP Header............................................................................................... 14
3.1.3. Message Header ......................................................................................... 15
3.1.4. Message Body ............................................................................................. 15
3.1.4.1. Common fields ......................................................................................... 16
3.1.5. Response details ......................................................................................... 16
3.1.5.1. HTTP code 200 ........................................................................................ 16
3.1.5.2. HTTP code 299 ........................................................................................ 16
3.1.5.3. HTTP code 400 ........................................................................................ 17
3.1.5.4. HTTP code 401 ........................................................................................ 19
3.1.5.5. HTTP code 500 ........................................................................................ 20
3.2. Message Content ........................................................................................... 20
3.2.1. Message 2.3................................................................................................ 20
03
CONFIDENTIAL
3.2.2. Message 3.0................................................................................................ 23
3.2.3. Message 3.1................................................................................................ 24
3.2.4. Message 3.2................................................................................................ 25
3.2.5. Message 3.3................................................................................................ 27
3.2.6. Message 3.4................................................................................................ 30
3.2.7. Message 3.5................................................................................................ 32
3.2.8. Message 3.6................................................................................................ 35
3.2.9. Message 3.7................................................................................................ 36
3.2.10. Message 4.1 ............................................................................................ 37
3.2.11. Message 4.2 ............................................................................................ 40
3.2.12. Message 4.3 ............................................................................................ 42
3.2.13. Message 5 ............................................................................................... 45
4. JSON messages ............................................................................................... 46
4.1. Message Structure.......................................................................................... 46
4.1.1. Formats ....................................................................................................... 46
4.1.2. HTTP Header............................................................................................... 46
4.1.3. Message Type ............................................................................................. 46
4.1.4. Message Body ............................................................................................. 47
4.1.5. Response details ......................................................................................... 47
4.1.5.1. Basic information block concerning the response ...................................... 47
4.1.5.2. Basic error block description .................................................................... 48
4.1.5.3. Common codes ........................................................................................ 49
Success code ........................................................................................................... 49
Error codes ............................................................................................................... 49
4.2. Message Content............................................................................................ 51
4.2.1. Message IRU ............................................................................................... 51
4.2.2. Message IRA ............................................................................................... 54
4.2.3. Message 2.3 (IDA)....................................................................................... 56
4.2.4. Message 3.0................................................................................................ 57
04
CONFIDENTIAL
4.2.5. Message 3.1................................................................................................ 58
4.2.6. Message 3.2................................................................................................ 59
4.2.7. Message 3.3................................................................................................ 60
4.2.8. Message 3.4................................................................................................ 61
4.2.9. Message 3.5................................................................................................ 62
4.2.10. Message 3.6 ............................................................................................ 63
4.2.11. Message 3.7 ............................................................................................ 63
4.2.12. Message 4.1 ............................................................................................ 64
4.2.13. Message 4.2 ............................................................................................ 65
4.2.14. Message 4.3 ............................................................................................ 65
4.2.15. Message 5 ............................................................................................... 66
5. Message Validation ........................................................................................... 67
05
CONFIDENTIAL
1. Introduction
1.1. Purpose of the document
The purpose of this document is to describe the different interfaces provided by
the UK National Tobacco Track and Trace Gateway (UK National Gateway) to all
economic operators.
1.2. Audience
The audience of this document is everyone who needs to implement messages
to be sent to the UK National Gateway.
Definitions will be the same as, or very similar to, those described in Article 2 of
the Tobacco Products Directive 2014/40/EU and in Article 2 and 3 of the
Commission Implementing Regulation (EU) 2018/574. They are classified in
alphabetical order.
Aggregated packaging is any packaging containing more than one Unit packet
of tobacco products.
Economic operators are any natural or legal person who is involved in the trade
of tobacco products, including for export, from the manufacturer to the last
economic operator before the first retail outlet. This includes, but is not limited
to, manufacturers, importers, wholesalers and distributors, as well as transport
companies or providers of courier services.
Facility is any location, building or vending machine where tobacco products are
manufactured, stored, or placed on the market.
First retail outlet is the Facility where tobacco products are placed on the market
for the first time, including vending machines used for the sale of tobacco
products.
ID Issuer is an entity responsible for generating and issuing the Unique identifier
(UI) for Unit packet and Aggregated packaging of tobacco products.
06
CONFIDENTIAL
Importer of tobacco or related products is the owner of, or a person having the
right of disposal over, tobacco or related products that have been brought into
the territory of the Union.
Machine is the equipment used for the manufacture of tobacco products which
is integral to the manufacturing process.
Offline flat-files are the electronic files established and maintained by each ID
Issuer that contains data in a plain text format allowing for the extraction of the
information encoded in the Unique identifier (UI) (excluding the time stamp) used
at the Unit packet and Aggregated packaging levels without accessing the
Repositories system.
Registry means the record established and maintained by each ID Issuer of all
the Identifier codes generated for Economic operators, Operators of first retail
outlets, Facilities and Machines, along with the corresponding information.
Retail outlet is any outlet where tobacco products are placed on the market,
including by a natural person.
Unique identifier (UI or UID) is the alphanumeric code enabling the identification
of a Unit packet (upUI) or an Aggregated packaging (aUI) of tobacco product.
Vending van is a vehicle used for the delivery of tobacco products to multiple
retail outlets in quantities that have not been predetermined in advance of the
delivery.
2. General
2.1. Data transmission to the UK National Gateway
All economic operators are subject to send messages to the UK National
Gateway using:
07
CONFIDENTIAL
- either XML messages as described in section 3
- either JSON messages as described in section 4
2.3.1. Authorization
The authorization mechanism used in the solution is based on the industry-
standard OAuth 2.0 (https://oauth.net/2/).
08
CONFIDENTIAL
Example:
Technical User (Service Account) requests for an authentication token from the
Worldline Authentication Provider as follow:
"http://<URL_OAUTH_PROVIDER>/auth/realms/<REALM>/protocol/openidconn
ect/token"
{
"access_token": "<BEARER_TOKEN>",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "<REFRESH_TOKEN>",
"token_type": "bearer"
}
Once received, copy the value of BEARER_TOKEN and make your call to the
Worldline API Gateway as follow:
Note: Your BEARER_TOKEN is available only during the “expire_in” duration (in
seconds). Once expired, you will have to ask for another token.
Refresh Token
Use of the refresh token is optional as the Gateway does not provide a user
interface externally and does not maintain state between calls. However, a
refresh token is included with the authentication response and this can be used
when a new access token is required, if desired. The caller may make a POST
request to the Worldline Authentication Provider using a grant_type of
refresh_token along with the refresh token, the CLIENT_ID and the
CLIENT_SECRET.
09
CONFIDENTIAL
For Human Users (only applicable for authorized users)
10
CONFIDENTIAL
2.3.1.1. Retry Mechanism
All client systems of the solution must implement a retry-mechanism feature in
order to ensure a smooth integration.
This recall code follows the following format: EOID-UUID (Economic operator id
followed by a universally unique identifier).
Data Type
Description Example
'0' (false/disabled)
Boolean Boolean value
'1' (true/enabled)
11
CONFIDENTIAL
Country name coded with ISO-3166-1:2013 alpha-
Country 'DE'
2 (or its latest equivalent).
Currency name coded with ISO 4217:2015 (or its
Currency 'GBP'
latest equivalent)
UTC (Coordinated Universal Time) date
Date corresponding to the following format: YYYY-MM- '2019-05-20'
DD
Decimal Number values, decimal allowed '1' or '2.2' or '3.33'
12
CONFIDENTIAL
Unit packet level unique identifier coded with the
invariant set of ISO646:1991 and composed of
three blocks: LECNIzzzz000010000SLE20070218
ID Issuer's prefix in accordance with
upUI(L) ISO154592:2015, middle block in the format
established by the ID issuer and timestamp
following the Data Type: Time(s) Max length: 50
13
CONFIDENTIAL
(^KPL1.{9})(.*)([0-9]{8})$ (^KPL1.{9})
(^PWPS.{9})(.*)([0-9]{8})$ (^PWPS.{9})
(^LEITA.{8})(.*)([0-9]{8})$ (^LEITA.{8})
(^LECNI.{9})(.*)$ (^LECNI.{9})
(^3P.{13})(.{14})([0-9]{8})$ (^3P.{13})
(^3P.{14})(.{14})([0-9]{8})$ (^3P.{14})
(^3P.{13})([0-9]{8})$ (^3P.{13})
(^20.{13})(.{14})([0-9]{8})$ (^20.{13})
(^20.{14})(.{14})([0-9]{8})$ (^20.{14})
(^1E.{13})(.{14})([0-9]{8})$ (^1E.{13})
(^1E.{14})(.{14})([0-9]{8})$ (^1E.{14})
(^QCGDLR.{10})(.{4})([0-9]{8})$ (^QCGDLR.{10})
(^QCGDLR.{9})(.*)([0-9]{8})$ (^QCGDLR.{9})
3. XML messages
3.1. Message Structure
For each message, the structure has been maintained to match the current EU
TPD structure to ensure compatibility. All elements used inside the message are
described by; the column ‘Priority’ specifies if this element is required (M) or
optional (O); the column ‘Cardinality’ specifies if this element is a single-value
element (S) or a multiple-value elements (M).
3.1.1. Formats
All XML messages have the following structure:
<TPDMessage>
<Header>
…
</Header>
<Body>
…
</Body>
</TPDMessage>
14
CONFIDENTIAL
{{access_token}} refers to access_token value provided in the response of the
authentication request (see 2.3 - Access Mechanism for additional details)
List of fields:
Example:
<TPDMessage>
<Header>
<Message_Signature></Message_Signature>
</Header>
Tag Description
Message_23 Message 2.3 – Deactivation of UIs
Message_30 Message Pairing
Message_31 Message 3.1 – Commissioning
Message_32 Message 3.2 – Aggregation
Message_33 Message 3.3 – Shipment
Message_34 Message 3.4 – Arrival
Message_35 Message 3.5 – Transloading
Message_36 Message 3.6 – disaggregation
Message_37 Message 3.7 – Delivery to Retail Outlet
Message_41 Message 4.1 – Invoice
Message_42 Message 4.2 - Order
Message_43 Message 4.3 – Payment
Message_5 Message 5 – Recall
15
CONFIDENTIAL
3.1.4.1. Common fields
Example:
{
"recall_code": "AWL0001-c1df56cf-b802-426b-8cbe-6b8177ded4b5"
}
16
CONFIDENTIAL
Field Comments Data Cardinality Priority Values
Type
recall_code The unique ID String S M for
generated by the messages
UK Gateway that of type 3.x
can be used for or type
the recall 4.x
functionality
path The path of the String S M
URI on which the
error occurs
code The HTTP integer( S M
response status $int32)
returned
date The UTC date String S M
time when the
error occurs
warnings List M M
reason The reason of string S M
why the error
has been raised
code string S M SHIPMENT_WITHIN_24_HOURS
OPERATION_WITHIN_24_HOURS
RETRY_SUCCESSFULL
Example:
{
"code": 299,
"path": "/v1/gateway/ext/event",
"date": "2020-12-06T16:45:07.782Z",
"warnings": [
{
"reason": “Message ID of previous rejected messages",
"code": "RETRY_SUCCESSFULL"
}
],
"recall_code": "AWL0001-c1df56cf-b802-426b-8cbe-6b8177ded4b5"
}
17
CONFIDENTIAL
Bad request: The submitted document is not valid or the message contains
invalid data.
errors List M M
Example:
{
"code": 400,
"path": "/v1/gateway/ext/event",
18
CONFIDENTIAL
"date": "2018-12-06T16:45:07.782Z",
"errors": [
{
"reason": "#: required key [UKMessage] not found",
"code": "INVALID_REQUEST_FORMAT"
},
{
"reason": "[CCQA10000UID2412546546,
CCQA10000UID2514521458]",
"code": "UI_NOT_VALID"
},
{
"reason": "[CCQA10000UID2412546547,
CCCCQA10000UID2514521459]",
"code": "UI_EXPIRED"
}
]
}
19
CONFIDENTIAL
Example:
{
"code": 401,
"path": "/v1/gateway/ext/event",
"date": "2019-03-12T15:57:54.516Z",
"errors": [
{
"code": " SECURITY_INVALID_OR_EXPIRED_TOKEN "
}
]
}
errors List M M
20
CONFIDENTIAL
Deact_Type Deactivation of unit packet Integer S M 1 Unit packet level UIs
or 2 Aggregated level UIs
aggregated level UIs
Deact_Reason1 Identification of the reason Integer S M 1 Product destroyed
for deactivation 2 Product stolen
3 UI destroyed
4 UI stolen
5 UI unused
6 Other
Deact_Reason2 Description of other reason Text S M, if
Deact_Rea
son1=
6
Deact_Reason3 Additional description of Text S O
the reason
Deact_upUI List of unit packet level UIs upUI(s) M M, if
to be deactivated Deact_Typ
e=1
Deact_aUI List of aggregated level UIs aUI M M, if
to be deactivated Deact_Typ
e=2
Remark:
UIDs specified in “Deact_upUI” are human-readable codes (not machine-
readable codes generated by ID Issuers)
Example (XML):
<TPDMessage>
<Body>
<Message_23>
<Message_ID>AAAAA11123</Message_ID>
<Event_Time>18062210</Event_Time>
<Message_Time_Long>2020-03-
31T23:16:45Z</Message_Time_Long>
<EO_ID>AWL0001</EO_ID>
21
CONFIDENTIAL
<Deact_Type>2</Deact_Type>
<Deact_Reason1>6</Deact_Reason1>
<Deact_Reason2>Someone did a mistake</Deact_Reason2>
<Deact_Reason3>We do not know who</Deact_Reason3>
<Deact_aUI>
<aUI>AWLvnaOzT29Q18063008</aUI>
<aUI>AWLXHTtio71j18063008</aUI>
</Deact_aUI>
</Message_23>
</Body>
</TPDMessage>
<TPDMessage>
<Body>
<Message_23>
<Message_ID>AAAAA11123</Message_ID>
<Event_Time>18062210</Event_Time>
<Message_Time_Long>2020-03-
31T23:16:45Z</Message_Time_Long>
<EO_ID>AWL0001</EO_ID>
<Deact_Type>1</Deact_Type>
<Deact_Reason1>6</Deact_Reason1>
<Deact_Reason2>Someone did a mistake</Deact_Reason2>
<Deact_Reason3>We do not know who</Deact_Reason3>
<Deact_upUI>
<upID>AWLvnaOzT29z18063008</upID>
<upID>AWLXHTtio71t18063008</upID>
</Deact_upUI>
</Message_23>
</Body>
</TPDMessage>
22
CONFIDENTIAL
3.2.2. Message 3.0
Pairing between printed codes and virtual paired codes
Example (XML):
<TPDMessage>
<Body>
<Message_30>
<Message_ID>AAAAA11137</Message_ID>
<EO_ID>AWL0001</EO_ID>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Event_Time>18073010</Event_Time>
<upUI>
<upID>
<Printed_Code>LECNIzzzz000010000SLE2020073010</Printed_Code>
<Paired_Code>QCGDLRabcd000010000UK</Paired_Code>
</upID>
<upID>
<Printed_Code>LECNIzzzz000020000SLE2020073010</Printed_Code>
<Paired_Code>QCGDLRabcd000020000UK</Paired_Code>
</upID>
<upID>
<Printed_Code>LECNIzzzz000030000SLE2020073010</Printed_Code>
<Paired_Code>QCGDLRabcd000030000UK</Paired_Code>
</upID>
23
CONFIDENTIAL
</upUI>
</Message_30>
</Body>
</TPDMessage>
Remarks:
- Maximum: 10000 upUI_1 per message
Example:
<TPDMessage>
<Body>
<Message_31>
<Message_ID>AAAAA11131</Message_ID>
<Event_Time>18062210</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<EO_ID>AWL0001</EO_ID>
<F_ID>AWL1001</F_ID>
<upUI_1>
24
CONFIDENTIAL
<upID>AWLvnaOzT29QL9UM2018063008</upID>
<upID>AWLXHTtio71jL9UM2018063008</upID>
</upUI_1>
<upUI_2>
<upID>AWLvnaOzT29Q</upID>
<upID>AWLXHTtio71j</upID>
</upUI_2>
<upUI_comment>Something</upUI_comment>
</Message_31>
</Body>
</TPDMessage>
3.2.4. Message 3.2
Message used to report aggregation between children and parent.
1 aggregation of only
unit packet level UIs
2 aggregation of only
aggregated level UIs
3 aggregation of both
Aggregation_Type Identification of aggregation type Integer S M
unit packet and
aggregated level UIs
25
CONFIDENTIAL
Example:
<TPDMessage>
<Body>
<Message_32>
<Message_ID>AAAAA11132</Message_ID>
<EO_ID>AWL0001</EO_ID>
<F_ID>AWL1001</F_ID>
<Event_Time>18062210</Event_Time>
<Message_Time_Long>2020-03-
31T23:16:45Z</Message_Time_Long>
<aUI>01326884000100821WAJPW9KP2MGG</aUI>
<Aggregation_Type>3</Aggregation_Type>
<Aggregated_UIs1>
<upID>AWLvnaOzT29QL9UM18063008</upID>
<upID>AWLXHTtio71jL9UM18063008</upID>
</Aggregated_UIs1>
<Aggregated_UIs2>
<upID>AWLvnaOzT29QL9UM18063009</upID>
<upID>AWLXHTtio71jL9UM18063009</upID>
</Aggregated_UIs2>
<aUI_comment>A Comment</aUI_comment>
</Message_32>
</Body>
</TPDMessage>
26
CONFIDENTIAL
3.2.5. Message 3.3
Dispatch of tobacco products from a facility
<F_ID>LECNI505788</F_I
D>
</Destination_ID4>
Destination_ID5 Destination facility's full Text S M, if
address: street, house Destination_ID
number, postal code, city 1=1
27
CONFIDENTIAL
Destination_ID5_A Text O
ddress_Name
Destination_ID5_A Text M, if
ddress_StreetOne Destination_ID
1 =1
Destination_ID5_A Text O
ddress_StreetTwo
Destination_ID5_A Text M, if
ddress_City Destination_ID
1 =1
Destination_ID5_A Text O
ddress_PostCode
Transport_mode Mode of transport by Integer S M 0 Other
which the product leaves 1 Sea Transport
the facility. 2 Rail transport
3 Road transport
4 Air transport
5 Postal consignment
6 Fixed transport
installations
7 Inland waterway transport
28
CONFIDENTIAL
Transport_s2 The logistic operator's Text S M, if
tracking number Transport
_s1=1
EMCS Dispatch under the Excise Boolean S M 0 No
Movement and Control 1 Yes
System (EMCS)
EMCS_ARC Administrative Reference ARC S M, if
Code (ARC) EMCS = 1
SAAD Dispatch with a simplified Boolean S M 0 No
accompanying 1 Yes
document.
Example:
29
CONFIDENTIAL
Shipping of 2 master cases from F_ID AWL1001 to F_ID AWL2001 by the truck
with plate number NCH618.
<TPDMessage>
<Body>
<Message_33>
<Message_ID>AAAAA11133</Message_ID>
<EO_ID>AWL0001</EO_ID>
<F_ID>AWL1001</F_ID>
<Event_Time>18062211</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Destination_ID1>2</Destination_ID1>
<Destination_ID2>AWL2001</Destination_ID2>
<Transport_mode>3</Transport_mode>
<Transport_vehicle>NCH618</Transport_vehicle>
<Transport_cont1>0</Transport_cont1>
<Transport_s1>0</Transport_s1>
<EMCS>0</EMCS>
<SAAD>0</SAAD>
<Exp_Declaration>0</Exp_Declaration>
<UI_Type>2</UI_Type>
<aUIs>
<aUI>01326884000100821WAJPW9KP2MGG18063008</aUI>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
</aUIs>
<Dispatch_comment>Comment</Dispatch_comment>
</Message_33>
</Body>
</TPDMessage>
30
CONFIDENTIAL
Message_Time_Long The time that the message is first Time(L) S M
submitted to the Gateway, Long
format.
Example:
<TPDMessage>
<Body>
<Message_34>
<Message_ID>AAAAA11134</Message_ID>
<EO_ID>AWL0002</EO_ID>
<F_ID>AWL2001</F_ID>
<Event_Time>18062311</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Product_Return>0</Product_Return>
<UI_Type>2</UI_Type>
<aUIs>
<aUI>01326884000100821WAJPW9KP2MGG18063008</aUI>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
</aUIs>
<Arrival_comment>Comment</Arrival_comment>
</Message_34>
</Body>
</TPDMessage>
31
CONFIDENTIAL
3.2.7. Message 3.5
Change of transport type
Destination_ID3_Address_StreetO ne Text M, if
Destination_ID 1 =
0
Destination_ID3_Address_StreetT wo Text O
Destination_ID3_Address_City Text M, if
Destination_ID 1 =
0
Destination_ID3_Address_PostCo de Text O
32
CONFIDENTIAL
Transport_mode Mode of transport Integer S M 0-7
to which the
product is
transloaded, see:
Commission
Regulation
(EC) No
684/2009, Annex
II, Code List
7
33
CONFIDENTIAL
subject to the
transloading
Example:
<TPDMessage>
<Body>
<Message_35>
<Message_ID>AAAAA11135</Message_ID>
<EO_ID>AWL0001</EO_ID>
<Event_Time>18062511</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Destination_ID1>1</Destination_ID1>
<Destination_ID2>AWL2001</Destination_ID2>
<Transport_mode>3</Transport_mode>
<Transport_vehicle>ABC123</Transport_vehicle>
<Transport_cont1>0</Transport_cont1>
<EMCS>0</EMCS>
<UI_Type>2</UI_Type>
<aUIs>
<aUI>01326884000100821WAJPW9KP2MGG18063008</aUI>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
</aUIs>
<Transloading_comment>Comment</Transloading_comment>
</Message_35>
</Body>
</TPDMessage>
34
CONFIDENTIAL
3.2.8. Message 3.6
When aggregation is disaggregated a message 3.6 can be used but is not mandatory.
Example (XML):
<TPDMessage>
<Body>
<Message_36>
<Message_ID>AAAAA11136</Message_ID>
<EO_ID>AWL0002</EO_ID>
<F_ID>AWL2001</F_ID>
<Event_Time>18062410</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
<disaUI_comment>Some Comment</disaUI_comment>
</Message_36>
</Body>
</TPDMessage>
35
CONFIDENTIAL
3.2.9. Message 3.7
A vending van has delivered products to a retail outlet.
Example:
<TPDMessage>
<Body>
<Message_37>
<Message_ID>AAAAA11137</Message_ID>
<EO_ID>AWL0002</EO_ID>
<F_ID>AWL3001</F_ID>
<Event_Time>18102410</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<UI_Type>1</UI_Type>
<upUIs>
<upID>AWLvnaOzT29QL9UM18063008</upID>
</upUIs>
<Delivery_comment>Some Comment</Delivery_comment>
</Message_37>
</Body>
</TPDMessage>
36
CONFIDENTIAL
3.2.10. Message 4.1
Invoice message
37
CONFIDENTIAL
Buyer_Address_StreetOne Text M, if
Invoice_Buyer1 = 0
Buyer_Address_StreetTwo Text O
Buyer_Address_City Text M, if
Invoice_Buyer1= 0
Buyer_Address_PostCode Text O
38
CONFIDENTIAL
UI_Type Identification of UI types Integer S M
covered by
the invoice (recorded at
the highest level of
available aggregation)
upUIs List of unit packet level upUI(L) M M, if UI_Type = 1 or
UIs covered by the 3
invoice
aUIs List of aggregated level aUI M M, if UI_Type = 2 or
UIs covered by the 3
invoice
Invoice_comment Comments by the Text S O
reporting entity
Example:
<TPDMessage>
<Body>
<Message_41>
<Message_ID>AAAAA11137</Message_ID>
<EO_ID>AWL0001</EO_ID>
<Event_Time>18063010</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Invoice_Type1>1</Invoice_Type1>
<Invoice_Number>0444322020100000831885</Invoice_Number>
<Invoice_Date>2019-05-20</Invoice_Date>
<Invoice_Seller>1</Invoice_Seller>
<Invoice_Buyer1>1</Invoice_Buyer1>
<Invoice_Buyer2>AWL0002</Invoice_Buyer2>
<First_Seller_EU>1</First_Seller_EU>
<Product_Items_1>
<tpid>02565-16-00230</tpid>
<tpid>02565-16-00231</tpid>
</Product_Items_1>
<Product_Items_2>
<pn>12121212121212</pn>
<pn>12121212121232</pn>
</Product_Items_2>
<Product_Price>
<price>12.2</price>
<price>13.2</price>
</Product_Price>
<Invoice_Net>1223.2</Invoice_Net>
<Invoice_Currency>GBP</Invoice_Currency>
<UI_Type>2</UI_Type>
<aUIs>
<aUI>01326884000100821WAJPW9KP2MGG18063008</aUI>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
</aUIs>
39
CONFIDENTIAL
<Invoice_comment>A Comment</Invoice_comment>
</Message_41>
</Body>
</TPDMessage>
Example (XML):
<TPDMessage>
<Body>
<Message_42>
<Message_ID>AAAAA11137</Message_ID>
<EO_ID>AWL0001</EO_ID>
<Event_Time>18063010</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Order_Number>0444322020100000831885</Order_Number>
<Order_Date>2018-05-20</Order_Date>
<UI_Type>2</UI_Type>
40
CONFIDENTIAL
<aUIs>
<aUI>01326884000100821WAJPW9KP2MGG18063008</aUI>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
</aUIs>
<Order_comment>A Comment</Order_comment>
</Message_42>
</Body>
</TPDMessage>
41
CONFIDENTIAL
3.2.12. Message 4.3
Partial or total payment of one or several invoices.
42
CONFIDENTIAL
Payer_Address _Name Text O
Payer_Address_StreetOne Text M, if
Payment_Payer1 =
0
Payer_Address_StreetTwo Text O
Payer_Address_PostCode Text O
43
CONFIDENTIAL
aUIs List of aUI M M, if
aggregated level Payment_Invoice =
UIs covered by 0 and UI_Type
the payment = 2 or 3
Example (XML):
<TPDMessage>
<Body>
<Message_43>
<Message_ID>AAAAA11137</Message_ID>
<EO_ID>AWL0002</EO_ID>
<Event_Time>18073010</Event_Time>
<Message_Time_Long>2020-03-31T23:16:45Z</Message_Time_Long>
<Payment_Date>2018-07-30</Payment_Date>
<Payment_Type>1</Payment_Type>
<Payment_Amount>1223.2</Payment_Amount>
<Payment_Currency>GBP</Payment_Currency>
<Payment_Payer1>1</Payment_Payer1>
<Payment_Payer2>AWL0002</Payment_Payer2>
<Payment_Recipient>AWL0001</Payment_Recipient>
<Payment_Invoice>0</Payment_Invoice>
<Invoice_Paid>0444322020100000831885</Invoice_Paid>
<UI_Type>2</UI_Type>
<aUIs>
<aUI>01326884000100821WAJPW9KP2MGG18063008</aUI>
<aUI>01326884000100821PX0WAJA0GKP218063008</aUI>
</aUIs>
<Payment_comment>A comment</Payment_comment>
</Message_43>
</Body>
</TPDMessage>
44
CONFIDENTIAL
3.2.13. Message 5
Recall of a message
Notice: A recall with respect to operational and logistic events results in flagging
the recalled message as cancelled but does not lead to the deletion of the
existing database record.
45
CONFIDENTIAL
4. JSON messages
4.1. Message Structure
For each message, all elements used inside the message are described; the
column ‘M/O’ specifies if this element is required (M) or optional (O)
4.1.1. Formats
All messages are formatted using standard JSON representation
IRA 2.2 Response for reporting the issuance of serial numbers at aggregated level.
IDA 2.3 Message 2.3 – Deactivation of UIs
PAR 3.0 Message 3.0 – Pairing of UIs
EUA 3.1 Message 3.1 - Commissioning
EPA 3.2 Message 3.2 - Aggregation
EDP 3.3 Message 3.3 - Shipment
ERP 3.4 Message 3.4 - Arrival
46
CONFIDENTIAL
4.1.4. Message Body
The Message Body contains one (and only one) message to be transferred to
the UK Gateway.
All messages must contain this basic information block concerning the request:
Field Data
Description Cardinality Priority Values
Type
Message_Type The identifier of the type of See 4.1.3 for list of
Text S M
message message types
Code The internal code of
acknowledgment of the
Text S M property is nullable
message. Used for recall
too.
47
CONFIDENTIAL
4.1.5.2. Basic error block description
Example:
{
…
"Errors": [
{
"Error_Code": "UI_NOT_EXIST",
"Error_Descr": "Text describing the error code",
"ErrorData":
"CF12D12AB887#CFEEAB2AB887#CFEED12AB887#AB1212AB6395"
}
],
…
}
48
CONFIDENTIAL
4.1.5.3. Common codes
Success code
HTTP Status 202 : the submitted message has been accepted by the UK
National Gateway
Example:
{
"Code": "873345b2-882f-4064-91f0-90669b46c30a",
"Message_Type": "DFA",
"Error": false,
"Errors": null,
"Checksum": "G6HF5H"
}
Error codes
HTTP
Error Code Error Description
Status
299 Check that the Events are
reported within 24 hours from the
OPERATION_WITHIN_24_HOURS
occurrence of the event:
299 A dispatch event has been sent
SHIPMENT_WITHIN_24_HOURS more then 24 hours before the
actual intended event time
401 Invalid or Expired security token
Please note that in this case
SECURITY_INVALID_OR_EXPIRED_TO the code or internal ID is not
KEN returned, as the message has
not reached the processing
service yet.
400 This error is returned when at
INVALID_REQUEST_FORMAT least one of the mandatory fields
are missing
400 When the field “Message_Type”
INVALID_MESSAGE_TYPE
is out of the defined list.
400 When the body of the message
INVALID_INPUT_FORMAT
doesn’t contain a valid JSON.
400 REQUIRED_FIELD_FAILED_VALIDATIO Check that mandatory fields are
N not missing and fields are
compliant with the defined format
400 A same UID is not present
MULTIPLE_UID
several times in the message
49
CONFIDENTIAL
400 the upUI exists in the repository
UI_NOT_VALID and has never been applied.
the aUI is not used
400 UI_NOT_EXIST check if the upUI exists
400 UI_EXPIRED upUI is not expired
400 MAX_LENGTH_FAILED_VALIDATION Message size exceed
400 Check that mandatory fields are
REQUIRED_FIELD_FAILED_VALIDATIO
not missing and fields are
N
compliant with the defined format
400 Check if ordered list of long
NON_COMPATIBLE_UIS upUIs matches with list of short
upUIs
400 Check if the list of long upUIs has
NOT_THE_SAME_NUMBER_OF_ITEMS the same number of items that
the list of short upUIs
400 Check that the UID is not
UI_DEACTIVATED
deactivated
400 Caller is not allowed to call this
CLAIM_VALIDATION_FAILED
method
400 Custom code provided when
CODE_NOT_EXIST recall message send for
unknown recall code
400 MULTIPLE_AGGREGATION check that the aUI is not used
400 check that the upUI has never
been applied no 3.1 message on
this upUI, based on the upUI(s))
UIS_APPLICATION_ERROR check that the FID of the
message is the same defined in
the 2.1 message received form
the ID Issuer for this upUI
400 Check that last message
received for aggregated UIs has
LOCATION_MISMATCH
the same FID as the location FID
in the current message
400 Check that the upUi is not
already sent in a 32 with a
OUT_OF_SEQUENCE
Message_Time_Long after the
pending one
400 Check that the aUi last message
is not a 33 or 37 and check in 32
UI_SEQUENCE_ERROR
if the upUI/aUI are not child of a
shipped aUI
400 Principle 5: The reporting on the
Arrival should be done on the
ARRIVAL_NOTALLOWED
same UI that have been reported
during the Dispatch/Transloading
50
CONFIDENTIAL
process. This is a consequence
of principle 4. This means that an
Arrival Event that contains child
UI of UI reported during the
Dispatch/Transloading Event will
be rejected. The same UI must
be reported.
400 Check if for all UIs related to the
event identified by RecallCode is
the very last unrecalled event
RECALL_NOT_LAST_EVENT
occurred on all such UI including
related implicitly disaggregated
parents.
400 Check for each AUids in 3.2, 3.3,
3.4, 3.5, 3.7 are activated, not
UI_ALREADY_DISAGGREGATED
disaggregated, and not
aggregated.
400 Printed codes have been used in
PRINTED_CODES_ALREADY_USED
another pairing
400 Paired codes have been used in
PAIRED_CODES_ALREADY_USED
another pairing
500 SYSTEM_ERROR Internal system error.
51
CONFIDENTIAL
Process_Type Indication if the Boolean S M 0 – No (only for
production process fully hand made
involves machinery products) 1 –
Yes
M_ID Machine identifier MID S M, if Process
code _Type
=1
52
CONFIDENTIAL
Intended_Market Intended country of Country S M
retail sale.
Example:
{
"EO_ID":"QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time":"19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Process_Type":0,
"M_ID":"Machine Id A",
"P_Type":2,
"P_OtherType":null,
"P_CN": "FG7H68FHF"
"P_Brand":"Product brand A",
53
CONFIDENTIAL
"P_Weight":10.0,
"TP_ID":"1234",
"TP_PN":"1234",
"Intended_Market":"BG",
"Intended_Route1":1,
"Intended_Route2":"BG",
"Import":false, "Req_Quantity":2,
"upUI":["DANXXXXXXXXXXXX1PR0123456789","DANXXXXXXXXXXXX2PR0123456789"],
"Code": null, "Message_Type":"IRU"
}
Example:
{
"EO_ID": "QCUKR+1AB020054", "F_ID": "QCUKR<1AB020054000049",
"Event_Time" : "19032014", "Message_Time_Long":"2019-03-20T14:16:45Z",
"Req_Quantity": 2,
"aUI": ["DANXXXXXXXXXXXX1FA000001", " DANXXXXXXXXXXXX2FA000001" ],
"Message_Type": "IRA",
"Code": "873345b2-882f-4064-91f0-90669b46c30a",
}
54
CONFIDENTIAL
55
CONFIDENTIAL
4.2.3. Message 2.3 (IDA)
Changes the status of the UIs list in the request to “deactivated”
Message content:
- Same message content as XML Message 2.3, except no message_id field
- Message_type: IDA Example:
{
"EO_ID": "QCUKR+1AB020054",
"Event_Time" : "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Deact_Type": 1,
"Deact_Reason1": 1, "Deact_Reason2": "reason one",
"Deact_Reason3":
"reason two",
"Deact_upUI": [
"DANXXXXXXXXXXXX1PR0123456789" ],
"Deact_apUI": [ "DANXXXXXXXXXXXX1FA000001" ],
"Message_Type": "IDA",
"Code": "873345b2-882f-4064-91f0-90669b46c30a",
}
Response:
common success response and error responses (see 4.1.5.3)
56
CONFIDENTIAL
4.2.4. Message 3.0
Pairing between printed code and virtual paired code
Message content:
- Same message content as XML Message 3.0, except no message_id field
- Message_type: PAR
{
"EO_ID": "QCUKR+1AB020054",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"upUI": {
"upID": [
{
"Printed_Code": "DANXXXXXXXXXXXX1PR012345678919030110",
"Paired_Code": "QCDLRXXXXXXXXXXX10FA000001"
},
{
"Printed_Code": "DANXXXXXXXXXXXX1PR012345678919030110",
"Paired_Code": "QCDLRXXXXXXXXXXX10FA000001"
}
]
},
"Message_Type": "PAR",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
57
CONFIDENTIAL
4.2.5. Message 3.1
Commissioning of UIDs
Message content:
- Same message content as XML Message 3.1, except no message_id field
- Message_type: EUA
{
"EO_ID": "QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"upUI_1": [
"DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110"
],
"upUI_2": [
"DANXXXXXXXXXXXX1",
"DANXXXXXXXXXXXX2"
],
"upUI_comment": "Comments",
"Message_Type": "EUA",
"Code": "873345b2-882f-4064-91f0-90669b46c30a",
}
Response:
common success response and error responses (see 4.1.5.3)
58
CONFIDENTIAL
4.2.6. Message 3.2
Aggregation of UIDs
Message content:
- Same message content as XML Message 3.2, except no message_id field
- Message_type: EPA
Example:
{
"EO_ID": "QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Aggregation_Type": "1",
"aUI" : "DANXXXXXXXXXXXX1FA00000119030110",
"Aggregated_UIs1": [
"DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110",
"DANXXXXXXXXXXXX3PR012345678919030110",
"DANXXXXXXXXXXX10FA00000119030110"
],
"Aggregated_UIs2": [
"DANXXXXXXXXXXX10FA00000119030110"
],
"aUI_comment": "Comments",
"Message_Type": "EPA",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
59
CONFIDENTIAL
4.2.7. Message 3.3
Record that the UIs listed in the call have been dispatched from the economic
identifier
Message content:
- Same message content as XML Message 3.3, except no message_id field
- Message_type: EDP
Additional technical message validations:
N/A
Example:
{
"EO_ID": "QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Destination_ID1": "1",
"Destination_ID2": "FacilityIdB",
"Destination_ID3": [ " FacilityIdB ", " FacilityIdB " ],
"Destination_ID4": [ " FacilityIdB” ],
"Destination_ID5": "FacilityIdA",
"Transport_vehicle": "1",
"Transport_cont1": 1,
"Transport_cont2": "1",
"Transport_s1": 1,
"Transport_s2": "1", "EMCS": false,
"EMCS_ARC": null,
"SAAD": 1,
"SAAD_number": 1,
"Exp_Declaration": 1,
"Exp_DeclarationNumber": 1,
"UI_Type": 3,
"upUIs": [ "DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110" ],
"aUIs": [ "DANXXXXXXXXXXXX1FA00000119030110" ],
"Dispatch_comment": "Comments",
"Message_Type": "EDP",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
60
CONFIDENTIAL
4.2.8. Message 3.4
Record that the UIs listed in the call have been received to an economic
identifier.
Message content:
- Same message content as XML Message 3.4, except no message_id field
- Message_type: ERP
Example :
{
"EO_ID": "QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time": "19032014", "Message_Time_Long":"2019-03-
20T14:16:45Z",
"Product_Return": "true",
"UI_Type": "1",
"upUIs": [
"DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110"
],
"aUIs": [
"DANXXXXXXXXXXXX1PR012345678919030110"
],
"Arrival_comment": "Comments",
"Message_Type": "ERP",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
61
CONFIDENTIAL
4.2.9. Message 3.5
Event to show that UIs have been moved from one transport mechanism to
another.
Message content:
- Same message content as XML Message 3.5, except no message_id field
- Message_type: ETL
Example:
{
"EO_ID": "QCUKR+1AB020054",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Destination_ID1": 1,
"Destination_ID2": "FGHZ7G",
"Destination_ID3": "",
"Transport_mode": 1,
"Transport_vehicle": 1,
"Transport_cont1": 1,
"Transport_cont2": "code",
"EMCS": 1,
"EMCS_ARC": "ref",
"UI_Type": 1,
"upUIs": [
"DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110"
],
"aUIs": [
"DANXXXXXXXXXXX10FA00000119030110"
],
"Transloading_comment": "Comments",
"Message_Type": "ETL",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
62
CONFIDENTIAL
4.2.10. Message 3.6
Event showing that an aggregation no longer exists
Message content:
- Same message content as XML Message 3.6, except no message_id field
- Message_type: EUD
Example:
{
"EO_ID": "QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"aUI": "DANXXXXXXXXXXX10FA00000119030110",
"disaUI_comment": "Comments",
"Message_Type": "EUD",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Message content:
- Same message content as XML Message 3.3, except no message_id field
- Message_type: EVR
Example:
{
"EO_ID": "QCUKR+1AB020054",
"F_ID": "QCUKR<1AB020054000049",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z", "UI_Type": 1,
"upUIs": [
"DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110"
],
"aUIs": [
"DANXXXXXXXXXXX10FA00000119030110"
],
"Delivery_comment": "Comments",
"Message_Type": "EVR",
63
CONFIDENTIAL
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
Message content:
- Same message content as XML Message 4.1, except no message_id field
- Message_type: EIV
{
"EO_ID": "QCUKR+1AB020054",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Invoice_Type1": 1,
"Invoice_Type2": "other type",
"Invoice_Number": "INV000001",
"Invoice_Date": "2018-08-23T07:32:20.7878086+00:00",
"Invoice_Seller": "SellerId",
"Invoice_Buyer1": false,
"Invoice_Buyer2": null,
"Buyer_Name": "Buyer1",
"Buyer_Address": "BuyerAddress",
"Buyer_CountryReg": "LU",
"Buyer_TAX_N": "TAX0001",
"First_Seller_EU": 1,
"Product_Items_1": [ "11111-1111111","11111-1111112" ],
"Product_Items_2": [ "01234567891234","01234567891235" ],
"Product_Price": [ "16.99", "19.99" ],
"Invoice_Net": 10099.99,
"Invoice_Currency": "GBP",
"UI_Type": 1,
"upUIs": [ "DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX1PR012345678919030110" ],
"aUIs": [ "DANXXXXXXXXXXX10FA00000119030110" ],
"Invoice_comment": "Comments",
"Message_Type": "EIV",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
64
CONFIDENTIAL
4.2.13. Message 4.2
Adds a purchase order event to a UI
Message content:
- Same message content as XML Message 4.2, except no message_id field
- Message_type: EPO
Example:
{
"EO_ID": "QCUKR+1AB020054",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Order_Number": "1234",
"Order_Date": "2018-08-23T07:32:20.7878086+00:00",
"UI_Type": 1,
"upUIs": [ "DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX1PR012345678919030110" ],
"aUIs": [ "DANXXXXXXXXXXX10FA00000119030110" ],
"Order_comment": "Comments",
"Message_Type": "EPO",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
Message content:
- Same message content as XML Message 4.3, except no message_id field
- Message_type: EPR
Example:
{
"EO_ID": "QCUKR+1AB020054",
"Event_Time": "19032014",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"Payment_Date": "2018-08-23T07:32:20.7878086+00:00",
"Payment_Type": 1,
"InvoiceType": 1,
65
CONFIDENTIAL
"UI_Type": 1,
"Payment_Amount": 1.99,
"Payment_Currency": "GBP",
"Payment_Payer1": true,
"Payment_Payer2": "PayerId", "Payer_Name": "PayerNmae",
"Payer_Address": "Address",
"Payer_CountryReg": "UK",
"Payer_TAX_N": "TaxId",
"Payment_Recipient": "PaymentRecipient",
"Payment_Invoice": 1,
"Invoice_Paid": "test" ,
"upUIs": [ "DANXXXXXXXXXXXX1PR012345678919030110",
"DANXXXXXXXXXXXX2PR012345678919030110" ],
"aUIs": [ "DANXXXXXXXXXXX10FA00000119030110",
"DANXXXXXXXXXXX20FA00000119030110" ],
"Payment_comment": "Comments",
"Message_Type": "EPR",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
4.2.15. Message 5
Given a recall id (“Code” in the return of any message) The caller can mark that
event invalid.
This is possible for message types 2-1, 2-2, 3-1 to 3-7, 4-1, 4-2 and 4-3)
Message content:
- Same content as XML Message 5, except no message_id field
- Message_type: RCL
Example:
{
"EO_ID":"QCUKR+1AB020054",
"Recall_CODE":"6854f9a6-a2b2-4c08-8000-0173f3c35567",
"Message_Time_Long":"2019-03-20T14:16:45Z",
"RecallReason1":1,
"RecallReason2":1,
"RecallReason3":"Comments",
"Message_Type":"RCL",
"Code": "873345b2-882f-4064-91f0-90669b46c30a"
}
Response:
common success response and error responses (see 4.1.5.3)
66
CONFIDENTIAL
5. Message Validation
67
CONFIDENTIAL
reposito
ry)
Functional upUI application : VAL_UI_FID_APP
- check that the upUI has never
Yes (in
been applied no 3.1 message on this
the
UIS_APPLICATION_ERRO upUI, based on the upUI(s))
3.1 invalid
R - check that the FID of the message
reposito
is the same defined in the 2.1
ry)
message received form the ID Issuer
for this upUI
Functional aUI validity : check that the aUI is VAL_UI_ORD_AG
Yes (in
not used (no 3.2 message on this G_MULT
3.2 (for the
aUI) OR if it has been used (existing
MULTIPLE_AGGREGATION aggregation invalid
3.2 message on this aUI) it is
aUI) reposito
disaggregated (last message for this
ry)
aUI is a 3.6 message)
Functional The UID exists in the repository : VAL_UI_EXIST_U
- for 2.3 : check that the upUI is in 2.3 – 3.2 PUI
database (received from ID Issuer) (for VAL_UI_EXIST_A
Yes (in
or the aUI exists in a 3.2 message aggregated UI
the
- for 3.x: check that the upUI exists UIs) – 3.3 – VAL_UI_EXIST_U
UI_NOT_EXIST invalid
in a 3.1 message or the aUI exists in 3.4 – 3.5 – PUI_SEQ
reposito
a 3.2 message 3.6 – 3.7 – VAL_UI_EXIST_A
ry)
- for 4.x : check that the upUI exists 4.1 – 4.2 – UI_SEQ
in a 3.1 message or the aUI exists in 4.3
a 3.2 message
Functional Yes (in VAL_UI_EXPIRY
upUI is not expired : check that
the
application date (timestamp) doesn’t
UI_EXPIRED 3.1 invalid
exceed the 6 months period after
reposito
the code has been issued
ry)
Functional Check that the UID is not VAL_UI_ORD_DE
deactivated (no 2.3 message on this ACTIVATED
UID) VAL_UI_ORD_RE
Yes (in ACTIVATION
2.3 – 3.1 –
Check that the UID don’t have a the
3.2 – 3.3 –
UI_DEACTIVATED parent, in the whole hierarchy, invalid
3.4 – 3.5 –
deactivated with reason Product reposito
3.6 – 3.7
destroyed or Product stolen (no 2.3 ry)
message on the UID parents
hierarchy with Deact_Reason1 = 1
or 2)
Functional Check that the aUI has not be VAL_UI_ORD_DI
previously disaggregated (no SAGG
existing 3.6 message for this aUI VAL_UI_ORD_IM
between the last 3.2 message and PLDISAGG
this one)
68
CONFIDENTIAL
has the same FID as the location FID reposito
in the current message ry)
For 3.3 message :
Check that the 3.1 or 3.2 or 3.4
message related to the UI (last one
of these messages) has the same
FID as the dispatch FID of the
current message
Functional Yes (in VAL_UI_ORD_SE
This is a generic sequence validation the QUENCE
3.2-3.3-3.5-
UI_SEQUENCE_ERROR error, to avoid illogical sequence of invalid
3.7
events. reposito
ry)
Functional For 3.2 message :
Check that the children of the
aggregation message were
previously aggregated, with a Yes (in
younger message_time_long. If this the
OUT_OF_SEQUENCE happens, then the incoming 3.2 invalid
message is not valid. reposito
This control prevents the ry)
transmission of out-of-sequence
aggregation messages, which would
provoke implicit disaggregation.
Functional When Product_Return field = 0 : VAL_UI_ORD_AR
Check that each UI is part of a prior RIVAL
reported dispatch or transloading VAL_UI_ORD_AR
event (last message is a 3.3 or 3.5 RIVAL_RETURN
message).
Exception: this control is not
performed for imported products
(upUI) or aUI containing only Yes (in
imported upUIs (The message 2.1’ the
ARRIVAL_NOTALLOWED contains the import flag information) 3.4 invalid
reposito
When Product_Return field = 1: ry)
Check that each UI is part of a prior
reported dispatch or transloading
event (last message is a 3.3, 3.5 or
3.7 message). Prior reported
dispatch could be done on the
parent UI (including all the parent
hierarchy).
Functional Check that the message is not sent VAL_EVT_TIME
more than 24 hours before shipment
(based on the reception date and
SHIPMENT_WITHIN_24_H
"Event_Time”) 3.3 – 3.5 Yes
OURS
This validation only generates a
warning – message is accepted
OPERATION_WITHIN_24_ Functional Check that the Events are reported VAL_EVT_24H
HOURS within 24 hours from the occurrence
of the event: Record Time must not
3.1 – 3.2 –
be more than 24 hours after the
3.7 – 4.1 – Yes
Event Time date.
4.2 – 4.3
This validation only generates a
warning – message is accepted
CODE_NOT_EXIST Functional Yes (in VAL_RECALL_EXI
the ST
Check that the recall code exists 5 invalid
reposito
ry)
RECALL_NOT_LAST_EVEN Functional Yes (in VAL_RECALL_LAS
Check, for all UIs related to the
T 5 the T
event to recall, if it is the very last
invalid
69
CONFIDENTIAL
unrecalled event (including related reposito
implicitly disaggregated parents) ry)
If recall is done on a
transaction event (message
type 4.x), test is not
performed.
MESSAGE_ALREADY_REC Functional Test is performed on the unicity of VAL_MSG_DUPLI
EIVED the message. CATE
Manufacturer or Importer is alerted
if the same message is processed Only for XML
twice by sending a message id in the messages
message. including No
A message sent but rejected message_ID
(neither 200 nor 299) can be field
replayed with the same message ID.
In that case, the warning
RETRY_SUCCESSFULL will be raised.
Functional Yes (in
the
PRINTED_CODES_ALREAD Printed codes have been used in
3.0 invalid
Y_USED another pairing
reposito
ry)
Functional Yes (in
the
PAIRED_CODES_ALREADY Paired codes have been used in
3.0 invalid
_USED another pairing
reposito
ry)
RETRY_SUCCESSFULL Functional This test is the same as
MESSAGE_ALREADY_RECEIVED, but
this one is only a warning if same
messageID is used, but never All messages Yes
accepted previously.
70
CONFIDENTIAL