Schema RespostaManifestMessage v5.2.xsd


schema location:  C:\Documents and Settings\RespostaManifestMessage v5.1.xsd
 
Elements  Simple types 
CusresMessage  decimal12 
decimal15 
decimal18 
decimal2 
decimal3 
decimal4 
decimal5 
decimal6 
decimal8 
integer1..n 
string0..1 
string0..10 
string0..17 
string0..18 
string0..25 
string0..26 
string0..3 
string0..35 
string0..4 
string0..6 
string0..7 
string0..70 
string0..8 
string0..9 
string1..10 
string1..14 
string1..17 
string1..18 
string1..2 
string1..25 
string1..3 
string1..35 
string1..512 
string1..6 
string1..70 
string1..8 
string1..9 


element CusresMessage
diagram
children MessageHeader BeginningOfMessage DateTimePeriod FreeText GeneralIndicator NameAndAddress Reference DocumentDetails MessageTrailler
annotation
documentation 
The Customs Response Message (CUSRES) permits the transfer of data from a customs administration:
- to acknowledge the receipt of the message 
- to indicate if  the information received is correct 
- to inform the sender of the status of the customs declaration 
- to transmit additional information
- to respond to batched messages 
source
<xs:element name="CusresMessage">
  <xs:annotation>
    <xs:documentation>The Customs Response Message (CUSRES) permits the transfer of data from a customs administration:
- to acknowledge the receipt of the message 
- to indicate if  the information received is correct 
- to inform the sender of the status of the customs declaration 
- to transmit additional information
- to respond to batched messages </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="MessageHeader">
        <xs:annotation>
          <xs:documentation>UNH - Service element to uniquely identify the message.

Example: Message envelope number "1357924680", type "CUSRES", UN/Edifact directory "D97A"

UNH+1357924680+CUSRES:D:97A'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MessageReferenceNumber" type="string1..14">
              <xs:annotation>
                <xs:documentation>Unique message reference assigned by the sender.

Number assigned by the transmitter. It will not be used for business purposes.

It is suggested to follow the format "CCCCCCAAAASSSSS" where

 - CCCCCC user code
 - AAAA year (4-digit)
 - SSSSS sequential number

</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="MessageTypeIdentifier">
              <xs:annotation>
                <xs:documentation>Type of message assigned by its control agency</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..6">
                  <xs:enumeration value="CUSRES">
                    <xs:annotation>
                      <xs:documentation>Customs response message</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageTypeVersionNumber">
              <xs:annotation>
                <xs:documentation>Version number of a message type</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="D">
                    <xs:annotation>
                      <xs:documentation>Draft Version/UN/EDIFACT Directory</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageTypeReleaseNumber">
              <xs:annotation>
                <xs:documentation>Release number within the current message type version number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="97A">
                    <xs:annotation>
                      <xs:documentation>Release 1997 - A</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ControlingAgency">
              <xs:annotation>
                <xs:documentation>Code identifying the agency controlling the specification, maintenance and publication of the message type</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..2">
                  <xs:enumeration value="UN">
                    <xs:annotation>
                      <xs:documentation>UN/ECE/TRADE/WP.4</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="AssociationAssignedCode" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..6"/>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="BeginningOfMessage">
        <xs:annotation>
          <xs:documentation>BGM - Element to indicate the type and the reference number of the message to which
the CUSRES is a response.

Example: Document response message number: "23451999"

BGM+962+23451999+11'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DocumentName">
              <xs:annotation>
                <xs:documentation>Document/Message identifier name, coded</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="962">
                    <xs:annotation>
                      <xs:documentation>Document response (Customs)</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DocumentNumber">
              <xs:annotation>
                <xs:documentation>Reference number assigned to the document/message by the issuer</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageFunction">
              <xs:annotation>
                <xs:documentation>Code indicating the function of the message</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="11">
                    <xs:annotation>
                      <xs:documentation>Response</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ResponseType">
              <xs:annotation>
                <xs:documentation>Code specifying the type of acknowledgment required or transmitted</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AP">
                    <xs:annotation>
                      <xs:documentation>Accepted</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="RE">
                    <xs:annotation>
                      <xs:documentation>Rejected</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AJ">
                    <xs:annotation>
                      <xs:documentation>Pending
Indication that the referenced offer or transaction (e.g. cargo
booking or quotation request) is being dealt with.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CA">
                    <xs:annotation>
                      <xs:documentation>Conditionally accepted
Indication that the referenced offer or transaction (e.g., cargo
booking or quotation request) has been accepted under
conditions indicated in this message.
Conditions are expressed in segment group 12.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>DTM - Element to indicate the date/time of the document/message.

The second usage is to give at what time the message was placed in the mailbox by the sender when the receiver is a port authority. This is, the time at which it was effectively available to the receiver from the sender. This second usage applies only to the relation between the port authorities and the agents. In this case DE:2005 will be '243'.

Example: Date the message was issued: "2003/10/09 - 14:30"

DTM+137:200310091430:203´

Example: Date the message was issued: "2003/10/08 - 15:25 UTC+3". Attention that in this case the defined escape character must be used in the date/time format, if the time zone is positive in relation to GMT. If the escape character is '?' then

DTM+137:200310081525?+03:303´

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DateTimePeriodQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="137">
                    <xs:annotation>
                      <xs:documentation>Document/message date/time

Date/time when a document/message is issued. This may include auhentication</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="243">
                    <xs:annotation>
                      <xs:documentation>Transmission date/time of document</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:maxLength value="3"/>
                  <xs:enumeration value="203">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="303">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0">
        <xs:annotation>
          <xs:documentation>FTX - An element to specify  supplementary processable information.

This segment is used in order to inform the agent about the status of the Customs means of transport id ("Contramarca").

Example: Customs process closed.

FTX+CUS+++FEC'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TextSubjectQualifier">
              <xs:annotation>
                <xs:documentation>Code specifying the subject of the free text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="CUS">
                    <xs:annotation>
                      <xs:documentation>Customs declaration information</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="FreeText" minOccurs="0">
              <xs:annotation>
                <xs:documentation>A segment stating information in unsolicited clear text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..70">
                  <xs:enumeration value="ACT">
                    <xs:annotation>
                      <xs:documentation>Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ANU">
                    <xs:annotation>
                      <xs:documentation>Annulled</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="FEC">
                    <xs:annotation>
                      <xs:documentation>Closed</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PAC">
                    <xs:annotation>
                      <xs:documentation>Pre-Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PRV">
                    <xs:annotation>
                      <xs:documentation>Provisional</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ULT">
                    <xs:annotation>
                      <xs:documentation>Ultimated</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="GeneralIndicator" minOccurs="0">
        <xs:annotation>
          <xs:documentation>GIS - An element to identifying the various customs processing indicators.

For backward compatibility only. No useful information will be provided. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ProcessingIndicator">
              <xs:annotation>
                <xs:documentation>Identifies the value to be attributed to indicators required by the processing system</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="1">
                    <xs:annotation>
                      <xs:documentation>Message content accepted</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="2">
                    <xs:annotation>
                      <xs:documentation>Message content rejected with comment</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="NameAndAddress" maxOccurs="5">
        <xs:annotation>
          <xs:documentation>NAD - An element to identify the name and/or address of the party related to all information
at the lower level of the message.

This element is to provide information about the sender and the receiver of the message, and the Customs Office that is actually replying.

If the party is the Customs Office (DE:3035 is 'CM') then DE:3039 will have the code id corresponding to the Customs Office and DE:1131 will have '113'. Code list of customs locations provided in a separate document.

Otherwise, DE:3039 will have the Tax Payer identification.

Example: Customs Office of Leixões

NAD+CM+PTLEI340:113:155'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="PartyQualifier">
              <xs:annotation>
                <xs:documentation>Code giving a specific meaning to a party</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AE">
                    <xs:annotation>
                      <xs:documentation>Declarant's agent/representative</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CM">
                    <xs:annotation>
                      <xs:documentation>Customs</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MR">
                    <xs:annotation>
                      <xs:documentation>Message recipient</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MS">
                    <xs:annotation>
                      <xs:documentation>Document/message issuer/sender</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CA">
                    <xs:annotation>
                      <xs:documentation>Carrier
(3126) Party undertaking or arranging transport of goods
between named points.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="PartyId" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code identifying a party involved in a transaction</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="CodeListQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification of a code list   If NAD:3035 is 'CM' send code according to list in pasges 71-72 of NSTI/NCTS
Declaração de Trânsito Informatizada - Documento Auxiliar ao Guia de
Implementação das Mensagens EDI Versão 3, Anexo - Códigos a Utilizar.
If NAD:3035='CA' then place the number place the number given to the Portuguese
Customs at the moment of the protocol signature preeceded by the ISO country
code (2 digit) corresponding to the nationality of the carrier.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="113">
                    <xs:annotation>
                      <xs:documentation>Customs office
Customs administrative unit competent for the performance of
Customs formalities, and the premises or other areas approved
for the purpose by the competent authorities (CCC).
use when the code in DE:3039 identifies a Customs Office,
independent of its nationallity.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="167">
                    <xs:annotation>
                      <xs:documentation>Tax party identification
Code assigned by a tax authority to identify a party.
to use when the entity is Portuguese. Portuguese Customs
code NIF.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="52">
                    <xs:annotation>
                      <xs:documentation>Value added tax identification
Value added tax identification code.
Use when the entity identified in DE:3039 is not Portuguese.
Portuguese Customs code VIES.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="53">
                    <xs:annotation>
                      <xs:documentation>Passport number
Number assigned to a passport.
Portuguese Customs code P.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="174">
                    <xs:annotation>
                      <xs:documentation>Citizen identification
Portuguese Customs code BI.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="Z02">
                    <xs:annotation>
                      <xs:documentation>Other
Use this code to state that the id type in DE:3039 is not
included in the other types listed in this element and the
entity is not Portuguese.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="Z03">
                    <xs:annotation>
                      <xs:documentation>Company Identification Number
use when the entity identified in DE:3039 is not Portuguese.
Portuguese Customs code NIPC.</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="CodeListResponsibleAgency" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code identifying the agency resopnsible for a code list</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:maxLength value="3"/>
                  <xs:enumeration value="155">
                    <xs:annotation>
                      <xs:documentation>PT, Portuguese Customs</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Reference" maxOccurs="3">
        <xs:annotation>
          <xs:documentation>RFF - Group of elements containing  references and constants that apply to the entire message.

This element is to send the information related with the Customs means of transport process ("Contramarca") and/or the Port Authority vessel call id (GCP process folder).

It is also used to identified the message being acknowledged.

Customs means of transport process identification (DE:1153='AFM'), or the Port Auhtority vessel call id (DE:1153='ATZ'), and the message being acknowledged (DE:1153='ABO'). These information is reported in DE:1154.

The current format for Customs vessel process id is:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

When the reference is the Port Authority vessel call Id (RFF:C506:1153='ATZ'), then in each the following Ports, the suffixes apply to the reference:

- Port of Leixões ESC
- Port of Lisboa: LIS
- Port of Sines: ESC

Example: Process 876 issued in 2003 at Leixões Customs office for maritime means of transport.

RFF+AFM:PTLEI34012003000876'


</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReferenceQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a reference element or a reference number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="ABO">
                    <xs:annotation>
                      <xs:documentation>Originator's reference</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFM">
                    <xs:annotation>
                      <xs:documentation>Secondary customs reference</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ATZ">
                    <xs:annotation>
                      <xs:documentation>Ship's stay reference number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ReferenceNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification number.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>DTM - Element to identifying a date related to the preceding Reference. 

Date and time when the Customs means of transport process ("Contramarca") was created.

Example: Process created on June, the 10th, 11h43

DTM+171:200306101143:203'

</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DateTimePeriodQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="171">
                          <xs:annotation>
                            <xs:documentation>Reference Date/Time</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriod" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..35"/>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="203">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="303">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DocumentDetails" maxOccurs="9999">
        <xs:annotation>
          <xs:documentation>DOC - An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.

