---
updatedAt: 2026-05-04T21:43:38.000Z
agentTools:
  projectIndex: https://docs.toqua.ai/llms.txt
---

# Ingest weather data

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Toqua API",
    "contact": {
      "name": "Toqua",
      "url": "https://toqua.ai/",
      "email": "admin@toqua.ai"
    },
    "version": "0.26"
  },
  "servers": [
    {
      "url": "https://api.toqua.ai",
      "description": "Toqua API"
    }
  ],
  "paths": {
    "/ships/{imo_number}/data/weather": {
      "post": {
        "tags": [
          "Data"
        ],
        "summary": "Ingest weather data",
        "operationId": "ingest_weather_data",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "imo_number",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Imo Number"
            }
          },
          {
            "name": "x-toqua-channel",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Override ingestion channel (pull, email, push, manual, unknown).",
              "title": "X-Toqua-Channel"
            },
            "description": "Override ingestion channel (pull, email, push, manual, unknown)."
          },
          {
            "name": "x-toqua-source-system",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Override source system identifier.",
              "title": "X-Toqua-Source-System"
            },
            "description": "Override source system identifier."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WeatherData"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IngestResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "501": {
            "description": "Not Implemented"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IngestResponse": {
        "properties": {
          "upload_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Upload Id",
            "description": "Unique identifier assigned to this upload event. Use this to retrieve or track the upload via the uploads endpoints. ",
            "examples": [
              "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
            ]
          }
        },
        "type": "object",
        "title": "IngestResponse",
        "description": "Confirmation returned after a successful data ingestion request."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WeatherData": {
        "properties": {
          "datetime": {
            "items": {
              "type": "string",
              "format": "date-time"
            },
            "type": "array",
            "maxItems": 200000,
            "title": "Datetime",
            "description": "List of datetimes. Datetime must be in ISO8601 format, and must specify a timezone.",
            "examples": [
              "2022-08-02T09:21:24+00:00",
              "2022-08-02T09:26:24+00:00"
            ]
          },
          "lat": {
            "items": {
              "type": "number"
            },
            "type": "array",
            "maxItems": 200000,
            "title": "Latitude",
            "description": "List of latitudes in decimal degrees format (DDD.DDDDD°). Positive values are north of the equator.",
            "examples": [
              24.69452,
              24.60452
            ]
          },
          "lng": {
            "items": {
              "type": "number"
            },
            "type": "array",
            "maxItems": 200000,
            "title": "Longitude",
            "description": "List of longitudes in decimal degrees format (DDD.DDDDD°). Positive values are east of the prime meridian.",
            "examples": [
              128.10483,
              128.20483
            ]
          },
          "current_speed": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Speed",
            "description": "List of current speed values in meter/second (m/s).",
            "examples": [
              1.3,
              2
            ]
          },
          "current_direction": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Current Direction",
            "description": "List of directions from which the currents are coming, in degrees true (°T): north is at 0° and increases clockwise.",
            "examples": [
              222.3,
              50.6
            ]
          },
          "wind_speed": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Wind Speed",
            "description": "List of wind speed values in meter/seconds (m/s).",
            "examples": [
              2.3,
              3.6
            ]
          },
          "wind_direction": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Wind Direction",
            "description": "List of directions from which the wind is coming, in degrees true (°T): north is at 0° and increases clockwise.",
            "examples": [
              222.3,
              30.6
            ]
          },
          "wave_direction": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Wave Direction",
            "description": "List of directions from which the waves are coming, in degrees true (°T): north is at 0° and increases clockwise.",
            "examples": [
              10.1,
              30.2
            ]
          },
          "wave_height": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Significant Wave Height",
            "description": "List of significant wave heights in meter (m).",
            "examples": [
              2.3,
              3.6
            ]
          },
          "wave_period": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Wave Period",
            "description": "List of wave periods, in seconds (s).",
            "examples": [
              10.1,
              30.2
            ]
          },
          "sea_surface_salinity": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Sea Surface Salinity",
            "description": "List of sea surface salinities in Practical Salinity Units (PSU).",
            "examples": [
              35.5,
              33
            ]
          },
          "sea_surface_temperature": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Sea Surface Temperature",
            "description": "List of sea surface temperatures in degrees Celcius (°C).",
            "examples": [
              16.5,
              24.3
            ]
          },
          "sea_depth": {
            "anyOf": [
              {
                "items": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "array",
                "maxItems": 200000
              },
              {
                "type": "null"
              }
            ],
            "title": "Sea Depth",
            "description": "Sea Depth in meters (m).",
            "examples": [
              200.5,
              30.1
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "datetime",
          "lat",
          "lng"
        ],
        "title": "WeatherData"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "externalDocs": {
    "description": "API Documentation",
    "url": "https://docs.toqua.ai"
  }
}
```