{
  "openapi": "3.1.0",
  "info": {
    "title": "Agent Air API",
    "version": "1.0.0",
    "summary": "Reserva de voos por agentes autônomos, da busca ao recibo.",
    "description": "API REST da Agent Air. A leitura de voos e tarifas é pública. Criar reserva, mandato, ticket e pagamento exige um token OAuth 2.1 com o escopo correspondente. Nenhuma cobrança acontece sem um mandato de pagamento válido, que declara escopo, limite de valor, prazo de validade e caminho de revogação. As mesmas operações de leitura estão disponíveis como tools WebMCP em /webmcp.js (veja /.well-known/webmcp.json).",
    "contact": {
      "name": "Agent Air",
      "email": "contato@agentair.ori.lat",
      "url": "https://agentair.ori.lat/contato"
    },
    "license": {
      "name": "Uso permitido para pesquisa",
      "url": "https://agentair.ori.lat/politicas/termos"
    }
  },
  "servers": [
    {
      "url": "https://agentair.ori.lat/api/v1",
      "description": "Produção do piloto"
    }
  ],
  "externalDocs": {
    "description": "Guia do fluxo de reserva",
    "url": "https://agentair.ori.lat/docs"
  },
  "tags": [
    {
      "name": "catalog",
      "description": "Voos, tarifas e disponibilidade. Público."
    },
    {
      "name": "booking",
      "description": "Reservas de voo."
    },
    {
      "name": "mandate",
      "description": "Mandatos de pagamento."
    },
    {
      "name": "order",
      "description": "Tickets, recibo, confirmação e cancelamento."
    },
    {
      "name": "webmcp",
      "description": "Dispatche de tools WebMCP."
    },
    {
      "name": "observability",
      "description": "Tráfego de agentes e evidência de execução."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "observability"
        ],
        "operationId": "getHealth",
        "summary": "Verificação de disponibilidade",
        "security": [],
        "responses": {
          "200": {
            "description": "Serviço disponível.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "examples": [
                        "ok"
                      ]
                    },
                    "time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/flights": {
      "get": {
        "tags": [
          "catalog"
        ],
        "operationId": "listFlights",
        "summary": "Listar ou buscar voos",
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Cidade de destino, código de aeroporto ou número do voo."
          }
        ],
        "responses": {
          "200": {
            "description": "Lista de voos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Flight"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/flights/{flightNumber}": {
      "get": {
        "tags": [
          "catalog"
        ],
        "operationId": "getFlight",
        "summary": "Ler um voo por número",
        "security": [],
        "parameters": [
          {
            "name": "flightNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "O voo com suas tarifas.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Flight"
                }
              }
            }
          },
          "404": {
            "description": "Nenhum voo com esse número.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/flights/{flightNumber}/fares": {
      "get": {
        "tags": [
          "catalog"
        ],
        "operationId": "quoteFares",
        "summary": "Cotas as tarifas de um voo sob um orçamento",
        "description": "Devolve cada tarifa com chegada (mesmo dia ou não), bagagem, total e se cabe no orçamento, e indica a mais barata que chega no mesmo dia com mala despachada.",
        "security": [],
        "parameters": [
          {
            "name": "flightNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "budget",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cotação.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "options": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "bestByConstraints": {
                      "type": "object",
                      "nullable": true
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Nenhum voo com esse número.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bookings": {
      "post": {
        "tags": [
          "booking"
        ],
        "operationId": "createBooking",
        "summary": "Criar uma reserva de voo",
        "security": [
          {
            "oauth2": [
              "booking:write"
            ]
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flightNumber": {
                    "type": "string"
                  },
                  "fareCode": {
                    "type": "string"
                  },
                  "passengers": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9,
                    "default": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Reserva criada.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Escopo insuficiente.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Voo, tarifa ou passageiros inválidos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}": {
      "get": {
        "tags": [
          "booking"
        ],
        "operationId": "getBooking",
        "summary": "Ler uma reserva",
        "security": [
          {
            "oauth2": [
              "booking:write"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A reserva.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "404": {
            "description": "Reserva não encontrada.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "booking"
        ],
        "operationId": "updateBooking",
        "summary": "Alterar voo, tarifa ou passageiros",
        "security": [
          {
            "oauth2": [
              "booking:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "flightNumber": {
                    "type": "string"
                  },
                  "fareCode": {
                    "type": "string"
                  },
                  "passengers": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reserva atualizada.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "404": {
            "description": "Reserva não encontrada.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Alteração inválida.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/mandates": {
      "post": {
        "tags": [
          "mandate"
        ],
        "operationId": "createMandate",
        "summary": "Criar um mandato de pagamento",
        "description": "O mandato é a autorização de gasto. Declara escopo, limite máximo em centavos, janela de validade e o caminho de revogação. Sem um mandato válido nenhuma cobrança é possível.",
        "security": [
          {
            "oauth2": [
              "mandate:create"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "limit"
                ],
                "properties": {
                  "scope": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "default": [
                      "order:write",
                      "payment:execute"
                    ]
                  },
                  "limit": {
                    "type": "object",
                    "required": [
                      "amount",
                      "currency"
                    ],
                    "properties": {
                      "amount": {
                        "type": "integer",
                        "description": "Valor em centavos.",
                        "examples": [
                          24000
                        ]
                      },
                      "currency": {
                        "type": "string",
                        "examples": [
                          "BRL"
                        ]
                      }
                    }
                  },
                  "durationMinutes": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10080,
                    "default": 60
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Mandato criado.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Mandate"
                }
              }
            }
          },
          "422": {
            "description": "Limite, moeda ou validade inválidos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/mandates/{id}": {
      "delete": {
        "tags": [
          "mandate"
        ],
        "operationId": "revokeMandate",
        "summary": "Revogar um mandato",
        "security": [
          {
            "oauth2": [
              "mandate:create"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Mandato revogado.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Mandate"
                }
              }
            }
          },
          "403": {
            "description": "O mandato pertence a outro titular.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Mandato não encontrado.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "post": {
        "tags": [
          "order"
        ],
        "operationId": "placeOrder",
        "summary": "Confirmar a reserva e emitir o ticket",
        "description": "Valida a reserva, autoriza contra o mandato, cobra no processador de teste e emite o ticket. A autorização acontece antes da cobrança.",
        "security": [
          {
            "oauth2": [
              "order:write",
              "payment:execute"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "bookingId",
                  "payment"
                ],
                "properties": {
                  "bookingId": {
                    "type": "string"
                  },
                  "mandateId": {
                    "type": "string"
                  },
                  "buyer": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "document": {
                        "type": "string"
                      }
                    }
                  },
                  "payment": {
                    "type": "object",
                    "required": [
                      "cardNumber",
                      "expiry",
                      "cvc"
                    ],
                    "properties": {
                      "cardNumber": {
                        "type": "string",
                        "examples": [
                          "4111111111111111"
                        ]
                      },
                      "expiry": {
                        "type": "string",
                        "examples": [
                          "12/30"
                        ]
                      },
                      "cvc": {
                        "type": "string",
                        "examples": [
                          "123"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Ticket emitido e pago.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "402": {
            "description": "Pagamento recusado ou com desafio pendente.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Mandato revogado ou vencido.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Reserva vazia ou valor acima do limite do mandato.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/{id}/receipt": {
      "get": {
        "tags": [
          "order"
        ],
        "operationId": "getReceipt",
        "summary": "Obter o recibo",
        "security": [
          {
            "oauth2": [
              "receipt:read"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Recibo do ticket.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "404": {
            "description": "Ticket não encontrado.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webmcp/call": {
      "post": {
        "tags": [
          "webmcp"
        ],
        "operationId": "webmcpCall",
        "summary": "Dispathar uma tool WebMCP",
        "description": "Executa uma tool do manifesto /.well-known/webmcp.json e devolve um MCP CallToolResult. Tools públicas não precisam de token; tools de escrita exigem OAuth com o escopo declarado.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "tool",
                  "arguments"
                ],
                "properties": {
                  "tool": {
                    "type": "string"
                  },
                  "arguments": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resultado da tool.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Tool desconhecida ou argumentos inválidos.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token ausente ou inválido.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Escopo insuficiente.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Voo não encontrado.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error",
                    "message"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Código estável do erro."
                    },
                    "message": {
                      "type": "string",
                      "description": "Descrição legível, em português."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/observability/agent-traffic": {
      "get": {
        "tags": [
          "observability"
        ],
        "operationId": "getAgentTraffic",
        "summary": "Tráfego agregado de agentes",
        "security": [],
        "responses": {
          "200": {
            "description": "Agregados de tráfego.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.1, authorization code com PKCE obrigatório. Detalhes em /auth.md.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://agentair.ori.lat/oauth/authorize",
            "tokenUrl": "https://agentair.ori.lat/oauth/token",
            "refreshUrl": "https://agentair.ori.lat/oauth/token",
            "scopes": {
              "catalog:read": "Ler voos, tarifas, horários e disponibilidade.",
              "booking:write": "Criar e alterar reservas de voo.",
              "order:write": "Confirmar reservas e emitir tickets.",
              "mandate:create": "Criar mandatos de pagamento com limite de valor e prazo de validade.",
              "payment:execute": "Executar cobrança dentro do limite de um mandato válido.",
              "receipt:read": "Ler recibos, itinerário e histórico de tickets."
            }
          }
        }
      }
    },
    "schemas": {
      "Money": {
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "description": "Valor em centavos.",
            "examples": [
              24000
            ]
          },
          "currency": {
            "type": "string",
            "examples": [
              "BRL"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Código estável do erro."
          },
          "message": {
            "type": "string",
            "description": "Descrição legível, em português."
          }
        }
      },
      "Flight": {
        "type": "object",
        "properties": {
          "flightNumber": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "toCity": {
            "type": "string"
          },
          "departureTime": {
            "type": "string"
          },
          "durationMin": {
            "type": "integer"
          },
          "seats": {
            "type": "integer"
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fare"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Fare": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "integer"
          },
          "arrivalTime": {
            "type": "string"
          },
          "arrivalDayOffset": {
            "type": "integer"
          },
          "baggage": {
            "type": "string",
            "enum": [
              "none",
              "checked",
              "checked+seat"
            ]
          },
          "arrivesSameDay": {
            "type": "boolean"
          },
          "hasCheckedBag": {
            "type": "boolean"
          }
        }
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "flightNumber": {
            "type": "string"
          },
          "fareCode": {
            "type": "string"
          },
          "passengers": {
            "type": "integer"
          },
          "total": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Valor em centavos.",
                "examples": [
                  24000
                ]
              },
              "currency": {
                "type": "string",
                "examples": [
                  "BRL"
                ]
              }
            }
          },
          "currency": {
            "type": "string"
          }
        }
      },
      "Mandate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "scope": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Valor em centavos.",
                "examples": [
                  24000
                ]
              },
              "currency": {
                "type": "string",
                "examples": [
                  "BRL"
                ]
              }
            }
          },
          "consumed": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Valor em centavos.",
                "examples": [
                  24000
                ]
              },
              "currency": {
                "type": "string",
                "examples": [
                  "BRL"
                ]
              }
            }
          },
          "remaining": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Valor em centavos.",
                "examples": [
                  24000
                ]
              },
              "currency": {
                "type": "string",
                "examples": [
                  "BRL"
                ]
              }
            }
          },
          "duration": {
            "type": "object"
          },
          "revocation": {
            "type": "object"
          }
        }
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "paid",
              "cancelled",
              "failed"
            ]
          },
          "flightNumber": {
            "type": "string"
          },
          "fareName": {
            "type": "string"
          },
          "grandTotal": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Valor em centavos.",
                "examples": [
                  24000
                ]
              },
              "currency": {
                "type": "string",
                "examples": [
                  "BRL"
                ]
              }
            }
          },
          "ticketCode": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Receipt": {
        "type": "object",
        "properties": {
          "receiptId": {
            "type": "string"
          },
          "ticketId": {
            "type": "string"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time"
          },
          "line": {
            "type": "object"
          },
          "total": {
            "type": "object",
            "required": [
              "amount",
              "currency"
            ],
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Valor em centavos.",
                "examples": [
                  24000
                ]
              },
              "currency": {
                "type": "string",
                "examples": [
                  "BRL"
                ]
              }
            }
          },
          "payment": {
            "type": "object"
          },
          "note": {
            "type": "string"
          }
        }
      }
    }
  }
}