> ## 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.

# Update Zone by ID

> Updates zone attributes using its `zoneId`.



## OpenAPI

````yaml locations.openapi put /location-zones/{zoneId}
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:
  /location-zones/{zoneId}:
    put:
      tags:
        - Location Zone Endpoints
      summary: Update Zone by ID
      description: Updates zone attributes using its `zoneId`.
      operationId: updateZone
      parameters:
        - name: zoneId
          in: path
          description: System-generated unique ID to identify the zone
          required: true
          schema:
            type: string
          example: 9372919a8219e8
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricRequestId'
        - $ref: '#/components/parameters/xFabricChannelIdOptional'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateZoneRequest'
              type: object
        required: true
      responses:
        '200':
          description: Zone updated
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/zoneResponse'
        '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
        '404':
          description: Zone not found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                message: 'Zone with zoneId: 9372919a8219e8 not found'
        '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:
    updateZoneRequest:
      type: object
      description: Update geography request
      properties:
        geographyName:
          type: string
          description: Geography name
          example: US_Geo_PostalCode
        description:
          type: string
          description: Detailed description of the geography
          example: Specific geography for US Zones
        type:
          type: string
          description: Geography type
          example: PostalCode
        values:
          type: array
          items:
            type: string
        associatedZone:
          type: string
          description: Associated zone
          example: US_Zone
        linkedNetworks:
          type: array
          items:
            type: string
        resourceId:
          type: string
        subResourceId:
          type: string
      required:
        - geographyName
        - type
    zoneResponse:
      type: object
      description: Zone response
      properties:
        zoneId:
          type: string
          description: System-generated unique ID to identify the zone
          example: 9372919a8219e8
        zoneName:
          type: string
          description: Zone name
          example: US_LOCATIONS
        zoneType:
          type: string
          description: Zone type
          enum:
            - ABSOLUTE
            - TIERED
          example: ABSOLUTE
        description:
          type: string
          description: Detailed description of the zone
          example: Specific zone for US Locations
        locations:
          type: array
          items:
            $ref: '#/components/schemas/zoneLocationResource'
        tiers:
          type: array
          items:
            $ref: '#/components/schemas/zoneTierResource'
        createdAt:
          type: string
          format: date-time
          description: Zone created date
          example: '2022-05-12T09:30:31.198Z'
        updatedAt:
          type: string
          format: date-time
          description: Time of last update to zone (UTC)
          example: '2022-05-12T09:30:31.198Z'
      required:
        - zoneName
        - zoneType
    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
    zoneLocationResource:
      type: object
      description: Zone location resource model
      properties:
        priority:
          type: string
          description: Priority
          example: 1
        locationNumber:
          type: string
          description: Merchant-specified unique number to identify the location
          example: 23
      required:
        - locationNumber
        - priority
    zoneTierResource:
      type: object
      description: Zone tier resource model
      properties:
        sort:
          type: string
          default: '-location.createdAt'
          description: >-
            Property by which data is sorted. <p> **Note**: `-` refers to
            descending and `+` refers to ascending order.
          example: +location.createdAt
          pattern: (^[+-]location\.[a-zA-Z.\-_]*)(,([+-]location\.[a-zA-Z.\-_]*)){0,}
        filters:
          type: array
          items:
            $ref: '#/components/schemas/locationSearchFilter'
            description: List to filters for search
            maxItems: 50
            minItems: 0
          maxItems: 50
          minItems: 0
        tier:
          type: integer
          format: int32
      required:
        - filters
    locationSearchFilter:
      type: object
      description: >-
        Criteria to search locations. To search using a single value,
        `valueSearchFilter` is used. To search using multiple values,
        `valuesSearchFilter` is used.
      discriminator:
        propertyName: condition
        mapping:
          EQ:
            $ref: '#/components/schemas/valueSearchFilter'
          NEQ:
            $ref: '#/components/schemas/valueSearchFilter'
          LT:
            $ref: '#/components/schemas/valueSearchFilter'
          GT:
            $ref: '#/components/schemas/valueSearchFilter'
          LTE:
            $ref: '#/components/schemas/valueSearchFilter'
          GTE:
            $ref: '#/components/schemas/valueSearchFilter'
          IN:
            $ref: '#/components/schemas/valuesSearchFilter'
          NIN:
            $ref: '#/components/schemas/valuesSearchFilter'
      properties:
        group:
          type: string
          default: Default
          description: Group name
          example: GroupA
        field:
          type: string
          description: Field name
          example: location.locationNum
          pattern: ^location\.[a-zA-Z.\-_]*
        condition:
          type: string
          default: EQ
          description: >-
            Filter conditions. <br> EQ (Equal to): Searches for exact match.
            <br> NEQ (Not equal to): Searches by excluding the specified value.
            <br> IN: Search for multiple values. <br> NIN (Not IN): Excludes the
            specified values in the search. LT (Less than): Searches for values
            that are less than the specified value. GT (Greater than):  Search
            for values that are greater than the specified value. LTE (Less than
            or equal to): Searches for values that are less than or equal to the
            specified value. GTE (Greater than or equal to): Searches for values
            that are greater than or equal to the specified value.
          enum:
            - EQ
            - NEQ
            - IN
            - NIN
            - LT
            - GT
            - LTE
            - GTE
          example: EQ
      required:
        - condition
        - field
    valueSearchFilter:
      allOf:
        - $ref: '#/components/schemas/locationSearchFilter'
        - type: object
          properties:
            value:
              type: object
              description: A single value for `field` using which data is searched
              example: ORDER_CREATE
              oneOf:
                - type: string
                  description: Target record's non-numeric identifier
                  example: ORDER_CREATE
                - type: number
                  format: int64
                  description: Target record's numeric identifier
                  example: 112233
                - type: number
                  format: double
                  description: Target record's numeric identifier
                  example: 1122.33
      description: >-
        Criteria to find location using a single value. Condition between
        `field` and `value` is anything except IN and NIN when
        `valueSearchFilter` is used.
      required:
        - condition
        - field
    valuesSearchFilter:
      allOf:
        - $ref: '#/components/schemas/locationSearchFilter'
        - type: object
          properties:
            values:
              type: array
              items:
                description: Multiple values for `field` using which locations are searched
                example: ORDER_CREATE
                oneOf:
                  - type: string
                    description: Target record's non-numeric identifier
                    example: ORDER_CREATE
                  - type: number
                    format: int64
                    description: Target record's numeric identifier
                    example: 112233
                  - type: number
                    format: double
                    description: Target record's numeric identifier
                    example: 1122.33
              maxItems: 25
              minItems: 0
      description: >-
        Criteria to find locations using multiple values. Condition between
        `field` and `values` is either IN or NIN when `valuesSearchFilter` is
        used.
      required:
        - condition
        - field
  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

````