Skip to main content

Create Session

Generates a link which, when shared, connects a customer with an agent immediately, based on a specific category or a userId.

POST /v1/access/external/cammer/generate-session

Creates a session link.

Endpoint​

https://api.ocularsolution.com/api/v1/access/external/cammer/generate-session

Headers​

Authorization STRING REQUIRED

Example values: 123456789


X-Requested-With STRING REQUIRED

Example values: XMLHttpRequest


Parameters​

name STRING REQUIRED

Example values: Abraham, David


email STRING OPTIONAL

Example values: example@example.com


cellphone STRING REQUIRED

Example values: +5804145554433


categoryCode STRING OPTIONAL

Do NOT send userCode if you send this property.

Example values: a7d3a90f-6050-476f-8814-6779f54b3caa


duration NUMBER OPTIONAL

This value must be expressed in minutes. Sets the validity period of the link.

Example values: 5


userCode STRING OPTIONAL

Do NOT send categoryCode if you send this property.

Example values: 'a7d3a90f-6050-476f-8814-6779f54b3caa'


ticket OBJECT[] OPTIONAL
Show properties
title STRING REQUIRED

Example values: Father's Day promotion


description STRING REQUIRED

Example values: 20% off all products


Parameter Example​

params
{
"name": "Abraham",
"email": "abraham@ocularsolution.com",
"cellphone": "+584141315854",
"categoryCode": "a7d3a90f-6050-476f-8814-6779f54b3caa",
"duration": 5
"ticket": {
"title": "Father's Day promotion",
"description": "20% off all products"
}
}

Service responses​

Successful response​

{
"statusCode": 0,
"message": "Success",
"data": {
"link": "https://widgetappdev.ocularsolution.com/session/l1z-kfb-dmj-70",
"customer": {
"name": "Abraham",
"email": "abraham@ocularsolution.com",
"cellphone": "+584141315854"
}
}
}

Failed response​

{
"statusCode": 2,
"message": "Campos no cumplen",
"detail": {
"cellphone": [
"SessionLinkControllerValidator: cellphone is required."
]
}
}
{
"statusCode": 2,
"message": "Campos no cumplen",
"detail": {
"ticket.title": [
"SessionLinkControllerValidator: ticket.title is required."
]
}
}

Response with validation errors​

{
"statusCode": 9,
"message": "No Authorization token"
}