{
    "openapi": "3.1.0",
    "info": {
        "title": "MKCEL, API p\u00fablica",
        "version": "1.0.0",
        "description": "API p\u00fablica do MKCEL para o sistema do provedor (ERP, BI, automa\u00e7\u00e3o). Base: https:\/\/{slug}.mkcel.com.br\/api\/v1, onde o slug do provedor escolhe a empresa.\n\nAutentica\u00e7\u00e3o: cada chamada leva o cabe\u00e7alho Authorization: Bearer <chave>. A chave come\u00e7a com mkcel_, aparece uma vez na emiss\u00e3o e tem permiss\u00f5es por m\u00f3dulo (customers:read, invoices:read, invoices:write e outras). Ela pode ter validade e uma lista de IPs liberados.\n\nRespostas: sucesso em {\"data\": ...}; listas trazem meta.next_cursor (mande em cursor para a pr\u00f3xima p\u00e1gina) e meta.has_more. Erro em {\"message\": \"...\", \"code\": \"...\"} e, na valida\u00e7\u00e3o, errors. Ids sempre pelo public_id (ULID de 26 caracteres). Valores em centavos e datas em ISO 8601 (UTC).\n\nGrava\u00e7\u00e3o: a baixa de cobran\u00e7a exige o cabe\u00e7alho Idempotency-Key (um UUID por a\u00e7\u00e3o); reenviar a mesma chave devolve a mesma resposta sem gravar de novo.\n\nLimite: 300 chamadas por minuto por chave; acima disso, 429 com Retry-After.\n\nExemplo em curl: curl -H \"Authorization: Bearer $MKCEL_CHAVE\" \"https:\/\/seuprovedor.mkcel.com.br\/api\/v1\/invoices?status=overdue&limit=100\"\n\nExemplo em PHP: busque a primeira p\u00e1gina, leia data e repita com cursor = meta.next_cursor enquanto meta.has_more for verdadeiro. O exemplo completo est\u00e1 no manual do provedor, cap\u00edtulo 18.\n\nWebhooks: os avisos de sa\u00edda (assinante criado, cobran\u00e7a paga, ONU fora do ar e outros) levam o public_id que esta API consulta; o contrato est\u00e1 em docs\/api-webhooks\/CONTRATO.md."
    },
    "servers": [
        {
            "url": "https:\/\/seuprovedor.mkcel.com.br\/api\/v1",
            "description": "Provedor"
        }
    ],
    "tags": [
        {
            "name": "Assinantes"
        },
        {
            "name": "Contratos"
        },
        {
            "name": "Planos"
        },
        {
            "name": "Cobran\u00e7as"
        },
        {
            "name": "Pagamentos"
        },
        {
            "name": "Chamados"
        },
        {
            "name": "Ordens de servi\u00e7o"
        },
        {
            "name": "Rede"
        },
        {
            "name": "Alertas"
        },
        {
            "name": "Estoque"
        },
        {
            "name": "Relat\u00f3rios"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/customers": {
            "get": {
                "operationId": "v1.customers.index",
                "description": "Mais novos primeiro. q procura no nome, no documento (s\u00f3 n\u00fameros) e no e-mail.",
                "summary": "Listar assinantes",
                "tags": [
                    "Assinantes"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/CustomerStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 120
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.customers.store",
                "description": "Cria o assinante como prospecto, com o endere\u00e7o de instala\u00e7\u00e3o. lgpd_consent confirma que o assinante aceitou o\ntermo de privacidade do provedor. Documento repetido ou inv\u00e1lido d\u00e1 422.",
                "summary": "Criar assinante",
                "tags": [
                    "Assinantes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "$ref": "#\/components\/schemas\/CustomerType"
                                    },
                                    "name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 160
                                    },
                                    "legal_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 160
                                    },
                                    "document": {
                                        "type": "string",
                                        "maxLength": 20
                                    },
                                    "email": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "email",
                                        "maxLength": 160
                                    },
                                    "phone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "whatsapp": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "birth_date": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date"
                                    },
                                    "lgpd_consent": {
                                        "enum": [
                                            "yes",
                                            "on",
                                            "1",
                                            1,
                                            "true",
                                            true
                                        ]
                                    },
                                    "address": {
                                        "type": "object",
                                        "properties": {
                                            "zip": {
                                                "type": "string",
                                                "maxLength": 9
                                            },
                                            "street": {
                                                "type": "string",
                                                "maxLength": 160
                                            },
                                            "number": {
                                                "type": "string",
                                                "maxLength": 20
                                            },
                                            "complement": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "maxLength": 80
                                            },
                                            "district": {
                                                "type": "string",
                                                "maxLength": 80
                                            },
                                            "city": {
                                                "type": "string",
                                                "maxLength": 80
                                            },
                                            "uf": {
                                                "type": "string",
                                                "minLength": 2,
                                                "maxLength": 2
                                            }
                                        },
                                        "required": [
                                            "zip",
                                            "street",
                                            "number",
                                            "district",
                                            "city",
                                            "uf"
                                        ]
                                    }
                                },
                                "required": [
                                    "type",
                                    "document",
                                    "lgpd_consent",
                                    "address"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/CustomerType"
                                                        }
                                                    ]
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "legal_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "document": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "whatsapp": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "contacts": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/CustomerStatus"
                                                        }
                                                    ]
                                                },
                                                "birth_date": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "addresses": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "type": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "$ref": "#\/components\/schemas\/AddressType"
                                                                    }
                                                                ]
                                                            },
                                                            "zip": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "street": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "number": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "complement": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "district": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "city": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "uf": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lat": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lng": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "type",
                                                            "zip",
                                                            "street",
                                                            "number",
                                                            "complement",
                                                            "district",
                                                            "city",
                                                            "uf",
                                                            "lat",
                                                            "lng"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "name",
                                                "legal_name",
                                                "document",
                                                "email",
                                                "phone",
                                                "whatsapp",
                                                "contacts",
                                                "status",
                                                "birth_date",
                                                "addresses",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/customers\/{id}": {
            "get": {
                "operationId": "v1.customers.show",
                "summary": "Ver um assinante",
                "tags": [
                    "Assinantes"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/CustomerType"
                                                        }
                                                    ]
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "legal_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "document": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "whatsapp": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "contacts": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/CustomerStatus"
                                                        }
                                                    ]
                                                },
                                                "birth_date": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "addresses": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "type": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "$ref": "#\/components\/schemas\/AddressType"
                                                                    }
                                                                ]
                                                            },
                                                            "zip": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "street": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "number": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "complement": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "district": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "city": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "uf": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lat": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lng": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "type",
                                                            "zip",
                                                            "street",
                                                            "number",
                                                            "complement",
                                                            "district",
                                                            "city",
                                                            "uf",
                                                            "lat",
                                                            "lng"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "name",
                                                "legal_name",
                                                "document",
                                                "email",
                                                "phone",
                                                "whatsapp",
                                                "contacts",
                                                "status",
                                                "birth_date",
                                                "addresses",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "v1.customers.update",
                "description": "S\u00f3 os campos enviados mudam. A mudan\u00e7a fica na auditoria.",
                "summary": "Alterar contato do assinante",
                "tags": [
                    "Assinantes"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "email",
                                        "maxLength": 160
                                    },
                                    "phone": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "whatsapp": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/CustomerType"
                                                        }
                                                    ]
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "legal_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "document": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "whatsapp": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "contacts": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/CustomerStatus"
                                                        }
                                                    ]
                                                },
                                                "birth_date": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "addresses": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "type": {
                                                                "anyOf": [
                                                                    {
                                                                        "type": "string"
                                                                    },
                                                                    {
                                                                        "$ref": "#\/components\/schemas\/AddressType"
                                                                    }
                                                                ]
                                                            },
                                                            "zip": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "street": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "number": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "complement": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "district": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "city": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "uf": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lat": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lng": {
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "type",
                                                            "zip",
                                                            "street",
                                                            "number",
                                                            "complement",
                                                            "district",
                                                            "city",
                                                            "uf",
                                                            "lat",
                                                            "lng"
                                                        ]
                                                    }
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "name",
                                                "legal_name",
                                                "document",
                                                "email",
                                                "phone",
                                                "whatsapp",
                                                "contacts",
                                                "status",
                                                "birth_date",
                                                "addresses",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/contracts": {
            "get": {
                "operationId": "v1.contracts.index",
                "summary": "Listar contratos",
                "tags": [
                    "Contratos"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/ContractStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "plan",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/contracts\/{id}": {
            "get": {
                "operationId": "v1.contracts.show",
                "summary": "Ver um contrato",
                "tags": [
                    "Contratos"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "number": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/ContractStatus"
                                                        }
                                                    ]
                                                },
                                                "customer": {
                                                    "type": "string"
                                                },
                                                "plan": {
                                                    "type": "string"
                                                },
                                                "price_cents": {
                                                    "type": "integer"
                                                },
                                                "discount_cents": {
                                                    "type": "integer"
                                                },
                                                "due_day": {
                                                    "type": "integer"
                                                },
                                                "login_pppoe": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "start_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "fidelity_until": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "suspended_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "cancelled_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "number",
                                                "status",
                                                "customer",
                                                "plan",
                                                "price_cents",
                                                "discount_cents",
                                                "due_day",
                                                "login_pppoe",
                                                "start_at",
                                                "fidelity_until",
                                                "suspended_at",
                                                "cancelled_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/plans": {
            "get": {
                "operationId": "v1.plans.index",
                "summary": "Listar planos",
                "tags": [
                    "Planos"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": [
                                "boolean",
                                "null"
                            ]
                        }
                    },
                    {
                        "name": "visible_app",
                        "in": "query",
                        "schema": {
                            "type": [
                                "boolean",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/plans\/{id}": {
            "get": {
                "operationId": "v1.plans.show",
                "summary": "Ver um plano",
                "tags": [
                    "Planos"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/PlanType"
                                                        }
                                                    ]
                                                },
                                                "price_cents": {
                                                    "type": "integer"
                                                },
                                                "download_kbps": {
                                                    "type": "integer"
                                                },
                                                "upload_kbps": {
                                                    "type": "integer"
                                                },
                                                "fidelity_months": {
                                                    "type": "integer"
                                                },
                                                "is_active": {
                                                    "type": "boolean"
                                                },
                                                "visible_portal": {
                                                    "type": "boolean"
                                                },
                                                "visible_app": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "type",
                                                "price_cents",
                                                "download_kbps",
                                                "upload_kbps",
                                                "fidelity_months",
                                                "is_active",
                                                "visible_portal",
                                                "visible_app"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/invoices": {
            "get": {
                "operationId": "v1.invoices.index",
                "description": "due_from e due_to filtram pelo vencimento (AAAA-MM-DD).",
                "summary": "Listar cobran\u00e7as",
                "tags": [
                    "Cobran\u00e7as"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/InvoiceStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "contract",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "due_from",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        }
                    },
                    {
                        "name": "due_to",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/invoices\/{id}": {
            "get": {
                "operationId": "v1.invoices.show",
                "summary": "Ver uma cobran\u00e7a",
                "tags": [
                    "Cobran\u00e7as"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "number": {
                                                    "type": "string"
                                                },
                                                "kind": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/InvoiceKind"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/InvoiceStatus"
                                                        }
                                                    ]
                                                },
                                                "customer": {
                                                    "type": "string"
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "reference_month": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "format": "date-time"
                                                },
                                                "due_date": {
                                                    "type": "string"
                                                },
                                                "amount_cents": {
                                                    "type": "integer"
                                                },
                                                "discount_cents": {
                                                    "type": "integer"
                                                },
                                                "interest_cents": {
                                                    "type": "integer"
                                                },
                                                "fine_cents": {
                                                    "type": "integer"
                                                },
                                                "paid_amount_cents": {
                                                    "type": "integer"
                                                },
                                                "paid_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "boleto_line": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "pix_copy_paste": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "number",
                                                "kind",
                                                "status",
                                                "customer",
                                                "contract",
                                                "reference_month",
                                                "due_date",
                                                "amount_cents",
                                                "discount_cents",
                                                "interest_cents",
                                                "fine_cents",
                                                "paid_amount_cents",
                                                "paid_at",
                                                "boleto_line",
                                                "pix_copy_paste",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/invoices\/{id}\/payments": {
            "post": {
                "operationId": "v1.invoices.pay",
                "description": "Registra um pagamento recebido fora do MKCEL (dinheiro, transfer\u00eancia, outro sistema). Exige o cabe\u00e7alho\nIdempotency-Key: reenviar a mesma chave devolve a mesma resposta sem baixar de novo. Cobran\u00e7a paga ou cancelada\nd\u00e1 422. Quitada, a cobran\u00e7a religa o contrato pelo mesmo caminho do painel.",
                "summary": "Dar baixa na cobran\u00e7a",
                "tags": [
                    "Cobran\u00e7as"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount_cents": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100000000
                                    },
                                    "method": {
                                        "$ref": "#\/components\/schemas\/PaymentMethod"
                                    },
                                    "paid_at": {
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "notes": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 300
                                    }
                                },
                                "required": [
                                    "amount_cents",
                                    "method",
                                    "paid_at"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "invoice": {
                                                    "type": "string"
                                                },
                                                "amount_cents": {
                                                    "type": "integer"
                                                },
                                                "interest_cents": {
                                                    "type": "integer"
                                                },
                                                "fine_cents": {
                                                    "type": "integer"
                                                },
                                                "method": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/PaymentMethod"
                                                        }
                                                    ]
                                                },
                                                "paid_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        }
                                                    ]
                                                },
                                                "reversal_of": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "invoice",
                                                "amount_cents",
                                                "interest_cents",
                                                "fine_cents",
                                                "method",
                                                "paid_at",
                                                "reversal_of",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/payments": {
            "get": {
                "operationId": "v1.payments.index",
                "description": "Estorno \u00e9 um pagamento com valor negativo e reversal_of apontando para o original. from e to filtram pela data\ndo pagamento (AAAA-MM-DD).",
                "summary": "Listar pagamentos",
                "tags": [
                    "Pagamentos"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "invoice",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/payments\/{id}": {
            "get": {
                "operationId": "v1.payments.show",
                "summary": "Ver um pagamento",
                "tags": [
                    "Pagamentos"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "invoice": {
                                                    "type": "string"
                                                },
                                                "amount_cents": {
                                                    "type": "integer"
                                                },
                                                "interest_cents": {
                                                    "type": "integer"
                                                },
                                                "fine_cents": {
                                                    "type": "integer"
                                                },
                                                "method": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/PaymentMethod"
                                                        }
                                                    ]
                                                },
                                                "paid_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        }
                                                    ]
                                                },
                                                "reversal_of": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "invoice",
                                                "amount_cents",
                                                "interest_cents",
                                                "fine_cents",
                                                "method",
                                                "paid_at",
                                                "reversal_of",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/tickets": {
            "get": {
                "operationId": "v1.tickets.index",
                "summary": "Listar chamados",
                "tags": [
                    "Chamados"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/TicketStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "v1.tickets.store",
                "description": "Abre com o canal Integra\u00e7\u00e3o (API) e a distribui\u00e7\u00e3o do setor escolhe o atendente. O contrato, quando enviado,\nprecisa ser do assinante.",
                "summary": "Abrir chamado",
                "tags": [
                    "Chamados"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subject": {
                                        "type": "string",
                                        "maxLength": 160
                                    },
                                    "body": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 5000
                                    },
                                    "customer": {
                                        "type": "string",
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "contract": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 26,
                                        "maxLength": 26
                                    },
                                    "priority": {
                                        "anyOf": [
                                            {
                                                "$ref": "#\/components\/schemas\/TicketPriority"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ]
                                    }
                                },
                                "required": [
                                    "subject",
                                    "customer"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "protocol": {
                                                    "type": "string"
                                                },
                                                "subject": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketStatus"
                                                        }
                                                    ]
                                                },
                                                "priority": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketPriority"
                                                        }
                                                    ]
                                                },
                                                "channel": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketChannel"
                                                        }
                                                    ]
                                                },
                                                "customer": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sla_due_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "resolved_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "protocol",
                                                "subject",
                                                "status",
                                                "priority",
                                                "channel",
                                                "customer",
                                                "contract",
                                                "sla_due_at",
                                                "resolved_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/tickets\/{id}": {
            "get": {
                "operationId": "v1.tickets.show",
                "summary": "Ver um chamado",
                "tags": [
                    "Chamados"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "protocol": {
                                                    "type": "string"
                                                },
                                                "subject": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketStatus"
                                                        }
                                                    ]
                                                },
                                                "priority": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketPriority"
                                                        }
                                                    ]
                                                },
                                                "channel": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketChannel"
                                                        }
                                                    ]
                                                },
                                                "customer": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "sla_due_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "resolved_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "protocol",
                                                "subject",
                                                "status",
                                                "priority",
                                                "channel",
                                                "customer",
                                                "contract",
                                                "sla_due_at",
                                                "resolved_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/work-orders": {
            "get": {
                "operationId": "v1.work-orders.index",
                "summary": "Listar ordens de servi\u00e7o",
                "tags": [
                    "Ordens de servi\u00e7o"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/WorkOrderStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "customer",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "contract",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "updated_since",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date-time"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/work-orders\/{id}": {
            "get": {
                "operationId": "v1.work-orders.show",
                "summary": "Ver uma ordem de servi\u00e7o",
                "tags": [
                    "Ordens de servi\u00e7o"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "number": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/WorkOrderType"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/WorkOrderStatus"
                                                        }
                                                    ]
                                                },
                                                "priority": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/TicketPriority"
                                                        }
                                                    ]
                                                },
                                                "customer": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ticket": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "technician": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "window_start": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "window_end": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "started_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "finished_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "updated_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "number",
                                                "type",
                                                "status",
                                                "priority",
                                                "customer",
                                                "contract",
                                                "ticket",
                                                "technician",
                                                "window_start",
                                                "window_end",
                                                "started_at",
                                                "finished_at",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/onus": {
            "get": {
                "operationId": "v1.onus.index",
                "description": "rx_power e tx_power em dBm.",
                "summary": "Listar ONUs",
                "tags": [
                    "Rede"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/OnuStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "contract",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "serial",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 64
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/onus\/{id}": {
            "get": {
                "operationId": "v1.onus.show",
                "summary": "Ver uma ONU",
                "tags": [
                    "Rede"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "serial": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "model": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "vendor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/OnuStatus"
                                                        }
                                                    ]
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "customer": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "olt": {
                                                    "type": "string"
                                                },
                                                "rx_power": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "tx_power": {
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "last_seen_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "last_down_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "last_down_cause": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "serial",
                                                "name",
                                                "model",
                                                "vendor",
                                                "status",
                                                "contract",
                                                "customer",
                                                "olt",
                                                "rx_power",
                                                "tx_power",
                                                "last_seen_at",
                                                "last_down_at",
                                                "last_down_cause"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/nas-sessions": {
            "get": {
                "operationId": "v1.nas-sessions.index",
                "description": "active=1 traz s\u00f3 as sess\u00f5es abertas. bytes_in e bytes_out s\u00e3o o total da sess\u00e3o.",
                "summary": "Listar sess\u00f5es PPPoE",
                "tags": [
                    "Rede"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "contract",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "active",
                        "in": "query",
                        "schema": {
                            "type": [
                                "boolean",
                                "null"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/nas-sessions\/{id}": {
            "get": {
                "operationId": "v1.nas-sessions.show",
                "summary": "Ver uma sess\u00e3o PPPoE",
                "tags": [
                    "Rede"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "nas": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "username": {
                                                    "type": "string"
                                                },
                                                "framed_ip": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "mac": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/SessionStatus"
                                                        }
                                                    ]
                                                },
                                                "started_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "stopped_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "bytes_in": {
                                                    "type": "integer"
                                                },
                                                "bytes_out": {
                                                    "type": "integer"
                                                },
                                                "terminate_cause": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "contract",
                                                "nas",
                                                "username",
                                                "framed_ip",
                                                "mac",
                                                "status",
                                                "started_at",
                                                "stopped_at",
                                                "bytes_in",
                                                "bytes_out",
                                                "terminate_cause"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/alerts": {
            "get": {
                "operationId": "v1.alerts.index",
                "summary": "Listar alertas",
                "tags": [
                    "Alertas"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/AlertStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "severity",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/AlertSeverity"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/alerts\/{id}": {
            "get": {
                "operationId": "v1.alerts.show",
                "summary": "Ver um alerta",
                "tags": [
                    "Alertas"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "source": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/AlertSource"
                                                        }
                                                    ]
                                                },
                                                "severity": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/AlertSeverity"
                                                        }
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/AlertStatus"
                                                        }
                                                    ]
                                                },
                                                "title": {
                                                    "type": "string"
                                                },
                                                "message": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "acknowledged_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "resolved_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                },
                                                "created_at": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "string",
                                                            "format": "date-time"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "source",
                                                "severity",
                                                "status",
                                                "title",
                                                "message",
                                                "acknowledged_at",
                                                "resolved_at",
                                                "created_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/stock\/products": {
            "get": {
                "operationId": "v1.stock.products.index",
                "summary": "Listar produtos",
                "tags": [
                    "Estoque"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "sku",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 64
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/stock\/products\/{id}": {
            "get": {
                "operationId": "v1.stock.products.show",
                "summary": "Ver um produto",
                "tags": [
                    "Estoque"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "sku": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "type": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/ProductType"
                                                        }
                                                    ]
                                                },
                                                "unit": {
                                                    "type": "string"
                                                },
                                                "cost_cents": {
                                                    "type": "integer"
                                                },
                                                "sale_price_cents": {
                                                    "type": "integer"
                                                },
                                                "min_stock": {
                                                    "type": "integer"
                                                },
                                                "track_serial": {
                                                    "type": "boolean"
                                                },
                                                "track_mac": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "sku",
                                                "type",
                                                "unit",
                                                "cost_cents",
                                                "sale_price_cents",
                                                "min_stock",
                                                "track_serial",
                                                "track_mac"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/stock\/items": {
            "get": {
                "operationId": "v1.stock.items.index",
                "summary": "Listar itens com n\u00famero de s\u00e9rie",
                "tags": [
                    "Estoque"
                ],
                "parameters": [
                    {
                        "name": "cursor",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 512
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "anyOf": [
                                {
                                    "$ref": "#\/components\/schemas\/StockItemStatus"
                                },
                                {
                                    "type": "null"
                                }
                            ]
                        }
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "contract",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "minLength": 26,
                            "maxLength": 26
                        }
                    },
                    {
                        "name": "serial",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 64
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "has_more": {
                                                    "type": "boolean"
                                                },
                                                "next_cursor": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "has_more",
                                                "next_cursor"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/stock\/items\/{id}": {
            "get": {
                "operationId": "v1.stock.items.show",
                "summary": "Ver um item com n\u00famero de s\u00e9rie",
                "tags": [
                    "Estoque"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "product": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "location": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "serial": {
                                                    "type": "string"
                                                },
                                                "mac": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "status": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "$ref": "#\/components\/schemas\/StockItemStatus"
                                                        }
                                                    ]
                                                },
                                                "contract": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "product",
                                                "location",
                                                "serial",
                                                "mac",
                                                "status",
                                                "contract"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/stock\/balances": {
            "get": {
                "operationId": "v1.stock.balances",
                "description": "Invent\u00e1rio: o saldo de cada produto em cada local (almoxarifado, ve\u00edculo do t\u00e9cnico), s\u00f3 onde h\u00e1 saldo. Os itens\nem comodato ficam fora (est\u00e3o com o assinante): liste-os em stock\/items?status=in_use.",
                "summary": "Saldo por produto e local",
                "tags": [
                    "Estoque"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "product": {
                                                        "type": "string"
                                                    },
                                                    "product_name": {
                                                        "type": "string"
                                                    },
                                                    "location": {
                                                        "type": "string"
                                                    },
                                                    "location_name": {
                                                        "type": "string"
                                                    },
                                                    "location_type": {
                                                        "type": "string"
                                                    },
                                                    "qty": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "product",
                                                    "product_name",
                                                    "location",
                                                    "location_name",
                                                    "location_type",
                                                    "qty"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/reports": {
            "get": {
                "operationId": "v1.reports.index",
                "description": "Cada relat\u00f3rio traz as colunas (chave, r\u00f3tulo e tipo: text, int, money em centavos, percent ou decimal) e os\nfiltros que aceita (from e to em AAAA-MM-DD nos relat\u00f3rios por per\u00edodo).",
                "summary": "Listar relat\u00f3rios do cat\u00e1logo",
                "tags": [
                    "Relat\u00f3rios"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "group": {
                                                        "type": "string"
                                                    },
                                                    "params": {
                                                        "type": "array",
                                                        "items": {}
                                                    },
                                                    "columns": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "key": {
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "type": "string"
                                                                },
                                                                "type": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "key",
                                                                "label",
                                                                "type"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "label",
                                                    "group",
                                                    "params",
                                                    "columns"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "\/reports\/{report}": {
            "get": {
                "operationId": "v1.reports.show",
                "description": "As linhas do relat\u00f3rio com os filtros da query string. Os n\u00fameros s\u00e3o os mesmos das telas do painel.",
                "summary": "Gerar um relat\u00f3rio",
                "tags": [
                    "Relat\u00f3rios"
                ],
                "parameters": [
                    {
                        "name": "report",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "customers": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "status",
                                                            "customers"
                                                        ]
                                                    }
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "plan": {
                                                                "type": "string"
                                                            },
                                                            "contracts": {
                                                                "type": "integer"
                                                            },
                                                            "monthly_cents": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "plan",
                                                            "contracts",
                                                            "monthly_cents"
                                                        ]
                                                    }
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "district": {
                                                                "type": "string"
                                                            },
                                                            "city": {
                                                                "type": "string"
                                                            },
                                                            "customers": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "district",
                                                            "city",
                                                            "customers"
                                                        ]
                                                    }
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "plan": {
                                                                "type": "string"
                                                            },
                                                            "payments": {
                                                                "type": "integer",
                                                                "minimum": 0
                                                            },
                                                            "received_cents": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "plan",
                                                            "payments",
                                                            "received_cents"
                                                        ]
                                                    }
                                                },
                                                {
                                                    "type": "array"
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "type": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "orders": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "type",
                                                            "status",
                                                            "orders"
                                                        ]
                                                    }
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "product": {
                                                                "type": "string"
                                                            },
                                                            "location": {
                                                                "type": "string"
                                                            },
                                                            "qty": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "product",
                                                            "location",
                                                            "qty"
                                                        ]
                                                    }
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "serial": {
                                                                "type": "string"
                                                            },
                                                            "product": {
                                                                "type": "string"
                                                            },
                                                            "customer": {
                                                                "type": "string"
                                                            },
                                                            "contract": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "serial",
                                                            "product",
                                                            "customer",
                                                            "contract"
                                                        ]
                                                    }
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "AddressType": {
                "type": "string",
                "enum": [
                    "install",
                    "billing"
                ],
                "title": "AddressType"
            },
            "AlertSeverity": {
                "type": "string",
                "description": "Gravidade do alerta, nos mesmos cinco n\u00edveis do Zabbix (0 e 1 viram Informa\u00e7\u00e3o) para a ingest\u00e3o n\u00e3o perder o grau.\n",
                "enum": [
                    "info",
                    "warning",
                    "average",
                    "high",
                    "disaster"
                ],
                "title": "AlertSeverity"
            },
            "AlertSource": {
                "type": "string",
                "description": "De onde vem o alerta (02-MODULOS\/04, se\u00e7\u00e3o 5).\n",
                "enum": [
                    "zabbix",
                    "snmp",
                    "onu",
                    "radius",
                    "billing",
                    "system"
                ],
                "title": "AlertSource"
            },
            "AlertStatus": {
                "type": "string",
                "description": "Situa\u00e7\u00e3o do alerta.\n",
                "enum": [
                    "open",
                    "acknowledged",
                    "resolved"
                ],
                "title": "AlertStatus"
            },
            "ContractStatus": {
                "type": "string",
                "enum": [
                    "draft",
                    "pending_install",
                    "active",
                    "suspended",
                    "reduced",
                    "cancelled"
                ],
                "title": "ContractStatus"
            },
            "CustomerStatus": {
                "type": "string",
                "enum": [
                    "lead",
                    "prospect",
                    "active",
                    "suspended",
                    "cancelled",
                    "blocked"
                ],
                "title": "CustomerStatus"
            },
            "CustomerType": {
                "type": "string",
                "enum": [
                    "pf",
                    "pj"
                ],
                "title": "CustomerType"
            },
            "InvoiceKind": {
                "type": "string",
                "description": "Origem da cobran\u00e7a: mensal do faturamento, avulsa, parcela de carn\u00ea, parcela de negocia\u00e7\u00e3o ou final do cancelamento.\n",
                "enum": [
                    "monthly",
                    "one_off",
                    "carne",
                    "negotiation",
                    "final"
                ],
                "title": "InvoiceKind"
            },
            "InvoiceStatus": {
                "type": "string",
                "description": "Status da cobran\u00e7a (02-banco se\u00e7\u00e3o 7).\n",
                "enum": [
                    "open",
                    "paid",
                    "partial",
                    "overdue",
                    "cancelled",
                    "negotiated"
                ],
                "title": "InvoiceStatus"
            },
            "OnuStatus": {
                "type": "string",
                "description": "Situa\u00e7\u00e3o da ONU. pending: apareceu na OLT e n\u00e3o foi autorizada; ignored: pendente que o provedor mandou ignorar.\n",
                "enum": [
                    "pending",
                    "online",
                    "offline",
                    "los",
                    "dying_gasp",
                    "unauthorized",
                    "ignored"
                ],
                "title": "OnuStatus"
            },
            "PaymentMethod": {
                "type": "string",
                "description": "Forma de pagamento (02-banco se\u00e7\u00e3o 7, mais transfer\u00eancia).\n",
                "enum": [
                    "boleto",
                    "pix",
                    "card",
                    "cash",
                    "carne",
                    "debit_auto",
                    "transfer"
                ],
                "title": "PaymentMethod"
            },
            "PlanType": {
                "type": "string",
                "enum": [
                    "internet",
                    "sva",
                    "combo",
                    "tv",
                    "phone"
                ],
                "title": "PlanType"
            },
            "ProductType": {
                "type": "string",
                "description": "Tipo de produto do estoque (02-banco, se\u00e7\u00e3o 14).\n",
                "enum": [
                    "onu",
                    "router",
                    "cable",
                    "connector",
                    "other"
                ],
                "title": "ProductType"
            },
            "SessionStatus": {
                "type": "string",
                "description": "Situa\u00e7\u00e3o da sess\u00e3o em radius_sessions.\n",
                "enum": [
                    "online",
                    "offline"
                ],
                "title": "SessionStatus"
            },
            "StockItemStatus": {
                "type": "string",
                "description": "Situa\u00e7\u00e3o de um item de estoque com serial (m\u00ednimo da fase 6; m\u00f3dulo completo na fase 11).\n",
                "enum": [
                    "available",
                    "reserved",
                    "in_use",
                    "defective",
                    "returned"
                ],
                "title": "StockItemStatus"
            },
            "TicketChannel": {
                "type": "string",
                "description": "Canal de entrada do chamado.\n",
                "enum": [
                    "panel",
                    "phone",
                    "whatsapp",
                    "email",
                    "portal",
                    "app",
                    "api"
                ],
                "title": "TicketChannel"
            },
            "TicketPriority": {
                "type": "string",
                "description": "Prioridade do chamado e da OS, sempre com cor e texto: Urgente vermelho, Alta laranja, Normal azul, Baixa cinza.\n",
                "enum": [
                    "urgent",
                    "high",
                    "normal",
                    "low"
                ],
                "title": "TicketPriority"
            },
            "TicketStatus": {
                "type": "string",
                "description": "Situa\u00e7\u00e3o do chamado (02-banco, se\u00e7\u00e3o 10). waiting_field \u00e9 \"Aguardando terceiros\"; closed \u00e9 o resolvido arquivado (sai do Kanban 7 dias depois).\n",
                "enum": [
                    "open",
                    "in_progress",
                    "pending_customer",
                    "waiting_field",
                    "resolved",
                    "closed"
                ],
                "title": "TicketStatus"
            },
            "WorkOrderStatus": {
                "type": "string",
                "description": "Situa\u00e7\u00e3o da ordem de servi\u00e7o.\n",
                "enum": [
                    "new",
                    "scheduled",
                    "en_route",
                    "in_progress",
                    "done",
                    "cancelled"
                ],
                "title": "WorkOrderStatus"
            },
            "WorkOrderType": {
                "type": "string",
                "description": "Tipo da ordem de servi\u00e7o (02-banco, se\u00e7\u00e3o 11, mais troca de equipamento e visita comercial aprovadas na fase 7).\n",
                "enum": [
                    "install",
                    "repair",
                    "change_address",
                    "removal",
                    "maintenance",
                    "equipment_swap",
                    "commercial_visit"
                ],
                "title": "WorkOrderType"
            }
        },
        "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"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}