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

# Update return inventory handling

Updates the handling decision on a single return inventory record — i.e. tells the warehouse what to do with a parcel they've received. The most common write call after the warehouse has logged a return; from this point the inventory follows the chosen handling path (restock, dispose, recall, resend, etc.).

## When to call

* After your CS or operations team has decided on the handling.

## Required fields

* **`returnInventoryId`** — long; must exist and belong to your account. Received from the `newInventoryCreated` webhook event when a parcel is logged at the warehouse; cache it on your side so you can act on it later. The webhook stream is the source of truth for inventory IDs.
* **`handlingCode`** — string, must be one of the codes returned by [Get all handling types](/api-reference/handling/get-all-handling-types). **Cannot** be `rsd` (resend) or `tbc` (to-be-confirmed) directly — those flow through dedicated endpoints. Common values: `ohd` (on-hold), `rtn` (return), `rst` (restock), `dsp` (dispose).

One explicit exception: if the current `handlingStatusCode` is `pending` and the new handling is `ohd` (on-hold), the call is always allowed — useful for putting an inventory on hold while you investigate.

You **cannot** update handling if:

* The inventory has any pending VAS (value-added service) requests on its line item. Cancel or complete the VAS first via [Get all VAS](/api-reference/vas/get-all-value-added-services) and the VAS endpoints.

## Side effects

* `handlingCode` and `handlingStatusCode` on the inventory record are updated.
* If the new handling is **not** `ohd` or `oth` (others), the RMA mapping is locked to prevent RMA swap operations on this inventory.

## Related

* [Cancel return inventory handling](/api-reference/returninventory/cancel-return-inventory-handling) — undo a handling decision before the warehouse acts on it.
* [Create recall by return inventory IDs](/api-reference/recall/create-recall-by-return-inventory-ids) — to flow a recalled inventory through the dedicated recall pipeline rather than handling.
* [Create resend order](/api-reference/resend/create-resend-order) — for the resend pathway (which also can't be reached via this endpoint directly).
* [Webhooks](/webhooks) — `newInventoryCreated`, `vasUpdated`, the inventory-handling-complete event, and `notifyUserRmaSwapped` deliver inventory lifecycle to your endpoint.


## OpenAPI

````yaml post /api/ReturnInventory/UpdateReturnInventoryHandling
openapi: 3.1.0
info:
  title: Return Helper API
  description: API documentation for Return Helper — covering User and Public endpoints.
  version: 1.0.0
servers:
  - url: https://api.returnshelper.com/uat/user
    description: Sandbox — User API
  - url: https://api.returnshelper.com/uat/public
    description: Sandbox — Public API
  - url: https://api.returnhelpercentre.com/v1/user
    description: Production — User API
  - url: https://api.returnhelpercentre.com/v1/public
    description: Production — Public API
  - url: https://api.returnhelperchina.com/user
    description: Production — User API (China)
security:
  - ApiKey: []
    ApiToken: []
paths:
  /api/ReturnInventory/UpdateReturnInventoryHandling:
    post:
      tags:
        - ReturnInventory
      summary: Update return inventory handling
      operationId: ReturnUserApi_UpdateReturnInventoryHandling
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReturnInventoryHandlingRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
        '401':
          description: >-
            Authentication failed. Returned when the `x-rr-apikey` or
            `x-rr-apitoken` header is missing or invalid. The body uses the
            standard `ApiResponse` envelope with `meta.error.message` describing
            the auth failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
      security:
        - ApiKey: []
          ApiToken: []
      servers:
        - url: https://api.returnshelper.com/uat/user
          description: Sandbox — User API
components:
  schemas:
    UpdateReturnInventoryHandlingRequest:
      type: object
      properties:
        returnInventoryId:
          type: integer
          format: int64
          description: Return inventory ID to update handling for
        handlingCode:
          type: string
          description: Handling code to apply
      required:
        - returnInventoryId
        - handlingCode
    ApiResponse:
      type: object
      description: >-
        Universal response envelope. Successful responses include the business
        payload as additional top-level fields alongside `correlationId` and
        `meta`. Failed responses (auth errors, validation errors) only populate
        `correlationId` and `meta`, with `meta.errorCode` and `meta.error`
        describing the failure.
      properties:
        correlationId:
          type:
            - string
            - 'null'
          description: >-
            Unique correlation ID for tracing the request through Return Helper
            systems.
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
    ApiResponseMeta:
      type: object
      description: >-
        Application-level metadata for every API response. Inspect `status` and
        `errorCode` to detect soft-error responses (validation failures arrive
        as HTTP 200 with `meta.status: 400`).
      properties:
        status:
          type: integer
          description: >-
            Application-level status code. For successful operations this
            mirrors the HTTP status (e.g. 200). For validation failures it
            reports the logical status (e.g. 400) even though the wire HTTP
            status is 200.
        data:
          type: object
          additionalProperties:
            type: string
          description: Reserved free-form metadata key/value pairs. Usually empty.
        errorCode:
          type:
            - string
            - 'null'
          description: >-
            Machine-readable error code (e.g. `VALIDATION_FAILED`). Non-null
            only when the operation failed.
        error:
          type: object
          additionalProperties: true
          description: >-
            Field-level or message-level error detail keyed by request property
            name. Empty object on success.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
      description: Your API key
    ApiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken
      description: Your API token — keep this private

````