This element is to provide information about the documents that are being acknowledge and the result of the validation process of each one.

Segment DOC is used to send the identification of the Customs Summary Declaration id. Its status is provided in segment FTX in this group.

The transport document being acknowledge is specified in segment RFF in this group. This reference shall occur only once in the group.

For each transport document several validation rules will be applied. The result is transmitted in the form of codes (to be published in a separate document) by using group 12 and with a description in Portuguese and English.

The current format for Customs Summary Declaration id is:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number for Customs vessel process id: 6 digits left padded with zeros
- sequential number for Customs Summary Declaration: 4 digits left padded with zeros

Please note that this format is subject to changes in the future.

Example: Customs Summary Declaration 3 related with Customs vessel process id 876 of 2003 at Leixões Customs Office.

DOC+355+PTLEI340120030008760003'


</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DocumentDetails">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DocumentName" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Document/message identifier expressed in code</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="355">
                          <xs:annotation>
                            <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Document/message number</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="Reference">
              <xs:annotation>
                <xs:documentation>RFF - An element identifying a particular reference, e.g. house of bill number, master bill
number.

This segment is to identify the Transport Document. The identification was provided in segment RFF in segment group 26 inside segment group 19 of the IFCSUM message.

Example: BL number NB234567

RFF+BM:NB234567'

</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ReferenceQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="AAM">
                          <xs:annotation>
                            <xs:documentation>Waybill number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AEW">
                          <xs:annotation>
                            <xs:documentation>Empty container bill number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AEX">
                          <xs:annotation>
                            <xs:documentation>Non-negotiable maritime transport</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AFA">
                          <xs:annotation>
                            <xs:documentation>Through bill of lading number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AFB">
                          <xs:annotation>
                            <xs:documentation>Cargo manifest number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="AFM">
                          <xs:annotation>
                            <xs:documentation>Secondary Customs reference</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BM">
                          <xs:annotation>
                            <xs:documentation>Bill of landing number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="BN">
                          <xs:annotation>
                            <xs:documentation>Booking reference number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="CT">
                          <xs:annotation>
                            <xs:documentation>Contract number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="GDN">
                          <xs:annotation>
                            <xs:documentation>General declaration number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="MB">
                          <xs:annotation>
                            <xs:documentation>Master bill of lading number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PK">
                          <xs:annotation>
                            <xs:documentation>Packing list number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="ReferenceNumber" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..35"/>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="FreeText">
              <xs:annotation>
                <xs:documentation>FTX - A segment to provide the goods description.

This segment is used in order to inform the agent about the status of the Customs Summary Declaration. Use code list given in the first DE:4440.

Example: Declaration pending

FTX+CUS+++PEN'

</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="TextSubjectQualifier">
                    <xs:annotation>
                      <xs:documentation>Code specifying the subject of the free text</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="CUS">
                          <xs:annotation>
                            <xs:documentation>Customs declaration information</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="FreeText" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Free text field available to the message
sender for information</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..70">
                        <xs:enumeration value="ACT">
                          <xs:annotation>
                            <xs:documentation>Active</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="ANU">
                          <xs:annotation>
                            <xs:documentation>Annulled</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="DES">
                          <xs:annotation>
                            <xs:documentation>Expanded</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="FIN">
                          <xs:annotation>
                            <xs:documentation>Finalized</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PEN">
                          <xs:annotation>
                            <xs:documentation>Pending</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PRV">
                          <xs:annotation>
                            <xs:documentation>Provisional</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="DateTimePeriod" maxOccurs="2">
              <xs:annotation>
                <xs:documentation>DTM - A segment identifying necessary dates.

This segment is to send the Date/Time of the Customs Summary Declaration (DE:2005='150') and the Date/Time of the acceptance of the Transport Document by Customs (DE:2005='154'). So this segment shall occur twice.

Example: Transport Document accepted at 2004/01/20 at 15h17.

DTM+154:200401201517:203'

Example: Declaration issued on 2004/01/20 at 15h25.

DTM+150:200401201525:203'


</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="DateTimePeriodQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="150">
                          <xs:annotation>
                            <xs:documentation>Declaration/presentation date</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="154">
                          <xs:annotation>
                            <xs:documentation>Acceptance date of document</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriod" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..35"/>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:maxLength value="3"/>
                        <xs:enumeration value="203">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="303">
                          <xs:annotation>
                            <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ErrorPointDetails" maxOccurs="9999">
              <xs:annotation>
                <xs:documentation>ERP - An element to identify the location of an application error.

This element is provided to report codes resulted from the application of the validation rules. At least, one occurrence will be given for each part of the document being responded.

If the document is a cargo manifest (SG6:RFF:1153 is 'AFB'), this group will report the results from validating the header.

If the document is a transport document other than the manifest, then at least one occurrence will occur for each goods item and/or equipment declared in the document.

The code list will be provided in another document.

The element will also be used to report the identification given by Customs to each goods items as well as their status. The identification will be sent in the RFF segment and the respective status will be given in one occurrence of segment FTX.


This segment identifies the point in the document to which the error in segment ERC refers to. The point can be the header of the manifest, or one transport document referred in the manifest, or one of the goods presented in a certain transport document, or one of a transport equipment presented in a certain transport document.

When referring to the manifest's header, the identification will be the reference given in segment RFF of segment group 1 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a transport document, the identification will be the reference given in segment RFF of segment group 26 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a particular good, the identification will be the sequential number given in segment GID in segment group 41 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the good is present will be also included. The identification of the transport document will be present in DE:1052.

When referring to a particular transport equipment, the identification will be the equipment id given in segment EQD in segment group 60 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the transport equipment is present will be also included. The identification of the transport document will be present in DE:1052.

Composite C853 is only used to report syntax errors.

Example: Error located in manifest identified by V6657PTLEIEXP

ERP+1:V6657PTLEIEXP'

Example: Error located in the third good's section of the Transport Document XPTO8856

ERP+7:XPTO8856:3'

Example: Error located in Transport Document identified by NB78566

ERP+2:NB78566'

Example: Error located in container CGTU 187589/5 in Transport Document OJS3547

ERP+7:OJS3547:CGTU1875895'

Example: Sintax error in 1st element of segment PIA in the 4th occurrence of group 41 in the 10th occurrence of group 19.

ERP+7:10:4+PIA:1'

Example: Equipment error(2), BL nº 2, you can read on IFCSUM guide group (G) 60, segment MEA and d.e. 6411

ERP+2:2+:G60MEA6411'

Example: Shipment error(2), BL nº 2, you can read on ifcsum guide Group (G) 60, segment MEA and d.e. 6411

ERP+7:2:1+:G43MEA6411'

</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="MessageSection" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="1">
                          <xs:annotation>
                            <xs:documentation>Heading section</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="2">
                          <xs:annotation>
                            <xs:documentation>Detail section of a message</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="7">
                          <xs:annotation>
                            <xs:documentation>Sub-line item</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SegmentTag" type="string1..3" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Tag of a segment</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>
                  <xs:element name="Reference" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>RFF - segment to provide the references related to the application error.

The segment is used to report the identification given by Customs to each goods items. This identification is structured like this:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros
- id of the Customs Summary Declaration: 4 digits left padded with zeros
- id of the good's item: 2 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

Example: Customs good's identification 7 in Summary Declaration 45 associated with Customs vessel process id 12 from Leixoes Customs Office

RFF+IB:PTLEI34012004000012004507'

</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ReferenceQualifier">
                          <xs:annotation>
                            <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="string1..3">
                              <xs:enumeration value="IB">
                                <xs:annotation>
                                  <xs:documentation>In bond number</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="ApplicationErrorInformation" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>ERC - An element identifying the type of application errors within a message.

This segment is used to report the code value associated with the condition verified.

Example: Condition associated with code DEC04067

ERC+DEC04067'

</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ApplicationErrorIdentification" type="string1..8">
                          <xs:annotation>
                            <xs:documentation>
The code assigned by the receiver of a
message to the identification of a data validation error condition. Code List will be provided in a separate document.
    </xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="FreeText" minOccurs="0" maxOccurs="3">
                    <xs:annotation>
                      <xs:documentation>FTX - A segment to provide explanation and/or supplementary information related to the specified application error.

This segment is used to send the textual description of the error and to inform the Customs status of the goods item.

The error description will be given in Portuguese (DE:3453='PT') and in English (DE:3453='EN').  In this case DE:4451 is 'AAO'.

The status will be given by a code in DE:4440. In this case DE:4451 is 'CUS'. Only in this case the code list in first DE:4440 will apply. DE:3453 is no needed.

So the segment occurs three times in each occurrence of group 12..

Example: Incorrect type of package.

FTX+AAO+++INCORRECT TYPE OF PACKAGE+EN'

Example: Goods item finalized.

FTX+CUS+++FIN'


IF the qualifier is "CUS" then the text Literal has to be one of:
	ACT -> Active
	ANU -> Annulled
	APU -> Accounted
	CAT -> Captive
	DES -> Expanded
	FIN -> Finalized
	PEN -> Pending
	PRV -> Provisional
</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="TextSubjectQualifier">
                          <xs:annotation>
                            <xs:documentation>Code specifying the subject of the free text</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="string1..3">
                              <xs:enumeration value="AAO">
                                <xs:annotation>
                                  <xs:documentation>Error description (free text)</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="CUS">
                                <xs:annotation>
                                  <xs:documentation>Customs declaration information</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                        <xs:element name="TextLiteral" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>Free text</xs:documentation>
                          </xs:annotation>
                          <xs:complexType>
                            <xs:sequence>
                              <xs:element name="FreeText" type="string1..70" minOccurs="0" maxOccurs="5">
                                <xs:annotation>
                                  <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
                                </xs:annotation>
                              </xs:element>
                            </xs:sequence>
                          </xs:complexType>
                        </xs:element>
                        <xs:element name="LanguageCoded" minOccurs="0">
                          <xs:annotation>
                            <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
                          </xs:annotation>
                          <xs:simpleType>
                            <xs:restriction base="string1..3">
                              <xs:enumeration value="EN">
                                <xs:annotation>
                                  <xs:documentation>English</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                              <xs:enumeration value="PT">
                                <xs:annotation>
                                  <xs:documentation>Portuguese</xs:documentation>
                                </xs:annotation>
                              </xs:enumeration>
                            </xs:restriction>
                          </xs:simpleType>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="MessageTrailler">
        <xs:annotation>
          <xs:documentation>UNT - An element to indicate the end of a message, giving the total number of segments in the
message and the control reference number of the message.

Example: 26 sent segment, reference 1357924680

UNT+26+1357924680'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="NumberOfSegments" type="decimal6">
              <xs:annotation>
                <xs:documentation>Control count of the segments in the message</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="MessageReferenceNumber" type="string1..14">
              <xs:annotation>
                <xs:documentation>Unique message reference number assigned by the sender</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/MessageHeader
diagram
children MessageReferenceNumber MessageTypeIdentifier MessageTypeVersionNumber MessageTypeReleaseNumber ControlingAgency AssociationAssignedCode
annotation
documentation 
UNH - Service element to uniquely identify the message.

Example: Message envelope number "1357924680", type "CUSRES", UN/Edifact directory "D97A"

UNH+1357924680+CUSRES:D:97A'

source
<xs:element name="MessageHeader">
  <xs:annotation>
    <xs:documentation>UNH - Service element to uniquely identify the message.

Example: Message envelope number "1357924680", type "CUSRES", UN/Edifact directory "D97A"

UNH+1357924680+CUSRES:D:97A'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="MessageReferenceNumber" type="string1..14">
        <xs:annotation>
          <xs:documentation>Unique message reference assigned by the sender.

Number assigned by the transmitter. It will not be used for business purposes.

It is suggested to follow the format "CCCCCCAAAASSSSS" where

 - CCCCCC user code
 - AAAA year (4-digit)
 - SSSSS sequential number

