Skip to content

查询合作关系列表

该接口主要为商户提供合作关系列表的查询能力。

请求参数类型描述
queryobject声明请求的查询参数
partnerstring合作方信息JSON格式字符串
typestring合作方类别
APPID | MERCHANT 枚举值之一
appidstring合作方APPID
merchant_idstring合作方商户ID
authorized_datastring被授权数据JSON格式字符串
business_typestring授权业务类别
FAVOR_STOCK | BUSIFAVOR_STOCK 枚举值之一
stock_idstring授权批次ID
limitinteger分页大小
offsetinteger分页页码
php
$instance->v3->marketing->partnerships->getAsync([
  'query' => [
    'partner'         => '{"type":"APPID","appid":"wx4e1916a585d1f4e9"}',
    'authorized_data' => '{"business_type":"FAVOR_STOCK","stock_id":"2433405"}',
    'limit'           => 50,
    'offset'          => 0,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partnerships')->getAsync([
  'query' => [
    'partner'         => '{"type":"APPID","appid":"wx4e1916a585d1f4e9"}',
    'authorized_data' => '{"business_type":"FAVOR_STOCK","stock_id":"2433405"}',
    'limit'           => 50,
    'offset'          => 0,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partnerships']->getAsync([
  'query' => [
    'partner'         => '{"type":"APPID","appid":"wx4e1916a585d1f4e9"}',
    'authorized_data' => '{"business_type":"FAVOR_STOCK","stock_id":"2433405"}',
    'limit'           => 50,
    'offset'          => 0,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partnerships->get([
  'query' => [
    'partner'         => '{"type":"APPID","appid":"wx4e1916a585d1f4e9"}',
    'authorized_data' => '{"business_type":"FAVOR_STOCK","stock_id":"2433405"}',
    'limit'           => 50,
    'offset'          => 0,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partnerships')->get([
  'query' => [
    'partner'         => '{"type":"APPID","appid":"wx4e1916a585d1f4e9"}',
    'authorized_data' => '{"business_type":"FAVOR_STOCK","stock_id":"2433405"}',
    'limit'           => 50,
    'offset'          => 0,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partnerships']->get([
  'query' => [
    'partner'         => '{"type":"APPID","appid":"wx4e1916a585d1f4e9"}',
    'authorized_data' => '{"business_type":"FAVOR_STOCK","stock_id":"2433405"}',
    'limit'           => 50,
    'offset'          => 0,
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
dataobject[]合作关系结果集
partnerobject合作方信息
typestring合作方类别
appidstring合作方APPID
merchant_idstring合作方商户ID
authorized_dataobject被授权数据
business_typestring授权业务类别
stock_idstring授权批次ID
build_timestring建立合作关系时间
terminate_timestring终止合作关系时间
create_timestring创建时间
update_timestring更新时间
limitinteger分页大小
offsetinteger分页页码
total_countinteger总数量

参阅 官方文档

Published on the GitHub by TheNorthMemory