Skip to content

Query Types

Andrew edited this page Sep 12, 2013 · 1 revision

GET_STATUS

Get the status of the ILS: {"code":"GET_STATUS","authorityToken":"***********","userId":"","pin":"","customer":"null"} The second field is the API key. The key is a shared secret. All requests are required to have a valid authority token. The token is never returned by the Metro server. The authority token is set in the environment.properties file prior to the server starting.

GET_CUSTOMER

Get customer account information {"code":"GET_CUSTOMER","authorityToken":"*************","userId":"21221018983954","pin":"64058","customer":"null"}

CREATE_CUSTOMER

Create a customer with the following information {"code":"CREATE_CUSTOMER","authorityToken":"***************","userId":"","pin":"", "customer":"{"ID":"21221020517139","PIN":"64058","PREFEREDNAME":"Smith, Robert","STREET":"12345 123 St.", "CITY":"Edmonton","PROVINCE":"Alberta","POSTALCODE":"T6G0G4","SEX":"M","EMAIL":"ilsteam@epl.ca", "PHONE":"7804964058","DOB":"19630822","PRIVILEGE_EXPIRES":"20140602","RESERVED":"X", "ALTERNATE_ID":"X","ISVALID":"Y","ISMINAGE":"Y","ISRECIPROCAL":"N","ISRESIDENT":"Y", "ISGOODSTANDING":"Y","ISLOSTCARD":"N","FIRSTNAME":"Robert","LASTNAME":"Smith"}"} A successful response might look like this: {"code":"OK","responseMessage":"Your pin has been set to \u00274058\u0027 to comply with this library\u0027s policies. Customer account successfully loaded. ","customer":"null"}

UPDATE_CUSTOMER

Update a customer's account with the following information {"code":"UPDATE_CUSTOMER","authorityToken":"*************","userId":"","pin":"", "customer":"{"ID":"21221020517139","PIN":"64058","PREFEREDNAME":"Smith, Robert","STREET":"12345 123 St.", "CITY":"Edmonton","PROVINCE":"Alberta","POSTALCODE":"T6G0G4","SEX":"M","EMAIL":"ilsteam@epl.ca", "PHONE":"7804964058","DOB":"19630822","PRIVILEGE_EXPIRES":"20140602","RESERVED":"X", "ALTERNATE_ID":"X","ISVALID":"Y","ISMINAGE":"Y","ISRECIPROCAL":"N","ISRESIDENT":"Y", "ISGOODSTANDING":"Y","ISLOSTCARD":"N","FIRSTNAME":"Robert","LASTNAME":"Smith"}"} A successful response might look like this: {"code":"OK","responseMessage":"Your pin has been set to \u00274058\u0027 to comply with this library\u0027s policies. Customer account successfully loaded. ","customer":"null"}

NULL

NULL is a special command type that has no effect. '''Don't use it'''.

Clone this wiki locally