Skip to main content

Update Sub-Merchant Score

1. Update Sub-Merchant Score (Add / Subtract)​

Interface Path​

  • POST
  • /api/agent/score/update

Description​

  • Update the score for a specified sub-merchant. A positive score value adds points; a negative value deducts points.
  • The caller can only modify scores for their direct sub-merchants.

Request Parameters​

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
sub_agent_idSub-Merchant IDstringRequiredID of the sub-merchant to update
currencyCurrencystringRequiredCurrency
scoreScore DeltastringRequiredScore change amount; positive to add, negative to subtract, e.g. "100" or "-50"
timestampCurrent Timestampint64RequiredTimestamp when calling the interface (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSignature algorithm details in the interface description

Response Parameters​

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--agent_idSub-Merchant IDstringSub-Merchant ID
--currencyCurrencystringCurrency

Request Example​

curl --location 'https://staging.aig1234.com/api/agent/score/update' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"sub_agent_id": "agent002",
"currency": "USD",
"score": "100",
"timestamp": 1732589849000,
"sign": "6d39491fb4195d392dc3d53bf6c88138"
}'

Response Example​

{
"code": 200,
"message": "success",
"data": {
"agent_id": "agent002",
"currency": "USD"
}
}

Error Codes​

200    Success
408000 Request Parameter Error
408003 Whitelist Restriction
600100 Invalid Signature
600101 Invalid Parameter
600106 Database Operation Failed
700101 Merchant Does Not Exist