E-Sprawozdania
API Endpoint
https://e-sprawozdania.mf.gov.pl/dmz/api/esprOpis
Niniejszy dokument opisuje usługę e-Sprawozdnia Finansowe, która umożliwia przekazanie w formie elektronicznej sprawozdań przez podmioty zobligowane do ich składania. API systemu e-Sprawozdania zostało zrealizowane według wzorca REST.
Adresy
Komunikacja polega na wysłaniu żądania HTTP pod adres:
Środowisko produkcyjne: https://e-sprawozdania.mf.gov.pl/dmz/api/espr/
Środowisko testowe: https://e-sprawozdania-tst.mf.gov.pl/dmz/api/espr/
Specyfikacja
W ramach pełnej realizacji procesu składania e-sprawozdania metody dostarczane przez usługę powinny być wywoływane w określonej kolejności. Zachowanie sekwencji wywołani jest warunkiem koniecznym dla prawidłowego obsłużenia proces składani e-Sprawozdań Finansowych. W sytuacji gdy rozpoczynamy składanie sprawozdania, należy w pierwszej kolejności przygotować pakiet wysyłkowy w skład którego wchodzi:
-
Sprawozdanie w formacie XML zgodnym z opublikowanymi schematami XSD
-
Metrykę dokumentu zgodna ze schematem (sekcja załącznik: fileMetrics.xsd) w formie pliku o nazwie eSPR_metrics.xml
-
Paczkę ZIP powyższych plików (w oparciu algorytm deFlate)
-
Klucz symetryczny AES256 zgodny ze specyfikacją:
- Długość klucza Key Size 256 bits / 32 bytes
- Tryb szyfru Cipher Mode CBC (Chain Block Chaining)
- Dopełnienie Padding PKCS#7
- Rozmiar bloku Block Size 16 bytes
- Wektor inicjujący Initialization Vector 16 bytes
-
Zaszyfrowanie przygotwowanego ZIP-a powyższym kluczem.
-
Zaszyfrowanie klucza algorytmem RSA, zgodnym ze specyfikacją publicznym certyfikatem MF.
- Długość klucza Key Size 256 bits / 32 bytes
- Tryb szyfru Cipher Mode ECB (Electronic Codebook)
- Dopełnienie Padding PKCS#1
- Rozmiar bloku Block Size 256 bytes
Przygotowanie dokumentu XML zgodnego ze schematem (sekcja załącznik: initRequest.xsd)
Podpisanie powyższego dokumentu XML Profilem Zaufanym lub podpisem kwalifikowanym polskim albo europejskim zgodnie z algorytmem XAdES Basic Electronic Signature w postaci pliku XML zgodnego ze schematem http://www.w3.org/2000/09/xmldsig, w skrócie XAdES-BES w wersji Enveloped (podpis jako dodatkowy element ds:Signature w oryginalnym XML).
Przy podpisywaniu można dokonać transformacji obiektu podpisywanego zgodnie z kodowaniem http://www.w3.org/2000/09/xmldsig#base64. Funkcją skrótu wykorzystywaną w podpisie powinna być RSA-SHA256.
Następnie należy wywołać metodę init wykorzystując wcześniej przygotowany pakiet wysyłkowy. Aby przekazać załączniki należy wywołać metodę upload. Potwierdzenie zakończenia przekazywania należy wykonać przez wywołanie metody finish.
Po przekazaniu sprawozdania możliwe jest wywołanie metody status umożliwiającej sprawdzenie statusu dla złożonego sprawozdania i opcjonalnie pobranie UPO.
Odpowiedź na każde żądanie wysłane do API jest w formacie JSON.
Autoryzacja
Wywoływanie metod nie wymaga przekazania żadnych danych autoryzacyjnych. Sam proces autoryzacji odbywa się przez sprawdzenie podpisów elektronicznych które są dołączone do przekazanych danych w plikach xml. Podpisy muszą być przygotowane zgodnie ze standardem XAdES-BES.
Obsługa błędów
W sytuacji gdyby wywołanie metody zakończyło się błędem, zostanie przekazana odpowiedz w formacie json, np.:
{
"ServiceCode":"fd671f76-87e1-4ddf-b4ab-f50840ef1390",
"ServiceName":"status",
"Timestamp":1538393755167,
"ReferenceNumber":"223212212344124124",
"Exceptions":{
"Exception":[
{
"ExceptionCode":605,
"ExceptionDescription":"PARSE PROBLEM"
}
]
}
};
Zasoby ¶
Pierwszy etap INIT ¶
Metoda rozpoczynająca przekazywanie sprawozdania. Wywołanie tej metody jest wymagane. W metodzie tej należy przekazać podpisany plik xml zawierający wszystkie wymagane dane sprawozdania oraz listę referencji do wszystkich załączników które będą dołączone do sprawozdania
Headers
Content-Type: application/xml
Body
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svcInitRequest:InitRequest xmlns:svcInitRequest="http://request.init.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:svcTypes="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001">
<svcInitRequest:DocumentType>eSPR</svcInitRequest:DocumentType>
<svcInitRequest:Encryption>
<svcTypes:EncryptionKey algorithm="RSA" encoding="Base64" mode="ECB" padding="PKCS#1">jFnAjZNTr2bI1RAFZaWI0G8fLiWdr2IB6IMCawEoEoewwRLRJWAur25qYBHByjOvclI/+y6G4bJUQttbK0SjgrwWbItn5Uj4io8RGusq8488kmmln+RUkxaBx9DLjNIxzNiCsuFYIJ0CIBg/U0awE3Uv4/3UNYqhtP7kfP1NEm2tng/nyjZPFjsQz35ZrHo0onfCcaulN2BMe7qO14+vGxzemOXYyr8cuhvlGyGAzqFWiftPw7V6X8lEVxKoYY0OPp633h3YBSIXY4G6VA5mWNSChptf3xDdLY09UEiUl9jPrEfqkunwWPlXRa+ogdkSYg8CsGqHt/RHW/dBjPnMCw==</svcTypes:EncryptionKey>
<svcTypes:EncryptionAlgorithm block="16" mode="CBC" padding="PKCS#7" size="256"/>
<svcTypes:EncryptionInitializationVector bytes="16" encoding="Base64">D2mSHwJ5lD0BWszcS4KM1g==</svcTypes:EncryptionInitializationVector>
</svcInitRequest:Encryption>
<svcInitRequest:PackageSignature>
<svcInitRequest:Package CompressionType="zip" PackageType="single">eSPR_package.zip</svcInitRequest:Package>
<svcInitRequest:FileHash>
<svcTypes:HashSHA algorithm="SHA-256" encoding="Base64">l8NVtwfABGc9FT4VRuUP4CMaK5encFq0EHOFr/ehXpc=</svcTypes:HashSHA>
<svcTypes:HashMD5 algorithm="MD5" encoding="Base64">p+AEH+ZyywyRlJKdgsxZdw==</svcTypes:HashMD5>
<svcTypes:FileSize>4848</svcTypes:FileSize>
</svcInitRequest:FileHash>
<svcInitRequest:FileSignatureList>
<svcInitRequest:FileSignature>
<svcInitRequest:FileName>eSPR_package.zip.aes</svcInitRequest:FileName>
<svcInitRequest:FileHash>
<svcTypes:HashSHA algorithm="SHA-256" encoding="Base64">/w46mnGaZiy39mx8hvbFI5Sve6lr7tBT3SwHpNBZ3tE=</svcTypes:HashSHA>
<svcTypes:HashMD5 algorithm="MD5" encoding="Base64">mjB4RXAGmj8GlaDxwZOoMA==</svcTypes:HashMD5>
<svcTypes:FileSize>4864</svcTypes:FileSize>
</svcInitRequest:FileHash>
</svcInitRequest:FileSignature>
</svcInitRequest:FileSignatureList>
</svcInitRequest:PackageSignature>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="sigId_3309465799136">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="mainRefId_3309465816157" Type="" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>Z6R3MkUqckxXl6TPzRUmh7gBOkefjobyooorH0L5cHs=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#sigPropId_3309465818849">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>pC++ua25r6YjV6g7CJdLjgeKJaYcBJ56fIEPhuLkCMo=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue Id="sigValId_3309465812458">qVQ845BFLzzto6sLWr0IzZmPrcfP85JkdImxpxWaVhTWV9RK+WHb3mEvgEXoQdogPA2CGuGkArF9
y2jPZcFYrXhaXUfyolLPp696YQMI55ukPGxq0QSyal4yuksIzY8AiYQ3+Z+NcrTN2G0B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GEvf9FMB8GA1UdIwQYMBaA
FODHncjttsUwg6kCmIizlVtkr8oeMA0GCSqGSIb3DQEBCwUAA4ICAQAscsoPHLfEBjsXe0mmbBtN
i2yi9XjTW3c+Xn/3Lt8T2zIUhwZJ7iQjhzMpQgxl4DCPEJpvnooUUfBMMMqhYLqDEYfMJNrT+iSa
+//qpUbrD0kUyyaGSeb9g7aelnfKzYRpBXjzPikqdIpnT8u4+qrsG8fDJzhbiqrvh4YKsYzozlBY
inWF6he43k9fDAC3PNcJEu11F1VrjgqF+BnsfOUDV+Qa7OndJQh76Oa8Yj+d5rN2aIIMmTnxQdxf
ErSzBGakAoA7Ot4bJexz7lBeg/TPN7IMn9J8A/D35Xzr6eHMw2CfHgcjwqD0vmDn2lCEz92YJZY1
e8qhD5TEws8NxT+CXlDUAHSCOlFaXQVMFgnEVpV4iJM+rsIYw8BK9LzDlh5XJN75IqNQMJlvMERg
LbRVpiXPdZ7hJ4Lti7MD4OXiQ8tXsbSUOM5OAan4ygxkcbFEmJvVmfwAETl2nRgojOm2ILDW1eBo
yXOPw7LXEGuaTwdv0d9+z15U0rS5A6G0L0zFN5QT/BkTcbD+I1EhqIFchBc8EKoXt40mq46Bys67
efZ1r45aNGuwSvmwdSBgAuEM3nz6+YJaobvRWBAzIfUU2Al8C7xFflJP6lSu2pCaffhQwsg7kUcn
IhepJsQ2xX0rr3IP572ueZ562+ey9Mwa+tHhOVd2PmJn6fF8wzIDpg==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="#sigId_3309465799136">
<xades:SignedProperties Id="sigPropId_3309465818849">
<xades:SignedSignatureProperties>
<xades:SigningTime>2018-09-13T00:25:34+02:00</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>DZFtcQDVSsEZXB4ThTWTFXgtPyI=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=temp, OU=Apps, O=AKMF, L=Warsaw, ST=Maz, C=PL</ds:X509IssuerName>
<ds:X509SerialNumber>4096</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
<xades:SignedDataObjectProperties>
<xades:DataObjectFormat ObjectReference="#mainRefId_3309465816157">
<xades:MimeType>text/xml</xades:MimeType>
</xades:DataObjectFormat>
</xades:SignedDataObjectProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="sigId_3315441723546">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="mainRefId_3315441738625" Type="" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>Z6R3MkUqckxXl6TPzRUmh7gBOkefjobyooorH0L5cHs=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#sigPropId_3315441740583">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>xE8adyiMLk7MdtSA0vYtGYcJvqgmT3CcZDTQXbS873Y=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
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nqjzSSzKGZdO9cp0d3mtNwZIzXkXkvC1i6bI
AjF7FesCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0
ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFPUS+QshEVlFBsamOP1Vf8GEvf9FMB8GA1UdIwQYMBaA
FODHncjttsUwg6kCmIizlVtkr8oeMA0GCSqGSIb3DQEBCwUAA4ICAQAscsoPHLfEBjsXe0mmbBtN
i2yi9XjTW3c+Xn/3Lt8T2zIUhwZJ7iQjhzMpQgxl4DCPEJpvnooUUfBMMMqhYLqDEYfMJNrT+iSa
+//qpUbrD0kUyyaGSeb9g7aelnfKzYRpBXjzPikqdIpnT8u4+qrsG8fDJzhbiqrvh4YKsYzozlBY
inWF6he43k9fDAC3PNcJEu11F1VrjgqF+BnsfOUDV+Qa7OndJQh76Oa8Yj+d5rN2aIIMmTnxQdxf
ErSzBGakAoA7Ot4bJexz7lBeg/TPN7IMn9J8A/D35Xzr6eHMw2CfHgcjwqD0vmDn2lCEz92YJZY1
e8qhD5TEws8NxT+CXlDUAHSCOlFaXQVMFgnEVpV4iJM+rsIYw8BK9LzDlh5XJN75IqNQMJlvMERg
LbRVpiXPdZ7hJ4Lti7MD4OXiQ8tXsbSUOM5OAan4ygxkcbFEmJvVmfwAETl2nRgojOm2ILDW1eBo
yXOPw7LXEGuaTwdv0d9+z15U0rS5A6G0L0zFN5QT/BkTcbD+I1EhqIFchBc8EKoXt40mq46Bys67
efZ1r45aNGuwSvmwdSBgAuEM3nz6+YJaobvRWBAzIfUU2Al8C7xFflJP6lSu2pCaffhQwsg7kUcn
IhepJsQ2xX0rr3IP572ueZ562+ey9Mwa+tHhOVd2PmJn6fF8wzIDpg==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="#sigId_3315441723546">
<xades:SignedProperties Id="sigPropId_3315441740583">
<xades:SignedSignatureProperties>
<xades:SigningTime>2018-09-13T00:25:40+02:00</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>DZFtcQDVSsEZXB4ThTWTFXgtPyI=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=temp, OU=Apps, O=AKMF, L=Warsaw, ST=Maz, C=PL</ds:X509IssuerName>
<ds:X509SerialNumber>4096</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
<xades:SignedDataObjectProperties>
<xades:DataObjectFormat ObjectReference="#mainRefId_3315441738625">
<xades:MimeType>text/xml</xades:MimeType>
</xades:DataObjectFormat>
</xades:SignedDataObjectProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
</svcInitRequest:InitRequest>
Headers
Content-Type: application/json
Body
{
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Timestamp": 1541607785760,
"PackageSignature": {
"PackageName": "eSPR_package.zip",
"FileSignatureList": {
"FileSignature": {
"FileName": "eSPR_package.zip.aes",
"URL": "https://e-sprawozdania-tst.mf.gov.pl:443/dmz/api/espr/upload/6c97beadca3d4d5e9e9123c26eadb66b/40030e62-c5e6-4a08-a979-4b31182f04f6",
"Method": "PUT",
"HeaderEntry": [
{
"Key": "rn",
"Value": "6c97beadca3d4d5e9e9123c26eadb66b"
},
{
"Key": "fi",
"Value": "40030e62-c5e6-4a08-a979-4b31182f04f6"
}
]
}
}
}
}
INITPOST/init
Headers
Content-Type: application/xml
Body
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svcInitRequest:InitRequest xmlns:svcInitRequest="http://request.init.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:svcTypes="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001">
<svcInitRequest:DocumentType>eSPR</svcInitRequest:DocumentType>
<svcInitRequest:Encryption>
<svcTypes:EncryptionKey algorithm="RSA" encoding="Base64" mode="ECB" padding="PKCS#1">jFnAjZNTr2bI1RAFZaWI0G8fLiWdr2IB6IMCawEoEoewwRLRJWAur25qYBHByjOvclI/+y6G4bJUQttbK0SjgrwWbItn5Uj4io8RGusq8488kmmln+RUkxaBx9DLjNIxzNiCsuFYIJ0CIBg/U0awE3Uv4/3UNYqhtP7kfP1NEm2tng/nyjZPFjsQz35ZrHo0onfCcaulN2BMe7qO14+vGxzemOXYyr8cuhvlGyGAzqFWiftPw7V6X8lEVxKoYY0OPp633h3YBSIXY4G6VA5mWNSChptf3xDdLY09UEiUl9jPrEfqkunwWPlXRa+ogdkSYg8CsGqHt/RHW/dBjPnMCw==</svcTypes:EncryptionKey>
<svcTypes:EncryptionAlgorithm block="16" mode="CBC" padding="PKCS#7" size="256"/>
<svcTypes:EncryptionInitializationVector123 bytes="16" encoding="Base64">D2mSHwJ5lD0BWszcS4KM1g==</svcTypes:EncryptionInitializationVector123>
</svcInitRequest:Encryption>
<svcInitRequest:PackageSignature>
<svcInitRequest:Package CompressionType="zip" PackageType="single">eSPR_package.zip</svcInitRequest:Package>
<svcInitRequest:FileHash>
<svcTypes:HashSHA algorithm="SHA-256" encoding="Base64">l8NVtwfABGc9FT4VRuUP4CMaK5encFq0EHOFr/ehXpc=</svcTypes:HashSHA>
<svcTypes:HashMD5 algorithm="MD5" encoding="Base64">p+AEH+ZyywyRlJKdgsxZdw==</svcTypes:HashMD5>
<svcTypes:FileSize>4848</svcTypes:FileSize>
</svcInitRequest:FileHash>
<svcInitRequest:FileSignatureList>
<svcInitRequest:FileSignature>
<svcInitRequest:FileName>eSPR_package.zip.aes</svcInitRequest:FileName>
<svcInitRequest:FileHash>
<svcTypes:HashSHA algorithm="SHA-256" encoding="Base64">/w46mnGaZiy39mx8hvbFI5Sve6lr7tBT3SwHpNBZ3tE=</svcTypes:HashSHA>
<svcTypes:HashMD5 algorithm="MD5" encoding="Base64">mjB4RXAGmj8GlaDxwZOoMA==</svcTypes:HashMD5>
<svcTypes:FileSize>4864</svcTypes:FileSize>
</svcInitRequest:FileHash>
</svcInitRequest:FileSignature>
</svcInitRequest:FileSignatureList>
</svcInitRequest:PackageSignature>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="sigId_3309465799136">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="mainRefId_3309465816157" Type="" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>Z6R3MkUqckxXl6TPzRUmh7gBOkefjobyooorH0L5cHs=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#sigPropId_3309465818849">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>pC++ua25r6YjV6g7CJdLjgeKJaYcBJ56fIEPhuLkCMo=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue Id="sigValId_3309465812458">qVQ845BFLzzto6sLWr0IzZmPrcfP85JkdImxpxWaVhTWV9RK+WHb3mEvgEXoQdogPA2CGuGkArF9
y2jPZcFYrXhaXUfyolLPp696YQMI55ukPGxq0QSyal4yuksIzY8AiYQ3+Z+NcrTN2G0BN1Qh0HBI
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A1UdIwQYMBaA
FODHncjttsUwg6kCmIizlVtkr8oeMA0GCSqGSIb3DQEBCwUAA4ICAQAscsoPHLfEBjsXe0mmbBtN
i2yi9XjTW3c+Xn/3Lt8T2zIUhwZJ7iQjhzMpQgxl4DCPEJpvnooUUfBMMMqhYLqDEYfMJNrT+iSa
+//qpUbrD0kUyyaGSeb9g7aelnfKzYRpBXjzPikqdIpnT8u4+qrsG8fDJzhbiqrvh4YKsYzozlBY
inWF6he43k9fDAC3PNcJEu11F1VrjgqF+BnsfOUDV+Qa7OndJQh76Oa8Yj+d5rN2aIIMmTnxQdxf
ErSzBGakAoA7Ot4bJexz7lBeg/TPN7IMn9J8A/D35Xzr6eHMw2CfHgcjwqD0vmDn2lCEz92YJZY1
e8qhD5TEws8NxT+CXlDUAHSCOlFaXQVMFgnEVpV4iJM+rsIYw8BK9LzDlh5XJN75IqNQMJlvMERg
LbRVpiXPdZ7hJ4Lti7MD4OXiQ8tXsbSUOM5OAan4ygxkcbFEmJvVmfwAETl2nRgojOm2ILDW1eBo
yXOPw7LXEGuaTwdv0d9+z15U0rS5A6G0L0zFN5QT/BkTcbD+I1EhqIFchBc8EKoXt40mq46Bys67
efZ1r45aNGuwSvmwdSBgAuEM3nz6+YJaobvRWBAzIfUU2Al8C7xFflJP6lSu2pCaffhQwsg7kUcn
IhepJsQ2xX0rr3IP572ueZ562+ey9Mwa+tHhOVd2PmJn6fF8wzIDpg==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="#sigId_3309465799136">
<xades:SignedProperties Id="sigPropId_3309465818849">
<xades:SignedSignatureProperties>
<xades:SigningTime>2018-09-13T00:25:34+02:00</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>DZFtcQDVSsEZXB4ThTWTFXgtPyI=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=temp, OU=Apps, O=AKMF, L=Warsaw, ST=Maz, C=PL</ds:X509IssuerName>
<ds:X509SerialNumber>4096</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
<xades:SignedDataObjectProperties>
<xades:DataObjectFormat ObjectReference="#mainRefId_3309465816157">
<xades:MimeType>text/xml</xades:MimeType>
</xades:DataObjectFormat>
</xades:SignedDataObjectProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="sigId_3315441723546">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
<ds:Reference Id="mainRefId_3315441738625" Type="" URI="">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116">
<ds:XPath>not(ancestor-or-self::ds:Signature)</ds:XPath>
</ds:Transform>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>Z6R3MkUqckxXl6TPzRUmh7gBOkefjobyooorH0L5cHs=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#sigPropId_3315441740583">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>xE8adyiMLk7MdtSA0vYtGYcJvqgmT3CcZDTQXbS873Y=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue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dO9cp0d3mtNwZIzXkXkvC1i6bI
AjF7FesCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0
ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFPUS+QshEVlFBsamOP1Vf8GEvf9FMB8GA1UdIwQYMBaA
FODHncjttsUwg6kCmIizlVtkr8oeMA0GCSqGSIb3DQEBCwUAA4ICAQAscsoPHLfEBjsXe0mmbBtN
i2yi9XjTW3c+Xn/3Lt8T2zIUhwZJ7iQjhzMpQgxl4DCPEJpvnooUUfBMMMqhYLqDEYfMJNrT+iSa
+//qpUbrD0kUyyaGSeb9g7aelnfKzYRpBXjzPikqdIpnT8u4+qrsG8fDJzhbiqrvh4YKsYzozlBY
inWF6he43k9fDAC3PNcJEu11F1VrjgqF+BnsfOUDV+Qa7OndJQh76Oa8Yj+d5rN2aIIMmTnxQdxf
ErSzBGakAoA7Ot4bJexz7lBeg/TPN7IMn9J8A/D35Xzr6eHMw2CfHgcjwqD0vmDn2lCEz92YJZY1
e8qhD5TEws8NxT+CXlDUAHSCOlFaXQVMFgnEVpV4iJM+rsIYw8BK9LzDlh5XJN75IqNQMJlvMERg
LbRVpiXPdZ7hJ4Lti7MD4OXiQ8tXsbSUOM5OAan4ygxkcbFEmJvVmfwAETl2nRgojOm2ILDW1eBo
yXOPw7LXEGuaTwdv0d9+z15U0rS5A6G0L0zFN5QT/BkTcbD+I1EhqIFchBc8EKoXt40mq46Bys67
efZ1r45aNGuwSvmwdSBgAuEM3nz6+YJaobvRWBAzIfUU2Al8C7xFflJP6lSu2pCaffhQwsg7kUcn
IhepJsQ2xX0rr3IP572ueZ562+ey9Mwa+tHhOVd2PmJn6fF8wzIDpg==</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Target="#sigId_3315441723546">
<xades:SignedProperties Id="sigPropId_3315441740583">
<xades:SignedSignatureProperties>
<xades:SigningTime>2018-09-13T00:25:40+02:00</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>DZFtcQDVSsEZXB4ThTWTFXgtPyI=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=temp, OU=Apps, O=AKMF, L=Warsaw, ST=Maz, C=PL</ds:X509IssuerName>
<ds:X509SerialNumber>4096</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
</xades:SignedSignatureProperties>
<xades:SignedDataObjectProperties>
<xades:DataObjectFormat ObjectReference="#mainRefId_3315441738625">
<xades:MimeType>text/xml</xades:MimeType>
</xades:DataObjectFormat>
</xades:SignedDataObjectProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
</svcInitRequest:InitRequest>
Headers
Content-Type: application/json
Body
{
"ServiceCode": "7de3c601-28f9-4662-ad64-278839b5b668",
"ServiceName": "init",
"Timestamp": 1541608675254,
"ReferenceNumber": null,
"Exceptions": {
"Exception": [
{
"ExceptionCode": 601,
"ExceptionDescription": "BUSINESS SVC EXCEPTION Invalid init file semantics!"
}
]
}
}
INIT błędna składniaPOST/init
Headers
Content-Type: application/xml
Body
<ns:InitRequest xmlns:ns="http://request.init.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:ns1="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001">
<ns:DocumentType>eSPR</ns:DocumentType>
<ns:Encryption>
<ns1:EncryptionKey algorithm="RSA" mode="ECB" padding="PKCS#1" encoding="Base64">tokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentokentoke</ns1:EncryptionKey>
<ns1:EncryptionAlgorithm size="256" block="16" mode="CBC" padding="PKCS#7"/>
<ns1:EncryptionInitializationVector bytes="16" encoding="Base64">tokentokentokentokentoke</ns1:EncryptionInitializationVector>
</ns:Encryption>
<ns:PackageSignature>
<ns:Package PackageType="single" CompressionType="zip">package_name</ns:Package>
<ns:FileHash>
<ns1:HashSHA algorithm="SHA-256" encoding="Base64">tokentokentokentokentokentokentokentokentoke</ns1:HashSHA>
<ns1:HashMD5 algorithm="MD5" encoding="Base64">tokentokentokentokentoke</ns1:HashMD5>
<ns1:FileSize>100</ns1:FileSize>
</ns:FileHash>
<ns:FileSignatureList>
<ns:FileSignature>
<ns:FileName>filename</ns:FileName>
<ns:FileHash>
<ns1:HashSHA algorithm="SHA-256" encoding="Base64">tokentokentokentokentokentokentokentokentoke</ns1:HashSHA>
<ns1:HashMD5 algorithm="MD5" encoding="Base64">tokentokentokentokentoke</ns1:HashMD5>
<ns1:FileSize>100</ns1:FileSize>
</ns:FileHash>
</ns:FileSignature>
</ns:FileSignatureList>
</ns:PackageSignature>
</ns:InitRequest>
Headers
Content-Type: application/json
Body
{
"ServiceCode": "8e20bfec-a1ba-4074-8e7b-5ce5075ad5fe",
"ServiceName": "init",
"Timestamp": 1542721613760,
"ReferenceNumber": null,
"Exceptions": {
"Exception": [
{
"ExceptionCode": 601,
"ExceptionDescription": "BUSINESS SVC EXCEPTION Signatures missing or invalid!"
}
]
}
}
INIT brak lub nieprawidłowa sygnaturaPOST/init
Drugi etap UPLOAD ¶
Metoda umożliwiająca przekazanie załączników do sprawozdania. Parametry wywołania tej metody należy pobrać z odpowiedzi metody init. Maksymalna wielkość przekazanego załącznika z pomocą tej metody to 50MiB. Potwierdzenie prawidłowego przekazania danych odbywa się poprzez przekazania kodu 200 (http).
Headers
Content-Type: multipart/binary data
Headers
Content-Type: application/json
UPLOADPUT/upload/{REFERENCEID}/{FILEID}
- REFERENCEID
string
(required)nr referencyjny
- FILEID
string
(required)identyfikator pola
Headers
Content-Type: multipart/binary data
Headers
Content-Type: application/json
Body
{
"ServiceCode": "40c4a062-4cba-410f-a559-8df053e8e805",
"ServiceName": "upload",
"Timestamp": 1542808495705,
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Exceptions": {
"Exception": [
{
"ExceptionCode": 601,
"ExceptionDescription": "BUSINESS SVC EXCEPTION Invalid file hash."
}
]
}
}
UPLOAD błędny plikPUT/upload/{REFERENCEID}/{FILEID}
- REFERENCEID
string
(required)nr referencyjny
- FILEID
string
(required)identyfikator pola
Headers
Content-Type: multipart/binary data
Headers
Content-Type: application/json
Body
{
"ServiceCode": "b298082a-8efd-4849-b92f-f304fb37b9e6",
"ServiceName": "upload",
"Timestamp": 1542809772055,
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Exceptions": {
"Exception": [
{
"ExceptionCode": 607,
"ExceptionDescription": "RUNTIME PROBLEM - maxLength exceeded (4864 < 7193)"
}
]
}
}
UPLOAD zbyt duży plikPUT/upload/{REFERENCEID}/{FILEID}
- REFERENCEID
string
(required)nr referencyjny
- FILEID
string
(required)identyfikator pola
Headers
Content-Type: multipart/binary data
Headers
Content-Type: application/json
Body
{
"ServiceCode": "51785092-5c48-43b7-a6ab-10c4c9497b3a",
"ServiceName": "upload",
"Timestamp": 1542879353837,
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Exceptions": {
"Exception": [
{
"ExceptionCode": 602,
"ExceptionDescription": "TECHNICAL SVC EXCEPTION Invalid status [-1]!"
}
]
}
}
UPLOAD plik już był dostarczonyPUT/upload/{REFERENCEID}/{FILEID}
- REFERENCEID
string
(required)nr referencyjny
- FILEID
string
(required)identyfikator pola
Trzeci etap FINISH ¶
Metoda służąca do potwierdzenia zakończenia procesu składania sprawozdań. Wywołanie tej metody jest wymagane. Po wywołaniu tej metody możliwe będzie sprawdzenie status przekazanego sprawozdania.
Headers
Content-Type: application/xml
Body
<?xml version="1.0"?>
<svcFinishRequest:FinishRequest xmlns:svcTypes="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:svcFinishRequest="http://request.finish.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001">
<svcFinishRequest:ReferenceNumber>6c97beadca3d4d5e9e9123c26eadb66b</svcFinishRequest:ReferenceNumber>
<svcFinishRequest:PackageSignature>
<svcFinishRequest:PackageName>eSPR_package.zip</svcFinishRequest:PackageName>
<svcFinishRequest:FileSignatureList>
<svcFinishRequest:FileSignature>
<svcFinishRequest:FileName>eSPR_package.zip.aes</svcFinishRequest:FileName>
</svcFinishRequest:FileSignature>
</svcFinishRequest:FileSignatureList>
</svcFinishRequest:PackageSignature>
</svcFinishRequest:FinishRequest>
Headers
Content-Type: application/json
Body
{
"ReferenceNumber": "71f55e44c1204d5e91f41d8d79c28939",
"Timestamp": 1542799596784
}
FINISHPOST/finish
Headers
Content-Type: application/xml
Body
<?xml version="1.0"?>
<svcFinishRequest:FinishRequest xmlns:svcTypes="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:svcFinishRequest="http://request.finish.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001">
<svcFinishRequest:ReferenceNumber>6c97beadca3d4d5e9e9123c26eadb66b</svcFinishRequest:ReferenceNumber>
<svcFinishRequest:PackageSignature>
<svcFinishRequest:PackageName>eSPR_package.zip</svcFinishRequest:PackageName>
<svcFinishRequest:FileSignatureList>
<svcFinishRequest:FileSignature>
<svcFinishRequest:FileName>eSPR_package.zip.aes</svcFinishRequest:FileName>
</svcFinishRequest:FileSignature>
</svcFinishRequest:FileSignatureList>
</svcFinishRequest:PackageSignature>
</svcFinishRequest:FinishRequest>
Headers
Content-Type: application/json
Body
{
"ServiceCode": "a911a507-ac12-46c5-be40-e950c52e0036",
"ServiceName": "finish",
"Timestamp": 1542799714940,
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Exceptions": {
"Exception": [
{
"ExceptionCode": 601,
"ExceptionDescription": "BUSINESS SVC EXCEPTION No match found!"
}
]
}
}
FINISH błedny ReferenceNumberPOST/finish
Headers
Content-Type: application/xml
Body
<?xml version="1.0"?>
<svcFinishRequest:FinishRequest xmlns:svcTypes="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:svcFinishRequest="http://request.finish.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001">
<svcFinishRequest:ReferenceNumber>6c97beadca3d4d5e9e9123c26eadb66b</svcFinishRequest:ReferenceNumber>
</svcFinishRequest:FinishRequest>
Headers
Content-Type: application/json
Body
{
"ServiceCode": "622f66f8-34a2-419e-ba69-8741cecc04eb",
"ServiceName": "finish",
"Timestamp": 1542799857463,
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Exceptions": {
"Exception": [
{
"ExceptionCode": 605,
"ExceptionDescription": "PARSE PROBLEM"
}
]
}
}
FINISH błedna struktura xmlPOST/finish
Dowolny moment STATUS ¶
Metoda służąca do pobierania informacji o statusie złożonego sprawozdania. Wywołanie tej metody jest opcjonalne. Metoda ta zwraca także UPO w sytuacji gdy proces składania i weryfikacji danych (w tym podpisów pod plikami XML) się powiódł.
Headers
Content-Type: application/json
Body
{
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Timestamp": 1542799212008,
"Code": 120,
"Details": "Sesja została rozpoczęta",
"UPO": null
}
STATUS sesja rozpoczętaGET/status/{REFERENCEID}
- REFERENCEID
string
(required)nr referencyjny
Headers
Content-Type: application/json
Body
{
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Timestamp": 1542800047887,
"Code": 410,
"Details": "Weryfikacja podpisów - błąd",
"UPO": null
}
STATUS sesja zakończona błędem weryfikacjiGET/status/{REFERENCEID}
- REFERENCEID
string
(required)nr referencyjny
Headers
Content-Type: application/json
Body
{
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Timestamp": 1542878589947,
"Code": 121,
"Details": "Pliki zostały przesłane",
"UPO": null
}
STATUS pliki przesłaneGET/status/{REFERENCEID}
- REFERENCEID
string
(required)nr referencyjny
Headers
Content-Type: application/json
Body
{
"Details": "Przetwarzanie zakończone. Wygenerowane UPO.",
"UPO": {
"encoding": "Base64",
"value": "PD94...=="
},
"ReferenceNumber": "6c97beadca3d4d5e9e9123c26eadb66b",
"Timestamp": 1538393565776,
"Code": 200
}
STATUS wszystko okGET/status/{REFERENCEID}
- REFERENCEID
string
(required)nr referencyjny
XSD schema ¶
FileMetrics.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:meta="http://meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:types="http://types.meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" targetNamespace="http://meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="PL">
<xs:import namespace="http://types.meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" schemaLocation="types/metricsTypes.xsd"/>
<xs:element name="Metryka">
<xs:complexType>
<xs:sequence>
<xs:element name="NumerIdentyfikacyjnyNIP" type="types:NIPType" minOccurs="1" maxOccurs="1"/>
<xs:element name="NumerIdentyfikacyjnyREGON" type="types:REGONType" minOccurs="0" maxOccurs="1"/>
<xs:element name="NazwaPodmiotu" type="types:NazwaPodmiotuBase" minOccurs="1" maxOccurs="1"/>
<xs:element name="DataSporzadzenia" type="types:DataCzasType" minOccurs="1" maxOccurs="1"/>
<xs:element name="DataWyslania" type="types:DataCzasType" minOccurs="1" maxOccurs="1"/>
<xs:element name="DataOd" type="types:DataType" minOccurs="1" maxOccurs="1"/>
<xs:element name="DataDo" type="types:DataType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Adres" type="types:AdresPolskiType" minOccurs="0" maxOccurs="1"/>
<xs:element name="ListaPlikow" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="MetrykaPliku" type="MetrykaPlikuBase" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="ListaPlikowUnique1">
<xs:selector xpath="meta:MetrykaPliku"/>
<xs:field xpath="meta:NazwaPliku"/>
</xs:unique>
</xs:element>
<xs:element name="ListaOsobPodpisujacaych" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="OsobaPodpiujaca" type="OsobaPodpiujacaType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="MetrykaPlikuBase" abstract="true">
<xs:sequence>
<xs:element name="NazwaPliku" type="types:NazwaPlikuType" minOccurs="1" maxOccurs="1"/>
<xs:element name="SkrotPliku" type="types:SkrotPlikuType" minOccurs="1" maxOccurs="1"/>
<xs:element name="TypDokumentu" type="types:TypDokumentuType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="MetrykaPlikuSprBase" abstract="true">
<xs:complexContent>
<xs:restriction base="MetrykaPlikuBase">
<xs:sequence>
<xs:element name="NazwaPliku" type="types:NazwaPlikuType" minOccurs="1" maxOccurs="1"/>
<xs:element name="SkrotPliku" type="types:SkrotPlikuType" minOccurs="1" maxOccurs="1"/>
<xs:element name="TypDokumentu" type="types:TypDokumentuType" fixed="SprawozdanieFinansowe" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="MetrykaPlikuXMLType">
<xs:complexContent>
<xs:extension base="MetrykaPlikuSprBase">
<xs:sequence>
<xs:element name="SkrotPodpisanegoPliku" type="types:SkrotPlikuType" minOccurs="1" maxOccurs="1"/>
<xs:element name="NazwaSchemy" type="types:String128Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="PrzestrzenNazw" type="types:String512Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="KodSprawozdania" type="types:String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="KodSystemowy" type="types:String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="WersjaSchemy" type="types:String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="WariantSprawozdania" type="types:NonZeroIntType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="MetrykaPlikuInnyType">
<xs:complexContent>
<xs:extension base="MetrykaPlikuBase">
<xs:sequence>
<xs:element name="TypPliku" type="types:String128Type" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="OsobaPodpiujacaType">
<xs:sequence>
<xs:element name="Nazwa" type="types:String128Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="Podpis" type="types:TakNieType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Odmowa" type="types:TakNieType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
MetricsTypes.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://types.meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:types="http://types.meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" targetNamespace="http://types.meta.gtw.espr.apps.akmf.pl/2018/07/31/0001" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="PL">
<xs:simpleType name="NIPType">
<xs:restriction base="xs:string">
<xs:pattern value="[1-9]((\d[1-9])|([1-9]\d))\d{7}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="REGONType">
<xs:restriction base="xs:string">
<xs:pattern value="(\d{9})|(\d{14})"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TypDokumentuType">
<xs:restriction base="xs:string">
<xs:enumeration value="SprawozdanieFinansowe"/>
<xs:enumeration value="OpiniaBieglegoRewidentaSprawozdaniaFInansowego"/>
<xs:enumeration value="UchwalaZatwierdzajacaSprawozdanie"/>
<xs:enumeration value="UchwalaOPodzialeZyskuLubStraty"/>
<xs:enumeration value="SprawozdanieZDzialalnosci"/>
<xs:enumeration value="SprawozdaniePlatnosciNaRzeczAdministracjiPublicznej"/>
<xs:enumeration value="SprawozdanieSkonsolidowaneRoczne"/>
<xs:enumeration value="OpiniaBieglegoRewidentaSkonsolidowanegoSprawozdania"/>
<xs:enumeration value="UchwalaZatwierdzajacaSkonsolidowanegoSprawozdania"/>
<xs:enumeration value="SprawozdanieZDzialalnosciJednostkiDominujacej"/>
<xs:enumeration value="SprawozdanieSkonsolidowaneZPlatnosciNaRzeczAdministracji"/>
<xs:enumeration value="InformacjaOBrakuObowizkuSparzadzeniaSprawozdaniaROcznego"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NazwaPlikuType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z0-9_\.\-]{5,100}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="RozmiarPlikuType">
<xs:restriction base="xs:integer">
<xs:minExclusive value="0"/>
<xs:maxInclusive value="104857600"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="SkrotPlikuType">
<xs:sequence>
<xs:element name="HashSHA" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="HashSHAType">
<xs:minLength value="44"/>
<xs:maxLength value="44"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="HashMD5" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="HashMD5Type">
<xs:minLength value="24"/>
<xs:maxLength value="24"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="RozmiarPliku" type="RozmiarPlikuType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="HashSHAType">
<xs:simpleContent>
<xs:extension base="xs:token">
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="HashMD5Type">
<xs:simpleContent>
<xs:extension base="xs:token">
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="RokMiesiacType">
<xs:restriction base="xs:gYearMonth">
<xs:minInclusive value="2017-01"/>
<xs:maxInclusive value="2999-12"/>
<xs:pattern value="((\d{4})-(\d{2}))"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DataType">
<xs:restriction base="xs:date">
<xs:minInclusive value="2017-01-01"/>
<xs:maxInclusive value="2999-12-31"/>
<xs:pattern value="((\d{4})-(\d{2})-(\d{2}))"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="DataCzasType">
<xs:restriction base="xs:dateTime">
<xs:whiteSpace value="collapse"/>
<xs:minInclusive value="2017-01-01T00:00:00Z"/>
<xs:maxInclusive value="2999-12-31T23:59:59Z"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Firma">
<xs:complexContent>
<xs:extension base="NazwaPodmiotuBase">
<xs:sequence>
<xs:element name="NazwaFirmy">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="2"/>
<xs:maxLength value="200"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="Osoba">
<xs:complexContent>
<xs:extension base="NazwaPodmiotuBase">
<xs:sequence>
<xs:element name="Imie">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="2"/>
<xs:maxLength value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Nazwisko">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="2"/>
<xs:maxLength value="100"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="NazwaPodmiotuBase" abstract="true"/>
<xs:complexType name="AdresPolskiType">
<xs:sequence>
<xs:element name="KodKraju" type="KodKrajuType" fixed="PL" minOccurs="1" maxOccurs="1"/>
<xs:element name="Wojewodztwo" type="String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="Powiat" type="String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="Gmina" type="String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="Ulica" type="String128Type" minOccurs="0" maxOccurs="1"/>
<xs:element name="NrDomu" type="String16Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="NrLokalu" type="String16Type" minOccurs="0" maxOccurs="1"/>
<xs:element name="Miejscowosc" type="String64Type" minOccurs="1" maxOccurs="1"/>
<xs:element name="KodPocztowy" type="KodPocztowyType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Poczta" type="String64Type" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="TakNieType">
<xs:restriction base="xs:string">
<xs:enumeration value="Tak"/>
<xs:enumeration value="Nie"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="KodKrajuType">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Z]{2}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="KodPocztowyType">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{2}-[0-9]{3}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String16Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="16"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String32Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String64Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String128Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="128"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String512Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="512"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="NonZeroIntType">
<xs:restriction base="xs:int">
<xs:minExclusive value="0"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
InitRequest.xsd
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://request.init.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:request.init="http://request.init.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:types="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" targetNamespace="http://request.init.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="PL">
<xs:import namespace="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" schemaLocation="types/gtwTypes.xsd"/>
<xs:element name="InitRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="DocumentType" type="types:DocumentTypeType" minOccurs="1" maxOccurs="1"/>
<xs:element name="Encryption" type="types:EncryptionType" minOccurs="1" maxOccurs="1"/>
<xs:element name="PackageSignature" type="PackageSignatureType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="PackageSignatureType">
<xs:sequence>
<xs:element name="Package" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="types:PackageNameType">
<xs:attribute name="PackageType" type="types:PackageTypeType" use="required"/>
<xs:attribute name="CompressionType" type="types:CompressionTypeType" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="FileHash" type="types:FileHashType" minOccurs="1" maxOccurs="1"/>
<xs:element name="FileSignatureList" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="FileSignature" type="FileSignatureType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="FileSignatureUnique">
<xs:selector xpath="request.init:FileSignature"/>
<xs:field xpath="request.init:FileName"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FileSignatureType">
<xs:sequence>
<xs:element name="FileName" type="types:FileNameType" minOccurs="1" maxOccurs="1"/>
<xs:element name="FileHash" type="types:FileHashType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
FinishRequest.xsd
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://request.finish.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:request.finish="http://request.finish.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:types="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" targetNamespace="http://request.finish.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="PL">
<xs:import namespace="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" schemaLocation="types/gtwTypes.xsd"/>
<xs:element name="FinishRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="ReferenceNumber" type="types:ReferenceNumberType" minOccurs="1" maxOccurs="1"/>
<xs:element name="PackageSignature" type="PackageSignatureType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="PackageSignatureType">
<xs:sequence>
<xs:element name="PackageName" type="types:PackageNameType" minOccurs="1" maxOccurs="1"/>
<xs:element name="FileSignatureList" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:sequence>
<xs:element name="FileSignature" type="FileSignatureType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:unique name="FileSignatureUnique">
<xs:selector xpath="request.finish:FileSignature"/>
<xs:field xpath="request.finish:FileName"/>
</xs:unique>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="FileSignatureType">
<xs:sequence>
<xs:element name="FileName" type="types:FileNameType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
GtwTypes.xsd
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" xmlns:types="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" targetNamespace="http://types.svc.gtw.espr.apps.akmf.pl/2018/07/31/0001" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="PL">
<xs:complexType name="ExceptionType">
<xs:sequence>
<xs:element name="ExceptionCode" type="IntegerPositiveType"/>
<xs:element name="ExceptionDescription" type="String256Type"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="HeaderEntryType">
<xs:sequence>
<xs:element name="Key" type="String64Type"/>
<xs:element name="Value" type="String128Type"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="MethodType">
<xs:restriction base="xs:string">
<xs:enumeration value="POST"/>
<xs:enumeration value="PUT"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="IntegerPositiveType">
<xs:restriction base="xs:integer">
<xs:minExclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String64Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String128Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="128"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="String256Type">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="256"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TimestampType">
<xs:restriction base="xs:dateTime">
<xs:whiteSpace value="collapse"/>
<xs:minInclusive value="2018-08-01T00:00:00Z"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="URLType">
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="512"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ServiceCodeType">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ServiceNameType">
<xs:restriction base="xs:string">
<xs:minLength value="0"/>
<xs:maxLength value="64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ReferenceNumberType">
<xs:restriction base="xs:string">
<xs:minLength value="32"/>
<xs:maxLength value="32"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="UPOType">
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="encoding" use="required" fixed="Base64"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="DocumentTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="eSPR"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PackageTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="single"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="CompressionTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="zip"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PackageNameType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z0-9_\.\-]{5,100}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FileNameType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-zA-Z0-9_\.\-]{5,100}"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="FileSizeType">
<xs:restriction base="xs:integer">
<xs:minExclusive value="0"/>
<xs:maxInclusive value="104857600"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="FileHashType">
<xs:sequence>
<xs:element name="HashSHA" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="HashSHAType">
<xs:minLength value="44"/>
<xs:maxLength value="44"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="HashMD5" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="HashMD5Type">
<xs:minLength value="24"/>
<xs:maxLength value="24"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="FileSize" type="FileSizeType" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="HashSHAType">
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="algorithm" use="required" fixed="SHA-256"/>
<xs:attribute name="encoding" use="required" fixed="Base64"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="HashMD5Type">
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="algorithm" use="required" fixed="MD5"/>
<xs:attribute name="encoding" use="required" fixed="Base64"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="EncryptionType">
<xs:sequence>
<xs:element name="EncryptionKey">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="EncryptionKeyRSAType">
<xs:minLength value="344"/>
<xs:maxLength value="344"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="EncryptionAlgorithm" type="EncryptionAlgorithmType"/>
<xs:element name="EncryptionInitializationVector">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="EncryptionInitializationVectorType">
<xs:minLength value="24"/>
<xs:maxLength value="24"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EncryptionKeyRSAType">
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="algorithm" use="required" fixed="RSA"/>
<xs:attribute name="mode" use="required" fixed="ECB"/>
<xs:attribute name="padding" use="required" fixed="PKCS#1"/>
<xs:attribute name="encoding" use="required" fixed="Base64"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="EncryptionAlgorithmType">
<xs:attribute name="size" type="xs:int" use="required" fixed="256"/>
<xs:attribute name="block" type="xs:int" use="required" fixed="16"/>
<xs:attribute name="mode" use="required" fixed="CBC"/>
<xs:attribute name="padding" use="required" fixed="PKCS#7"/>
</xs:complexType>
<xs:complexType name="EncryptionInitializationVectorType">
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="bytes" use="required" fixed="16"/>
<xs:attribute name="encoding" use="required" fixed="Base64"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:schema>
Generated by aglio on 22 Nov 2018