</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageTypeIdentifier">
        <xs:annotation>
          <xs:documentation>Type of message assigned by its control agency</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..6">
            <xs:enumeration value="CUSRES">
              <xs:annotation>
                <xs:documentation>Customs response message</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageTypeVersionNumber">
        <xs:annotation>
          <xs:documentation>Version number of a message type</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="D">
              <xs:annotation>
                <xs:documentation>Draft Version/UN/EDIFACT Directory</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageTypeReleaseNumber">
        <xs:annotation>
          <xs:documentation>Release number within the current message type version number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="97A">
              <xs:annotation>
                <xs:documentation>Release 1997 - A</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ControlingAgency">
        <xs:annotation>
          <xs:documentation>Code identifying the agency controlling the specification, maintenance and publication of the message type</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..2">
            <xs:enumeration value="UN">
              <xs:annotation>
                <xs:documentation>UN/ECE/TRADE/WP.4</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="AssociationAssignedCode" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..6"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/MessageHeader/MessageReferenceNumber
diagram
type string1..14
facets
minLength 1
maxLength 14
annotation
documentation 
Unique message reference assigned by the sender.

Number assigned by the transmitter. It will not be used for business purposes.

It is suggested to follow the format "CCCCCCAAAASSSSS" where

 - CCCCCC user code
 - AAAA year (4-digit)
 - SSSSS sequential number

source
<xs:element name="MessageReferenceNumber" type="string1..14">
  <xs:annotation>
    <xs:documentation>Unique message reference assigned by the sender.

Number assigned by the transmitter. It will not be used for business purposes.

It is suggested to follow the format "CCCCCCAAAASSSSS" where

 - CCCCCC user code
 - AAAA year (4-digit)
 - SSSSS sequential number

</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/MessageHeader/MessageTypeIdentifier
diagram
type restriction of string1..6
facets
minLength 1
maxLength 6
enumeration CUSRES
annotation
documentation 
Type of message assigned by its control agency
source
<xs:element name="MessageTypeIdentifier">
  <xs:annotation>
    <xs:documentation>Type of message assigned by its control agency</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..6">
      <xs:enumeration value="CUSRES">
        <xs:annotation>
          <xs:documentation>Customs response message</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/MessageTypeVersionNumber
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration D
annotation
documentation 
Version number of a message type
source
<xs:element name="MessageTypeVersionNumber">
  <xs:annotation>
    <xs:documentation>Version number of a message type</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="D">
        <xs:annotation>
          <xs:documentation>Draft Version/UN/EDIFACT Directory</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/MessageTypeReleaseNumber
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 97A
annotation
documentation 
Release number within the current message type version number
source
<xs:element name="MessageTypeReleaseNumber">
  <xs:annotation>
    <xs:documentation>Release number within the current message type version number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="97A">
        <xs:annotation>
          <xs:documentation>Release 1997 - A</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/ControlingAgency
diagram
type restriction of string1..2
facets
minLength 1
maxLength 2
enumeration UN
annotation
documentation 
Code identifying the agency controlling the specification, maintenance and publication of the message type
source
<xs:element name="ControlingAgency">
  <xs:annotation>
    <xs:documentation>Code identifying the agency controlling the specification, maintenance and publication of the message type</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..2">
      <xs:enumeration value="UN">
        <xs:annotation>
          <xs:documentation>UN/ECE/TRADE/WP.4</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageHeader/AssociationAssignedCode
diagram
type restriction of string1..6
facets
minLength 1
maxLength 6
annotation
documentation 
Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message
source
<xs:element name="AssociationAssignedCode" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code, assigned by the association responsible for the design and maintenance  of the message type concerned, that further identifies the message</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..6"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage
diagram
children DocumentName DocumentNumber MessageFunction ResponseType
annotation
documentation 
BGM - Element to indicate the type and the reference number of the message to which
the CUSRES is a response.

Example: Document response message number: "23451999"

BGM+962+23451999+11'

source
<xs:element name="BeginningOfMessage">
  <xs:annotation>
    <xs:documentation>BGM - Element to indicate the type and the reference number of the message to which
the CUSRES is a response.

Example: Document response message number: "23451999"

BGM+962+23451999+11'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentName">
        <xs:annotation>
          <xs:documentation>Document/Message identifier name, coded</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="962">
              <xs:annotation>
                <xs:documentation>Document response (Customs)</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DocumentNumber">
        <xs:annotation>
          <xs:documentation>Reference number assigned to the document/message by the issuer</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageFunction">
        <xs:annotation>
          <xs:documentation>Code indicating the function of the message</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="11">
              <xs:annotation>
                <xs:documentation>Response</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ResponseType">
        <xs:annotation>
          <xs:documentation>Code specifying the type of acknowledgment required or transmitted</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AP">
              <xs:annotation>
                <xs:documentation>Accepted</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="RE">
              <xs:annotation>
                <xs:documentation>Rejected</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AJ">
              <xs:annotation>
                <xs:documentation>Pending
Indication that the referenced offer or transaction (e.g. cargo
booking or quotation request) is being dealt with.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CA">
              <xs:annotation>
                <xs:documentation>Conditionally accepted
Indication that the referenced offer or transaction (e.g., cargo
booking or quotation request) has been accepted under
conditions indicated in this message.
Conditions are expressed in segment group 12.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/BeginningOfMessage/DocumentName
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 962
annotation
documentation 
Document/Message identifier name, coded
source
<xs:element name="DocumentName">
  <xs:annotation>
    <xs:documentation>Document/Message identifier name, coded</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="962">
        <xs:annotation>
          <xs:documentation>Document response (Customs)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage/DocumentNumber
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
Reference number assigned to the document/message by the issuer
source
<xs:element name="DocumentNumber">
  <xs:annotation>
    <xs:documentation>Reference number assigned to the document/message by the issuer</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage/MessageFunction
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 11
annotation
documentation 
Code indicating the function of the message
source
<xs:element name="MessageFunction">
  <xs:annotation>
    <xs:documentation>Code indicating the function of the message</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="11">
        <xs:annotation>
          <xs:documentation>Response</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/BeginningOfMessage/ResponseType
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration AP
enumeration RE
enumeration AJ
enumeration CA
annotation
documentation 
Code specifying the type of acknowledgment required or transmitted
source
<xs:element name="ResponseType">
  <xs:annotation>
    <xs:documentation>Code specifying the type of acknowledgment required or transmitted</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AP">
        <xs:annotation>
          <xs:documentation>Accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RE">
        <xs:annotation>
          <xs:documentation>Rejected</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AJ">
        <xs:annotation>
          <xs:documentation>Pending
Indication that the referenced offer or transaction (e.g. cargo
booking or quotation request) is being dealt with.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CA">
        <xs:annotation>
          <xs:documentation>Conditionally accepted
Indication that the referenced offer or transaction (e.g., cargo
booking or quotation request) has been accepted under
conditions indicated in this message.
Conditions are expressed in segment group 12.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DateTimePeriod
diagram
children DateTimePeriodQualifier DateTimePeriod DateTimePeriodFormatQualifier
annotation
documentation 
DTM - Element to indicate the date/time of the document/message.

The second usage is to give at what time the message was placed in the mailbox by the sender when the receiver is a port authority. This is, the time at which it was effectively available to the receiver from the sender. This second usage applies only to the relation between the port authorities and the agents. In this case DE:2005 will be '243'.

Example: Date the message was issued: "2003/10/09 - 14:30"

DTM+137:200310091430:203´

Example: Date the message was issued: "2003/10/08 - 15:25 UTC+3". Attention that in this case the defined escape character must be used in the date/time format, if the time zone is positive in relation to GMT. If the escape character is '?' then

DTM+137:200310081525?+03:303´

source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>DTM - Element to indicate the date/time of the document/message.

The second usage is to give at what time the message was placed in the mailbox by the sender when the receiver is a port authority. This is, the time at which it was effectively available to the receiver from the sender. This second usage applies only to the relation between the port authorities and the agents. In this case DE:2005 will be '243'.

Example: Date the message was issued: "2003/10/09 - 14:30"

DTM+137:200310091430:203´

Example: Date the message was issued: "2003/10/08 - 15:25 UTC+3". Attention that in this case the defined escape character must be used in the date/time format, if the time zone is positive in relation to GMT. If the escape character is '?' then

DTM+137:200310081525?+03:303´

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DateTimePeriodQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="137">
              <xs:annotation>
                <xs:documentation>Document/message date/time

Date/time when a document/message is issued. This may include auhentication</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="243">
              <xs:annotation>
                <xs:documentation>Transmission date/time of document</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:maxLength value="3"/>
            <xs:enumeration value="203">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="303">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DateTimePeriod/DateTimePeriodQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 137
enumeration 243
annotation
documentation 
Code giving specific meaning to a date, time or period
source
<xs:element name="DateTimePeriodQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="137">
        <xs:annotation>
          <xs:documentation>Document/message date/time

Date/time when a document/message is issued. This may include auhentication</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="243">
        <xs:annotation>
          <xs:documentation>Transmission date/time of document</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DateTimePeriod/DateTimePeriod
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
The value of a date, a date and a tiem, a time or a period, in a specified representation
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/DateTimePeriod/DateTimePeriodFormatQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 203
enumeration 303
annotation
documentation 
Specification of the representation of a date, date and time or a period
source
<xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:maxLength value="3"/>
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="303">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/FreeText
diagram
children TextSubjectQualifier FreeText
annotation
documentation 
FTX - An element to specify  supplementary processable information.

This segment is used in order to inform the agent about the status of the Customs means of transport id ("Contramarca").

Example: Customs process closed.

FTX+CUS+++FEC'

source
<xs:element name="FreeText" minOccurs="0">
  <xs:annotation>
    <xs:documentation>FTX - An element to specify  supplementary processable information.

This segment is used in order to inform the agent about the status of the Customs means of transport id ("Contramarca").

Example: Customs process closed.

FTX+CUS+++FEC'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TextSubjectQualifier">
        <xs:annotation>
          <xs:documentation>Code specifying the subject of the free text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="CUS">
              <xs:annotation>
                <xs:documentation>Customs declaration information</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0">
        <xs:annotation>
          <xs:documentation>A segment stating information in unsolicited clear text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..70">
            <xs:enumeration value="ACT">
              <xs:annotation>
                <xs:documentation>Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ANU">
              <xs:annotation>
                <xs:documentation>Annulled</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FEC">
              <xs:annotation>
                <xs:documentation>Closed</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PAC">
              <xs:annotation>
                <xs:documentation>Pre-Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PRV">
              <xs:annotation>
                <xs:documentation>Provisional</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ULT">
              <xs:annotation>
                <xs:documentation>Ultimated</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/FreeText/TextSubjectQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration CUS
annotation
documentation 
Code specifying the subject of the free text
source
<xs:element name="TextSubjectQualifier">
  <xs:annotation>
    <xs:documentation>Code specifying the subject of the free text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="CUS">
        <xs:annotation>
          <xs:documentation>Customs declaration information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/FreeText/FreeText
diagram
type restriction of string1..70
facets
minLength 1
maxLength 70
enumeration ACT
enumeration ANU
enumeration FEC
enumeration PAC
enumeration PRV
enumeration ULT
annotation
documentation 
A segment stating information in unsolicited clear text
source
<xs:element name="FreeText" minOccurs="0">
  <xs:annotation>
    <xs:documentation>A segment stating information in unsolicited clear text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..70">
      <xs:enumeration value="ACT">
        <xs:annotation>
          <xs:documentation>Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ANU">
        <xs:annotation>
          <xs:documentation>Annulled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FEC">
        <xs:annotation>
          <xs:documentation>Closed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PAC">
        <xs:annotation>
          <xs:documentation>Pre-Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRV">
        <xs:annotation>
          <xs:documentation>Provisional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ULT">
        <xs:annotation>
          <xs:documentation>Ultimated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/GeneralIndicator
diagram
children ProcessingIndicator
annotation
documentation 
GIS - An element to identifying the various customs processing indicators.

For backward compatibility only. No useful information will be provided. 
source
<xs:element name="GeneralIndicator" minOccurs="0">
  <xs:annotation>
    <xs:documentation>GIS - An element to identifying the various customs processing indicators.

