Inventory

Preview a bulk inventory import

POST
/api/v1/inventory/import/preview

Upload a .xlsx or .csv export. With no mapping, columns are auto-matched to inventory fields by header text (e.g. 'Item Code' -> sku, 'Reorder Level' -> reorder_point); pass one back (edited or not) to re-validate against it before committing. Every row is validated here - nothing is written yet.

Authorization

HTTPBearer
AuthorizationBearer <token>

JWT access token

In: header

Query Parameters

merchant_id?|

Optional merchant to act on. Must be one you are a member of.

Formatuuid

Header Parameters

X-Merchant-ID?string|null

Request Body

multipart/form-data

file*unknown
mapping?string
Default""

Response Body

application/json

application/json

curl -X POST "https://example.com/api/v1/inventory/import/preview" \  -F file="null"
{  "data": {    "columns": [      {        "header": "string",        "inferred_type": "string",        "sample_values": [          "string"        ]      }    ],    "error_rows": 0,    "fields": [      {        "description": "string",        "dtype": "string",        "key": "string",        "label": "string",        "required": true      }    ],    "filename": "string",    "mapping": {      "property1": "string",      "property2": "string"    },    "rows": [      {        "action": "string",        "errors": [          "string"        ],        "row_number": 0,        "sku": "string",        "values": {}      }    ],    "to_create": 0,    "to_update": 0,    "total_rows": 0,    "valid_rows": 0  },  "meta": {},  "success": true}