You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/PRODUCTS-API.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -356,7 +356,7 @@ Soft deletes a product by setting `deletedAt` timestamp. The product is also arc
356
356
POST /api/products/import
357
357
```
358
358
359
-
Bulk imports products from a CSV file.
359
+
Bulk imports products from a CSV file using [papaparse](https://www.papaparse.com/) for robust CSV parsing that handles edge cases like multiline quoted fields, different line endings, and escaped characters.
360
360
361
361
#### Request
362
362
@@ -365,7 +365,7 @@ Bulk imports products from a CSV file.
365
365
| Field | Type | Required | Description |
366
366
|-------|------|----------|-------------|
367
367
|`file`| File | Yes | CSV file (max 10MB) |
368
-
|`storeId`| string | Yes | Store ID |
368
+
|`storeId`| string | Yes | Store ID (verified against user's organization membership) |
"Product with ""quotes""",SKU003,19.99,"Description with, comma",clxcat789,25,DRAFT
390
391
```
391
392
393
+
> **Note:** The CSV parser handles quoted fields, escaped quotes (doubled `""`), and commas within quotes correctly.
394
+
392
395
#### Response
393
396
394
397
```json
@@ -599,6 +602,13 @@ Variant options are stored as JSON:
599
602
600
603
## Changelog
601
604
605
+
### v1.1.0 (Code Review Improvements)
606
+
-**CSV Import**: Replaced custom CSV parser with [papaparse](https://www.papaparse.com/) library for robust handling of edge cases (multiline quoted fields, different line endings, escaped characters)
607
+
-**Type Safety**: Improved Zod error handling using proper `ZodIssue` type
608
+
-**Store ID Validation**: Enhanced CUID format validation for store IDs with support for both CUID and CUID2 formats
609
+
-**Documentation**: Added transaction guarantee documentation for variant/attribute updates
610
+
-**Migration**: Added documentation for Product_sku_idx index removal (replaced by multi-tenant composite unique constraint)
0 commit comments