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

# Create a location

> Create a location to utilize for managing inventory and orders.



## OpenAPI

````yaml locations.openapi post /locations
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Orders team
  description: >-
    fabric **Locations** API provides location endpoints that support
    multi-tenant services. This location data is used for both inventory
    management and order management. When an order is created, it's allocated to
    the nearest location according to the Order Fulfillment Logic.
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: Inventory - Locations API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: These Endpoints help in performing Outage operations
    name: Location Outage Endpoints
  - description: These endpoints let you create and manage locations.
    name: Locations
  - description: These Endpoints help in performing capacity operations
    name: Location Capacity Endpoints
  - name: Location Geography Endpoints
    description: These Endpoints help in performing Geography operations
  - name: Location Zone Endpoints
    description: These Endpoints help in performing Zone operations
paths:
  /locations:
    post:
      tags:
        - Locations
      summary: Create a location
      description: Create a location to utilize for managing inventory and orders.
      operationId: createLocation
      parameters:
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/xFabricChannelIdOptional'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/locationRequest'
        required: true
      responses:
        '201':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/locationResponse'
        '400':
          description: Bad request
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: CLIENT_ERROR
                errorCode: SERVICE-4003
                message: 'Mandatory param(s): `requiredField1` is/are missing'
                errors:
                  - type: CLIENT_ERROR
                    errorCode: SERVICE-4002
                    message: Invalid value(s) specified for 'requiredField.field3'
                    errors: []
                context:
                  service: orders
                  endpoint: POST /v3/orders
        '401':
          description: Unauthorized
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: CLIENT_ERROR
                errorCode: SERVICE-4001
                message: Unauthorized request
                errors: []
                context:
                  service: orders
                  endpoint: POST /v3/orders/OrderId_12345
        '409':
          description: Either location number or coordinates already exist
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                message: Location already exists
        '500':
          description: Internal server error
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: SERVER_ERROR
                errorCode: SERVICE-5000
                message: Internal server error
                errors: []
                context:
                  service: inventories
                  endpoint: POST /v3/inventories/actions/find-by-geography
