---
title: "Scans a barcode into a transfer (the scan dialog): one more unit picked on the matching line."
method: POST
path: "/api/v1/transfers/{id}/scan"
tags: ["Transfers"]
---

# Scans a barcode into a transfer (the scan dialog): one more unit picked on the matching line.

`POST /api/v1/transfers/{id}/scan`

## Request

- Base URL: `https://app.flexonthejob.com`
- URL: `https://app.flexonthejob.com/api/v1/transfers/{id}/scan`
- Auth: HTTP bearer

Requires `ManageTransfers` and an `Idempotency-Key` header (use a new key per scan —
a replayed key does not scan again). Body: `{ "barcode": "0012345678905", "locationId": 1 }`.
The barcode may be a unit's barcode or an item template's; the first line of that item (at
`locationId` when given) that is not fully picked gets one more picked unit. Same state
rule as `…/lines/{lineId}/pick`.

## Path parameters

- `id` integer, required

## Request body

- ScanTransferBarcodeRequest: Body of `POST /api/v1/transfers/{id}/scan`: one scanned barcode = one more unit picked. Example: `{ "barcode": "0012345678905", "locationId": 1 }`.
  - `barcode` string, required: The scanned value, 1–200 characters: an item (unit) barcode or an item template barcode. Example: `0012345678905`.
  - `locationId` integer, nullable: Optional: only lines whose units are at this location id (lines are grouped by the units' location, as in the app's scan dialog). Omit to match any line. Example: `1`.

## Response `200`

Transfer id and the matched line's progress (e.g. `Scanned Copper 12/2: line 1207 has 2 of 3 picked.`).

- ApiOperationResponse: Body of a successful workflow-style write that has no richer resource to return (assign, start, complete, void…). Id is the affected resource's id; Warning carries a non-fatal note from the service (e.g. an email that could not be sent).
  - `id` integer: Id of the resource the operation acted on (e.g. the job id).
  - `message` string, nullable: Human-readable confirmation from the service (e.g. "Job started."). May be null.
  - `warning` string, nullable: Non-fatal problem encountered while completing the operation (e.g. a notification email that could not be sent). Null when there was none.

## Other responses

- `400`: Malformed body or missing `Idempotency-Key`.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: No such transfer in this organization.
- `409`: The item is not on the transfer (at that location) or its line is fully picked, not `Pending`, awaiting approval, a job-site or sales-order transfer, or the key's creator is unknown on this server.
- `422`: No item or item template has the barcode (`barcode` in `errors`).
- `429`: Too Many Requests
- `500`: The change could not be saved. Retry with a new `Idempotency-Key`.

---

[API](https://skmtc.dev/flexonthejob/apis/flex-api.md) · [All operations](https://skmtc.dev/flexonthejob/apis/flex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flexonthejob/apis/flex-api/revisions/19c8f4d27acf?raw)
