---
agentTools:
  projectIndex: https://getcommerce.readme.io/llms.txt
---

# Atualizar Cliente

Permite a atualização de determinado cliente

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Get Commerce",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "{domain}/rest",
      "variables": {
        "domain": {
          "default": "your-domain.com"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "[your_token]"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/customer": {
      "put": {
        "summary": "Atualizar Cliente",
        "description": "Permite a atualização de determinado cliente",
        "operationId": "atualizar-cliente",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "entity_id"
                ],
                "properties": {
                  "entity_id": {
                    "type": "integer",
                    "description": "ID do cliente a ser atualizado",
                    "format": "int32"
                  },
                  "firstname": {
                    "type": "string",
                    "description": "Primeiro nome do cliente"
                  },
                  "lastname": {
                    "type": "string",
                    "description": "Último nome do cliente"
                  },
                  "document": {
                    "type": "string",
                    "description": "Documento do cliente (CNPJ ou CPF)"
                  },
                  "group_id": {
                    "type": "integer",
                    "description": "ID do grupo ao qual o cliente deverá fazer parte. Consulte as opções disponíveis pela endpoint: [Listar Grupos de Clientes](/reference/listar-grupo-clientes)",
                    "format": "int32"
                  }
                }
              },
              "examples": {
                "Novo Grupo": {
                  "value": {
                    "entity_id": 123,
                    "group_id": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"http_code\": 200,\n    \"result\": {\n        \"entity_id\": \"123\"\n    },\n    \"errors\": null\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "http_code": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "entity_id": {
                          "type": "string",
                          "example": "123"
                        }
                      }
                    },
                    "errors": {}
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "6564ceb42587ff002c52d10a:6564ceb42587ff002c52d116"
}
```