{"message":"Welcome to Combined Track & Trace API","version":"2.7.0","features":{"authentication":"Enhanced with feature-based access control","roleManagement":"Role-feature mapping system","featureAccess":"Tab-based permission system","tabVisibility":"Dynamic tab visibility based on user roles","productManagement":"Product page routes integrated","bulkUpload":"Bulk product upload via CSV/Excel","batchTracking":"Batch page routes integrated","mobileDashboard":"Mobile dashboard routes integrated","stockManagement":"Stock near expiry routes integrated","uniqueCodeGeneration":"Plant-based unique code generation system","scheduledStatusChanges":"Automated status change scheduling","aggregation":"Primary-Secondary product linking system","offlineSync":"Delta sync status API for offline operator app","templateProductionSync":"Template master and production plan sync from operator interface","qrScanVerification":"QR code genuinity verification and farmer scan data capture","researchSeedReceipt":"Research/MCRC seed receipt capture at Plant","primaryCodeMaster":"Primary bag QR/barcode capture at packing","preSowing":"Pre-sowing: form type, grower, blocks with boundaries and scanned primary codes; add/remove blocks","postSowing":"Post-sowing: form type, actual sowing date, seed and lot blocks against a pre-sowing","postHarvest":"ON HOLD — being redesigned for the new sowing flow"},"endpoints":{"uniqueCodes":{"generate":"POST /api/unique-codes/generate","list":"GET /api/unique-codes","getById":"GET /api/unique-codes/:id","lots":"GET /api/unique-codes/lots","stats":"GET /api/unique-codes/stats"},"bulkUpload":{"downloadCsvTemplate":"GET /api/bulk-upload/template/csv?type=basic|advanced","downloadExcelTemplate":"GET /api/bulk-upload/template/excel?type=basic|advanced","validateFile":"POST /api/bulk-upload/validate (multipart/form-data)","importProducts":"POST /api/bulk-upload/import/:uploadId","downloadErrors":"GET /api/bulk-upload/errors/:uploadId","hierarchyOptions":"GET /api/bulk-upload/hierarchy-options","cancelUpload":"DELETE /api/bulk-upload/cancel/:uploadId"},"aggregation":{"validatePrimary":"GET  /api/aggregation/validate-primary/:uid?operationType=aggregate|reaggregate","aggregate":"POST /api/aggregation/aggregate","validate":"POST /api/aggregation/validate","userHistory":"GET  /api/aggregation/history/:userId","deAggregate":"POST /api/aggregation/de-aggregate","skuReplace":"POST /api/aggregation/sku-replace"},"researchSeedReceipts":{"create":"POST /api/research-seed-receipts (multipart/form-data)","getById":"GET  /api/research-seed-receipts/:id","list":"GET  /api/research-seed-receipts","getByLot":"GET  /api/research-seed-receipts/lot/:lot_number"},"primaryCodes":{"create":"POST /api/primary-codes","checkDuplicate":"GET  /api/primary-codes/check?uid_code=&serial_number=","getByUid":"GET  /api/primary-codes/uid/:uid_code","list":"GET  /api/primary-codes"},"preSowing":{"create":"POST  /api/pre-sowing","editBlocks":"PATCH /api/pre-sowing/:form_no/blocks   (add / remove blocks)","history":"GET   /api/pre-sowing/history?search=&userId=&from_date=&to_date=&page=&limit=","pendingPostSowing":"GET   /api/pre-sowing/pending-post-sowing?search=&userId=&page=&limit=","getByFormNo":"GET   /api/pre-sowing/:form_no   (PRE-… or POS-…)"},"postSowing":{"create":"POST  /api/post-sowing","edit":"PATCH /api/post-sowing/:form_no   (until a pre plough-down exists)","history":"GET   /api/post-sowing/history?search=&userId=&from_date=&to_date=&page=&limit=","getByFormNo":"GET   /api/pre-sowing/:form_no   (use the POS-… or PRE-… number)"},"ploughDown":{"eligible":"GET   /api/plough-down/eligible?search=&location_code=&page=&limit=","getByFormNo":"GET   /api/plough-down/:form_no   (POS-…, PLD-… or PPD-…)","uploadImages":"POST  /api/plough-down/:form_no/images   (multipart: images[1-5], stage, sowing_block_id, location_code, userId, images_meta)"},"prePloughDown":{"create":"POST  /api/pre-plough-down","edit":"PATCH /api/pre-plough-down/:form_no   (PRE comments, until post-PLD)","pendingPost":"GET   /api/pre-plough-down/pending-post?search=&location_code=&page=&limit=","history":"GET   /api/pre-plough-down/history?search=&location_code=&userId=&from_date=&to_date=&page=&limit="},"postPloughDown":{"create":"POST  /api/post-plough-down","edit":"PATCH /api/post-plough-down/:form_no   (add damaged areas, POST comments)","history":"GET   /api/post-plough-down/history?search=&location_code=&userId=&from_date=&to_date=&page=&limit="},"inventoryTransactions":{"create":"POST /api/inventory-transactions","verify":"GET  /api/inventory-transactions/verify/:code?from_code=&to_code=","uidBySerial":"GET  /api/inventory-transactions/uid-by-serial?serial_number=&qr_code_type=primary|secondary","history":"GET  /api/inventory-transactions/history/:userRole/:locationCode","userPending":"GET  /api/inventory-transactions/user-pending/:userRole/:locationCode"},"scan":{"saveUserDetails":"POST /api/scan/save-user-details","productDetails":"GET /api/scan/product-details/:uid"},"plantLineProducts":{"create":"POST   /api/plant-line-products","list":"GET    /api/plant-line-products?plantId=&lineId=&productId=&activeOnly=true","getById":"GET    /api/plant-line-products/:id","update":"PUT    /api/plant-line-products/:id","delete":"DELETE /api/plant-line-products/:id","history":"GET    /api/plant-line-products/:id/history","byPlantLine":"GET    /api/plant-line-products/by-plant-line?plantCode=&lineCode=&updatedAfter=&deviceId=","offlineFeed":"GET    /api/plant-line-products/offline/feed?plantId=&lineId=&updatedAfter=","syncFromOffline":"PATCH  /api/plant-line-products/sync-from-offline"},"offlineSync":{"syncStatus":"GET /offline/sync-status?plantId="},"templateProductionSync":{"syncTemplates":"POST /api/sync/templates","syncProductionPlans":"POST /api/sync/production-plans"},"scheduledChanges":{"manualTrigger":"POST /api/admin/process-scheduled-changes","locationTypes":"GET /api/location-types/scheduled-changes"},"relationshipViolations":{"getAll":"GET /api/relationship-violations?page=1&limit=100&start_date=2024-01-01&end_date=2024-12-31&location_code=DST001","stats":"GET /api/relationship-violations/stats?start_date=2024-01-01&end_date=2024-12-31","validate":"POST /api/relationship-violations/validate {from_code, to_code, transaction_date}","coverage":"GET /api/relationship-violations/mapping-coverage"}}}