This repository has been archived by the owner on Nov 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.json
1 lines (1 loc) · 20.5 KB
/
swagger.json
1
{"swagger":"2.0","info":{"description":"Check identity documents","version":"0.0","title":"IdCheck.IO API","contact":{"name":"[email protected]"}},"basePath":"/rest","tags":[{"name":"analysis"},{"name":"administration"},{"name":"sandbox"}],"paths":{"/v0/admin/health":{"get":{"tags":["administration"],"summary":"HTTP GET health","description":"GET server health (OK 200)","operationId":"getHealth","produces":["application/json; charset=utf-8"],"parameters":[],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of server health","schema":{"$ref":"#/definitions/HealthResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/v0/admin/user":{"get":{"tags":["administration"],"summary":"HTTP GET user","description":"Get user informations","operationId":"getUser","produces":["application/json; charset=utf-8"],"parameters":[{"name":"Accept-Language","in":"header","description":"Accept language header","required":false,"type":"string"}],"responses":{"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"successful operation","schema":{"$ref":"#/definitions/UserResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basic":[]}]}},"/v0/pdfreport/{analysisRefUid}":{"get":{"tags":["analysis"],"summary":"HTTP GET report (demo)","description":"Get a pdf report (base64 encoded) (demo)","operationId":"getReport","produces":["application/json; charset=utf-8"],"parameters":[{"name":"analysisRefUid","in":"path","description":"Report analysisRefUid","required":true,"type":"string"},{"name":"Accept-Language","in":"header","description":"Accept language header","required":false,"type":"string"}],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of pdf report (base64 encoded) (demo)","schema":{"$ref":"#/definitions/ReportResponse"}},"401":{"description":"Unautorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basic":[]}]}},"/v0/result/{analysisRefUid}":{"get":{"tags":["analysis"],"summary":"HTTP GET result","description":"Get result controls","operationId":"getResult","produces":["application/json; charset=utf-8"],"parameters":[{"name":"analysisRefUid","in":"path","description":"Result analysisRefUid","required":true,"type":"string"},{"name":"Accept-Language","in":"header","description":"Accept language header","required":false,"type":"string"},{"name":"rectoImageCropped","in":"query","description":"True to obtain recto image cropped if applicable","required":false,"type":"boolean","default":false},{"name":"faceImageCropped","in":"query","description":"True to obtain face image cropped if applicable","required":false,"type":"boolean","default":false},{"name":"signatureImageCropped","in":"query","description":"True to obtain signature image cropped if applicable","required":false,"type":"boolean","default":false}],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of result controls","schema":{"$ref":"#/definitions/ResultResponse"}},"401":{"description":"Unautorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basic":[]}]}},"/v0/sandbox/image/{imageUid}":{"get":{"tags":["sandbox"],"summary":"HTTP GET image","description":"GET image","operationId":"getImage","produces":["*/*"],"parameters":[{"name":"imageUid","in":"path","description":"EnumDemoDocsImage","required":true,"type":"string"},{"name":"rawType","in":"query","description":"Image raw type","required":false,"type":"string","enum":["BASE64","JPG"]},{"name":"face","in":"query","description":"Image face","required":false,"type":"string","enum":["RECTO","VERSO"]},{"name":"light","in":"query","description":"Image light","required":false,"type":"string","enum":["DL","IR","UV"]}],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of image","schema":{"type":"array","items":{"type":"string","format":"byte"}}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/v0/sandbox/imagelist":{"get":{"tags":["sandbox"],"summary":"HTTP GET images list","description":"GET images list","operationId":"getImageList","produces":["application/json; charset=utf-8"],"parameters":[],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of image list","schema":{"$ref":"#/definitions/ImageListResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/v0/sandbox/mrz/{mrzUid}":{"get":{"tags":["sandbox"],"summary":"HTTP GET mrz","description":"GET mrz","operationId":"getMrz","produces":["application/json; charset=utf-8"],"parameters":[{"name":"mrzUid","in":"path","description":"EnumDemoDocsMrz","required":true,"type":"string"}],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of mrz","schema":{"$ref":"#/definitions/MrzResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/v0/sandbox/mrzlist":{"get":{"tags":["sandbox"],"summary":"HTTP GET mrz list","description":"GET mrz list","operationId":"getMrzList","produces":["application/json; charset=utf-8"],"parameters":[],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of mrz list","schema":{"$ref":"#/definitions/MrzListResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}}}},"/v0/task/image":{"post":{"tags":["analysis"],"summary":"HTTP POST task image","description":"POST an image check task","operationId":"postImage","consumes":["application/json"],"produces":["application/json; charset=utf-8"],"parameters":[{"name":"asyncMode","in":"query","description":"true to activate asynchrone mode","required":false,"type":"boolean"},{"in":"body","name":"body","description":"Image request","required":true,"schema":{"$ref":"#/definitions/ImageRequest"}},{"name":"Accept-Language","in":"header","description":"Accept language header","required":false,"type":"string"}],"responses":{"202":{"description":"Successful retrieval of task detail","schema":{"$ref":"#/definitions/TaskResponse"}},"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of result controls","schema":{"$ref":"#/definitions/ResultResponse"}},"401":{"description":"Unautorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basic":[]}]}},"/v0/task/mrz":{"post":{"tags":["analysis"],"summary":"HTTP POST task mrz","description":"POST a mrz check task","operationId":"postMrz","consumes":["application/json"],"produces":["application/json; charset=utf-8"],"parameters":[{"name":"asyncMode","in":"query","description":"true to activate asynchrone mode","required":false,"type":"boolean"},{"in":"body","name":"body","description":"Mrz request","required":true,"schema":{"$ref":"#/definitions/MrzRequest"}},{"name":"Accept-Language","in":"header","description":"Accept language header","required":false,"type":"string"}],"responses":{"202":{"description":"Successful retrieval of task detail","schema":{"$ref":"#/definitions/TaskResponse"}},"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of result controls","schema":{"$ref":"#/definitions/ResultResponse"}},"401":{"description":"Unautorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basic":[]}]}},"/v0/task/{analysisRefUid}":{"get":{"tags":["analysis"],"summary":"HTTP GET task","description":"Get task status","operationId":"getTask","produces":["application/json; charset=utf-8"],"parameters":[{"name":"analysisRefUid","in":"path","description":"Task analysisRefUid","required":true,"type":"string"},{"name":"Accept-Language","in":"header","description":"Accept language header","required":false,"type":"string"},{"name":"wait","in":"query","description":"specify a maximum wait time in milliseconds","required":false,"type":"integer","format":"int64"}],"responses":{"503":{"description":"Service unailable","schema":{"$ref":"#/definitions/ErrorResponse"}},"404":{"description":"Not found","schema":{"$ref":"#/definitions/ErrorResponse"}},"200":{"description":"Successful retrieval of task detail","schema":{"$ref":"#/definitions/TaskResponse"}},"303":{"description":"Redirect to analysis result","schema":{"$ref":"#/definitions/TaskResponse"}},"401":{"description":"Unautorized","schema":{"$ref":"#/definitions/ErrorResponse"}},"400":{"description":"Bad request","schema":{"$ref":"#/definitions/ErrorResponse"}},"403":{"description":"Forbidden","schema":{"$ref":"#/definitions/ErrorResponse"}},"500":{"description":"Internal server error","schema":{"$ref":"#/definitions/ErrorResponse"}}},"security":[{"basic":[]}]}}},"securityDefinitions":{"basic":{"type":"basic"}},"definitions":{"ResultResponse":{"type":"object","required":["analysisRefUid","checkReportSummary","controls","documentClassification","documentDetail","holderDetail","mrz","uid"],"properties":{"uid":{"type":"string","description":"uid"},"analysisRefUid":{"type":"string","description":"analysisRefUid"},"checkReportSummary":{"$ref":"#/definitions/Check summary of the submitted document"},"documentClassification":{"$ref":"#/definitions/Classification of the submitted document"},"documentDetail":{"$ref":"#/definitions/Detailed information of the submitted document"},"holderDetail":{"$ref":"#/definitions/Detailed information of the holder of the submitted document"},"mrz":{"$ref":"#/definitions/Mrz"},"controls":{"type":"array","description":"Performed controls on the submitted document","items":{"$ref":"#/definitions/ControlGroup"}},"image":{"type":"array","description":"Cropped image of the submitted document according request","items":{"$ref":"#/definitions/ExtractedImage"}}}},"ControlGroup":{"type":"object","properties":{"identifier":{"type":"string","description":"control group identifier"},"titleMsg":{"type":"string","description":"title message"},"resultMsg":{"type":"string","description":"result message"},"result":{"type":"string","description":"result","enum":["NONE","OK","WARNING","ERROR"]},"control":{"type":"array","description":"control list","items":{"$ref":"#/definitions/Control"}}}},"Detailed information of the submitted document":{"type":"object","properties":{"emitCountry":{"type":"string","description":"emit country"},"emitDate":{"$ref":"#/definitions/event date"},"expirationDate":{"$ref":"#/definitions/event date"},"documentNumber":{"type":"string","description":"document number"},"extraInfos":{"type":"array","description":"additional informations","items":{"$ref":"#/definitions/GenericData"}}}},"UserResponse":{"type":"object","properties":{"remainingCredits":{"type":"integer","format":"int32","description":"user remaining credit"}}},"MrzRequest":{"type":"object","required":["line1"],"properties":{"apiVersion":{"type":"string","description":"API version (for backward compatibility purpose)"},"line1":{"type":"string","description":"ligne1 containing MRZ line number 1"},"line2":{"type":"string","description":"ligne2 containing MRZ line number 2"},"line3":{"type":"string","description":"ligne3 containing MRZ line number 3"}}},"Check summary of the submitted document":{"type":"object","required":["check"],"properties":{"check":{"type":"array","description":"check results","items":{"$ref":"#/definitions/Control"}}}},"Detailed information of the holder of the submitted document":{"type":"object","properties":{"lastName":{"type":"array","description":"list of lastnames","items":{"type":"string"}},"firstName":{"type":"array","description":"list of firstnames","items":{"type":"string"}},"usageName":{"type":"string","description":"usage name"},"nationality":{"type":"string","description":"nationality"},"gender":{"type":"string","description":"gender"},"address":{"type":"string","description":"address"},"birthDate":{"$ref":"#/definitions/event date"},"birthPlace":{"type":"string","description":"birth place"},"birthDpt":{"type":"string","description":"birth department"},"extraInfos":{"type":"array","description":"additional information","items":{"$ref":"#/definitions/GenericData"}}}},"TaskResponse":{"type":"object","required":["uid"],"properties":{"uid":{"type":"string","description":"analysisRefUid"},"isWithProgress":{"type":"boolean","description":"task with progress","default":false},"accepted":{"type":"integer","format":"int64","description":"task accepted date"},"started":{"type":"integer","format":"int64","description":"task started date"},"ended":{"type":"integer","format":"int64","description":"task ended date"},"lastProgress":{"type":"integer","format":"int64","description":"last progress date"},"percentage":{"type":"integer","format":"int32","description":"percentage progress"},"redirectUrl":{"type":"string","description":"redirect url"},"message":{"type":"string","description":"message"}}},"ImageRequest":{"type":"object","required":["frontImage","frontImageIr","frontImageUv"],"properties":{"apiVersion":{"type":"string","description":"API version (for backward compatibility purpose)"},"frontImage":{"type":"string","description":"frontImage containing front daylight image of the identity document (base64 encoded, no wrap, jpg/png/tiff/pdf format)"},"frontImageIr":{"type":"string","description":"frontImage containing front infrared image of the identity document (base64 encoded, no wrap, jpg/png/tiff/pdf format)"},"frontImageUv":{"type":"string","description":"frontImage containing front ultraviolet image of the identity document (base64 encoded, no wrap, jpg/png/tiff/pdf format)"},"backImage":{"type":"string","description":"backImage containing daylight back image of the identity document (base64 encoded, no wrap, jpg/png/tiff/pdf format)"},"backImageIr":{"type":"string","description":"backImage containing infrared back image of the identity document (base64 encoded, no wrap, jpg/png/tiff/pdf format)"},"backImageUv":{"type":"string","description":"backImage containing ultraviolet back image of the identity document (base64 encoded, no wrap, jpg/png/tiff/pdf format)"},"rectoImageCropped":{"type":"boolean","description":"rectoImageCropped true to obtain recto image cropped if applicable","default":false},"faceImageCropped":{"type":"boolean","description":"faceImageCropped true to obtain recto image cropped if applicable","default":false},"signatureImageCropped":{"type":"boolean","description":"signatureImageCropped true to obtain recto image cropped if applicable","default":false}}},"HealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["OK","WARN","ERROR"]}}},"Mrz":{"type":"object","required":["line1"],"properties":{"line1":{"type":"string","description":"line 1 of MRZ"},"line2":{"type":"string","description":"line 2 of MRZ"},"line3":{"type":"string","description":"line 3 of MRZ"}}},"Control":{"type":"object","properties":{"identifier":{"type":"string","description":"control identifier"},"titleMsg":{"type":"string","description":"title message"},"resultMsg":{"type":"string","description":"result message"},"result":{"type":"string","description":"result","enum":["NONE","OK","WARNING","ERROR"]}}},"GenericData":{"type":"object","properties":{"dataKey":{"type":"string","description":"data key"},"dataValue":{"type":"string","description":"data value"},"title":{"type":"string","description":"title"}}},"Classification of the submitted document":{"type":"object","properties":{"idType":{"type":"string","description":"identity document type","enum":["ID","P","RP","V","DL","UNKNOWN"]}}},"Image":{"type":"object","properties":{"doc":{"type":"string","enum":["CNI_BE_SPECIMEN","CNI_BE_SPECIMEN_MRZ","PASSEPORT_FR_SPECIMEN_NATACHA","PASSEPORT_FR_SPECIMEN_NATACHA_MRZ","CNI_FR_SPECIMEN_BERTHIER","CNI_FR_SPECIMEN_BERTHIER_MRZ","PASSEPORT_FR_SPECIMEN_GRAUX_MRZ","PASSEPORT_FR_SPECIMEN_GRAUX","CNI_BIH_SPECIMEN","CNI_BIH_SPECIMEN_MRZ","PASSEPORT_USA_FALSIFIE_TRAVELER","PASSEPORT_USA_FALSIFIE_TRAVELER_MRZ","RP_FR_SPECIMEN_MARTIN","RP_FR_SPECIMEN_MARTIN_MRZ","CNI_GBR_SPECIMEN_FREEMAN","CNI_GBR_SPECIMEN_FREEMAN_MRZ","PASSEPORT_CHN_SPECIMEN_ZHENGJIAN","PASSEPORT_CHN_SPECIMEN_ZHENGJIAN_MRZ","PASSEPORT_ITA_SPECIMEN_ROSSI","PASSEPORT_ITA_SPECIMEN_ROSSI_MRZ","RP_GBR_SPECIMEN_IVANOVA","RP_GBR_SPECIMEN_IVANOVA_MRZ","DL_FR_SPECIMEN_MARTIN","DL_FR_SPECIMEN_MARTIN_MRZ","ELECTRICITE_FR_BERTHIER","IMPOSITION_FR_BERTHIER","RIB_FR_BERTHIER","TELEPHONE_2DDOC_BERTHIER","CARTE_GRISE_DUPONT","SALAIRE_FR_BERTHIER"]},"face":{"type":"string","enum":["RECTO","VERSO"]},"rawType":{"type":"string","enum":["BASE64","JPG"]},"light":{"type":"string","enum":["DL","IR","UV"]}}},"ImageListResponse":{"type":"object","properties":{"images":{"type":"array","description":"get images list object","items":{"$ref":"#/definitions/Image"}}}},"MrzListResponse":{"type":"object","properties":{"mrz":{"type":"array","description":"get mrz list object","items":{"type":"string"}}}},"event date":{"type":"object","properties":{"day":{"type":"integer","format":"int32","description":"day number of date"},"month":{"type":"integer","format":"int32","description":"month number of date"},"year":{"type":"integer","format":"int32","description":"year of date"}}},"ErrorResponse":{"type":"object","properties":{"errorMessage":{"type":"string","description":"error message"}}},"ReportResponse":{"type":"object","required":["analysisRefUid","uid"],"properties":{"uid":{"type":"string","description":"uid"},"analysisRefUid":{"type":"string","description":"analysisRefUid"},"report":{"type":"string","description":"Pdf report (base64 encoded)"}}},"ExtractedImage":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["CROPPED_RECTO","CROPPED_VERSO","CROPPED_FACE","CROPPED_SIGNATURE","CROPPED_EMITTER_SIGNATURE"]},"imageDL":{"type":"array","items":{"type":"string","format":"byte"}},"imageIR":{"type":"array","items":{"type":"string","format":"byte"}},"imageUV":{"type":"array","items":{"type":"string","format":"byte"}},"page":{"type":"integer","format":"int32"},"indicators":{"type":"array","items":{"$ref":"#/definitions/ImageIndicator"}}}},"ImageIndicator":{"type":"object","required":["status","type"],"properties":{"type":{"type":"string"},"status":{"type":"string","enum":["NONE","OK","INFO","WARNING","ERROR"]},"value":{"type":"string"},"description":{"type":"string"}}},"MrzResponse":{"type":"object","properties":{"mrz":{"$ref":"#/definitions/Mrz"}}}}}