跳转到主要内容
PATCH
https://api.aisa.one/apis/v1
/
apollo
/
accounts
/
{account_id}
更新账户
curl --request PATCH \
  --url https://api.aisa.one/apis/v1/apollo/accounts/{account_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "domain": "<string>",
  "owner_id": "<string>",
  "account_stage_id": "<string>",
  "raw_address": "<string>",
  "phone": "<string>",
  "typed_custom_fields": {}
}
'
import requests

url = "https://api.aisa.one/apis/v1/apollo/accounts/{account_id}"

payload = {
    "name": "<string>",
    "domain": "<string>",
    "owner_id": "<string>",
    "account_stage_id": "<string>",
    "raw_address": "<string>",
    "phone": "<string>",
    "typed_custom_fields": {}
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    name: '<string>',
    domain: '<string>',
    owner_id: '<string>',
    account_stage_id: '<string>',
    raw_address: '<string>',
    phone: '<string>',
    typed_custom_fields: {}
  })
};

fetch('https://api.aisa.one/apis/v1/apollo/accounts/{account_id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.aisa.one/apis/v1/apollo/accounts/{account_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'name' => '<string>',
    'domain' => '<string>',
    'owner_id' => '<string>',
    'account_stage_id' => '<string>',
    'raw_address' => '<string>',
    'phone' => '<string>',
    'typed_custom_fields' => [
        
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.aisa.one/apis/v1/apollo/accounts/{account_id}"

	payload := strings.NewReader("{\n  \"name\": \"<string>\",\n  \"domain\": \"<string>\",\n  \"owner_id\": \"<string>\",\n  \"account_stage_id\": \"<string>\",\n  \"raw_address\": \"<string>\",\n  \"phone\": \"<string>\",\n  \"typed_custom_fields\": {}\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.aisa.one/apis/v1/apollo/accounts/{account_id}")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"<string>\",\n  \"domain\": \"<string>\",\n  \"owner_id\": \"<string>\",\n  \"account_stage_id\": \"<string>\",\n  \"raw_address\": \"<string>\",\n  \"phone\": \"<string>\",\n  \"typed_custom_fields\": {}\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.aisa.one/apis/v1/apollo/accounts/{account_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"<string>\",\n  \"domain\": \"<string>\",\n  \"owner_id\": \"<string>\",\n  \"account_stage_id\": \"<string>\",\n  \"raw_address\": \"<string>\",\n  \"phone\": \"<string>\",\n  \"typed_custom_fields\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "account": {}
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

account_id
string
必填

账户 ID

请求体

application/json
name
string

账户名称

domain
string

账户域名

owner_id
string

所有者 ID

account_stage_id
string

账户阶段 ID

raw_address
string

原始地址

phone
string

电话号码

typed_custom_fields
object

类型化自定义字段对象

响应

成功响应

account
object

已更新的账户