For backward compatibility only. No useful information will be provided. </xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ProcessingIndicator">
        <xs:annotation>
          <xs:documentation>Identifies the value to be attributed to indicators required by the processing system</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="1">
              <xs:annotation>
                <xs:documentation>Message content accepted</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="2">
              <xs:annotation>
                <xs:documentation>Message content rejected with comment</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/GeneralIndicator/ProcessingIndicator
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 1
enumeration 2
annotation
documentation 
Identifies the value to be attributed to indicators required by the processing system
source
<xs:element name="ProcessingIndicator">
  <xs:annotation>
    <xs:documentation>Identifies the value to be attributed to indicators required by the processing system</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="1">
        <xs:annotation>
          <xs:documentation>Message content accepted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="2">
        <xs:annotation>
          <xs:documentation>Message content rejected with comment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress
diagram
children PartyQualifier PartyId CodeListQualifier CodeListResponsibleAgency
annotation
documentation 
NAD - An element to identify the name and/or address of the party related to all information
at the lower level of the message.

This element is to provide information about the sender and the receiver of the message, and the Customs Office that is actually replying.

If the party is the Customs Office (DE:3035 is 'CM') then DE:3039 will have the code id corresponding to the Customs Office and DE:1131 will have '113'. Code list of customs locations provided in a separate document.

Otherwise, DE:3039 will have the Tax Payer identification.

Example: Customs Office of Leixões

NAD+CM+PTLEI340:113:155'

source
<xs:element name="NameAndAddress" maxOccurs="5">
  <xs:annotation>
    <xs:documentation>NAD - An element to identify the name and/or address of the party related to all information
at the lower level of the message.

This element is to provide information about the sender and the receiver of the message, and the Customs Office that is actually replying.

If the party is the Customs Office (DE:3035 is 'CM') then DE:3039 will have the code id corresponding to the Customs Office and DE:1131 will have '113'. Code list of customs locations provided in a separate document.

Otherwise, DE:3039 will have the Tax Payer identification.

Example: Customs Office of Leixões

NAD+CM+PTLEI340:113:155'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="PartyQualifier">
        <xs:annotation>
          <xs:documentation>Code giving a specific meaning to a party</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AE">
              <xs:annotation>
                <xs:documentation>Declarant's agent/representative</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CM">
              <xs:annotation>
                <xs:documentation>Customs</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MR">
              <xs:annotation>
                <xs:documentation>Message recipient</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MS">
              <xs:annotation>
                <xs:documentation>Document/message issuer/sender</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CA">
              <xs:annotation>
                <xs:documentation>Carrier
(3126) Party undertaking or arranging transport of goods
between named points.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="PartyId" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code identifying a party involved in a transaction</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="CodeListQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification of a code list   If NAD:3035 is 'CM' send code according to list in pasges 71-72 of NSTI/NCTS
Declaração de Trânsito Informatizada - Documento Auxiliar ao Guia de
Implementação das Mensagens EDI Versão 3, Anexo - Códigos a Utilizar.
If NAD:3035='CA' then place the number place the number given to the Portuguese
Customs at the moment of the protocol signature preeceded by the ISO country
code (2 digit) corresponding to the nationality of the carrier.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="113">
              <xs:annotation>
                <xs:documentation>Customs office
Customs administrative unit competent for the performance of
Customs formalities, and the premises or other areas approved
for the purpose by the competent authorities (CCC).
use when the code in DE:3039 identifies a Customs Office,
independent of its nationallity.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="167">
              <xs:annotation>
                <xs:documentation>Tax party identification
Code assigned by a tax authority to identify a party.
to use when the entity is Portuguese. Portuguese Customs
code NIF.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="52">
              <xs:annotation>
                <xs:documentation>Value added tax identification
Value added tax identification code.
Use when the entity identified in DE:3039 is not Portuguese.
Portuguese Customs code VIES.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="53">
              <xs:annotation>
                <xs:documentation>Passport number
Number assigned to a passport.
Portuguese Customs code P.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="174">
              <xs:annotation>
                <xs:documentation>Citizen identification
Portuguese Customs code BI.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="Z02">
              <xs:annotation>
                <xs:documentation>Other
Use this code to state that the id type in DE:3039 is not
included in the other types listed in this element and the
entity is not Portuguese.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="Z03">
              <xs:annotation>
                <xs:documentation>Company Identification Number
use when the entity identified in DE:3039 is not Portuguese.
Portuguese Customs code NIPC.</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="CodeListResponsibleAgency" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code identifying the agency resopnsible for a code list</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:maxLength value="3"/>
            <xs:enumeration value="155">
              <xs:annotation>
                <xs:documentation>PT, Portuguese Customs</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/NameAndAddress/PartyQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration AE
enumeration CM
enumeration MR
enumeration MS
enumeration CA
annotation
documentation 
Code giving a specific meaning to a party
source
<xs:element name="PartyQualifier">
  <xs:annotation>
    <xs:documentation>Code giving a specific meaning to a party</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AE">
        <xs:annotation>
          <xs:documentation>Declarant's agent/representative</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CM">
        <xs:annotation>
          <xs:documentation>Customs</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MR">
        <xs:annotation>
          <xs:documentation>Message recipient</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MS">
        <xs:annotation>
          <xs:documentation>Document/message issuer/sender</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CA">
        <xs:annotation>
          <xs:documentation>Carrier
(3126) Party undertaking or arranging transport of goods
between named points.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress/PartyId
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
Code identifying a party involved in a transaction
source
<xs:element name="PartyId" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code identifying a party involved in a transaction</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress/CodeListQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 113
enumeration 167
enumeration 52
enumeration 53
enumeration 174
enumeration Z02
enumeration Z03
annotation
documentation 
Identification of a code list   If NAD:3035 is 'CM' send code according to list in pasges 71-72 of NSTI/NCTS
Declaração de Trânsito Informatizada - Documento Auxiliar ao Guia de
Implementação das Mensagens EDI Versão 3, Anexo - Códigos a Utilizar.
If NAD:3035='CA' then place the number place the number given to the Portuguese
Customs at the moment of the protocol signature preeceded by the ISO country
code (2 digit) corresponding to the nationality of the carrier.
source
<xs:element name="CodeListQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification of a code list   If NAD:3035 is 'CM' send code according to list in pasges 71-72 of NSTI/NCTS
Declaração de Trânsito Informatizada - Documento Auxiliar ao Guia de
Implementação das Mensagens EDI Versão 3, Anexo - Códigos a Utilizar.
If NAD:3035='CA' then place the number place the number given to the Portuguese
Customs at the moment of the protocol signature preeceded by the ISO country
code (2 digit) corresponding to the nationality of the carrier.</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="113">
        <xs:annotation>
          <xs:documentation>Customs office
Customs administrative unit competent for the performance of
Customs formalities, and the premises or other areas approved
for the purpose by the competent authorities (CCC).
use when the code in DE:3039 identifies a Customs Office,
independent of its nationallity.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="167">
        <xs:annotation>
          <xs:documentation>Tax party identification
Code assigned by a tax authority to identify a party.
to use when the entity is Portuguese. Portuguese Customs
code NIF.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="52">
        <xs:annotation>
          <xs:documentation>Value added tax identification
Value added tax identification code.
Use when the entity identified in DE:3039 is not Portuguese.
Portuguese Customs code VIES.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="53">
        <xs:annotation>
          <xs:documentation>Passport number
Number assigned to a passport.
Portuguese Customs code P.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="174">
        <xs:annotation>
          <xs:documentation>Citizen identification
Portuguese Customs code BI.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Z02">
        <xs:annotation>
          <xs:documentation>Other
Use this code to state that the id type in DE:3039 is not
included in the other types listed in this element and the
entity is not Portuguese.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Z03">
        <xs:annotation>
          <xs:documentation>Company Identification Number
use when the entity identified in DE:3039 is not Portuguese.
Portuguese Customs code NIPC.</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/NameAndAddress/CodeListResponsibleAgency
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 155
annotation
documentation 
Code identifying the agency resopnsible for a code list
source
<xs:element name="CodeListResponsibleAgency" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code identifying the agency resopnsible for a code list</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:maxLength value="3"/>
      <xs:enumeration value="155">
        <xs:annotation>
          <xs:documentation>PT, Portuguese Customs</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference
diagram
children ReferenceQualifier ReferenceNumber DateTimePeriod
annotation
documentation 
RFF - Group of elements containing  references and constants that apply to the entire message.

This element is to send the information related with the Customs means of transport process ("Contramarca") and/or the Port Authority vessel call id (GCP process folder).

It is also used to identified the message being acknowledged.

Customs means of transport process identification (DE:1153='AFM'), or the Port Auhtority vessel call id (DE:1153='ATZ'), and the message being acknowledged (DE:1153='ABO'). These information is reported in DE:1154.

The current format for Customs vessel process id is:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

When the reference is the Port Authority vessel call Id (RFF:C506:1153='ATZ'), then in each the following Ports, the suffixes apply to the reference:

- Port of Leixões ESC
- Port of Lisboa: LIS
- Port of Sines: ESC

Example: Process 876 issued in 2003 at Leixões Customs office for maritime means of transport.

RFF+AFM:PTLEI34012003000876'


source
<xs:element name="Reference" maxOccurs="3">
  <xs:annotation>
    <xs:documentation>RFF - Group of elements containing  references and constants that apply to the entire message.

This element is to send the information related with the Customs means of transport process ("Contramarca") and/or the Port Authority vessel call id (GCP process folder).

It is also used to identified the message being acknowledged.

Customs means of transport process identification (DE:1153='AFM'), or the Port Auhtority vessel call id (DE:1153='ATZ'), and the message being acknowledged (DE:1153='ABO'). These information is reported in DE:1154.

The current format for Customs vessel process id is:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

When the reference is the Port Authority vessel call Id (RFF:C506:1153='ATZ'), then in each the following Ports, the suffixes apply to the reference:

- Port of Leixões ESC
- Port of Lisboa: LIS
- Port of Sines: ESC

Example: Process 876 issued in 2003 at Leixões Customs office for maritime means of transport.

RFF+AFM:PTLEI34012003000876'


</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ReferenceQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a reference element or a reference number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="ABO">
              <xs:annotation>
                <xs:documentation>Originator's reference</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFM">
              <xs:annotation>
                <xs:documentation>Secondary customs reference</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ATZ">
              <xs:annotation>
                <xs:documentation>Ship's stay reference number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ReferenceNumber" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification number.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>DTM - Element to identifying a date related to the preceding Reference. 

Date and time when the Customs means of transport process ("Contramarca") was created.

Example: Process created on June, the 10th, 11h43

DTM+171:200306101143:203'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DateTimePeriodQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="171">
                    <xs:annotation>
                      <xs:documentation>Reference Date/Time</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="203">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="303">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/Reference/ReferenceQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration ABO
enumeration AFM
enumeration ATZ
annotation
documentation 
Code giving specific meaning to a reference element or a reference number
source
<xs:element name="ReferenceQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a reference element or a reference number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="ABO">
        <xs:annotation>
          <xs:documentation>Originator's reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFM">
        <xs:annotation>
          <xs:documentation>Secondary customs reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ATZ">
        <xs:annotation>
          <xs:documentation>Ship's stay reference number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/ReferenceNumber
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
Identification number.
source
<xs:element name="ReferenceNumber" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification number.</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod
diagram
children DateTimePeriodQualifier DateTimePeriod DateTimePeriodFormatQualifier
annotation
documentation 
DTM - Element to identifying a date related to the preceding Reference. 

Date and time when the Customs means of transport process ("Contramarca") was created.

Example: Process created on June, the 10th, 11h43

DTM+171:200306101143:203'

source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>DTM - Element to identifying a date related to the preceding Reference. 

Date and time when the Customs means of transport process ("Contramarca") was created.

Example: Process created on June, the 10th, 11h43

