# transferLaneRanking

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

## What it does

Which transfer lanes (location pairs) serve a move best, ranked.

The resolved sourcing matrix into ONE destination: every ACTIVE source LF as a row — stored lanes (never/always/ranked) + the sparse geodistance DEFAULT ordering (LF→PF→PFL.geo; a geo-absent side ranks LAST flagged no-geo; same-PFL light out-ranks shipped at equal distance). never entries are SHOWN position-less (excluded from consideration — an INACTIVE lane is ABSENT, not never). DERIVED at read. Requires authentication.

## What happens

Reads only.

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

## Arguments

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

## Returns

[TransferLaneRankingEntry](/types/TransferLaneRankingEntry/) `[TransferLaneRankingEntry!]!` — One resolved matrix row into the destination: ordered position among CONSIDERED sources; never entries are SHOWN position-less (excluded from consideration).

## Example request

```graphql
query ExampleTransferLaneRanking($destinationLogicalFacilityId: ID!) {
  transferLaneRanking(destinationLogicalFacilityId: $destinationLogicalFacilityId) {
    destinationLfId
    sourceLfId
    basis
    rank
    laneId
    weightClass
    distanceKm
    samePfl
    noGeo
    position
  }
}
```

Variables:

```json
{
  "destinationLogicalFacilityId": "01900000-0000-7000-8000-3885245e0000"
}
```

## Example response

```json
{
  "data": {
    "transferLaneRanking": [
      {
        "destinationLfId": "01900000-0000-7000-8000-7bd4ce680000",
        "sourceLfId": "01900000-0000-7000-8000-366bfb930000",
        "basis": "<basis>",
        "rank": 1,
        "laneId": "01900000-0000-7000-8000-15be5b420000",
        "weightClass": "light",
        "distanceKm": 1.5,
        "samePfl": true,
        "noGeo": true,
        "position": 1
      }
    ]
  },
  "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/))

## Used in

- [Ask another location for stock](/use-cases/ask-another-location-for-stock/)