components:
  parameters:
    xFabricTenantId:
      description: >-
        A header used by fabric to identify the tenant making the request. You
        must include tenant id in the authentication header for an API request
        to access any of fabric’s endpoints. You can retrieve the tenant id ,
        which is also called account id, from
        [Copilot](/v3/platform/settings/account-details/getting-the-account-id).
        This header is required.
      example: 5f328bf0b5f328bf0b5f328b
      in: header
      name: x-fabric-tenant-id
      required: true
      schema:
        type: string
    xFabricRequestId:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      in: header
      name: x-fabric-request-id
      required: false
      schema:
        type: string
    xFabricChannelIdOptional:
      description: >-
        x-fabric-channel-id identifies the sales channel through which the API
        request is being made; primarily for multichannel use cases. It is an
        optional field. The default US channel is 12 while the default Canada
        channel is 13.
      example: '12'
      in: header
      name: x-fabric-channel-id
      required: false
      schema:
        type: string
  schemas:
    locationRequest:
      type: object
      description: >-
        Request payload for creating or updating a location. Includes identity,
        configuration, service capabilities, and operational metadata.
      properties:
        locationNumber:
          type: integer
          format: int32
          description: A merchant-defined unique identifier for the location.
          example: 23
        isActive:
          type: boolean
          description: >-
            Indicates whether the location is active for order fulfillment.
            `true` Location is active. `false` Location is inactive.
          example: true
        address:
          $ref: '#/components/schemas/locationAddress'
          description: The physical address associated with the location.
        type:
          type: string
          description: >-
            Classification of the location (for example, Distribution Center,
            Store).
          example: DC
        capacity:
          $ref: '#/components/schemas/capacity'
          description: >-
            The maximum operational capacity and allocation limits for the
            location.
        services:
          type: object
          description: >-
            Custom attributes used to define and categorize the location. These
            can also be used for filtering and routing logic.
          example:
            brand: WHBM
            channel: Frontline
        operatingHours:
          type: array
          description: A list of daily operating hours for the location.
          items:
            $ref: '#/components/schemas/operatingHours'
        coordinates:
          $ref: '#/components/schemas/geoJsonPoint'
          description: >-
            Geographic coordinates of the location in GeoJSON format.
            Coordinates are in `[longitude, latitude]` format with longitude in
            [-180, 180] and latitude in [-90, 90].
          example:
            type: Point
            coordinates:
              - -122.3493
              - 47.6205
        attributes:
          type: object
          description: >-
            Custom key-value attributes associated with the location. Used to
            store optional metadata.
          example:
            isReturns: 'true'
        supportedCarriers:
          type: array
          description: List of shipping carriers supported by the location.
          items:
            $ref: '#/components/schemas/Carrier'
        activeFulfillmentMethods:
          type: object
          description: >-
            A map of fulfillment methods that are currently active at the
            location.
          example:
            ShipToHome: 'true'
        transfer:
          $ref: '#/components/schemas/transfer'
          description: >-
            Transfer configuration for routing inventory to or from this
            location.
        name:
          type: string
          description: The display name or identifier for the location.
          example: Seattle Store
      required:
        - locationNumber
        - name
    locationResponse:
      type: object
      description: >-
        Response object containing details about a specific location, including
        its configuration, operational status, capacity, and service attributes.
      properties:
        locationId:
          type: string
          description: A system-generated globally unique identifier for the location.
          example: 9372919a8219e8
        locationNumber:
          type: integer
          format: int32
          description: A merchant-defined unique identifier used to reference the location.
          example: 23
        isActive:
          type: boolean
          description: >-
            Indicates whether the location is currently active for order
            fulfillment. `true` Location is active. `false` Location is
            inactive.
          example: true
        address:
          $ref: '#/components/schemas/locationAddress'
          description: The physical address associated with the location.
        type:
          type: string
          description: >-
            The type or classification of the location (for example, DC for
            Distribution Center, Store).
          example: DC
        capacity:
          $ref: '#/components/schemas/capacity'
          description: >-
            Capacity limits and allocation settings that define how many orders
            the location can fulfill.
        services:
          type: object
          description: >-
            Custom service-level attributes associated with the location. Often
            used for filtering or routing (for example, by brand or channel).
          example:
            brand: WHBM
            channel: Frontline
        zones:
          type: array
          description: >-
            A list of shipping zones associated with the location for delivery
            or operational routing.
          items:
            type: string
        createdAt:
          type: string
          format: date-time
          description: >-
            The timestamp of when the location record was created, in ISO 8601
            UTC format.
          example: '2022-05-25T07:58:30.996Z'
        updatedAt:
          type: string
          format: date-time
          description: >-
            The timestamp of the most recent update to the location record, in
            ISO 8601 UTC format.
          example: '2022-05-25T07:58:30.996Z'
        operatingHours:
          type: array
          description: >-
            Weekly schedule detailing the hours during which the location
            operates.
          items:
            $ref: '#/components/schemas/operatingHours'
        coordinates:
          $ref: '#/components/schemas/geoJsonPoint'
          description: >-
            The geographical coordinates of the location in GeoJSON format. Must
            follow the format `[longitude, latitude]`, where longitude ∈ [-180,
            180] and latitude ∈ [-90, 90].
          example:
            type: Point
            coordinates:
              - -122.3493
              - 47.6205
        attributes:
          type: object
          description: Custom key-value metadata or flags associated with the location.
          example:
            isReturns: 'true'
        supportedCarriers:
          type: array
          description: >-
            A list of shipping carriers supported by this location for outbound
            or inbound logistics.
          items:
            $ref: '#/components/schemas/Carrier'
        activeFulfillmentMethods:
          type: object
          description: >-
            A map of fulfillment methods currently active and supported by this
            location (for example, ShipToHome, Pickup).
          example:
            ShipToHome: 'true'
        transfer:
          $ref: '#/components/schemas/transfer'
          description: >-
            Transfer configuration settings for inventory movement related to
            this location.
        name:
          type: string
          description: >-
            The display name of the location, typically shown in the User
            Interface and reports.
          example: Seattle Store
      required:
        - locationNumber
        - name
    errorResponse:
      type: object
      description: Error response
      properties:
        type:
          type: string
          description: Error type
          example: CLIENT_ERROR
        errorCode:
          type: string
          description: Error code
          example: OMS-10001
        message:
          type: string
          description: Error message
          example: Bad request
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorResponse'
        context:
          type: string
          description: Error message
          example: Bad request
    locationAddress:
      type: object
      description: Address details
      properties:
        addressLine1:
          type: string
          description: Address line 1
          example: 123
        addressLine2:
          type: string
          description: Address line 2
          example: Suite 100
        addressLine3:
          type: string
          description: Address line 3
          example: Seventh floor
        addressLine4:
          type: string
          description: Address line 4
          example: 'Attention: Pat E. Kake'
        city:
          type: string
          description: City name
          example: Seattle
        region:
          type: string
          description: Region or state
          example: WA
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 based country code
          example: US
        postalCode:
          type: string
          description: Postal or ZIP code
          example: 98121
        type:
          type: string
          description: Address type
          example: Home
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/contact'
      required:
        - region
    capacity:
      type: object
      description: >-
        Location Capacity Model used by fulfillment specialist to optimize
        fulfillments across the distribution network and monitor productivity by
        location
      properties:
        maxAllocations:
          type: integer
          format: int32
          description: >-
            Maximum allocations this location can take at any given time. When
            `currentAllocations=maxAllocations`, this location is AtCapacity and
            cannot take any further allocations.
          example: 30
        currentAllocations:
          type: integer
          format: int32
          description: Current allocations at this location.
          example: 5
          readOnly: true
        infiniteAllocation:
          type: boolean
        allocationPercentage:
          type: integer
          format: int32
          description: >-
            Current percentage of allocations at this location. Calculated by
            `(currentAllocations / maxAllocations)*100`.
          example: 20
        isCapacityFull:
          type: boolean
          description: If location has no allocation capacity limit.
          example: true
    operatingHours:
      type: object
      description: Store operating hour
      properties:
        day:
          type: string
          description: Day of week
          enum:
            - SUNDAY
            - MONDAY
            - TUESDAY
            - WEDNESDAY
            - THURSDAY
            - FRIDAY
            - SATURDAY
          example: SUNDAY
        hours:
          type: array
          items:
            $ref: '#/components/schemas/hours'
    geoJsonPoint:
      type: object
      description: Location coordinates
      example:
        type: Point
        coordinates:
          - -122.3493
          - 47.6205
      properties:
        type:
          type: string
          description: Geo coordinate type
          example: Point
        coordinates:
          type: array
          items:
            format: double
            description: Coordinate value
            example: 36.0552222
    Carrier:
      type: object
      description: Location supported carrier
      properties:
        carrier:
          type: string
          description: Carrier name
          example: FedEx
        serviceLevels:
          type: array
          items:
            $ref: '#/components/schemas/LocationSupportedCarrierServiceLevels'
    transfer:
      type: object
      description: Location transfer Model used setup transfer configuration for location
      properties:
        isAutoReceiving:
          type: boolean
          description: Enable or disable auto receiving for transfer
        autoStockWindow:
          type: string
          description: Sets the auto stock window for location transfer
          example: PT10M
    contact:
      type: object
      description: Contact details
      properties:
        type:
          type: string
          description: Contact type
          example: OFFICE
        email:
          type: string
          description: E-mail address
          example: abc@mail.com
        phone:
          type: array
          items:
            $ref: '#/components/schemas/phone'
        name:
          $ref: '#/components/schemas/name'
    hours:
      type: object
      description: Store operating hours
      properties:
        open:
          type: string
          description: Store opening time, measured in 24-hour format
          example: 10
        close:
          type: string
          description: Closing time for given hour type
          example: 20
        type:
          type: string
          description: Type of location operation
          example: PICK_UP
    LocationSupportedCarrierServiceLevels:
      type: object
      description: >-
        A list of carrier service levels supported by a specific location,
        including the carrier name and corresponding shipping method used by
        fabric.
      properties:
        name:
          type: string
          description: The name of the external shipping carrier providing the service.
          example: FedEx
        shippingMethod:
          type: string
          description: >-
            The name of the corresponding shipping method as defined in fabric's
            system.
          example: FedEx
    phone:
      type: object
      description: Phone number details
      properties:
        number:
          type: string
          description: Phone number
          example: '0281923712'
        type:
          type: string
          description: Phone type
          example: MOBILE
    name:
      type: object
      description: Contact person's name for the location
      properties:
        firstName:
          type: string
          description: First name
          example: Pat
        middleName:
          type: string
          description: Middle name or initial
          example: E
        lastName:
          type: string
          description: Last name
          example: Kake
  headers:
    xFabricRequestIdResponseHeader:
      description: Unique request ID
      example: 263e731c-45c8-11ed-b878-0242ac120002
      required: false
      schema:
        type: string
  securitySchemes:
    authorization:
      bearerFormat: JWT
      scheme: bearer
      type: http

````