Cention Export JSONAPI
To use Cention Contact Center export API, a JSON Web Token (JWT) with
‘Access to export API’ claim attached is needed.
To create JWT go to Cention server → Administration tab → API → Access Tokens.
Check (tick) ‘‘Access to export API’ from Others.
Make sure to fill up the Key field else Save button will not be activated.
Screenshot:
The API follows JSONAPI specification: http://jsonapi.org/ . Following is
some of the specification that must follow:
Trigger Export Generation
Use HTTP POST with endpoint: https://<cention api domain>/s/<workspace>/capi/json/c3_trigger_exports
to trigger a preset export. If the name of your Cention workspace is “demo” and the cention api domain is apid.cention.com then the endpoint would be: https://apid.cention.com/s/demo/capi/json/c3_trigger_exports
Sample HTTP POST request body data format for trigger export:
{
"data" : {
"type" : "c3_trigger_exports" ,
"attributes" : {
"use_closure_date" : true ,
"errand_from_date" : "2019/01/01" ,
"errand_to_date" : "2019/01/30"
},
"relationships" : {
"export" : {
"data" : {
"type" : "c3_exports" ,
"id" : "316"
}
}
}
}
}
Sample HTTP POST response data format for trigger export (include id field):
{
"data" : {
"type" : "c3_trigger_exports" ,
"id" : "3" ,
"attributes" : {
"c3_id" : 3 ,
"use_closure_date" : true ,
"errand_from_date" : "2019/01/01" ,
"errand_to_date" : "2019/01/30" ,
"content" : {
"errand_id" : 1 ,
"from_address" : "test@cention.se" ,
"to_address" : "test1@cention.se" ,
"subject" : "subject" ,
"question" : "question" ,
"answer" : "answer" ,
"errand_notes" : "notes" ,
"timestamp_arrived" : "" ,
"timestamp_opened" : "" ,
"timestamp_answered" : "" ,
"timestamp_closed" : ""
}
}
}
}
Field
Type
Description
export
Array of Object
JSONAPI formatted object which represent the preset-ed export to be triggered.
Data.relationships.export
Field
Type
Description
data
Array of Object
JSONAPI formatted object which represent the preset-ed export to be triggered.
Data.relationships.export.data
Field
Type
Description
type
String
Export type.
id
String
Export ID from Cention application.
Field
Type
Description
c3_id
Integer
Generated export content’s database ID.
use_closure_date
Boolean
If true the generated content base on errand’s closure date instead of arrival date.
errand_from_date
String
If set export will search errand from this date, format “2019/01/01”.
errand_to_date
String
If set export will search errand until this date, format “2019/01/01”.
content
Array of Object
The content of generated data of the export.
Field
Type
Description
errand_id
String
Errand identification number.
from_address
String
Errand from address.
to_address
String
Errand to address.
subject
String
Errand subject.
question
String
Errand question message.
answer
String
Errand answer message.
errand_notes
String
Errand note message.
timestamp_arrived
String
Errand arrival time.
timestamp_opened
String
Errand open time.
timestamp_answered
String
Errand answer time.
timestamp_closed
String
Errand closing time.
agent_id
Integer
Errand assigned agent id.
agent_name
String
Errand assigned agent name.
area_id
Integer
Errand container area id.
area_name
String
Errand container area name.
tag_names
String
Errand tags name.
client_id
Integer
Errand sender id.
priority
String
Errand priority level.
satisfaction_meter_answer_1
Integer
Errand feedback level 1.
satisfaction_meter_answer_2
Integer
Errand feedback level 2.
satisfaction_meter_answer_3
Integer
Errand feedback level 3.
satisfaction_meter_answer_4
Integer
Errand feedback level 4.
satisfaction_meter_answer_5
Integer
Errand feedback level 5.
channel
String
Errand source name.
area_external_id
String
External id for Area.
JSONAPI specification .