# Targeted Planning Interface

Interface Name Introductions
Find out more about the targeting program Supports Twitter to obtain detailed information about targeted initiatives through this interface
Apply to join a targeted program Support Twitter applicants to join a targeted program
Check the status of a targeted program application Status of applications supporting Twitter access to targeted programs

# 1. Find out more about the targeting program

# Interface Dxplaination

Follow the program invitation link for details of the targeted program

# Request address

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

# Request parameters

attribute type Default values Required to fill in Introductions
access_token string yes Interface call credentials
planInvitationUrl string yes Links to invitations for targeted programs

# Return value

# Object

attribute type Introductions
errcode number Error code
errmsg string Error message
targetPlanInfo object Targeted planning data
productListInfo Array. Targeted programmes for product data

Structure of targetPlanInfo

attribute type Introductions
planId string Plan ID
planStatus string Plan Status
planName string Program Name
planDesc string Plan description
planStartTime number Plan a start time (timestamp)
planEndTime number Planned end time (timestamp)
extInfo string Basic information about the store you belong to

Enumeration of planStatus

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

Structure of productListInfo

attribute type Introductions
planId string Plan ID
productId string Goods ID
productStatus number Condition of product
commissionRatio number Commission Rate
productDetailInfo object Product Information
leagueExInfo object Commission Information
couponInfo object Coupon Information

Structure of productDetailInfo

attribute type Introductions
title string Item Title
subTitle string Sub-Title of product
headImg Array. Main picture of commodities
category Array. Categories of goods
category[].catId Object Category ID
category[].name Object Category Name
brand string Brand Name
brandId string Brand ID
model string model
detail Object Item Detailed Data
detail.detailImg Array. Item Details Photo
param Array. Commodity parameters
minPrice number Minimum price of commodities, unit
totalStockNum number Total inventory
totalSoldNum number Cumulative sales
skus Array. Product SKU
skus[].skuId string Product SKU ID
skus[].productSkuInfo.thumbImg string Product SKU Map
skus[].productSkuInfo.salePrice Object Product SKU sales price, unit points
skus[].productSkuInfo.marketPrice Object Product SKU market price, per cent
skus[].productSkuInfo.stockInfo.stockNum number Product SKU Inventory

Structure of leagueExInfo

attribute type Introductions
hasCommission number Is there a commission? 1 / 0
commissionRatio number Commission ratio, one thousandth of a million
commissionValue number Amount of commission, unit

Structure of couponinfo

attribute type Introductions
hasCoupon number Is there a Union voucher? 1 is a couponed item and 0 is a total item?
couponId string Ticket ID
couponDetail Object Ticket Details

Structure of couponDetail

attribute type Introductions
restNum number Inventory of coupons
type number Types of tickets
discountInfo Object The note size
validInfo Object period of validity
receiveInfo Object Availability of tickets

Structure of discountInfo

attribute type Introductions
discountCondition.productIds[] string Specify product id
discountCondition.productCnt number Number of goods
discountCondition.productPrice number Amount of goods
discountNum number Number of discounts, such as 5.1 Discount is 5.1 * 1000
discountFee number The amount directly reduced is in units

Structure of validInfo

attribute type Introductions
validType number Type of period of validity, 1 Specify a time period for the product, 2 Number of days of validity
validDayNum number Number of days in effect
startTime string Valid start time
endTime string Valid end time

Structure of receiveInfo

attribute type Introductions
startTime string Get a Start Time Stamp
endTime string Get the end time stamp
limitNumOnePerson number Limit on number of cards per person

# Return an example

{
    "errcode": 0,
    "errmsg": "ok",
    "targetPlanInfo": {
        "planId": "1964112935262240768",
        "planStatus": 1,
        "planName": "TEST定向计划CR",
        "planDesc": "TEST定向计划CR",
        "planStartTime": 1629216000,
        "planEndTime": 1630166399,
        "extInfo": {
            "bizBasicInfo": {
                "headimgurl": "http://wx.qlogo.cn/mmhead/Q3auHgzwzM77ia7ibuPAQBJgME8gFF9APicaSpd7evrLCVb5hn2zsUBOw",
                "nickname": "猪腩肉小商店",
                "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": "宠物生活"
                    },
                    {
                        "catId": "1224",
                        "name": "猫狗出行"
                    },
                    {
                        "catId": "1227",
                        "name": "宠物鞋服"
                    }
                ],
                "param": [],
                "attr": [],
                "shopcatId": [],
                "qualificationUrl": [],
                "thirdCategoryHistories": [],
                "headVideoInfo": [],
                "labels": [],
                "title": "新商品哈哈中",
                "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 The plan didn't exist.

# 2. Apply to join a targeted program

# Interface Dxplaination

Apply to join a targeted 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 to fill in Introductions
access_token string yes Interface call credentials
planId string yes Targeted Plan ID (base64 format)
applyReason string yes Reasons for the application

# Examples of POST data

{
  "planId": "123LKAJSDLKJSADLKwqij21dsdsdsd312joewq=",
  "applyReason": "推客申请加入原因"
}

# Return value

# Object

attribute type Introductions
errcode number Error code
errmsg string Error message

# Return an example

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

# Error code

value Introductions
202001 The plan has expired.
202002 The plan didn't exist.
202004 Hackers have applied for the program.
202006 Reasons for Twitter Applications to Plan Exceed Length Limits

# 3. Check the status of a targeted program application

# Interface Dxplaination

Check the status of a tweet applying for a targeted program

# Request address

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

# Request parameters

attribute type Default values Required to fill in Introductions
access_token string yes Interface call credentials
planId string yes Targeted Plan ID (base64 format)

# Return value

# Object

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

Structure of data

attribute type Introductions
planId string Plan ID
promoterStatus number Status of application
applyTime number Apply time (timestamp)
joinTime number Joined time (timestamp)
applyReason string Reasons for the application
rejectTime number Reject time (timestamp)

Enumeration of promoterStatus

value type Introductions
0 number You can sign up.
1 number To be reviewed
2 number I have agreed
3 number I have refused.
999 number No registrations can be made

# Return an example

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

# Error code

value Introductions
202001 The plan has expired.
202002 The plan didn't exist.
202005 The tweeter didn't apply for the plan