Updated on 2025-03-31 GMT+08:00

Querying the Case List

Description

This is a machine-machine interface for querying the case list based on conditions.

Method

POST

URI

https://Domain name/service/AICC__Case/1.0.0/openapi/case/list (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

Request body type, which is JSON

2

access-token

String

Yes

Token for a user to access a tenant space. For details, see Authentication Machine-Machine Interface (SaaS Integrated Deployment).

Table 2 Request body parameters

No.

Parameter

Type

Length (Bytes)

Mandatory or Not

Description

1

title

String

128

No

Case title

2

status

String

-

No

Case status

dataType: SingleSelect

Value range:

0. Completed (default value)

Other values are defined by the business side.

3

priority

String

-

No

Priority

dataType: SingleSelect

Value range:

0. Low

1. Medium

2. High

3. Critical

4

origin

String

-

No

Case source

0. Email

1. Voice

2. webchat

3. Whatsapp

5

ownerId

String

20

No

Case owner

6

type

String

20

No

Case type, which is customized by the business side

7

contactId

String

20

No

Case contact ID

8

contactPhone

String

20

No

Customer contact phone number

9

creatorId

String

20

No

Creator

10

startTime

String

-

No

Start time, in YYYY-MM-DD HH:mm:ss format

11

endTime

String

-

No

End time, in YYYY-MM-DD HH:mm:ss format. The interval between the start time and end time cannot exceed 31 days.

12

start

Number

-

Yes

Start row number (minimum value: 0)

13

limit

Number

-

Yes

Number of rows returned for the query (minimum value: 1; maximum value: 100)

14

classification

String

-

No

Case category

  • Todo
  • Follow
  • Created
  • Processed

If the case type involved in the case list query is associated with a customized case template, extended fields in the case template can be added to the request body.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

caseList

Object []

Yes

Case information. The fields are fields in the primary case table and can be dynamically extended. For details, see Table 4.

2

count

Number

Yes

Total number of records that meet conditions

Table 4 caseList parameters

No.

Parameter

Type

Mandatory or Not

Description

1

id

String

Yes

Case ID

2

caseNo

String

Yes

Case No.

3

title

String

Yes

Case name

4

type

String

Yes

Case type ID

5

typeName

String

No

Case type name

6

extternalNo

String

No

External case No.

7

status

String

Yes

Case process

8

state

String

Yes

Case status

9

isUpgraded

Boolean

No

Whether the case is upgraded

10

priority

String

No

Case priority

11

origin

String

Yes

Case source

12

reason

String

No

Case reason category

13

stayDate

Datetime

No

Stay duration of the current status

14

suspendDate

Datetime

No

Case suspension time

15

suspendAccumulatedTime

Number

No

Accumulated case suspension duration

16

contactId

String

Yes

Case contact

17

ownerType

String

Yes

Handler type

18

ownerId

String

Yes

Current handler or group

19

parentId

String

No

Parent case

20

contactPhone

String

No

Contact phone number

21

dueDate

Datetime

No

Deadline

22

closedDate

Datetime

No

Case closure time

23

creatorId

String

Yes

Case creator

24

createdDate

Datetime

Yes

Creation time

Example

Scenario: Query the case list.

URL: https://Domain name/service/AICC__Case/1.0.0/openapi/case/list

  • Request header
{
 "Content-Type": "application/json",
 "access-token": "0000000000************7bm63KsRmEztTvyA="
}
  • Request body
{
  "limit": 2,
   "start": 0
}
  • Response header
{ "connection": "keep-alive",
 "Content-Length": "16",
"Content-Type": "application/json%3Bcharset=UTF-8"}
  • Response parameters
{ "resCode": "0", "resMsg": "success", "result": [   {     "caseList": [       {         "caseNo": "000000000000000000000000035013",         "closedDate": null,         "contactId": "ciIy0000012YLAA4Dulc",         "contactPhone": null,         "createdDate": "2023-06-16 16:25:22",         "creatorId": "10gd000000rDybBRYkuu",         "dueDate": "2023-06-30 00:00:00",         "extternalNo": null,         "id": "c6m800000149ndrHRVNQ",         "isCanced": false,         "isSuspend": false,         "isUpgraded": false,         "origin": "Email",         "ownerId": "10gg000000sGyLvwHvOK",         "parentId": null,         "priority": "Critical",         "reason": null,         "state": "Processing",         "status": "y",         "stayDate": null,         "suspendAccumulatedTime": null,         "suspendDate": null,         "title": "test",         "type": "cvmC00000149NzxF1ePA",         "type.__objectType": "AICC__CaseType__CST",         "type.name": "",         "typeName": "aaa"       },       {         "caseNo": "000000000000000000000000037005",         "closedDate": null,         "contactId": "ciIy0000012mm24P7vNo",         "contactPhone": null,         "createdDate": "2023-06-16 10:47:28",         "creatorId": "10gd00000143C5ONGb0y",         "dueDate": "2023-06-30 00:00:00",         "extternalNo": null,         "id": "c6m800000149PUlLziBU",         "isCanced": false,         "isSuspend": false,         "isUpgraded": false,         "origin": "Voice",         "ownerId": "10gg0000013jLh0NEdH6",         "parentId": null,         "priority": "",         "reason": null,         "state": "Processing",         "status": "y",         "stayDate": null,         "suspendAccumulatedTime": null,         "suspendDate": null,         "title": "bb",         "type": "cvmC00000149PQzoNeq0",         "type.__objectType": "AICC__CaseType__CST",         "type.name": "",         "typeName": "bbb"       }     ],     "count": 284   } ]}