DTM+171:200306101143:203'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DateTimePeriodQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="171">
              <xs:annotation>
                <xs:documentation>Reference Date/Time</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="203">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="303">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod/DateTimePeriodQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 171
annotation
documentation 
Code giving specific meaning to a date, time or period
source
<xs:element name="DateTimePeriodQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="171">
        <xs:annotation>
          <xs:documentation>Reference Date/Time</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod/DateTimePeriod
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
The value of a date, a date and a tiem, a time or a period, in a specified representation
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/Reference/DateTimePeriod/DateTimePeriodFormatQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 203
enumeration 303
annotation
documentation 
Specification of the representation of a date, date and time or a period
source
<xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="303">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails
diagram
children DocumentDetails Reference FreeText DateTimePeriod ErrorPointDetails
annotation
documentation 
DOC - An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.

This element is to provide information about the documents that are being acknowledge and the result of the validation process of each one.

Segment DOC is used to send the identification of the Customs Summary Declaration id. Its status is provided in segment FTX in this group.

The transport document being acknowledge is specified in segment RFF in this group. This reference shall occur only once in the group.

For each transport document several validation rules will be applied. The result is transmitted in the form of codes (to be published in a separate document) by using group 12 and with a description in Portuguese and English.

The current format for Customs Summary Declaration id is:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number for Customs vessel process id: 6 digits left padded with zeros
- sequential number for Customs Summary Declaration: 4 digits left padded with zeros

Please note that this format is subject to changes in the future.

Example: Customs Summary Declaration 3 related with Customs vessel process id 876 of 2003 at Leixões Customs Office.

DOC+355+PTLEI340120030008760003'


source
<xs:element name="DocumentDetails" maxOccurs="9999">
  <xs:annotation>
    <xs:documentation>DOC - An element to identify the master bill number reported in a multi-consignment
message. This element can also be used to identify the Customs declaration where
the CUSRES is responding to multiple declarations.

This element is to provide information about the documents that are being acknowledge and the result of the validation process of each one.

Segment DOC is used to send the identification of the Customs Summary Declaration id. Its status is provided in segment FTX in this group.

The transport document being acknowledge is specified in segment RFF in this group. This reference shall occur only once in the group.

For each transport document several validation rules will be applied. The result is transmitted in the form of codes (to be published in a separate document) by using group 12 and with a description in Portuguese and English.

The current format for Customs Summary Declaration id is:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number for Customs vessel process id: 6 digits left padded with zeros
- sequential number for Customs Summary Declaration: 4 digits left padded with zeros

Please note that this format is subject to changes in the future.

Example: Customs Summary Declaration 3 related with Customs vessel process id 876 of 2003 at Leixões Customs Office.

DOC+355+PTLEI340120030008760003'


</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentDetails">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DocumentName" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Document/message identifier expressed in code</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="355">
                    <xs:annotation>
                      <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Document/message number</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Reference">
        <xs:annotation>
          <xs:documentation>RFF - An element identifying a particular reference, e.g. house of bill number, master bill
number.

This segment is to identify the Transport Document. The identification was provided in segment RFF in segment group 26 inside segment group 19 of the IFCSUM message.

Example: BL number NB234567

RFF+BM:NB234567'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReferenceQualifier">
              <xs:annotation>
                <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AAM">
                    <xs:annotation>
                      <xs:documentation>Waybill number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AEW">
                    <xs:annotation>
                      <xs:documentation>Empty container bill number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AEX">
                    <xs:annotation>
                      <xs:documentation>Non-negotiable maritime transport</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFA">
                    <xs:annotation>
                      <xs:documentation>Through bill of lading number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFB">
                    <xs:annotation>
                      <xs:documentation>Cargo manifest number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="AFM">
                    <xs:annotation>
                      <xs:documentation>Secondary Customs reference</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="BM">
                    <xs:annotation>
                      <xs:documentation>Bill of landing number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="BN">
                    <xs:annotation>
                      <xs:documentation>Booking reference number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CT">
                    <xs:annotation>
                      <xs:documentation>Contract number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="GDN">
                    <xs:annotation>
                      <xs:documentation>General declaration number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="MB">
                    <xs:annotation>
                      <xs:documentation>Master bill of lading number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PK">
                    <xs:annotation>
                      <xs:documentation>Packing list number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ReferenceNumber" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="FreeText">
        <xs:annotation>
          <xs:documentation>FTX - A segment to provide the goods description.

This segment is used in order to inform the agent about the status of the Customs Summary Declaration. Use code list given in the first DE:4440.

Example: Declaration pending

FTX+CUS+++PEN'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TextSubjectQualifier">
              <xs:annotation>
                <xs:documentation>Code specifying the subject of the free text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="CUS">
                    <xs:annotation>
                      <xs:documentation>Customs declaration information</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="FreeText" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Free text field available to the message
sender for information</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..70">
                  <xs:enumeration value="ACT">
                    <xs:annotation>
                      <xs:documentation>Active</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="ANU">
                    <xs:annotation>
                      <xs:documentation>Annulled</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="DES">
                    <xs:annotation>
                      <xs:documentation>Expanded</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="FIN">
                    <xs:annotation>
                      <xs:documentation>Finalized</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PEN">
                    <xs:annotation>
                      <xs:documentation>Pending</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PRV">
                    <xs:annotation>
                      <xs:documentation>Provisional</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="DateTimePeriod" maxOccurs="2">
        <xs:annotation>
          <xs:documentation>DTM - A segment identifying necessary dates.

This segment is to send the Date/Time of the Customs Summary Declaration (DE:2005='150') and the Date/Time of the acceptance of the Transport Document by Customs (DE:2005='154'). So this segment shall occur twice.

Example: Transport Document accepted at 2004/01/20 at 15h17.

DTM+154:200401201517:203'

Example: Declaration issued on 2004/01/20 at 15h25.

DTM+150:200401201525:203'


</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DateTimePeriodQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="150">
                    <xs:annotation>
                      <xs:documentation>Declaration/presentation date</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="154">
                    <xs:annotation>
                      <xs:documentation>Acceptance date of document</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriod" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..35"/>
              </xs:simpleType>
            </xs:element>
            <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:maxLength value="3"/>
                  <xs:enumeration value="203">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="303">
                    <xs:annotation>
                      <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ErrorPointDetails" maxOccurs="9999">
        <xs:annotation>
          <xs:documentation>ERP - An element to identify the location of an application error.

This element is provided to report codes resulted from the application of the validation rules. At least, one occurrence will be given for each part of the document being responded.

If the document is a cargo manifest (SG6:RFF:1153 is 'AFB'), this group will report the results from validating the header.

If the document is a transport document other than the manifest, then at least one occurrence will occur for each goods item and/or equipment declared in the document.

The code list will be provided in another document.

The element will also be used to report the identification given by Customs to each goods items as well as their status. The identification will be sent in the RFF segment and the respective status will be given in one occurrence of segment FTX.


This segment identifies the point in the document to which the error in segment ERC refers to. The point can be the header of the manifest, or one transport document referred in the manifest, or one of the goods presented in a certain transport document, or one of a transport equipment presented in a certain transport document.

When referring to the manifest's header, the identification will be the reference given in segment RFF of segment group 1 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a transport document, the identification will be the reference given in segment RFF of segment group 26 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a particular good, the identification will be the sequential number given in segment GID in segment group 41 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the good is present will be also included. The identification of the transport document will be present in DE:1052.

When referring to a particular transport equipment, the identification will be the equipment id given in segment EQD in segment group 60 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the transport equipment is present will be also included. The identification of the transport document will be present in DE:1052.

Composite C853 is only used to report syntax errors.

Example: Error located in manifest identified by V6657PTLEIEXP

ERP+1:V6657PTLEIEXP'

Example: Error located in the third good's section of the Transport Document XPTO8856

ERP+7:XPTO8856:3'

Example: Error located in Transport Document identified by NB78566

ERP+2:NB78566'

Example: Error located in container CGTU 187589/5 in Transport Document OJS3547

ERP+7:OJS3547:CGTU1875895'

Example: Sintax error in 1st element of segment PIA in the 4th occurrence of group 41 in the 10th occurrence of group 19.

ERP+7:10:4+PIA:1'

Example: Equipment error(2), BL nº 2, you can read on IFCSUM guide group (G) 60, segment MEA and d.e. 6411

ERP+2:2+:G60MEA6411'

Example: Shipment error(2), BL nº 2, you can read on ifcsum guide Group (G) 60, segment MEA and d.e. 6411

ERP+7:2:1+:G43MEA6411'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MessageSection" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="1">
                    <xs:annotation>
                      <xs:documentation>Heading section</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="2">
                    <xs:annotation>
                      <xs:documentation>Detail section of a message</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="7">
                    <xs:annotation>
                      <xs:documentation>Sub-line item</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
              <xs:annotation>
                <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="SegmentTag" type="string1..3" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Tag of a segment</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>
            <xs:element name="Reference" minOccurs="0">
              <xs:annotation>
                <xs:documentation>RFF - segment to provide the references related to the application error.

The segment is used to report the identification given by Customs to each goods items. This identification is structured like this:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros
- id of the Customs Summary Declaration: 4 digits left padded with zeros
- id of the good's item: 2 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

Example: Customs good's identification 7 in Summary Declaration 45 associated with Customs vessel process id 12 from Leixoes Customs Office

RFF+IB:PTLEI34012004000012004507'

</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ReferenceQualifier">
                    <xs:annotation>
                      <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="IB">
                          <xs:annotation>
                            <xs:documentation>In bond number</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="ApplicationErrorInformation" minOccurs="0">
              <xs:annotation>
                <xs:documentation>ERC - An element identifying the type of application errors within a message.

This segment is used to report the code value associated with the condition verified.

Example: Condition associated with code DEC04067

ERC+DEC04067'

</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ApplicationErrorIdentification" type="string1..8">
                    <xs:annotation>
                      <xs:documentation>
The code assigned by the receiver of a
message to the identification of a data validation error condition. Code List will be provided in a separate document.
    </xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="FreeText" minOccurs="0" maxOccurs="3">
              <xs:annotation>
                <xs:documentation>FTX - A segment to provide explanation and/or supplementary information related to the specified application error.

This segment is used to send the textual description of the error and to inform the Customs status of the goods item.

The error description will be given in Portuguese (DE:3453='PT') and in English (DE:3453='EN').  In this case DE:4451 is 'AAO'.

The status will be given by a code in DE:4440. In this case DE:4451 is 'CUS'. Only in this case the code list in first DE:4440 will apply. DE:3453 is no needed.

So the segment occurs three times in each occurrence of group 12..

Example: Incorrect type of package.

FTX+AAO+++INCORRECT TYPE OF PACKAGE+EN'

Example: Goods item finalized.

FTX+CUS+++FIN'


IF the qualifier is "CUS" then the text Literal has to be one of:
	ACT -> Active
	ANU -> Annulled
	APU -> Accounted
	CAT -> Captive
	DES -> Expanded
	FIN -> Finalized
	PEN -> Pending
	PRV -> Provisional
</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="TextSubjectQualifier">
                    <xs:annotation>
                      <xs:documentation>Code specifying the subject of the free text</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="AAO">
                          <xs:annotation>
                            <xs:documentation>Error description (free text)</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="CUS">
                          <xs:annotation>
                            <xs:documentation>Customs declaration information</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                  <xs:element name="TextLiteral" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Free text</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="FreeText" type="string1..70" minOccurs="0" maxOccurs="5">
                          <xs:annotation>
                            <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
                          </xs:annotation>
                        </xs:element>
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                  <xs:element name="LanguageCoded" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
                    </xs:annotation>
                    <xs:simpleType>
                      <xs:restriction base="string1..3">
                        <xs:enumeration value="EN">
                          <xs:annotation>
                            <xs:documentation>English</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="PT">
                          <xs:annotation>
                            <xs:documentation>Portuguese</xs:documentation>
                          </xs:annotation>
                        </xs:enumeration>
                      </xs:restriction>
                    </xs:simpleType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/DocumentDetails
