Tax Filing Service

<back to all web services

BatchProtokollRequest17

SyncDatenabholungVerarbeitungsprotokolleBatch

Represents the service request to retrieve logs about tax statements.

Requires Authentication
The following routes are available for this service:
POST/datenabholungen/protokolle/17/verarbeitungsprotokoll/batch
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


# @Api(Description="Represents a base class for a file with raw data.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class FileBase:
    """
    Represents a base class for a file with raw data.
    """

    # @ApiMember(Description="The raw data content of the file.", Name="Content")
    content: Optional[bytes] = None
    """
    The raw data content of the file.
    """


# @Api(Description="Represents a portal certificate that is protected by a password.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PortalCertificate(FileBase, ISecuredCertificate, IHasIndex):
    """
    Represents a portal certificate that is protected by a password.
    """

    # @ApiMember(Description="The unique identifier of the certificate.")
    id: Optional[str] = None
    """
    The unique identifier of the certificate.
    """


    # @ApiMember(Description="The position of the certificate element in an indexed collection of certificates.")
    index: int = 0
    """
    The position of the certificate element in an indexed collection of certificates.
    """


    # @StringLength(255)
    # @ApiMember(Description="The password to protect the certificate from unauthorized access.")
    pin: Optional[str] = None
    """
    The password to protect the certificate from unauthorized access.
    """


    # @StringLength(2147483647)
    # @ApiMember(Description="The description of the certificate.")
    description: Optional[str] = None
    """
    The description of the certificate.
    """


    # @ApiMember(Description="Tags that can be used to label or identify the certificate.")
    tags: Optional[List[str]] = None
    """
    Tags that can be used to label or identify the certificate.
    """


    # @ApiMember(Description="Gets or sets the file name of the certificate.")
    name: Optional[str] = None
    """
    Gets or sets the file name of the certificate.
    """


    # @ApiMember(Description="The raw data content of the file.", Name="Content")
    content: Optional[bytes] = None
    """
    The raw data content of the file.
    """


# @Api(Description="Represents a base service request to retrieve processing records from specified tax statements.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BatchProtokollRequestBase(IReturn[List[ProtokollResponse]], IPost):
    """
    Represents a base service request to retrieve processing records from specified tax statements.
    """

    # @ApiMember(Description="The authentification certificate.", IsRequired=true, Name="Zertifikat")
    zertifikat: Optional[PortalCertificate] = None
    """
    The authentification certificate.
    """
    @staticmethod
    def response_type(): return List[ProtokollResponse]


class Uebertragungsweg(str, Enum):
    """
    Represents the transmission path.
    """

    DIREKT = 'direkt'
    LINK = 'link'
    SAMMELLINK = 'sammellink'


# @Api(Description="The data packet from the retrieval operation.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Datenpaket:
    """
    The data packet from the retrieval operation.
    """

    # @ApiMember(Description="Encoded (compressed and encrypted) requested data record")
    value: Optional[str] = None
    """
    Encoded (compressed and encrypted) requested data record
    """


# @Api(Description="Represents the download of requested records. The downloaded content from the web server takes place: a) with https b) on port 443 c) on datenabholung1.elster.de or datenabholung2.elster.de. The HTTP Basic Authentication mechanism according to RFC 2617 is used for authentication.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Download:
    """
    Represents the download of requested records. The downloaded content from the web server takes place: a) with https b) on port 443 c) on datenabholung1.elster.de or datenabholung2.elster.de. The HTTP Basic Authentication mechanism according to RFC 2617 is used for authentication.
    """

    # @ApiMember(Description="The link to the data on the web server.")
    url: Optional[str] = None
    """
    The link to the data on the web server.
    """


    # @ApiMember(Description="The user name for the web server.")
    benutzer: Optional[str] = None
    """
    The user name for the web server.
    """


    # @ApiMember(Description="Password for the web server.")
    passwort: Optional[str] = None
    """
    Password for the web server.
    """


