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

GetPatentsByIdnp Interpelări

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

Interpelarea “GetPatentsByIdnp” returnează lista patentelor de întreprinzător și datele aferente acestora ale persoanei fizice identificate în baza IDNP-ului, pentru perioada solicitată

SOAP · GetPatentsByIdnp(IDNP: string, From: Date, To: Date) : Patents

Date de intrare — Request

CâmpTipOblig.ExempluDescriere
IDNPstring(13)Da2000000000001Numărul unic de identificare al persoanei (IDNP). Poate lipsi, în cazul persoanelor care au renunțat la IDNP
FromDateDa2018-01-10Începutul perioadei pentru care se extrage lista de patente
ToDateDa2028-05-08Sfârșitul perioadei pentru care se extrage lista de patente

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
PatentsobjectDatele de identificare a patentei
· Patentsarray<object>DaDatele de identificare a patentei
·· NumberstringDaAB841377Numărul documentului în sistem
·· IDNPstringDa2000000000001Numărul unic de identificare (codul fiscal) al persoanei în a cărei privință a fost eliberată patenta de întreprinzător
·· NamestringSRL "Exemplu Grup"Numele și prenumele persoanei în a cărei privință a fost eliberată patenta de întreprinzător
·· SeriesNumberstringDaAB672096Seria și numărul patentei de întreprinzător
·· StartDateDateDa2019-01-21Data întocmirii patentei de întreprinzător
·· EndDateDate2026-09-25Data expirării patentei de întreprinzător
·· SubdivisionCodestringDaC355Codul subdiviziunii Serviciului Fiscal de Stat (SFS) care a eliberat patenta de întreprinzător
·· Activitiesarray<object>DaDate despre genurile de activitate
··· TypeintegerDa2Tipul genului de activitate
··· CodestringDaC425Codul genului de activitate conform clasificatorului

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/GetPatentsByIdnp' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPatentsByIdnp xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNP>2000000000001</IDNP>
        <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>
    </GetPatentsByIdnp>
  </soap:Body>
</soap:Envelope>'

Răspuns

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPatentsByIdnpResponse xmlns="http://mconnect.gov.md/consumer">
      <Response>
        <Patents>
          <Patents>
            <Number>AB841377</Number>
            <IDNP>2000000000001</IDNP>
            <Name>SRL "Exemplu Grup"</Name>
            <SeriesNumber>AB672096</SeriesNumber>
            <StartDate>2019-01-21</StartDate>
            <EndDate>2026-09-25</EndDate>
            <SubdivisionCode>C355</SubdivisionCode>
            <Activities>
              <Type>2</Type>
              <Code>C425</Code>
            </Activities>
          </Patents>
        </Patents>
      </Response>
    </GetPatentsByIdnpResponse>
  </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/GetPatentsByIdnp' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPatentsByIdnp xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNP>2000000000001</IDNP>
        <From>2018-01-10</From>
        <To>2028-05-08</To>
      </Request>
    </GetPatentsByIdnp>
  </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/GetPatentsByIdnp' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPatentsByIdnp xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNP>2000000000000</IDNP>
        <From>2018-09-21</From>
        <To>2026-11-04</To>
      </Request>
      <RequestHeaders>
        <CallingUser>2000000000001</CallingUser>
        <CallingEntity>1002600024777</CallingEntity>
        <CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
        <CallReason>Prestare serviciu public</CallReason>
      </RequestHeaders>
    </GetPatentsByIdnp>
  </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/GetPatentsByIdnp' \
  --data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPatentsByIdnp xmlns="http://mconnect.gov.md/consumer">
      <Request>
        <IDNP>2000000000009</IDNP>
        <From>2017-07-27</From>
        <To>2028-07-23</To>
      </Request>
      <RequestHeaders>
        <CallingUser>2000000000001</CallingUser>
        <CallingEntity>1002600024777</CallingEntity>
        <CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
        <CallReason>Prestare serviciu public</CallReason>
      </RequestHeaders>
    </GetPatentsByIdnp>
  </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/GetPatentsByIdnp