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

# Add Location

> POST request to add a new location with a geo-fence boundary that can be either CIRCULAR or POLYGON. There cannot be an existing location with the same name as the location being created.<br/><br/>The maximum number of POI that can be created in your account is limited based on the number of vehicles in your fleet.<ul><li>if your fleet size is less than 1,000 then you can create up to 250,000 locations</li><li>if your fleet size is more than 1,000, then the maximum is reduced on a sliding scale depending on the number of vehicles in your fleet</li></ul>The address for the location can be specified as either:<ul><li>longitude and latitude coordinates - An address lookup is done to determine values for roadNumber, road, city, postcode and country. The formattedAddress is constructed as a comma separated set of values from roadNumber, road, city, postcode and country.</li><li>roadNumber, road, city, postcode, country - Values for city, postcode and country are mandatory and must be included in the input JSON object. The formattedAddress is constructed as a comma separated set of values from roadNumber, road, city, postcode and country. A lookup is done to determine the longitude and latitude coordinates.</li></ul>If both an address and longitude/latitude values are specified, then no check is performed to validate that the address matches the longitude/latitude values.<br/><br/>The geofence for the location can be specified as either:<ul><li>radius - A geofence for the location is a circle. The radius for the circle must be between 0.001 and 1.</li><li>polygon - The geofence for the location is a polygon which is specified as an array of longitude and latitude pairs. There must be at least three longitude and latitude pairs specified. The geofence boundary is closed by automatically linking the first longitude and latitude pair to the last longitude and latitude pair specified.</li></ul>The geofence for a location can overlap the geofence for another location. The geofence for this location can overlap up to 5 locations.



## OpenAPI

````yaml /api-reference/fleet-management.json post /public/v1/customer/{customerId}/location
openapi: 3.0.1
info:
  title: Fleet management
  description: >-
    A comprehensive administration pack enabling full control over fleet
    structures, users, drivers, vehicles and operational data.
  contact:
    name: Masternaut
    url: https://www.masternaut.com
    email: support@masternautconnect.com
  version: 124.0.2607160821
servers:
  - url: https://api.masternautconnect.com/connect-webservices/services
    description: Product Server
security:
  - basicAuth: []
tags:
  - name: /driver
    description: Driver Operations
  - name: /group
    description: Group operations
  - name: /location/category
    description: Location category management operations
  - name: /location
    description: Location management operations
  - name: /role
    description: Role operations
  - name: /tokenInformation
    description: Token operations
  - name: /user
    description: User operations
  - name: /maintenance
    description: Vehicle maintenance operations
  - name: /vehicle
    description: Vehicle management operations
paths:
  /public/v1/customer/{customerId}/location:
    post:
      tags:
        - /location
      summary: Add Location
      description: >-
        POST request to add a new location with a geo-fence boundary that can be
        either CIRCULAR or POLYGON. There cannot be an existing location with
        the same name as the location being created.<br/><br/>The maximum number
        of POI that can be created in your account is limited based on the
        number of vehicles in your fleet.<ul><li>if your fleet size is less than
        1,000 then you can create up to 250,000 locations</li><li>if your fleet
        size is more than 1,000, then the maximum is reduced on a sliding scale
        depending on the number of vehicles in your fleet</li></ul>The address
        for the location can be specified as either:<ul><li>longitude and
        latitude coordinates - An address lookup is done to determine values for
        roadNumber, road, city, postcode and country. The formattedAddress is
        constructed as a comma separated set of values from roadNumber, road,
        city, postcode and country.</li><li>roadNumber, road, city, postcode,
        country - Values for city, postcode and country are mandatory and must
        be included in the input JSON object. The formattedAddress is
        constructed as a comma separated set of values from roadNumber, road,
        city, postcode and country. A lookup is done to determine the longitude
        and latitude coordinates.</li></ul>If both an address and
        longitude/latitude values are specified, then no check is performed to
        validate that the address matches the longitude/latitude
        values.<br/><br/>The geofence for the location can be specified as
        either:<ul><li>radius - A geofence for the location is a circle. The
        radius for the circle must be between 0.001 and 1.</li><li>polygon - The
        geofence for the location is a polygon which is specified as an array of
        longitude and latitude pairs. There must be at least three longitude and
        latitude pairs specified. The geofence boundary is closed by
        automatically linking the first longitude and latitude pair to the last
        longitude and latitude pair specified.</li></ul>The geofence for a
        location can overlap the geofence for another location. The geofence for
        this location can overlap up to 5 locations.
      operationId: createLocation
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/LocationDto'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/LocationDto'
components:
  schemas:
    LocationDto:
      required:
        - categoryName
        - name
      type: object
      properties:
        id:
          pattern: ^[\w]*$
          type: string
        radius:
          type: number
          format: double
        name:
          type: string
        categoryName:
          type: string
        address:
          $ref: '#/components/schemas/AddressDto'
        coordinate:
          $ref: '#/components/schemas/CoordinateDto'
        polygon:
          maxItems: 2147483647
          minItems: 3
          type: array
          items:
            $ref: '#/components/schemas/CoordinateDto'
        reference:
          maxLength: 50
          minLength: 0
          type: string
        phoneNumber:
          maxLength: 20
          minLength: 0
          pattern: ^\+?\d+$
          type: string
        contact:
          maxLength: 50
          minLength: 0
          type: string
        email:
          maxLength: 50
          minLength: 0
          type: string
        notes:
          maxLength: 140
          minLength: 0
          type: string
    AddressDto:
      required:
        - city
        - country
        - postCode
      type: object
      properties:
        formattedAddress:
          type: string
        road:
          type: string
        roadNumber:
          type: string
        city:
          maxLength: 50
          minLength: 0
          type: string
        postCode:
          maxLength: 20
          minLength: 0
          type: string
        country:
          maxLength: 50
          minLength: 0
          type: string
        roadType:
          type: string
    CoordinateDto:
      required:
        - latitude
        - longitude
      type: object
      properties:
        longitude:
          type: number
          description: Longitude coordinate in decimal degrees.
          format: double
        latitude:
          type: number
          description: Latitude coordinate in decimal degrees.
          format: double
      description: Geographic coordinate with latitude and longitude values.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````