<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.mf.gov.pl/SENT/2017/12/08/SENT_420.xsd" xmlns:tp="http://www.mf.gov.pl/SENT/2017/12/08/STypes.xsd" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://www.mf.gov.pl/SENT/2017/12/08/SENT_420.xsd">
  <xs:import namespace="http://www.mf.gov.pl/SENT/2017/12/08/STypes.xsd" schemaLocation="STypes.xsd"/>
  <xs:annotation>
    <xs:appinfo>
      SENT
    </xs:appinfo>
    <xs:documentation source="doc" xml:lang="pl">
      SENT420 - POBRANIE HISTORII ZGŁOSZENIA PRZEWOZU TOWARU
    </xs:documentation>
    <xs:documentation source="doc" xml:lang="pl">
      Podstawa prawna: Ustawa z dnia 9 marca 2017r. o systemie monitorowania drogowego i kolejowego przewozu towarów (Dz. U. poz. 708, z późn. zm.)
    </xs:documentation>
    <xs:documentation source="doc" xml:lang="en">
      SENT420 - DOWNLOAD OF THE CARRIAGE NOTIFICATION HISTORY
    </xs:documentation>
    <xs:documentation source="doc" xml:lang="en">
      Legal basis: Act of 9 March 2017 on the road and rail transport monitoring system (Journal of Laws, item 708, with subsequest amendments)
    </xs:documentation>
  </xs:annotation>
  <xs:element name="SENT_420">
    <xs:annotation>
      <xs:documentation source="doc" xml:lang="pl">
        Element główny komunikatu
      </xs:documentation>
      <xs:documentation source="doc" xml:lang="en">
        Main element of the message
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="SentNumber" type="tp:SentNumber" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              Numer referencyjny zgłoszenia
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              Carriage notification number
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="SentId" type="xs:string" minOccurs="0" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              SENT ID
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              SENT ID
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="KeyNumber" type="tp:GenericKey" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              Klucz autoryzacyjny przypisany do zgłoszenia przewozu
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              Authorisation key assigned to the notification of the carriage
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="HistoryType" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              Sposób prezentacji historii
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              Type of history presentation
            </xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:integer">
              <xs:enumeration value="1">
                <xs:annotation>
                  <xs:documentation source="doc" xml:lang="pl">
                    1-Pobranie listy dostępnych wersji danego zgłoszenia
                  </xs:documentation>
                  <xs:documentation source="doc" xml:lang="en">
                    1-Download the list of the available version of the notification
                  </xs:documentation>
                </xs:annotation>
              </xs:enumeration>
              <xs:enumeration value="2">
                <xs:annotation>
                  <xs:documentation source="doc" xml:lang="pl">
                    2-Pobranie konkretnej wersji zgłoszenia
                  </xs:documentation>
                  <xs:documentation source="doc" xml:lang="en">
                    2-Download the selected version of the notification
                  </xs:documentation>
                </xs:annotation>
              </xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="DocumentId" type="tp:DocumentSelfNumber" minOccurs="0" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              Numer własny dokumentu
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              Own document number
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="ResponseAddress" type="tp:ResponseAddress"  minOccurs="0" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              Kanały komunikacji zwrotnej
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              Feedback communication channel
            </xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element name="Statements" type="tp:Statements" minOccurs="1" maxOccurs="1">
          <xs:annotation>
            <xs:documentation source="doc" xml:lang="pl">
              Oświadczam, że posiadam upoważnienie do złożenia niniejszego zgłoszenia w imieniu i na rzecz podmiotu zobowiązanego
            </xs:documentation>
            <xs:documentation source="doc" xml:lang="en">
              I declare that I am authorized to submit this notification for and on behalf of the obligated entity
            </xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>