MConnect · Catalog Semantic (mock)
Schimb de date guvernamental — mimează semantic.gov.md · servicii SOAP/REST cu date fake coerente
Catalog › Interpelări › GetEMPOLDEP19DeclarationsByPeriod

GetEMPOLDEP19DeclarationsByPeriod Interpelări

GetEMPOLDEP19DeclarationsByPeriod · rev. 1.0.1 · categorii: Mediu, Economie și Finanțe, Documente

Interpelarea “GetEMPOLDEP19DeclarationsByPeriod” returnează lista numerelor formularelor EMPOLDEP19 pentru perioada indicată

SOAP · GetEMPOLDEP19DeclarationsByPeriod(From: Date, To: Date) : EMPOLDEP19Declarations

Date de intrare — Request

CâmpTipOblig.ExempluDescriere
FromDateDa2018-01-10Începutul perioadei (de la)
ToDateDa2028-05-08Sfârșitul perioadei (până la)

Date de intrare — RequestHeaders

CâmpTipOblig.ExempluDescriere
CallingUserstring(13)DaNumărul de identificare (IDNP) al utilizatorului sau identificatorul (ID-ul) sistemului care procesează datele cu caracter personal
CallingEntitystring(13)DaNumărul de identificare (IDNO) al persoanei juridice din care face parte utilizatorul care procesează datele cu caracter personal, sau care gestionează sistemul informațional
CallBasisstring(256)DaTemeiul legal al apelului
CallReasonstring(512)DaScopul legal al apelului

Date de ieșire — Response

CâmpTipOblig.ExempluDescriere
EMPOLDEP19DeclarationsobjectDate privind formularele EMPOLDEP19 pentru perioada indicată
· EMPOLDEP19Declarationsarray<object>DaDate privind formularele EMPOLDEP19 pentru perioada indicată
·· DeclarationNumberstringDaAB909718Numărul declarației

Exemple de apel SOAP

Apel reușit
Cerere validă cu RequestHeaders complete → date sample.

Cerere

curl -X POST https://mconnect.evisoft.com/ConsumerService.svc \
  -H 'Content-Type: text/xml; charset=utf-8' \
  -H 'SOAPAction: http://mconnect.gov.md/consumer/GetEMPOLDEP19DeclarationsByPeriod' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetEMPOLDEP19DeclarationsByPeriod xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <From>2018-01-10</From>
        <To>2028-05-08</To>
      </Request>
      <RequestHeaders>
        <CallingUser>2000000000001</CallingUser>
        <CallingEntity>1002600024777</CallingEntity>
        <CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
        <CallReason>Prestare serviciu public</CallReason>
      </RequestHeaders>
    </GetEMPOLDEP19DeclarationsByPeriod>
  </soap:Body>
</soap:Envelope>'

Răspuns

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetEMPOLDEP19DeclarationsByPeriodResponse xmlns="http://mconnect.gov.md/consumer">
      <Response>
        <EMPOLDEP19Declarations>
          <EMPOLDEP19Declarations>
            <DeclarationNumber>AB872497</DeclarationNumber>
          </EMPOLDEP19Declarations>
        </EMPOLDEP19Declarations>
      </Response>
    </GetEMPOLDEP19DeclarationsByPeriodResponse>
  </soap:Body>
</soap:Envelope>
Eroare: lipsesc RequestHeaders
Fără CallingUser/CallingEntity → fault (headerele MConnect sunt obligatorii).

Cerere

curl -X POST https://mconnect.evisoft.com/ConsumerService.svc \
  -H 'Content-Type: text/xml; charset=utf-8' \
  -H 'SOAPAction: http://mconnect.gov.md/consumer/GetEMPOLDEP19DeclarationsByPeriod' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetEMPOLDEP19DeclarationsByPeriod xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <From>2017-08-08</From>
        <To>2026-01-08</To>
      </Request>
    </GetEMPOLDEP19DeclarationsByPeriod>
  </soap:Body>
</soap:Envelope>'

Răspuns (fault)

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Missing RequestHeaders: CallingUser and CallingEntity are required by MConnect.</faultstring>
      <detail>
        <MConnectFault xmlns="http://mconnect.gov.md/consumer">
          <Code>Client</Code>
          <Message>Missing RequestHeaders: CallingUser and CallingEntity are required by MConnect.</Message>
        </MConnectFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

WSDL: /ConsumerService.svc?singleWsdl · REST: /rest/GetEMPOLDEP19DeclarationsByPeriod