# @Api(Description="Represents the request to retrieve tax assessments by means of a specfied ID.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Abholung:
    """
    Represents the request to retrieve tax assessments by means of a specfied ID.
    """

    # @ApiMember(Description="The identifier of the data record.")
    id: Optional[str] = None
    """
    The identifier of the data record.
    """


    # @ApiMember(Description="The ID number of the receipt owner. This attribute is only required for the tax type 'ElsterVaStDaten'.")
    idnr: Optional[str] = None
    """
    The ID number of the receipt owner. This attribute is only required for the tax type 'ElsterVaStDaten'.
    """


    # @ApiMember(Description="The assessment year (YYYY) of the receipt. This attribute is only required for the tax type 'ElsterVaStDaten'.")
    veranlagungsjahr: Optional[int] = None
    """
    The assessment year (YYYY) of the receipt. This attribute is only required for the tax type 'ElsterVaStDaten'.
    """


    # @ApiMember(Description="The transmission path used.")
    uebertragungsweg: Optional[Uebertragungsweg] = None
    """
    The transmission path used.
    """


    # @ApiMember(Description="The character encoding of the data record (e.g. ISO-8859-15). The exception is the data type ElsterVaStDaten, here we submit KEIN ENCODING.")
    encoding: Optional[str] = None
    """
    The character encoding of the data record (e.g. ISO-8859-15). The exception is the data type ElsterVaStDaten, here we submit KEIN ENCODING.
    """


    # @ApiMember(Description="The client number; only applicable to the tax type 'ElsterDIVADaten'.")
    mandantennummer: Optional[str] = None
    """
    The client number; only applicable to the tax type 'ElsterDIVADaten'.
    """


    # @ApiMember(Description="The tax number; only applicable to the tax type 'ElsterDIVADaten'.")
    steuernummer: Optional[str] = None
    """
    The tax number; only applicable to the tax type 'ElsterDIVADaten'.
    """


    # @ApiMember(Description="The asessment date; only applicable to the tax type 'ElsterDIVADaten'.")
    bescheiddatum: Optional[datetime.datetime] = None
    """
    The asessment date; only applicable to the tax type 'ElsterDIVADaten'.
    """


    # @ApiMember(Description="Das Datenpaket angeforderter Datensaetze. Nur bei der Direktsendung ueber das ERiClet.")
    datenpaket: Optional[Datenpaket] = None
    """
    Das Datenpaket angeforderter Datensaetze. Nur bei der Direktsendung ueber das ERiClet.
    """


    # @ApiMember(Description="Download requested data records.  Ensure the second payload data block  is empty for bulk retrieval operations.")
    download: Optional[Download] = None
    """
    Download requested data records.  Ensure the second payload data block  is empty for bulk retrieval operations.
    """


class Steuerart(str, Enum):
    """
    Represents the various tax types for the retrieval of data.
    """

    ESB = 'ESB'
    GSB = 'GSB'
    USB = 'USB'
    EP_BESCHEID = 'EPBescheid'
    EP_MITTEILUNG = 'EPMitteilung'
    GEWERBESTEUERBESCHEID = 'Gewerbesteuerbescheid'
    GEWERBESTEUERMITTEILUNG = 'Gewerbesteuermitteilung'
    GEWMB = 'GEWMB'
    DIVA_ANZEIGE_EINER_LOTTERIE = 'DIVAAnzeigeEinerLotterie'
    DIVA_BESCHEID = 'DIVABescheid'
    DIVA_BESCHEID_E_ST = 'DivaBescheidESt'
    DIVA_BUCHMACHERSTEUER = 'DIVABuchmachersteuer'
    DIVA_LOTTERIESTEUER_EINMAL = 'DIVALotteriesteuerEinmal'
    DIVA_LOTTERIESTEUER_MEHR = 'DIVALotteriesteuerMehr'
    DIVA_SPORTWETTENSTEUER = 'DIVASportwettensteuer'
    DIVA_TOTALISATOR = 'DIVATotalisator'
    OZG_BESCHEID = 'OZGBescheid'
    VERBINDLICHE_AUSKUNFT = 'VerbindlicheAuskunft'
    VERBINDLICHE_ZUSAGE = 'VerbindlicheZusage'
    DIVA_SONSTIGER_V_A = 'DivaSonstigerVA'
    DIVA_BESCHEID_ERB_ST = 'DivaBescheidErbSt'
    DIVA_BESCHEID_F_E_I_N = 'DivaBescheidFEIN'
    DIVA_BESCHEID_GEW_ST = 'DivaBescheidGewSt'
    DIVA_BESCHEID_K_ST = 'DivaBescheidKSt'
    DIVA_BESCHEID_U_ST = 'DivaBescheidUSt'
    DIVA_BESCHEID_SCHENK_ST = 'DivaBescheidSchenkSt'
    DIVA_TRONCABGABE = 'DIVATroncabgabe'
    DIVA_VIRTUELLE_AUTOMATEN_ST_B = 'DIVAVirtuelleAutomatenStB'
    DIVA_ONLINE_POKER_ST_B = 'DIVAOnlinePokerStB'
    L_ST_H_V_V_M_R_M = 'LStHVVMRM'
    EINLAGENRUECKGEWAEHR_V_A = 'EinlagenrueckgewaehrVA'
    FTT_MELDUNG_V_A = 'FTTMeldungVA'
    STATUS_INV_ST_G_V_A = 'StatusInvStGVA'
    U_ST_V_E_U_V_A = 'UStVEUVA'
    VERSVA = 'VERSVA'
    ALT_ZERT_V_A = 'AltZertVA'
    KAP_E_ST_ENTLASTUNG_V_A = 'KapEStEntlastungVA'
    POST_U_D_L_V_A = 'PostUDLVA'
    ST_AB50A_V_A = 'StAb50aVA'
    ST_AB_ENTLASTUNG_V_A = 'StAbEntlastungVA'
    KASSENANGELEGENHEITEN_V_A = 'KassenangelegenheitenVA'
    K_ST_OPT_V_A = 'KStOptVA'
    STEUEROASENABWEHR_V_A = 'SteueroasenabwehrVA'
    KDB_VOLLMACHT_R_M = 'KDBVollmachtRM'
    STBKE = 'STBKE'
    VDBKDB_RUECKMELDUNG_LIEF = 'VDBKDBRueckmeldungLief'
    ANHANG_RUECKMELDUNG = 'AnhangRueckmeldung'
    DIVA_EINWILLIGUNG_R_M = 'DivaEinwilligungRM'
    GLUECKSPIEL_F = 'GlueckspielF'
    OZG_MITTEILUNG = 'OZGMitteilung'
    VERBINDLICHE_AUSKUNFT_INFO_F = 'VerbindlicheAuskunftInfoF'
    ELO_PROTOKOLL = 'ELOProtokoll'


