@@ -30,14 +30,28 @@ The `createCardsList()` method retrieves a list of your product cards from Wildb
3030- ** Cursor-based pagination** for fetching large datasets
3131- ** Advanced filtering** by photos, text search, brands, categories, tags
3232- ** Sorting** by update date
33- - ** Efficient batching** (up to 1000 cards per request, 100 recommended )
33+ - ** Efficient batching** (maximum ** 100 cards per request** )
3434
3535** API Endpoint:** ` POST /content/v2/get/cards/list `
3636
3737** Rate Limit:** 100 requests/minute with 600ms intervals (burst: 5 requests)
3838
3939** ⚠️ Important:** Cards in trash are NOT returned by this method. Use ` getCardsTrash() ` to fetch trashed cards separately.
4040
41+ ### 🚨 CRITICAL: Pagination Limit Restrictions
42+
43+ ** MAXIMUM: 100 cards per request** - the API will reject larger values with ` ValidationError (HTTP 400) ` .
44+
45+ ** Verified through testing (December 2024):**
46+ - ✅ ** ` limit: 10 ` ** - Works perfectly
47+ - ✅ ** ` limit: 100 ` ** - ** RECOMMENDED & MAXIMUM** - Official Wildberries recommendation
48+ - ❌ ** ` limit: 1000 ` ** - ** FAILS with ValidationError (HTTP 400)**
49+ - ❌ ** ` limit: 5000 ` ** - ** FAILS with ValidationError (HTTP 400)**
50+
51+ ** Why this matters:** Although undocumented in Wildberries API specification, the API enforces a strict limit of ** 100 cards maximum** . Any value exceeding 100 will result in request rejection.
52+
53+ ** Correct approach:** Always use ` limit: 100 ` with proper pagination (see examples below).
54+
4155---
4256
4357## Basic Usage
@@ -89,7 +103,7 @@ console.log(`Total in account: ${response.cursor?.total ?? 0} cards`);
89103 imtID ?: number ; // Filter by merged card ID
90104 };
91105 cursor : {
92- limit : number ; // Cards per request (max 1000, recommended 100)
106+ limit : number ; // Cards per request (MAXIMUM: 100)
93107 updatedAt ?: string ; // For pagination (ISO 8601 timestamp)
94108 nmID ?: number ; // For pagination (Wildberries article ID)
95109 };
@@ -435,27 +449,40 @@ const response = await sdk.products.createCardsList({
435449});
436450```
437451
438- ### ❌ Mistake 3: Exceeding Limit Maximum
452+ ### ❌ Mistake 3: Exceeding Limit Maximum (CRITICAL)
439453
440454``` typescript
441- // ❌ WRONG - Limit too high
455+ // ❌ WRONG - Limit exceeds maximum, causes ValidationError (HTTP 400)
442456const response = await sdk .products .createCardsList ({
443457 settings: {
444- cursor: { limit: 5000 } // Max is 1000
458+ cursor: { limit: 1000 } // ❌ FAILS - Maximum is 100!
459+ }
460+ });
461+
462+ // ❌ ALSO WRONG - Even higher values fail
463+ const response = await sdk .products .createCardsList ({
464+ settings: {
465+ cursor: { limit: 5000 } // ❌ FAILS - Maximum is 100!
445466 }
446467});
447468```
448469
449- ** ✅ Solution:** Use maximum 1000, recommended 100:
470+ ** ✅ Solution:** ALWAYS use limit: 100 (maximum allowed) :
450471
451472``` typescript
452473const response = await sdk .products .createCardsList ({
453474 settings: {
454- cursor: { limit: 100 } // ✅ Recommended
475+ cursor: { limit: 100 } // ✅ MAXIMUM & RECOMMENDED
455476 }
456477});
457478```
458479
480+ ** Error you'll see if exceeded:**
481+ ```
482+ ValidationError: Validation failed
483+ HTTP Status: 400
484+ ```
485+
459486### ❌ Mistake 4: Not Handling Pagination
460487
461488``` typescript
@@ -503,15 +530,18 @@ const response = await sdk.products.createCardsList({
503530 cursor : { limit : 100 }
504531 ```
505532
506- 2 . ** Limit exceeds maximum**
533+ 2 . ** Limit exceeds maximum (MOST COMMON) **
507534 ``` typescript
508- // ❌ Problem
509- cursor : { limit : 5000 }
535+ // ❌ Problem - API returns ValidationError (HTTP 400)
536+ cursor : { limit : 1000 } // ❌ Exceeds maximum!
537+ cursor : { limit : 5000 } // ❌ Exceeds maximum!
510538
511- // ✅ Solution
512- cursor : { limit : 100 } // Max 1000, recommended 100
539+ // ✅ Solution - Use maximum allowed value
540+ cursor : { limit : 100 } // ✅ MAXIMUM: 100 cards
513541 ```
514542
543+ ** Note:** This is the #1 cause of ValidationError. The API strictly enforces a 100-card limit despite incomplete documentation.
544+
5155453 . ** Missing settings wrapper**
516546 ``` typescript
517547 // ❌ Problem
@@ -589,19 +619,21 @@ if (!response.cursor?.updatedAt) {
589619
590620## Best Practices
591621
592- ### 1. Use Recommended Batch Size
622+ ### 1. ALWAYS Use Maximum Allowed Batch Size
593623
594624``` typescript
595- // ✅ GOOD - Reasonable batch size
625+ // ✅ CORRECT - Maximum allowed by API
596626cursor : { limit : 100 }
597627
598- // ⚠️ ACCEPTABLE - Larger batch for faster fetching
628+ // ❌ FAILS - Exceeds maximum, causes ValidationError (HTTP 400)
599629cursor : { limit : 500 }
600630
601- // ❌ AVOID - Too large, may cause timeouts
631+ // ❌ FAILS - Exceeds maximum, causes ValidationError (HTTP 400)
602632cursor : { limit : 1000 }
603633```
604634
635+ ** Why 100?** The Wildberries API strictly enforces a maximum of 100 cards per request. Use pagination to fetch all cards.
636+
605637### 2. Implement Rate Limit Protection
606638
607639``` typescript
0 commit comments