diagram
children DocumentName DocumentNumber
source
<xs:element name="DocumentDetails">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DocumentName" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Document/message identifier expressed in code</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="355">
              <xs:annotation>
                <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Document/message number</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/DocumentDetails/DocumentName
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 355
annotation
documentation 
Document/message identifier expressed in code
source
<xs:element name="DocumentName" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Document/message identifier expressed in code</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="355">
        <xs:annotation>
          <xs:documentation>Customs summary declaration without commercial detail, alternate</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DocumentDetails/DocumentNumber
diagram
type string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
Document/message number
source
<xs:element name="DocumentNumber" type="string1..35" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Document/message number</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/Reference
diagram
children ReferenceQualifier ReferenceNumber
annotation
documentation 
RFF - An element identifying a particular reference, e.g. house of bill number, master bill
number.

This segment is to identify the Transport Document. The identification was provided in segment RFF in segment group 26 inside segment group 19 of the IFCSUM message.

Example: BL number NB234567

RFF+BM:NB234567'

source
<xs:element name="Reference">
  <xs:annotation>
    <xs:documentation>RFF - An element identifying a particular reference, e.g. house of bill number, master bill
number.

This segment is to identify the Transport Document. The identification was provided in segment RFF in segment group 26 inside segment group 19 of the IFCSUM message.

Example: BL number NB234567

RFF+BM:NB234567'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ReferenceQualifier">
        <xs:annotation>
          <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AAM">
              <xs:annotation>
                <xs:documentation>Waybill number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AEW">
              <xs:annotation>
                <xs:documentation>Empty container bill number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AEX">
              <xs:annotation>
                <xs:documentation>Non-negotiable maritime transport</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFA">
              <xs:annotation>
                <xs:documentation>Through bill of lading number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFB">
              <xs:annotation>
                <xs:documentation>Cargo manifest number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="AFM">
              <xs:annotation>
                <xs:documentation>Secondary Customs reference</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BM">
              <xs:annotation>
                <xs:documentation>Bill of landing number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="BN">
              <xs:annotation>
                <xs:documentation>Booking reference number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CT">
              <xs:annotation>
                <xs:documentation>Contract number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="GDN">
              <xs:annotation>
                <xs:documentation>General declaration number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="MB">
              <xs:annotation>
                <xs:documentation>Master bill of lading number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PK">
              <xs:annotation>
                <xs:documentation>Packing list number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ReferenceNumber" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/Reference/ReferenceQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration AAM
enumeration AEW
enumeration AEX
enumeration AFA
enumeration AFB
enumeration AFM
enumeration BM
enumeration BN
enumeration CT
enumeration GDN
enumeration MB
enumeration PK
annotation
documentation 
Code giving a specific meaning to a reference element or a reference number
source
<xs:element name="ReferenceQualifier">
  <xs:annotation>
    <xs:documentation>Code giving a specific meaning to a reference element or a reference number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AAM">
        <xs:annotation>
          <xs:documentation>Waybill number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AEW">
        <xs:annotation>
          <xs:documentation>Empty container bill number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AEX">
        <xs:annotation>
          <xs:documentation>Non-negotiable maritime transport</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFA">
        <xs:annotation>
          <xs:documentation>Through bill of lading number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFB">
        <xs:annotation>
          <xs:documentation>Cargo manifest number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="AFM">
        <xs:annotation>
          <xs:documentation>Secondary Customs reference</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BM">
        <xs:annotation>
          <xs:documentation>Bill of landing number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BN">
        <xs:annotation>
          <xs:documentation>Booking reference number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CT">
        <xs:annotation>
          <xs:documentation>Contract number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="GDN">
        <xs:annotation>
          <xs:documentation>General declaration number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MB">
        <xs:annotation>
          <xs:documentation>Master bill of lading number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PK">
        <xs:annotation>
          <xs:documentation>Packing list number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/Reference/ReferenceNumber
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute
source
<xs:element name="ReferenceNumber" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification number, whose nature and function can be qualified by the ReferenceQualifier attribute</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/FreeText
diagram
children TextSubjectQualifier FreeText
annotation
documentation 
FTX - A segment to provide the goods description.

This segment is used in order to inform the agent about the status of the Customs Summary Declaration. Use code list given in the first DE:4440.

Example: Declaration pending

FTX+CUS+++PEN'

source
<xs:element name="FreeText">
  <xs:annotation>
    <xs:documentation>FTX - A segment to provide the goods description.

This segment is used in order to inform the agent about the status of the Customs Summary Declaration. Use code list given in the first DE:4440.

Example: Declaration pending

FTX+CUS+++PEN'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TextSubjectQualifier">
        <xs:annotation>
          <xs:documentation>Code specifying the subject of the free text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="CUS">
              <xs:annotation>
                <xs:documentation>Customs declaration information</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Free text field available to the message
sender for information</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..70">
            <xs:enumeration value="ACT">
              <xs:annotation>
                <xs:documentation>Active</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ANU">
              <xs:annotation>
                <xs:documentation>Annulled</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="DES">
              <xs:annotation>
                <xs:documentation>Expanded</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FIN">
              <xs:annotation>
                <xs:documentation>Finalized</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PEN">
              <xs:annotation>
                <xs:documentation>Pending</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PRV">
              <xs:annotation>
                <xs:documentation>Provisional</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/FreeText/TextSubjectQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration CUS
annotation
documentation 
Code specifying the subject of the free text
source
<xs:element name="TextSubjectQualifier">
  <xs:annotation>
    <xs:documentation>Code specifying the subject of the free text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="CUS">
        <xs:annotation>
          <xs:documentation>Customs declaration information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/FreeText/FreeText
diagram
type restriction of string1..70
facets
minLength 1
maxLength 70
enumeration ACT
enumeration ANU
enumeration DES
enumeration FIN
enumeration PEN
enumeration PRV
annotation
documentation 
Free text field available to the message
sender for information
source
<xs:element name="FreeText" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Free text field available to the message
sender for information</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..70">
      <xs:enumeration value="ACT">
        <xs:annotation>
          <xs:documentation>Active</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ANU">
        <xs:annotation>
          <xs:documentation>Annulled</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DES">
        <xs:annotation>
          <xs:documentation>Expanded</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FIN">
        <xs:annotation>
          <xs:documentation>Finalized</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PEN">
        <xs:annotation>
          <xs:documentation>Pending</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PRV">
        <xs:annotation>
          <xs:documentation>Provisional</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod
diagram
children DateTimePeriodQualifier DateTimePeriod DateTimePeriodFormatQualifier
annotation
documentation 
DTM - A segment identifying necessary dates.

This segment is to send the Date/Time of the Customs Summary Declaration (DE:2005='150') and the Date/Time of the acceptance of the Transport Document by Customs (DE:2005='154'). So this segment shall occur twice.

Example: Transport Document accepted at 2004/01/20 at 15h17.

DTM+154:200401201517:203'

Example: Declaration issued on 2004/01/20 at 15h25.

DTM+150:200401201525:203'


source
<xs:element name="DateTimePeriod" maxOccurs="2">
  <xs:annotation>
    <xs:documentation>DTM - A segment identifying necessary dates.

This segment is to send the Date/Time of the Customs Summary Declaration (DE:2005='150') and the Date/Time of the acceptance of the Transport Document by Customs (DE:2005='154'). So this segment shall occur twice.

Example: Transport Document accepted at 2004/01/20 at 15h17.

DTM+154:200401201517:203'

Example: Declaration issued on 2004/01/20 at 15h25.

DTM+150:200401201525:203'


</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="DateTimePeriodQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="150">
              <xs:annotation>
                <xs:documentation>Declaration/presentation date</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="154">
              <xs:annotation>
                <xs:documentation>Acceptance date of document</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriod" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..35"/>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:maxLength value="3"/>
            <xs:enumeration value="203">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="303">
              <xs:annotation>
                <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 150
enumeration 154
annotation
documentation 
Code giving specific meaning to a date, time or period
source
<xs:element name="DateTimePeriodQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a date, time or period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="150">
        <xs:annotation>
          <xs:documentation>Declaration/presentation date</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="154">
        <xs:annotation>
          <xs:documentation>Acceptance date of document</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriod
diagram
type restriction of string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
The value of a date, a date and a tiem, a time or a period, in a specified representation
source
<xs:element name="DateTimePeriod" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The value of a date, a date and a tiem, a time or a period, in a specified representation</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..35"/>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodFormatQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 203
enumeration 303
annotation
documentation 
Specification of the representation of a date, date and time or a period
source
<xs:element name="DateTimePeriodFormatQualifier" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Specification of the representation of a date, date and time or a period</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:maxLength value="3"/>
      <xs:enumeration value="203">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMM

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="303">
        <xs:annotation>
          <xs:documentation>CCYYMMDDHHMMZZZ

Calendar dae including time in minutes:
C= Century
Y= Year
M= Month
D= Day
H= Hour
M= Minutes
Z= Time zone</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails
diagram
children MessageSection MessageItemNumber MessageSubItemNumber SegmentTag SequenceNumber Reference ApplicationErrorInformation FreeText
annotation
documentation 
ERP - An element to identify the location of an application error.

This element is provided to report codes resulted from the application of the validation rules. At least, one occurrence will be given for each part of the document being responded.

If the document is a cargo manifest (SG6:RFF:1153 is 'AFB'), this group will report the results from validating the header.

If the document is a transport document other than the manifest, then at least one occurrence will occur for each goods item and/or equipment declared in the document.

The code list will be provided in another document.

The element will also be used to report the identification given by Customs to each goods items as well as their status. The identification will be sent in the RFF segment and the respective status will be given in one occurrence of segment FTX.


This segment identifies the point in the document to which the error in segment ERC refers to. The point can be the header of the manifest, or one transport document referred in the manifest, or one of the goods presented in a certain transport document, or one of a transport equipment presented in a certain transport document.

When referring to the manifest's header, the identification will be the reference given in segment RFF of segment group 1 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a transport document, the identification will be the reference given in segment RFF of segment group 26 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a particular good, the identification will be the sequential number given in segment GID in segment group 41 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the good is present will be also included. The identification of the transport document will be present in DE:1052.

When referring to a particular transport equipment, the identification will be the equipment id given in segment EQD in segment group 60 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the transport equipment is present will be also included. The identification of the transport document will be present in DE:1052.

Composite C853 is only used to report syntax errors.

Example: Error located in manifest identified by V6657PTLEIEXP

ERP+1:V6657PTLEIEXP'

Example: Error located in the third good's section of the Transport Document XPTO8856

ERP+7:XPTO8856:3'

Example: Error located in Transport Document identified by NB78566

ERP+2:NB78566'

Example: Error located in container CGTU 187589/5 in Transport Document OJS3547

ERP+7:OJS3547:CGTU1875895'

Example: Sintax error in 1st element of segment PIA in the 4th occurrence of group 41 in the 10th occurrence of group 19.

ERP+7:10:4+PIA:1'

Example: Equipment error(2), BL nº 2, you can read on IFCSUM guide group (G) 60, segment MEA and d.e. 6411

ERP+2:2+:G60MEA6411'

Example: Shipment error(2), BL nº 2, you can read on ifcsum guide Group (G) 60, segment MEA and d.e. 6411

ERP+7:2:1+:G43MEA6411'

source
<xs:element name="ErrorPointDetails" maxOccurs="9999">
  <xs:annotation>
    <xs:documentation>ERP - An element to identify the location of an application error.

This element is provided to report codes resulted from the application of the validation rules. At least, one occurrence will be given for each part of the document being responded.

If the document is a cargo manifest (SG6:RFF:1153 is 'AFB'), this group will report the results from validating the header.

If the document is a transport document other than the manifest, then at least one occurrence will occur for each goods item and/or equipment declared in the document.

The code list will be provided in another document.

The element will also be used to report the identification given by Customs to each goods items as well as their status. The identification will be sent in the RFF segment and the respective status will be given in one occurrence of segment FTX.


