Documentation ¶
Overview ¶
Package cps 返佣商品
Index ¶
- func ProductAdd(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func ProductGetInfo(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func ProductGetInfoByPage(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
- func ProductStatus(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProductAdd ¶
func ProductAdd(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
导入/更新商品
每次调用支持批量导入不超过1000条的商品信息。每分钟单个商户全局调用次数不得超过200次。每天调用次数不得超过100万次。每次请求包大小不超过2M
POST https://api.weixin.qq.com/scan/product/v2/add?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/cps" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := cps.ProductAdd(ctx, payload) fmt.Println(resp, err) }
Output:
func ProductGetInfo ¶
func ProductGetInfo(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
单个商品信息查询
使用该接口,商户可获取已导入的商品信息,供验证信息及抽查导入情况使用
POST https://api.weixin.qq.com/scan/product/v2/getinfo?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/cps" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := cps.ProductGetInfo(ctx, payload) fmt.Println(resp, err) }
Output:
func ProductGetInfoByPage ¶
func ProductGetInfoByPage(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
全量商品信息查询
使用该接口,商户可获取已导入的全量商品信息,供全量验证信息使用
POST https://api.weixin.qq.com/scan/product/v2/getinfobypage?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/cps" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := cps.ProductGetInfoByPage(ctx, payload) fmt.Println(resp, err) }
Output:
func ProductStatus ¶
func ProductStatus(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)
导入或更新结果查询
用于查询导入或更新商品的结果,当导入或更新商品失败时,若为系统错误可进行重试;若为其他错误,请排查解决后进行重试
POST https://api.weixin.qq.com/scan/product/v2/status?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/fastwego/offiaccount" "github.com/fastwego/offiaccount/apis/cps" ) func main() { var ctx *offiaccount.OffiAccount payload := []byte("{}") resp, err := cps.ProductStatus(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.