# Directional planning interface

Interface Name Introductions
For details of the Targeted Programme Enables Tweeters to get targeted plan details via this interface
Application for Orientation Program Support Twitter applications to join targeted programs
Query Directed Plan Application Status Support Twitter to get targeted program application status

# 1. For details of targeted schemes

# Interface Dxplaination

Follow the plan invitation link for more information on targeted plans

# Request address

GET https://api.weixin.qq.com/union/promoter/target/plan_info?access_token=ACCESS_TOKEN

# Request parameters

attribute type Default values Required Introductions
access_token string yes Interface calling credential
planInvitationUrl string yes Directed Program Invitation Links

# Return value

# Object

attribute type Introductions
Errcode number Error code
errmsg string Error message
targetPlanInfo object Directional Plan Data
productListInfo Array.&ltObject&gt Targeted Program Product Data

targetPlanInfo Structure

attribute type Introductions
planId string Plan ID
planStatus string Planned status
planName string Project Name
planDesc string Plan description
planStartTime number Schedule start time (timestamp)
planEndTime number Schedule end time (timestamp)
extInfo string Basic Information of Your Shop

planStatus Enumeration of

value type Introductions
0 number Not in force
1 number effective
2 number Invalid

productListInfo Structure

attribute type Introductions
planId string Plan ID
productId string Goods ID
productStatus number Status of goods
commissionRatio number Commission rate
productDetailInfo object Product information
leagueExInfo object Commission information
couponInfo object Coupon Information

productDetailInfo Structure

attribute type Introductions
title string Product Title
subTitle string Product Subtitle
headImg Array.&ltstring&gt Product master chart
category Array.&ltstring&gt Product category
category[].catId Object Category ID
category[].name Object Category Name
brand string Brand name
brandId string Brand ID
model string model
detail Object Detailed Product Data
detail.detailImg Array.&ltstring&gt Picture of the day
param Array.&ltObject&gt Commodity parameter
minPrice number Minimum price of goods per unit
totalStockNum number Total inventory
totalSoldNum number Cumulative sales
skus Array.&ltObject&gt Products SKU
skus[].skuId string Products SKU ID
skus[].productSkuInfo.thumbImg string Products SKU Small map
skus[].productSkuInfo.salePrice Object Products SKU Sales Price, Unit Points
skus[].productSkuInfo.marketPrice Object Products SKU Market price, unit cent
skus[].productSkuInfo.stockInfo.stockNum number Products SKU stock

leagueExInfo Structure

attribute type Introductions
hasCommission number Is there a commission? 1/0
commissionRatio number Commission ratio, 1 / 10,000
commissionValue number Commission amount per unit

couponInfo Structure

attribute type Introductions
hasCoupon number Whether there is a union coupon, 1 for coupons, 0 for all goods
couponId string Ticket id
couponDetail Object Voucher Details

couponDetail Structure

attribute type Introductions
restNum number Coupon stock
type number Coupon Type
discountInfo Object Coupon denomination
validInfo Object period of validity
receiveInfo Object Coupon Collection Time

discountInfo Structure

attribute type Introductions
discountCondition.productIds[] string Designated goods id
discountCondition.productCnt number Number of goods
discountCondition.productPrice number Amount of merchandise
discountNum number Number of discounts, such as 5.1 fold for 5.1 * 1000
discountFee number Amount reduced in points

validInfo Structure

attribute type Introductions
validType number Type of expiry, 1 Specify a time interval for the product, 2 Number of effective days
validDayNum number Days of entry into force
startTime string Effective Start Time
endTime string Effective end time

receiveInfo Structure

attribute type Introductions
startTime string Start Time Stamp
endTime string Receive end time stamp
limitNumOnePerson number Limited number of tickets per person

# Return Example

