Suggestions

close search

Ticket Management

URL: https://api.stringeex.com/v1/ticket

HTTP method: POST

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication

POST data (body):

{
   "create_reason":0,
   "subject":"Tieu de ticket",
   "assignee":"ACKZYGJQ6Y",
   "assigneeGroup": "GRW9E5OS",
   "status":3,
   "contact":"CTA83A3GLY",
   "type":2,
   "priority":2,
   "fieldvalues":[
      {
         "field_value":"Halo",
         "field_key":"type-text"
      },
      ...
   ]
}
Field Type Required Description
create_reason Number Yes Reason create ticket, 0 = new ticket. Default: 0
subject Text Yes Subject of ticket
assignee Text No Account ID of StringeeX, URI: /admin/agent
assigneeGroup Text Yes Group ID of StringeeX, URI: /admin/pcc/group
status Number Yes 0: New, 1: Processing, 2:Pending, 3:Solved
contact Text Yes Contact ID ticket
type Number Yes 1: Question; 2: Random
priority Number Yes 1: Low; 2: Normal; 3: High; 4: Urgent
fieldvalues Array No List field values of ticket with every item is an object has property field_value and field_key
fieldvalues['field_key'] Text No The key of custom field
fieldvalues['field_value'] Text No The value of custom field

Response:

{
    "r": "response_code",
    "msg": "response_message"
}
Field Type Required Description
r Number Yes r = 0 is success, other value is not success
msg Text Yes The message of the response

Sample request:

{
   "create_reason":0,
   "subject":"Tieu de ticket",
   "assignee":"ACKZYGJQ6Y",
   "status":3,
   "contact":"CTA83A3GLY",
   "type":2,
   "priority":2,
   "fieldvalues":[
      {
         "field_value":"Halo",
         "field_key":"type-text"
      },
      {
         "field_value":"This allowed multi line",
         "field_key":"type-textarea"
      },
      {
         "field_value":[
            "CMOHS9O8ZTL",
            "CMOUNDREVDQ"
         ],
         "field_key":"type-multi-select"
      },
      {
         "field_value":[
            "CMOYPKFIVBF",
            "CMODP6SU36X"
         ],
         "field_key":"type-cascader"
      },
      {
         "field_value":"true",
         "field_key":"type-checkbox"
      },
      {
         "field_value":0.02,
         "field_key":"type-decimal"
      },
      {
         "field_value":1,
         "field_key":"type-integer"
      },
      {
         "field_value":"CMOJ8PK2C5G",
         "field_key":"type-dropdown"
      }
   ]
}

Sample response:

{
    "r": 0,
    "msg": "Success",
    "res_fieldvalues": [
        {
            "field_key": "type-text",
            "field_value": "Halo",
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        },
        {
            "field_key": "type-textarea",
            "field_value": "This allowed multi line",
            "res": {
                "r": 3,
                "msg": "Field not found: "
            }
        },
        {
            "field_key": "type-multi-select",
            "field_value": [
                "CMOHS9O8ZTL",
                "CMOUNDREVDQ"
            ],
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        },
        {
            "field_key": "type-cascader",
            "field_value": [
                "CMOYPKFIVBF",
                "CMODP6SU36X"
            ],
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        },
        {
            "field_key": "type-checkbox",
            "field_value": "true/false",
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        },
        {
            "field_key": "type-decimal",
            "field_value": 0.02,
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        },
        {
            "field_key": "type-integer",
            "field_value": 1,
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        },
        {
            "field_key": "type-dropdown",
            "field_value": "CMOJ8PK2C5G",
            "res": {
                "r": 6,
                "msg": "Fieldvalue existed"
            }
        }
    ],
}

Update a ticket

URL: https://api.stringeex.com/v1/ticket/tk_867kelft2kwxwiaa

HTTP method: PUT

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication

PUT data (body):

{
    "subject": "Tieu de ticket222",
    "assignee": "huy",
    "status": 3,
    "contact": "ac_yr8fq5vtpbdzqn5p",
    "type": 2,
    "priority": 2,
    "ccs": ["ac_blxmbplvkxarvqjp"]
}
Field Type Required Description
subject Text No Subject of ticket
assignee Text No Account ID of StringeeX, URI: /admin/agent
assigneeGroup Text No Group ID of StringeeX, URI: /admin/pcc/group
status Number No 0: New, 1: Processing, 2:Pending, 3:Solved
contact Text No Contact ID ticket
type Number No 1: Question; 2: Random
priority Number No 1: Low; 2: Normal; 3: High; 4: Urgent
ccs Array No List agents StringeeX

Response:

{
    "r": "response_code",
    "msg": "response_message"
}
Field Type Required Description
r Number Yes r = 0 is success, other value is not success
msg Text Yes The message of the response

Sample response:

{
    "r": 0,
    "msg": "Success"
}

Delete a ticket

URL: https://api.stringeex.com/v1/ticket/ticket_1

HTTP method: DELETE

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication

Response:

{
    "r": 0,
    "msg": "Success"
}

List tickets

URL: https://api.stringeex.com/v1/ticket?limit=2&page=1&sort_by=created&sort_order=desc&assignee=huy&creator=&status=&contact=ac_yr8fq5vtpbdzqn5p&type=1&priority=2&company=company_1

HTTP method: GET

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication

GET params:

Field Type Required Description
limit Number No Default: 15
page Number No Default: 1
sort_by Text No Field to sort 'created' | 'updated' | 'priority'. Default: created
sort_order Text No Field to sort 'desc' | 'asc'. Default: desc
assignee Text No Account ID of StringeeX
status Number No 0: New, 1: Processing, 2:Pending, 3:Solved
contact Text No Contact ID of ticket
company Text No Company ID of ticket
type Number No 1: Question; 2: Random
priority Number No 1: Low; 2: Normal; 3: High; 4: Urgent
serial Number No Serial is a unique number of ticket, used to get a ticket detail
id Text No Ticket ID is uniqe represent a ticket, used to get a ticket detail

Sample request:

GET /v1/ticket?page=1&limit=20 HTTP/1.1
Host: https://api.stringeex.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Response:

{
    "r": "response_code",
    "msg": "response_message"
}
Field Type Required Description
r Number Yes r = 0 is success, other value is not success
msg Text Yes The message of the response
data Array No The data of the response

Sample response:

{
    "r": 0,
    "data": {
        "rows": [
            {
               ...
            },
            {
                ...
            }
        ],
        "totalPages": 1,
        "totalCount": 2
    }
}

Get ticket detail

URL: https://api.stringeex.com/v1/ticket

HTTP method: GET

Custom HTTP header: Name: X-STRINGEE-AUTH Value: JSON web token (JWT), see StringeeX API REST Authentication

GET params: Field Type Required Description
serial Number No Serial is a unique number of ticket, used to get a ticket detail
id Text No Ticket ID is uniqe represent a ticket, used to get a ticket detail

Sample request:

GET /v1/ticket?id=TK123456 HTTP/1.1
Host: https://api.stringeex.com
X-STRINGEE-AUTH: json_web_token
Accept: application/json

Response:

{
    "r": "response_code",
    "msg": "response_message"
}
Field Type Required Description
r Number Yes r = 0 is success, other value is not success
msg Text Yes The message of the response
data Array No The data of the response

Sample response:

{
    "r": 0,
    "data": {
        "rows": [
            {
                "creator": "AC5QK9CR7C",
                "create_reason": 0,
                "ticket_role": 0,
                "object_type": "ticket",
                "subject": "ticket test trigger",
                "created": 1620792526,
                "type": 2,
                "priority": 4,
                "serial": 12461,
                "assigneeGroup": "GRTYPY8K",
                "contact": "CTNA7IHH72",
                "id": "TK9KCWEYG8",
                "assignee": "AC5QK9CR7C",
                "portal": "PT8LB2FD3Q",
                "last_modified": 1620792526,
                "status": 0,
                "contact_type": 1,
                "ticket_contact_name": "Contact btncall_036666",
                "custom_field_a": [
                    "1"
                ],
                "graph": {
                    "assignee": {
                        "id": "AC5QK9CR7C",
                        "name": "Nguyễn Duyên Thái"
                    },
                    "contact": {
                        "id": "CTNA7IHH72",
                        "name": "Contact btncall_036666",
                        "avatar": ""
                    }
                },
                "assignee_name": "Nguyễn Duyên Thái",
                "contact_name": "Contact btncall_036666",
                "company_name": "",
                "assignee_group_name": "giang",
                "creator_name": "Nguyễn Duyên Thái",
                "viet_nam": "",
                "this-is-custom-field-text": "",
                "loai-san-pham": "",
                "chu-bat-buoc": "",
                "a": "1",
                "abc": "",
                "test_short_text": "",
                "toi-thieu-6-so": "",
                "loai-tu-van-nghiep-vu": "",
                "dfff": "",
                "10": "",
                "tuychon": "",
                "ngay-thang": "",
                "hahaa": "",
                "ccs": [],
                "company": null,
                "call_id": null,
                "updated": 0,
                "in_call": 0
            }
        ],
        "totalPages": 1,
        "totalCount": 1
    }
}