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
KEY | VALUE | DESCRIPTION |
*x-api-key | string | Api key provided by ImIn. |
QUERY PARAMETERS
NAME | TYPE | DESCRIPTION |
*first_name | string | first name of the user. |
*last_name | string | last name of the user. |
*date | string (dd-mm-yyyy) | Date for taking shift info. |
*client_id | int | The unique ID of ImIn client. (Provided by ImIn) |
*client_token | string | The unique token of ImIn client. (Provided by ImIn) |
RESPONSE
STATUS CODE – 200: Successful Operation
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
data | object | |
date | string | Shift date |
campaign | string | Campaign in which user belongs to. |
sub-campaign | string | Sub-Campaign in which user belongs to. (Only shows if user belongs to a sub-campaign) |
first_name | string | First name of the user. |
last_name | string | Last name of the user. |
start_time | string (Y-m-d H:i:s) | Shift start time in UTC. |
end_time | string (Y-m-d H:i:s) | Shift end time in UTC. |
type | string | Type of the shift whether user picked up or canceled. |
message | string |
STATUS CODE – 401: Unauthorized
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
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
KEY | VALUE | DESCRIPTION |
*x-api-key | string | Api key provided by ImIn. |
REQUEST BODY – application/json
NAME | TYPE | DESCRIPTION |
*first_name | string | first name of the user. |
*last_name | string | last name of the user. |
*start_datetime | string (Y-m-d H:i:s UTC) | Start date time of absent/leave early shifts. |
*end_datetime | string (Y-m-d H:i:s UTC) | End date time of absent/leave early shifts. |
*client_id | int | The unique ID of ImIn client. (Provided by ImIn) |
*client_token | string | The unique token of ImIn client. (Provided by ImIn) |
RESPONSE
STATUS CODE – 200: Successful Operation
NAME | TYPE | DESCRIPTION |
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
status | boolean | |
data | object | |
campaign | string | Campaign in which user’s shift belongs to. |
STATUS CODE – 401: Unauthorized
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
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
KEY | VALUE | DESCRIPTION |
*x-api-key | string | Api key provided by ImIn. |
QUERY PARAMETERS
NAME | TYPE | DESCRIPTION |
*client_id | int | The unique ID of ImIn client. (Provided by ImIn) |
*client_token | string | The unique token of ImIn client. (Provided by ImIn) |
RESPONSE
STATUS CODE – 200: Successful Operation
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
data | object | |
date | string | Shift date |
campaign | string | Campaign in which user belongs to. |
sub-campaign | string | Sub-Campaign in which user belongs to. (Only shows if user belongs to a sub-campaign) |
first_name | string | First name of the user. |
last_name | string | Last name of the user. |
start_time | string (Y-m-d H:i:s) | Shift start time in UTC. |
end_time | string (Y-m-d H:i:s) | Shift end time in UTC. |
type | string | Type of the shift whether user picked up or canceled. |
message | string |
STATUS CODE – 401: Unauthorized
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
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
KEY | VALUE | DESCRIPTION |
*x-api-key | string | Api key provided by ImIn. |
REQUEST BODY – Application/json
NAME | TYPE | DESCRIPTION |
*campaign | string | The campaign name. |
*seats | int | The no. of seats to be created. |
*start_datetime | string (Y-m-d H:i:s) | Start date time of the seats to be created. |
*end_datetime | string (Y-m-d H:i:s) | End date time of the seats to be created. |
*client_id | int | The unique ID of ImIn client. (Provided by ImIn) |
*client_token | string | The unique token of ImIn client. (Provided by ImIn) |
RESPONSE
STATUS CODE – 200: Successful Operation
NAME | TYPE | DESCRIPTION |
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 401: Unauthorized
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
errors | object |
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
KEY | VALUE | DESCRIPTION |
*x-api-key | string | Api key provided by ImIn. |
REQUEST BODY – Application/json
NAME | TYPE | DESCRIPTION |
*first_name | string | First name of the user. |
*last_name | string | Last name of the user |
*campaign | string | Name of the campaign that user belongs to. |
*start_datetime | string (Y-m-d H:i:s) | Start date time for the shift creation in UTC. |
*end_datetime | string (Y-m-d H:i:s) | End date time for the shift creation in UTC. |
*client_id | int | The unique ID of ImIn client. (Provided by ImIn) |
*client_token | string | The unique token of ImIn client. (Provided by ImIn) |
RESPONSE
STATUS CODE – 200: Successful Operation
NAME | TYPE | DESCRIPTION |
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 401: Unauthorized
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
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
KEY | VALUE | DESCRIPTION |
*x-api-key | string | Api key provided by ImIn. |
REQUEST BODY – Application/json
NAME | TYPE | DESCRIPTION |
*campaign | string | The campaign name. |
*start_datetime | string (Y-m-d H:i:s) | Start date time of the seats to be created. |
*end_datetime | string (Y-m-d H:i:s) | End date time of the seats to be created. |
*client_id | int | The unique ID of ImIn client. (Provided by ImIn) |
*client_token | string | The unique token of ImIn client. (Provided by ImIn) |
RESPONSE
STATUS CODE – 200: Successful Operation
NAME | TYPE | DESCRIPTION |
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
data | object | |
slots | array | Time slot (15 minutes) details from ImIn. |
total_seats | int | Total count of seats for the given time period in ImIn. |
message | string |
STATUS CODE – 401: Unauthorized
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
message | string |
STATUS CODE – 400: Bad Request
NAME | TYPE | DESCRIPTION |
OBJECT WITH BELOW STRUCTURE | ||
code | number | Response status code indicate a specific HTTP request has been successfully completed or not. |
errors | object |