고객 수정
인증된 조직의 고객 정보를 수정합니다. 생략한 필드는 유지합니다. metadata는 최상위 키를 추가하거나 교체하며 기존 키를 삭제하지 않습니다. identifiers에 담은 식별자는 고객에게 추가됩니다. 기존 식별자 값은 수정하거나 삭제하지 않습니다. 식별자 하나라도 사용 중이면 전체 요청이 409 CUSTOMER_IDENTIFIER_EXISTS로 실패합니다. 다른 조직의 고객 ID는 404 CUSTOMER_NOT_FOUND로 처리합니다.
curl --request PATCH \
--url https://client-api.tryvox.co/v3/customers/{customer_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"note": "<string>",
"metadata": {},
"identifiers": [
{
"value": "<string>"
}
],
"attributes": {}
}
'import requests
url = "https://client-api.tryvox.co/v3/customers/{customer_id}"
payload = {
"name": "<string>",
"note": "<string>",
"metadata": {},
"identifiers": [{ "value": "<string>" }],
"attributes": {}
}
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>',
note: '<string>',
metadata: {},
identifiers: [{value: '<string>'}],
attributes: {}
})
};
fetch('https://client-api.tryvox.co/v3/customers/{customer_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://client-api.tryvox.co/v3/customers/{customer_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>',
'note' => '<string>',
'metadata' => [
],
'identifiers' => [
[
'value' => '<string>'
]
],
'attributes' => [
]
]),
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://client-api.tryvox.co/v3/customers/{customer_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"note\": \"<string>\",\n \"metadata\": {},\n \"identifiers\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"attributes\": {}\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://client-api.tryvox.co/v3/customers/{customer_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"note\": \"<string>\",\n \"metadata\": {},\n \"identifiers\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/customers/{customer_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 \"note\": \"<string>\",\n \"metadata\": {},\n \"identifiers\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"attributes": {},
"created_at": 123,
"updated_at": 123,
"identifiers": [
{
"id": "<string>",
"identifier_type": "<string>",
"identifier_value": "<string>",
"created_at": 123
}
],
"metadata": {},
"interaction_summary": {
"interaction_count": 123,
"first_interaction_at": 123,
"last_interaction_at": 123,
"last_interaction_id": "<string>",
"last_interaction_type": "<string>"
},
"name": "<string>",
"note": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 5,
"window_seconds": 1
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
조직 API 키를 Authorization: Bearer <token> 형식으로 보냅니다.
Path Parameters
고객 식별자입니다.
Body
수정할 고객 필드입니다.
고객에서 하나 이상의 필드를 수정하는 요청입니다.\n\n생략한 필드는 유지합니다. metadata는 최상위 키를 병합합니다.
고객 이름입니다. 생략하면 현재 값을 유지합니다.
고객 메모입니다. 생략하면 현재 값을 유지합니다.
고객 메타데이터입니다. 전달한 키를 추가하거나 수정하며 생략한 키는 유지합니다. 키 삭제는 지원하지 않습니다.
이 고객에게 추가할 식별자입니다. 생략하면 식별자를 수정하지 않습니다.
Show child attributes
Show child attributes
수정할 고객 속성 값입니다. 전달한 이름만 변경하며 null이면 해당 이름을 삭제합니다. 각 이름에는 활성 정의가 필요합니다.
Show child attributes
Show child attributes
Response
성공 응답
식별자 검색, 생성, 수정, 병합 경로에서 반환하는 고객 응답입니다.
메모리는 고객 단건 조회가 반환하는 CustomerDetailResponse에만 있습니다.
고객 UUID입니다.
자동 추출한 고객 속성 값입니다. 이름에 해당하는 정의가 없어도 저장된 값을 유지합니다.
리소스 생성 시각입니다. 밀리초 단위 unix timestamp입니다.
리소스 수정 시각입니다. 밀리초 단위 unix timestamp입니다.
고객 신원 식별자 목록입니다.
Show child attributes
Show child attributes
고객 메타데이터입니다.
통화, 채팅, SMS 인터랙션의 집계 요약입니다.
Show child attributes
Show child attributes
고객 이름입니다.
고객 메모입니다.
Was this page helpful?
curl --request PATCH \
--url https://client-api.tryvox.co/v3/customers/{customer_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"note": "<string>",
"metadata": {},
"identifiers": [
{
"value": "<string>"
}
],
"attributes": {}
}
'import requests
url = "https://client-api.tryvox.co/v3/customers/{customer_id}"
payload = {
"name": "<string>",
"note": "<string>",
"metadata": {},
"identifiers": [{ "value": "<string>" }],
"attributes": {}
}
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>',
note: '<string>',
metadata: {},
identifiers: [{value: '<string>'}],
attributes: {}
})
};
fetch('https://client-api.tryvox.co/v3/customers/{customer_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://client-api.tryvox.co/v3/customers/{customer_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>',
'note' => '<string>',
'metadata' => [
],
'identifiers' => [
[
'value' => '<string>'
]
],
'attributes' => [
]
]),
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://client-api.tryvox.co/v3/customers/{customer_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"note\": \"<string>\",\n \"metadata\": {},\n \"identifiers\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"attributes\": {}\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://client-api.tryvox.co/v3/customers/{customer_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"note\": \"<string>\",\n \"metadata\": {},\n \"identifiers\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"attributes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/customers/{customer_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 \"note\": \"<string>\",\n \"metadata\": {},\n \"identifiers\": [\n {\n \"value\": \"<string>\"\n }\n ],\n \"attributes\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"attributes": {},
"created_at": 123,
"updated_at": 123,
"identifiers": [
{
"id": "<string>",
"identifier_type": "<string>",
"identifier_value": "<string>",
"created_at": 123
}
],
"metadata": {},
"interaction_summary": {
"interaction_count": 123,
"first_interaction_at": 123,
"last_interaction_at": 123,
"last_interaction_id": "<string>",
"last_interaction_type": "<string>"
},
"name": "<string>",
"note": "<string>"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 5,
"window_seconds": 1
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}