> ## 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 allocation attributes

> Updates merchant-defined attributes for an allocation identified by `allocationId`. Only the attributes provided in the request payload are updated; existing attributes not included in the payload remain unchanged.



## OpenAPI

````yaml allocations.openapi post /allocations/{allocationId}/actions/update-attributes
openapi: 3.0.1
info:
  contact:
    email: support@fabric.inc
    name: fabric Support Team
  description: >-
    fabric **Allocations** API lets retailers manage allocation for existing
    orders. Allocations serve as records of the locations from which an order is
    fulfilled. The user of the Allocation service is a Warehouse Management
    Service (WMS) or Point of Sale Service (POS).
  license:
    name: fabric API License
    url: https://fabric.inc/api-license
  termsOfService: https://fabric.inc/terms-of-use
  title: Orders - Allocations API
  version: 3.0.0
  x-audience: external-public
servers:
  - description: Production
    url: https://api.fabric.inc/v3
security:
  - authorization: []
tags:
  - description: >-
      fabric **Allocations** API lets retailers manage allocation for existing
      orders. Allocations serve as records of the locations from which an order
      is fulfilled. The user of the Allocation service is a Warehouse Management
      Service (WMS) or Point of Sale Service (POS).
    name: Allocations
externalDocs:
  description: Find out more about fabric Orders (also called OMS)
  url: https://developer.fabric.inc/v3/docs/orders-overview
