Updated on 2023-09-27 GMT+08:00

POST /CCSQM/rest/ccisqm/v1/regularqualitytask/updateQualityTask

Scenario

This interface is invoked to update a scheduled sample inspection plan.

Method

POST

URI

https://Domain name/apiaccess/CCSQM/rest/ccisqm/v1/regularqualitytask/updateQualityTask (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

No

The value is fixed to application/json; charset=UTF-8.

2

x-app-key

String

No

App key

3

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

4

x-UserId

String

Yes

Operator ID

You can sign in to the system and go to the employee management page to view the value of userId returned by an interface.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

appointQuality

Object

Yes

Inspectors to be assigned

1.1.1

setCounts

Array [Object]

Yes

Inspectors

1.1.1.1

count

Number

No

Quantity

  • When setCountsType is not set to 2, count is mandatory.
  • When setCountsType is set to 2, the sum of all counts in setCounts is 100.

1.1.1.2

personID

String

Yes

Inspector ID

1.1.2

setCountsType

Integer

Yes

Quantity type. The options are 0 (on average) and 2 (by percentage).

1.2

cronStructure

Object

Yes

Period

1.2.1

qiqtCycleType

String

Yes

Repetition mode. The options are 1 (daily), 2 (weekly), and 3 (monthly).

1.2.2

qiqtEndTime

Integer

No

End time, in seconds. This parameter is valid when qiqtEndType is set to 2. The value can contain a maximum of 10 digits.

1.2.3

qiqtEndType

String

Yes

End condition. The options are 1 (number of times) and 2 (time).

1.2.4

qiqtStartTime

Integer

Yes

Start time, in seconds. The value can contain a maximum of 10 characters.

1.2.5

qiqtTotalTimes

String

No

Total number of times. The value can contain a maximum of eight characters.

When qiqtEndType is set to 1, qiqtTotalTimes is mandatory.

1.3

currentRole

String

No

User role

1.4

extractionRange

Object

Yes

Sample inspection scope

1.4.1

currentRole

String

No

User role

1.4.2

fixedColumns

Object

Yes

Sample inspection scope

1.4.2.1

qualityNum

String

Yes

Sample inspection quantity. The maximum value is 10000.

1.4.2.2

qualityType

Integer

Yes

Sample inspection type. The options are 1 (call scope), 2 (agent quantity), and 3 (agent percentage).

1.4.2.3

durationStart

Integer

No

Minimum call duration, in milliseconds. The value can contain a maximum of 11 characters.

1.4.2.4

qualityCondition

Integer

Yes

Sample inspection status. The options are 0 (unlimited), 1 (not sampled), and 2 (sampled).

1.4.2.5

durationEnd

String

No

Maximum call duration, in milliseconds. The value can contain a maximum of 11 characters.

1.4.2.6

maxNum

String

No

Maximum sample inspection quantity. The maximum value is 10000.

When qualityType is not set to 2, maxNum is mandatory and must be greater than or equal to 1.

1.4.2.7

scoreEnd

String

No

Maximum score. The maximum value is 10000.

1.4.2.8

scoreStart

String

No

Minimum score. The maximum value is 10000.

1.4.2.9

staffIds

Array [String]

No

Agents

1.4.2.10

interactionType

Integer

Yes

Inspection type

  • 0: recording
  • 1: text

1.4.3

userId

String

No

User ID

1.5

qiqtName

String

Yes

Sample inspection task name. The value can contain a maximum of 64 characters.

1.6

userId

String

No

User ID

1.7

qiqtId

String

Yes

ID of a scheduled sample inspection plan. The value can contain a maximum of 20 characters.

The value is the same as those of regularQualityTaskId and qiqId.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

resultCode

String

No

Return code

  • 0408000: success
  • Others: failure

1.2

resultDesc

String

No

Return description

1.3

objId

String

No

ID of a scheduled sample inspection plan. The value can contain a maximum of 20 characters.

The value is the same as those of regularQualityTaskId and qiqId.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: Update a scheduled sample inspection plan.

    Request header:

    Content-Type:application/json  
    x-app-key:xxxx-xxxx-xxxx-xxxx-xxxx  
    x-UserId:xxxx  
    Authorization:Bearer ********************************

    Request parameters:

    {
    	"extractionRange": {
    		"customColumns": null,
    		"fixedColumns": {
    			"qualityCondition": 0,
    			"qualityType": 1,
    			"qualityNum": "100",
    			"staffIds": ["1661409426478500732"],
    			"maxNum": "1",
    			"scoreStart": "10",
    			"scoreEnd": "1100",
    			"durationStart": "10",
    			"durationEnd": "1000",
    			"interactionType": "0"
    		},
    		"currentRole": "qualityInspector"
    	},
    	"appointQuality": {
    		"setCounts": [{
    			"personID": "1661409288298190176",
    			"count": 0
    		}],
    		"setCountsType": 0
    	},
    	"cronStructure": {
    		"qiqtCycleType": "1",
    		"qiqtStartTime": 1661247709,
    		"qiqtEndType": "1",
    		"qiqtTotalTimes": "1",
    		"qiqtEndTime": null
    	},
    	"qiqtName": "Manual 122",
    	"currentRole": "qualityInspector",
    	"qiqtId": 16625163654676154791
    }

    Response header:

    Content-Type: application/json;charset=UTF-8

    Response parameters:

    {
    	"resultCode": "0408000",
            "objId": "16625163654676154791",
    	"resultDesc": "Operation successful."
    }