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

GetDebts Interpelări

GetDebts · rev. 1.0.0 · categorii: Populație, Economie și Finanțe

Interpelarea ”GetDebts” are drept scop returnarea datelor despre datoriile contribuabilului față de bugetul public național

SOAP · GetDebts(IDNx: string) : Debts

Date de intrare — Request

CâmpTipOblig.ExempluDescriere
IDNxstring(13)Da2000000000001Numărul unic de identificare al persoanei juridice (IDNO) sau fizice (IDNP)

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
DebtsobjectDatorie față de bugetul public național
· Debtsarray<object>DaDatorie față de bugetul public național
·· BudgetintegerDa5Codul tipului de buget: 1 - Consolidat, 2 - Bugetul de stat, 3 - Bugetele unităților administrativ-teritoriale, 5 - Bugetul asigurărilor sociale de stat, 6 - Fondurile asigurărilor obligatorii de asistență medicală, 8 - …
·· TotalDebtnumberDa11.22Suma totală a restanței
·· BaseDebtnumberDa98.39Suma restanței la plăți de bază
·· PenaltyDebtnumberDa18.98Suma restanței la penalitate
·· FineDebtnumberDa8.31Suma restanței la amenzi

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/GetDebts' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetDebts xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNx>2000000000001</IDNx>
      </Request>
      <RequestHeaders>
        <CallingUser>2000000000001</CallingUser>
        <CallingEntity>1002600024777</CallingEntity>
        <CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
        <CallReason>Prestare serviciu public</CallReason>
      </RequestHeaders>
    </GetDebts>
  </soap:Body>
</soap:Envelope>'

Răspuns

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetDebtsResponse xmlns="http://mconnect.gov.md/consumer">
      <Response>
        <Debts>
          <Debts>
            <Budget>5</Budget>
            <TotalDebt>11.22</TotalDebt>
            <BaseDebt>98.39</BaseDebt>
            <PenaltyDebt>18.98</PenaltyDebt>
            <FineDebt>8.31</FineDebt>
          </Debts>
        </Debts>
      </Response>
    </GetDebtsResponse>
  </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/GetDebts' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetDebts xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNx>2000000000001</IDNx>
      </Request>
    </GetDebts>
  </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>
Eroare: subiect inexistent (IDNP …0000)
IDNP cu sufix …0000 → fault NotFound.

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/GetDebts' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetDebts xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNx>2000000000000</IDNx>
      </Request>
      <RequestHeaders>
        <CallingUser>2000000000001</CallingUser>
        <CallingEntity>1002600024777</CallingEntity>
        <CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
        <CallReason>Prestare serviciu public</CallReason>
      </RequestHeaders>
    </GetDebts>
  </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>No data found for the requested subject '2000000000000'.</faultstring>
      <detail>
        <MConnectFault xmlns="http://mconnect.gov.md/consumer">
          <Code>NotFound</Code>
          <Message>No data found for the requested subject '2000000000000'.</Message>
        </MConnectFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>
Eroare: eroare server (IDNP …0009)
IDNP cu sufix …0009 → fault ServerError.

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/GetDebts' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetDebts xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNx>2000000000009</IDNx>
      </Request>
      <RequestHeaders>
        <CallingUser>2000000000001</CallingUser>
        <CallingEntity>1002600024777</CallingEntity>
        <CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
        <CallReason>Prestare serviciu public</CallReason>
      </RequestHeaders>
    </GetDebts>
  </soap:Body>
</soap:Envelope>'

Răspuns (fault)

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server</faultcode>
      <faultstring>Simulated server error.</faultstring>
      <detail>
        <MConnectFault xmlns="http://mconnect.gov.md/consumer">
          <Code>ServerError</Code>
          <Message>Simulated server error.</Message>
        </MConnectFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

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