{
    "errcode": 0,
    "errmsg": "ok",
    "targetPlanInfo": {
        "planId": "1964112935262240768",
        "planStatus": 1,
        "planName": "TEST Orientation Program CR,"
        "planDesc": "TEST Orientation Program CR,"
        "planStartTime": 1629216000,
        "planEndTime": 1630166399,
        "extInfo": {
            "bizBasicInfo": {
                "headimgurl": " http://wx.qlogo.cn/mmhead/Q3auHgzwzM77ia7ibuPAQBJgME8gFF9APicaSpd7evrLCVb5hn2zsUBOw",
                "nickname": "Pork belly shop,"
                "appid" :  "wxb825f130c284597f"
            },
            "data": {}
        }
    },
    "productListInfo": [
        {
            "planId": "1964112935262240768",
            "productId": "37610006",
            "productStatus": 1,
            "commissionRatio": 700,
            "productDetailInfo": {
                "headImg": [
                    "https://store.mp.video.tencent-cloud.com/161/20304/snscosdownload/SZ/reserved/60a77aac00065bee000000006a849d09000000a000004f50"
                ],
                "category": [
                    {
                        "catId": "1208",
                        "name": "Pet Life"
                    },
                    {
                        "catId": "1224",
                        "name": "Cat and dog trips." 
                    },
                    {
                        "catId": "1227",
                        "name": "Pet footwear."
                    }
                ],
                "param": [],
                "attr": [],
                "shopcatId": [],
                "qualificationUrl": [],
                "thirdCategoryHistories": [],
                "headVideoInfo": [],
                "labels": [],
                "title": "New goods ha ha,"
                "subTitle": "",
                "model": "",
                "detail": {
                    "detailImg": [],
                    "detailVideos": [],
                    "detailVideoInfo": [],
                    "desc": ""
                },
                "brandId": "2100000000",
                "skuIdList": {
                    "skuIds": [
                        "77255098"
                    ]
                },
                "skuList": {
                    "skuInfo": [
                        {
                            "skuId": "77255098",
                            "price": 110
                        }
                    ],
                    "minPrice": 110,
                    "maxPrice": 110
                },
                "listingTime": "1626181943",
                "totalStockNum": "128",
                "serviceDesc": {
                    "serviceList": [],
                    "desc": ""
                },
                "expressInfo": {
                    "templateId": "37926"
                },
                "totalSoldNum": "2",
                "appidForMedia": "wx4aedf8c9edf9fd72",
                "snapshotInfo": {
                    "snapshotId": "0"
                },
                "totalOrderNum": "2",
                "totalVisitNum": "1",
                "uploadSource": 5,
                "spuLimited": {
                    "periodType": 0,
                    "limitedBuyNum": 0
                },
                "originUploadSource": 1,
                "groupbuyInfo": {
                    "skuList": []
                },
                "virtualType": 0,
                "productType": 1
            },
            "leagueExInfo": {
                "hasCommission": 1,
                "commissionRatio": 700,
                "commissionValue": 7,
                "banBizuin": 0,
                "banCategory": 0,
                "banProduct": 0
            },
            "couponInfo": {
                "allCouponIds": [],
                "hasCoupon": 0,
                "couponId": "0",
                "discount": "0"
            }
        }
    ]
}

# Error code

value Introductions
202002 There's no plan.

# 2. Application for Targeted Programs

# Interface Dxplaination

Application for Orientation Program

# Request address

POST https://api.weixin.qq.com/union/promoter/target/apply_target?access_token=ACCESS_TOKEN

# Request parameters

attribute type Default values Required Introductions
access_token string yes Interface calling credential
planId string yes Directed plan ID (base64 format)
applyReason string yes Reasons for application

# POST Data example

{
  "planId": "123LKAJSDLKJSADLKwqij21dsdsdsd312joewq=",
  "applyReason": "Why Twitter Wants to Join"
}

# Return value

# Object

attribute type Introductions
Errcode number Error code
errmsg string Error message

# Return Example

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

# Error code

value Introductions
202001 The plan has expired.
202002 There's no plan.
202004 Twitter has applied for the program
202006 Tweeters Apply for Program Reasons Exceeding the Length Limit

# 3. Query Directed Plan Application Status

# Interface Dxplaination

Check the status of Twitter applications for targeted programs

# Request address

GET https://api.weixin.qq.com/union/promoter/target/apply_status?access_token=ACCESS_TOKEN

# Request parameters

attribute type Default values Required Introductions
access_token string yes Interface calling credential
planId string yes Directed plan ID (base64 format)

# Return value

# Object

attribute type Introductions
Errcode number Error code
errmsg string Error message
data object Application Status Data

data Structure

attribute type Introductions
planId string Plan ID
promoterStatus number Status of application
applyTime number Time of application (time stamp)
joinTime number Join time (timestamp)
applyReason string Reasons for application
rejectTime number Reject time (timestamp)

promoterStatus Enumeration of

value type Introductions
0 number Can sign up
1 number Pending audit
2 number Agreed
3 number Rejected
999 number No registration

# Return Example

{
    "errcode": 0,
    "errmsg": "ok",
    "data": {
        "planId": "1964112935262240768",
        "promoterStatus": 1,
        "applyTime": 1626692835,
        "joinTime": 0,
        "applyReason": 'causes',
        "rejectTime": 0,
        "removeTime": 0
    }
}

# Error code

value Introductions
202001 The plan has expired.
202002 There's no plan.
202005 This Twitter user did not apply for a program