API Call Address
{域名地址}/api/order/create
Description:{域名地址}
Need to replace it with your domain address, such ashttps://en.anqicms.com/api/order/create
Calling method
POST
Request parameters
Field name |
Type |
Required |
Description |
goods_id |
int |
No |
Product ID |
quantity |
int |
No |
Product Quantity |
details |
object[] |
No |
Multiple product information, goods_id and details must be passed in one |
remark |
string |
No |
Order notes |
type |
string |
No |
Order type, goods, vip |
address |
object |
No |
Recipient address information |
Multiple product information item
Field name |
Type |
Required |
Description |
goods_id |
int |
Yes |
Product ID |
quantity |
int |
Yes |
Product Quantity |
Recipient address information
Field name |
Type |
Required |
Description |
id |
int |
No |
Address ID |
name |
string |
Yes |
Recipient |
phone |
string |
Yes |
Contact phone number |
province |
string |
Yes |
province |
city |
string |
Yes |
city |
country |
string |
Yes |
district |
address_info |
string |
Yes |
detailed_address |
postcode |
string |
Yes |
postal code |
Return parameters
Field name |
Type |
Description |
code |
int |
error code |
msg |
string |
error reason description |
data |
object[] |
result content |
data Result
Field name |
Type |
Description |
id |
int |
ID |
order_id |
string |
Order Number |
payment_id |
string |
Payment流水 ID |
user_id |
int |
User ID |
remark |
string |
Order notes |
type |
string |
Order Type |
Origin Amount |
int |
Order Original Total Amount |
Amount |
int |
Order Actual Total Amount |
paid_time |
int |
Payment Time |
End Time |
int |
Order Estimated Auto Completion Time |
Deliver Time |
int |
Shipment Time |
Finished Time |
int |
Order Completion Time |
discount_amount |
int |
Discount Amount |
seller_id |
int |
Seller ID |
seller_amount |
int |
Seller's Earnings |
share_user_id |
int |
Promoter ID |
share_parent_user_id |
int |
Promoter's Superior ID |
share_amount |
int |
Earnings from promoter |
share_parent_amount |
int |
Earnings from promoter's superior |
express_company |
string |
express company |
tracking_number |
string |
tracking number |
Created Time |
int |
order timestamp |
status |
int |
Order status: -1 Cancelled, 0 Pending payment, 1 Paid, 2 Shipped, 3 Completed, 8 Refunding, 9 Refunded |
refund_status |
int |
refund_status: -1 Refund failed, 0 No refund or in progress, 1 Refunded |
request data example
Parameter |
Value |
goods_id |
188 |
quantity |
1 |
type |
goods |
Return Data Example
{
"code": 0,
"data": {
"id": 46,
"created_time": 1669212548,
"updated_time": 1669212548,
"order_id": "202211232209080046",
"payment_id": "",
"user_id": 1000,
"address_id": 0,
"remark": "英文外贸响应式通用主题wzl-008等",
"type": "goods",
"status": 0,
"refund_status": 0,
"origin_amount": 9900,
"amount": 9900,
"paid_time": 0,
"end_time": 0,
"deliver_time": 0,
"finished_time": 0,
"discount_amount": 0,
"seller_id": 15,
"seller_amount": 7920,
"share_user_id": 0,
"share_parent_user_id": 0,
"share_amount": 0,
"share_parent_amount": 0,
"express_company": "",
"tracking_number": ""
},
"msg": "",
"total": 2
}
Error Code
error code |
Description |
0 |
OK |
-1 |
Error, the reason is indicated in the msg |
1001 |
Not logged in |
1002 |
Unauthorized |
200 |
API request OK |