> ## Documentation Index
> Fetch the complete documentation index at: https://integrations.truecold.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create location



## OpenAPI

````yaml post /location
openapi: 3.0.0
info:
  title: TrueCold API
  version: 1.0.0
  description: API documentation for TrueCold application
servers:
  - url: https://api.truecold.io
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Carriers
    description: Carrier management operations
  - name: Shipments
    description: Shipment tracking and management
  - name: Deliveries
    description: Delivery management operations
  - name: Locations
    description: Location management
  - name: Handling Units
    description: Handling unit operations
  - name: Alerts
    description: Alert system management
  - name: Sensors
    description: Sensor management and monitoring
paths:
  /location:
    post:
      tags:
        - Locations
      summary: Create location
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LocationCreateInput'
      responses:
        '201':
          description: Successfully created location
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Location'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKeyAuth: []
components:
  schemas:
    LocationCreateInput:
      type: object
      description: Location input data for creation
      properties:
        name:
          type: string
          description: Location name
        code:
          type: string
          description: Location code
        street:
          type: string
          description: Street address
        city:
          type: string
          description: City name
        country:
          type: string
          description: Country name
        zip_code:
          type: string
          description: Postal code
        latitude:
          type: number
          description: Latitude coordinate
        longitude:
          type: number
          description: Longitude coordinate
      required:
        - name
        - code
        - street
        - city
        - country
        - zip_code
        - latitude
        - longitude
    Location:
      type: object
      description: Location entity (API response)
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        account_id:
          type: string
          format: uuid
          description: Account ID
        linked_site_id:
          type: string
          format: uuid
          description: Linked site ID
        name:
          type: string
          description: name name
        code:
          type: string
          description: code code
        street:
          type: string
          description: Street
        zip_code:
          type: string
          description: zip code
        city:
          type: string
          description: City
        country:
          type: string
          description: Country
        latitude:
          type: number
          description: Latitude
        longitude:
          type: number
          description: Longitude
        soft_deleted:
          type: string
          format: date-time
          description: Soft deletion timestamp
        soft_deleted_by:
          type: string
          description: User who soft deleted the record
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
          example: An error occurred
        code:
          type: string
          description: Error code
          example: ERROR_CODE
        details:
          type: object
          description: Additional error details (optional)
      required:
        - message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Contact your administrator to get an API
        key.

````