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

# Listar empresas

Lista várias empresas de acordo com a ordem de criação. Pode ser feito paginação pelo parâmetro da query <b><i>{page_index}</b></i> e <b><i>{page_size}</b></i>

[block:code]
{
  "codes": [
    {
      "code": "GET - 200\n{\n  \"total\": 1,\n  \"page_index\": 0,\n  \"page_size\": 15,\n  \"results\": [\n    {\n      \"site\": \"https://site.com\",\n      \"origin\": 1,\n      \"life_cycle\": 1,\n      \"source_id\": 1,\n      \"source\": {\n        \"id\": 1,\n        \"name\": \"Instagram\"\n      },\n      \"industry_id\": 1,\n      \"industry\": {\n        \"id\": 1,\n        \"name\": \"Bazar\"\n      },\n      \"parent_id\": 1,\n      \"parent\": {\n        \"id\": 1,\n        \"name\": \"Nome do filial\",\n        \"image\": \"https://image-url/image.png\",\n        \"image_min\": \"https://image-url/image.png\",\n        \"show_name\": \"Nome exibido da filial\"\n      },\n      \"responsible_id\": 1,\n      \"responsible\": {\n        \"id\": 1,\n        \"name\": \"Nome do responsável\",\n        \"full_name\": \"Nome completo do responsável\",\n        \"image\": \"https://image-url/image.png\",\n        \"image_min\": \"https://image-url/image.png\",\n        \"show_name\": \"Nome exibido do responsável\"\n      },\n      \"author_id\": 1,\n      \"author\": {\n        \"id\": 1,\n        \"detail\": \"Nome do autor\",\n        \"type\": 1,\n        \"user_id\": 1\n      },\n      \"creation_date\": \"2020-12-01T17:12:02Z\",\n      \"update_date\": \"2022-06-02T17:37:55Z\",\n      \"id\": 1,\n      \"name\": \"Nome da companhia\",\n      \"full_name\": \"Nome completo da companhia\",\n      \"email\": \"email@atendare.com\",\n      \"phone\": \"+55 999999999\",\n      \"document\": \"294.515.040-95\",\n      \"image\": \"https://image-url/image.png\",\n      \"image_min\": \"https://image-url/image.png\",\n      \"show_name\": \"Nome exibido da companhia\",\n      \"address\": {\n        \"id\": 1,\n        \"person_id\": 1,\n        \"account_id\": 1,\n        \"street\": \"Avenida Uruguai\",\n        \"number\": \"513\",\n        \"city\": \"Três de Maio\",\n        \"state\": \"Rio Grande do Sul\",\n        \"country\": \"Brasil\",\n        \"postal_code\": \"98910-000\",\n        \"complement\": \"Sala 201\",\n        \"neighborhood\": \"Centro\",\n        \"static_map\": \"https://atendare.storage.googleapis.com/0eae10f8-8302-4d2a-9e8f-a61ba6fd8f53/address/095cf458-58e6-428a-b07e-40f48db9ff80.png\",\n        \"is_main\": true,\n        \"type\": 3,\n        \"latitude\": -27.779413,\n        \"longitude\": -54.234719,\n        \"place_id\": \"ChIJqUhaByFS-ZQRQEhDuzWC2M8\",\n        \"full_address\": \"Avenida Uruguai, 513 - Sala 201 - Centro, Três de Maio - Rio Grande do Sul - Brasil, 98910-000\",\n        \"url_address\": \"Avenida+Uruguai%2C+513+-+Sala+201+-+Centro%2C+Tr%C3%AAs+de+Maio+-+Rio+Grande+do+Sul+-+Brasil%2C+98910-000\"\n      },\n      \"custom_unidade_de_negocios\": \"Querência\"\n    }\n  ]\n}\n",
      "language": "json"
    }
  ]
}
[/block]

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Atendare API - v2",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://api.atendare.com/v2"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/companies": {
      "get": {
        "summary": "Listar empresas",
        "description": "Lista várias empresas de acordo com a ordem de criação. Pode ser feito paginação pelo parâmetro da query <b><i>{page_index}</b></i> e <b><i>{page_size}</b></i>",
        "operationId": "list-companies",
        "parameters": [
          {
            "name": "Access-Token",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page_index",
            "in": "query",
            "description": "Para paginação, representa o primeiro elemento da lista.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Para paginação, define o total de empresas que ira ser retornado em uma lista. O limite é 15",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 15
            }
          },
          {
            "name": "search_text",
            "in": "query",
            "description": "Para fazer um filtro nos campos.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_field",
            "in": "query",
            "description": "Define o campo que irá ordenar a lista.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_order",
            "in": "query",
            "description": "Tipo de ordenação crescente (ASC) ou decrescente (DESC), o padrão é crescente",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "schema": {
              "properties": {
                "condition": {
                  "type": "string",
                  "description": "Or - And"
                },
                "conditions": {
                  "type": "array",
                  "items": {
                    "properties": {
                      "field": {
                        "type": "string",
                        "description": "Campo que você deseja filtrar"
                      },
                      "operation": {
                        "type": "string",
                        "enum": [
                          "equal",
                          "not_equal",
                          "less",
                          "less_or_equal",
                          "greater",
                          "greater_or_equal",
                          "begins_with",
                          "does_not_begin_with",
                          "is_in",
                          "is_not_in",
                          "ends_with",
                          "does_not_end_with",
                          "contains",
                          "does_not_contains",
                          "is_empty",
                          "is_not_empty",
                          "between",
                          "does_not_between"
                        ]
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "type": "object"
                  }
                }
              },
              "type": "object"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"total\": 100,\n  \"page_index\": 0,\n  \"page_size\": 15,\n  \"results\": [\n    {\n      \"site\": \"https://site.com\",\n      \"origin\": 1,\n      \"life_cycle\": 1,\n      \"source_id\": 1,\n      \"source\": {\n        \"id\": 1,\n        \"name\": \"Instagram\"\n      },\n      \"industry_id\": 1,\n      \"industry\": {\n        \"id\": 1,\n        \"name\": \"Bazar\"\n      },\n      \"parent_id\": 1,\n      \"parent\": {\n        \"id\": 1,\n        \"name\": \"Nome do filial\",\n        \"image\": \"https://image-url/image.png\",\n        \"image_min\": \"https://image-url/image.png\",\n        \"show_name\": \"Nome exibido da filial\"\n      },\n      \"responsible_id\": 1,\n      \"responsible\": {\n        \"id\": 1,\n        \"name\": \"Nome do responsável\",\n        \"full_name\": \"Nome completo do responsável\",\n        \"image\": \"https://image-url/image.png\",\n        \"image_min\": \"https://image-url/image.png\",\n        \"show_name\": \"Nome exibido do responsável\"\n      },\n      \"author_id\": 1,\n      \"author\": {\n        \"id\": 1,\n        \"detail\": \"Nome do autor\",\n        \"type\": 1,\n        \"user_id\": 1\n      },\n      \"creation_date\": \"2020-12-01T17:12:02Z\",\n      \"update_date\": \"2022-06-02T17:37:55Z\",\n      \"id\": 1,\n      \"name\": \"Nome da companhia\",\n      \"full_name\": \"Nome completo da companhia\",\n      \"email\": \"email@atendare.com\",\n      \"phone\": \"+55 999999999\",\n      \"document\": \"294.515.040-95\",\n      \"image\": \"https://image-url/image.png\",\n      \"image_min\": \"https://image-url/image.png\",\n      \"show_name\": \"Nome exibido da companhia\",\n      \"address\": {\n        \"id\": 1,\n        \"person_id\": 1,\n        \"account_id\": 1,\n        \"street\": \"Avenida Uruguai\",\n        \"number\": \"513\",\n        \"city\": \"Três de Maio\",\n        \"state\": \"Rio Grande do Sul\",\n        \"country\": \"Brasil\",\n        \"postal_code\": \"98910-000\",\n        \"complement\": \"Sala 201\",\n        \"neighborhood\": \"Centro\",\n        \"static_map\": \"https://atendare.storage.googleapis.com/0eae10f8-8302-4d2a-9e8f-a61ba6fd8f53/address/095cf458-58e6-428a-b07e-40f48db9ff80.png\",\n        \"is_main\": true,\n        \"type\": 3,\n        \"latitude\": -27.779413,\n        \"longitude\": -54.234719,\n        \"place_id\": \"ChIJqUhaByFS-ZQRQEhDuzWC2M8\",\n        \"full_address\": \"Avenida Uruguai, 513 - Sala 201 - Centro, Três de Maio - Rio Grande do Sul - Brasil, 98910-000\",\n        \"url_address\": \"Avenida+Uruguai%2C+513+-+Sala+201+-+Centro%2C+Tr%C3%AAs+de+Maio+-+Rio+Grande+do+Sul+-+Brasil%2C+98910-000\"\n      },\n      \"custom_exemple\": \"custom value\" // Campo personalizado sempre começam co om prefixo custom_\n    }\n  ]\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "example": 100,
                      "default": 0
                    },
                    "page_index": {
                      "type": "integer",
                      "example": 0,
                      "default": 0
                    },
                    "page_size": {
                      "type": "integer",
                      "example": 15,
                      "default": 0
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "site": {
                            "type": "string",
                            "example": "https://site.com"
                          },
                          "origin": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "life_cycle": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "source_id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Instagram"
                              }
                            }
                          },
                          "industry_id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "industry": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Bazar"
                              }
                            }
                          },
                          "parent_id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "parent": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Nome do filial"
                              },
                              "image": {
                                "type": "string",
                                "example": "https://image-url/image.png"
                              },
                              "image_min": {
                                "type": "string",
                                "example": "https://image-url/image.png"
                              },
                              "show_name": {
                                "type": "string",
                                "example": "Nome exibido da filial"
                              }
                            }
                          },
                          "responsible_id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "responsible": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "name": {
                                "type": "string",
                                "example": "Nome do responsável"
                              },
                              "full_name": {
                                "type": "string",
                                "example": "Nome completo do responsável"
                              },
                              "image": {
                                "type": "string",
                                "example": "https://image-url/image.png"
                              },
                              "image_min": {
                                "type": "string",
                                "example": "https://image-url/image.png"
                              },
                              "show_name": {
                                "type": "string",
                                "example": "Nome exibido do responsável"
                              }
                            }
                          },
                          "author_id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "author": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "detail": {
                                "type": "string",
                                "example": "Nome do autor"
                              },
                              "type": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "user_id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              }
                            }
                          },
                          "creation_date": {
                            "type": "string",
                            "example": "2020-12-01T17:12:02Z"
                          },
                          "update_date": {
                            "type": "string",
                            "example": "2022-06-02T17:37:55Z"
                          },
                          "id": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "name": {
                            "type": "string",
                            "example": "Nome da companhia"
                          },
                          "full_name": {
                            "type": "string",
                            "example": "Nome completo da companhia"
                          },
                          "email": {
                            "type": "string",
                            "example": "email@atendare.com"
                          },
                          "phone": {
                            "type": "string",
                            "example": "+55 999999999"
                          },
                          "document": {
                            "type": "string",
                            "example": "294.515.040-95"
                          },
                          "image": {
                            "type": "string",
                            "example": "https://image-url/image.png"
                          },
                          "image_min": {
                            "type": "string",
                            "example": "https://image-url/image.png"
                          },
                          "show_name": {
                            "type": "string",
                            "example": "Nome exibido da companhia"
                          },
                          "address": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "person_id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "account_id": {
                                "type": "integer",
                                "example": 1,
                                "default": 0
                              },
                              "street": {
                                "type": "string",
                                "example": "Avenida Uruguai"
                              },
                              "number": {
                                "type": "string",
                                "example": "513"
                              },
                              "city": {
                                "type": "string",
                                "example": "Três de Maio"
                              },
                              "state": {
                                "type": "string",
                                "example": "Rio Grande do Sul"
                              },
                              "country": {
                                "type": "string",
                                "example": "Brasil"
                              },
                              "postal_code": {
                                "type": "string",
                                "example": "98910-000"
                              },
                              "complement": {
                                "type": "string",
                                "example": "Sala 201"
                              },
                              "neighborhood": {
                                "type": "string",
                                "example": "Centro"
                              },
                              "static_map": {
                                "type": "string",
                                "example": "https://atendare.storage.googleapis.com/0eae10f8-8302-4d2a-9e8f-a61ba6fd8f53/address/095cf458-58e6-428a-b07e-40f48db9ff80.png"
                              },
                              "is_main": {
                                "type": "boolean",
                                "example": true,
                                "default": true
                              },
                              "type": {
                                "type": "integer",
                                "example": 3,
                                "default": 0
                              },
                              "latitude": {
                                "type": "number",
                                "example": -27.779413,
                                "default": 0
                              },
                              "longitude": {
                                "type": "number",
                                "example": -54.234719,
                                "default": 0
                              },
                              "place_id": {
                                "type": "string",
                                "example": "ChIJqUhaByFS-ZQRQEhDuzWC2M8"
                              },
                              "full_address": {
                                "type": "string",
                                "example": "Avenida Uruguai, 513 - Sala 201 - Centro, Três de Maio - Rio Grande do Sul - Brasil, 98910-000"
                              },
                              "url_address": {
                                "type": "string",
                                "example": "Avenida+Uruguai%2C+513+-+Sala+201+-+Centro%2C+Tr%C3%AAs+de+Maio+-+Rio+Grande+do+Sul+-+Brasil%2C+98910-000"
                              }
                            }
                          },
                          "custom_exemple": {
                            "type": "string",
                            "example": "custom value"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"success\": false\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "example": false,
                      "default": true
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "61f3f7309a3abf0010b92516:6267dcdac848980692644743"
}
```