cps

package
v1.0.0-beta.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cps 返佣商品

Index

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

See: https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=11533749572M9ODP&version=1&lang=zh_CN&platform=2

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)

单个商品信息查询

使用该接口,商户可获取已导入的商品信息,供验证信息及抽查导入情况使用

See: https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=11533749572M9ODP&version=1&lang=zh_CN&platform=2

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)

全量商品信息查询

使用该接口,商户可获取已导入的全量商品信息,供全量验证信息使用

See: https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=11533749572M9ODP&version=1&lang=zh_CN&platform=2

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)

导入或更新结果查询

用于查询导入或更新商品的结果,当导入或更新商品失败时,若为系统错误可进行重试;若为其他错误,请排查解决后进行重试

See: https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&key=11533749572M9ODP&version=1&lang=zh_CN&platform=2

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL