建立合作关系
该接口主要为商户提供营销资源的授权能力,可授权给其他商户或小程序,方便商户间的互利合作。
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
partner | object | |
type | string | |
appid | string | |
merchant_id | string | |
authorized_data | object | |
business_type | string | |
stock_id | string | |
headers | object | 声明请求的头参数 |
Idempotency-Key | string | 业务请求幂等值 |
php
$instance->v3->marketing->partnerships->build->postAsync([
'json' => [
'partner' => [
'type' => '',
'appid' => '',
'merchant_id' => '',
],
'authorized_data' => [
'business_type' => '',
'stock_id' => '',
],
],
'headers' => [
'Idempotency-Key' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partnerships/build')->postAsync([
'json' => [
'partner' => [
'type' => '',
'appid' => '',
'merchant_id' => '',
],
'authorized_data' => [
'business_type' => '',
'stock_id' => '',
],
],
'headers' => [
'Idempotency-Key' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partnerships/build']->postAsync([
'json' => [
'partner' => [
'type' => '',
'appid' => '',
'merchant_id' => '',
],
'authorized_data' => [
'business_type' => '',
'stock_id' => '',
],
],
'headers' => [
'Idempotency-Key' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partnerships->build->post([
'json' => [
'partner' => [
'type' => '',
'appid' => '',
'merchant_id' => '',
],
'authorized_data' => [
'business_type' => '',
'stock_id' => '',
],
],
'headers' => [
'Idempotency-Key' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partnerships/build')->post([
'json' => [
'partner' => [
'type' => '',
'appid' => '',
'merchant_id' => '',
],
'authorized_data' => [
'business_type' => '',
'stock_id' => '',
],
],
'headers' => [
'Idempotency-Key' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partnerships/build']->post([
'json' => [
'partner' => [
'type' => '',
'appid' => '',
'merchant_id' => '',
],
'authorized_data' => [
'business_type' => '',
'stock_id' => '',
],
],
'headers' => [
'Idempotency-Key' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
partner | object | |
type | string | |
appid | string | |
merchant_id | string | |
authorized_data | object | |
business_type | string | |
stock_id | string | |
build_time | string | |
create_time | string | |
update_time | string |
参阅 官方文档