class Coding(str, Enum):
    """
    Specifies the encoding of the metadata.
    """

    TEXT = 'text'
    BASE64 = 'base64'


# @Api(Description="Represents the metadata of a data record.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Meta17:
    """
    Represents the metadata of a data record.
    """

    # @ApiMember(Description="The type of metadata, e.g. datei [file]")
    name: Optional[str] = None
    """
    The type of metadata, e.g. datei [file]
    """


    # @ApiMember(Description="The encoding of the metadata (text or base64)")
    coding: Optional[Coding] = None
    """
    The encoding of the metadata (text or base64)
    """


    # @ApiMember(Description="The content of the metadata")
    value: Optional[str] = None
    """
    The content of the metadata
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MetaInfoMaps17:
    """
    Represents a list of meta information maps.
    """

    pass


# @Api(Description="Represents meta information.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MetaInformationen17:
    """
    Represents meta information.
    """

    # @ApiMember(Description="List of metadata.")
    meta: Optional[List[Meta17]] = None
    """
    List of metadata.
    """


    # @ApiMember(Description="List of meta infomation maps.")
    meta_info_maps: Optional[MetaInfoMaps17] = None
    """
    List of meta infomation maps.
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Anhaenge17:
    """
    Represents a list of attachments.
    """

    pass


# @Api(Description="Represents a request to retrieve data records by means of one or more IDs.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Abholung17(Abholung):
    """
    Represents a request to retrieve data records by means of one or more IDs.
    """

    # @ApiMember(Description="The tax type (e.g. ESB) of the data record.")
    steuerart: Optional[Steuerart] = None
    """
    The tax type (e.g. ESB) of the data record.
    """


    # @ApiMember(Description="The meta information of the identifier.")
    meta_informationen: Optional[MetaInformationen17] = None
    """
    The meta information of the identifier.
    """


    # @ApiMember(Description="Die Transfertickets der Datensaetze. Es duerfen max. 100 Bereitstellungstickets in einem Request angegeben werden.")
    bereitstellungsticket: Optional[str] = None
    """
    Die Transfertickets der Datensaetze. Es duerfen max. 100 Bereitstellungstickets in einem Request angegeben werden.
    """


    # @ApiMember(Description="The attachments of the data records.")
    anhaenge: Optional[Anhaenge17] = None
    """
    The attachments of the data records.
    """


    # @ApiMember(Description="The identifier of the data record.")
    id: Optional[str] = None
    """
    The identifier of the data record.
    """


    # @ApiMember(Description="The ID number of the receipt owner. This attribute is only required for the tax type 'ElsterVaStDaten'.")
    idnr: Optional[str] = None
    """
    The ID number of the receipt owner. This attribute is only required for the tax type 'ElsterVaStDaten'.
    """


    # @ApiMember(Description="The assessment year (YYYY) of the receipt. This attribute is only required for the tax type 'ElsterVaStDaten'.")
    veranlagungsjahr: Optional[int] = None
    """
    The assessment year (YYYY) of the receipt. This attribute is only required for the tax type 'ElsterVaStDaten'.
    """


    # @ApiMember(Description="The transmission path used.")
    uebertragungsweg: Optional[Uebertragungsweg] = None
    """
    The transmission path used.
    """


    # @ApiMember(Description="The character encoding of the data record (e.g. ISO-8859-15). The exception is the data type ElsterVaStDaten, here we submit KEIN ENCODING.")
    encoding: Optional[str] = None
    """
    The character encoding of the data record (e.g. ISO-8859-15). The exception is the data type ElsterVaStDaten, here we submit KEIN ENCODING.
    """


    # @ApiMember(Description="The client number; only applicable to the tax type 'ElsterDIVADaten'.")
    mandantennummer: Optional[str] = None
    """
    The client number; only applicable to the tax type 'ElsterDIVADaten'.
    """


    # @ApiMember(Description="The tax number; only applicable to the tax type 'ElsterDIVADaten'.")
    steuernummer: Optional[str] = None
    """
    The tax number; only applicable to the tax type 'ElsterDIVADaten'.
    """


    # @ApiMember(Description="The asessment date; only applicable to the tax type 'ElsterDIVADaten'.")
    bescheiddatum: Optional[datetime.datetime] = None
    """
    The asessment date; only applicable to the tax type 'ElsterDIVADaten'.
    """


    # @ApiMember(Description="Das Datenpaket angeforderter Datensaetze. Nur bei der Direktsendung ueber das ERiClet.")
    datenpaket: Optional[Datenpaket] = None
    """
    Das Datenpaket angeforderter Datensaetze. Nur bei der Direktsendung ueber das ERiClet.
    """


    # @ApiMember(Description="Download requested data records.  Ensure the second payload data block  is empty for bulk retrieval operations.")
    download: Optional[Download] = None
    """
    Download requested data records.  Ensure the second payload data block  is empty for bulk retrieval operations.
    """


