> For the complete documentation index, see [llms.txt](https://docs.claret.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.claret.app/api-reference/workflow-sync/tenant-public-workflows-import-inventory.md).

# Tenant.public.workflows.import Inventory

```json
{"openapi":"3.1.0","info":{"title":"Claret","version":"1.0.0"},"tags":[{"name":"Workflow Sync","description":"Push inventory and sales data through the import pipeline (JSON or CSV)."}],"servers":[{"url":"https://plan.claret.app/{tenant}/api/v1","description":"Production","variables":{"tenant":{"default":"your-tenant","description":"Your Claret tenant identifier (the slug in your Claret URL)."}}}],"security":[{"http":[]}],"components":{"securitySchemes":{"http":{"type":"http","scheme":"bearer"}},"schemas":{"ImportInventoryCsvRequest":{"type":"object","properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","maxLength":10240},"mode":{"type":"string","enum":["upsert","replace"]},"headers_match_exactly":{"type":"boolean"},"dry_run":{"type":"boolean"},"scope":{"type":"object","properties":{"location":{"type":"string","maxLength":255},"item":{"type":"string","maxLength":255}}},"options":{"type":"object","properties":{"allow_record_creation":{"type":"boolean"},"allow_record_update":{"type":"boolean"},"continue_on_error":{"type":"boolean"}}},"field_mappings":{"type":"array","items":{"type":"string","enum":["item_name","bin_name","lot_name","date_filled","quantity","uom"]}}},"required":["file"],"title":"ImportInventoryCsvRequest"}},"responses":{"AuthenticationException":{"description":"Unauthenticated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}},"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}}}},"paths":{"/workflows/sync-inventory/import":{"post":{"operationId":"tenant.public.workflows.import_inventory","tags":["Workflow Sync"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImportInventoryCsvRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"type":"string"},{"type":"object","properties":{"message":{"type":"string","const":"Dry run completed. No changes were made."},"data":{"type":"array","prefixItems":[{"type":"object","properties":{"dry_run":{"type":"boolean"},"mode":{"anyOf":[{"type":"string"},{"type":"string","enum":["upsert"]}]},"validation_passed":{"type":"boolean"},"records_submitted":{"type":"integer"},"estimated_credit_cost":{"type":"integer"},"scope":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false}]},"current_records_in_scope":{"type":"integer"}},"required":["dry_run","mode","validation_passed","records_submitted","estimated_credit_cost","scope","current_records_in_scope"]}],"minItems":1,"maxItems":1,"additionalItems":false},"meta":{"anyOf":[{"type":"array","items":{}},{"type":"string"}]},"links":{"type":"string"}},"required":["message","data","meta","links"]}]}}}},"202":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"array","prefixItems":[{"type":"object","properties":{"job_id":{"type":["string","null"]},"status":{"type":"string","const":"queued"},"mode":{"anyOf":[{"type":"string"},{"type":"string","enum":["upsert"]}]},"records_submitted":{"type":"integer"},"scope":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false}]}},"required":["job_id","status","mode","records_submitted","scope"]}],"minItems":1,"maxItems":1,"additionalItems":false},"meta":{"anyOf":[{"type":"array","items":{}},{"type":"string"}]},"links":{"anyOf":[{"type":"object","properties":{"job_status":{"type":"string"}},"required":["job_status"]},{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false},{"type":"string"}]}},"required":["message","data","meta","links"]},{"type":["object","null"]}]}}}},"401":{"$ref":"#/components/responses/AuthenticationException"},"403":{"description":"","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","const":"https://docs.claret.app/errors/forbidden"},"title":{"type":"string","const":"Forbidden"},"status":{"type":"integer","const":403},"detail":{"type":"string","const":"Token lacks the 'public_api.workflow.replace' ability required for replace mode."},"request_id":{"type":"string"},"errors":{"type":"string"}},"required":["type","title","status","detail","request_id","errors"]}}}},"409":{"description":"","content":{"application/problem+json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"https://docs.claret.app/errors/import-in-progress"},"title":{"type":"string","const":"Import Already In Progress"},"status":{"type":"integer","const":409},"detail":{"type":"string"},"request_id":{"type":"string"},"errors":{"anyOf":[{"type":"array","prefixItems":[{"type":"object","properties":{"existing_job_id":{"type":["integer","null"]}},"required":["existing_job_id"]}],"minItems":1,"maxItems":1,"additionalItems":false},{"type":"array","items":{"type":"string"},"minItems":0,"maxItems":0,"additionalItems":false}]}},"required":["type","title","status","detail","request_id","errors"]},{"type":"object","properties":{"type":{"type":"string","const":"https://docs.claret.app/errors/duplicate-request"},"title":{"type":"string","const":"Duplicate Request"},"status":{"type":"integer","const":409},"detail":{"type":"string","const":"A request with this Idempotency-Key is already being processed."},"request_id":{"type":"string"},"errors":{"type":"string"}},"required":["type","title","status","detail","request_id","errors"]}]}}}},"422":{"$ref":"#/components/responses/ValidationException"},"500":{"description":"","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","const":"https://httpstatuses.com/500"},"title":{"type":"string","const":"Internal Server Error"},"status":{"type":"integer","const":500},"detail":{"type":"string"},"request_id":{"type":"string"},"errors":{"type":"string"}},"required":["type","title","status","detail","request_id","errors"]}}}}}}}}}
```
