Alterar contato
PUT
/api/seller/external/v1/person/{id}/contact/{contactId}
curl --request PUT \ "https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/contact/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"name\": \"architecto\", \"is_primary\": false}"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/contact/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
let body = { "name": "architecto", "is_primary": false};
fetch(url, { method: "PUT", headers, body: JSON.stringify(body),}).then(response => response.json());$client = new \GuzzleHttp\Client();$url = 'https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/contact/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF';$response = $client->put( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'name' => 'architecto', 'is_primary' => false, ], ]);$body = $response->getBody();print_r(json_decode((string) $body));import requestsimport json
url = 'https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/contact/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF'payload = { "name": "architecto", "is_primary": false}headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('PUT', url, headers=headers, json=payload)response.json()Atualiza parcialmente um contato.
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”id
required
string
The ID of the person.
contactId
required
string
Request Body
Seção intitulada “Request Body”Media typeapplication/json
object
name
Nome do contato.
string
is_primary
True torna este o principal.
boolean
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
id
string
name
string
is_primary
boolean
Example
{ "data": { "id": "01JA…", "name": "Marta S.", "is_primary": true }}Media typeapplication/json
object
message
string
Example
{ "message": "Seu papel de acesso não permite esta operação."}Media typeapplication/json
object
error
string
Example
{ "error": "Recurso não encontrado"}Media typeapplication/json
object
message
string
errors
object
email
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "email": [ "O campo email deve ser um endereço de e-mail válido." ] }}