{"lexicon":1,"id":"money.atmosphere.catalog.updateProduct","defs":{"main":{"type":"procedure","description":"Update an app-owned canonical ATM product in the calling app DID repo. Requires app service auth.","input":{"encoding":"application/json","schema":{"type":"object","required":["environment","product"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"product":{"type":"ref","ref":"com.atproto.repo.strongRef"},"title":{"type":"string","minLength":1,"maxGraphemes":100,"maxLength":1000},"sku":{"type":"string","maxLength":64},"kind":{"type":"string","maxLength":32,"description":"Replacement product kind. ATM accepts a current assignable value, or an unlisted value only when it exactly preserves the existing record, so legacy and future records can be updated without rewriting this open field."},"description":{"type":"string","maxGraphemes":1000,"maxLength":10000},"price":{"type":"ref","ref":"money.atmosphere.catalog.defs#priceInput","description":"Deprecated and rejected with PriceMutationUnavailable. Price replacement requires a dedicated atomic Price+Product repo commit."},"inventory":{"type":"ref","ref":"money.atmosphere.catalog.defs#inventoryInput","description":"Deprecated and rejected with InventoryMutationMoved. Use money.atmosphere.catalog.configureInventory after the Product update succeeds."},"archived":{"type":"boolean","description":"Set true to archive the product (removed from new-sale surfaces, still resolvable), false to unarchive. Matches the record's archived field."},"appProductRef":{"type":"ref","ref":"money.atmosphere.catalog.defs#appProductRef","description":"Deprecated and rejected with LinkMutationMoved. Use money.atmosphere.catalog.registerAppLink after the Product update succeeds."},"fulfillmentUrl":{"type":"string","format":"uri","description":"Deprecated and rejected with LinkMutationMoved. Use money.atmosphere.catalog.registerAppLink after the Product update succeeds."},"appLabel":{"type":"string","maxGraphemes":80,"maxLength":800,"description":"Deprecated and rejected with LinkMutationMoved. Use money.atmosphere.catalog.registerAppLink after the Product update succeeds."},"appUrl":{"type":"string","format":"uri","description":"Deprecated and rejected with LinkMutationMoved. Use money.atmosphere.catalog.registerAppLink after the Product update succeeds."},"appIconUrl":{"type":"string","format":"uri","description":"Deprecated and rejected with LinkMutationMoved. Use money.atmosphere.catalog.registerAppLink after the Product update succeeds."},"linkStatus":{"type":"string","knownValues":["active","archived"],"maxLength":32,"description":"Deprecated and rejected with LinkMutationMoved. Use money.atmosphere.catalog.registerAppLink after the Product update succeeds."},"linkSourceUpdatedAt":{"type":"string","format":"datetime","description":"Deprecated and rejected with LinkMutationMoved. Supply sourceUpdatedAt to money.atmosphere.catalog.registerAppLink instead.","maxLength":64}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["product"],"properties":{"product":{"type":"ref","ref":"com.atproto.repo.strongRef"},"price":{"type":"ref","ref":"com.atproto.repo.strongRef"}}}},"errors":[{"name":"AppEnvironmentNotConfigured","description":"The app environment is not configured in ATM."},{"name":"ProductOwnershipMismatch","description":"The product is not owned by the calling app DID."},{"name":"ProductNotFound","description":"ATM could not load the product record."},{"name":"InvalidKind","description":"The requested product kind is neither a current assignable value nor the unchanged value already stored on the product."},{"name":"InvalidUrl","description":"A supplied URL is not an acceptable http(s) URL."},{"name":"InventoryEnvironmentMissing","description":"Inventory tracking requires a configured app environment."},{"name":"InventoryQuantityTooLow","description":"Inventory quantity cannot be lower than already-sold units."},{"name":"ProductSoldOut","description":"The product's tracked inventory is exhausted."},{"name":"ProductVersionConflict","description":"The Product strongRef changed before ATM could atomically replace that exact record version."},{"name":"WriteOutcomeUnknown","description":"The Product write response was ambiguous and ATM could not re-read the current record to adopt or reject it safely."},{"name":"PriceMutationUnavailable","description":"updateProduct cannot safely combine immutable Price creation with Product replacement."},{"name":"InventoryMutationMoved","description":"Inventory mutation moved to money.atmosphere.catalog.configureInventory."},{"name":"LinkMutationMoved","description":"App-link mutation moved to money.atmosphere.catalog.registerAppLink."},{"name":"WriteFailed","description":"ATM could not write the product or price records."}]}}}