# @Api(Description="Represents a base service request to retrieve processing records from specified tax statements. Applicable to version 17..")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BatchProtokollRequestBase17(BatchProtokollRequestBase):
    """
    Represents a base service request to retrieve processing records from specified tax statements. Applicable to version 17..
    """

    # @ApiMember(Description="The tax assessements, whose processing records shall be obtained.", Name="Bescheide")
    bescheide: Optional[List[Abholung17]] = None
    """
    The tax assessements, whose processing records shall be obtained.
    """


    # @ApiMember(Description="The authentification certificate.", IsRequired=true, Name="Zertifikat")
    zertifikat: Optional[PortalCertificate] = None
    """
    The authentification certificate.
    """


# @Api(Description="Represents the service request to retrieve logs about tax statements.")
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BatchProtokollRequest17(BatchProtokollRequestBase17):
    """
    Represents the service request to retrieve logs about tax statements.
    """

    # @ApiMember(Description="The tax assessements, whose processing records shall be obtained.", Name="Bescheide")
    bescheide: Optional[List[Abholung17]] = None
    """
    The tax assessements, whose processing records shall be obtained.
    """


    # @ApiMember(Description="The authentification certificate.", IsRequired=true, Name="Zertifikat")
    zertifikat: Optional[PortalCertificate] = None
    """
    The authentification certificate.
    """

Python BatchProtokollRequest17 DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /datenabholungen/protokolle/17/verarbeitungsprotokoll/batch HTTP/1.1 
Host: taxfiling.pwc.de 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"bescheide":[{"steuerart":"ESB","metaInformationen":{"meta":[{"name":"String","coding":"text","value":"String"}],"metaInfoMaps":[{"typ":"String","meta":[{"name":"String","coding":"text","value":"String"}]}]},"bereitstellungsticket":"String","anhaenge":[{"metadatenAnhang":[{"schluesselAnhang":{"dateibezeichnungID":"String","dateibezeichnungKurz":"String","value":"String"},"wertAnhang":{"dateibezeichnungID":"String","dateibezeichnungKurz":"String","value":"String"}}],"dateibezeichnung":"String","dateityp":"String","dateiinhalt":"String"}],"id":"String","idnr":"String","veranlagungsjahr":0,"uebertragungsweg":"direkt","encoding":"String","mandantennummer":"String","steuernummer":"String","bescheiddatum":"\/Date(-62135596800000-0000)\/","datenpaket":{"value":"String"},"download":{"url":"String","benutzer":"String","passwort":"String"}}],"zertifikat":{"id":"00000000000000000000000000000000","index":0,"pin":"String","description":"String","tags":["String"],"name":"String","content":"AA=="}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

[{"protokoll":{"version":0,"zeitStempel":"\/Date(-62135596800000-0000)\/","datenTeil":{"transferTicket":"String","code":0,"text":"String","nutzdatenbloecke":[{"nutzdatenTicket":"String","code":0,"text":"String","verarbeiteteNds":0,"nichtverarbeiteteNds":0,"ndSFehler":[{"lfdNr":"String","kmId":"String","ordnungsMerkmal":"String","fehlerNummer":0,"fehlerText":"String"}]}]}},"id":"String","index":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}]