Extend Wrap-Up
Allows customers extend wrapUp state for specified agent. The request body should contain the correct access key, agent e-mail and end time to extend wrapUp. The end time should be DateTime parameter which contains time zone e.g. 2020-01-01T09:00:00.000Z.
POST |
https://api.tenios.com/wrap-up/extend |
Request parameters:
access_key String Mandatory |
The customer’s API key. It can be found in Section MY ACCOUNT –> General Settings |
agent_email String Mandatory |
Agent e-mail to extend wrapUp |
end_time String Mandatory |
Time to which wrapUp state should be extended |
Example of a successful request:
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com",
"end_time": "2020-01-01T09:00:00.000Z"
}
API Response:
HTTP Status Code: 200 (OK)
{
"success": true,
"wrap_up_end_time": "2020-01-01T09:00:00.000Z"
}
Examples of invalid requests:
FIELD_IS_REQUIRED
This error is returned if
agent_email parameter is missing or not specified.
Request:
{
"access_key": "***************************",
"end_time": "2020-01-01T09:00:00.000Z"
}
or
Request:
{
"access_key": "***************************",
"agent_email": "",
"end_time": "2020-01-01T09:00:00.000Z"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "FIELD_IS_REQUIRED",
"error_message": "Parameter 'agent_email' is required",
"fields": [
"agent_email"
]
}
AGENT_NOT_FOUND
This error is returned if an invalid input was specified for the
agent_email parameter.
Request:
{
"access_key": "***************************",
"agent_email": "notExistingEmail@test.com",
"end_time": "2020-01-01T09:00:00.000Z"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "AGENT_NOT_FOUND",
"error_message": "Agent not found.",
"fields": [
"agent_email"
]
}
AGENT_NOT_IN_WRAP_UP
The agent is currently not in a wrap-up status.
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com",
"end_time": "2020-01-01T09:00:00.000Z"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "AGENT_NOT_IN_WRAP_UP",
"error_message": "Agent currently not in wrapUp state",
"fields": []
}
WRAP_UP_DATE_PARSE_ERROR
This error is returned if
end_timeis in the wrong format.
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com",
"end_time": "01-01-20020T09:00:00.000"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "WRAP_UP_DATE_PARSE_ERROR",
"error_message": "Parameter 'end_time' value parsing error: format must be yyyy-MM-dd'T'HH:mm:ss.SSSZ. E.g. 2016-01-01T09:00:00.000Z",
"fields": [
"end_time"
]
}
WRAP_UP_INVALID_EXTEND_TIME_AMOUNT
This error is returned if there is an invalid renewal period. The minimum value for the extension is: 5 seconds
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com",
"end_time": "2020-01-01T09:00:00.000Z"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "WRAP_UP_INVALID_EXTEND_TIME_AMOUNT",
"error_message": "Invalid amount of time to extend. Minimum value to extend - 5 seconds",
"fields": []
}
WRAP_UP_EXCEEDED_LIMIT
This error is returned if there is a renewal period that exceeds the limit of 15 minutes.
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com",
"end_time": "2020-01-01T09:20:00.000Z"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "Requested WrapUp Extension time is too high",
"error_message": "WRAP_UP_EXCEEDED_LIMIT",
"fields": []
}
Cancel Wrap-Up:
Allows customers to cancel wrapUp state for specified agent. The request body should contain the correct access key and agent e-mail.
POST |
https://api.tenios.com/wrap-up/cancel |
Request parameters:
access_key String Mandatory |
The customer’s API key. It can be found in Section MY ACCOUNT –> General Settings |
agent_email String Mandatory |
Agent e-mail to extend wrapUp |
Example of a successful request:
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com"
}
API Response:
HTTP Status Code: 200 (OK)
{
"success": true
}
Examples of invalid requests:
FIELD_IS_REQUIRED
This error is returned if agent_email parameter is missing or not specified.
{
"access_key": "***************************"
}
OR
{
"access_key": "***************************",
"agent_email": ""
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "FIELD_IS_REQUIRED",
"error_message": "Parameter 'agent_email' is required",
"fields": [
"agent_email"
]
}
AGENT_NOT_FOUND
This error is returned if an invalid input was specified for theagent_email parameter.
Request:
{
"access_key": "***************************",
"agent_email": "notExistingEmail@test.com"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "AGENT_NOT_FOUND",
"error_message": "Agent not found.",
"fields": [
"agent_email"
]
}
AGENT_NOT_IN_WRAP_UP
The agent is currently not in a wrap-up status.
Request:
{
"access_key": "***************************",
"agent_email": "agent@test.com"
}
API Response:
HTTP Status Code: 400 (Bad Request)
{
"error_code": "AGENT_NOT_IN_WRAP_UP",
"error_message": "Agent currently not in wrapUp state",
"fields": []
}