Skip to content

Enrollment API

Create Face Enrollment

Send a POST request to http://{IP}:{PORT}/api/v1/face-enroll by providing these arguments as application/json.

Argument Example Type Description
id 32 integer Autoincrement
name Meidy string Person’s name
nik 123 string Person’s NIK
gender MALE string FEMALE or MALE
birth_date 03/04/2018 string DD/MM/YYYY
nationality Indonesia string Country name where s/he was born
status vip string Person’s title
images []base64 array List of image to upload

Response

HTTP Mapping 200 OK

{
   "ok":true,
   "message":"success create face enrollment",
   "data":true
}

HTTP Mapping 200 OK

{
   "ok":false,
   "message":"NIK is already exist"
}

Update Face Enrollment

Send a PUT request to http://{IP}:{PORT}/api/v1/face-enroll by providing these arguments as application/json.

Argument Example Type Description
id 32 integer Autoincrement
name Meidy string Person’s name
nik 123 string Person’s NIK
gender MALE string FEMALE or MALE
birth_date 03/04/2018 string DD/MM/YYYY
nationality Indonesia string Country name where s/he was born
status vip string Person’s title
images []base64 array List of image to upload

HTTP Mapping 200 OK

{
   "ok":true,
   "message":"succes update face enrollment",
   "data":{
      "id":358,
      "foldername":"358@meidy",
      "filenames":[
         "20190428180201993.jpg",
         "20190428180201994-crop.jpg"
      ],
      "created_at":"2019-04-28T10:55:00.122Z",
      "updated_at":"2019-04-28T11:02:01.994Z",
      "name":"meidy",
      "identity_tag":"17025686938058753",
      "nik":"123454432",
      "gender":"male",
      "birth_date":"03/04/2018",
      "nationality":"indonesia",
      "status":"vip"
   }
}

Delete Face Enrollment

Send a DELETE request to http://{IP}:{PORT}/api/v1/face-enroll/:idFaceEnrollment by providing these arguments as application/json.

Argument Example Type Description
id 32 integer ID data face enrollment

HTTP Mapping 200 OK

{
 "ok": true,
 "message": "Delete face enrollment success"
}

Get One Face Enrollment

Send a GET request to http://{IP}:{PORT}/api/v1/face-enroll/:idFaceEnrollment by providing these arguments as application/json.

Argument Example Type Description
id 32 integer ID data face enrollment

HTTP Mapping 200 OK

{
   "ok":true,
   "message":"success get data face enrollment",
   "data":[
      {
         "id":355,
         "name":"Anharry",
         "foldername":"355@anharry",
         "filenames":[
            "link-to-image.jpg",
            "link-to-image-crop.jpg"
         ],
         "identity_tag":"17020062292508673",
         "nik":"117812",
         "gender":"male",
         "birth_date":"04/04/1990",
         "nationality":"indonesia",
         "status":"vip",
         "created_at":"2019-04-28T09:59:07.499Z",
         "updated_at":"2019-04-28T10:02:38.214Z"
      }
   ]
}

Get All Face Enrollment

Send a GET request to http://{IP}:{PORT}/api/v1/face-enroll by providing these arguments as application/json.

HTTP Mapping 200 OK

{
   "ok":true,
   "message":"success get all data face enrollment",
   "data":[
      {
         "id":355,
         "name":"Anharry",
         "foldername":"355@anharry",
         "filenames":[
            "link-to-image.jpg",
            "link-to-image-crop.jpg"
         ],
         "identity_tag":"17020062292508673",
         "nik":"117812",
         "gender":"male",
         "birth_date":"04/04/1990",
         "nationality":"indonesia",
         "status":"vip",
         "created_at":"2019-04-28T09:59:07.499Z",
         "updated_at":"2019-04-28T10:02:38.214Z"
      },
      {
         "id":349,
         "name":"Ambita",
         "foldername":"349@ambita",
         "filenames":[
            "link-to-image.jpg",
            "link-to-image-crop.jpg"
         ],
         "identity_tag":"17016921765445633",
         "nik":"1219201290129",
         "gender":"male",
         "birth_date":"10/04/2018",
         "nationality":"indonesia",
         "status":"Guest",
         "created_at":"2019-04-28T09:27:55.622Z",
         "updated_at":"2019-04-28T09:27:55.787Z"
      }
   ]
}