> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.nocodemapapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Map Location

> Create a location in a specific map



## OpenAPI

````yaml POST /v0/map/{mapId}/location
openapi: 3.0.1
info:
  title: OpenAPI NCMA API
  description: A sample API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://realtime.nocodemapapp.com
security:
  - bearerAuth: []
paths:
  /v0/map/{mapId}/location:
    post:
      description: Create a location in a specific map
      parameters:
        - name: mapId
          in: path
          description: ID of the map to retrieve
          required: true
          schema:
            type: string
        - name: locationId
          in: path
          description: ID of the map location to retrieve
          required: true
          schema:
            type: string
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewLocation'
      responses:
        '200':
          description: Location response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Location'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewLocation:
      required:
        - fields
      type: object
      properties:
        fields:
          description: >-
            All data of this location as object. MUST include a name & address
            field that was specified at the creation of Map.
          type: object
          example:
            Name: The Kooks Restaurant
            Address: Frammi við Gjónna, Leynavatn 410, Faroe Islands
            key: The Kooks Restaurant
        order:
          description: >-
            By default locations are listed by {order} in ascending order.
            Specify if you have specific preference on where this location shall
            be shown in the list. By default, it’s appended to the end of list.
          type: integer
          format: int64
          example: '1'
    Location:
      required:
        - name
      type: object
      properties:
        id:
          description: The ID of Location
          type: string
          example: 04P1DY1YbwePX2rjKo3H
        name:
          description: The name of Location
          type: string
          example: The Kooks Restaurant
        placeId:
          description: The placeId resolved (via geocoding) for this location
          type: string
          example: ChIJ6_ktdpMVvEgRJBv3ZEgxsD8
        latLngLiteral:
          type: object
          properties:
            lat:
              description: Latitude of this location
              type: integer
              format: int64
              example: '61.89263500000001'
            lng:
              description: Latitude of this location
              type: integer
              format: int64
              example: '-6.911805999999999'
        properties:
          type: object
          description: >-
            This object contains all the data fields that were passed in for
            this location at import/creation
          example:
            Restaurant: The Kooks Restaurant
            Address: Frammi við Gjónna, Leynavatn 410, Faroe Islands
            key: The Kooks Restaurant
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````