{"swagger":"2.0","info":{"description":"REST API for AB-InBev User Registration Service","version":"1.0.0-SNAPSHOT","title":"AB-InBev User Registration Service","license":{"name":"Anheuser-Busch InBev © 2019"}},"host":"localhost:8080","basePath":"/","tags":[{"name":"User Registration Service","description":"User Registration Controller"}],"paths":{"/":{"post":{"tags":["User Registration Service"],"summary":"Request user registration to create a new one","operationId":"createUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"country","in":"header","description":"country","required":false,"type":"string"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/UserRegistrationRequest"}},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID","required":true,"type":"string"}],"responses":{"201":{"description":"Successfully created","schema":{"$ref":"#/definitions/UserRegistrationResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}},"deprecated":false}},"/contact-verification":{"post":{"tags":["User Registration Service"],"summary":"User Contact verification","operationId":"verifyContactUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"Accept-Language","in":"header","description":"Information about the response language preferences (eg. en-US represents English as spoken in the United States)","required":false,"type":"string","default":"en-US"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/ContactVerificationRequest"}},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID","required":true,"type":"string"}],"responses":{"201":{"description":"Successfully created","schema":{"$ref":"#/definitions/ContactVerificationResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}}},"deprecated":false}},"/forgot-password":{"post":{"tags":["User Registration Service"],"summary":"Update password for unauthenticated user","operationId":"forgotPasswordUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"country","in":"header","description":"country","required":false,"type":"string"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/ForgotPasswordRequest"}},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID","required":true,"type":"string"}],"responses":{"201":{"description":"Successfully created","schema":{"$ref":"#/definitions/ForgotPasswordResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}},"deprecated":false}},"/validation":{"post":{"tags":["User Registration Service"],"summary":"Request user registration data validation","operationId":"validateUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/UserValidation"}},{"name":"country","in":"header","description":"country","required":false,"type":"string"},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID","required":true,"type":"string"}],"responses":{"200":{"description":"Successfully validated","schema":{"$ref":"#/definitions/UserValidation"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}},"deprecated":false}},"/{id}":{"patch":{"tags":["User Registration Service"],"summary":"Partial data update for authenticated user","operationId":"partialUpdateUsingPATCH","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"Authorization","in":"header","description":"JWT token","required":true,"type":"string"},{"name":"id","in":"path","description":"id","required":true,"type":"string"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/UserPartialUpdateRequest"}},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/ForgotPasswordResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}},"deprecated":false}},"/{id}/contacts":{"post":{"tags":["User Registration Service"],"summary":"Updates the user's contact information for authenticated user","operationId":"contactUpdateUsingPOST","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"Authorization","in":"header","description":"JWT token","required":true,"type":"string"},{"name":"id","in":"path","description":"id","required":true,"type":"string"},{"in":"body","name":"request","description":"request","required":true,"schema":{"$ref":"#/definitions/ContactUpdateRequest"}},{"name":"requestTraceId","in":"header","description":"Cross transaction unique ID","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/UserRegistrationResponse"}},"400":{"description":"Bad Request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}},"deprecated":false}},"/actuator/*":{"get":{"summary":"Actuator","operationId":"actuator","responses":{"200":{"description":""}}}}},"definitions":{"Account":{"type":"object","properties":{"accountId":{"type":"string","example":"1001001001","description":"The point of consumption unique identifier."},"challengeType":{"type":"string","example":"TAX_ID","description":"The type of challenge used to validate the data of an account.","enum":["LIQUOR_LICENSE","TAX_ID"]},"challengeValue":{"type":"string","example":"1234","description":"The value to be validated according to challengeType."},"zipCode":{"type":"string","example":"12345","description":"The zip code of the account."}},"title":"Account"},"Contact":{"type":"object","properties":{"email":{"type":"string","example":"example@email.com","description":"The contact's email address."},"phone":{"type":"string","example":"+9999999999999","description":"The contact's cell phone number."}},"title":"Contact"},"ContactUpdateRequest":{"type":"object","properties":{"country":{"type":"string","example":"US","description":"The resource country/region. ISO 3166 alpha-2 country code."},"contactVerification":{"description":"Information that identifies user authenticity.","$ref":"#/definitions/ContactVerification"}},"title":"ContactUpdateRequest"},"ContactUpdateResponse":{"type":"object","properties":{"id":{"type":"string","example":"10203","description":"The user's unique identifier."}},"title":"ContactUpdateResponse"},"ContactVerification":{"type":"object","properties":{"type":{"type":"string","example":"CELLPHONE","description":"The type used to validate a contact information.","enum":["CELLPHONE","EMAIL"]},"value":{"type":"string","example":"+551981818181","description":"The contact information to be validated according to type."},"pinCode":{"type":"string","example":"123456","description":"The verification code received at the contact entered in the value field."}},"title":"ContactVerification"},"ContactVerificationRequest":{"type":"object","properties":{"country":{"type":"string","example":"US","description":"The resource country/region. ISO 3166 alpha-2 country code."},"type":{"type":"string","example":"CELLPHONE","description":"The type used to validate a contact information.","enum":["CELLPHONE","EMAIL"]},"value":{"type":"string","example":"13111111111","description":"The contact information to be validated according to type."}},"title":"ContactVerificationRequest"},"ContactVerificationResponse":{"type":"object","properties":{"secondsToRetry":{"type":"integer","format":"int32","example":10,"description":"The time to wait for new contact verification retry."},"expirationDate":{"type":"string","format":"date-time","example":"2019-04-01T14:31:32.701Z","description":"A date-time that represents the expiration of the verification code."},"type":{"type":"string","example":"CELLPHONE","description":"The type used to validate a contact information.","enum":["CELLPHONE","EMAIL"]},"value":{"type":"string","example":"13111111111","description":"The contact information to be validated according to type."}},"title":"ContactVerificationResponse"},"Credential":{"type":"object","properties":{"password":{"type":"string","example":"P@ssw0rd","description":"The user's password."}},"title":"Credential"},"ErrorResponse":{"type":"object","properties":{"details":{"type":"array","items":{"$ref":"#/definitions/Issue"}},"message":{"type":"string"}},"title":"ErrorResponse"},"ForgotPasswordRequest":{"type":"object","properties":{"country":{"type":"string","example":"US","description":"The resource country/region. ISO 3166 alpha-2 country code."},"password":{"type":"string","description":"The new password set by the user."},"contactVerification":{"description":"Information that identifies user authenticity.","$ref":"#/definitions/ContactVerification"}},"title":"ForgotPasswordRequest"},"ForgotPasswordResponse":{"type":"object","properties":{"id":{"type":"string","example":"10203","description":"The user's unique identifier."}},"title":"ForgotPasswordResponse"},"Issue":{"type":"object","properties":{"attribute":{"type":"string"},"code":{"type":"string"},"message":{"type":"string"}},"title":"Issue"},"Personal":{"type":"object","properties":{"firstName":{"type":"string","example":"FirstName","description":"The user's first name."},"lastName":{"type":"string","example":"LastName","description":"The user's last name."}},"title":"Personal"},"UserPartialUpdateRequest":{"type":"object","properties":{"country":{"type":"string","example":"US","description":"The resource country/region. ISO 3166 alpha-2 country code."},"personal":{"$ref":"#/definitions/Personal"},"credential":{"$ref":"#/definitions/Credential"}},"title":"UserPartialUpdateRequest"},"UserPartialUpdateResponse":{"type":"object","properties":{"id":{"type":"string","example":"10203","description":"The user's unique identifier."}},"title":"UserPartialUpdateResponse"},"UserRegistrationRequest":{"type":"object","properties":{"country":{"type":"string","example":"US","description":"The resource country/region. ISO 3166 alpha-2 country code."},"firstName":{"type":"string","example":"Jessie","description":"The user's first name."},"lastName":{"type":"string","example":"Herbert","description":"The user's last name."},"email":{"type":"string","example":"email@example.com","description":"The user's email address."},"phone":{"type":"string","example":"+15417543010","description":"The user's cell phone number."},"contactVerificationType":{"type":"string","example":"CELLPHONE","description":"The type used to validate a contact information.","enum":["CELLPHONE","EMAIL"]},"contactVerificationCode":{"type":"string","example":"012345","description":"The verification code received at the contact entered in the value field."},"password":{"type":"string","example":"P@ssw0rd","description":"The user's password."},"account":{"$ref":"#/definitions/Account"}},"title":"UserRegistrationRequest"},"UserRegistrationResponse":{"type":"object","properties":{"id":{"type":"string","example":"10203","description":"The user's unique identifier."}},"title":"UserRegistrationResponse"},"UserValidation":{"type":"object","properties":{"country":{"type":"string","example":"US","description":"The resource country/region. ISO 3166 alpha-2 country code."},"account":{"$ref":"#/definitions/Account"},"contact":{"$ref":"#/definitions/Contact"},"personal":{"$ref":"#/definitions/Personal"},"contactVerification":{"$ref":"#/definitions/ContactVerification"},"credential":{"$ref":"#/definitions/Credential"}},"title":"UserValidation"}}}