{
    "openapi": "3.0.0",
    "info": {
        "title": "Impressão Cálculo Endosso",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://sauto.dsv.bradescoseguros.com.br:443/V2/WSBL-CotacaoCSP/service/",
            "description": "Desenvolvimento"
        },
        {
            "url": "https://sauto.hml.bradescoseguros.com.br:443/V2/WSBL-CotacaoCSP/service/",
            "description": "Homologação"
        },
        {
            "url": "https://sauto.bradescoseguros.com.br:443/V2/WSBL-CotacaoCSP/service/",
            "description": "Produção"
        }
    ],
    "tags": [
        {
            "name": "Impressão",
            "description": "Imprimir demonstrativo"
        }
    ],
    "paths": {
        "/endosso/impressao/cotacao": {
            "post": {
                "tags": [
                    "Impressão"
                ],
                "summary": "Impressão cálculo endosso",
                "operationId": "demonstrativo",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/Request"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful Operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/DemonstrativoResponse"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MensagemErroVo"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Forbidden",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MensagemErroVo"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not Found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MensagemErroVo"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Unprocessable Entity",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MensagemErroVo"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/MensagemErroVo"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        },
        "schemas": {
            "MensagemErroVo": {
                "type": "object",
                "properties": {
                    "MensagemErroVo": {
                        "type": "object",
                        "properties": {
                            "cdErro": {
                                "type": "integer",
                                "example": 400
                            },
                            "dsErro": {
                                "type": "string",
                                "example": "Erro de negócio: Erro ao processar a impressão."
                            },
                            "cdSqlCode": {
                                "type": "integer",
                                "example": 0
                            }
                        }
                    }
                }
            },
            "Autenticacao": {
                "type": "object",
                "properties": {
                    "provedor": {
                        "type": "integer",
                        "example": 3004894000186
                    },
                    "usuario": {
                        "type": "string",
                        "example": "02519440000185"
                    }
                },
                "required": [
                    "provedor",
                    "usuario"
                ]
            },
            "ChaveApolice": {
                "type": "object",
                "properties": {
                    "numero": {
                        "type": "integer",
                        "example": 49456
                    },
                    "item": {
                        "type": "integer",
                        "example": 1
                    }
                },
                "required": [
                    "numero",
                    "item"
                ]
            },
            "Endosso": {
                "type": "object",
                "properties": {
                    "numero": {
                        "type": "integer",
                        "format": "int64",
                        "example": 123456789
                    },
                    "item": {
                        "type": "integer",
                        "format": "int32",
                        "example": 1
                    }
                },
                "required": [
                    "numero",
                    "item"
                ]
            },
            "Request": {
                "type": "object",
                "properties": {
                    "autenticacao": {
                        "$ref": "#/components/schemas/Autenticacao"
                    },
                    "chaveApolice": {
                        "$ref": "#/components/schemas/ChaveApolice"
                    },
                    "estudo": {
                        "$ref": "#/components/schemas/Endosso"
                    },
                    "codigoSucursal": {
                        "type": "integer",
                        "example": 251
                    }
                },
                "required": [
                    "autenticacao",
                    "chaveApolice",
                    "estudo",
                    "codigoSucursal"
                ]
            },
            "DemonstrativoResponse": {
                "type": "object",
                "properties": {
                    "bytesPDF": {
                        "type": "string",
                        "format": "binary",
                        "description": "PDF file in byte array format",
                        "example": null
                    }
                }
            }
        }
    }
}