Alterar pessoa
PUT
/api/seller/external/v1/person/{id}
curl --request PUT \ "https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF" \ --header "Authorization: Bearer splt_live_SUA_CHAVE" \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ --data "{ \"kind\": \"architecto\", \"name\": \"architecto\", \"document_type\": \"architecto\", \"document_number\": \"architecto\", \"status\": \"architecto\"}"const url = new URL( "https://api.spelt.com.br/api/seller/external/v1/person/iMRSFHQ9TYBYCWTPTRGW5G9ZPYF");
const headers = { "Authorization": "Bearer splt_live_SUA_CHAVE", "Content-Type": "application/json", "Accept": "application/json",};
let body = { "kind": "architecto", "name": "architecto", "document_type": "architecto", "document_number": "architecto", "status": "architecto"};
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';$response = $client->put( $url, [ 'headers' => [ 'Authorization' => 'Bearer splt_live_SUA_CHAVE', 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], 'json' => [ 'kind' => 'architecto', 'name' => 'architecto', 'document_type' => 'architecto', 'document_number' => 'architecto', 'status' => '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'payload = { "kind": "architecto", "name": "architecto", "document_type": "architecto", "document_number": "architecto", "status": "architecto"}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 uma pessoa do Seller autenticado.
Só os campos enviados são validados e gravados; a unicidade de documento e a coerência PF/PJ são conferidas sobre o estado final (o que já existe + o que chegou).
Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”id
required
string
ULID da pessoa.
Request Body
Seção intitulada “Request Body”Media typeapplication/json
object
kind
PersonKind: individual | company.
string
name
Nome completo ou razão social.
string
document_type
DocumentType.
string
document_number
Documento.
string
status
PersonStatus: active | inactive.
string
Responses
Seção intitulada “Responses”Media typeapplication/json
object
data
object
id
string
name
string
status
string
Example
{ "data": { "id": "01JA…", "name": "Imobiliária Centro S.A.", "status": "active" }}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
document_type
Array<string>
Example
{ "message": "Erro de validação.", "errors": { "document_type": [ "CPF não é documento de pessoa jurídica." ] }}