# rebalanceSuggestions

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

Stock-balancing suggestions between your locations — pull stock to where it sells.

THE PULL SUGGESTER: deficits at the destination filled from donors with GENUINE excess (available − the donor's OWN resolved target − reserveFloor > 0 — exactly at target+reserve is NOT excess; transferableExcess honored) in the lane order (never dropped · always first · ranked · geodistance defaults); TR-SHAPED payloads, one per donor (pull semantics — the TR doc IS the demand doc). DERIVED at read. Requires authentication.

## What happens

Reads only — acting on one creates real transfers.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows `api:rebalanceSuggestions`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `destinationLogicalFacilityId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |
| `variantIds` | [ID](/types/#scalars) `[ID!]` | no | No further notes. |

## Returns

[RebalanceSuggestionsResult](/types/RebalanceSuggestionsResult/) `RebalanceSuggestionsResult!` — The rebalanceSuggestions result — one TR-shaped payload per donor.

## Example request

```graphql
query ExampleRebalanceSuggestions($destinationLogicalFacilityId: ID!, $variantIds: [ID!]) {
  rebalanceSuggestions(destinationLogicalFacilityId: $destinationLogicalFacilityId, variantIds: $variantIds) {
    transferRequests {
      requestingLogicalFacilityId
      targetLogicalFacilityId
      annotations
    }
  }
}
```

Variables:

```json
{
  "destinationLogicalFacilityId": "01900000-0000-7000-8000-3885245e0000",
  "variantIds": [
    "01900000-0000-7000-8000-367b16580000"
  ]
}
```

## Example response

```json
{
  "data": {
    "rebalanceSuggestions": {
      "transferRequests": [
        {
          "requestingLogicalFacilityId": "01900000-0000-7000-8000-9b4a35b10000",
          "targetLogicalFacilityId": "01900000-0000-7000-8000-2938ce830000",
          "annotations": [
            "<annotations>"
          ]
        }
      ]
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))
