DesenvolvedoresReferência da APIClientes

Alterar cliente

PATCH
/customers/{customerId}

Altera o nome, o telefone e as observações internas. O e-mail não muda pela API: a troca é feita no painel.

Chave: Só chave secreta (chamada pelo servidor).

Escopo: customers:write.

Autorização

chaveSecreta
headerAutorizaçãoBearer <chave de API>

Chave secreta (sk_…). Use só no servidor; requisições de navegador (com Origin) são recusadas.

Parâmetros de caminho

customerId*string
Formatouuid

Corpo da requisição

application/json
  1. body
name?|null
phone?|null
notes?|null

Corpo da resposta

Sucesso.

application/json
  1. response
data*
meta*
curl -X PATCH 'https://minepag.com.br/api/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "email": "string",    "name": "string",    "phone": "string",    "document": {      "type": "cpf",      "last4": "string"    },    "status": "active",    "source": "checkout",    "marketingConsent": true,    "notes": "string",    "metrics": {      "paidOrdersCount": -9007199254740991,      "lifetimeValue": -9007199254740991,      "refundedTotal": -9007199254740991,      "firstOrderAt": "2019-08-24T14:15:22Z",      "lastOrderAt": "2019-08-24T14:15:22Z"    },    "createdAt": "2019-08-24T14:15:22Z"  },  "meta": {    "requestId": "string"  }}