{
    "openapi": "3.1.0",
    "info": {
        "title": "Infoville API",
        "version": "1.0.0",
        "description": "API p\u00fablica e somente leitura para consulta de dados cadastrais de empresas brasileiras por CNPJ.\n\nO CNPJ pode ser informado com ou sem pontua\u00e7\u00e3o."
    },
    "servers": [
        {
            "url": "https:\/\/api.infoville.com.br\/api",
            "description": "Produ\u00e7\u00e3o"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "paths": {
        "\/companies\/{cnpj}": {
            "get": {
                "operationId": "company.show",
                "description": "Retorna os dados cadastrais da empresa, incluindo situa\u00e7\u00e3o, endere\u00e7o,\natividades econ\u00f4micas e quadro societ\u00e1rio. Requer um token Bearer com\nability `client` ou `site`. Clientes consomem um cr\u00e9dito quando o CNPJ existe.",
                "summary": "Consultar empresa por CNPJ",
                "tags": [
                    "Company"
                ],
                "parameters": [
                    {
                        "name": "cnpj",
                        "in": "path",
                        "required": true,
                        "description": "CNPJ com 14 caracteres (12 alfanum\u00e9ricos e 2 d\u00edgitos verificadores), com ou sem pontua\u00e7\u00e3o.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "11222333000181"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`CompanyResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CompanyResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "X-Credits-Limit": {
                                "description": "Cr\u00e9ditos dispon\u00edveis a cada renova\u00e7\u00e3o.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Remaining": {
                                "description": "Cr\u00e9ditos restantes ap\u00f3s a consulta.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Consumed": {
                                "description": "Cr\u00e9ditos consumidos nesta consulta.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "Data\/hora ISO 8601 da pr\u00f3xima renova\u00e7\u00e3o.",
                                "schema": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Cr\u00e9ditos esgotados.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "X-Credits-Limit": {
                                "description": "Cr\u00e9ditos dispon\u00edveis a cada renova\u00e7\u00e3o.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Remaining": {
                                "description": "Cr\u00e9ditos restantes ap\u00f3s a consulta.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Consumed": {
                                "description": "Cr\u00e9ditos consumidos nesta consulta.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "Data\/hora ISO 8601 da pr\u00f3xima renova\u00e7\u00e3o.",
                                "schema": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Empresa n\u00e3o encontrada.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "X-Credits-Limit": {
                                "description": "Cr\u00e9ditos dispon\u00edveis a cada renova\u00e7\u00e3o.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Remaining": {
                                "description": "Cr\u00e9ditos restantes ap\u00f3s a consulta.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Consumed": {
                                "description": "Cr\u00e9ditos consumidos nesta consulta.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "Data\/hora ISO 8601 da pr\u00f3xima renova\u00e7\u00e3o.",
                                "schema": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Token ausente ou inv\u00e1lido.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "X-Credits-Limit": {
                                "description": "Cr\u00e9ditos dispon\u00edveis a cada renova\u00e7\u00e3o.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Remaining": {
                                "description": "Cr\u00e9ditos restantes ap\u00f3s a consulta.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Consumed": {
                                "description": "Cr\u00e9ditos consumidos nesta consulta.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "Data\/hora ISO 8601 da pr\u00f3xima renova\u00e7\u00e3o.",
                                "schema": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Token sem permiss\u00e3o para consultar CNPJ.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        },
                        "headers": {
                            "X-Credits-Limit": {
                                "description": "Cr\u00e9ditos dispon\u00edveis a cada renova\u00e7\u00e3o.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Remaining": {
                                "description": "Cr\u00e9ditos restantes ap\u00f3s a consulta.",
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "integer"
                                        },
                                        {
                                            "type": "string"
                                        }
                                    ]
                                }
                            },
                            "X-Credits-Consumed": {
                                "description": "Cr\u00e9ditos consumidos nesta consulta.",
                                "schema": {
                                    "type": "integer"
                                }
                            },
                            "X-RateLimit-Reset": {
                                "description": "Data\/hora ISO 8601 da pr\u00f3xima renova\u00e7\u00e3o.",
                                "schema": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/companies\/search\/{term}": {
            "get": {
                "operationId": "company.search",
                "description": "Busca por CNPJ, raz\u00e3o social ou nome fantasia e retorna at\u00e9 10 resultados.\nCorrespond\u00eancias exatas aparecem antes de prefixos e correspond\u00eancias parciais.\nRequer um token Bearer com ability `site`.",
                "summary": "Buscar empresas",
                "tags": [
                    "Company"
                ],
                "parameters": [
                    {
                        "name": "term",
                        "in": "path",
                        "required": true,
                        "description": "CNPJ, raz\u00e3o social ou nome fantasia. Use ao menos 2 caracteres para nomes.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Banco Bradesco"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `CompanySearchResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CompanySearchResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Termo de busca inv\u00e1lido.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Token ausente ou inv\u00e1lido.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Token sem permiss\u00e3o de site.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/company-data-requests": {
            "post": {
                "operationId": "companyDataRequest.store",
                "tags": [
                    "CompanyDataRequest"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "enum": [
                                            "update",
                                            "privacy"
                                        ]
                                    },
                                    "cnpjs": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "cnpj": {
                                                    "type": "string",
                                                    "pattern": "^[A-Za-z0-9]{12}\\d{2}$"
                                                },
                                                "company_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 255
                                                }
                                            },
                                            "required": [
                                                "cnpj"
                                            ]
                                        },
                                        "minItems": 1,
                                        "maxItems": 50
                                    },
                                    "company_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "requester_name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 120
                                    },
                                    "requester_email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 255
                                    },
                                    "requester_phone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 30
                                    },
                                    "relationship": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 80
                                    },
                                    "field": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 100
                                    },
                                    "description": {
                                        "type": "string",
                                        "minLength": 10,
                                        "maxLength": 5000
                                    },
                                    "website": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 0
                                    }
                                },
                                "required": [
                                    "type",
                                    "cnpjs",
                                    "requester_name",
                                    "requester_email",
                                    "description"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "protocol": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "protocol"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/company-data-requests\/approve": {
            "get": {
                "operationId": "companyDataRequest.approve",
                "tags": [
                    "CompanyDataRequest"
                ],
                "parameters": [
                    {
                        "name": "protocol",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "cnpj",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9]{12}\\d{2}$"
                        }
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "protocol": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "protocol"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                "Link de aprova\u00e7\u00e3o inv\u00e1lido."
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/company-data-requests\/slack\/actions": {
            "post": {
                "operationId": "companyDataRequest.slackAction",
                "tags": [
                    "CompanyDataRequest"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "text": {
                                            "type": "string",
                                            "const": "Remo\u00e7\u00e3o aprovada."
                                        }
                                    },
                                    "required": [
                                        "text"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                ""
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "An error",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "description": "Error overview.",
                                            "examples": [
                                                ""
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/companies\/{cnpj}\/reclame-aqui": {
            "get": {
                "operationId": "companyReclameAqui",
                "description": "Retorna os dados normalizados do perfil da empresa no Reclame Aqui.\nRequer um token Bearer com ability `client` ou `site`.",
                "summary": "Consultar reputa\u00e7\u00e3o no Reclame Aqui",
                "tags": [
                    "CompanyReclameAqui"
                ],
                "parameters": [
                    {
                        "name": "cnpj",
                        "in": "path",
                        "required": true,
                        "description": "CNPJ v\u00e1lido com 14 caracteres, sem pontua\u00e7\u00e3o.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "44335894000146"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "website": {
                                                    "type": "string"
                                                },
                                                "category": {
                                                    "type": "string"
                                                },
                                                "profile_url": {
                                                    "type": "string"
                                                },
                                                "score": {
                                                    "type": "string"
                                                },
                                                "reputation": {
                                                    "type": "string"
                                                },
                                                "resolved_percentage": {
                                                    "type": "string"
                                                },
                                                "complaints": {
                                                    "type": "string"
                                                },
                                                "years_on_platform": {
                                                    "type": "string"
                                                },
                                                "period": {
                                                    "type": "string"
                                                },
                                                "checked_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "website",
                                                "category",
                                                "profile_url",
                                                "score",
                                                "reputation",
                                                "resolved_percentage",
                                                "complaints",
                                                "years_on_platform",
                                                "period",
                                                "checked_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Dados do Reclame Aqui n\u00e3o encontrados.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Token ausente ou inv\u00e1lido.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Token sem permiss\u00e3o para consultar CNPJ.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "CNPJ inv\u00e1lido.",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "cnpj": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "cnpj"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "CompanyResource": {
                "type": "object",
                "properties": {
                    "@metafields": {
                        "type": "object",
                        "properties": {
                            "removed": {
                                "type": "boolean"
                            }
                        },
                        "required": [
                            "removed"
                        ]
                    },
                    "cnpj": {
                        "type": "string"
                    },
                    "cnpj_basico": {
                        "type": "string"
                    },
                    "razao_social": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "nome_fantasia": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "logo_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "is_matriz": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "natureza_juridica": {
                        "type": "string"
                    },
                    "porte_empresa": {
                        "type": "string"
                    },
                    "capital_social": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "simples": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "opcao_mei": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "situacao_cadastral": {
                        "type": "string"
                    },
                    "data_situacao_cadastral": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "motivo_situacao_cadastral": {
                        "type": "string"
                    },
                    "data_inicio_atividade": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cnae_fiscal_principal": {
                        "type": "object",
                        "properties": {
                            "codigo": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "nome": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "codigo",
                            "nome"
                        ]
                    },
                    "cnaes_secundarias": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "codigo": {
                                    "type": "integer"
                                },
                                "nome": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "codigo",
                                "nome"
                            ]
                        }
                    },
                    "endereco": {
                        "type": "object",
                        "properties": {
                            "tipo_logradouro": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "logradouro": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "numero": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "complemento": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "bairro": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "cep": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "uf": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "municipio": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "tipo_logradouro",
                            "logradouro",
                            "numero",
                            "complemento",
                            "bairro",
                            "cep",
                            "uf",
                            "municipio"
                        ]
                    },
                    "contato": {
                        "type": "object",
                        "properties": {
                            "ddd1": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "telefone1": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "ddd2": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "telefone2": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "ddd_fax": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "fax": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "ddd1",
                            "telefone1",
                            "ddd2",
                            "telefone2",
                            "email",
                            "ddd_fax",
                            "fax"
                        ]
                    },
                    "socios": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "socio_id": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "nome": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "documento": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "qualificacao": {
                                    "type": "string"
                                },
                                "data_entrada_sociedade": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "faixa_etaria": {
                                    "type": [
                                        "integer",
                                        "null"
                                    ]
                                },
                                "representante_legal": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "nome_representante": {
                                    "type": [
                                        "string",
                                        "null"
                                    ]
                                },
                                "qualificacao_representante": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "socio_id",
                                "nome",
                                "documento",
                                "qualificacao",
                                "data_entrada_sociedade",
                                "faixa_etaria",
                                "representante_legal",
                                "nome_representante",
                                "qualificacao_representante"
                            ]
                        }
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "@metafields",
                    "cnpj",
                    "cnpj_basico",
                    "razao_social",
                    "nome_fantasia",
                    "url",
                    "logo_url",
                    "is_matriz",
                    "natureza_juridica",
                    "porte_empresa",
                    "capital_social",
                    "simples",
                    "opcao_mei",
                    "situacao_cadastral",
                    "data_situacao_cadastral",
                    "motivo_situacao_cadastral",
                    "data_inicio_atividade",
                    "cnae_fiscal_principal",
                    "cnaes_secundarias",
                    "endereco",
                    "contato",
                    "socios",
                    "updated_at"
                ],
                "title": "CompanyResource"
            },
            "CompanySearchResource": {
                "type": "object",
                "properties": {
                    "nome": {
                        "type": "string"
                    },
                    "razao_social": {
                        "type": "string"
                    },
                    "nome_fantasia": {
                        "type": "string"
                    },
                    "cnpj": {
                        "type": "string"
                    },
                    "cidade": {
                        "type": "string"
                    },
                    "uf": {
                        "type": "string"
                    }
                },
                "required": [
                    "nome",
                    "razao_social",
                    "nome_fantasia",
                    "cnpj",
                    "cidade",
                    "uf"
                ],
                "title": "CompanySearchResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}