Resolve Scan
POST/api/return-receipts/scan-resolve
Resolve a scanned token for the Receive Returns Station. Resolution order: open RMA by number → open RMA by tracking number → sales order by number → product by SKU/barcode. Returns the match type plus staged lines whose dispositions are defaulted by the active return disposition policies (the matching policy id is included so the UI can show a 'policy applied' badge). Closed/canceled RMAs are excluded and fall through to 'none'.
returns:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token.
Fields:
- token (required): The raw scanned value (RMA #, tracking #, order #, SKU, or barcode)
- warehouse_id (required): Warehouse the operator is receiving into (used for warehouse-scoped policy matching)
When the token matches an RMA or a sales order, the response includes sales_order_notes — the notes on the sales order being returned (pinned notes first, then newest first), each with id, note, user_name, created_at, and is_pinned. An RMA match also includes the linked sales_order_id, sales_order_number, and the RMA's own free-text notes.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.