API reference for third-party integration

API

1.USER

Info

Fetches the shift information of the requested user (by first name & last name) for the requested date.

1.1 GET https://portal.imin2.com/api/v1/users/get-user-schedule
REQUEST

REQUEST HEADERS

KEYVALUEDESCRIPTION
*x-api-keystringApi key provided by ImIn.

QUERY PARAMETERS

NAMETYPEDESCRIPTION
*first_namestringfirst name of the user.
*last_namestringlast name of the user.
*datestring (dd-mm-yyyy)Date for taking shift info.
*client_idintThe unique ID of ImIn client. (Provided by ImIn)
*client_tokenstringThe unique token of ImIn client. (Provided by ImIn)
 
 
 
RESPONSE

STATUS CODE – 200: Successful Operation

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.      
dataobject 
datestringShift date
campaignstringCampaign in which user belongs to.
sub-campaignstringSub-Campaign in which user belongs to. (Only shows if user belongs to a sub-campaign)
first_namestringFirst name of the user.
last_namestringLast name of the user.
start_timestring (Y-m-d H:i:s)Shift start time in UTC.
end_timestring (Y-m-d H:i:s)Shift end time in UTC.
typestringType of the shift whether user picked up or canceled.
messagestring 

STATUS CODE – 401: Unauthorized

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

Info

Check if the given user exists under the ImIn client and also saves information regarding Absent/Leave early shifts.

1.2 POST https://portal.imin2.com/api/v1/users/check-user-exist
REQUEST

REQUEST HEADERS

KEYVALUEDESCRIPTION
*x-api-keystringApi key provided by ImIn.

REQUEST BODY – application/json

NAMETYPEDESCRIPTION
*first_namestringfirst name of the user.
*last_namestringlast name of the user.
*start_datetimestring (Y-m-d H:i:s UTC)Start date time of absent/leave early shifts.
*end_datetimestring (Y-m-d H:i:s UTC)End date time of absent/leave early shifts.
*client_idintThe unique ID of ImIn client. (Provided by ImIn)
*client_tokenstringThe unique token of ImIn client. (Provided by ImIn)
 
 
RESPONSE

STATUS CODE – 200: Successful Operation

NAMETYPEDESCRIPTION
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.      
statusboolean 
dataobject 
campaignstringCampaign in which user’s shift belongs to.

STATUS CODE – 401: Unauthorized

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

 

 

2.SHIFT

Info

Fetches the shift picked up or cancelled by the agents through the mobile app as well as the shift assignment and shift deletion by the managers through the web portal.

 

2.1 GET https://portal.imin2.com/api/v1/shifts/get-shift-updates
REQUEST

REQUEST HEADERS

KEYVALUEDESCRIPTION
*x-api-keystringApi key provided by ImIn.

QUERY PARAMETERS

NAMETYPEDESCRIPTION
*client_idintThe unique ID of ImIn client. (Provided by ImIn)
*client_tokenstringThe unique token of ImIn client. (Provided by ImIn)
 
 
RESPONSE

STATUS CODE – 200: Successful Operation

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.      
dataobject 
datestringShift date
campaignstringCampaign in which user belongs to.
sub-campaignstringSub-Campaign in which user belongs to. (Only shows if user belongs to a sub-campaign)
first_namestringFirst name of the user.
last_namestringLast name of the user.
start_timestring (Y-m-d H:i:s)Shift start time in UTC.
end_timestring (Y-m-d H:i:s)Shift end time in UTC.
typestringType of the shift whether user picked up or canceled.
messagestring 

STATUS CODE – 401: Unauthorized

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

Info

Create the given number of seats for the given LOB on the given date and time.

 

2.2 POST https://portal.imin2.com/api/v1/seats/create-seats
REQUEST

REQUEST HEADERS

KEYVALUEDESCRIPTION
*x-api-keystringApi key provided by ImIn.

REQUEST BODY – Application/json

NAMETYPEDESCRIPTION
*campaignstringThe campaign name.
*seatsintThe no. of seats to be created.
*start_datetimestring (Y-m-d H:i:s)Start date time of the seats to be created.
*end_datetimestring (Y-m-d H:i:s)End date time of the seats to be created.
*client_idintThe unique ID of ImIn client. (Provided by ImIn)
*client_tokenstringThe unique token of ImIn client. (Provided by ImIn)
RESPONSE

STATUS CODE – 200: Successful Operation

NAMETYPEDESCRIPTION
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 401: Unauthorized

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
errorsobject 

Info

Create shift for the given user for the given date and time.

2.3 POST https://portal.imin2.com/api/v1/shifts/create-shift
REQUEST

REQUEST HEADERS

KEYVALUEDESCRIPTION
*x-api-keystringApi key provided by ImIn.

REQUEST BODY – Application/json

NAMETYPEDESCRIPTION
*first_namestringFirst name of the user.
*last_namestringLast name of the user
*campaignstringName of the campaign that user belongs to.
*start_datetimestring (Y-m-d H:i:s)Start date time for the shift creation in UTC.
*end_datetimestring (Y-m-d H:i:s)End date time for the shift creation in UTC.
*client_idintThe unique ID of ImIn client. (Provided by ImIn)
*client_tokenstringThe unique token of ImIn client. (Provided by ImIn)

RESPONSE

STATUS CODE – 200: Successful Operation

NAMETYPEDESCRIPTION
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 401: Unauthorized

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

Info

Get the number of seats for the given LOB on the given date and time.

 

2.4 GET https://portal.imin2.com/api/v1/seats/get-seat-count
REQUEST

REQUEST HEADERS

KEYVALUEDESCRIPTION
*x-api-keystringApi key provided by ImIn.

REQUEST BODY – Application/json

NAMETYPEDESCRIPTION
*campaignstringThe campaign name.
*start_datetimestring (Y-m-d H:i:s)Start date time of the seats to be created.
*end_datetimestring (Y-m-d H:i:s)End date time of the seats to be created.
*client_idintThe unique ID of ImIn client. (Provided by ImIn)
*client_tokenstringThe unique token of ImIn client. (Provided by ImIn)
RESPONSE

STATUS CODE – 200: Successful Operation

NAMETYPEDESCRIPTION
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
dataobject 
slotsarrayTime slot (15 minutes) details from ImIn.
total_seatsintTotal count of seats for the given time period in ImIn.
messagestring 

STATUS CODE – 401: Unauthorized

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
messagestring 

STATUS CODE – 400: Bad Request

NAMETYPEDESCRIPTION
OBJECT WITH BELOW STRUCTURE
codenumberResponse status code indicate a specific HTTP request has been successfully completed or not.
errorsobject 

Tags: