Incluir contato
POST
/api/seller/external/v1/person/{id}/contact
curl --request POST \ "https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/contact" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"name\": \"architecto\", \"role\": \"architecto\", \"phone\": \"architecto\", \"is_primary\": false, \"notes\": \"architecto\"}"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF/contact");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
let body = { "name": "architecto", "role": "architecto", "phone": "architecto", "is_primary": false, "notes": "architecto"};
fetch(url, { method: "POST", 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';$response = $client->post( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'name' => 'architecto', 'role' => 'architecto', 'phone' => 'architecto', 'is_primary' => false, 'notes' => 'architecto', ], ]);$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'payload = { "name": "architecto", "role": "architecto", "phone": "architecto", "is_primary": false, "notes": "architecto"}headers = { 'Authorization': 'Bearer splt_live_SUA_CHAVE', 'Content-Type': 'application/json', 'Accept': 'application/json'}
response = requests.request('POST', url, headers=headers, json=payload)response.json()Cria um contato. O primeiro contato da pessoa nasce principal; marcar outro como principal desmarca o anterior.
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.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
name
required
Nome do contato. Exemplo: Marta Souza
string
role
Cargo / função. Exemplo: Financeiro
string
email
E-mail. Exemplo: [email protected]
string
phone
Telefone com DDI (+55); gravado em E.164 (BrazilianPhoneNumber, 422 sem DDI). Exemplo: +55 11 98888-7777
string
is_primary
Contato principal. Exemplo: true
boolean
notes
Observação curta.
string
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
id
string
name
string
is_primary
boolean
Example
{ "data": { "id": "01JA…", "name": "Marta Souza", "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
name
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "name": [ "O campo name é obrigatório." ] }}