{"openapi":"3.1.0","info":{"title":"POST /api/v1/inventory/counts/{count_id}/lines","version":"1.0.0","description":"Add or scan a line"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/inventory/counts/{count_id}/lines":{"post":{"tags":["inventory:counts"],"summary":"Add or scan a line","description":"Add a line by `variant_id`, `barcode`, or `sku`. Re-scans of the same variant update the existing line.","operationId":"add_count_line_api_v1_inventory_counts__count_id__lines_post","parameters":[{"name":"count_id","in":"path","required":true,"schema":{"type":"string","title":"Count Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCountLineRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"detail":"Invalid request parameters"}}}},"401":{"description":"Unauthorized - Authentication required","content":{"application/json":{"example":{"detail":"Not authenticated"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"detail":"Not enough permissions"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"detail":"Resource not found"}}}},"409":{"description":"Conflict - Resource already exists","content":{"application/json":{"example":{"detail":"Resource already exists"}}}},"422":{"description":"Validation Error - Invalid data format","content":{"application/json":{"example":{"detail":[{"loc":["body","field"],"msg":"field required","type":"value_error.missing"}]}}}}}}}},"components":{"schemas":{"AddCountLineRequest":{"properties":{"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variant Id","description":"Variant UUID."},"barcode":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Barcode"},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Sku"},"counted_quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Counted Quantity","description":"Optional initial count. If omitted, the line is added with expected_quantity only and the user records the count later."},"reason":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}},"type":"object","title":"AddCountLineRequest","description":"Add a line by variant id, barcode, or SKU."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}