> For the complete documentation index, see [llms.txt](https://ajuda.consistem.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.consistem.com.br/consistem-api/consistem-erp-api/comercial/cadastros-gerais-v1.0/ocorrencia-do-cliente.md).

# Ocorrência Do Cliente

ocorrenciaCliente

## GET /ocorrencia

> Obter Listagem de Ocorrências do Cliente

```json
{"openapi":"3.0.1","info":{"title":"Cadastros Gerais","version":"1.0"},"tags":[{"name":"Ocorrência do Cliente","description":"ocorrenciaCliente"}],"servers":[{"url":"https://localhost/cadastrosgerais/v10"},{"url":"http://localhost/cadastrosgerais/v10"}],"security":[{"csw_auth":[]}],"components":{"securitySchemes":{"csw_auth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"ListaOcorrencia":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ListaOcorrenciasClientes"}}}},"ListaOcorrenciasClientes":{"type":"object","properties":{"codSequencia":{"type":"integer","description":"Código da Sequencia"},"descricao":{"type":"string","description":"Descrição da Ocorrência"},"situacao":{"type":"integer","description":"Situação da Ocorrência (0-Cadastrado, 1-Gerado pelo cadastro de clientes, 2-Gerada pela cobrança escritural, 3-Gerada pelo Agendamento, 4-Gerada pela API)","enum":[0,1,2,3,4]},"codArea":{"type":"integer","description":"Código da Área"},"dadosCustomizados":{"type":"array","items":{"$ref":"#/components/schemas/DadosCustomizados"}}}},"DadosCustomizados":{"required":["campo","valor"],"type":"object","properties":{"campo":{"type":"string"},"valor":{"type":"string"}}},"Erro":{"type":"object","properties":{"mensagem":{"type":"string"}}}}},"paths":{"/ocorrencia":{"get":{"tags":["Ocorrência do Cliente"],"summary":"Obter Listagem de Ocorrências do Cliente","operationId":"ObterListagemOcorrenciasClientes","parameters":[{"name":"empresa","in":"header","description":"Código da Empresa","required":true,"schema":{"type":"string"}},{"name":"codCliente","in":"query","description":"Código do Cliente","required":true,"schema":{"type":"integer"}},{"name":"dataLancamento","in":"query","description":"Data de Lançamento da Ocorrência (YYYY-MM-DD)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListaOcorrencia"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Erro"}}}}},"429":{"description":"Too Many Requests","content":{}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Erro"}}}}}}}}}
```

## GET /ocorrencia/{codCliente}

> Obter uma Ocorrência do Cliente

```json
{"openapi":"3.0.1","info":{"title":"Cadastros Gerais","version":"1.0"},"tags":[{"name":"Ocorrência do Cliente","description":"ocorrenciaCliente"}],"servers":[{"url":"https://localhost/cadastrosgerais/v10"},{"url":"http://localhost/cadastrosgerais/v10"}],"security":[{"csw_auth":[]}],"components":{"securitySchemes":{"csw_auth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OcorrenciaCliente":{"type":"object","properties":{"descricao":{"type":"string","description":"Descrição da Ocorrência"},"situacao":{"type":"integer","description":"Situação da Ocorrência (0-Cadastrado, 1-Gerado pelo cadastro de clientes, 2-Gerada pela cobrança escritural, 3-Gerada pelo Agendamento, 4-Gerada pela API)","enum":[0,1,2,3,4]},"codArea":{"type":"integer","description":"Código da Área"},"dadosCustomizados":{"type":"array","items":{"$ref":"#/components/schemas/DadosCustomizados"}}}},"DadosCustomizados":{"required":["campo","valor"],"type":"object","properties":{"campo":{"type":"string"},"valor":{"type":"string"}}},"Erro":{"type":"object","properties":{"mensagem":{"type":"string"}}}}},"paths":{"/ocorrencia/{codCliente}":{"get":{"tags":["Ocorrência do Cliente"],"summary":"Obter uma Ocorrência do Cliente","operationId":"ObterOcorrenciaCliente","parameters":[{"name":"empresa","in":"header","description":"Código da Empresa","required":true,"schema":{"type":"string"}},{"name":"codCliente","in":"path","description":"Código do Cliente","required":true,"schema":{"type":"integer"}},{"name":"dataLancamento","in":"query","description":"Data de Lançamento da Ocorrência (YYYY-MM-DD)","required":true,"schema":{"type":"string"}},{"name":"sequencia","in":"query","description":"Código da Sequência","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcorrenciaCliente"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Erro"}}}}},"429":{"description":"Too Many Requests","content":{}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Erro"}}}}}}}}}
```

## PUT /ocorrencia/{codCliente}

> Cadastrar uma Ocorrência do Cliente

```json
{"openapi":"3.0.1","info":{"title":"Cadastros Gerais","version":"1.0"},"tags":[{"name":"Ocorrência do Cliente","description":"ocorrenciaCliente"}],"servers":[{"url":"https://localhost/cadastrosgerais/v10"},{"url":"http://localhost/cadastrosgerais/v10"}],"security":[{"csw_auth":[]}],"components":{"securitySchemes":{"csw_auth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"OcorrenciaPut":{"required":["codArea","dataLancamento","descricao"],"type":"object","properties":{"dataLancamento":{"type":"string","description":"Data de Lançamento da Ocorrência (DD-MM-YYYY)","format":"date"},"descricao":{"type":"string","description":"Descrição da Ocorrência"},"codArea":{"maximum":9999,"type":"integer","description":"Código da Área"},"dadosCustomizados":{"type":"array","items":{"$ref":"#/components/schemas/DadosCustomizados"}}}},"DadosCustomizados":{"required":["campo","valor"],"type":"object","properties":{"campo":{"type":"string"},"valor":{"type":"string"}}},"OcorrenciaCliente":{"type":"object","properties":{"descricao":{"type":"string","description":"Descrição da Ocorrência"},"situacao":{"type":"integer","description":"Situação da Ocorrência (0-Cadastrado, 1-Gerado pelo cadastro de clientes, 2-Gerada pela cobrança escritural, 3-Gerada pelo Agendamento, 4-Gerada pela API)","enum":[0,1,2,3,4]},"codArea":{"type":"integer","description":"Código da Área"},"dadosCustomizados":{"type":"array","items":{"$ref":"#/components/schemas/DadosCustomizados"}}}},"Erro":{"type":"object","properties":{"mensagem":{"type":"string"}}}}},"paths":{"/ocorrencia/{codCliente}":{"put":{"tags":["Ocorrência do Cliente"],"summary":"Cadastrar uma Ocorrência do Cliente","operationId":"CadastrarOcorrenciaCliente","parameters":[{"name":"empresa","in":"header","description":"Código da Empresa","required":true,"schema":{"type":"string"}},{"name":"codCliente","in":"path","description":"Código do Cliente","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"Dados da Ocorrência","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcorrenciaPut"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcorrenciaCliente"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Erro"}}}}},"429":{"description":"Too Many Requests","content":{}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Erro"}}}}}}}}}
```

## DELETE /ocorrencia/{codCliente}

> Excluir uma Ocorrência do Cliente

```json
{"openapi":"3.0.1","info":{"title":"Cadastros Gerais","version":"1.0"},"tags":[{"name":"Ocorrência do Cliente","description":"ocorrenciaCliente"}],"servers":[{"url":"https://localhost/cadastrosgerais/v10"},{"url":"http://localhost/cadastrosgerais/v10"}],"security":[{"csw_auth":[]}],"components":{"securitySchemes":{"csw_auth":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Erro":{"type":"object","properties":{"mensagem":{"type":"string"}}}}},"paths":{"/ocorrencia/{codCliente}":{"delete":{"tags":["Ocorrência do Cliente"],"summary":"Excluir uma Ocorrência do Cliente","operationId":"ExcluirOcorrenciaCliente","parameters":[{"name":"empresa","in":"header","description":"Código da Empresa","required":true,"schema":{"type":"string"}},{"name":"codCliente","in":"path","description":"Código do Cliente","required":true,"schema":{"type":"integer"}},{"name":"dataLancamento","in":"query","description":"Data de Lançamento da Ocorrência (YYYY-MM-DD)","schema":{"type":"string"}},{"name":"sequencia","in":"query","description":"Código da Sequência","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Erro"}}}}},"429":{"description":"Too Many Requests","content":{}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Erro"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://ajuda.consistem.com.br/consistem-api/consistem-erp-api/comercial/cadastros-gerais-v1.0/ocorrencia-do-cliente.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