paths:
  /allocations/{allocationId}/actions/update-attributes:
    post:
      tags:
        - Allocations
      summary: Update allocation attributes
      description: >-
        Updates merchant-defined attributes for an allocation identified by
        `allocationId`. Only the attributes provided in the request payload are
        updated; existing attributes not included in the payload remain
        unchanged.
      operationId: updateAllocationAttributes
      parameters:
        - name: allocationId
          in: path
          description: >-
            The allocation ID is a fabric system-generated unique identifier
            created when the allocation is initially created.
          required: true
          schema:
            type: string
          example: 62ff5c0bec0aed3c86202c32
        - $ref: '#/components/parameters/xFabricTenantId'
        - $ref: '#/components/parameters/xFabricChannelId'
        - $ref: '#/components/parameters/xFabricRequestId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/allocationAttributesUpdateRequest'
      responses:
        '200':
          description: OK
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/allocationResponse'
        '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 or invalid request parameters
                errors:
                  - type: CLIENT_ERROR
                    errorCode: SERVICE-4002
                    message: Invalid value specified for one or more attributes
                    errors: []
                context:
                  service: allocations
                  endpoint: >-
                    POST
                    /v3/allocations/{allocationId}/actions/update-attributes
        '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: allocations
                  endpoint: >-
                    POST
                    /v3/allocations/{allocationId}/actions/update-attributes
        '404':
          description: Not found
          headers:
            x-fabric-request-id:
              $ref: '#/components/headers/xFabricRequestIdResponseHeader'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
              example:
                type: CLIENT_ERROR
                message: Allocation not found
                errorCode: SERVICE-4040
                errors: []
                context:
                  service: allocations
                  endpoint: >-
                    POST
                    /v3/allocations/{allocationId}/actions/update-attributes
        '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: allocations
                  endpoint: >-
                    POST
                    /v3/allocations/{allocationId}/actions/update-attributes
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
    xFabricChannelId:
      description: >-
        x-fabric-channel-id identifies the sales channel where the API request
        is being made; primarily for multichannel use cases. The channel ids are
        12 corresponding to US and 13 corresponding to Canada. The default
        channel id is 12. This field is required.
      example: '12'
      in: header
      name: x-fabric-channel-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
  schemas:
    allocationAttributesUpdateRequest:
      description: Allocation attributes update request details
      properties:
        attributes:
          additionalProperties:
            description: >-
              User defined custom attributes. This is a placeholder for
              additional info in key value pairs.
            example:
              attr1: value
            type: object
          description: >-
            User defined custom attributes. This is a placeholder for additional
            info in key value pairs.
          example:
            attr1: value
          type: object
        keysToRemove:
          description: A list of keys to be removed.
          items:
            type: string
          type: array
      required:
        - attributes
      type: object
    allocationResponse:
      description: Allocation response details
      properties:
        allocationId:
          description: 24-character system-generated allocation ID
          example: 62ff5c0bec0aed3c86202c32
          type: string
        allocationNumber:
          description: >-
            Merchant-specified unique number assigned to each allocation. If
            omitted, is this generated by fabric’s sequence generator using
            Configuration service
          example: 13000004
          format: int32
          type: integer
        allocationRequestId:
          description: >-
            Merchant-specified unique ID. If omitted, this is generated by
            fabric’s sequence generator using Configuration service.
          example: 62ff5c0bec0aed3c86202c32
          type: string
        allocationExternalId:
          type: string
          description: >-
            This is an optional identifier assigned to the invoice by the
            merchant.
          example: 123k4h123k
        auditLogs:
          description: Change history details
          items:
            $ref: '#/components/schemas/auditLog'
          type: array
        createdAt:
          description: System-generated time of allocation record creation
          example: '2022-08-01T18:03:28.483971941Z'
          format: date-time
          type: string
        currency:
          description: Currency
          example: USD
          type: string
        decisionContexts:
          description: A list of decision contexts.
          items:
            $ref: '#/components/schemas/decisionContextResource'
          type: array
        items:
          description: List of items to be shipped
          items:
            $ref: '#/components/schemas/allocationItem'
          type: array
        itemsType:
          description: >-
            This is an inherited attribute from *Orders* that pertains to item
            types such as WEB_SHIP, WEB_PICKUP, WEB_SDD INTERNATIONAL, POS,
            POS_SHIP, and POS_PICKUP.
          example: WEB_SHIP
          type: string
        locationNumber:
          description: >-
            Inventory location number to identify ship-from location or Buy
            Online Pickup from Store (BOPIS) location. This must be the
            `locationNumber` stored in the fabric Location service.
          example: 1234B
          type: string
        locationType:
          description: >-
            Inventory location type such as, DC or Store from where the order is
            picked up
          example: DC
          type: string
        notifiedToPPSAt:
          description: >-
            fabric system-generated time when allocation service sent event
            notification to package tracking service.
          example: '2022-08-01T18:03:28.483971941Z'
          format: date-time
          type: string
        orderSubType:
          description: >-
            During allocation creation, this attribute is inherited from fabric
            Orders and includes subtypes such as IOS, ANDROID, INTERNATIONAL,
            among others.
          example: ANDROID
          type: string
        parentAllocationId:
          description: >-
            Allocation ID that's generated while creating the allocation for the
            first time. Initially this will be the same as
            `allocationRequestId`. If there is a reallocation, the
            `parentAllocationId` will be assigned the same value as the initial
            `allocationRequestId`, and will serve as a means of monitoring all
            subsequent child allocations.
          example: 62ff5c0bec0aed3c86202c32
          type: string
        previousAllocatedLocationNums:
          description: >-
            In case of reallocation, it keeps track of previously allocated
            location numbers.
          items:
            description: Previously allocated location numbers
            example: '410'
            type: string
          type: array
        recipients:
          description: Recipient details like name, email address, and phone number
          items:
            $ref: '#/components/schemas/orderPickup'
          type: array
        shipToAddress:
          $ref: '#/components/schemas/address'
        shipFromAddress:
          $ref: '#/components/schemas/address'
        shipToId:
          description: >-
            System-generated UUID associated with `shipInfo`, generated from CnC
            service. <p> **Note**: An order can have multiple ship-to (delivery)
            locations and items going to the same location have one `shipToId`.
            </p>
          example: 98ff5c0bec0aed3c86202c32
          type: string
        shipmentMethod:
          description: >-
            Shipping method. This attribute is inherited from `order.shipInfo`
            during allocation creation.
          example: Parcel Post Delivery
          type: string
        shipmentType:
          description: >-
            This attribute is inherited from `order.shipInfo` during allocation
            creation. Acceptable value: SHIP_TO_ADDRESS,  CUSTOMER_PICKUP,
            PICKUP, SDD, SHIP_TO_STORE
          example: SHIP_TO_ADDRESS
          type: string
        shippedAt:
          description: >-
            Time of order shipment, generated by allocation service when
            shipment service calls allocation after shipment is created.
          example: '2022-08-01T20:03:28.483971941Z'
          format: date-time
          type: string
        statusCode:
          description: Allocation status
          enum:
            - ALLOCATE
            - ALLOCATION_HOLD_EXTERNAL
            - PENDING_DROP
            - PENDING_ALLOCATION
            - PENDING_PICK
            - SHIPPED
            - PARTIALLY_SHIPPED
            - REALLOCATED
            - CANCELLED
            - PARTIALLY_CANCELLED
            - PENDING_REALLOCATION
            - PARTIAL_PENDING_REALLOCATION
          example: ALLOCATED
          type: string
        type:
          description: >-
            Allocation type **ALLOCATED:** Order is allocated for fulfillment
            **SCRATCHED:** Order is canceled during allocation due to
            unavailability of inventory **RETURNED:** Allocation created for the
            return items
          enum:
            - ALLOCATED
            - SCRATCHED
            - RETURNED
          example: ALLOCATED
          type: string
        updatedAt:
          description: System-generated time when allocation record was last modified
          example: '2022-08-01T20:03:28.483971941Z'
          format: date-time
          type: string
        version:
          description: >-
            Allocation document version. The version number is incremented each
            time the allocation document undergoes an update. Update to an
            allocation document happens automatically when the status changes
            from one state to another based on the `statusCode`.
          example: 2
          format: int64
          type: integer
      required:
        - allocationId
        - allocationRequestId
        - createdAt
        - locationNumber
        - version
      type: object
    errorResponse:
      description: Error response
      properties:
        errors:
          description: Errors
          items:
            $ref: '#/components/schemas/errorResponse'
          type: array
        message:
          description: Error message
          example: Bad request
          type: string
        type:
          description: Error type
          example: CLIENT_ERROR
          type: string
      type: object
    auditLog:
      description: Audit log to capture change history
      properties:
        amount:
          description: Amount for which audit's done
          example: 2.4
          format: double
          type: number
        auditId:
          description: System-generated audit ID (UUID format)
          example: a05b72dc-78d8-4ea4-90fc-2fe6a1fe1111
          type: string
        auditType:
          description: Audit type such as cancel, return, etc.
          example: CANCEL
          type: string
        auditedAt:
          description: Audit time (UTC)
          example: '2023-03-12T09:24:54.804Z'
          format: date-time
          type: string
        employeeId:
          description: Employee (ID or name) who made the last update
          example: '6227'
          type: string
        isSuccess:
          default: false
          description: >-
            **true:** Update operation (any update to the service) is
            successful. **false:** Update operation has failed.
          example: true
          type: boolean
        lineItemId:
          description: >-
            Merchant-defined unique identifier for each item in an order. When
            omitted, fabric will generate it during order creation, in UUID
            format.
          example: b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569
          type: string
        lineItemNumber:
          description: Item identifier
          example: 1
          format: int32
          type: integer
        note:
          description: Additional info, if any
          example: Note
          type: string
        paymentToken:
          $ref: '#/components/schemas/orderPaymentToken'
        policyCode:
          description: >-
            Configurable in Copilot as per requirement. If omitted, default
            policy is used.
          example: POS
          type: string
        quantity:
          description: Ordered quantity of given item
          example: 1
          format: int32
          type: integer
        reasonCode:
          description: Merchant-defined reason code, varies from merchant to merchant
          example: Scratched item
          type: string
        sku:
          description: Stock keeping unit (SKU), unique item identifier
          example: SKU0023
          type: string
        source:
          description: >-
            Merchant-defined source from where the update was initiated. There
            are no predefined values; possible values could be Customer Service
            Representative (CSR), Point-of-Sale (POS), etc.
          example: POS
          type: string
        subReasonCode:
          description: >-
            Merchant-defined sub reason code; provides more clarity to audit
            reason
          example: Scratched item
          type: string
        updatedFields:
          description: Audit log for change history
          items:
            $ref: '#/components/schemas/orderAuditLogUpdatedField'
          type: array
      type: object
    decisionContextResource:
      properties:
        allocatedOrderLineIds:
          items:
            type: string
          type: array
        methodConfigs:
          additionalProperties:
            type: object
          type: object
        methodName:
          type: string
        ruleName:
          type: string
        ruleSetId:
          type: string
        ruleSetVersion:
          type: string
      type: object
    allocationItem:
      description: The details of the allocation item.
      properties:
        allocationLineNumber:
          description: >-
            A unique number assigned by merchant to identify an item in an
            allocation. When this value is not provided, fabric auto generates
            it in a UUID format during the allocation creation.
          example: 3
          format: int32
          type: integer
        channelId:
          description: Sales channel ID
          example: 4a35cc1b-4e15-46df-96c9-38a697d88dfe
          type: string
        cost:
          description: >-
            The total cost of all the items. This value is calculated based on
            the unit price and requested quantity.
          example: 150.6
          format: double
          type: number
        estimatedDeliveryDate:
          description: Estimated delivery date of the item
          example: '2022-08-01T18:03:28.483971941Z'
          format: date-time
          type: string
        itemId:
          description: >-
            System-generated unique identifier of item from fabric Products
            (previously called PIM) service
          example: 100064
          format: int32
          type: integer
        itemStatus:
          description: Current status of item
          enum:
            - CANCELLED
            - REFUNDED
            - ALLOCATED
            - REALLOCATED
            - SHIPPED
            - PENDING_ALLOCATION
            - PARTIALLY_ALLOCATED
            - PARTIALLY_SHIPPED
            - PARTIALLY_CANCELLED
            - PENDING_REALLOCATION
            - ALLOCATION_HOLD_EXTERNAL
          example: PARTIALLY_ALLOCATED
          type: string
        notes:
          description: >-
            An optional notes section. This section can be used by a customer
            service representative (CSR) to record notes on an allocation.
          items:
            $ref: '#/components/schemas/orderNote'
          type: array
        orderId:
          description: 24-character system-generated order ID
          example: 62f3982438bcab1951be0a19
          type: string
        orderLineId:
          description: Order line ID for tracking purpose
          example: 134fqfaa532qrf
          type: string
        orderLineNumber:
          description: Reference order line number for tracking purpose
          example: 1
          format: int32
          type: integer
        orderNumber:
          description: >-
            Merchant-defined order identifier. If omitted, this is generated by
            fabric’s sequence generator using Configuration service.
          example: 123k4h123k
          type: string
        orderExternalId:
          description: >-
            This is an optional, merchant-assigned identifier for the order. It
            can be used to reference the order in external systems.
          example: 123k4h123k
          type: string
        orderedAt:
          description: Merchant-specified order creation time (UTC) of the item
          example: '2022-08-01T18:03:28.483971941Z'
          format: date-time
          type: string
        parentAllocationLineNumber:
          description: >-
            Unique number allocated to each item of the parent allocation (the
            very first allocation)
          example: 3
          format: int32
          type: integer
        price:
          description: Unite price of the item
          example: 50.2
          format: double
          type: number
        quantity:
          description: Requested quantity of the item
          example: 3
          format: int32
          type: integer
        reallocationReasonCode:
          description: Reason for reallocation
          example: Reallocating due to unavailability of location number
          type: string
        reallocationRequestId:
          description: Reference ID of `allocationRequestId` that's being reallocated
          example: 123k4h123k
          type: string
        reshipReasonCode:
          description: A valid predefined reason code for reshipping the item
          example: Stock refilled
          type: string
        scratchQuantity:
          description: Total number of line items scratched or canceled
          example: 1
          format: int32
          type: integer
        scratchedReasonCode:
          description: A valid predefined reason code for scratching or canceling the item
          example: Out of stock
          type: string
        shippedQuantity:
          description: Total number of line items shipped
          example: 1
          format: int32
          type: integer
        sku:
          description: Stock Keeping Unit (SKU), unique identifier of item
          example: 123k4h123k
          type: string
        uom:
          description: >-
            Unit in which a product is sold or measured. It's important for
            accurately fulfilling orders and ensuring customers receive the
            correct quantity of products they have ordered. The possible values
            are EA (Each) or GAL (Gallon), DZ (Dozen), etc.
          example: EA
          type: string
        weight:
          description: Item weight during shipment
          example: 5.5
          format: double
          type: number
      required:
        - allocationLineNumber
        - itemId
        - quantity
        - sku
        - uom
      type: object
    orderPickup:
      description: Order pickup details
      properties:
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        pickupType:
          description: Order pickup type
          enum:
            - PRIMARY
            - ALTERNATE
          example: PRIMARY
          type: string
      type: object
    address:
      description: Address details
      properties:
        addressLine1:
          description: Address line 1
          example: 123 Main St.
          type: string
        addressLine2:
          description: Address line 2
          example: Suite 100
          type: string
        addressLine3:
          description: Address line 3
          example: Seventh floor
          type: string
        addressLine4:
          description: Address line 4
          example: 'Attention: Pat E. Kake'
          type: string
        city:
          description: City name
          example: Seattle
          type: string
        countryCode:
          description: ISO 3166-1 alpha-2 based country code
          example: US
          type: string
        email:
          description: Contact person's email
          example: test@example.com
          type: string
        latitude:
          description: >-
            Address latitude, used with `longitude` to specify the address
            location. Decimal degrees format; negative is degrees South.
            **Note:**Value must be between -90 and 90, both inclusive.
          example: 47.6205
          format: double
          type: number
        longitude:
          description: >-
            Address longitude, used with `latitude` to specify the address
            location. Decimal degrees format; negative is degrees South.
            **Note:**Value must be between -180 and 180, both inclusive.
          example: -122.3493
          format: double
          type: number
        name:
          $ref: '#/components/schemas/orderContactName'
        phone:
          $ref: '#/components/schemas/orderContactPhone'
        postalCode:
          description: Postal or ZIP code
          example: '98121'
          type: string
        region:
          description: Region or state
          example: WA
          type: string
        type:
          description: Address type
          example: Home
          type: string
      required:
        - addressLine1
        - city
        - countryCode
        - latitude
        - longitude
        - postalCode
        - region
        - type
      type: object
    orderPaymentToken:
      description: Order payment token details
      properties:
        paymentType:
          description: >-
            Payment type, for example, credit card payment providers can be
            Visa, Mastercard, American express, etc.
          example: VISA
          type: string
        token:
          description: Payment token provided by payment provider
          example: pi_34tr6787rt
          type: string
      type: object
    orderAuditLogUpdatedField:
      description: Audit log for change history
      properties:
        fieldName:
          description: Field or property name that was updated
          example: UOM
          type: string
        fieldOriginalValue:
          description: Original value of `fieldName` before it was updated
          example: PK
          type: string
      type: object
    orderNote:
      description: An order note added by a CSR.
      properties:
        createdAt:
          description: The time the note was created in UTC format.
          example: '2022-05-12T09:30:31.198Z'
          type: string
        notes:
          description: Optional additional info about the order.
          example: Fragile - handle with care
          type: string
        user:
          description: >-
            The Customer Service Representative or Employee (ID or name) who
            created the note.
          example: 62272e917b12209e68751d94
          type: string
      type: object
    orderContactName:
      description: Contact person's name
      properties:
        firstName:
          description: Contact person's first name
          example: Alex
          type: string
        lastName:
          description: Contact person's last name
          example: Doe
          type: string
        middleName:
          description: Contact person's middle name or initial
          example: E
          type: string
      type: object
    orderContactPhone:
      description: Contact person's phone details
      properties:
        number:
          description: Contact person's phone number
          example: 123-456-7890
          type: string
        type:
          description: Contact number type
          enum:
            - MOBILE
            - HOME
            - BUSINESS
          example: MOBILE
          type: string
      type: object
  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

````