Catalog › Interpelări › GetWorkplaces
GetWorkplaces Interpelări
Interpelarea “GetWorkplaces” returnează istoricul locurilor de muncă ale persoanei fizice identificate în baza IDNP-ului, în perioada indicată
SOAP · GetWorkplaces(IDNP: string, MonthFrom: integer, YearFrom: integer, MonthTo: integer, YearTo: integer) : Workplaces
Date de intrare — Request
| Câmp | Tip | Oblig. | Exemplu | Descriere |
|---|---|---|---|---|
| IDNP | string(13) | Da | 2000000000001 | Numărul unic de identificare al persoanei (IDNP). Poate lipsi, în cazul persoanelor care au renunţat la IDNP |
| MonthFrom | integer | Da | 1 | Luna de început a perioadei |
| YearFrom | integer | Da | 60 | Anul de început al perioadei |
| MonthTo | integer | Da | 1 | Luna de sfârșit a perioadei |
| YearTo | integer | Da | 16 | Anul de sfârșit al perioadei |
Date de intrare — RequestHeaders
| Câmp | Tip | Oblig. | Exemplu | Descriere |
|---|---|---|---|---|
| CallingUser | string(13) | Da | Numărul de identificare (IDNP) al utilizatorului sau identificatorul (ID-ul) sistemului care procesează datele cu caracter personal | |
| CallingEntity | string(13) | Da | Numărul de identificare (IDNO) al persoanei juridice din care face parte utilizatorul care procesează datele cu caracter personal, sau care gestionează sistemul informațional | |
| CallBasis | string(256) | Da | Temeiul legal al apelului | |
| CallReason | string(512) | Da | Scopul legal al apelului |
Date de ieșire — Response
| Câmp | Tip | Oblig. | Exemplu | Descriere |
|---|---|---|---|---|
| Workplaces | object | — | Date privind locurile de muncă a persoanei fizice | |
| · Workplaces | array<object> | — | Locul de muncă | |
| ·· EmployerIDNO | string(13) | Da | 1000856734670 | Numărul unic de identificare al angajatorului (IDNO) |
| ·· EmployerName | string | Da | SA "Construct Plus" | Denumirea angajatorului |
| ·· Position | CORM006-2021 | Da | Medic | Codul funcției ocupate |
| ·· PositionName | string | Da | Medic | Denumirea funcției ocupate |
| ·· From | Date | Da | 2018-01-10 | Data angajării sau schimbării funcției |
| ·· To | Date | — | 2028-05-08 | Data aflării în funcție, schimbării funcției sau încheierii contractului |
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/GetWorkplaces' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWorkplaces xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000001</IDNP>
<MonthFrom>1</MonthFrom>
<YearFrom>60</YearFrom>
<MonthTo>1</MonthTo>
<YearTo>16</YearTo>
</Request>
<RequestHeaders>
<CallingUser>2000000000001</CallingUser>
<CallingEntity>1002600024777</CallingEntity>
<CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
<CallReason>Prestare serviciu public</CallReason>
</RequestHeaders>
</GetWorkplaces>
</soap:Body>
</soap:Envelope>'
Răspuns
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWorkplacesResponse xmlns="http://mconnect.gov.md/consumer">
<Response>
<Workplaces>
<Workplaces>
<EmployerIDNO>1000856734670</EmployerIDNO>
<EmployerName>SA "Construct Plus"</EmployerName>
<Position>Medic</Position>
<PositionName>Medic</PositionName>
<From>2018-01-10</From>
<To>2028-05-08</To>
</Workplaces>
</Workplaces>
</Response>
</GetWorkplacesResponse>
</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/GetWorkplaces' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWorkplaces xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000001</IDNP>
<MonthFrom>1</MonthFrom>
<YearFrom>60</YearFrom>
<MonthTo>1</MonthTo>
<YearTo>16</YearTo>
</Request>
</GetWorkplaces>
</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/GetWorkplaces' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWorkplaces xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000000</IDNP>
<MonthFrom>5</MonthFrom>
<YearFrom>21</YearFrom>
<MonthTo>2</MonthTo>
<YearTo>55</YearTo>
</Request>
<RequestHeaders>
<CallingUser>2000000000001</CallingUser>
<CallingEntity>1002600024777</CallingEntity>
<CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
<CallReason>Prestare serviciu public</CallReason>
</RequestHeaders>
</GetWorkplaces>
</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/GetWorkplaces' \
--data '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetWorkplaces xmlns="http://mconnect.gov.md/consumer">
<Request>
<IDNP>2000000000009</IDNP>
<MonthFrom>6</MonthFrom>
<YearFrom>22</YearFrom>
<MonthTo>2</MonthTo>
<YearTo>76</YearTo>
</Request>
<RequestHeaders>
<CallingUser>2000000000001</CallingUser>
<CallingEntity>1002600024777</CallingEntity>
<CallBasis>Legea 133/2011 privind protecția datelor</CallBasis>
<CallReason>Prestare serviciu public</CallReason>
</RequestHeaders>
</GetWorkplaces>
</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>