uebermaps API endpoints icon

uebermaps API endpoints

Enable people to store spots on public and private maps

COMMUNITYNO AUTH0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "host": "uebermaps.com",
  "basePath": "/api/v2",
  "info": {
    "contact": {
      "name": "uebermaps API Team"
    },
    "description": "Enable people to store spots on public and private maps",
    "termsOfService": "https://uebermaps.com/terms/",
    "title": "uebermaps API endpoints",
    "version": "2.0",
    "x-apisguru-categories": [
      "location"
    ],
    "x-logo": {
      "url": "https://api.apis.guru/v2/cache/logo/https_twitter.com_uebermaps_profile_image.jpeg"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://uebermaps.com/api/v2/apidocs",
        "version": "2.0"
      }
    ],
    "x-providerName": "uebermaps.com"
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/account": {
      "patch": {
        "description": "Update account. Wrap map parameters in [user].",
        "parameters": [
          {
            "description": "user attributes",
            "in": "body",
            "name": "user",
            "required": false,
            "schema": {
              "$ref": "#/definitions/UserEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains user data.",
            "schema": {
              "$ref": "#/definitions/User"
            }
          }
        },
        "summary": "Update account",
        "tags": [
          "Account"
        ]
      }
    },
    "/attachments/{id}": {
      "delete": {
        "description": "Delete attachment.",
        "parameters": [
          {
            "description": "Attachment id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted attachment.",
            "schema": {
              "$ref": "#/definitions/Attachment"
            }
          }
        },
        "summary": "Delete attachment",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/authentication": {
      "post": {
        "description": "Sign in user. Wrap authentication parameters in [user].",
        "parameters": [
          {
            "description": "user authentication attributes",
            "in": "body",
            "name": "user",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UserAuthentication"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains user data including authentication token for subsequent requests",
            "schema": {
              "$ref": "#/definitions/UserFullProfile"
            }
          }
        },
        "summary": "Sign in user",
        "tags": [
          "Authentication"
        ]
      }
    },
    "/collaborator_invitations": {
      "get": {
        "description": "List your collaborator invitations.",
        "responses": {
          "200": {
            "description": "Contains list of collaborator invitations.",
            "schema": {
              "items": {
                "$ref": "#/definitions/CollaboratorInvitation"
              },
              "type": "array"
            }
          }
        },
        "summary": "List your collaborator invitations",
        "tags": [
          "CollaboratorInvitations"
        ]
      },
      "post": {
        "description": "Invite user to collaborate on map.",
        "parameters": [
          {
            "description": "Supply map_id and either a comma separated list of user_ids or emails. Optionally you can provide a 'is_admin' parameter with 'true' or 'false' to give the invited users admin privileges.",
            "in": "body",
            "name": "body",
            "schema": {
              "$ref": "#/definitions/CollaboratorInvitationCreate"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains collaborator invitation data.",
            "schema": {
              "$ref": "#/definitions/CollaboratorInvitation"
            }
          }
        },
        "summary": "Invite user to collaborate on map",
        "tags": [
          "CollaboratorInvitations"
        ]
      }
    },
    "/collaborator_invitations/{id}": {
      "delete": {
        "description": "Delete collaborator invitation.",
        "parameters": [
          {
            "description": "Collaborator invitation id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted collaborator invitation.",
            "schema": {
              "$ref": "#/definitions/CollaboratorInvitation"
            }
          }
        },
        "summary": "Delete collaborator invitation",
        "tags": [
          "CollaboratorInvitations"
        ]
      },
      "get": {
        "description": "Show collaborator invitation",
        "parameters": [
          {
            "description": "Collaborator invitation id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains collaborator invitation data.",
            "schema": {
              "$ref": "#/definitions/CollaboratorInvitation"
            }
          }
        },
        "summary": "Show collaborator invitation",
        "tags": [
          "CollaboratorInvitations"
        ]
      },
      "patch": {
        "description": "Accept collaborator invitation.",
        "parameters": [
          {
            "description": "Collaborator invitation id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains collaborator invitation data.",
            "schema": {
              "$ref": "#/definitions/CollaboratorInvitation"
            }
          }
        },
        "summary": "Accept collaborator invitation.",
        "tags": [
          "CollaboratorInvitations"
        ]
      }
    },
    "/comments/{id}": {
      "delete": {
        "description": "Delete comment.",
        "parameters": [
          {
            "description": "Comment id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted comment.",
            "schema": {
              "$ref": "#/definitions/Comment"
            }
          }
        },
        "summary": "Delete comment",
        "tags": [
          "Comments"
        ]
      },
      "patch": {
        "description": "Update comment. Wrap comment parameters in [comment].",
        "parameters": [
          {
            "description": "Comment id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Comment attributes",
            "in": "body",
            "name": "comment",
            "required": false,
            "schema": {
              "$ref": "#/definitions/CommentEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains comment data",
            "schema": {
              "$ref": "#/definitions/Comment"
            }
          }
        },
        "summary": "Update comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/events": {
      "get": {
        "description": "List your own events.",
        "parameters": [
          {
            "description": "Begin of time range of event (ISO 8601 date format).",
            "in": "query",
            "name": "timeframe_start",
            "required": false,
            "type": "string"
          },
          {
            "description": "End of time range of event (ISO 8601 date format).",
            "in": "query",
            "name": "timeframe_end",
            "required": false,
            "type": "string"
          },
          {
            "description": "To refine your event index request to contain only events within                                                             a geographical box pass the followng bounds parameters.                                                             F. e. to get events within 'Hamburg, St. Pauli':                                                             bounds[sw_lat]=53.54831449741324                                                             bounds[sw_lon]=9.943227767944336                                                             bounds[ne_lat]=53.5571103674878                                                             bounds[ne_lon]=9.9776029586792",
            "in": "query",
            "name": "bounds",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of events.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Event"
              },
              "type": "array"
            }
          }
        },
        "summary": "List your own events",
        "tags": [
          "Events"
        ]
      }
    },
    "/events/{id}": {
      "delete": {
        "description": "Delete event.",
        "parameters": [
          {
            "description": "Event id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted event.",
            "schema": {
              "$ref": "#/definitions/Event"
            }
          }
        },
        "summary": "Delete event",
        "tags": [
          "Events"
        ]
      },
      "get": {
        "description": "Get basic information about an event",
        "parameters": [
          {
            "description": "Id of event",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains event data.",
            "schema": {
              "$ref": "#/definitions/Event"
            }
          }
        },
        "summary": "Get event",
        "tags": [
          "Events"
        ]
      },
      "patch": {
        "description": "Update event. Wrap event parameters in [event].",
        "parameters": [
          {
            "description": "Event id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Event attributes",
            "in": "body",
            "name": "event",
            "required": false,
            "schema": {
              "$ref": "#/definitions/EventEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains map data, map settings and your relation to this map",
            "schema": {
              "$ref": "#/definitions/Map"
            }
          }
        },
        "summary": "Update event",
        "tags": [
          "Events"
        ]
      }
    },
    "/maps": {
      "get": {
        "description": "List your own maps.",
        "responses": {
          "200": {
            "description": "Contains list of maps.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Map"
              },
              "type": "array"
            }
          }
        },
        "summary": "List your own maps",
        "tags": [
          "Maps"
        ]
      },
      "post": {
        "description": "Create map. Wrap map parameters in [map]. To add a map header picture pass a base64 encoded string to [map][picture].",
        "parameters": [
          {
            "description": "map attributes",
            "in": "body",
            "name": "map",
            "required": false,
            "schema": {
              "$ref": "#/definitions/MapEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains map data, map settings and your relation to this map",
            "schema": {
              "$ref": "#/definitions/Map"
            }
          }
        },
        "summary": "Create map",
        "tags": [
          "Maps"
        ]
      }
    },
    "/maps/search": {
      "get": {
        "description": "Search maps",
        "parameters": [
          {
            "description": "Query",
            "in": "query",
            "name": "q",
            "type": "string"
          },
          {
            "description": "Distance. Diameter of search radius in meter (default: 2000 meter)",
            "in": "query",
            "name": "d",
            "type": "integer"
          },
          {
            "description": "Latitude for search radius (default distance: 2000 meter)",
            "in": "query",
            "name": "lat",
            "type": "number"
          },
          {
            "description": "Longitude for search radius (default distance: 2000 meter)",
            "in": "query",
            "name": "lon",
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains map data.",
            "schema": {
              "$ref": "#/definitions/Map"
            }
          }
        },
        "summary": "Search maps",
        "tags": [
          "Search"
        ]
      }
    },
    "/maps/{id}": {
      "delete": {
        "description": "Delete map.",
        "parameters": [
          {
            "description": "map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted map.",
            "schema": {
              "$ref": "#/definitions/Map"
            }
          }
        },
        "summary": "Delete map",
        "tags": [
          "Maps"
        ]
      },
      "get": {
        "description": "Get basic information about a map",
        "parameters": [
          {
            "description": "Id of map",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains map data, map settings and your relation to this map",
            "schema": {
              "$ref": "#/definitions/MapWithRelation"
            }
          }
        },
        "summary": "Get map",
        "tags": [
          "Maps"
        ]
      },
      "patch": {
        "description": "Update map. Wrap map parameters in [map]. To update the map header picture pass a base64 encoded string to [map][picture].",
        "parameters": [
          {
            "description": "map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "map settings attributes",
            "in": "body",
            "name": "map",
            "required": false,
            "schema": {
              "$ref": "#/definitions/MapEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains map data, map settings and your relation to this map",
            "schema": {
              "$ref": "#/definitions/Map"
            }
          }
        },
        "summary": "Update map",
        "tags": [
          "Maps"
        ]
      }
    },
    "/maps/{id}/attachments": {
      "get": {
        "description": "List attachments for a given map.",
        "parameters": [
          {
            "description": "Map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of attachments.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Attachment"
              },
              "type": "array"
            }
          }
        },
        "summary": "List attachments for a given map",
        "tags": [
          "Attachments"
        ]
      },
      "post": {
        "description": "Upload map attachment. Wrap attachment parameters in [attachment]",
        "parameters": [
          {
            "description": "Map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Base64 encoded image",
            "in": "body",
            "name": "image",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains attachment data",
            "schema": {
              "$ref": "#/definitions/Attachment"
            }
          }
        },
        "summary": "Upload map attachment",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/maps/{id}/collaborators/": {
      "get": {
        "description": "List collaborators of a map.",
        "parameters": [
          {
            "description": "Map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of collaborators.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Collaborator"
              },
              "type": "array"
            }
          }
        },
        "summary": "List collaborators of a map",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/maps/{id}/collaborators/{user_id}": {
      "delete": {
        "description": "Delete collaboration.",
        "parameters": [
          {
            "description": "map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "user id",
            "in": "path",
            "name": "user_id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted collaborator.",
            "schema": {
              "$ref": "#/definitions/Collaborator"
            }
          }
        },
        "summary": "Delete collaboration",
        "tags": [
          "Collaborators"
        ]
      },
      "patch": {
        "description": "Update collaborator. Wrap collaborator parameters in [collaborator]",
        "parameters": [
          {
            "description": "map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "user id",
            "in": "path",
            "name": "user_id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "collaborator attributes",
            "in": "body",
            "name": "collaborator",
            "required": false,
            "schema": {
              "$ref": "#/definitions/CollaboratorEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains collaborator data",
            "schema": {
              "$ref": "#/definitions/Collaborator"
            }
          }
        },
        "summary": "Update collaborator",
        "tags": [
          "Collaborators"
        ]
      }
    },
    "/maps/{id}/comments": {
      "get": {
        "description": "List comments for a given map.",
        "parameters": [
          {
            "description": "Id of map",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of comments.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Comment"
              },
              "type": "array"
            }
          }
        },
        "summary": "List comments for a given map",
        "tags": [
          "Comments"
        ]
      },
      "post": {
        "description": "Create map comment. Wrap comment parameters in [comment].",
        "parameters": [
          {
            "description": "map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "comment attributes",
            "in": "body",
            "name": "comment",
            "required": false,
            "schema": {
              "$ref": "#/definitions/CommentEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains comment data",
            "schema": {
              "$ref": "#/definitions/Comment"
            }
          }
        },
        "summary": "Create map comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/maps/{id}/respots": {
      "get": {
        "description": "List respots of a map.",
        "parameters": [
          {
            "description": "Map Id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of respots.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Respot"
              },
              "type": "array"
            }
          }
        },
        "summary": "List respots of a map",
        "tags": [
          "Respots"
        ]
      }
    },
    "/maps/{id}/spots": {
      "get": {
        "description": "List spots for a given map.",
        "parameters": [
          {
            "description": "Id of map",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Order of spots",
            "enum": [
              "created_at_asc",
              "created_at_desc",
              "updated_at_asc",
              "updated_at_desc",
              "title_asc",
              "title_desc"
            ],
            "in": "query",
            "name": "order",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of spots.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Spot"
              },
              "type": "array"
            }
          }
        },
        "summary": "List spots for a given map",
        "tags": [
          "Spots"
        ]
      },
      "post": {
        "description": "Create spot. Wrap parameters in [spot]. To add a spot picture pass a base64 encoded string to [spot][picture].",
        "parameters": [
          {
            "description": "Id of map",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "spot attributes",
            "in": "body",
            "name": "spot",
            "required": true,
            "schema": {
              "$ref": "#/definitions/SpotEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains spot data",
            "schema": {
              "$ref": "#/definitions/Spot"
            }
          }
        },
        "summary": "Create spot",
        "tags": [
          "Spots"
        ]
      }
    },
    "/maps/{id}/subscriptions": {
      "delete": {
        "description": "Unsubscribe from map.",
        "parameters": [
          {
            "description": "map id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted subscription.",
            "schema": {
              "$ref": "#/definitions/Subscription"
            }
          }
        },
        "summary": "Unsubscribe from map",
        "tags": [
          "Subscriptions"
        ]
      },
      "get": {
        "description": "List subscriptions for a given map.",
        "parameters": [
          {
            "description": "Id of map",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of subscriptions.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Subscription"
              },
              "type": "array"
            }
          }
        },
        "summary": "List subscriptions for a given map",
        "tags": [
          "Subscriptions"
        ]
      }
    },
    "/maps/{map_id}/spots/{id}": {
      "get": {
        "description": "Get basic information about a spot",
        "parameters": [
          {
            "description": "Id of spot",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Id of map",
            "in": "path",
            "name": "map_id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains spot data",
            "schema": {
              "$ref": "#/definitions/Spot"
            }
          }
        },
        "summary": "Get spot",
        "tags": [
          "Spots"
        ]
      }
    },
    "/maps/{map_id}/spots/{spot_id}/respot": {
      "delete": {
        "description": "Delete respot from map by spot id.",
        "parameters": [
          {
            "description": "Map Id",
            "in": "path",
            "name": "map_id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Spot Id",
            "in": "path",
            "name": "spot_id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted respot.",
            "schema": {
              "$ref": "#/definitions/Respot"
            }
          }
        },
        "summary": "Delete respot from map by spot id",
        "tags": [
          "Respots"
        ]
      }
    },
    "/respot_maps": {
      "get": {
        "description": "List maps that user can respot to.",
        "responses": {
          "200": {
            "description": "Contains list of maps.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Map"
              },
              "type": "array"
            }
          }
        },
        "summary": "List maps that user can respot to",
        "tags": [
          "Respots"
        ]
      }
    },
    "/respots/{id}": {
      "delete": {
        "description": "Delete respot.",
        "parameters": [
          {
            "description": "Respot Id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted respot.",
            "schema": {
              "$ref": "#/definitions/Respot"
            }
          }
        },
        "summary": "Delete respot",
        "tags": [
          "Respots"
        ]
      },
      "get": {
        "description": "Get basic information about a respot",
        "parameters": [
          {
            "description": "Id of respot",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains respot data.",
            "schema": {
              "$ref": "#/definitions/Respot"
            }
          }
        },
        "summary": "Get respot",
        "tags": [
          "Respots"
        ]
      }
    },
    "/share/map/{id}": {
      "get": {
        "description": "Get secret access token of an uebermap with access set to 'Secret link'. Pass the 'token' on every request you make to access this uebermap and its resources. F.e. token=1-x_gqu7eLBe3uKoAGAGXy",
        "parameters": [
          {
            "description": "Id of map",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains map data and a secret token to access this map.",
            "schema": {
              "$ref": "#/definitions/MapWithAuthToken"
            }
          }
        },
        "summary": "Get secret access token to share map",
        "tags": [
          "Share"
        ]
      }
    },
    "/spots": {
      "get": {
        "description": "List your own spots.",
        "parameters": [
          {
            "description": "Order of spots",
            "enum": [
              "created_at_asc",
              "created_at_desc",
              "updated_at_asc",
              "updated_at_desc",
              "title_asc",
              "title_desc"
            ],
            "in": "query",
            "name": "order",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of spots.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Spot"
              },
              "type": "array"
            }
          }
        },
        "summary": "List your own spots",
        "tags": [
          "Spots"
        ]
      }
    },
    "/spots/search": {
      "get": {
        "description": "Search spots",
        "parameters": [
          {
            "description": "Query",
            "in": "query",
            "name": "q",
            "type": "string"
          },
          {
            "description": "Distance. Diameter of search radius in meter (default: 2000 meter)",
            "in": "query",
            "name": "d",
            "type": "integer"
          },
          {
            "description": "Latitude for search radius (2 km)",
            "in": "query",
            "name": "lat",
            "type": "number"
          },
          {
            "description": "Longitude for search radius (2 km)",
            "in": "query",
            "name": "lon",
            "type": "number"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains spot data.",
            "schema": {
              "$ref": "#/definitions/Spot"
            }
          }
        },
        "summary": "Search spots",
        "tags": [
          "Search"
        ]
      }
    },
    "/spots/{id}": {
      "delete": {
        "description": "Delete spot.",
        "parameters": [
          {
            "description": "spot id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains deleted spot.",
            "schema": {
              "$ref": "#/definitions/Spot"
            }
          }
        },
        "summary": "Delete spot",
        "tags": [
          "Spots"
        ]
      },
      "patch": {
        "description": "Update spot. Wrap parameters in [spot]. To update the spot picture pass a base64 encoded string to [spot][picture].",
        "parameters": [
          {
            "description": "spot id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "spot attributes",
            "in": "body",
            "name": "spot",
            "required": false,
            "schema": {
              "$ref": "#/definitions/SpotEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains spot data",
            "schema": {
              "$ref": "#/definitions/Spot"
            }
          }
        },
        "summary": "Update spot",
        "tags": [
          "Spots"
        ]
      }
    },
    "/spots/{id}/attachments": {
      "get": {
        "description": "List attachments for a given spot.",
        "parameters": [
          {
            "description": "Spot id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of attachments.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Attachment"
              },
              "type": "array"
            }
          }
        },
        "summary": "List attachments for a given spot",
        "tags": [
          "Attachments"
        ]
      },
      "post": {
        "description": "Upload spot attachment. Wrap attachment parameters in [attachment]",
        "parameters": [
          {
            "description": "Spot id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Base64 encoded image",
            "in": "body",
            "name": "image",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains attachment data",
            "schema": {
              "$ref": "#/definitions/Attachment"
            }
          }
        },
        "summary": "Upload spot attachment",
        "tags": [
          "Attachments"
        ]
      }
    },
    "/spots/{id}/comments": {
      "get": {
        "description": "List comments for a given spot.",
        "parameters": [
          {
            "description": "Id of spot",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of comments.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Comment"
              },
              "type": "array"
            }
          }
        },
        "summary": "List comments for a given spot",
        "tags": [
          "Comments"
        ]
      },
      "post": {
        "description": "Create spot comment. Wrap comment parameters in [comment].",
        "parameters": [
          {
            "description": "spot id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "comment attributes",
            "in": "body",
            "name": "comment",
            "required": false,
            "schema": {
              "$ref": "#/definitions/CommentEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains comment data",
            "schema": {
              "$ref": "#/definitions/Comment"
            }
          }
        },
        "summary": "Create spot comment",
        "tags": [
          "Comments"
        ]
      }
    },
    "/spots/{id}/events": {
      "get": {
        "description": "List maps for a given spot.",
        "parameters": [
          {
            "description": "Id of spot",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Begin of time range of event (ISO 8601 date format).",
            "in": "query",
            "name": "timeframe_start",
            "required": false,
            "type": "string"
          },
          {
            "description": "End of time range of event (ISO 8601 date format).",
            "in": "query",
            "name": "timeframe_end",
            "required": false,
            "type": "string"
          },
          {
            "description": "To refine your event index request to contain only events within                                                             a geographical box pass the followng bounds parameters.                                                             F. e. to get events within 'Hamburg, St. Pauli':                                                             bounds[sw_lat]=53.54831449741324                                                             bounds[sw_lon]=9.943227767944336                                                             bounds[ne_lat]=53.5571103674878                                                             bounds[ne_lon]=9.9776029586792",
            "in": "query",
            "name": "bounds",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of events.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Event"
              },
              "type": "array"
            }
          }
        },
        "summary": "List events for a given spot",
        "tags": [
          "Events"
        ]
      },
      "post": {
        "description": "Create event. Wrap map parameters in [event].",
        "parameters": [
          {
            "description": "Spot id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Event attributes",
            "in": "body",
            "name": "event",
            "required": false,
            "schema": {
              "$ref": "#/definitions/EventEditable"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains event data",
            "schema": {
              "$ref": "#/definitions/Event"
            }
          }
        },
        "summary": "Create event",
        "tags": [
          "Events"
        ]
      }
    },
    "/spots/{id}/respots": {
      "post": {
        "description": "Respot a spot onto a map.",
        "parameters": [
          {
            "description": "Spot Id",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          },
          {
            "description": "Map Id",
            "in": "body",
            "name": "map_id",
            "required": true,
            "schema": {
              "format": "integer",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains respot data.",
            "schema": {
              "$ref": "#/definitions/Respot"
            }
          }
        },
        "summary": "Respot a spot onto a map",
        "tags": [
          "Respots"
        ]
      }
    },
    "/subscriptions": {
      "get": {
        "description": "List subscriptions.",
        "parameters": [
          {
            "description": "Id of user",
            "in": "query",
            "name": "user_id",
            "type": "integer"
          },
          {
            "description": "Id of map",
            "in": "query",
            "name": "map_id",
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of subscriptions.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Subscription"
              },
              "type": "array"
            }
          }
        },
        "summary": "List subscriptions. Pass no parameters to get own subscriptions",
        "tags": [
          "Subscriptions"
        ]
      },
      "post": {
        "description": "Create map subscription.",
        "parameters": [
          {
            "description": "map id",
            "in": "body",
            "name": "map_id",
            "required": true,
            "schema": {
              "format": "integer",
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Contains subscription data.",
            "schema": {
              "$ref": "#/definitions/Subscription"
            }
          }
        },
        "summary": "Create map subscription",
        "tags": [
          "Subscriptions"
        ]
      }
    },
    "/trends/latest": {
      "get": {
        "description": "List latest maps.",
        "responses": {
          "200": {
            "description": "Contains list of maps.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Map"
              },
              "type": "array"
            }
          }
        },
        "summary": "List latest maps",
        "tags": [
          "Trends"
        ]
      }
    },
    "/trends/recommended": {
      "get": {
        "description": "List recommended maps.",
        "responses": {
          "200": {
            "description": "Contains list of maps.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Map"
              },
              "type": "array"
            }
          }
        },
        "summary": "List recommended maps",
        "tags": [
          "Trends"
        ]
      }
    },
    "/users/search": {
      "get": {
        "description": "Search users",
        "parameters": [
          {
            "description": "Query",
            "in": "query",
            "name": "q",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains users data.",
            "schema": {
              "$ref": "#/definitions/User"
            }
          }
        },
        "summary": "Search users",
        "tags": [
          "Search"
        ]
      }
    },
    "/users/{id}": {
      "get": {
        "description": "Get profile a user",
        "parameters": [
          {
            "description": "Id of user",
            "in": "path",
            "name": "id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains user data",
            "schema": {
              "$ref": "#/definitions/User"
            }
          }
        },
        "summary": "Get user profile",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/{user_id}/maps": {
      "get": {
        "description": "List maps for a given user.",
        "parameters": [
          {
            "description": "Id of user",
            "in": "path",
            "name": "user_id",
            "required": true,
            "type": "integer"
          }
        ],
        "responses": {
          "200": {
            "description": "Contains list of maps.",
            "schema": {
              "items": {
                "$ref": "#/definitions/Map"
              },
              "type": "array"
            }
          }
        },
        "summary": "List maps for a given user",
        "tags": [
          "Maps"
        ]
      }
    }
  },
  "definitions": {
    "Attachment": {
      "properties": {
        "attachable_id": {
          "example": 7543829,
          "type": "integer"
        },
        "attachable_type": {
          "example": "Spot",
          "type": "string"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "example": "This photo was taken in front of the restaurant",
          "type": "string"
        },
        "file_url": {
          "example": "https://...",
          "type": "string"
        },
        "id": {
          "example": 34939432,
          "type": "integer"
        },
        "map_id": {
          "example": 985732,
          "type": "integer"
        },
        "sizes": {
          "example": {
            "large": {
              "h": 860,
              "w": 1024
            }
          },
          "type": "object"
        },
        "spot": {
          "$ref": "#/definitions/Spot"
        },
        "status": {
          "enum": [
            "approved",
            "unapproved"
          ],
          "example": "approved",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        }
      }
    },
    "Collaborator": {
      "properties": {
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "group": {
          "enum": [
            "admin",
            "editor"
          ],
          "example": "editor",
          "type": "string"
        },
        "id": {
          "example": 4829504,
          "type": "integer"
        },
        "is_admin": {
          "example": false,
          "type": "boolean"
        },
        "map": {
          "$ref": "#/definitions/Map"
        },
        "map_id": {
          "example": 324894,
          "type": "integer"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        },
        "user_id": {
          "example": 649302,
          "type": "integer"
        }
      }
    },
    "CollaboratorEditable": {
      "properties": {
        "group": {
          "enum": [
            "admin",
            "editor"
          ],
          "example": "editor",
          "type": "string"
        }
      }
    },
    "CollaboratorInvitation": {
      "properties": {
        "accepted": {
          "example": true,
          "type": "boolean"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "email": {
          "example": "a@b.com",
          "type": "string"
        },
        "group": {
          "enum": [
            "admin",
            "editor"
          ],
          "example": "editor",
          "type": "string"
        },
        "id": {
          "example": 8696493,
          "type": "integer"
        },
        "invited_by_user": {
          "$ref": "#/definitions/User"
        },
        "map": {
          "$ref": "#/definitions/Map"
        },
        "sent": {
          "example": true,
          "type": "boolean"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        }
      }
    },
    "CollaboratorInvitationCreate": {
      "properties": {
        "emails": {
          "example": "a@b.com, c@d.com, e@f.com",
          "type": "string"
        },
        "is_admin": {
          "example": true,
          "type": "boolean"
        },
        "map_id": {
          "example": 34925783,
          "type": "integer"
        },
        "user_ids": {
          "example": "5839459, 389423, 89494, 686950",
          "type": "string"
        }
      }
    },
    "Comment": {
      "properties": {
        "body": {
          "example": "Nice photo",
          "type": "string"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "example": 29628358,
          "type": "integer"
        },
        "status": {
          "enum": [
            "approved",
            "unapproved"
          ],
          "example": "approved",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        }
      }
    },
    "CommentEditable": {
      "properties": {
        "body": {
          "example": "Nice photo",
          "type": "string"
        }
      }
    },
    "Event": {
      "properties": {
        "counts": {
          "$ref": "#/definitions/EventCounts"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "example": "Very special event",
          "type": "string"
        },
        "ends_at": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "example": 482959,
          "type": "integer"
        },
        "lat": {
          "example": 53.293493,
          "type": "number"
        },
        "lon": {
          "example": 12.394328,
          "type": "number"
        },
        "owner_id": {
          "example": 82389429,
          "type": "integer"
        },
        "picture_url": {
          "example": "https://...",
          "type": "string"
        },
        "spot": {
          "$ref": "#/definitions/Spot"
        },
        "starts_at": {
          "format": "date-time",
          "type": "string"
        },
        "time_zone": {
          "example": "Berlin",
          "type": "string"
        },
        "title": {
          "example": "20th anniversary event",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        }
      }
    },
    "EventCounts": {
      "properties": {
        "attachments": {
          "example": 27,
          "type": "integer"
        },
        "comments": {
          "example": 284,
          "type": "integer"
        }
      }
    },
    "EventEditable": {
      "properties": {
        "description": {
          "example": "Very special event",
          "type": "string"
        },
        "ends_at": {
          "format": "date-time",
          "type": "string"
        },
        "lat": {
          "example": 53.293493,
          "type": "number"
        },
        "lon": {
          "example": 12.394328,
          "type": "number"
        },
        "picture": {
          "example": "<BASE_64_ENCODED_STRING>",
          "type": "string"
        },
        "starts_at": {
          "format": "date-time",
          "type": "string"
        },
        "time_zone": {
          "example": "Berlin",
          "type": "string"
        },
        "title": {
          "example": "20th anniversary event",
          "type": "string"
        },
        "user_id": {
          "example": 703943,
          "type": "integer"
        }
      }
    },
    "Map": {
      "properties": {
        "counts": {
          "$ref": "#/definitions/MapCounts"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "example": "A collection of restaurants, cafes, clubs and random spots that I recommend in Berlin",
          "type": "string"
        },
        "id": {
          "example": 18234843,
          "type": "integer"
        },
        "map_settings": {
          "$ref": "#/definitions/MapSettings"
        },
        "owner_id": {
          "example": 9829358,
          "type": "integer"
        },
        "picture_url": {
          "example": "https://...",
          "type": "string"
        },
        "title": {
          "example": "My favourite places in Berlin",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "visibility": {
          "enum": [
            "public",
            "link",
            "private"
          ],
          "example": "public",
          "type": "string"
        }
      }
    },
    "MapCounts": {
      "properties": {
        "attachments": {
          "example": 31,
          "type": "integer"
        },
        "comments": {
          "example": 234,
          "type": "integer"
        },
        "impressions": {
          "example": 234332,
          "type": "integer"
        },
        "respots": {
          "example": 24,
          "type": "integer"
        },
        "spots": {
          "example": 67,
          "type": "integer"
        },
        "subscriptions": {
          "example": 3892,
          "type": "integer"
        }
      }
    },
    "MapEditable": {
      "properties": {
        "description": {
          "example": "A collection of restaurants, cafes, clubs and random spots that I recommend in Berlin",
          "type": "string"
        },
        "map_settings": {
          "$ref": "#/definitions/MapSettings"
        },
        "picture": {
          "example": "<BASE_64_ENCODED_STRING>",
          "type": "string"
        },
        "title": {
          "example": "My favourite places in Berlin",
          "type": "string"
        },
        "visibility": {
          "enum": [
            "public",
            "link",
            "private"
          ],
          "example": "public",
          "type": "string"
        }
      }
    },
    "MapRelation": {
      "properties": {
        "access": {
          "example": [
            "can_administer.map",
            "can_administer.spots",
            "can_administer.events",
            "can_administer.comments",
            "can_administer.attachments",
            "can_administer.collaborators"
          ],
          "type": "string"
        },
        "access_group": {
          "enum": [
            "visitor",
            "editor",
            "admin"
          ],
          "example": "owner",
          "type": "string"
        },
        "subscribed": {
          "example": true,
          "type": "boolean"
        }
      }
    },
    "MapSettings": {
      "properties": {
        "editor_access": {
          "example": [
            "can_administer.map",
            "can_administer.spots",
            "can_administer.events",
            "can_administer.comments",
            "can_administer.attachments",
            "can_administer.collaborators"
          ],
          "type": "string"
        },
        "respotting_to_this_map": {
          "example": true,
          "type": "boolean"
        },
        "visitor_access": {
          "example": [
            "can_administer.map",
            "can_administer.spots",
            "can_administer.events",
            "can_administer.comments",
            "can_administer.attachments",
            "can_administer.collaborators"
          ],
          "type": "string"
        }
      }
    },
    "MapWithAuthToken": {
      "properties": {
        "counts": {
          "$ref": "#/definitions/MapCounts"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "example": "A collection of restaurants, cafes, clubs and random spots that I recommend in Berlin",
          "type": "string"
        },
        "id": {
          "example": 18234843,
          "type": "integer"
        },
        "owner_id": {
          "example": 9829358,
          "type": "integer"
        },
        "picture_url": {
          "example": "https://...",
          "type": "string"
        },
        "title": {
          "example": "My favourite places in Berlin",
          "type": "string"
        },
        "token": {
          "example": "1-x_gqu7eLBe3uKoAGAGXy",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "visibility": {
          "enum": [
            "public",
            "link",
            "private"
          ],
          "example": "public",
          "type": "string"
        }
      }
    },
    "MapWithRelation": {
      "properties": {
        "counts": {
          "$ref": "#/definitions/MapCounts"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "example": "A collection of restaurants, cafes, clubs and random spots that I recommend in Berlin",
          "type": "string"
        },
        "id": {
          "example": 18234843,
          "type": "integer"
        },
        "map_settings": {
          "$ref": "#/definitions/MapSettings"
        },
        "owner_id": {
          "example": 9829358,
          "type": "integer"
        },
        "picture_url": {
          "example": "https://...",
          "type": "string"
        },
        "relation": {
          "$ref": "#/definitions/MapRelation"
        },
        "title": {
          "example": "My favourite places in Berlin",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "visibility": {
          "enum": [
            "public",
            "link",
            "private"
          ],
          "example": "public",
          "type": "string"
        }
      }
    },
    "Respot": {
      "properties": {
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "example": 589032,
          "type": "integer"
        },
        "map": {
          "$ref": "#/definitions/Map"
        },
        "map_id": {
          "example": 8393450,
          "type": "integer"
        },
        "spot": {
          "$ref": "#/definitions/Spot"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        }
      }
    },
    "Spot": {
      "properties": {
        "counts": {
          "$ref": "#/definitions/SpotCounts"
        },
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "description": {
          "example": "Landed here by accident but look how wonderful this place is in the photos attached",
          "type": "string"
        },
        "id": {
          "example": 5932234,
          "type": "integer"
        },
        "lat": {
          "example": 53.112385,
          "type": "number"
        },
        "lon": {
          "example": 10.58349,
          "type": "number"
        },
        "map_id": {
          "example": 394805,
          "type": "integer"
        },
        "picture_url": {
          "example": "https://...",
          "type": "string"
        },
        "status": {
          "enum": [
            "approved",
            "unapproved"
          ],
          "example": "approved",
          "type": "string"
        },
        "time_zone": {
          "example": "Berlin",
          "type": "string"
        },
        "title": {
          "example": "Beautiful place out in the country",
          "type": "string"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        }
      }
    },
    "SpotCounts": {
      "properties": {
        "attachments": {
          "example": 4,
          "type": "integer"
        },
        "comments": {
          "example": 24,
          "type": "integer"
        },
        "respot": {
          "example": 34,
          "type": "integer"
        }
      }
    },
    "SpotEditable": {
      "properties": {
        "description": {
          "example": "Landed here by accident but look how wonderful this place is in the photos attached",
          "type": "string"
        },
        "lat": {
          "example": 53.112385,
          "type": "number"
        },
        "lon": {
          "example": 10.58349,
          "type": "number"
        },
        "picture": {
          "example": "<BASE_64_ENCODED_STRING>",
          "type": "string"
        },
        "time_zone": {
          "example": "Berlin",
          "type": "string"
        },
        "title": {
          "example": "Beautiful place out in the country",
          "type": "string"
        }
      }
    },
    "Subscription": {
      "properties": {
        "created_at": {
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "example": 23950552,
          "type": "integer"
        },
        "map": {
          "$ref": "#/definitions/Map"
        },
        "updated_at": {
          "format": "date-time",
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/User"
        },
        "user_id": {
          "example": 852002,
          "type": "integer"
        }
      }
    },
    "User": {
      "properties": {
        "about": {
          "example": "The comedian",
          "type": "string"
        },
        "counts": {
          "properties": {
            "maps": {
              "example": 24,
              "type": "integer"
            }
          }
        },
        "header_picture": {
          "example": "https://...",
          "type": "string"
        },
        "id": {
          "example": 5829035,
          "type": "integer"
        },
        "location": {
          "example": "Little Rock, Arkansas",
          "type": "string"
        },
        "name": {
          "example": "Bill Hicks",
          "type": "string"
        },
        "picture_url": {
          "example": "https://...",
          "type": "string"
        },
        "screen_name": {
          "example": "billhicks",
          "type": "string"
        },
        "url": {
          "example": "http://www.billhicks.com",
          "type": "string"
        }
      }
    },
    "UserAuthentication": {
      "properties": {
        "email": {
          "example": "a@b.com",
          "type": "string"
        },
        "password": {
          "example": "••••••••",
          "type": "string"
        }
      }
    },
    "UserEditable": {
      "properties": {
        "about": {
          "example": "The comedian",
          "type": "string"
        },
        "header": {
          "example": "<BASE_64_ENCODED_STRING>",
          "type": "string"
        },
        "language": {
          "example": "en",
          "type": "string"
        },
        "location": {
          "example": "Little Rock, Arkansas",
          "type": "string"
        },
        "name": {
          "example": "Bill Hicks",
          "type": "string"
        },
        "picture": {
          "example": "<BASE_64_ENCODED_STRING>",
          "type": "string"
        },
        "screen_name": {
          "example": "billhicks",
          "type": "string"
        },
        "time_zone": {
          "example": "Pacific Time (US & Canada)",
          "type": "string"
        },
        "url": {
          "example": "http://www.billhicks.com",
          "type": "string"
        }
      }
    },
    "UserFullProfile": {
      "allOf": [
        {
          "$ref": "#/definitions/User"
        }
      ],
      "properties": {
        "auth_token": {
          "example": "6g8as82h3kj23h2",
          "type": "string"
        },
        "language": {
          "example": "en",
          "type": "string"
        },
        "time_zone": {
          "example": "Pacific Time (US & Canada)",
          "type": "string"
        }
      }
    }
  }
}