open.ovopark.pos.sendOrder (Order data reporting (supports agent authority))Sandbox debugging
Order data reporting (supports agent authority), agent authority is obtained according to [authority API] open.gateway.getBusinessOrg interface
Interface description#
The environment | Interface method | Submission method | Do you need a signature | HTTP request routing |
---|---|---|---|---|
Formal environment | open.ovopark.pos.sendOrder | POST | true | http://openapi.opretail.com/m.api |
Common request parameters#
Parameters | Types of | Is required | The maximum length | Description | Example values |
---|---|---|---|---|---|
_aid | String | True | 20 | Open platform system number, fixed to S107 | S107 |
_akey | String | True | 20 | Opretail open platform assigns developer keys to third parties | Obtained after certification of platform developer |
_mt | String | True | 100 | Interface name | open.ovopark.pos.sendOrder |
_sm | String | True | 100 | Signature algorithm md5,sha1 | md5 |
_requestMode | String | True | 100 | Request method post,get | POST |
_version | String | True | 100 | Version number | v2 |
_timestamp | String | True | 100 | Timestamp | yyyyMMddHHmmss format |
_sig | String | True | 32 | Signature token | Generated according to the signature algorithm, see the signature algorithm rules for details |
_format | String | False | 10 | Format type | Currently only supports json by default |
Business request parameters#
Parameters | Types of | Is required | The maximum length | Description | Example values |
---|---|---|---|---|---|
orgId | int | √ | 11 | Open platform enterprise id | 1 |
enterpriseId | int | √ | 11 | Business platform enterprise id | 1 |
iposJson | JSON | √ | json string of pos data object | View | |
string | √ | 60 | Store id three-party store id | DM001 | |
int | √ | 20 | Wandian palm store id (shopId and depId must be passed one, both fields are passed the depId value) | 12 | |
string | × | 512 | Store name | Suzhou Center Flagship Store | |
string | √ | 60 | Cashier id (this field must be passed if you need to use the ticket superimposition function to associate the cashier with video traceback | 001 | |
int | × | 20 | Cashier id | 1 | |
string | × | 100 | Cashier name | Zhang San | |
int | × | 20 | Shopping guide id | 121 | |
string | × | 100 | Shopping guide number | dm0011 | |
string | √ | 60 | order number | dm265462654610 | |
string | √ | 60 | Order time, time stamp, seconds (not milliseconds, note) | 1553187235 | |
string | × | 50 | membership card | 00121 | |
double | × | 15,2 | Guide price | 12.33 | |
double | √ | 15,2 | Actual transaction price [small ticket overlay details display] | 11.22 | |
double | × | 15,2 | Collection | 11.22 | |
double | × | 15,2 | Change | 1.1 | |
int | × | 3 | Whether to return (1: return, 0: non-return) | 0 | |
JSON | √ | Product information | View | ||
string | √ | 60 | Product Number | p0124 | |
string | √ | 100 | Product name [Small ticket overlay details display] | Cola | |
double | √ | 15,2 | Quantity [Small ticket overlay details display] | 2 | |
double | √ | 15,2 | Guide price [small ticket overlay details display] | 2.5 | |
double | √ | 15,2 | Unit price [Small ticket overlay details display] | 2.5 | |
double | √ | 15.2 | Discount [Ticket overlay details display] | 0.3 | |
double | √ | 15,2 | Actual transaction price [small ticket overlay details display] | 2.2 | |
string | × | 60 | Color number | 0202 | |
string | × | 60 | Color name | red | |
string | × | 60 | Size number | 1 | |
string | × | 60 | Size name | 1 | |
JSON | √ | Payment methods | View | ||
string | √ | 32 | Payment type [Small ticket overlay details display] | 1 | |
string | √ | 32 | Payment name [Small ticket overlay details display] | cash | |
double | √ | 15.2 | Amount [Small ticket overlay details display] | 1.33 |
Common response parameters#
Parameters | Types of | The maximum length | Description | Example values |
---|---|---|---|---|
stat | JSON | - | Gateway status (specific parameters are described below :) | View |
stat.cid | String | 100 | Http request identifier | |
stat.code | String | 100 | Gateway return code | |
stat.codename | String | 100 | Gateway return code name | |
stat.systime | String | Long | The current time of the interface call | |
result | String | 100 | Interface returns prompt information | |
data | JSON | - | Business information returned by the interface call (generally json format data, the specific data format will be defined in the business return parameters) | View |
Business return parameters#
Parameter | Types of | Whether to return | Returns the maximum length | Description | Example values |
---|
Public return code#
Return code name | Return code | Return code description | Solution |
---|---|---|---|
SUCCESS | 0 | Call success | |
KEY_NOTNULL | 1 | _akey can not be empty | Input the _akey parameter when the interface is called |
KEY_UNLAWFUL | 2 | _akey is illegal | key is illegal, input in the correct key |
KEY_HAS_EXPIRED | 3 | _akey has expired | Please renew the service or contact the platform administrator |
SIGN_METHOD_NOTNULL | 4 | _sm parameter cannot be empty | Input the _sm parameter when the interface is called |
SIGN_TYPE_NOTEXIST | 5 | _sm type does not exist | Currently only supports md5, sha1 |
SIGN_NOTNULL | 6 | _sig parameter cannot be empty | Input the _sig parameter when the interface is called |
SIGN_WRONG | 7 | Invalid signature, please check parameters and signature format | _sig value is generated according to the signature algorithm |
METHOD_NOTNULL | 8 | _mt parameter cannot be empty | Input the _mt parameter when the interface is called |
METHOD_NOTEXIST_CODE | 9 | The method name corresponding to _mt does not exist or is not registered in the service | Check if the method corresponding to _mt method name and _version version number is passed in error |
REQUESTMODE_NOTNULL | 10 | _requestMode parameter cannot be empty | Input the _requestMode parameter when the interface is called |
APPLICATIONID_NOTNULL | 11 | _aid parameter cannot be empty | Input the _aid parameter when the interface is called |
APPLICATIONID_NOTSAME | 12 | _aid does not match the current key | _aid and _akey must correspond one-to-one |
VERSION_NOTNULL | 13 | _version version number cannot be empty | Input the _version parameter when the interface is called |
TIMESTAMP_NOTNULL | 14 | _timestamp timestamp cannot be empty | Input the _timestamp parameter when the interface is called |
TIMESTAMP_FORMAT_ERROR | 15 | _timestamp timestamp formatting error | According to yyyyMMddHHmmss format |
TIMESTAMP_OVERTIME | 16 | _timestamp has expired | _timestamp is regenerated every time the interface is called |
FORMAT_TYPE_NOTEXIST | 17 | _format type does not exist | Currently only supports json (default), xml |
API_CALL_REPEAT | -100 | The interface is called repeatedly | Interface platform call exception |
API_SYSTEM_CALL_ERROR | -500 | API call failed, system exception occurred | Interface platform call exception |
UNKNOWN_ERROR | -999 | Open platform system exception | Reissue request |
Business return code#
Return code name | Return code | Return code description |
---|---|---|
OPEN_USER_IS_NULL | 206001 | Open platform users do not exist |
BUSINESS_PLATFORM_UNBOUND | 206003 | Business platform is not bound, please contact customer service |
DEPARTMENT_NOT_EXIST | 206004 | Department does not exist |
ORGANIZATIONAL_MISMATCH | 206005 | Organizational structure mismatch |
AGENT_PERMISSION_DENIED | 206006 | Agent does not have this enterprise permission |
BUSINESS_BASE_ERROR | 206999 | business-base service call exception |
ORDER_NUMBER_DUPLICATION | 208003 | Duplicate order number |
API_SERVICE_ERROR | 999999 | api service unknown exception |