{ "meta": { "name": "Bulk Add Books to Collections", "type": "http", "event": [ { "listen": "test", "script": { "exec": [ "// Test bulk add to collections response", "if (response.status === 200) {", " tests['Bulk add successful'] = true;", " const body = JSON.parse(response.body);", " tests['Has results array'] = Array.isArray(body.results);", " tests('All operations processed', body.results.length > 0);", "} else {", " tests['Bulk add failed'] = false;", "}" ] } } ] }, "req": { "url": "{{baseUrl}}/api/collections/bulk-add-books", "method": "POST", "headers": { "Content-Type": "application/json", "Authorization": "Bearer {{authToken}}" }, "body": { "operations": [ { "collection_id": "{{collectionId1}}", "book_ids": [ "{{bookId1}}", "{{bookId2}}" ] }, { "collection_id": "{{collectionId2}}", "book_ids": [ "{{bookId3}}" ] } ] } } }