{"openapi":"3.1.0","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://10.42.103.51:6001","description":"Generated server url"}],"security":[{"JWT Security Scheme":[]}],"tags":[{"name":"player","description":"Player related requests."}],"paths":{"/api/players":{"post":{"tags":["player"],"summary":"Register a new player to Titan","description":"Register a new player to Titan, and return the registered information of the player. If player exists in Titan already and createNew parameter is false, return the existing player directly. If createNew is true, then a new player will be created even if there’s an existing matched player. Client shall only expect 200 for a successful operator even it is the first registration for the player.","operationId":"createPlayer","parameters":[{"name":"createNew","in":"query","required":true,"schema":{"type":"boolean"},"example":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Player"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityPlayer"}}}}}}},"/api/players/{id}/users/disconnect":{"post":{"tags":["player"],"summary":"Disconnect user from the player from Titan.","description":"Disconnect linked user for the Player specified by the id from Titan.","operationId":"disconnectPlayerToUser","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerToUser"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityListPlayerToUser"}}}}}}},"/api/players/{id}/country/{countryCode}":{"post":{"tags":["player"],"summary":"Update player's country in Titan","description":"In some cases player's country can be updated. For consistency we need to update id in titan as well to apply country related properties correctly","operationId":"updatePlayerCountry","parameters":[],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityPlayer"}}}}}}},"/api/players/{id}/campaigns":{"get":{"tags":["campaign-resource"],"summary":"Add a welcome campaign usage for the player.","description":"If campaign was not awarded return 404","operationId":"getExistedCampaign","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityCampaign"}}}}}},"post":{"tags":["campaign-resource"],"summary":"Add a welcome campaign usage for the player.","description":"If welcome campaign already awarded return conflict (409) and the existed campaign","operationId":"createCampaignUsage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}},"required":true},"responses":{"201":{"description":"Created","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityCampaign"}}}}}}},"/api/players/{id}/campaigns/rollback":{"post":{"tags":["campaign-resource"],"summary":"Rollback usage of welcome campaign for the player.","description":"Rollback usage of","operationId":"rollbackCampaignUsage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityVoid"}}}}}}},"/api/players/{id}":{"get":{"tags":["player"],"summary":"Get player from Titan.","description":"Get the Player specified by the id from Titan. 404 will be returned in case player not found.","operationId":"getPlayer","parameters":[],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityPlayer"}}}}}}},"/api/players/{id}/users":{"get":{"tags":["player"],"summary":"Get linked user for the player from Titan.","description":"Get linked user as List for the Player specified by the id from Titan. 400 will be returned in case player does not exist.","operationId":"getLinkedUsers","parameters":[],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TitanResponseEntityListPlayerToUser"}}}}}}},"/api/player/configs":{"get":{"tags":["player"],"operationId":"getPlayerConfigsList","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}},"components":{"schemas":{"Player":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdTime":{"type":"string","format":"date-time"},"nationalIdNumber":{"type":"string"},"siteId":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int64"},"country":{"type":"string"},"currency":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"birthDate":{"type":"string","format":"date-time"},"identifier":{"type":"string"}},"required":["country","currency","siteId","userId"]},"Error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"TitanResponseEntityPlayer":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"data":{"$ref":"#/components/schemas/Player"},"error":{"$ref":"#/components/schemas/Error"}}},"PlayerToUser":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"playerId":{"type":"integer","format":"int64"},"siteId":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int64"},"nationalIdNumber":{"type":"string"},"createdTime":{"type":"string","format":"date-time"},"disconnected":{"type":"boolean"},"firstName":{"type":"string"},"middleName":{"type":"string"},"lastName":{"type":"string"},"birthDate":{"type":"string","format":"date-time"}}},"TitanResponseEntityListPlayerToUser":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"data":{"type":"array","items":{"$ref":"#/components/schemas/PlayerToUser"}},"error":{"$ref":"#/components/schemas/Error"}}},"Campaign":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"playerId":{"type":"integer","format":"int64"},"siteId":{"type":"integer","format":"int32"},"userId":{"type":"integer","format":"int64"},"campaignId":{"type":"integer","format":"int64"},"awardedTime":{"type":"string","format":"date-time"}},"required":["campaignId","siteId","userId"]},"TitanResponseEntityCampaign":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"data":{"$ref":"#/components/schemas/Campaign"},"error":{"$ref":"#/components/schemas/Error"}}},"TitanResponseEntityVoid":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"data":{},"error":{"$ref":"#/components/schemas/Error"}}}},"securitySchemes":{"JWT Security Scheme":{"type":"http","description":"Provide the JWT token.","name":"JWT Security Scheme","scheme":"Bearer","bearerFormat":"JWT"}}}}