# List

## Lista de Clientes

## Fornece uma Lista de todos os clientes existentes.

<mark style="color:blue;">`GET`</mark> `https://api.cloudinvoice.net/customers/`

#### Query Parameters

| Name             | Type    | Description                                                                                                 |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| limit            | integer | Define o número de clientes por pesquisa.                                                                   |
| offset           | integer | Indica a posição inicial da pesquisa. Retorna a lista de clientes compreendida entre offset:offset+limit.   |
| ordering         | string  | Define o campo e a direcção a usar na pesquisa.                                                             |
| search           | string  | Define o termo de pesquisa a utilizar na lista.                                                             |
| code             | integer | Código do cliente para pesquisa.                                                                            |
| customer\_name   | string  | <p>Nome do Cliente</p><p></p><p>Para pesquisa parcial pode usar o formato: "customer\_name\_\_search"</p>   |
| commercial\_name | string  | <p>Nome do Cliente</p><p></p><p>Para pesquisa parcial pode usar o formato: "commercial\_name\_\_search"</p> |
| fiscal\_number   | String  | <p>Contribuinte</p><p></p><p>Para pesquisa parcial pode usar o formato: "fiscal\_number\_\_search"</p>      |
| external\_code   | string  | Código alternativo do cliente para pesquisa.                                                                |

{% tabs %}
{% tab title="Exemplo de Pedido" %}

```shell
curl https://api.cloudinvoice.net/customers/
    -H "Content-Type: application/json"
```

{% endtab %}

{% tab title="Exemplo de Resposta" %}

```json
{
    "limit": 10,
    "offset": 0,
    "count": 120,
    "next": "https://api.cloudinvoice.net/customers/?limit=10&offset=10",
    "previous": null,
    "results":[
        {
            "id": 1,
            "code": 1,
            "external_code": "",
            "customer_name": "Consumidor Final",
            "commercial_name": "",
            "fiscal_number": "999999990",
            "street1": "",
            "street2": "",
            "zip_code": "",
            "zip_locale": "",
            "phone1": "",
            "mobile1": "",
            "email1": "",
            "total_debits": 168997.96,
            "total_credits": 135722.87,
            "current_balance": 33275.09,
            "fiscal_country_id": 1,
            "fiscal_country":{"code": "PT", "country_name": "Portugal"},
            "fiscal_status_type_id": 1592,
            "country_id": 1,
            "country":{"code": "PT", "country_name": "Portugal"},
            "fiscal_status_type":{"code": "1", "description": "Consumidor final"}
        },
        ...
    ]
}
```

{% endtab %}
{% endtabs %}

Para ver exemplos de pedidos nas várias linguagens, consulte a página[ Exemplos de Pedidos.](/introducao/exemplos-de-pedidos.md)

{% hint style="info" %}
**Notas:** Alguns dos campos do termo de pesquisa geral poderão ser incluídos mediante critérios específicos (Ex: Descrição será incluída na pesquisa geral apenas se o termo de pesquisa contiver 3 ou mais caracteres). Por defeito, o comportamento expectável será obter-se todos os items cujo o texto a pesquisar (search) esteja CONTIDO em pelo menos um dos campos incluídos na pesquisa geral.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.cloudinvoice.net/documentacao-api/clientes/list.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
