Skip to content

建立合作关系

该接口主要为商户提供营销资源的授权能力,可授权给其他商户或小程序,方便商户间的互利合作。

请求参数类型描述
jsonobject声明请求的JSON数据结构
partnerobject
typestring
appidstring
merchant_idstring
authorized_dataobject
business_typestring
stock_idstring
headersobject声明请求的头参数
Idempotency-Keystring业务请求幂等值
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));
返回字典类型描述
partnerobject
typestring
appidstring
merchant_idstring
authorized_dataobject
business_typestring
stock_idstring
build_timestring
create_timestring
update_timestring

参阅 官方文档

Published on the GitHub by TheNorthMemory