{"openapi":"3.0.1","info":{"title":"API for PEN Match.","description":"This API is to match students to PENs.","version":"1"},"servers":[{"url":"https://pen-match-api-8878b4-dev.apps.silver.devops.gov.bc.ca","description":"Generated server url"}],"security":[{"OAUTH2":["READ_PEN_MATCH"]}],"tags":[{"name":"Endpoint to store possible matches.","description":"Endpoint to store possible matches."},{"name":"Endpoint to retrieve nicknames for a given name","description":"Endpoint to to retrieve nicknames for a given name."},{"name":"Endpoint to run pen match algorithm on the given payload.","description":"Endpoint to run pen match algorithm on the given payload."},{"name":"Endpoint to retrieve all possible match reason codes.","description":"Endpoint to retrieve all possible match reason codes."},{"name":"Endpoint to delete possible matches.","description":"Endpoint to delete possible matches."},{"name":"Endpoint to get possible matches by student id.","description":"Endpoint to get possible matches by student id."}],"paths":{"/api/v1/pen-match":{"post":{"tags":["Endpoint to run pen match algorithm on the given payload."],"operationId":"matchStudent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PenMatchStudent"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PenMatchResult"}}}},"400":{"description":"BAD REQUEST","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PenMatchResult"}}}}}}},"/api/v1/pen-match/possible-match":{"post":{"tags":["Endpoint to store possible matches."],"operationId":"savePossibleMatches","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"}}}},"required":true},"responses":{"201":{"description":"CREATED.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"}}}}},"400":{"description":"BAD REQUEST","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"}}}}}}},"delete":{"tags":["Endpoint to delete possible matches."],"operationId":"deletePossibleMatchesByStudentIDAndMatchedStudentID","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"}}}},"required":true},"responses":{"200":{"description":"OK."}}}},"/api/v1/pen-match/possible-match/{studentID}":{"get":{"tags":["Endpoint to get possible matches by student id."],"operationId":"getPossibleMatchesByStudentID","parameters":[{"name":"studentID","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"}}}}},"404":{"description":"NOT FOUND.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PossibleMatch"}}}}}}}},"/api/v1/pen-match/nicknames/{givenName}":{"get":{"tags":["Endpoint to retrieve nicknames for a given name"],"operationId":"getNicknames","parameters":[{"name":"givenName","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"description":"BAD REQUEST","content":{"*/*":{"schema":{"type":"array","items":{"type":"string"}}}}}}}},"/api/v1/pen-match/match-reason-codes":{"get":{"tags":["Endpoint to retrieve all possible match reason codes."],"operationId":"getAllMatchReasonCodes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MatchReasonCode"}}}}}}}}},"components":{"schemas":{"PenMatchStudent":{"required":["dob","sex","surname"],"type":"object","properties":{"pen":{"type":"string"},"dob":{"pattern":"^((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])$","type":"string"},"sex":{"type":"string"},"enrolledGradeCode":{"type":"string"},"surname":{"maxLength":255,"minLength":1,"type":"string"},"givenName":{"maxLength":255,"minLength":1,"type":"string"},"middleName":{"type":"string"},"usualSurname":{"type":"string"},"usualGivenName":{"type":"string"},"usualMiddleName":{"type":"string"},"mincode":{"type":"string"},"localID":{"type":"string"},"postal":{"type":"string"},"updateCode":{"type":"string"},"applicationCode":{"type":"string"},"assignNewPEN":{"type":"boolean"}}},"PenMatchRecord":{"type":"object","properties":{"matchingPEN":{"type":"string"},"studentID":{"type":"string"}}},"PenMatchResult":{"type":"object","properties":{"matchingRecords":{"type":"array","items":{"$ref":"#/components/schemas/PenMatchRecord"}},"penStatus":{"type":"string"},"penStatusMessage":{"type":"string"}}},"PossibleMatch":{"required":["createUser","matchReasonCode","matchedStudentID","studentID","updateUser"],"type":"object","properties":{"possibleMatchID":{"type":"string","format":"uuid"},"studentID":{"type":"string","format":"uuid"},"matchedStudentID":{"type":"string","format":"uuid"},"matchReasonCode":{"type":"string","enum":["PENMATCH","PENCREATE","DEMERGE","SPLIT","AU","SR","DR","MINISTRY","SC","DM","IF","FR","TX","SD","VT","DE"]},"createUser":{"type":"string"},"updateUser":{"type":"string"},"createDate":{"type":"string"},"updateDate":{"type":"string"}}},"MatchReasonCode":{"type":"object","properties":{"matchReasonCode":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"displayOrder":{"type":"integer","format":"int32"},"effectiveDate":{"type":"string"},"expiryDate":{"type":"string"},"createUser":{"type":"string"},"createDate":{"type":"string"},"updateUser":{"type":"string"},"updateDate":{"type":"string"}}}}}}