syncMOCA

syncMOCA(p_companyID, p_wsAltUserId)

 

You can use this endpoint to create a mobile credential card @ MOCA. Requires the correct settings to be configured in Settings -> Scanner & Services in EasySecure.

Parameters

Name Type Required Description
p_companyID string Yes The security code you have been provided with, string (32)
p_wsAltUserId string Yes The user's id in the 3rd party application, which is the wsAltUserId in EasySecure

Return values

ERROR_NO_SECURITY_HASH - p_companyId is not provided

ERROR_UNKNOWN_SECURITY_HASH - there is no company found based on the p_companyId provided

NO_WSALTUSERID - parameter p_wsAltUserId is missing

NO_WS_ALT_USER_ID_INFOFIELD - there is no info field set up with the infolabel function wsAltUserId

NO_EMAIL_INFOFIELD - there is no info field set up with the infolabel function Email

NO_USER_ID_FOUND - there is no user identified with the given wsAltUserId

MOBILE_CARD_ALREADY_ISSUED - there is already a mobile card issued for this user

NO_EMAIL - user has no email address defined

MOCA_SITE_ID_NOT_SET - missing configuration in Settings -> Scanner & Services

MOCA_USERNAME_NOT_SET - missing configuration in Settings -> Scanner & Services

MOCA_PASSWORD_NOT_SET - missing configuration in Settings -> Scanner & Services

UNAUTHORIZED <message> - our call to MOCA API returned error message

MOCA_INVALID_RESPONSE <message> - our call to MOCA API returned error message

OK - everything is fine, mobile card issued successfully

Sample

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uen="uen:esws">
<soapenv:Header/>
<soapenv:Body>
<uen:Esws.syncMOCA soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<p_companyID xsi:type="xsd:string">^4p;tU0Q+#dEIhTWkuj5FnLD^aKWqVu0</p_companyID>
<p_wsAltUser_id xsi:type="xsd:string">6666</p_wsAltUser_id>
</uen:Esws.syncMOCA>
</soapenv:Body>
</soapenv:Envelope>

Response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:Esws.syncMOCAResponse xmlns:ns1="uen:esws">
<return xsi:type="xsd:string">OK</return>
</ns1:Esws.syncMOCAResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>