{"openapi":"3.1.0","info":{"title":"Prefbook","version":"2.0.0-suite.2"},"paths":{"/api/v1/session":{"get":{"security":[{"bearer":[]},{"accountToken":[]}],"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"authKind":{"type":"string","enum":["session","pat"]},"recentAuth":{"type":"boolean"},"scopes":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"connectionState":{"type":"string","enum":["connected","reauthentication_required"]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["subject","authKind","recentAuth","scopes","connectionState"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/tokens":{"get":{"security":[{"bearer":[]},{"accountToken":[]}],"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]}},"required":["id","name","scopes","createdAt","expiresAt","revokedAt"],"additionalProperties":false}}},"required":["tokens"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}},"post":{"security":[{"bearer":[]},{"accountToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"expiresInDays":{"default":90,"type":"integer","minimum":1,"maximum":365}},"required":["name","expiresInDays"],"additionalProperties":false}}}},"responses":{"201":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":32},"record":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]}},"required":["id","name","scopes","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["token","record"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/tokens/{id}":{"delete":{"security":[{"bearer":[]},{"accountToken":[]}],"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revoked":{"type":"boolean","const":true},"id":{"type":"string","minLength":1}},"required":["revoked","id"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/preferences":{"get":{"security":[{"bearer":[]},{"accountToken":[]}],"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timeZone":{"default":"America/Chicago","type":"string","maxLength":100}},"required":["timeZone"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}},"put":{"security":[{"bearer":[]},{"accountToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timeZone":{"default":"America/Chicago","type":"string","maxLength":100}},"required":["timeZone"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timeZone":{"default":"America/Chicago","type":"string","maxLength":100}},"required":["timeZone"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/backup":{"get":{"security":[{"bearer":[]},{"accountToken":[]}],"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"format":{"type":"string","const":"uppercut-suite-backup"},"formatVersion":{"type":"number","const":1},"appId":{"type":"string","enum":["domain-expansion","favesaver","biztriptracker","prefbook"]},"sourceSchemaVersion":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._-]{1,80}$"},{"type":"integer","minimum":1,"maximum":9007199254740991}]},"exportedAt":{"type":"string"},"sections":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"integrity":{"type":"object","properties":{"algorithm":{"type":"string","const":"sha256"},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["algorithm","digest"],"additionalProperties":false}},"required":["format","formatVersion","appId","sourceSchemaVersion","exportedAt","sections","integrity"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/backup/preview":{"post":{"security":[{"bearer":[]},{"accountToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"format":{"type":"string","const":"uppercut-suite-backup"},"formatVersion":{"type":"number","const":1},"appId":{"type":"string","enum":["domain-expansion","favesaver","biztriptracker","prefbook"]},"sourceSchemaVersion":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._-]{1,80}$"},{"type":"integer","minimum":1,"maximum":9007199254740991}]},"exportedAt":{"type":"string"},"sections":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,99}$"},"additionalProperties":{"$ref":"#/$defs/__schema0"}},"integrity":{"type":"object","properties":{"algorithm":{"type":"string","const":"sha256"},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["algorithm","digest"],"additionalProperties":false}},"required":["format","formatVersion","appId","sourceSchemaVersion","exportedAt","sections","integrity"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/$defs/__schema0"}}]}}}}}},"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"previewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"appId":{"type":"string","enum":["domain-expansion","favesaver","biztriptracker","prefbook"]},"sourceSchemaVersion":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._-]{1,80}$"},{"type":"integer","minimum":1,"maximum":9007199254740991}]},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"targetRevision":{"type":"string","minLength":1,"maxLength":200},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"sourceCounts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"targetCounts":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"warnings":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"settingsAffected":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":100}}},"required":["previewId","appId","sourceSchemaVersion","hash","targetRevision","createdAt","expiresAt","sourceCounts","targetCounts","warnings","settingsAffected"],"additionalProperties":false}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/backup/restore":{"post":{"security":[{"bearer":[]},{"accountToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"type":"string","enum":["empty","replace"]},"previewId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"targetRevision":{"type":"string","minLength":1,"maxLength":200},"idempotencyKey":{"type":"string","pattern":"^[A-Za-z0-9._:-]{16,128}$"},"confirmation":{"type":"string","const":"Replace all existing data with this backup"}},"required":["mode","previewId","hash","targetRevision","idempotencyKey"],"additionalProperties":false}}}},"responses":{"200":{"description":"Contract response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"default":{"description":"Problem Details","content":{"application/problem+json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false}}}}}}},"/api/v1/snapshot":{"get":{"operationId":"snapshot","security":[{"bearer":[]},{"accountToken":[]}],"responses":{"200":{"description":"Owned synchronized preferences"}}}},"/api/v1/execute":{"post":{"operationId":"execute","security":[{"bearer":[]},{"accountToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"save_item"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","maxLength":80,"pattern":"^\\d+:\\d+$"}]},"needId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"needName":{"type":"string","minLength":1,"maxLength":160},"item":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"brand":{"default":"","type":"string","maxLength":160},"packageDescription":{"default":"","type":"string","maxLength":240},"note":{"default":"","type":"string","maxLength":32000},"daysPerPackage":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":3650},{"type":"null"}]}},"required":["name","brand","packageDescription","note","daysPerPackage"],"additionalProperties":false},"listing":{"type":"object","properties":{"retailer":{"default":"","type":"string","maxLength":160},"url":{"default":null,"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"priceMinor":{"default":null,"anyOf":[{"type":"integer","minimum":0,"maximum":100000000},{"type":"null"}]},"observedOn":{"default":null,"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"note":{"default":"","type":"string","maxLength":32000}},"required":["retailer","url","priceMinor","observedOn","note"],"additionalProperties":false},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["item","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"snapshot"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"create"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["needs","items","listings","purchases"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["kind","data","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"edit"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["needs","items","listings"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","maxLength":80,"pattern":"^\\d+:\\d+$"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["kind","id","revision","data","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"archive"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","maxLength":80,"pattern":"^\\d+:\\d+$"}]},"archived":{"type":"boolean"},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["id","revision","archived","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"rank"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"needId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","maxLength":80,"pattern":"^\\d+:\\d+$"}]},"itemIds":{"maxItems":5000,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["needId","revision","itemIds","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"correct_purchase"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","maxLength":80,"pattern":"^\\d+:\\d+$"}]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["id","revision","data","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"void_purchase"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"string","maxLength":80,"pattern":"^\\d+:\\d+$"}]},"reason":{"type":"string","minLength":1,"maxLength":1000},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200},"datasetRevision":{"type":"string","maxLength":30,"pattern":"^\\d+$"}},"required":["id","revision","reason","idempotencyKey"],"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"capture"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":32000},"url":{"type":"string","maxLength":2000},"image":{"type":"object","properties":{"mimeType":{"type":"string","enum":["image/jpeg","image/png"]},"base64":{"type":"string","minLength":4,"maxLength":5600000,"pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["mimeType","base64"],"additionalProperties":false},"currentNote":{"type":"string","maxLength":32000}},"additionalProperties":false}},"additionalProperties":false},{"type":"object","required":["operation","input"],"properties":{"operation":{"const":"export"},"input":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}},"additionalProperties":false}]}}}},"responses":{"200":{"description":"Operation result"},"409":{"description":"Revision or retry conflict"}}}}},"components":{"schemas":{"AppId":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"string","enum":["domain-expansion","favesaver","biztriptracker","prefbook"]},"TokenRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"expiresInDays":{"default":90,"type":"integer","minimum":1,"maximum":365}},"required":["name","expiresInDays"],"additionalProperties":false},"TokenRecord":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]}},"required":["id","name","scopes","createdAt","expiresAt","revokedAt"],"additionalProperties":false},"TokenList":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tokens":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]}},"required":["id","name","scopes","createdAt","expiresAt","revokedAt"],"additionalProperties":false}}},"required":["tokens"],"additionalProperties":false},"TokenCreated":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","minLength":32},"record":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]}},"required":["id","name","scopes","createdAt","expiresAt","revokedAt"],"additionalProperties":false}},"required":["token","record"],"additionalProperties":false},"TokenRevoked":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"revoked":{"type":"boolean","const":true},"id":{"type":"string","minLength":1}},"required":["revoked","id"],"additionalProperties":false},"Session":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"authKind":{"type":"string","enum":["session","pat"]},"recentAuth":{"type":"boolean"},"scopes":{"maxItems":64,"type":"array","items":{"type":"string","maxLength":100,"pattern":"^[a-z][a-z0-9_-]*:[a-z][a-z0-9_:.-]*$"}},"connectionState":{"type":"string","enum":["connected","reauthentication_required"]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["subject","authKind","recentAuth","scopes","connectionState"],"additionalProperties":false},"ProblemDetails":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string","maxLength":1000},"instance":{"type":"string","minLength":1,"maxLength":1000},"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,99}$"},"requestId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,100}$"},"retryable":{"type":"boolean"},"errors":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","maxLength":100},"code":{"type":"string","maxLength":100}},"required":["field","code"],"additionalProperties":false}},"existingId":{"type":"string","minLength":1,"maxLength":200},"issues":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"path":{"maxItems":32,"type":"array","items":{"anyOf":[{"type":"string","maxLength":100},{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}]}},"code":{"type":"string","maxLength":100},"message":{"type":"string","maxLength":500}},"required":["path","message"],"additionalProperties":false}}},"required":["type","title","status","detail","instance","code","requestId","retryable"],"additionalProperties":false},"Preferences":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timeZone":{"default":"America/Chicago","type":"string","maxLength":100}},"required":["timeZone"],"additionalProperties":false}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"},"accountToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Uppercut Account access token for this product (the Android app): EdDSA at+jwt, audience https://prefbook.uppercut-labs.com, five-minute lifetime. Same identity and rules as a browser session. Routes that need a recent sign-in accept it when its uca_auth_time (the sign-in time, kept unchanged by refresh) is within the same five minutes as a browser session's; otherwise they answer recent_auth_required."}}}}