{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"991ed1f9-8e66-4f53-8c60-5e2e91b4a343","name":"Faces Recognition API","description":"## Introduction\n\n### Objectives\n\nThe **Facelytics Faces Recognition API** allows clients to use the Facelytics platform to create your own database of identity and ask for confirmation.\n\n### Requirements\n\nBefore starting, you should have received an email with a **clientId** and a **secretId**. These two IDs will be needed to use the API. If you did not receive it, please contact the [Faces Recognition support](mailto:support.services@wassa.io).\n\n### Integration Samples\n\nAlthough the API is quite easy to use, we’ve written some sample code for various platforms to help you start working with the API. The samples are available for Python, NodeJS, PHP, .NET, iOS (Swift) and Android (Kotlin). We’ve created a [Github repository](https://desktop.postman.com/?desktopVersion=9.31.0&userId=25439932&teamId=0) where you will find the sample code as well as some documentation for each platform.\n\n_⚠️ Important: the Facelytics Faces Recognition API is a subset of the Wassa Innovation Services (WIS) API, which provides many more services. Be sure to check the Authentication and Identity as those are the ones you will be need to implement for the Facelytics Faces Recognition platform. All other APIs can be safely ignored._\n\n### Principles\n\nThe **Facelytics Faces Recognition API** contains predictable resource-oriented URLs, that accept JSON request bodies and returns JSON responses. It uses standard HTTP responses codes (200, 404, etc.) and verbs (GET, POST, etc.) as well as an HTTP header for authentication.\n\n## How it works ?\n\n### Authentication\n\n#### Login\n\nAuthentication is made with the `POST /login` route, with `clientId` and a `secretId` as parameters. It will return an **access token** that will be needed to call all other routes, as well as a **refresh token**. Both the access and refresh tokens have a **lifetime of 1 hour**.\n\nThe `/login` route does not use any authorization.\n\n#### Refresh token\n\nIf your access token is expired, you need to call the `POST /token` route with your refresh token in the body to refresh your access token.\n\n_⚠️ Important: The access token must be included in the Authorization header even if it's expired (see \"Call the routes\" for more information)._\n\n### Call the routes\n\nOnce authenticated, you can use the API. All routes require the access token to be sent in the `Authorization` HTTP header as a Bearer token : `Authorization: Bearer xxxxxxx`, where `xxxxxxx` is the **access_token** you received in the `POST /login` response.\n\n### Workflow\n\nThe **Facelytics Faces Recognition API** is asynchronous because the media you send to the API may take some time to be processed. **Facelytics Faces Recognition API** is divided in 3 different services :\n\n_⚠️Important, for each schema we assume that each service is used independently and that you have to login each time. If you use them one after the other, you can skip the login step._\n\n#### Identity\n\nThis service allows you to create, modify and delete an identity.\n\n1. `POST /innovation-service/identity` to create an identity job. The route will return a unique **job ID**.\n2. `GET /innovation-service/identity` to get the status of the job (started, completed, etc.) and the result. You will need to pass the job ID from step 1. Please note that calling this route multiple time until \"succeed\" is optional and can be skipped if you use WebSockets (see below)\n3. `DELETE /innovation-service/identity` to delete an identity. The route will return a 204 if succeed.\n4. `PUT /innovation-service/identity` to add images to an identity. The route will return a unique **job ID**\n    \n\n_⚠️ Important : step 2 must be called periodically as long as long as the processing is not done, wether it's successful or failed._\n\n<img src=\"https://content.pstmn.io/fd4f3a5e-b382-4c41-b05d-4f15993c292f/aW1hZ2UucG5n\" width=\"2204\" height=\"2124\">\n\n#### Search\n\nThis service allows you to search for identities among all the identities linked to the account.\n\n1. `POST /innovation-service/identity/search` to create a search job in all identity you have created. The route will return a unique **job ID**.\n2. `GET /innovation-service/identity/search` to get the status of the job (started, completed, etc.) and the result. You will need to pass the job ID from step 1. Please note that calling this route multiple time until \"succeed\" is optional and can be skipped if you use WebSockets (see below)\n    \n\n_⚠️ Important : step 2 must be called periodically as long as long as the processing is not done, wether it's successful or failed._\n\n<img src=\"https://content.pstmn.io/feb59e4e-92c8-4147-bacf-dcd18256f787/aW1hZ2UucG5n\" width=\"2204\" height=\"1368\">\n\n#### Recognize\n\nThis service allows you to run a recognition job with a specified identity_id.\n\n1. `POST /innovation-service/identity/recognize` to create a recognize job with 1 specific identity, you need to send **identity_id** in the body. The route will return a unique **job ID**.\n2. `GET /innovation-service/identity/recognize` to get the status of the job (started, completed, etc.) and the result. You will need to pass the job ID from step 1. Please note that calling this route multiple time until \"succeed\" is optional and can be skipped if you use WebSockets (see below)\n    \n\n_⚠️ Important : step 2 must be called periodically as long as long as the processing is not done, wether it's successful or failed._\n\n<img src=\"https://content.pstmn.io/92afdd3b-69a6-490d-b460-a62591042542/aW1hZ2UucG5n\" width=\"2204\" height=\"1328\">\n\n### Web Socket\n\nCalling the `GET /innovation-service/identity` , `GET /innovation-service/identity/search` and `GET /innovation-service/identity/recognition`route periodically to get a job status as described earlier can be non effective.\n\nThat's why you can implement the WebSockets pattern, to be automatically notified when the status of a job changes.\n\nWhen using WebSockets, you don't need to call the job status URL periodically. You just need to create an event handler that will be fired when you receive data from the WebSocket.\n\n_⚠️ Important : WebSockets doesn't replace GET_ `/innovation-service/identity` call, it will communicate only the status of the job before calling this url.\n\nPlease follow our WebSockets implementation guideline to get started: [WebSocket implementation](https://desktop.postman.com/?desktopVersion=9.31.0&userId=25439932&teamId=0).\n\nWorkflow of identity with WebSockets\n\n<img src=\"https://content.pstmn.io/020e40be-91c5-4403-890a-50ae8bcaa6eb/aW1hZ2UucG5n\" width=\"3924\" height=\"3128\">\n\nWorkflow of search with WebSockets\n\n<img src=\"https://content.pstmn.io/bff83a3e-1f87-437e-bb0a-a2d6b006be32/aW1hZ2UucG5n\" width=\"3924\" height=\"2084\">\n\nWorkflow of recognize with WebSockets\n\n<img src=\"https://content.pstmn.io/8a4fd88e-e3c1-452e-97e5-dd92876b525b/aW1hZ2UucG5n\" width=\"3924\" height=\"2084\">\n\n## Supported file formats\n\nThe Facelytics Faces Attributes API supports the following formats :\n\n- Images\n    - JPEG\n    - PNG\n\nPlease refer to the `input_format` parameter description in the \\```POST /innovation-service/identity` for a detail list of supported mime-types``\n\n## Limitations\n\nFile size you send to the **Facelytics Faces Recognition API** must be less than **2 GB**.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"25439932","collectionId":"991ed1f9-8e66-4f53-8c60-5e2e91b4a343","publishedId":"2s935pr3wQ","public":true,"publicUrl":"https://documenter-api.postman.tech/view/25439932/2s935pr3wQ","privateUrl":"https://go.postman.co/documentation/25439932-991ed1f9-8e66-4f53-8c60-5e2e91b4a343","customColor":{"top-bar":"EF3FA9","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-single-column","customisation":null,"version":"8.10.1","publishDate":"2023-02-08T14:05:30.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"Facelytics Faces Recognition API Documentation","id":"8f057c60-a468-4ccb-8690-0ca042b113b6","owner":"25439932","values":[{"key":"url","value":"https://api.services.wassa.io","enabled":true,"type":"default"},{"key":"token","value":"","enabled":true,"type":"any"},{"key":"refreshToken","value":"","enabled":true,"type":"any"},{"key":"job_id","value":"","enabled":true,"type":"default"},{"key":"identity_id","value":"","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Facelytics Faces Recognition API Documentation","value":"25439932-8f057c60-a468-4ccb-8690-0ca042b113b6"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s935pr3wQ"}