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

GetEMPOLDEP17DeclarationsByPeriod Interpelări

GetEMPOLDEP17DeclarationsByPeriod · rev. 1.0.0 · categorii: Mediu, Documente, Economie și Finanțe

Interpelarea “GetEMPOLDEP17DeclarationsByPeriod” returnează lista numerelor formularelor EMPOLDEP17 pentru perioada indicată

SOAP · GetEMPOLDEP17DeclarationsByPeriod(From: Date, To: Date) : EMPOLDEP17Declarations

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
EMPOLDEP17DeclarationsobjectDate privind formularele EMPOLDEP17 pentru perioada indicată
· EMPOLDEP17Declarationsarray<object>DaDate privind formularele EMPOLDEP17 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/GetEMPOLDEP17DeclarationsByPeriod' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetEMPOLDEP17DeclarationsByPeriod 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>
    </GetEMPOLDEP17DeclarationsByPeriod>
  </soap:Body>
</soap:Envelope>'

Răspuns

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetEMPOLDEP17DeclarationsByPeriodResponse xmlns="http://mconnect.gov.md/consumer">
      <Response>
        <EMPOLDEP17Declarations>
          <EMPOLDEP17Declarations>
            <DeclarationNumber>AB872497</DeclarationNumber>
          </EMPOLDEP17Declarations>
        </EMPOLDEP17Declarations>
      </Response>
    </GetEMPOLDEP17DeclarationsByPeriodResponse>
  </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/GetEMPOLDEP17DeclarationsByPeriod' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetEMPOLDEP17DeclarationsByPeriod xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <From>2017-03-14</From>
        <To>2028-12-01</To>
      </Request>
    </GetEMPOLDEP17DeclarationsByPeriod>
  </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/GetEMPOLDEP17DeclarationsByPeriod