{"ok":true,"commandType":"validate-item-package","module":"Stock","mode":"read","summary":"Validate item package without saving.","payloadSchema":{"packageCode":"required Package identity","description":"optional Package description","barCode":"optional Package barcode","unitPrice":"optional Package selling price, distinct from component unitPrice; finite invariant decimal, native precision/validation applies","isActive":"optional Package active flag; false deactivates without deleting","limitedQty":"optional Package limited quantity; numeric value, not a boolean flag; finite invariant decimal, native precision/validation applies","allowDuplicateItemCode":"optional Per-request duplicate permission, not stored as a Master flag; set true for creates/edits introducing duplicate component item codes","lines":"optional Component rows; use lines OR items OR legacy top-level itemCode, never mix forms. Empty arrays are rejected in every mode; omit arrays for header-only update. Create/append/replace need itemCode. update/delete use existing positive lineKey/dtlKey; append/replace reject keys","items":"optional Alias for lines; do not send both","itemCode":"optional Legacy single-component item code; do not mix with lines/items","qty":"optional Component quantity; legacy default 1; finite invariant decimal, native precision/validation applies","uom":"optional Existing component UOM","lineDescription":"optional Component description","lineDescription2":"optional Component second description; conditional SDK/version availability. TSM Detail lacks Desc2 despite the SDK property; unsupported explicit requests fail before save","furtherDescription":"optional Component further description","lineUnitPrice":"optional Component selling price; finite invariant decimal, native precision/validation applies","purchasePrice":"optional Component purchase price; finite invariant decimal, native precision/validation applies","taxCode":"optional Component sales tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS","purchaseTaxCode":"optional Component purchase tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS","validateOnly":"optional True validates without saving; create/update still require write permission","Master":"optional Known native header columns only; parent validates support, conflicting aliases and persistence","fields":"optional Known native header columns only; parent validates support, conflicting aliases and persistence","detailMode":"optional update (default for update commands with lines/items), append, delete, or replace; any detailMode selects edit validation; update/delete target stable lineKey or dtlKey","reason":"optional Business reason; not required for validate-item-package edit previews","lineKey":"optional Stable native detail key from get-item-package; prefer a string to preserve Int64 precision","dtlKey":"optional Stable native detail key from get-item-package; prefer a string to preserve Int64 precision","operation":"optional Default create; operation:update selects header-only edit validation. Any detailMode selects edit validation; reason is optional on validate-item-package"},"examplePayload":{"packageCode":"PKG-API","description":"API Package","unitPrice":120,"isActive":true,"limitedQty":10,"lines":[{"itemCode":"ITEM001","qty":1,"uom":"UNIT","unitPrice":100},{"itemCode":"ITEM002","qty":2,"uom":"UNIT","unitPrice":10}]},"examples":[],"payloadEnums":{},"requiredPayloadFields":["packageCode"],"conditionalPayloadRules":{},"notes":"Static Item Package contract, not native persistence proof. Parent native connector owns strict field validation: Master/fields map known columns with support checks and readback verification; unknown/unsupported fields must be rejected, never silently ignored. Installed SDK support and Save/readback must be verified separately. Omitted lines/items preserve all existing details unless legacy component fields are supplied. Omitted header/detail values are preserved. update/delete require stable positive lineKey or dtlKey from get-item-package, not row position or item code alone. append and replace reject keys. append adds components; replace supplies the complete desired non-empty detail set and removes omitted components. Empty arrays are rejected in every mode, including update and previews; omit arrays for header-only update. Legacy component updates also need a stable key. validateOnly:true never saves. Create and create validation require description and lines, items, or legacy top-level itemCode. validate-item-package never saves; select edit validation using detailMode or operation:update for header-only preview; reason is optional. update-item-package requires reason even for validateOnly:true previews. validateOnly:true never saves. Header unitPrice is distinct from legacy lineUnitPrice.","nativePayload":{"commandType":"validate-item-package","title":"Item Package contract","supported":true,"schemaOnly":true,"required":["packageCode"],"fields":{"packageCode":{"type":"string","description":"Package identity","minLength":1},"description":{"type":"string","description":"Package description"},"barCode":{"type":"string","description":"Package barcode"},"unitPrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Package selling price, distinct from component unitPrice; finite invariant decimal, native precision/validation applies"},"isActive":{"type":"boolean","description":"Package active flag; false deactivates without deleting"},"limitedQty":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Package limited quantity; numeric value, not a boolean flag; finite invariant decimal, native precision/validation applies"},"allowDuplicateItemCode":{"type":"boolean","description":"Per-request duplicate permission, not stored as a Master flag; set true for creates/edits introducing duplicate component item codes"},"lines":{"type":"array","minItems":1,"description":"Component rows; use lines OR items OR legacy top-level itemCode, never mix forms. Empty arrays are rejected in every mode; omit arrays for header-only update. Create/append/replace need itemCode. update/delete use existing positive lineKey/dtlKey; append/replace reject keys","items":{"type":"object","additionalProperties":false,"properties":{"itemCode":{"type":"string","description":"Existing component item code"},"description":{"type":"string","description":"Component description"},"desc2":{"type":"string","description":"Component second description; conditional SDK/version availability. TSM Detail lacks Desc2 despite the SDK property; unsupported explicit requests fail before save"},"furtherDescription":{"type":"string","description":"Component further description"},"uom":{"type":"string","description":"Existing component UOM"},"qty":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component quantity; legacy default 1; finite invariant decimal, native precision/validation applies"},"unitPrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component selling price; finite invariant decimal, native precision/validation applies"},"purchasePrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component purchase price; finite invariant decimal, native precision/validation applies"},"taxCode":{"type":"string","description":"Component sales tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS"},"purchaseTaxCode":{"type":"string","description":"Component purchase tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS"},"printOut":{"type":"boolean","description":"Component print-out flag"},"lineKey":{"oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1,"maximum":9007199254740991}],"description":"Stable native detail key from get-item-package; prefer a string to preserve Int64 precision"},"dtlKey":{"oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1,"maximum":9007199254740991}],"description":"Stable native detail key from get-item-package; prefer a string to preserve Int64 precision"}}}},"items":{"type":"array","minItems":1,"description":"Alias for lines; do not send both","items":{"type":"object","additionalProperties":false,"properties":{"itemCode":{"type":"string","description":"Existing component item code"},"description":{"type":"string","description":"Component description"},"desc2":{"type":"string","description":"Component second description; conditional SDK/version availability. TSM Detail lacks Desc2 despite the SDK property; unsupported explicit requests fail before save"},"furtherDescription":{"type":"string","description":"Component further description"},"uom":{"type":"string","description":"Existing component UOM"},"qty":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component quantity; legacy default 1; finite invariant decimal, native precision/validation applies"},"unitPrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component selling price; finite invariant decimal, native precision/validation applies"},"purchasePrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component purchase price; finite invariant decimal, native precision/validation applies"},"taxCode":{"type":"string","description":"Component sales tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS"},"purchaseTaxCode":{"type":"string","description":"Component purchase tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS"},"printOut":{"type":"boolean","description":"Component print-out flag"},"lineKey":{"oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1,"maximum":9007199254740991}],"description":"Stable native detail key from get-item-package; prefer a string to preserve Int64 precision"},"dtlKey":{"oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1,"maximum":9007199254740991}],"description":"Stable native detail key from get-item-package; prefer a string to preserve Int64 precision"}}}},"itemCode":{"type":"string","description":"Legacy single-component item code; do not mix with lines/items"},"qty":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component quantity; legacy default 1; finite invariant decimal, native precision/validation applies"},"uom":{"type":"string","description":"Existing component UOM"},"lineDescription":{"type":"string","description":"Component description"},"lineDescription2":{"type":"string","description":"Component second description; conditional SDK/version availability. TSM Detail lacks Desc2 despite the SDK property; unsupported explicit requests fail before save"},"furtherDescription":{"type":"string","description":"Component further description"},"lineUnitPrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component selling price; finite invariant decimal, native precision/validation applies"},"purchasePrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Component purchase price; finite invariant decimal, native precision/validation applies"},"taxCode":{"type":"string","description":"Component sales tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS"},"purchaseTaxCode":{"type":"string","description":"Component purchase tax code; empty string maps to native null; TSM native save/reload verified, edge2 PASS"},"validateOnly":{"type":"boolean","description":"True validates without saving; create/update still require write permission"},"Master":{"type":"object","additionalProperties":false,"description":"Known native header columns only; parent validates support, conflicting aliases and persistence","properties":{"PackageCode":{"type":"string","description":"Package identity","minLength":1},"Description":{"type":"string","description":"Package description"},"BarCode":{"type":"string","description":"Package barcode"},"UnitPrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Package selling price, distinct from component unitPrice; finite invariant decimal, native precision/validation applies"},"IsActive":{"type":"boolean","description":"Package active flag; false deactivates without deleting"},"LimitedQty":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Package limited quantity; numeric value, not a boolean flag; finite invariant decimal, native precision/validation applies"}}},"fields":{"type":"object","additionalProperties":false,"description":"Known native header columns only; parent validates support, conflicting aliases and persistence","properties":{"PackageCode":{"type":"string","description":"Package identity","minLength":1},"Description":{"type":"string","description":"Package description"},"BarCode":{"type":"string","description":"Package barcode"},"UnitPrice":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Package selling price, distinct from component unitPrice; finite invariant decimal, native precision/validation applies"},"IsActive":{"type":"boolean","description":"Package active flag; false deactivates without deleting"},"LimitedQty":{"oneOf":[{"type":"number"},{"type":"string","minLength":1}],"description":"Package limited quantity; numeric value, not a boolean flag; finite invariant decimal, native precision/validation applies"}}},"detailMode":{"type":"string","enum":["update","append","delete","replace"],"description":"update (default for update commands with lines/items), append, delete, or replace; any detailMode selects edit validation; update/delete target stable lineKey or dtlKey"},"reason":{"type":"string","description":"Business reason; not required for validate-item-package edit previews","minLength":1},"lineKey":{"oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1,"maximum":9007199254740991}],"description":"Stable native detail key from get-item-package; prefer a string to preserve Int64 precision"},"dtlKey":{"oneOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"integer","minimum":1,"maximum":9007199254740991}],"description":"Stable native detail key from get-item-package; prefer a string to preserve Int64 precision"},"operation":{"type":"string","enum":["create","update"],"description":"Default create; operation:update selects header-only edit validation. Any detailMode selects edit validation; reason is optional on validate-item-package"}},"example":{"packageCode":"PKG-API","description":"API Package","unitPrice":120,"isActive":true,"limitedQty":10,"lines":[{"itemCode":"ITEM001","qty":1,"uom":"UNIT","unitPrice":100},{"itemCode":"ITEM002","qty":2,"uom":"UNIT","unitPrice":10}]},"notes":["Static Item Package contract, not native persistence proof. Parent native connector owns strict field validation: Master/fields map known columns with support checks and readback verification; unknown/unsupported fields must be rejected, never silently ignored. Installed SDK support and Save/readback must be verified separately. Omitted lines/items preserve all existing details unless legacy component fields are supplied. Omitted header/detail values are preserved. update/delete require stable positive lineKey or dtlKey from get-item-package, not row position or item code alone. append and replace reject keys. append adds components; replace supplies the complete desired non-empty detail set and removes omitted components. Empty arrays are rejected in every mode, including update and previews; omit arrays for header-only update. Legacy component updates also need a stable key. validateOnly:true never saves. Create and create validation require description and lines, items, or legacy top-level itemCode. validate-item-package never saves; select edit validation using detailMode or operation:update for header-only preview; reason is optional. update-item-package requires reason even for validateOnly:true previews. validateOnly:true never saves. Header unitPrice is distinct from legacy lineUnitPrice.","supported indicates local handler schema availability; schemaOnly is deliberate and does not certify all fields, SDK versions or deployed connectors. Native maintenance2 PASS: create/edit/append/component-delete/replace/deactivate/reactivate, duplicate-add rejection, used-package delete refusal and unused-package delete with absence proof. Void stays guarded. Empty tax-code clearing: TSM native save/reload verified, edge2 PASS."]}}