Set Battle Score
Feature Description
The app admin can use this API to set the scores of the rooms in Battle.
API Call Description
Request URL Sample:
https://xxxxxx/v4/live_engine_http_pk/set_battle_score?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
Description Of Request Parameters
The table below only lists the parameters involved in modifying when calling this API and their descriptions.
Parameters  | Description  | 
xxxxxx  | The exclusive domain name corresponding to the country/region of SDKAppID:  China:  console.tim.qq.comSingapore:  adminapisgp.im.qcloud.comUnited States:  adminapiusa.im.qcloud.com | 
v4/live_engine_http_pk/set_battle_score  | Request API  | 
sdkappid  | The SDKAppID assigned by the Chat console when creating an application  | 
identifier  | |
usersig  | |
random  | Please enter a random 32-bit unsigned integer, value range 0 - 4294967295  | 
contenttype  | The request format has a fixed value of  json | 
Maximum Call Frequency
200 times/second.
Request Packet Sample
Basic form
{"BattleId":"HuYM036AMk2JJeSUgnv5H0KDJpc+HXfqTAtGuYWzRPs=","OpType":1,"ScoreList":[{"RoomId":"pk-live1","Score":100},{"RoomId":"pk-live2","Score":100}]}
Request Packet Field Description
Field  | Type  | Attribute  | Description  | 
BattleId  | String  | Required  | The ID of battle  | 
OpType  | String  | Required  | Set type: 1 for accumulate, 2 for overwrite setting  | 
ScoreList  | Array  | Required  | Set score list  | 
RoomId  | String  | Required  | Room ID  | 
Score  | Integer  | Required  | The score corresponding to the room  | 
Example Of a Response Packet Body
Basic form
{"ErrorCode": 0,"ErrorInfo": "","ActionStatus": "OK","RequestId": "Id-e7625183568d4058bd48c9924d4b1ed7-O-Seq-125382","Response": {"Result": [{"RoomId": "pk-3","ResultCode": 0},{"RoomId": "pk-4","ResultCode": 0}]}}
Response Packet Field Description
Field  | Type  | Description  | 
ErrorCode  | Integer  | Error code, 0 indicates success, non-zero indicates failure.  | 
ErrorInfo  | String  | Error message.  | 
ActionStatus  | String  | Result of request processing, OK indicates success, FAIL indicates failure.  | 
RequestId  | String  | Unique request ID, returned with each request, needed for troubleshooting.  | 
Result  | Array  | Operation Result  | 
ResultCode  | Integer  | Result, 0 indicates successful setting, 1 indicates a non-existent room.  | 
RoomId  | String  | Room ID  | 
Error Code Description
Unless a network error occurs (such as a 502 error), the HTTP return code for this API is always 200. The actual error code and error message are in the response packet body. Represented by `ErrorCode` and `ErrorInfo`.
The private error codes of this API are as follows:
Error Code  | Description  | 
100001  | Server internal error, please retry.  | 
100002  | The parameter is invalid. Check whether the request is correct according to the error description.  | 
100006  | The current PK has not started or has ended yet, and it is not allowed to set the score again.  |