# allocationSuggestions

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

## What it does

Suggestions for pushing genuine excess stock from a hub out to your stores, shared fairly by each store’s weight.

THE PUSH SUGGESTER: the hub's genuine excess fair-shared across OTHER LFs holding the variant by their resolved allocationWeight (largest remainder, deterministic); destinations with no resolved weight land in gaps as no-weights; never-lanes out of the hub drop their destination. Transfer-SHAPED payloads (push semantics — the.1 doc; lines name the SOURCE InventoryItem). DERIVED at read. Requires authentication.

## What happens

Reads your stock and answers ready-to-use transfer drafts — nothing moves until you create the transfers.

## Careful

None to run — a read. Acting on a suggestion creates real transfers, which reserve stock.

## 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:allocationSuggestions`

## Arguments

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

## Returns

[AllocationSuggestionsResult](/types/AllocationSuggestionsResult/) `AllocationSuggestionsResult!` — The allocationSuggestions result.

## Example request

```graphql
query ExampleAllocationSuggestions($sourceLogicalFacilityId: ID!, $variantIds: [ID!]) {
  allocationSuggestions(sourceLogicalFacilityId: $sourceLogicalFacilityId, variantIds: $variantIds) {
    transfers {
      sourceLogicalFacilityId
      destinationLogicalFacilityId
      annotations
    }
  }
}
```

Variables:

```json
{
  "sourceLogicalFacilityId": "01900000-0000-7000-8000-4971feb30000",
  "variantIds": [
    "01900000-0000-7000-8000-367b16580000"
  ]
}
```

## Example response

```json
{
  "data": {
    "allocationSuggestions": {
      "transfers": [
        {
          "sourceLogicalFacilityId": "01900000-0000-7000-8000-4971feb30000",
          "destinationLogicalFacilityId": "01900000-0000-7000-8000-3885245e0000",
          "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/))
