{
  "openapi": "3.0.0",
  "info": {
    "title": "kango-backend-bot",
    "version": "0.0.1",
    "description": "backend for Kango bots",
    "contact": {
      "name": "eucastillo",
      "email": "64089757+eucastillo@users.noreply.github.com&gt;"
    }
  },
  "paths": {
    "/carrier-availability/{idCarriage}": {
      "get": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "getCarriageDetail",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Array of InfoCarriage model instances",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "idCarriage",
            "in": "path",
            "schema": {
              "type": "number"
            },
            "required": true
          }
        ],
        "operationId": "ChatbotController.getCarriageDetail"
      }
    },
    "/carrier-availability": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "acceptDestiny",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Cuando se le pregunte al transportista lo siguiente poder guardar su respuesta sobre el viaje ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Cuando se le pregunte al transportista lo siguiente poder guardar su respuesta sobre el viaje",
                "properties": {
                  "IdCarriage": {
                    "type": "number"
                  },
                  "HasReturn": {
                    "type": "boolean"
                  },
                  "AcceptMultipleLocation": {
                    "type": "boolean"
                  },
                  "Zone": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "Answered": {
                    "type": "boolean"
                  },
                  "Schedule": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "description": "Cuando se le pregunte al transportista lo siguiente poder guardar su respuesta sobre el viaje ",
          "required": true
        },
        "operationId": "ChatbotController.acceptDestiny"
      }
    },
    "/carrier-response": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "carrierResponse",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Esta se utilizara para obtener la respuesta del transportista\n    sobre algún viaje ofrecido. ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Esta se utilizara para obtener la respuesta del transportista\n  sobre algún viaje ofrecido.",
                "properties": {
                  "IdRequest": {
                    "type": "number"
                  },
                  "Rejected": {
                    "type": "boolean"
                  },
                  "RejectionReason": {
                    "type": "number"
                  },
                  "Reason": {
                    "type": "string"
                  },
                  "Schedule": {
                    "type": "string"
                  },
                  "SpecialConditions": {
                    "type": "string"
                  },
                  "AnythingElse": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "description": "Esta se utilizara para obtener la respuesta del\n      transportista sobre algún viaje ofrecido.",
          "required": true
        },
        "operationId": "ChatbotController.carrierResponse"
      }
    },
    "/check-availabilty": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "find",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Trigger flow 1 chatbot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Fields to start flow 1 in chatbot",
                "properties": {
                  "IdCarriage": {
                    "type": "number"
                  },
                  "IdCarrierInfo": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "description": "Required input for login",
          "required": true
        },
        "operationId": "ChatbotController.find"
      }
    },
    "/check-status": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "checkStatus",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Score for flow bot conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Metodo para poder recibir el score que nos da el usuario.",
                  "properties": {
                    "Id": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Metodo para poder recibir el score que nos da el usuario.",
                "properties": {
                  "Id": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "description": "Score for flow bot conversation",
          "required": true
        },
        "operationId": "ChatbotController.checkStatus"
      }
    },
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": [
          "PingController"
        ],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping"
      }
    },
    "/request-carrier": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "requestCarrier",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Trigger flow 2 chatbot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Fields to start flow 2 in chatbot",
                "properties": {
                  "IdCarriage": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "description": "Enviarle al transportista toda la información que previamente DAL capturó en el detalle del formulario",
          "required": true
        },
        "operationId": "ChatbotController.requestCarrier"
      }
    },
    "/score-response": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "scoreResponse",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "Score for flow bot conversation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Metodo para poder recibir el score que nos da el usuario.",
                  "properties": {
                    "Id": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Metodo para poder recibir el score que nos da el usuario.",
                "properties": {
                  "Id": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "description": "Score for flow bot conversation",
          "required": true
        },
        "operationId": "ChatbotController.scoreResponse"
      }
    },
    "/send-status": {
      "post": {
        "x-controller-name": "ChatbotController",
        "x-operation-name": "sendStatus",
        "tags": [
          "ChatbotController"
        ],
        "responses": {
          "200": {
            "description": "DAL y transportista reciban correo de confirmación del viaje cuando ya es aceptado.  ",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "Message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "DAL y transportista reciban correo de confirmación del viaje cuando ya es aceptado. ",
                "properties": {
                  "EmailType": {
                    "type": "number"
                  },
                  "IdCarriage": {},
                  "IdRequest": {},
                  "IdUser": {}
                }
              }
            }
          },
          "description": "DAL y transportista reciban correo de confirmación del viaje cuando ya es aceptado.  ",
          "required": true
        },
        "operationId": "ChatbotController.sendStatus"
      }
    }
  },
  "servers": [
    {
      "url": "https://qa.apibot.kango.dlabs.com.mx"
    }
  ],
  "components": {
    "schemas": {
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "greeting": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "properties": {
              "Content-Type": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        }
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "jwt": []
    }
  ]
}