{"swagger":"2.0","info":{"title":"Nafath App","version":"1.0"},"servers":[{"url":"https://nafath.api.elm.sa/stg","description":"Staging"},{"url":"https://nafath.api.elm.sa","description":"Production"}],"paths":{"/api/v1/mfa/request":{"post":{"tags":["Create Request"],"summary":"Send MFA Request","description":"Create a new request within Nafath app for the targeted User.","operationId":"createMfaRequest","parameters":[{"name":"APP-ID","in":"header","description":"The consumer API access app id.","required":true,"schema":{"type":"string"}},{"name":"local","in":"query","description":"“ar” or “en”, default “ar” if not provided.","required":true,"schema":{"type":"string"}},{"name":"requestId","in":"query","description":"Unique identifier to identify the callback request, created by the client.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/MfaRequestModel"}}},"required":true},"responses":{"200":{"description":"NAFATH MFA request created","content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/MfaRequestResponseDto"}}}}}}},"/api/v1/mfa/request/status":{"post":{"tags":["Get Request Status"],"summary":"Retrieve MFA request status.","description":"This API checks the status of the request.","operationId":"getMfaRequestStatus","parameters":[{"name":"APP-ID","in":"header","description":"The consumer API access app id.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/MfaStatusRequestModel"}}},"required":true},"responses":{"200":{"description":"NAFATH MFA retrieve status success","content":{"application/json;charset=utf-8":{"schema":{"$ref":"#/components/schemas/MfaStatusResponseDto"}}}}}}},"/api/v1/mfa/jwk":{"get":{"tags":["Retrieve JWK"],"summary":"Retrieve JWK","description":"Retrieve ELM JWK, to use the Key for token verification.","operationId":"getMapping","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JSONObject"}}}}}}}},"components":{"schemas":{"MfaRequestModel":{"required":["nationalId","service"],"type":"object","properties":{"nationalId":{"pattern":"^[1234569]{1}\\d{9}$","type":"string","description":"Targeted User national id"},"service":{"type":"string","description":"Service Type"}}},"MfaRequestResponseDto":{"type":"object","properties":{"transId":{"type":"string","description":"Transaction Identifier"},"random":{"type":"string","description":"Random number to be display to the end-user"}}},"MfaStatusRequestModel":{"required":["nationalId","random","transId"],"type":"object","properties":{"nationalId":{"pattern":"^[123456]{1}\\d{9}$","type":"string","description":"Targeted User national id"},"transId":{"pattern":"^(?:\\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\\}{0,1})$","type":"string","description":"Transaction Id returned by Create MFA request service"},"random":{"pattern":"^\\d{2}$","type":"string","description":"Random Number returned by Create MFA request service"}}},"MfaStatusResponseDto":{"type":"object","properties":{"status":{"type":"string","description":"Request status.","enum":["WAITING","EXPIRED","REJECTED","COMPLETED"]}}},"JSONObject":{"type":"object","properties":{"empty":{"type":"boolean"}},"additionalProperties":{"type":"object"}}}},"schemes":["http"]}