rebalanceSuggestions
query · in the family 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. The continued walk: the desk walks the destination's positions page by page under the time one request allows. A cut walk answers partial with a nextToken; pass it back with the same arguments to continue. The page budget: a page's findings stop at half the tool-result cap, so a page always fits an assistant whole. limit (1 to 500) caps a page's findings by count. Outside that range it refuses VALIDATION/INVALID naming the bound. Requires authentication.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Reading your records — Looking up and listing the records of your organization.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:rebalanceSuggestions
What happens
Reads only — acting on one creates real transfers.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
destinationLogicalFacilityId | ID ID! | yes | |
variantIds | ID [ID!] | no | |
nextToken | String | no | The cursor from the previous page, passed back exactly as received. |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
Returns
RebalanceSuggestionsResult RebalanceSuggestionsResult! — The rebalanceSuggestions result — one TR-shaped payload per donor.
Example request
query ExampleRebalanceSuggestions($destinationLogicalFacilityId: ID!, $variantIds: [ID!]) {
rebalanceSuggestions(destinationLogicalFacilityId: $destinationLogicalFacilityId, variantIds: $variantIds) {
examined
inScope
partial
nextToken
}
}Variables:
{
"destinationLogicalFacilityId": "01900000-0000-7000-8000-c9ff9bd30000",
"variantIds": [
"01900000-0000-7000-8000-8433b0260000"
]
}Example response
{
"data": {
"rebalanceSuggestions": {
"examined": 1,
"inScope": 1,
"partial": true,
"nextToken": "<the cursor from the previous page>"
}
},
"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. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)