v1

latestOpenAPI 3.1.02026-07-241040774.6 KB

Editar cliente

Com o verbo HTTP PUT, através do identificador do cliente (customer_id) é possível atualizar informações referentes ao cliente.

put/customers/{customer_id}

Path parameters

customer_idstring required

Código do cliente. Formato cus_XXXXXXXXXXXXXXXX.

Request body

namestring required

Nome do cliente. Max: 64 caracteres.

emailstring

E-mail do cliente. Max: 64 caracteres

phonesobject

Telefones do cliente. Saiba mais sobre telefones

documentstring

CPF ou CNPJ do cliente. Max: 16 caracteres

codestring

Código de referência do cliente no sistema da loja. Max: 52 caracteres

typestring

Tipo de cliente . Valores possíveis: individual (pessoa física) ou company (pessoa jurídica)<br>Obrigatório, caso o document seja enviado.

genderstring

Sexo do cliente . Valores possíveis: male ou female

addressobject

Endereço do cliente. Saiba mais sobre endereços

birthdatestring date

Data de nascimento do cliente.

metadataobject

Objeto chave/valor utilizado para armazenar informações adicionais sobre o cliente. Saiba mais sobre metadata

Response

200

idstring
namestring
emailstring
documentstring
genderstring
typestring
delinquentboolean
created_atstring
updated_atstring

Example response

{
  "id": "cus_6l5dMWZ0hkHZ4XnE",
  "name": "Peter Parker",
  "email": "parker@avengers.com",
  "document": "26224451990",
  "gender": "male",
  "type": "individual",
  "created_at": "2017-05-02T23:26:49Z",
  "updated_at": "2017-05-02T23:28:16Z",
  "phones": {
    "home_phone": {
      "country_code": "55",
      "number": "0000002000",
      "area_code": "021"
    }
  },
  "metadata": {
    "id": "my_customer_id"
  }
}