YunShang API

Platform Admin API

The Platform Admin API provides account balance queries, real-name status queries, call log queries, product list queries, sales price queries, online purchase and order queries. All endpoints share a single entry point and are authenticated with global application credentials. Restricted to sales/admin roles.

API info

ItemValue
EndpointPOST /api.php
AuthenticationGlobal APP ID / APP KEY
Role restrictionSales / admin only
Request formatapplication/json
Response formatapplication/json

Common request parameters

ParameterTypeRequiredDescription
actionstringYesEndpoint action, see the list below
app_idstringYesGlobal APP ID
app_keystringYesGlobal APP KEY

Sample global credentials (for documentation only — replace with your own):

app_id: 68B0FA47FEC9E7EBC4BF80F8
app_key: 2b901515a427b6c0b68f866eece70e0d2ecf687146022412

Supported actions

actionFeatureDescription
balanceBalanceReturns the current account balance
realname_statusReal-name statusReturns whether the account is verified
productsProduct listReturns all enabled products
sales_pricesSales pricesReturns original and sales prices
ordersOrdersReturns purchase records (with dedicated APP credentials)
call_logsCall logsReturns API call logs
buyBuyPurchases a package per-call, returns order and credentials

Common response structure

FieldTypeDescription
codeintStatus code, 0 means success
msgstringMessage
datamixedResponse data, structure varies by endpoint

Error codes

CodeDescription
0Success
1001Invalid parameters
1002Authentication failed
1003No permission (not sales/admin)
1004Resource not found
1005Insufficient balance
1006Internal error

Notes

  • All requests must use POST with Content-Type: application/json
  • Global credentials are created in the "Applications" section of the console and are limited to sales/admin roles
  • The buy endpoint supports package-priced APIs only; buyout APIs cannot be purchased per-call
  • Order and call log queries support pagination; limit max is 50
  • All amount fields use 4-decimal precision
  • Dedicated APP IDs/KEYS are used for sub-application login and API calls — keep them safe
  • When code is not 0, debug based on the msg field