# Create and send gifts

Create and send a small shop authorized gift item to a specified user through this interface

# Dxplaination of Interface Call Request

http请求方式: POST
https://api.weixin.qq.com/channels/ec/order/presentorder/create?access_token=ACCESS_TOKEN

# Dxplaination of request parameters

Parameter Name type Is it compulsory? describe
activity_id string yes Activity id
openid string yes User openid
shop_appid string yes Cooperative shop AppID
wishmessage string yes Gift Blessing Information, Maximum 100 Characters
product_id string yes Designate commodities for activity
sku_id string yes Designated activity sku

# Example Requests

{
    "activity_id": "22123",
    "openid": "oDiTs6x9ccP19TfQH5OvKOWeXAeo",
    "shop_appid": "wxxxxxxxxxxxxxxxxx",
    "wishmessage": "祝福你",
    "product_id": "10000239729501",
    "sku_id": "3623160014"
}

# Return parameter explaination

Parameter Name type Is it compulsory? describe
errcode number yes Error code
errmsg string yes Error message
present_order_id string yes Gift Sheet ID

# Return an example

{
    "errcode": 0,
    "errmsg": "ok",
    "present_order_id": "4226341196275658752"
}

# Error code

Error code describe Introductions
0 success
40097 Parameter Error The request parameter does not conform to the specification
108002 The condition of the product is abnormal Off shelves / irregularly on sale / governed not to be purchased
608016 This item is not in the gift pool Goods are not included in the Event Gift Pool
608010 The platform's risk control test failed. Triggering platform risk control rules
608021 Goods gift prices are too high Limit of more than 20,000 yuan
6080060 Gift portions exceeded preset activity inventory Exceeding activity inventory limits
6080061 Gift giving merchandise Non-preset event merchandise Goods don't match up with activity configuration
Other Error Codes See the Common Error Code for more details Base system errors / interface call failures / permissions issues, etc.