State calculator webservice
WSDL
The WSDL of the production service is available at:
- Production: https://api.nalandaglobal.com/ws/integration/services/calculosSemaforos.wsdl
- Preproduction: https://api.pre.nalandaglobal.net/ws/integration/services/calculosSemaforos.wsdl
Operations
CalcularSemaforoEmpresaYTotal
Supported Platforms: NATIONAL
Description: This operation returns the company and total state of a company in a file.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.obralia.com/integration/schemas">
<soapenv:Header/>
<soapenv:Body>
<sch:CalcularSemaforoEmpresaYTotalRequest>
<sch:authObralia>
<sch:username>USUARIO</sch:username>
<sch:password>CONTRASEÑA</sch:password>
</sch:authObralia>
<sch:cifEmpresa>CIF_SOLICITANTE_INFORMACION</sch:cifEmpresa>
<sch:cifProveedor>CIF_PROVEEDOR</sch:cifProveedor>
<sch:cifPropietario>CIF_PROPIETARIO</sch:cifPropietario>
<sch:codigoObra>CODIGO_OBRA</sch:codigoObra>
<sch:fechaTrabajos>yyyy-MM-dd</sch:fechaTrabajos>
<sch:fechaFactura> yyyy-MM-dd </sch:fechaFactura>
</sch:CalcularSemaforoEmpresaYTotalRequest>
</soapenv:Body>
</soapenv:Envelope>
Request fields:
- username : User who makes the request and belongs to the company cifCompany
- password: User password
- cifEmpresa : Company that makes the request, belongs to the family of the owner of the file.
- cifProveedor : Company about which the information request is made.
- cifPropietario: Company that owns the Dossier.
- codigoObra : Dossier in which the company about which the request for information is made is located.
- fechaTrabajos : Date (counting up to the month) from which the information is being requested on workers.
- fechaFactura : Date (counting up to the month) from which the company information is requested.
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:CalcularSemaforoEmpresaYTotalResponse xmlns:ns2="http://www.obralia.com/integration/schemas">
<ns2:estado>
<ns2:semaforoEmpresa>R</ns2:semaforoEmpresa>
<ns2:semaforoTotal>R</ns2:semaforoTotal>
<ns2:urlConsulta>http://localhost:8080/generacionCertificadoTotalFechas!input.action?idContrata=119
711</ns2:urlConsulta>
</ns2:estado>
<ns2:estado>
<ns2:semaforoEmpresa>R</ns2:semaforoEmpresa>
<ns2:semaforoTotal>R</ns2:semaforoTotal>
<ns2:urlConsulta>http://localhost:8080/generacionCertificadoTotalFechas!input.action?idContrata=218
3432</ns2:urlConsulta>
</ns2:estado>
<ns2:estado>
<ns2:semaforoEmpresa>R</ns2:semaforoEmpresa>
<ns2:semaforoTotal>R</ns2:semaforoTotal>
<ns2:urlConsulta>http://localhost:8080/generacionCertificadoTotalFechas!input.action?idContrata=680
5360</ns2:urlConsulta>
</ns2:estado>
<ns2:estado>
<ns2:semaforoEmpresa>R</ns2:semaforoEmpresa>
<ns2:semaforoTotal>R</ns2:semaforoTotal>
<ns2:urlConsulta>http://localhost:8080/generacionCertificadoTotalFechas!input.action?idContrata=680
5359</ns2:urlConsulta>
</ns2:estado>
<ns2:estado>
<ns2:semaforoEmpresa>R</ns2:semaforoEmpresa>
<ns2:semaforoTotal>R</ns2:semaforoTotal>
<ns2:urlConsulta>http://localhost:8080/generacionCertificadoTotalFechas!input.action?idContrata=221
1299</ns2:urlConsulta>
</ns2:estado>
</ns2:CalcularSemaforoEmpresaYTotalResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response fields: For each instance of the company in the file for which the data is consulted, the following is returned:
- semaforoEmpresa: State of the company data.
- semaforoTotal: Total state of the contract taking into account additionally workers and machinery.
- urlConsulta: url that can be accessed to view the data.
CalcularSemaforoEmpresaTotalYPagos
Supported Platforms: NATIONAL
Description: This operation returns the company, total and payments state for a company in a file
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.obralia.com/integration/schemas">
<soapenv:Header/>
<soapenv:Body>
<sch:CalcularSemaforoEmpresaTotalYPagosRequest>
<sch:authObralia>
<sch:username>USUARIO</sch:username>
<sch:password>CONTRASEÑA</sch:password>
</sch:authObralia>
<sch:cifEmpresa>CIF_SOLICITANTE_INFORMACION</sch:cifEmpresa>
<sch:cifProveedor>CIF_PROVEEDOR</sch:cifProveedor>
<sch:cifPropietario>CIF_PROPIETARIO</sch:cifPropietario>
<sch:codigoObra>CODIGO_OBRA</sch:codigoObra>
<sch:fechaTrabajos>yyyy-MM-dd</sch:fechaTrabajos>
<sch:fechaFactura> yyyy-MM-dd </sch:fechaFactura>
</sch:CalcularSemaforoEmpresaTotalYPagosRequest>
</soapenv:Body>
</soapenv:Envelope>
Request fields:
- username : User who makes the request and belongs to the company cifCompany
- password: User password
- cifEmpresa : Company that makes the request, belongs to the family of the owner of the file.
- cifProveedor : Company about which the information request is made.
- cifPropietario: Company that owns the Dossier.
- codigoObra : Dossier in which the company about which the request for information is made is located.
- fechaTrabajos : Date (counting up to the month) from which the information is being requested on workers.
- fechaFactura : Date (counting up to the month) from which the company information is requested.
Response:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:CalcularSemaforoEmpresaTotalYPagosResponse xmlns:ns2="http://www.obralia.com/integration/schemas">
<ns2:estado>
<ns2:semaforoEmpresa>G</ns2:semaforoEmpresa>
<ns2:semaforoTotal>G</ns2:semaforoTotal>
<ns2:semaforoPagos>G</ns2:semaforoPagos>
<ns2:urlConsulta>https://api.nalandaglobal.com/generacionCertificadoTotalFechas!input.action?idCont
rata=1121994704</ns2:urlConsulta>
</ns2:estado>
</ns2:CalcularSemaforoEmpresaTotalYPagosResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response fields: For each instance of the company in the file for which the data is consulted, the following is returned:
- semaforoEmpresa: State of the company data.
- semaforoTotal: Total state of the contract taking into account additionally workers and machinery.
- semaforoPagos : Payments state of the contract without taking into account the documentation of workers and machinery. It takes into account the collation of the TC2, Payrolls and ITA of the workers.
- urlConsulta: url that can be accessed to see the data.
Text Mode Web Service Operations Model
Another access interface to the web service is provided, for the calculation of the company and total states of a company in a file, by means of a POST call in text/plain mode to total of a company in a file, indicating the necessary parameters in the same request.
URI
The URI of the service is available at:
Response For each instance of the company in the file for which the data is consulted, the following is returned:
- semaforoEmpresa: State of the company data.
- semaforoTotal: Total state of the contract taking into account additionally workers and machinery.
- urlConsult: url that can be accessed to view the data. In comma separated format with the pattern: Semáforo_Empresa,Semáforo_Total,URL_de_ACCESO
Ej:
https://app.nalandaglobal.com/gestiona/obras/remote/calcularSemaforosContrataEmpresaYTotal.action
https://app.pre.nalandaglobal.net/gestiona/obras/remote/calcularSemaforosContrataEmpresaYTotal.action
R,R,https://app.nalandaglobal.com/generacionCertificadoTotalFechas!input.action?idContrata=1189746684
G,G,https://app.nalandaglobal.com/generacionCertificadoTotalFechas!input.action?idContrata=1189746684
Obtaining the certificate in excel format
Prerequisites
In order to access the form or the direct download, it is necessary to previously log in with the credentials used in the request to the Web Service in order to have a cookie. Login with the credentials used in the request to the Web Service, in order to have a session cookie and to be able to use it in the following calls.
Personalisation web form for obtaining the certificate
Note that the value associated with "urlConsulta" that is returned is the access to the Nalanda form that allows downloading the certificate. Nalanda form that allows downloading the certificate of dates informing the desired dates. If you want to obtain the Certificate of Payments, you could easily build it through the the one returned in the service, changing "generacionCertificadoTotalFechas" by "generacionCertificadoPagos". For example:
- Certificate by date: https://app.pre.nalandaglobal.net/generacionCertificadoTotalFechas!input.action?idContrata=123456789
- Payments certificate: https://app.pre.nalandaglobal.net/generacionCertificadoPagos!input.action?idContrata=123456789
Direct download of the certificate
If you want to obtain the certificate of dates and/or payments in Excel format, with the breakdown of all the associated documentation and statuses, you can also use the value associated with "urlConsulta" as a reference the value associated to "urlConsulta" to build such requests. For example:
Excel associated with certificate by dates: https://app.pre.nalandaglobal.net/generacionCertificadoTotalFechas.action?idContrata=123456789&mesEmpresa=5&anyoEmpresa=2024&mesTrabajadores=4&anyoTrabajadores=2024
Excel associated with payment certificate: https://app.pre.nalandaglobal.net/generacionCertificadoPagos.action?idContrata=123456789&mesEmpresa=5&anyoEmpresa=2024&mesTrabajadores=4&anyoTrabajadores=2024