{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://api.game-alligator.com/schemas/promo-catalogue-v1.schema.json","title":"promo.catalogue.v1","description":"A game catalogue write sent to GA Promo by a connection that also sends gameplay events. snapshot replaces the whole catalogue of the connection, upsert adds or updates games, delete removes games by id. Rules the schema cannot express (byte limits, the size of one request, a game id appearing twice) are in the integration guide.","oneOf":[{"$ref":"#/$defs/snapshot"},{"$ref":"#/$defs/upsert"},{"$ref":"#/$defs/delete"}],"$defs":{"game":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string","minLength":1,"maxLength":255,"description":"The game's code, exactly as the gameplay events carry it in game.id. At most 255 bytes of UTF-8."},"name":{"type":"string","minLength":1,"maxLength":255,"description":"The display name. Not blank. At most 255 bytes of UTF-8."},"provider":{"type":"string","maxLength":255,"description":"The studio or provider name shown next to the game."},"category":{"type":"string","maxLength":255,"description":"The lobby section the game is shown in. Games without one are shown in a single section of their own."},"image_url":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048,"description":"An absolute https URL of the game's tile image."},"is_active":{"type":"boolean","default":true,"description":"false keeps the game listed but stops counting its events and hides it from the lobby."}}},"snapshot":{"type":"object","required":["mode","games"],"properties":{"mode":{"const":"snapshot"},"games":{"type":"array","maxItems":10000,"items":{"$ref":"#/$defs/game"},"description":"The whole catalogue. Games not listed are removed. An empty array clears the catalogue."}}},"upsert":{"type":"object","required":["mode","games"],"properties":{"mode":{"const":"upsert"},"games":{"type":"array","maxItems":10000,"items":{"$ref":"#/$defs/game"},"description":"Games to add or update. Games not listed are kept."}}},"delete":{"type":"object","required":["mode","game_ids"],"properties":{"mode":{"const":"delete"},"game_ids":{"type":"array","maxItems":10000,"items":{"type":"string","minLength":1,"maxLength":255},"description":"Ids of games to remove. Unknown ids are ignored."}}}}}