{
  "openapi": "3.1.0",
  "info": {
    "title": "Transpotaxi driver API",
    "version": "1.0.0",
    "summary": "Public read-only tools for people who want to drive with Yango through Transpotaxi.",
    "description": "Cities, requirements, sign-up links and an earnings calculator for Yango drivers in Peru, Bolivia and Colombia. No authentication. Facts updated 2026-11-14. The same tools are available over MCP at https://tasocs.com/agents/mcp.",
    "contact": {
      "name": "Transpotaxi",
      "url": "https://tasocs.com/wpp"
    }
  },
  "servers": [
    {
      "url": "https://tasocs.com"
    }
  ],
  "paths": {
    "/api/agents/v1/cities": {
      "get": {
        "operationId": "list_cities",
        "summary": "List Transpotaxi cities",
        "description": "List the cities where Transpotaxi (official Yango partner fleet) signs up drivers in Peru, Bolivia and Colombia, with each city's sign-up link.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/v1/cities/{city}": {
      "get": {
        "operationId": "get_city_info",
        "summary": "Driver info for a city",
        "description": "Requirements, commissions, new-driver welcome offer (0% Transpotaxi commission for 14 days), sign-up link, office and WhatsApp support for driving with Yango through Transpotaxi in one city.",
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "description": "City id or name: lima, lima-tuktuk, arequipa, trujillo, santa-cruz, cochabamba, la-paz, cali, barranquilla. Short codes like scz, lpz, cbba, aqp, tru, baq also work.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/v1/signup/{city}": {
      "get": {
        "operationId": "get_signup_link",
        "summary": "Driver sign-up link",
        "description": "Get the official Yango driver sign-up form link for a city (through Transpotaxi) and the next steps after signing up.",
        "parameters": [
          {
            "name": "city",
            "in": "path",
            "required": true,
            "description": "City id or name: lima, lima-tuktuk, arequipa, trujillo, santa-cruz, cochabamba, la-paz, cali, barranquilla. Short codes like scz, lpz, cbba, aqp, tru, baq also work.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agents/v1/earnings": {
      "get": {
        "operationId": "calculate_driver_earnings",
        "summary": "Driver earnings calculator",
        "description": "Estimate what a Yango driver keeps after Yango and Transpotaxi commissions in a city, including the new-driver offer (0% Transpotaxi commission for the first 14 days). Give gross_fares, or trips and average_fare, in local currency.",
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": true,
            "description": "City id or name: lima, lima-tuktuk, arequipa, trujillo, santa-cruz, cochabamba, la-paz, cali, barranquilla. Short codes like scz, lpz, cbba, aqp, tru, baq also work.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "vehicle",
            "in": "query",
            "required": false,
            "description": "auto (car or taxi), moto, tuktuk or mensajeria (courier). Defaults to the city's main vehicle.",
            "schema": {
              "type": "string",
              "enum": [
                "auto",
                "moto",
                "tuktuk",
                "mensajeria"
              ]
            }
          },
          {
            "name": "gross_fares",
            "in": "query",
            "required": false,
            "description": "Total fares earned in the period, in local currency (PEN, BOB or COP).",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "trips",
            "in": "query",
            "required": false,
            "description": "Number of trips in the period (used with average_fare when gross_fares is not given).",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "average_fare",
            "in": "query",
            "required": false,
            "description": "Average fare per trip in local currency.",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "days_with_transpotaxi",
            "in": "query",
            "required": false,
            "description": "Days since the driver signed up with Transpotaxi. 0-13 means the welcome offer applies. Default 0.",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          },
          {
            "name": "costs",
            "in": "query",
            "required": false,
            "description": "Optional fuel, maintenance and other costs for the period, to get the net after costs.",
            "schema": {
              "type": "number",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Service liveness",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}