{
  "openapi": "3.1.0",
  "info": {
    "title": "Fruit Pin API",
    "version": "1.0.0",
    "description": "Read public Fruit Pin pins and manage your own pins and photos from your own tools and AI agents. Same rules as the app: photos pass the same metadata removal, contributions the same checks, Privacy Mode and moderation. Fruit Pin shows places; it offers no identification help and no advice on consumption. Auth: Authorization: Bearer fp_live_… (Fruit Pin → Settings → API). Rate limits: 60 requests/minute per key, 120 per account; per 24 hours 20 new pins, 40 photos, 60 changes, 30 deletions. Guide: https://fruitpin.com/en/developers"
  },
  "servers": [
    {
      "url": "https://fruitpin.com/api/v1"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Account"
    },
    {
      "name": "Public"
    },
    {
      "name": "My pins"
    },
    {
      "name": "My photos"
    }
  ],
  "paths": {
    "/me": {
      "get": {
        "summary": "Account, key scopes and remaining daily limits",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Hide or show your profile name on all contributions",
        "description": "hide_author_by_default: false shows the name again on ALL earlier contributions and needs confirm: true.",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hide_author_by_default": {
                    "type": "boolean"
                  },
                  "confirm": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "hide_author_by_default"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, account cannot contribute, or photo rules not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed or confirmation required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/species": {
      "get": {
        "summary": "Species that can be chosen for a new pin",
        "tags": [
          "Public"
        ],
        "responses": {
          "200": {
            "description": "Species list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Species"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/spots": {
      "get": {
        "summary": "Search public pins (radius or bounding box), newest first",
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "name": "lat",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": -90,
              "maximum": 90
            }
          },
          {
            "name": "lng",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          {
            "name": "radius_m",
            "in": "query",
            "schema": {
              "type": "number",
              "maximum": 10000,
              "default": 1000
            }
          },
          {
            "name": "bbox",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "west,south,east,north — at most 0.5° per side. Use either lat/lng or bbox."
          },
          {
            "name": "species",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated species ids"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "obst",
                "nuesse",
                "beeren",
                "kraeuter",
                "gemuese"
              ]
            }
          },
          {
            "name": "published_after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "published_before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "season_month",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            }
          },
          {
            "name": "with_photo",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "next_cursor of the previous page"
          }
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Spot"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/spots/{id}": {
      "get": {
        "summary": "One public pin with photos",
        "tags": [
          "Public"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The pin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "spot": {
                      "$ref": "#/components/schemas/Spot"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also for content of other accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/spots/{id}/photos": {
      "post": {
        "summary": "Add a photo to an active pin",
        "tags": [
          "My photos"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Retry-safe POST: the first response is stored for 24 h and replayed for the same key and request."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewPhoto"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo": {
                    "type": "string",
                    "format": "binary",
                    "description": "JPEG, at most 8 MB"
                  },
                  "metadata": {
                    "type": "string",
                    "description": "JSON object with the other fields"
                  }
                },
                "required": [
                  "photo"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The photo"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, account cannot contribute, or photo rules not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also for content of other accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: possible duplicate, under moderation, last photo, other contributions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed or confirmation required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me/spots": {
      "get": {
        "summary": "Your pins in every state, newest first",
        "tags": [
          "My pins"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "next_cursor of the previous page"
          }
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Spot"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a pin with its photo",
        "description": "Needs the write scope, a confirmed username and the photo rules confirmed once in the app. A pin of the same species within 50 m answers 409 possible_duplicate unless allow_nearby is true. Species with a confusion note need species_note_confirmed.",
        "tags": [
          "My pins"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "description": "Retry-safe POST: the first response is stored for 24 h and replayed for the same key and request."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewSpot"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "photo": {
                    "type": "string",
                    "format": "binary"
                  },
                  "metadata": {
                    "type": "string",
                    "description": "JSON object with the NewSpot fields (without photo)"
                  }
                },
                "required": [
                  "photo",
                  "metadata"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new pin and notices",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "spot": {
                      "$ref": "#/components/schemas/Spot"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, account cannot contribute, or photo rules not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: possible duplicate, under moderation, last photo, other contributions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Body too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed or confirmation required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me/spots/{id}": {
      "get": {
        "summary": "One of your pins",
        "tags": [
          "My pins"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The pin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "spot": {
                      "$ref": "#/components/schemas/Spot"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also for content of other accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "Correct the position (at most 50 m from where it was created)",
        "tags": [
          "My pins"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lat": {
                    "type": "number"
                  },
                  "lng": {
                    "type": "number"
                  }
                },
                "required": [
                  "lat",
                  "lng"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The pin",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "spot": {
                      "$ref": "#/components/schemas/Spot"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, account cannot contribute, or photo rules not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also for content of other accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed or confirmation required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete your pin with its photos",
        "tags": [
          "My pins"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, account cannot contribute, or photo rules not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also for content of other accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: possible duplicate, under moderation, last photo, other contributions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me/photos": {
      "get": {
        "summary": "Photos you added, newest first",
        "tags": [
          "My photos"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "next_cursor of the previous page"
          }
        ],
        "responses": {
          "200": {
            "description": "A page",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Photo"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/me/photos/{id}": {
      "delete": {
        "summary": "Delete a photo you added",
        "tags": [
          "My photos"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted"
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Missing scope, account cannot contribute, or photo rules not confirmed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Not found (also for content of other accounts)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflict: possible duplicate, under moderation, last photo, other contributions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit or daily limit reached (see Retry-After)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "fp_live_ + 32 characters"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Species": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name_de": {
            "type": "string"
          },
          "name_en": {
            "type": "string"
          },
          "name_lat": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "plant_type": {
            "type": "string"
          },
          "season_months": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "confusion_note_de": {
            "type": [
              "string",
              "null"
            ]
          },
          "confusion_note_en": {
            "type": [
              "string",
              "null"
            ]
          },
          "preparation_note_de": {
            "type": [
              "string",
              "null"
            ]
          },
          "preparation_note_en": {
            "type": [
              "string",
              "null"
            ]
          },
          "requires_species_confirmation": {
            "type": "boolean"
          }
        }
      },
      "Photo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "spot_id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "photo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only for your own photos."
          },
          "caption": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_public": {
            "type": "boolean"
          }
        }
      },
      "Spot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "species": {
            "$ref": "#/components/schemas/Species"
          },
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          },
          "access_type": {
            "type": "string",
            "enum": [
              "oeffentlich",
              "freigegeben",
              "unklar"
            ]
          },
          "access_note": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "author_hidden": {
            "type": "boolean"
          },
          "author": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "username": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "published_at": {
            "type": "string",
            "format": "date-time"
          },
          "is_public": {
            "type": "boolean"
          },
          "cover_photo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Own pins only, and only if the cover photo is your own."
          },
          "media_count": {
            "type": "integer"
          },
          "distance_m": {
            "type": [
              "number",
              "null"
            ]
          },
          "web_url": {
            "type": "string"
          },
          "media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Photo"
            },
            "description": "Own pins only. Photos of other users appear without photo_url and caption."
          },
          "own_media": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Photo"
            },
            "description": "Pins of other users: only your own photos at this pin. Pins of other users contain no photo addresses — use web_url."
          }
        }
      },
      "NewSpot": {
        "type": "object",
        "required": [
          "species_id",
          "lat",
          "lng",
          "access_type",
          "no_persons_confirmed",
          "photo"
        ],
        "additionalProperties": false,
        "properties": {
          "species_id": {
            "type": "string"
          },
          "lat": {
            "type": "number"
          },
          "lng": {
            "type": "number"
          },
          "access_type": {
            "type": "string",
            "enum": [
              "oeffentlich",
              "freigegeben",
              "unklar"
            ]
          },
          "access_note": {
            "type": "string",
            "maxLength": 400
          },
          "caption": {
            "type": "string",
            "maxLength": 200
          },
          "lang": {
            "type": "string",
            "enum": [
              "de",
              "en",
              "tr"
            ]
          },
          "no_persons_confirmed": {
            "type": "boolean",
            "const": true,
            "description": "No identifiable people, licence plates, house numbers or doorbell labels in the photo."
          },
          "species_note_confirmed": {
            "type": "boolean"
          },
          "allow_nearby": {
            "type": "boolean"
          },
          "photo": {
            "type": "object",
            "properties": {
              "content_base64": {
                "type": "string"
              }
            },
            "required": [
              "content_base64"
            ]
          }
        }
      },
      "NewPhoto": {
        "type": "object",
        "required": [
          "no_persons_confirmed",
          "photo"
        ],
        "additionalProperties": false,
        "properties": {
          "caption": {
            "type": "string",
            "maxLength": 200
          },
          "lang": {
            "type": "string",
            "enum": [
              "de",
              "en",
              "tr"
            ]
          },
          "no_persons_confirmed": {
            "type": "boolean",
            "const": true
          },
          "photo": {
            "type": "object",
            "properties": {
              "content_base64": {
                "type": "string"
              }
            },
            "required": [
              "content_base64"
            ]
          }
        }
      }
    }
  }
}
