{"lexicon":1,"id":"money.atmosphere.catalog.createProduct","defs":{"main":{"type":"procedure","description":"Create 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","title","kind"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"title":{"type":"string","minLength":1,"maxGraphemes":100,"maxLength":1000},"sku":{"type":"string","maxLength":64},"kind":{"type":"string","knownValues":["physical","digital","membership","service","support","other"],"maxLength":32,"description":"Product kind to assign. ATM product writers accept these six current values; commissioned work uses service and tickets use tickets.atmosphere.ticketType."},"description":{"type":"string","maxGraphemes":1000,"maxLength":10000},"price":{"type":"ref","ref":"money.atmosphere.catalog.defs#priceInput"},"inventory":{"type":"ref","ref":"money.atmosphere.catalog.defs#inventoryInput"},"variantOf":{"type":"ref","ref":"com.atproto.repo.strongRef"},"appProductRef":{"type":"ref","ref":"money.atmosphere.catalog.defs#appProductRef"},"fulfillmentUrl":{"type":"string","format":"uri"},"appLabel":{"type":"string","maxGraphemes":80,"maxLength":800},"appUrl":{"type":"string","format":"uri"},"appIconUrl":{"type":"string","format":"uri"}}}},"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":"InvalidVariantParent","description":"variantOf must reference one of the caller's own products."},{"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":"WriteFailed","description":"ATM could not write the product or price records."}]}}}