This segment identifies the point in the document to which the error in segment ERC refers to. The point can be the header of the manifest, or one transport document referred in the manifest, or one of the goods presented in a certain transport document, or one of a transport equipment presented in a certain transport document.

When referring to the manifest's header, the identification will be the reference given in segment RFF of segment group 1 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a transport document, the identification will be the reference given in segment RFF of segment group 26 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1052.

When referring to a particular good, the identification will be the sequential number given in segment GID in segment group 41 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the good is present will be also included. The identification of the transport document will be present in DE:1052.

When referring to a particular transport equipment, the identification will be the equipment id given in segment EQD in segment group 60 inside segment group 19 of the IFCSUM message. This identification will be present in DE:1054. But the reference to the transport document where the transport equipment is present will be also included. The identification of the transport document will be present in DE:1052.

Composite C853 is only used to report syntax errors.

Example: Error located in manifest identified by V6657PTLEIEXP

ERP+1:V6657PTLEIEXP'

Example: Error located in the third good's section of the Transport Document XPTO8856

ERP+7:XPTO8856:3'

Example: Error located in Transport Document identified by NB78566

ERP+2:NB78566'

Example: Error located in container CGTU 187589/5 in Transport Document OJS3547

ERP+7:OJS3547:CGTU1875895'

Example: Sintax error in 1st element of segment PIA in the 4th occurrence of group 41 in the 10th occurrence of group 19.

ERP+7:10:4+PIA:1'

Example: Equipment error(2), BL nº 2, you can read on IFCSUM guide group (G) 60, segment MEA and d.e. 6411

ERP+2:2+:G60MEA6411'

Example: Shipment error(2), BL nº 2, you can read on ifcsum guide Group (G) 60, segment MEA and d.e. 6411

ERP+7:2:1+:G43MEA6411'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="MessageSection" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="1">
              <xs:annotation>
                <xs:documentation>Heading section</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="2">
              <xs:annotation>
                <xs:documentation>Detail section of a message</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="7">
              <xs:annotation>
                <xs:documentation>Sub-line item</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
        <xs:annotation>
          <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SegmentTag" type="string1..3" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Tag of a segment</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>
      <xs:element name="Reference" minOccurs="0">
        <xs:annotation>
          <xs:documentation>RFF - segment to provide the references related to the application error.

The segment is used to report the identification given by Customs to each goods items. This identification is structured like this:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros
- id of the Customs Summary Declaration: 4 digits left padded with zeros
- id of the good's item: 2 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

Example: Customs good's identification 7 in Summary Declaration 45 associated with Customs vessel process id 12 from Leixoes Customs Office

RFF+IB:PTLEI34012004000012004507'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ReferenceQualifier">
              <xs:annotation>
                <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="IB">
                    <xs:annotation>
                      <xs:documentation>In bond number</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="ApplicationErrorInformation" minOccurs="0">
        <xs:annotation>
          <xs:documentation>ERC - An element identifying the type of application errors within a message.

This segment is used to report the code value associated with the condition verified.

Example: Condition associated with code DEC04067

ERC+DEC04067'

</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ApplicationErrorIdentification" type="string1..8">
              <xs:annotation>
                <xs:documentation>
The code assigned by the receiver of a
message to the identification of a data validation error condition. Code List will be provided in a separate document.
    </xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="FreeText" minOccurs="0" maxOccurs="3">
        <xs:annotation>
          <xs:documentation>FTX - A segment to provide explanation and/or supplementary information related to the specified application error.

This segment is used to send the textual description of the error and to inform the Customs status of the goods item.

The error description will be given in Portuguese (DE:3453='PT') and in English (DE:3453='EN').  In this case DE:4451 is 'AAO'.

The status will be given by a code in DE:4440. In this case DE:4451 is 'CUS'. Only in this case the code list in first DE:4440 will apply. DE:3453 is no needed.

So the segment occurs three times in each occurrence of group 12..

Example: Incorrect type of package.

FTX+AAO+++INCORRECT TYPE OF PACKAGE+EN'

Example: Goods item finalized.

FTX+CUS+++FIN'


IF the qualifier is "CUS" then the text Literal has to be one of:
	ACT -> Active
	ANU -> Annulled
	APU -> Accounted
	CAT -> Captive
	DES -> Expanded
	FIN -> Finalized
	PEN -> Pending
	PRV -> Provisional
</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="TextSubjectQualifier">
              <xs:annotation>
                <xs:documentation>Code specifying the subject of the free text</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="AAO">
                    <xs:annotation>
                      <xs:documentation>Error description (free text)</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="CUS">
                    <xs:annotation>
                      <xs:documentation>Customs declaration information</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="TextLiteral" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Free text</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="FreeText" type="string1..70" minOccurs="0" maxOccurs="5">
                    <xs:annotation>
                      <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="LanguageCoded" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="string1..3">
                  <xs:enumeration value="EN">
                    <xs:annotation>
                      <xs:documentation>English</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                  <xs:enumeration value="PT">
                    <xs:annotation>
                      <xs:documentation>Portuguese</xs:documentation>
                    </xs:annotation>
                  </xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/MessageSection
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration 1
enumeration 2
enumeration 7
annotation
documentation 
Recognition of a particular part of a message.
source
<xs:element name="MessageSection" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Recognition of a particular part of a message.</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="1">
        <xs:annotation>
          <xs:documentation>Heading section</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="2">
        <xs:annotation>
          <xs:documentation>Detail section of a message</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="7">
        <xs:annotation>
          <xs:documentation>Sub-line item</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/MessageItemNumber
diagram
type string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
The referenced number allocated to an identifiable item in a message
source
<xs:element name="MessageItemNumber" type="string1..35" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The referenced number allocated to an identifiable item in a message</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/MessageSubItemNumber
diagram
type decimal6
facets
totalDigits 6
annotation
documentation 
The reference number allocated to an identifiable sub-item in a message
source
<xs:element name="MessageSubItemNumber" type="decimal6" minOccurs="0">
  <xs:annotation>
    <xs:documentation>The reference number allocated to an identifiable sub-item in a message</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/SegmentTag
diagram
type string1..3
facets
minLength 1
maxLength 3
annotation
documentation 
Tag of a segment
source
<xs:element name="SegmentTag" type="string1..3" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Tag of a segment</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/SequenceNumber
diagram
type string1..10
facets
minLength 1
maxLength 10
source
<xs:element name="SequenceNumber" type="string1..10" minOccurs="0"/>

element CusresMessage/DocumentDetails/ErrorPointDetails/Reference
diagram
children ReferenceQualifier ReferenceNumber
annotation
documentation 
RFF - segment to provide the references related to the application error.

The segment is used to report the identification given by Customs to each goods items. This identification is structured like this:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros
- id of the Customs Summary Declaration: 4 digits left padded with zeros
- id of the good's item: 2 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

Example: Customs good's identification 7 in Summary Declaration 45 associated with Customs vessel process id 12 from Leixoes Customs Office

RFF+IB:PTLEI34012004000012004507'

source
<xs:element name="Reference" minOccurs="0">
  <xs:annotation>
    <xs:documentation>RFF - segment to provide the references related to the application error.

The segment is used to report the identification given by Customs to each goods items. This identification is structured like this:

- UN/Locode: 5 characters
- customs office code: 3 digits
- mode of transport code (UN/ECE Rec. 19 - 1 Maritime): 1 digit
- year: 4 digits
- sequential number: 6 digits left padded with zeros
- id of the Customs Summary Declaration: 4 digits left padded with zeros
- id of the good's item: 2 digits left padded with zeros

It is recommended that the maximum size for this data element 1154 should be considered.

Example: Customs good's identification 7 in Summary Declaration 45 associated with Customs vessel process id 12 from Leixoes Customs Office

RFF+IB:PTLEI34012004000012004507'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ReferenceQualifier">
        <xs:annotation>
          <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="IB">
              <xs:annotation>
                <xs:documentation>In bond number</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration IB
annotation
documentation 
Code giving specific meaning to a reference segment or a reference number
source
<xs:element name="ReferenceQualifier">
  <xs:annotation>
    <xs:documentation>Code giving specific meaning to a reference segment or a reference number</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="IB">
        <xs:annotation>
          <xs:documentation>In bond number</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceNumber
diagram
type string1..35
facets
minLength 1
maxLength 35
annotation
documentation 
Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.
source
<xs:element name="ReferenceNumber" type="string1..35" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Identification number the nature and function of which can be qualified by an entry in data element 1153 Reference qualifier.</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/ApplicationErrorInformation
diagram
children ApplicationErrorIdentification
annotation
documentation 
ERC - An element identifying the type of application errors within a message.

This segment is used to report the code value associated with the condition verified.

Example: Condition associated with code DEC04067

ERC+DEC04067'

source
<xs:element name="ApplicationErrorInformation" minOccurs="0">
  <xs:annotation>
    <xs:documentation>ERC - An element identifying the type of application errors within a message.

This segment is used to report the code value associated with the condition verified.

Example: Condition associated with code DEC04067

ERC+DEC04067'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="ApplicationErrorIdentification" type="string1..8">
        <xs:annotation>
          <xs:documentation>
The code assigned by the receiver of a
message to the identification of a data validation error condition. Code List will be provided in a separate document.
    </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/ApplicationErrorInformation/ApplicationErrorIdentification
diagram
type string1..8
facets
minLength 1
maxLength 8
annotation
documentation 

The code assigned by the receiver of a
message to the identification of a data validation error condition. Code List will be provided in a separate document.
    
source
<xs:element name="ApplicationErrorIdentification" type="string1..8">
  <xs:annotation>
    <xs:documentation>
The code assigned by the receiver of a
message to the identification of a data validation error condition. Code List will be provided in a separate document.
    </xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText
diagram
children TextSubjectQualifier TextLiteral LanguageCoded
annotation
documentation 
FTX - A segment to provide explanation and/or supplementary information related to the specified application error.

This segment is used to send the textual description of the error and to inform the Customs status of the goods item.

The error description will be given in Portuguese (DE:3453='PT') and in English (DE:3453='EN').  In this case DE:4451 is 'AAO'.

The status will be given by a code in DE:4440. In this case DE:4451 is 'CUS'. Only in this case the code list in first DE:4440 will apply. DE:3453 is no needed.

So the segment occurs three times in each occurrence of group 12..

Example: Incorrect type of package.

FTX+AAO+++INCORRECT TYPE OF PACKAGE+EN'

Example: Goods item finalized.

FTX+CUS+++FIN'


IF the qualifier is "CUS" then the text Literal has to be one of:
	ACT -> Active
	ANU -> Annulled
	APU -> Accounted
	CAT -> Captive
	DES -> Expanded
	FIN -> Finalized
	PEN -> Pending
	PRV -> Provisional
source
<xs:element name="FreeText" minOccurs="0" maxOccurs="3">
  <xs:annotation>
    <xs:documentation>FTX - A segment to provide explanation and/or supplementary information related to the specified application error.

This segment is used to send the textual description of the error and to inform the Customs status of the goods item.

The error description will be given in Portuguese (DE:3453='PT') and in English (DE:3453='EN').  In this case DE:4451 is 'AAO'.

The status will be given by a code in DE:4440. In this case DE:4451 is 'CUS'. Only in this case the code list in first DE:4440 will apply. DE:3453 is no needed.

So the segment occurs three times in each occurrence of group 12..

Example: Incorrect type of package.

FTX+AAO+++INCORRECT TYPE OF PACKAGE+EN'

Example: Goods item finalized.

FTX+CUS+++FIN'


IF the qualifier is "CUS" then the text Literal has to be one of:
	ACT -> Active
	ANU -> Annulled
	APU -> Accounted
	CAT -> Captive
	DES -> Expanded
	FIN -> Finalized
	PEN -> Pending
	PRV -> Provisional
