Login / Authenticate User
SAMPLE CALL:
curl -X POST -H “Content-Type: application/json” -d'{ “email”:”[email protected]”, “password”: “fshGiT12gfAS” }’ https://cvs.instantcard.net/api/login
Before performing any other API calls you must first login, or authenticate, the user. To do so, submit the your e-mail and password. These are the same e-mail and password which you use to access the regular CVS system. If the e-mail/password combination is correct a token will be sent.
This token is a required parameter for all subsequent CVS API calls.
If the e-mail/password combination is incorrect, a 401 response message will be sent.
If you are already a CVS user, you may test the service by first logging into the CVS system and then visiting https://cvs.instantcard.net/api_test.
Create User
SAMPLE CALL:
curl -X POST
-F “access_token=a5034069c51b92e039”
-F “user[first_name]=David” -F “user[last_name]=Johns”
-F “user[employee_id_number]=061683”
-F “user[file][email protected]/Users/Edward/Downloads/res 1.jpg”
https://cvs.instantcard.net/api/v1/users
Once you are logged in to the system (you have a token from the Login call) you may add a user/employee to the system. To do so you must submit the new user’s first and last names, their employee ID number, and your login token. Optionally, you may also include the employee’s title, date of birth, date of hire, and attach their id photo.
The returned CVS record number may be used to review the recently created user in CVS website via the url https://cvs.instantcard.net/users/<
cvs_record_no>
Also, note that in the the following calls, the employee id number parameter is used to determine the
unique user, not the CVS record number.
If you are already a CVS user, you may test the service by first logging into the CVS system and then visiting https://cvs.instantcard.net/api_test.
Create Credential
SAMPLE CALL:
curl -X POST -F “credential[employee_id_number]=061683” -F
“access_token=a5034069c51b92e039″ -F
“credential[name]=test” -F
“credential[file][email protected]/Users/Username/Downloads/res 3.jpg”
https://cvs.instantcard.net/api/v1/credentials
You may add any credential to a user/employee using the required parameters, the access token and employee id number, together with the optional parameters—credential name, acquire date, expiry, verification, display, and an optional attachment of an image of the credential.
If the credential is not yet verified, you may always go back and verify it later. Similarly, you may always edit any of the parameters, including the photo attachment, at a later time.
The “display” parameter allows you to decide whether or not the credential shows when a foreman scans the workers badge. Effectively, this allows you to use the CVS service for more detailed credential management, without giving the foreman unneeded information.
If you are already a CVS user, you may test the service by first logging into the CVS system and then visiting https://cvs.instantcard.net/api_test.
Create Qualification
SAMPLE CALL:
curl -X POST -H “Content-Type: application/json” -d
‘{“access_token”: ““access_token=a5034069c51b92e039″ -F”,
“qualification”: {“name”: “Site Orientation”, “q_date”: “2/5/2015”, “employee_id_number”: “061683”}}’
https://cvs.instantcard.net/api/v1/qualifications