---
title: "Atualizar cliente"
method: PUT
path: "/{alias}/customers/{id}"
tags: ["Clientes - Cliente"]
---

# Atualizar cliente

`PUT /{alias}/customers/{id}`

Atualiza as informações de um cliente específico

## Path parameters

- `alias` string, required
- `id` integer, required

## Request body

- CustomerRequest — Representa os dados necessários para criar ou atualizar um cliente
  - `marketplace_id` integer, nullable — ID do marketplace
  - `cluster_id` integer, nullable — ID do cluster
  - `active` boolean, required — Status do cliente
  - `type` 'f' | 'j', required — Tipo de cliente (f para físico, j para jurídico)
  - `name` string — Nome do cliente
  - `razao_social` string, nullable — Razão social
  - `cpf` string, required — CPF do cliente
  - `cnpj` string, nullable, required — CNPJ do cliente
  - `email` string, required — E-mail do cliente
  - `homephone` string, required — Telefone residencial
  - `birthday` string, date-time — Esse campo somente se torna obrigatório caso haja configuração da regra no checkout. Data de aniversário do cliente.
  - `ip` string — IP do cliente
  - `utm_source` string — Fonte UTM
  - `utm_campaign` string — Campanha UTM
  - `notes` string — Notas sobre o cliente

## Response `200`

Cliente atualizado com sucesso

- object
  - `data` Customer[]
    - `id` integer
    - `merchant_id` integer
    - `marketplace_id` integer
    - `active` boolean
    - `type` string
    - `cluster_id` integer
    - `name` string
    - `first_name` string
    - `last_name` string
    - `generic_name` string
    - `cpf` string
    - `spreadsheet` object
      - `data` object
        - `brands` string
        - `city` string
        - `purchased_brands` string
        - `last_order_date` object
          - `date` string, date-time
          - `timezone_type` integer
          - `timezone` string
        - `last_order_value` string
        - `purchased_categories` string
        - `number` string
        - `uf` string
        - `phone` string
        - `street` string
        - `phone_number` string
        - `categories` string
        - `neighborhood` string
        - `complement` string
        - `phone_code` string
    - `phone` object
      - `area_code` string — Código de área do telefone
      - `full_number` string — Número do telefone
      - `number` string — Número do telefone
      - `formated_number` string — Número do telefone formatado
      - `whatsapp_link` string, uri
    - `razao_social` string
    - `cnpj` string
    - `state_registration` string
    - `email` string, email
    - `password` string
    - `birthday` string, date
    - `newsletter` boolean
    - `whatsapp` boolean
    - `social_driver` string
    - `social_id` integer
    - `ip` string
    - `token` string
    - `utm_source` string
    - `utm_campaign` string
    - `notes` string
    - `login_url` string, uri
    - `anonymized` boolean

## Other responses

- `400` — Requisição inválida
- `404` — Cliente não encontrado

---

[API](https://skmtc.net/yampi/apis/yampi-api.md) · [All operations](https://skmtc.net/yampi/apis/yampi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yampi/yampi-api/revisions/fa16c50bef09/schema)
