OkayAPI Docs


API Path: /api/App/Table/Transfer

API Description: U 在同一个表单内的同一字段,进行点对点同级“转账”操作。例如:把A账号的100积分转到B账号的积分。要求:转出和转入账号纪录已经存在且必须唯一;字段类型和“转账”数量均为整数;符合交换律和零和(即A转给B,然后B再转给A后,恢复和最初的一样)。

2
API Traffic
HTTP/HTTPS
Protocol
GET/POST
Method
UTF-8
Charset
JSON
Response

API Debug   


API Params

ParameterTypeRequiredDefaultNoteDescription
HTTP_APPKEYStringRequiredMIN: 32Common Put Your APPKEY
model_nameStringRequiredYour table Model Name
account_fieldStringRequiredMIN: 1账号字段名称
from_accountStringRequiredMIN: 1转出账号,即对应account_field字段的值,必须存在且唯一
to_accountStringRequiredMIN: 1转入账号,即对应account_field字段的值,必须存在且唯一
amount_fieldStringRequiredMIN: 1数量字段名称,此字段必须为整数类型,例如:tinyint、smallint、int、bigint等
amountIntRequiredMIN: 1待转的数量,必须为整数,且为正整数,且转出账号数量充足

API Debug

KEYREQUIREDVALUE
app_key *Required
model_name *Required
account_field *Required
from_account *Required
to_account *Required
amount_field *Required
amount *Required

API Response

KEYTypeDescription
err_codeInt状态操作码,0成功;1开发类错误;2应用层规则拦截,拦截后可以小白开放平台查看日记;10转出账号不存在;11转出账号不唯一;12转出账号数量不足;20转入账号不存在;21转入账号不唯一
err_msgString错误提示信息,err_code非0时参考此提示信息
from_account_amoutInt成功转移后转出账号的剩余数量
to_account_amoutInt成功转移后转入账号的最新数量
amountInt成功转移后本次转移的数量

HTTP Response Code

HTTP Status CodeDescription
Http Status = 200Success
Http Status = 400Illegal-Params
Http Status = 401Illegal-Token
Http Status = 402IP-Banned
Http Status = 404API-NOT-Exsits
Http Status = 406Illegal-APPKEY
Http Status = 407APPKEY-Expired-Out
Http Status = 408APPKEY-Busy
Http Status = 409Illegal-Sign
Http Status = 413API-Traffic-NOT-Enough
Http Status = 415API-LOCKED
Http Status = 500Internal-Server-Error