---
title: "Picks one unit by barcode (the Fulfill page's scanner)."
method: POST
path: "/api/v1/sales-orders/{id}/scan"
tags: ["SalesOrders"]
---

# Picks one unit by barcode (the Fulfill page's scanner).

`POST /api/v1/sales-orders/{id}/scan`

## Request

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

Requires `ManageSalesOrders` and an `Idempotency-Key` header. Body:
`{ "barcode": "0012345678905" }`. A stock unit's barcode picks the line pinned to that
unit; otherwise a catalog item's barcode picks the order's line for that item. The line's
`quantityPicked` rises by 1 — a line-level count only, no stock or transfer changes.

## Path parameters

- `id` integer, required

## Request body

- ScanSalesOrderBarcodeApiRequest: Body of `POST /api/v1/sales-orders/{id}/scan`. Example: `{ "barcode": "0012345678905" }`.
  - `barcode` string, required: The scanned value: a stock unit's barcode or a catalog item's barcode, 1–200 characters. Example: `0012345678905`.

## Response `200`

Picked; the matched line's quantities and name.

- SalesOrderLinePickResponse: Response of the line-level pick endpoints (`/scan`, `/lines/{lineId}/pick`, `/lines/pick-all`, `/lines/{lineId}/picked-quantity`).
  - `salesOrderId` integer: The sales order's id. Example: `318`.
  - `lineId` integer, nullable: The line picked; null for `/lines/pick-all`. Example: `1502`.
  - `itemName` string, nullable: The picked item's name; null for `/lines/pick-all`. Example: `Copper 12/2 Romex`.
  - `quantityPicked` number, double: The line's picked quantity after the call (0 for `/lines/pick-all`). Example: `3`.
  - `quantityOrdered` number, double: The line's ordered quantity (0 for `/lines/pick-all`). Example: `10`.
  - `orderComplete` boolean: `/scan`, `/lines/{lineId}/pick`, `/lines/pick-all`: every line of the order is now picked in full. Always `false` for `picked-quantity`. Example: `false`.
  - `linesUpdated` integer: `/lines/pick-all`: lines raised to their ordered quantity (0 = all were already picked). Example: `2`.
  - `unitsAdded` number, double: `/lines/pick-all`: units added across those lines. Example: `7`.
  - `status` string: The order's status after the call (line picks never change it). Example: `Picking`.
  - `message` string, nullable: Human-readable confirmation, as the app shows it; null for a single scan / pick. Example: `Picking progress saved`.

## Other responses

- `400`: Missing `Idempotency-Key` or `barcode`.
- `401`: Unauthorized
- `403`: Forbidden
- `404`: No such sales order in this organization.
- `409`: The item is not on the order (detail: `Item '…' is not part of this sales order`), its line is already fully picked, the order is `Complete` or `Cancelled` (`… picking is closed.`), or the key's creator is unknown.
- `422`: No stock unit or catalog item has this barcode (`errors.barcode`).
- `429`: Too Many Requests

---

[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)
