{"openapi":"3.0.0","info":{"title":"2SHARE BLOCKCHAIN TIER REST API","description":"This page describes the REST API for the blockchain tier of **2share** platform.\nThis API will interact with the Blockchain.\nThis API will be secured at application level via JWT tokens.\nThe applications willing to invoke the functionality of this platform layer must provide an application public certificate and sign the JWT token with the application private key.\n   \n","version":"0.0.1","contact":{"name":"2SHARE"},"license":{"name":"Copyright Eurohelp"}},"tags":[{"name":"users","description":"**Users REST API**\n   \nThe users API is focused on:\n- User creation\n"},{"name":"tokens","description":"**Tokens REST API**\n   \nThe token API is focused on\n- Token management\n- Creation of tokens' accounts for the users\n- Handling the tokens flow among users\n"},{"name":"events","description":"**Events REST API**\n   \nThe event API is focused on\n- Creating events\n- Managing the user/event interactions\n"},{"name":"ratings","description":"**Ratings REST API**\n   \nThe rating API is focused on\n- Rating a user for an event\n- Rating an event\n"},{"name":"penalty","description":"**Penalty REST API**\n  \nThe penalty API is focused on:\n- Get a single user penalty\n"}],"paths":{"/user":{"post":{"tags":["users"],"summary":"Creates a new user","description":"This method creates a new user with received user data and returns a JSON document describing the newly created user\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/user"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/user/{userId}":{"get":{"tags":["users"],"summary":"Get the information about a certain user","description":"This method returns a JSON document for the requested user if found on the system\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/user"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"put":{"tags":["users"],"summary":"Update the information of an user","description":"This method returns a JSON structure describing the requested user\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/userId"}],"requestBody":{"description":"The new user data to be associated with the specified user\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/userPutRequest"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/ft":{"get":{"tags":["tokens"],"summary":"Get the total amount of ft tokens","description":"This method returns the total amount of tokens of ft 2share platform\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/ft/{account}":{"get":{"tags":["tokens"],"summary":"Get the total amount of 2share ft tokens for a certain account","description":"This method returns the 2share ft amount of tokens for the given account\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["tokens"],"summary":"Add ft tokens to the account","description":"This method adds an amount of 2share ft tokens to a given account.\n   \n*NOTE: To burn tokens from an account simply add a negative number of tokens*\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"}],"requestBody":{"description":"The amount of tokens to be added\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/ft/{account}/allowance/{spenderAccount}":{"get":{"tags":["tokens"],"summary":"Get the 2share ft allowance set in the account for the spender.","description":"This method returns the 2share ft amount of tokens the spender is allowed to transfer from this account.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/spenderAccount"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["tokens"],"summary":"Set the 2share ft allowance for an spender in the account","description":"This method set the 2share ft amount of tokens an spender is allowed to transfer from this account.\n   \n*NOTE: Setting the allowance to 0 is equivalent to revoke the ability to tranfer from the account of the spender*\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/spenderAccount"}],"requestBody":{"description":"The amount of tokens to be added\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/ft/{account}/transfer/{toAccount}":{"post":{"tags":["tokens"],"summary":"Transfers 2share ft tokens from an account to another","description":"This methods transfers an 2share ft amount of tokens from one account to another.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/toAccount"}],"requestBody":{"description":"The 2share ft amount of tokens to be transferred\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/ft/{account}/transfer/{toAccount}/from/{fromAccount}":{"post":{"tags":["tokens"],"summary":"Transfers 2share ft tokens from an account to another","description":"This methods transfers an 2share ft amount of tokens from one account to another.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/toAccount"},{"$ref":"#/components/parameters/fromAccount"}],"requestBody":{"description":"The 2share ft amount of tokens to be transferred\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/rt":{"get":{"tags":["tokens"],"summary":"Get the total amount of 2share ft tokens","description":"This method returns the total amount of 2share ft tokens of 2share platform\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/rt/{account}":{"get":{"tags":["tokens"],"summary":"Get the total amount of 2share rt tokens for a certain account","description":"This method returns the amount of 2share rt tokens for the given account\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["tokens"],"summary":"Add 2share rt tokens to the account","description":"This method adds an amount of 2share tt tokens to a given account.\n   \n*NOTE: To burn 2share rt tokens from an account simply add a negative number of tokens*\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"}],"requestBody":{"description":"The amount of 2share rt tokens to be added\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/rt/{account}/allowance/{spenderAccount}":{"get":{"tags":["tokens"],"summary":"Get the 2share rt allowance set in the account for the spender.","description":"This method returns the amount of 2share rt tokens the spender is allowed to transfer from this account.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/spenderAccount"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["tokens"],"summary":"Set the 2share rt allowance for an spender in the account","description":"This method set the amount of tokens an spender is allowed to transfer from this account.\n   \n*NOTE: Setting the allowance to 0 is equivalent to revoke the ability to tranfer from the account of the spender*\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/spenderAccount"}],"requestBody":{"description":"The amount of 2share rt tokens to be added\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/rt/{account}/transfer/{toAccount}":{"post":{"tags":["tokens"],"summary":"Transfers 2share rt tokens from an account to another","description":"This methods transfers an amount of 2share rt tokens from one account to another.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/toAccount"}],"requestBody":{"description":"The amount of 2share rt tokens to be transferred\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/token/rt/{account}/transfer/{toAccount}/from/{fromAccount}":{"post":{"tags":["tokens"],"summary":"Transfers 2share rt tokens from an account to another","description":"This methods transfers an 2share rt amount of tokens from one account to another.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/account"},{"$ref":"#/components/parameters/toAccount"},{"$ref":"#/components/parameters/fromAccount"}],"requestBody":{"description":"The 2share rt amount of tokens to be transferred\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/tokenAmount"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event":{"post":{"tags":["events"],"summary":"Creates a new event","description":"This method creates a new event with received event data and returns a JSON structure describing the newly created event\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true}],"requestBody":{"description":"The event data to be associated to the newly created event\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/eventData"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/event"}}}},"401":{"description":"Unauthorized"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event/{eventId}":{"get":{"tags":["events"],"summary":"Get the information about an event","description":"This method returns a JSON structure describing the requested event\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/event"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"put":{"tags":["events"],"summary":"Update the information of an event","description":"This method returns a JSON structure describing the requested event\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"}],"requestBody":{"description":"The new user data to be associated to the requested event\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/eventData"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/event"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event/{eventId}/attendanceRequest":{"post":{"tags":["events"],"summary":"Send an attendance request for an event","description":"This method send an attendance request for an event\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"}],"requestBody":{"description":"The user id of the user that request the attendance for the event\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/userAttendance"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event/{eventId}/acceptance":{"post":{"tags":["events"],"summary":"Accepts a user for the event","description":"This method set the acceptance of an user for the event\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"}],"requestBody":{"description":"The the acceptance status of an user for the event\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/userAcceptance"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event/{eventId}/cancelation":{"post":{"tags":["events"],"summary":"Cancels the event","description":"This method is used to cancel the event.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"}],"requestBody":{"description":"The the id of the user canceling the event.\n   \n*NOTE: The event canceling user can only be the event owner*\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/userId"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event/{eventId}/returnPercentages/{userId}":{"get":{"tags":["events"],"summary":"Get the return percentage of an user on an event","description":"This method returns the percentage of the event price that is going to be returned to the guest after the event ends.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/returnPercentage"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["events"],"summary":"Set the returning procentaje for an user on an event","description":"This method is used to set the percentage of the event price that is going to be returned to the guest after the event ends.\n   \n*NOTE: This method must be invoked before the host/guest payment is resolved*\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"},{"$ref":"#/components/parameters/userId"}],"requestBody":{"description":"The the id of the user canceling the event.\n   \n*NOTE: The event canceling user can only be the event owner*\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/returnPercentageBody"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/user/{userId}/rate/{topic}":{"get":{"tags":["ratings"],"summary":"Gets the rating of a user for a specific topic","description":"This method returns the rating of an user on a given topic\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/topic"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rating"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["ratings"],"summary":"Submit a rating for an user","description":"This method submits a rating for a user on a topic.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/topic"}],"requestBody":{"description":"The vote of the rating for the user on the topic.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/userRating"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/event/{eventId}/rate/{topic}":{"get":{"tags":["ratings"],"summary":"Get the rating of an event","description":"This method returns the rating of an event on a given topic\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"},{"$ref":"#/components/parameters/topic"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/rating"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}},"post":{"tags":["ratings"],"summary":"Submit a rating for an event","description":"This method submits a rating for an event on a topic.\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/eventId"},{"$ref":"#/components/parameters/topic"}],"requestBody":{"description":"The vote of the rating for the event on the topic.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/eventRating"}}}},"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}},"/penalty/{userId}":{"get":{"tags":["penalty"],"summary":"Get the penalty information about a certain user","description":"This method returns a JSON document for the requested user penalty if found on the system\n","parameters":[{"in":"header","name":"Date","schema":{"type":"string"},"required":true},{"in":"header","name":"Authentication","schema":{"type":"string"},"required":true},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/penalty"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"406":{"description":"Conflict"},"500":{"description":"Internal server error"}}}}},"components":{"parameters":{"account":{"name":"account","in":"path","required":true,"schema":{"type":"string"},"description":"The token account identifier\n"},"eventId":{"name":"eventId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identificator of a 2share event\n"},"spenderAccount":{"name":"spenderAccount","in":"path","required":true,"schema":{"type":"string"},"description":"The spender token account identifier\n"},"toAccount":{"name":"toAccount","in":"path","required":true,"schema":{"type":"string"},"description":"The token account for sending tokens to\n"},"fromAccount":{"name":"fromAccount","in":"path","required":true,"schema":{"type":"string"},"description":"The token account for sending tokens from\n"},"topic":{"name":"topic","in":"path","required":true,"schema":{"type":"string"},"description":"The topic of the rating\n"},"userId":{"name":"userId","in":"path","required":true,"schema":{"type":"string"},"description":"The unique identificator of a 2share user\n"}},"schemas":{"event":{"type":"object","properties":{"eventId":{"type":"string","description":"The unique id of the event\n"},"attendanceRequest":{"type":"array","items":{"type":"string"},"description":"The list of user ids that have requested attendance to the event\n"},"attendees":{"type":"array","items":{"type":"string"},"description":"The list of user ids whose attendance has been confirmed by the event owner\n"},"eventData":{"$ref":"#/components/schemas/eventData"}},"description":"The JSON representation of a 2share blockchain tier event\n"},"eventData":{"type":"object","additionalProperties":{"type":"string"},"description":"The JSON object defining the event related data.\n"},"rating":{"type":"object","properties":{"average":{"type":"integer","description":"The average of the rating on a topic\n"},"voteNumber":{"type":"integer","description":"The number of votes on this topic\n"}}},"eventRating":{"type":"object","properties":{"rater":{"type":"string","description":"The id of the user emiting the rating\n"},"rating":{"type":"integer","description":"The value of the rating\n"}},"description":"The JSON defining a rating vote\n"},"returnPercentage":{"type":"object","properties":{"percentage":{"type":"integer","description":"The percentage of event price to be returned\n"}}},"returnPercentageBody":{"type":"object","properties":{"submitter":{"type":"string","description":"The user id that send the return percentage setting request\n"},"percentage":{"type":"integer","description":"The percentage of event price to be returned\n"}}},"tokenAmount":{"type":"object","properties":{"amount":{"type":"integer","description":"The amount of tokens\n"}}},"user":{"type":"object","properties":{"userId":{"type":"string","description":"The unique id of the user\n"},"generationDate":{"type":"number","description":"The timestamp value of the user generation date in timestamp"},"active":{"type":"boolean","description":"A boolean representation of the user state"}},"description":"The JSON representation of a 2share blockchain tier user\n"},"userPutRequest":{"type":"object","properties":{"active":{"type":"boolean","description":"The user future state\n"}},"description":"The JSON containing the user active state for /user PUT request\n"},"userAcceptance":{"type":"object","properties":{"manager":{"type":"string","description":"The user id of the user that grants the acceptance for the event.\n*NOTE: Only the event owner is able to grant/revoke acceptance from an event.*\n"},"target":{"type":"string","description":"The id of the user whose acceptance status is going to be updated.\n"},"acceptance":{"type":"boolean","description":"The acceptance status of the target user\n"}},"description":"The JSON object defining the user acceptance status\n"},"userAttendance":{"type":"object","properties":{"userId":{"type":"string","description":"The id of the user of the attendance requesting user\n"},"attendance":{"type":"boolean","description":"The attendance of the user to the event.\n*NOTA: A false attendance represents the will of the user to cancel her attendance to the event*\n"}},"description":"The JSON object defining the user acceptance status\n"},"userId":{"type":"object","properties":{"userId":{"type":"string","description":"The unique id of the user\n"}},"description":"The JSON containing the used Id\n"},"userRating":{"type":"object","properties":{"rater":{"type":"string","description":"The id of the user emiting the rating\n"},"event":{"type":"string","description":"The id of the event that provides the context of the rating\n"},"rating":{"type":"integer","description":"The value of the rating\n"}},"description":"The JSON defining a rating vote\n"},"penaltyStatus":{"type":"string","enum":["BANNED","OK","TEMPORALLY_BANNED","TRIAL_PERIOD"]},"penalty":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/penaltyStatus"},"cards":{"type":"integer","description":"The number of cards of the user\n"},"eventsBeforeCardReduction":{"type":"integer","description":"The number of cards before the user card reduction\n"}},"description":"The JSON representation of a 2share blockchain tier user penalty"}}}}