{"swagger":"2.0","info":{"description":"This is the API definition expected by the BOKAR Team","version":"1.0.0","title":"ACS API"},"host":"localhost:61643","schemes":["https","http"],"paths":{"/token":{"post":{"tags":["Auth"],"summary":"Get the token + configuration to start the validation flow. On token create, default FACE/DOCUMENT flows added to token itself.","consumes":["application/x-www-form-urlencoded"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ConfigurationRequest"}}],"responses":{"200":{"description":"Client ID and secret are correct and configuration is successfully returned","schema":{"$ref":"#/definitions/ConfigurationResponse"}},"400":{"$ref":"#/responses/BadRequest"},"401":{"$ref":"#/responses/Unauthorized"},"404":{"$ref":"#/responses/NotFound"},"500":{"$ref":"#/responses/InternalServer"}}}},"/document/detect":{"post":{"tags":["Document Detection"],"summary":"uploads a document ID picture to validate","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"in":"header","name":"authorization","description":"Bearer token","type":"string"},{"in":"formData","name":"file","description":"Document Picture to validate","type":"file","required":true}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ValidationResponse"}},"400":{"$ref":"#/responses/BadRequest"},"401":{"$ref":"#/responses/Unauthorized"},"404":{"$ref":"#/responses/NotFound"},"500":{"$ref":"#/responses/InternalServer"}}}},"/face/detect":{"post":{"tags":["Face detection"],"summary":"uploads a Face picture to validate","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"in":"header","name":"authorization","description":"Bearer token","type":"string"},{"in":"formData","name":"file","description":"Face Picture to validate","type":"file","required":true}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ValidationResponse"}},"400":{"$ref":"#/responses/BadRequest"},"401":{"$ref":"#/responses/Unauthorized"},"404":{"$ref":"#/responses/NotFound"},"500":{"$ref":"#/responses/InternalServer"}}}},"/token/status":{"post":{"tags":["Token Status Check"],"summary":"Get the last validation status for a token","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ValidationStatusRequest"}}],"responses":{"200":{"description":"Token is valid and linked to client id/secret, returns the validation status","schema":{"$ref":"#/definitions/ValidationStatusResponse"}},"400":{"$ref":"#/responses/BadRequest"},"401":{"$ref":"#/responses/Unauthorized"},"404":{"$ref":"#/responses/NotFound"},"500":{"$ref":"#/responses/InternalServer"}}}}},"responses":{"BadRequest":{"description":"*400 - Bad Request* - Something is wrong with the request.\n See Error > code to get more information\n - INVALID_PARAMETERS: A parameter is missing in the request or format is incorrect\n - FILE_FORMAT: Format of the image is not complient with the expected ones.\n - FILE_MISSING: Image was not sent in the request\n","schema":{"$ref":"#/definitions/ApiError"}},"Unauthorized":{"description":"*401 - Unauthorized* - Not Authorised.\nSee Error > code to get more information\n- TOKEN_INVALID: Invalid Token\n","schema":{"$ref":"#/definitions/ApiError"}},"NotFound":{"description":"*404 - Not found*.\nThe error code should provide more information. Depending on the API context, here are the available error codes.\n","schema":{"$ref":"#/definitions/ApiError"}},"MethodNotAllowed":{"description":"*405 - Method Not Allowed* - Update on this entity is not allowed.\nSee Error > code to get more information\n- METHOD_NOT_ALLOWED: The specified campaign is archived and could not be updated.\n","schema":{"$ref":"#/definitions/ApiError"}},"InternalServer":{"description":"*500 - Internal Server Error* - Unknown exception happened. More details in the Error object.\n- UNSPECIFIED: Unspecified error\n","schema":{"$ref":"#/definitions/ApiError"}}},"definitions":{"ApiError":{"type":"object","properties":{"code":{"type":"string","description":"an application-specific error code, expressed as a string value"},"title":{"type":"string","description":"a short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization."},"fields":{"description":"List of fields in error (if any)","type":"object","additionalProperties":{"$ref":"#/definitions/ApiErrorField"}}}},"ApiErrorField":{"type":"object","properties":{"name":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}}}},"ConfigurationRequest":{"type":"object","properties":{"grant_type":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"scope":{"type":"string"}}},"ConfigurationResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer","format":"int32"},"next_step":{"type":"string"},"next_validation_type":{"type":"string"},".issued":{"type":"string"},".expires":{"type":"string"},"validation_endpoint":{"type":"string","description":"Full URL to use for the next validation"}}},"ValidationResponse":{"type":"object","properties":{"status_code":{"type":"string","enum":["SUCCESS","FAILED","EXCEEDED"],"description":"Success code / error code of the validation status"},"next_validation_type":{"type":"string","description":"Returns the next validation type to pass. Empty if flow finished.","enum":["FACE","DOCUMENT"]},"next_validation_endpoint":{"type":"string","description":"Full URL to use for the next validation. Empty if flow finished."}}},"ValidationStatusRequest":{"type":"object","properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"token":{"type":"string"}}},"ValidationStatusResponse":{"type":"object","properties":{"status_code":{"type":"string","enum":["SUCCESS","FAILED","EXCEEDED"],"description":"Success code / error code of the validation status"}}}}}