</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="TextSubjectQualifier">
        <xs:annotation>
          <xs:documentation>Code specifying the subject of the free text</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="AAO">
              <xs:annotation>
                <xs:documentation>Error description (free text)</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="CUS">
              <xs:annotation>
                <xs:documentation>Customs declaration information</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="TextLiteral" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Free text</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="FreeText" type="string1..70" minOccurs="0" maxOccurs="5">
              <xs:annotation>
                <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="LanguageCoded" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="string1..3">
            <xs:enumeration value="EN">
              <xs:annotation>
                <xs:documentation>English</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="PT">
              <xs:annotation>
                <xs:documentation>Portuguese</xs:documentation>
              </xs:annotation>
            </xs:enumeration>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextSubjectQualifier
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration AAO
enumeration CUS
annotation
documentation 
Code specifying the subject of the free text
source
<xs:element name="TextSubjectQualifier">
  <xs:annotation>
    <xs:documentation>Code specifying the subject of the free text</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="AAO">
        <xs:annotation>
          <xs:documentation>Error description (free text)</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CUS">
        <xs:annotation>
          <xs:documentation>Customs declaration information</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextLiteral
diagram
children FreeText
annotation
documentation 
Free text
source
<xs:element name="TextLiteral" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Free text</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="FreeText" type="string1..70" minOccurs="0" maxOccurs="5">
        <xs:annotation>
          <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextLiteral/FreeText
diagram
type string1..70
facets
minLength 1
maxLength 70
annotation
documentation 
Free text field available to the message sender for information.
source
<xs:element name="FreeText" type="string1..70" minOccurs="0" maxOccurs="5">
  <xs:annotation>
    <xs:documentation>Free text field available to the message sender for information.</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/LanguageCoded
diagram
type restriction of string1..3
facets
minLength 1
maxLength 3
enumeration EN
enumeration PT
annotation
documentation 
Code of language (ISO 639-1988).
source
<xs:element name="LanguageCoded" minOccurs="0">
  <xs:annotation>
    <xs:documentation>Code of language (ISO 639-1988).</xs:documentation>
  </xs:annotation>
  <xs:simpleType>
    <xs:restriction base="string1..3">
      <xs:enumeration value="EN">
        <xs:annotation>
          <xs:documentation>English</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PT">
        <xs:annotation>
          <xs:documentation>Portuguese</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

element CusresMessage/MessageTrailler
diagram
children NumberOfSegments MessageReferenceNumber
annotation
documentation 
UNT - An element to indicate the end of a message, giving the total number of segments in the
message and the control reference number of the message.

Example: 26 sent segment, reference 1357924680

UNT+26+1357924680'

source
<xs:element name="MessageTrailler">
  <xs:annotation>
    <xs:documentation>UNT - An element to indicate the end of a message, giving the total number of segments in the
message and the control reference number of the message.

Example: 26 sent segment, reference 1357924680

UNT+26+1357924680'

</xs:documentation>
  </xs:annotation>
  <xs:complexType>
    <xs:sequence>
      <xs:element name="NumberOfSegments" type="decimal6">
        <xs:annotation>
          <xs:documentation>Control count of the segments in the message</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MessageReferenceNumber" type="string1..14">
        <xs:annotation>
          <xs:documentation>Unique message reference number assigned by the sender</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>

element CusresMessage/MessageTrailler/NumberOfSegments
diagram
type decimal6
facets
totalDigits 6
annotation
documentation 
Control count of the segments in the message
source
<xs:element name="NumberOfSegments" type="decimal6">
  <xs:annotation>
    <xs:documentation>Control count of the segments in the message</xs:documentation>
  </xs:annotation>
</xs:element>

element CusresMessage/MessageTrailler/MessageReferenceNumber
diagram
type string1..14
facets
minLength 1
maxLength 14
annotation
documentation 
Unique message reference number assigned by the sender
source
<xs:element name="MessageReferenceNumber" type="string1..14">
  <xs:annotation>
    <xs:documentation>Unique message reference number assigned by the sender</xs:documentation>
  </xs:annotation>
</xs:element>

simpleType decimal12
type restriction of xs:integer
facets
totalDigits 12
source
<xs:simpleType name="decimal12">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="12"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal15
type restriction of xs:integer
facets
totalDigits 15
source
<xs:simpleType name="decimal15">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="15"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal18
type restriction of xs:integer
facets
totalDigits 18
source
<xs:simpleType name="decimal18">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="18"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal2
type restriction of xs:integer
facets
totalDigits 2
source
<xs:simpleType name="decimal2">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="2"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal3
type restriction of xs:integer
facets
totalDigits 3
source
<xs:simpleType name="decimal3">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="3"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal4
type restriction of xs:integer
facets
totalDigits 4
source
<xs:simpleType name="decimal4">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="4"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal5
type restriction of xs:integer
facets
totalDigits 5
source
<xs:simpleType name="decimal5">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="5"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal6
type restriction of xs:integer
used by
elements CusresMessage/DocumentDetails/ErrorPointDetails/MessageSubItemNumber CusresMessage/MessageTrailler/NumberOfSegments
facets
totalDigits 6
source
<xs:simpleType name="decimal6">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="6"/>
  </xs:restriction>
</xs:simpleType>

simpleType decimal8
type restriction of xs:integer
facets
totalDigits 8
source
<xs:simpleType name="decimal8">
  <xs:restriction base="xs:integer">
    <xs:totalDigits value="8"/>
  </xs:restriction>
</xs:simpleType>

simpleType integer1..n
type xs:integer
source
<xs:simpleType name="integer1..n">
  <xs:restriction base="xs:integer"/>
</xs:simpleType>

simpleType string0..1
type restriction of xs:string
facets
minLength 0
maxLength 1
source
<xs:simpleType name="string0..1">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="1"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..10
type restriction of xs:string
facets
minLength 0
maxLength 10
source
<xs:simpleType name="string0..10">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="10"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..17
type restriction of xs:string
facets
minLength 0
maxLength 17
source
<xs:simpleType name="string0..17">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="17"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..18
type restriction of xs:string
facets
minLength 0
maxLength 18
source
<xs:simpleType name="string0..18">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="18"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..25
type restriction of xs:string
facets
minLength 0
maxLength 25
source
<xs:simpleType name="string0..25">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="25"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..26
type restriction of xs:string
facets
minLength 0
maxLength 26
source
<xs:simpleType name="string0..26">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="26"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..3
type restriction of xs:string
facets
minLength 0
maxLength 3
source
<xs:simpleType name="string0..3">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="3"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..35
type restriction of xs:string
facets
minLength 0
maxLength 35
source
<xs:simpleType name="string0..35">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="35"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..4
type restriction of xs:string
facets
minLength 0
maxLength 4
source
<xs:simpleType name="string0..4">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="4"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..6
type restriction of xs:string
facets
minLength 0
maxLength 6
source
<xs:simpleType name="string0..6">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="6"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..7
type restriction of xs:string
facets
minLength 0
maxLength 7
source
<xs:simpleType name="string0..7">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="7"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..70
type restriction of xs:string
facets
minLength 0
maxLength 70
source
<xs:simpleType name="string0..70">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="70"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..8
type restriction of xs:string
facets
minLength 0
maxLength 8
source
<xs:simpleType name="string0..8">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="8"/>
  </xs:restriction>
</xs:simpleType>

simpleType string0..9
type restriction of xs:string
facets
minLength 0
maxLength 9
source
<xs:simpleType name="string0..9">
  <xs:restriction base="xs:string">
    <xs:minLength value="0"/>
    <xs:maxLength value="9"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..10
type restriction of xs:string
used by
element CusresMessage/DocumentDetails/ErrorPointDetails/SequenceNumber
facets
minLength 1
maxLength 10
source
<xs:simpleType name="string1..10">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="10"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..14
type restriction of xs:string
used by
elements CusresMessage/MessageHeader/MessageReferenceNumber CusresMessage/MessageTrailler/MessageReferenceNumber
facets
minLength 1
maxLength 14
source
<xs:simpleType name="string1..14">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="14"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..17
type restriction of xs:string
facets
minLength 1
maxLength 17
source
<xs:simpleType name="string1..17">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="17"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..18
type restriction of xs:string
facets
minLength 1
maxLength 18
source
<xs:simpleType name="string1..18">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="18"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..2
type restriction of xs:string
used by
element CusresMessage/MessageHeader/ControlingAgency
facets
minLength 1
maxLength 2
source
<xs:simpleType name="string1..2">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="2"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..25
type restriction of xs:string
facets
minLength 1
maxLength 25
source
<xs:simpleType name="string1..25">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="25"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..3
type restriction of xs:string
used by
elements CusresMessage/NameAndAddress/CodeListQualifier CusresMessage/NameAndAddress/CodeListResponsibleAgency CusresMessage/DateTimePeriod/DateTimePeriodFormatQualifier CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodFormatQualifier CusresMessage/Reference/DateTimePeriod/DateTimePeriodFormatQualifier CusresMessage/DateTimePeriod/DateTimePeriodQualifier CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriodQualifier CusresMessage/Reference/DateTimePeriod/DateTimePeriodQualifier CusresMessage/BeginningOfMessage/DocumentName CusresMessage/DocumentDetails/DocumentDetails/DocumentName CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/LanguageCoded CusresMessage/BeginningOfMessage/MessageFunction CusresMessage/DocumentDetails/ErrorPointDetails/MessageSection CusresMessage/MessageHeader/MessageTypeReleaseNumber CusresMessage/MessageHeader/MessageTypeVersionNumber CusresMessage/NameAndAddress/PartyQualifier CusresMessage/GeneralIndicator/ProcessingIndicator CusresMessage/Reference/ReferenceQualifier CusresMessage/DocumentDetails/Reference/ReferenceQualifier CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceQualifier CusresMessage/BeginningOfMessage/ResponseType CusresMessage/DocumentDetails/ErrorPointDetails/SegmentTag CusresMessage/DocumentDetails/FreeText/TextSubjectQualifier CusresMessage/FreeText/TextSubjectQualifier CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextSubjectQualifier
facets
minLength 1
maxLength 3
source
<xs:simpleType name="string1..3">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="3"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..35
type restriction of xs:string
used by
elements CusresMessage/DateTimePeriod/DateTimePeriod CusresMessage/Reference/DateTimePeriod/DateTimePeriod CusresMessage/DocumentDetails/DateTimePeriod/DateTimePeriod CusresMessage/BeginningOfMessage/DocumentNumber CusresMessage/DocumentDetails/DocumentDetails/DocumentNumber CusresMessage/DocumentDetails/ErrorPointDetails/MessageItemNumber CusresMessage/NameAndAddress/PartyId CusresMessage/Reference/ReferenceNumber CusresMessage/DocumentDetails/Reference/ReferenceNumber CusresMessage/DocumentDetails/ErrorPointDetails/Reference/ReferenceNumber
facets
minLength 1
maxLength 35
source
<xs:simpleType name="string1..35">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="35"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..512
type restriction of xs:string
facets
minLength 1
maxLength 512
source
<xs:simpleType name="string1..512">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="512"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..6
type restriction of xs:string
used by
elements CusresMessage/MessageHeader/AssociationAssignedCode CusresMessage/MessageHeader/MessageTypeIdentifier
facets
minLength 1
maxLength 6
source
<xs:simpleType name="string1..6">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="6"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..70
type restriction of xs:string
used by
elements CusresMessage/FreeText/FreeText CusresMessage/DocumentDetails/FreeText/FreeText CusresMessage/DocumentDetails/ErrorPointDetails/FreeText/TextLiteral/FreeText
facets
minLength 1
maxLength 70
source
<xs:simpleType name="string1..70">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="70"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..8
type restriction of xs:string
used by
element CusresMessage/DocumentDetails/ErrorPointDetails/ApplicationErrorInformation/ApplicationErrorIdentification
facets
minLength 1
maxLength 8
source
<xs:simpleType name="string1..8">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="8"/>
  </xs:restriction>
</xs:simpleType>

simpleType string1..9
type restriction of xs:string
facets
minLength 1
maxLength 9
source
<xs:simpleType name="string1..9">
  <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    <xs:maxLength value="9"/>
  </xs:restriction>
</xs:simpleType>


XML Schema documentation generated with
XML Spy Schema Editor http://www.altova.com/xmlspy