Webhooks
Autoinspector notifica vía webhooks a tu sistema que es lo que está pasando con una inspección. De esta manera, tu sistema puede recibir información en tiempo real del estado de una inspección, el procesamiento de una imagen, etc.
Crear webhook
Eventos
Un evento representa una acción o hecho que acontece dentro del flujo de una inspección. Los eventos que se encuentran disponibles son:
inspection_created
: Se dispara cuando se crea una inspección.children_inspection_created
: Ocurre cuando se crea una inspección partiendo de una inspección expirada (finalizada por sistema)inspection_started
: Se dispara cuando una inspection ya fue finalizada y se tiene el veredicto final de la misma.image_processed
: Se dispara cuando una foto fue procesada y finalizaron todas las validaciones.inspection_blocked
: Se dispara cuando una inspection fue bloqueda. El motivo del bloqueo puede ser porque la inspección expiró o llegó al límite de intentos al colocar el códigoinspection_completed
: Se envía cuando una inspection ya fue finalizada y se tiene el veredicto final de la mismainspection_reviewed
: Se envía cuando una inspección completada sufre cambios y su resultado fue actualizado.
Cada uno de estos eventos son enviados al endpoint configurado realizando una HTTP REQUEST de tipoPOSTcon información relacionada al evento:
Dirigite a Inspection Object Reference para comprender que significa cada cosa.
- inspection_created
- children_inspection_created
- inspection_started
- image_processed
- inspection_blocked
- inspection_completed
- inspection_reviewed
{
"event": "inspection_created",
"payload": {
"_id": "651ae032ff786d198dfa4ce4",
"status": "created",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "johndoe@gmail.com",
},
"type": "car",
"metadata": {
"my_custom_key":"my_custom_value"
},
"testing": false,
"template": {
"name": "easy",
"type": "built-in",
"_id": "62be865212ca0918bcabf2a5"
},
"magicLink": "https://app.autoinspector.ai/inspection/651ae032ff786d198dfa4ce4?accessCode=5087"
}
}
{
"event": "children_inspection_created",
"payload": {
"_id": "657b2dc8fa2a696fcd56946b",
"parentInspectionId": "657b1a7d2f1446f1b9ee0552",
"status": "created",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "Luciano",
"username": "lcnlvrzz",
"email": "lucianoalvarez1212@gmail.com",
"lastName": "Alvarez"
},
"type": "car",
"metadata": {
"templateId": "657b17d89b8f27657c96c315",
"parentInspectionId": "657b1a7d2f1446f1b9ee0552"
},
"testing": false,
"template": {
"name": "UNIQUE AUTO CUSTOM",
"type": "created",
"_id": "657b17d89b8f27657c96c315"
},
"magicLink": "https://app.autoinspector.ai/inspection/651ae032ff786d198dfa4ce4?accessCode=5087"
}
}
{
"event": "inspection_started",
"payload": {
"_id": "651ae032ff786d198dfa4ce4",
"status": "started",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "johndoe@gmail.com",
},
"type": "car",
"metadata": {
"my_custom_key":"my_custom_value"
},
"testing": false,
"template": {
"name": "easy",
"type": "built-in",
"_id": "62be865212ca0918bcabf2a5"
}
}
}
{
"event": "image_processed",
"payload": {
"_id": "651ae032ff786d198dfa4ce4",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "johndoe@gmail.com",
},
"type": "car",
"metadata": {
"my_custom_key":"my_custom_value"
},
"testing": false,
"template": {
"name": "easy",
"type": "built-in",
"_id": "62be865212ca0918bcabf2a5"
},
"entities": [],
"scope": "product",
"product": {
"_id": "651ae032ff786d198dfa4cf1",
"image": {
"entities": [],
"templateImageIdentifier": "image_3e1153f3-66fa-4463-973a-fe277894c9df",
"type": "normal",
"target": "product",
"side": "back",
"processed": true,
"uploadedAt": "2023-10-02T15:29:53.000Z",
"_id": "651ae1f2ff786d198dfa4e20",
"validations": [
{
"confidence": 99.99993896484375,
"identifier": "candidate_96b69c40-5ef9-46c3-899e-e0ed37ee6d02",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 95.7,
"identifier": "candidate_04f8f69c-d817-4fe2-b3f8-64ba09f7ebd0",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 95.7,
"identifier": "candidate_2a66f6bc-77a7-44f3-aea7-bdd4b24c4cce",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 99,
"identifier": "candidate_b8848e93-1c11-4876-9869-9adaa1f4ab6e",
"valid": true,
"validation": "plate",
"required": true
},
{
"confidence": 90,
"identifier": "candidate_696f64c3-b8fe-4382-9905-b539540b709f",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 92.80000000000001,
"identifier": "candidate_cd9227dc-3dd3-4f7d-be35-2d139e84cd4d",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 99.98935461044312,
"identifier": "candidate_81f1306b-b904-4afa-a1e5-f183a2d040c5",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 99.99420642852783,
"identifier": "candidate_371b8a6f-b459-412a-8586-fb9af15b90eb",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_d191cd50-5ed7-4b11-88b3-6f35dc5677dd",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_328142df-4e12-4009-9774-291266500358",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 98.23,
"identifier": "candidate_e16b1d8d-016c-4174-8d5f-9f5ce28f0369",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_0665678c-4c72-4c45-b2e1-37c9b6ff4ce4",
"valid": false,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/back-1696260591720.jpeg",
"damages": [
{
"part": "trunk",
"percentage": 1.97,
"damage": "dent"
}
]
}
}
}
}
{
"event": "inspection_blocked",
"payload": {
"_id": "651ae032ff786d198dfa4ce4",
"status": "blocked",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "johndoe@gmail.com",
},
"type": "car",
"metadata": {
"my_custom_key":"my_custom_value"
},
"testing": false,
"template": {
"name": "easy",
"type": "built-in",
"_id": "62be865212ca0918bcabf2a5"
}
}
}
{
"event": "inspection_completed",
"payload": {
"_id": "646ee7dc5b7220a2e2ed76b8",
"status": "completed",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "johndoe@gmail.com",
},
"metadata": {
"my_custom_key":"my_custom_value"
},
"testing": false,
"template": {
"_id": "62be865212ca0918bcabf2a5",
"name": "easy",
"type": "built-in",
"inputs": [
{
"identifier": "input_bf5dd369-3a82-4b0d-b8be-5186da9c07c7",
"label": "Nombre",
"value": "John"
},
{
"identifier": "input_db30b856-594e-4799-9ee9-2dacfbe2a338",
"label": "Apellido",
"value": "Doe"
},
{
"identifier": "input_79519a40-3047-48c4-b8db-5c95c8b5166a",
"label": "Identificación",
"value": "44188219"
},
{
"identifier": "input_1b00981a-1484-4f53-8702-2a6d43fd6662",
"label": "Email",
"value": "johndoe@gmail.com"
},
{
"identifier": "input_79bdb79b-c3d4-40d5-905e-bdaf1f1e02cb",
"label": "Ciudad",
"value": "testing"
},
{
"identifier": "input_a00ae5cb-e633-4b9a-98b8-863eeac96e5c",
"label": "País",
"value": "AR"
},
{
"identifier": "input_53ca83e7-413a-4435-9c2f-8206630142a8",
"label": "Provincia",
"value": "T"
},
{
"identifier": "input_21de8e3a-87c9-474a-9f10-a4dc9ecbf083",
"label": "Sexo",
"value": "male"
},
{
"identifier": "input_25dd4378-395d-4fe6-8306-65dcead884b0",
"label": "Nacimiento",
"value": "2002-06-19T00:00:00.000Z"
},
{
"identifier": "input_3f8023b1-2062-4679-b455-f69a1211af1e",
"label": "Dirección",
"value": "testing 100"
},
{
"identifier": "input_f2aaa964-9944-4d04-b86c-33044d00fef6",
"label": "Teléfono",
"value": "03813635420"
},
{
"identifier": "input_35c6a25f-6407-4755-a225-47d72bc02530",
"label": "Patente",
"value": "AZ204SU"
},
{
"identifier": "input_9f7a5106-09ae-49ab-a58a-b28952725ce0",
"label": "Año",
"value": 2020
},
{
"identifier": "input_e7f39d45-cf28-422f-a643-4f6e81127065",
"label": "Color",
"value": "grey"
},
{
"identifier": "input_23fa1c2b-b87f-4780-92d8-f8665f21288b",
"label": "Uso",
"value": "PRIVADO"
},
{
"identifier": "input_8e20f135-42b9-42cc-9ab5-abc4d32cdea3",
"label": "Marca",
"value": "JEEP"
},
{
"identifier": "input_0f2e6fb5-ca87-480a-984f-0afa54d5f924",
"label": "Modelo",
"value": "RENEGADE"
}
]
},
"veredict": "approved",
"type": "car",
"completedBy": "client",
"identity": {
"images": [
{
"validations": [
{
"validation": "date",
"_id": "62cd9215ecac9905ccf303d5",
"confidence": 100,
"valid": true
},
{
"validation": "distance",
"_id": "62cd9215ecac9905ccf303d6",
"confidence": 100,
"valid": true
},
{
"validation": "recaptured",
"_id": "62cd9215ecac9905ccf303d7",
"confidence": 95.01,
"valid": true
},
{
"validation": "face_comparison",
"_id": "62cd9215ecac9905ccf303d8",
"confidence": 100,
"valid": true
}
],
"entities": [
{
"entity": "passport",
"valid": true,
"result": {
"sex": "M",
"surname": "CASTILLO",
"givenNames": "JUAN PABLO",
"nationality": "ARGENTINA",
"dateOfBirth": "21 FEB/FEB 87",
"placeOfBirth": "ARG",
"dateOfIssue": "13 JUN/JUN 16",
"dateOfExpiry": "13 JUN/JUN 26",
"personalNumber": "32815355",
"authority": "RENAPER",
"documentNumber": "AAE054537",
"issuingCountry": "ARG"
}
}
],
"damages": [],
"side": "pasaporte",
"processed": true,
"uploadedAt": "2022-07-12T15:22:56.000Z",
"_id": "62cd920cecac9905ccf3032d",
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/pasaporte-1657639433699.jpeg",
"target": "identity"
},
{
"validations": [
{
"validation": "date",
"_id": "62cd9215ecac9905ccf303d5",
"confidence": 100,
"valid": true
},
{
"validation": "distance",
"_id": "62cd9215ecac9905ccf303d6",
"confidence": 100,
"valid": true
},
{
"validation": "recaptured",
"_id": "62cd9215ecac9905ccf303d7",
"confidence": 95.01,
"valid": true
},
{
"validation": "face_comparison",
"_id": "62cd9215ecac9905ccf303d8",
"confidence": 100,
"valid": true
},
{
"validation": "birthdate",
"_id": "62cd9215ecac9905ccf303d9",
"confidence": 100,
"valid": false
},
{
"validation": "dni",
"_id": "62cd9215ecac9905ccf303db",
"confidence": 100,
"valid": true
},
{
"validation": "full_name",
"_id": "62cd9215ecac9905ccf303de",
"confidence": 100,
"valid": true
},
{
"validation": "sex",
"_id": "62cd9215ecac9905ccf303e0",
"confidence": 100,
"valid": true
},
{
"validation": "age",
"_id": "62cd9215ecac9905ccf303e2",
"confidence": 100,
"valid": false
},
{
"validation": "object",
"_id": "62cd9215ecac9905ccf303e3",
"confidence": 98.41889953613281,
"valid": true
}
],
"damages": [],
"side": "dni",
"processed": true,
"uploadedAt": "2022-07-12T15:23:56.000Z",
"_id": "62cd920cecac9905ccf3039d",
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/dni-1657639433699.jpeg",
"target": "identity"
},
{
"validations": [
{
"validation": "date",
"_id": "62cd9210ecac9905ccf303bd",
"confidence": 100,
"valid": true
},
{
"validation": "distance",
"_id": "62cd9210ecac9905ccf303be",
"confidence": 100,
"valid": true
},
{
"validation": "recaptured",
"_id": "62cd9210ecac9905ccf303bf",
"confidence": 99.95,
"valid": true
},
{
"validation": "age",
"_id": "62cd9210ecac9905ccf303c0",
"confidence": 99.99873352050781,
"valid": true
},
{
"validation": "face_comparison",
"_id": "62cd9210ecac9905ccf303c1",
"confidence": 0,
"valid": false
},
{
"validation": "object",
"_id": "62cd9210ecac9905ccf303c2",
"confidence": 99.8077163696289,
"valid": true
}
],
"damages": [],
"side": "selfie",
"processed": true,
"uploadedAt": "2022-07-12T15:23:56.000Z",
"_id": "62cd920cecac9905ccf303a7",
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/selfie-1657639435560.jpeg",
"target": "identity"
}
],
"extraImages": [],
"email": "lucianoalvarez1212@gmail.com",
"firstName": "Luciano",
"identification": "44188219",
"lastName": "Alvarez"
},
"custom": {
"images": [],
"inputs": [
{
"label": "Seleccione los accesorios que desea asegurar",
"type": "multiselect",
"identifier": "input_525a71d5-3e1d-47e3-b2f5-1238d33190be",
"value": [
{
"selected": "Llantas especiales"
},
{
"selected": "Radio"
}
]
}
],
"extraImages": []
},
"products": [
{
"type": "car",
"car": {
"plate": "AZ204SU",
"color": "grey",
"make": "JEEP",
"model": "RENEGADE",
"use": "PRIVADO",
"year": 2020
},
"_id": "646ee7dd5b7220a2e2ed76c5"
"extraImages": [],
"inputs": [],
"images": [
{
"templateImageIdentifier": "image_3e1153f3-66fa-4463-973a-fe277894c9df",
"type": "normal",
"target": "product",
"side": "back",
"processed": true,
"uploadedAt": "2023-05-25T04:46:40.000Z",
"_id": "646ee8305b7220a2e2ed7718",
"validations": [
{
"confidence": 99.99993896484375,
"identifier": "candidate_2b136747-6293-4fe8-abf5-1532a7d97581",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 95.7,
"identifier": "candidate_df69203b-a9f1-4225-bfbb-5df5198b806f",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 95.7,
"identifier": "candidate_20168d44-92b5-4e71-967d-7dbddf042718",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 99,
"identifier": "candidate_f2249ef8-8360-4b35-b8f7-c941dfd9a3ba",
"valid": true,
"validation": "plate",
"required": true
},
{
"confidence": 90,
"identifier": "candidate_228671dc-c9a2-48d9-b3f0-632f362fc136",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 92.80000000000001,
"identifier": "candidate_3e18a4b3-7b1d-4cd5-bf69-22dfc5e6f37a",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 99.98935461044312,
"identifier": "candidate_0748121d-42b8-40f3-8889-90d88cbdf17f",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 99.99420642852783,
"identifier": "candidate_2514b86c-6ba6-4c4f-8eb1-450090ceb819",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_4bb107a9-9c46-430f-835f-541650635caf",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_028b92d5-a8cc-4c6e-85fa-220c2927687b",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 98.23,
"identifier": "candidate_c65a8d0c-62c1-4732-9317-b08237fce958",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_c40b3705-64e8-4faa-9648-bea7df4e8389",
"valid": false,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/back-1684989998800.jpeg",
"damages": [
{
"part": "trunk",
"percentage": 1.97,
"damage": "dent"
}
]
},
{
"templateImageIdentifier": "image_69c8e668-7c20-489e-ace8-74d4d5cc833a",
"type": "normal",
"target": "product",
"side": "front",
"processed": true,
"uploadedAt": "2023-05-25T04:46:44.000Z",
"_id": "646ee8345b7220a2e2ed7769",
"validations": [
{
"confidence": 99.80770111083984,
"identifier": "candidate_18276ec7-7502-4ed4-a067-f54f745bb50e",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 92.5,
"identifier": "candidate_2b58b84d-ff4b-4cf1-9615-7f735659de17",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 92.5,
"identifier": "candidate_fa7b952a-cd6a-449c-ba1d-8106e522de41",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 99,
"identifier": "candidate_e7a7b281-2bbc-4b8b-b76f-9acc13f5000f",
"valid": true,
"validation": "plate",
"required": true
},
{
"confidence": 89.7,
"identifier": "candidate_ef42b770-1721-410e-ae77-93b0fa5c1028",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 90.9,
"identifier": "candidate_ce035a0a-9d75-4bcd-94bc-b10d806d67c9",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 0.14095206279307604,
"identifier": "candidate_0ba18bf2-075e-45d0-988a-64a7c9d21b3c",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 96.16938829421997,
"identifier": "candidate_cae171db-1b0a-4351-8bca-052517c31703",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_b2fb826a-06b2-4d82-a9f6-a8a0dd700804",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_a7bef5c9-f877-4928-94f4-6417c277395b",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 97.65,
"identifier": "candidate_36812f63-4a21-492c-9e56-9b3a8426c629",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_470dd1b6-c020-44e2-99ea-018decba540d",
"valid": true,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/front-1684990002943.jpeg",
"damages": []
},
{
"templateImageIdentifier": "image_36d5963f-c1c3-4f81-86dd-cf26e7e2d965",
"type": "normal",
"target": "product",
"side": "sideLeft",
"processed": true,
"uploadedAt": "2023-05-25T04:46:49.000Z",
"_id": "646ee83a5b7220a2e2ed7779",
"validations": [
{
"confidence": 99.4636001586914,
"identifier": "candidate_cdf7cdf8-b74e-41eb-add0-edbbbb272520",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_dbf52417-c8d3-4c1f-b680-e470c8fe79c0",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_e8a20066-c99e-48aa-9914-c62a863cc90e",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 99.24,
"identifier": "candidate_37c278f8-0561-43a9-94b9-b08c118d3ddb",
"valid": false,
"validation": "recaptured",
"required": false
},
{
"confidence": 47.30112850666046,
"identifier": "candidate_e42c0c0e-61ee-4b16-b6f8-721dc0ef46ad",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 20.524100959300995,
"identifier": "candidate_7045b92f-fc79-4984-92b1-7fb7524b7754",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 99.16438460350037,
"identifier": "candidate_8f4c77aa-0553-4541-9a96-c55945b02975",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_38cdd9f1-c4a5-4470-ac50-aa918ee253f5",
"valid": true,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/sideleft-1684990007888.jpeg",
"damages": []
},
{
"templateImageIdentifier": "image_44849b74-b3a7-4914-9bf5-180a04e27e44",
"type": "normal",
"target": "product",
"side": "sideRight",
"processed": true,
"uploadedAt": "2023-05-25T04:46:52.000Z",
"_id": "646ee83c5b7220a2e2ed7793",
"validations": [
{
"confidence": 99.34487915039062,
"identifier": "candidate_fff0264f-6540-41ab-a96a-a98569c96153",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_c8b9bf42-a4ba-4709-ac99-acd58e02b22b",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_54faadcc-b7c5-4f87-9cfd-7fe5aa071a5b",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 96.16,
"identifier": "candidate_b3d3f3b7-17c6-4323-a120-63328ec9fe8f",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 99.29338693618774,
"identifier": "candidate_dc40f817-3483-4d1d-8bbd-46f9b1bb823e",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 98.33864569664001,
"identifier": "candidate_b5982ae4-3441-4b97-b598-2a45618d97d1",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 68.27582120895386,
"identifier": "candidate_56c5c0f4-dbcf-42c0-9d67-306795251c45",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_607dee9e-672d-43b6-83e8-f52cd6080697",
"valid": true,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/sideright-1684990010964.jpeg",
"damages": []
},
{
"templateImageIdentifier": "image_b7118054-16af-4fe8-b6ec-7bf216a553cf",
"type": "normal",
"target": "product",
"side": "id",
"processed": true,
"uploadedAt": "2023-05-25T04:46:56.000Z",
"_id": "646ee8405b7220a2e2ed77aa",
"validations": [
{
"confidence": 93.64836120605469,
"identifier": "candidate_e610ab3e-ed99-4d37-baab-f17f6abd1cab",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_8b4d60a7-8966-4c29-b4cb-976ec0ec2ab3",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_9eef5161-9344-45a8-b313-37400bb30a79",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_d6d80bb8-6edb-4d0e-9aee-7f653ee8a4ee",
"valid": true,
"validation": "use",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_ea2175cf-4d2d-4818-a25f-1028f35a52a8",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_ec46c9eb-fdf8-4427-9b7b-df20d9a098de",
"valid": true,
"validation": "vin",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_5f059ca8-6b97-4d27-9cd8-2ca08f72624a",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_a33e7367-b037-4197-b8d6-95ba0c78ccea",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_3a25a739-7697-4ba0-a249-9f70fb2b5e44",
"valid": true,
"validation": "recaptured",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/id-1684990015188.jpeg",
"damages": []
}
],
}
]
}
}
{
"event": "inspection_reviewed",
"payload": {
"_id": "646ee7dc5b7220a2e2ed76b8",
"status": "completed",
"producer": {
"userId": "61478404b9a70800551878b6",
"membershipId": "61c28b777b0c420012bd4a68",
"companyId": "6147843bb9a70800551878bd",
"firstName": "John",
"lastName": "Doe",
"username": "johndoe",
"email": "johndoe@gmail.com",
},
"metadata": {
"my_custom_key":"my_custom_value"
},
"testing": false,
"template": {
"_id": "62be865212ca0918bcabf2a5",
"name": "easy",
"type": "built-in",
"inputs": [
{
"identifier": "input_bf5dd369-3a82-4b0d-b8be-5186da9c07c7",
"label": "Nombre",
"value": "John"
},
{
"identifier": "input_db30b856-594e-4799-9ee9-2dacfbe2a338",
"label": "Apellido",
"value": "Doe"
},
{
"identifier": "input_79519a40-3047-48c4-b8db-5c95c8b5166a",
"label": "Identificación",
"value": "44188219"
},
{
"identifier": "input_1b00981a-1484-4f53-8702-2a6d43fd6662",
"label": "Email",
"value": "johndoe@gmail.com"
},
{
"identifier": "input_79bdb79b-c3d4-40d5-905e-bdaf1f1e02cb",
"label": "Ciudad",
"value": "testing"
},
{
"identifier": "input_a00ae5cb-e633-4b9a-98b8-863eeac96e5c",
"label": "País",
"value": "AR"
},
{
"identifier": "input_53ca83e7-413a-4435-9c2f-8206630142a8",
"label": "Provincia",
"value": "T"
},
{
"identifier": "input_21de8e3a-87c9-474a-9f10-a4dc9ecbf083",
"label": "Sexo",
"value": "male"
},
{
"identifier": "input_25dd4378-395d-4fe6-8306-65dcead884b0",
"label": "Nacimiento",
"value": "2002-06-19T00:00:00.000Z"
},
{
"identifier": "input_3f8023b1-2062-4679-b455-f69a1211af1e",
"label": "Dirección",
"value": "testing 100"
},
{
"identifier": "input_f2aaa964-9944-4d04-b86c-33044d00fef6",
"label": "Teléfono",
"value": "03813635420"
},
{
"identifier": "input_35c6a25f-6407-4755-a225-47d72bc02530",
"label": "Patente",
"value": "AZ204SU"
},
{
"identifier": "input_9f7a5106-09ae-49ab-a58a-b28952725ce0",
"label": "Año",
"value": 2020
},
{
"identifier": "input_e7f39d45-cf28-422f-a643-4f6e81127065",
"label": "Color",
"value": "grey"
},
{
"identifier": "input_23fa1c2b-b87f-4780-92d8-f8665f21288b",
"label": "Uso",
"value": "PRIVADO"
},
{
"identifier": "input_8e20f135-42b9-42cc-9ab5-abc4d32cdea3",
"label": "Marca",
"value": "JEEP"
},
{
"identifier": "input_0f2e6fb5-ca87-480a-984f-0afa54d5f924",
"label": "Modelo",
"value": "RENEGADE"
}
]
},
"veredict": "approved",
"type": "car",
"completedBy": "client",
"identity": {
"images": [
{
"validations": [
{
"validation": "date",
"_id": "62cd9215ecac9905ccf303d5",
"confidence": 100,
"valid": true
},
{
"validation": "distance",
"_id": "62cd9215ecac9905ccf303d6",
"confidence": 100,
"valid": true
},
{
"validation": "recaptured",
"_id": "62cd9215ecac9905ccf303d7",
"confidence": 95.01,
"valid": true
},
{
"validation": "face_comparison",
"_id": "62cd9215ecac9905ccf303d8",
"confidence": 100,
"valid": true
}
],
"entities": [
{
"entity": "passport",
"valid": true,
"result": {
"sex": "M",
"surname": "CASTILLO",
"givenNames": "JUAN PABLO",
"nationality": "ARGENTINA",
"dateOfBirth": "21 FEB/FEB 87",
"placeOfBirth": "ARG",
"dateOfIssue": "13 JUN/JUN 16",
"dateOfExpiry": "13 JUN/JUN 26",
"personalNumber": "32815355",
"authority": "RENAPER",
"documentNumber": "AAE054537",
"issuingCountry": "ARG"
}
}
],
"damages": [],
"side": "pasaporte",
"processed": true,
"uploadedAt": "2022-07-12T15:22:56.000Z",
"_id": "62cd920cecac9905ccf3032d",
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/pasaporte-1657639433699.jpeg",
"target": "identity"
},
{
"validations": [
{
"validation": "date",
"_id": "62cd9215ecac9905ccf303d5",
"confidence": 100,
"valid": true
},
{
"validation": "distance",
"_id": "62cd9215ecac9905ccf303d6",
"confidence": 100,
"valid": true
},
{
"validation": "recaptured",
"_id": "62cd9215ecac9905ccf303d7",
"confidence": 95.01,
"valid": true
},
{
"validation": "face_comparison",
"_id": "62cd9215ecac9905ccf303d8",
"confidence": 100,
"valid": true
},
{
"validation": "birthdate",
"_id": "62cd9215ecac9905ccf303d9",
"confidence": 100,
"valid": false
},
{
"validation": "dni",
"_id": "62cd9215ecac9905ccf303db",
"confidence": 100,
"valid": true
},
{
"validation": "full_name",
"_id": "62cd9215ecac9905ccf303de",
"confidence": 100,
"valid": true
},
{
"validation": "sex",
"_id": "62cd9215ecac9905ccf303e0",
"confidence": 100,
"valid": true
},
{
"validation": "age",
"_id": "62cd9215ecac9905ccf303e2",
"confidence": 100,
"valid": false
},
{
"validation": "object",
"_id": "62cd9215ecac9905ccf303e3",
"confidence": 98.41889953613281,
"valid": true
}
],
"damages": [],
"side": "dni",
"processed": true,
"uploadedAt": "2022-07-12T15:23:56.000Z",
"_id": "62cd920cecac9905ccf3039d",
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/dni-1657639433699.jpeg",
"target": "identity"
},
{
"validations": [
{
"validation": "date",
"_id": "62cd9210ecac9905ccf303bd",
"confidence": 100,
"valid": true
},
{
"validation": "distance",
"_id": "62cd9210ecac9905ccf303be",
"confidence": 100,
"valid": true
},
{
"validation": "recaptured",
"_id": "62cd9210ecac9905ccf303bf",
"confidence": 99.95,
"valid": true
},
{
"validation": "age",
"_id": "62cd9210ecac9905ccf303c0",
"confidence": 99.99873352050781,
"valid": true
},
{
"validation": "face_comparison",
"_id": "62cd9210ecac9905ccf303c1",
"confidence": 0,
"valid": false
},
{
"validation": "object",
"_id": "62cd9210ecac9905ccf303c2",
"confidence": 99.8077163696289,
"valid": true
}
],
"damages": [],
"side": "selfie",
"processed": true,
"uploadedAt": "2022-07-12T15:23:56.000Z",
"_id": "62cd920cecac9905ccf303a7",
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/selfie-1657639435560.jpeg",
"target": "identity"
}
],
"extraImages": [],
"email": "lucianoalvarez1212@gmail.com",
"firstName": "Luciano",
"identification": "44188219",
"lastName": "Alvarez"
},
"custom": {
"images": [],
"inputs": [
{
"label": "Seleccione los accesorios que desea asegurar",
"type": "multiselect",
"identifier": "input_525a71d5-3e1d-47e3-b2f5-1238d33190be",
"value": [
{
"selected": "Llantas especiales"
},
{
"selected": "Radio"
}
]
}
],
"extraImages": []
},
"products": [
{
"type": "car",
"car": {
"plate": "AZ204SU",
"color": "grey",
"make": "JEEP",
"model": "RENEGADE",
"use": "PRIVADO",
"year": 2020
},
"_id": "646ee7dd5b7220a2e2ed76c5"
"extraImages": [],
"inputs": [],
"images": [
{
"templateImageIdentifier": "image_3e1153f3-66fa-4463-973a-fe277894c9df",
"type": "normal",
"target": "product",
"side": "back",
"processed": true,
"uploadedAt": "2023-05-25T04:46:40.000Z",
"_id": "646ee8305b7220a2e2ed7718",
"validations": [
{
"confidence": 99.99993896484375,
"identifier": "candidate_2b136747-6293-4fe8-abf5-1532a7d97581",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 95.7,
"identifier": "candidate_df69203b-a9f1-4225-bfbb-5df5198b806f",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 95.7,
"identifier": "candidate_20168d44-92b5-4e71-967d-7dbddf042718",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 99,
"identifier": "candidate_f2249ef8-8360-4b35-b8f7-c941dfd9a3ba",
"valid": true,
"validation": "plate",
"required": true
},
{
"confidence": 90,
"identifier": "candidate_228671dc-c9a2-48d9-b3f0-632f362fc136",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 92.80000000000001,
"identifier": "candidate_3e18a4b3-7b1d-4cd5-bf69-22dfc5e6f37a",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 99.98935461044312,
"identifier": "candidate_0748121d-42b8-40f3-8889-90d88cbdf17f",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 99.99420642852783,
"identifier": "candidate_2514b86c-6ba6-4c4f-8eb1-450090ceb819",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_4bb107a9-9c46-430f-835f-541650635caf",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_028b92d5-a8cc-4c6e-85fa-220c2927687b",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 98.23,
"identifier": "candidate_c65a8d0c-62c1-4732-9317-b08237fce958",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_c40b3705-64e8-4faa-9648-bea7df4e8389",
"valid": false,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/back-1684989998800.jpeg",
"damages": [
{
"part": "trunk",
"percentage": 1.97,
"damage": "dent"
}
]
},
{
"templateImageIdentifier": "image_69c8e668-7c20-489e-ace8-74d4d5cc833a",
"type": "normal",
"target": "product",
"side": "front",
"processed": true,
"uploadedAt": "2023-05-25T04:46:44.000Z",
"_id": "646ee8345b7220a2e2ed7769",
"validations": [
{
"confidence": 99.80770111083984,
"identifier": "candidate_18276ec7-7502-4ed4-a067-f54f745bb50e",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 92.5,
"identifier": "candidate_2b58b84d-ff4b-4cf1-9615-7f735659de17",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 92.5,
"identifier": "candidate_fa7b952a-cd6a-449c-ba1d-8106e522de41",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 99,
"identifier": "candidate_e7a7b281-2bbc-4b8b-b76f-9acc13f5000f",
"valid": true,
"validation": "plate",
"required": true
},
{
"confidence": 89.7,
"identifier": "candidate_ef42b770-1721-410e-ae77-93b0fa5c1028",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 90.9,
"identifier": "candidate_ce035a0a-9d75-4bcd-94bc-b10d806d67c9",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 0.14095206279307604,
"identifier": "candidate_0ba18bf2-075e-45d0-988a-64a7c9d21b3c",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 96.16938829421997,
"identifier": "candidate_cae171db-1b0a-4351-8bca-052517c31703",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_b2fb826a-06b2-4d82-a9f6-a8a0dd700804",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_a7bef5c9-f877-4928-94f4-6417c277395b",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 97.65,
"identifier": "candidate_36812f63-4a21-492c-9e56-9b3a8426c629",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_470dd1b6-c020-44e2-99ea-018decba540d",
"valid": true,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/front-1684990002943.jpeg",
"damages": []
},
{
"templateImageIdentifier": "image_36d5963f-c1c3-4f81-86dd-cf26e7e2d965",
"type": "normal",
"target": "product",
"side": "sideLeft",
"processed": true,
"uploadedAt": "2023-05-25T04:46:49.000Z",
"_id": "646ee83a5b7220a2e2ed7779",
"validations": [
{
"confidence": 99.4636001586914,
"identifier": "candidate_cdf7cdf8-b74e-41eb-add0-edbbbb272520",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_dbf52417-c8d3-4c1f-b680-e470c8fe79c0",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_e8a20066-c99e-48aa-9914-c62a863cc90e",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 99.24,
"identifier": "candidate_37c278f8-0561-43a9-94b9-b08c118d3ddb",
"valid": false,
"validation": "recaptured",
"required": false
},
{
"confidence": 47.30112850666046,
"identifier": "candidate_e42c0c0e-61ee-4b16-b6f8-721dc0ef46ad",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 20.524100959300995,
"identifier": "candidate_7045b92f-fc79-4984-92b1-7fb7524b7754",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 99.16438460350037,
"identifier": "candidate_8f4c77aa-0553-4541-9a96-c55945b02975",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_38cdd9f1-c4a5-4470-ac50-aa918ee253f5",
"valid": true,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/sideleft-1684990007888.jpeg",
"damages": []
},
{
"templateImageIdentifier": "image_44849b74-b3a7-4914-9bf5-180a04e27e44",
"type": "normal",
"target": "product",
"side": "sideRight",
"processed": true,
"uploadedAt": "2023-05-25T04:46:52.000Z",
"_id": "646ee83c5b7220a2e2ed7793",
"validations": [
{
"confidence": 99.34487915039062,
"identifier": "candidate_fff0264f-6540-41ab-a96a-a98569c96153",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_c8b9bf42-a4ba-4709-ac99-acd58e02b22b",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_54faadcc-b7c5-4f87-9cfd-7fe5aa071a5b",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 96.16,
"identifier": "candidate_b3d3f3b7-17c6-4323-a120-63328ec9fe8f",
"valid": true,
"validation": "recaptured",
"required": false
},
{
"confidence": 99.29338693618774,
"identifier": "candidate_dc40f817-3483-4d1d-8bbd-46f9b1bb823e",
"valid": true,
"validation": "angle",
"required": true
},
{
"confidence": 98.33864569664001,
"identifier": "candidate_b5982ae4-3441-4b97-b598-2a45618d97d1",
"valid": true,
"validation": "color",
"required": true
},
{
"confidence": 68.27582120895386,
"identifier": "candidate_56c5c0f4-dbcf-42c0-9d67-306795251c45",
"valid": true,
"validation": "complete",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_607dee9e-672d-43b6-83e8-f52cd6080697",
"valid": true,
"validation": "damage",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/sideright-1684990010964.jpeg",
"damages": []
},
{
"templateImageIdentifier": "image_b7118054-16af-4fe8-b6ec-7bf216a553cf",
"type": "normal",
"target": "product",
"side": "id",
"processed": true,
"uploadedAt": "2023-05-25T04:46:56.000Z",
"_id": "646ee8405b7220a2e2ed77aa",
"validations": [
{
"confidence": 93.64836120605469,
"identifier": "candidate_e610ab3e-ed99-4d37-baab-f17f6abd1cab",
"valid": true,
"validation": "object",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_8b4d60a7-8966-4c29-b4cb-976ec0ec2ab3",
"valid": true,
"validation": "model",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_9eef5161-9344-45a8-b313-37400bb30a79",
"valid": true,
"validation": "make",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_d6d80bb8-6edb-4d0e-9aee-7f653ee8a4ee",
"valid": true,
"validation": "use",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_ea2175cf-4d2d-4818-a25f-1028f35a52a8",
"valid": true,
"validation": "domain",
"required": true
},
{
"confidence": 100,
"identifier": "candidate_ec46c9eb-fdf8-4427-9b7b-df20d9a098de",
"valid": true,
"validation": "vin",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_5f059ca8-6b97-4d27-9cd8-2ca08f72624a",
"valid": true,
"validation": "date",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_a33e7367-b037-4197-b8d6-95ba0c78ccea",
"valid": true,
"validation": "distance",
"required": false
},
{
"confidence": 100,
"identifier": "candidate_3a25a739-7697-4ba0-a249-9f70fb2b5e44",
"valid": true,
"validation": "recaptured",
"required": false
}
],
"approved": true,
"src": "https://ai-inspections.s3.amazonaws.com/id-1684990015188.jpeg",
"damages": []
}
],
}
]
}
}
Seguridad
Par una comunicación mas segura, se recomienda seguir el flujo de HMAC (hash message authorization code).
Cada vez que Autoinspector envía un evento, en la request estará el header autoinspector-signature
que corresponde al HMAC generado mediante el uso de la signature del webhook. De esta manera, en tu aplicación tu puedes generar otro HMAC mediante el body de la request y la private signature del webhook para comparar el HMAC generado por ti con el que se encuentra en la request.
Si los dos HMAC coinciden, quiere decir que quien esta realizando la request a tu sistema es efectivamente Autoinspector.
Un ejemplo de este método en código es el siguiente:
El webhook signature lo puedes encontrar en el dashboard dentro del detail de tu webhook. Puedes generar nuevos tantas veces lo necesites.
- Node.JS
app.post('/webhook', async (req, res) => {
// This is Autoinspector SHA256 signature to verify if the request body is corrupted and to ensure that who are making the request is Autoinspector API
const signature = req.headers['autoinspector-signature']
let webhook
try {
//Here we use the autoinspector sdk to handle al the hmac validation. Just pass the req.rawBody that we set at the beginning via middleware, the signature provided from request and the webhook secret generated by Autoinspector for us
webhook = autoinspector.webhooks.constructEvent(
req.rawBody,
signature,
process.env.AUTOINSPECTOR_WEBHOOK_SECRET
)
} catch (err) {
return res.status(400).json({ error: `Webhook error: ${err.message} ` })
}
// At this point is safely to map the webhook properties. We know that message is not corrupted and comes from Autoinspector
switch (webhook.event) {
case 'inspection_completed':
//inspection completed
break
default:
console.log(`Unhandled autoinspector event: ${webhook.event}`)
}
res.status(200).json({ received: true })
})
Lógica de reintentos
En el ciclo de vida de una aplicación, el posible downtime forma parte de la misma. Es por ello, que hay eventos que son resilientes a cierta cantidad de fallos y siguen una lógica de reintentos.
Estos eventos son:
image_processed
extra_image_processed
inspection_completed
Si al primer intento de enviar la notificación, la integración no responde con un status 2XX
, se reintentará enviar en los próximos 30 minutos con dos repeticiones.