{"info":{"_postman_id":"bbcea36e-8ab8-4c45-a5ca-c4db834afa0f","name":"andrew-api","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"13953520","collectionId":"bbcea36e-8ab8-4c45-a5ca-c4db834afa0f","publishedId":"2s9YeHbrPg","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"030635"},"publishDate":"2023-12-01T09:04:27.000Z"},"item":[{"name":"API","item":[{"name":"customer","item":[{"name":"create an account as a user","id":"0424322c-544d-4485-9285-a76a85cec832","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer","description":"<p>Role Restrictions:<br />- Required Role: user</p>\n","urlObject":{"path":["customer"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"599f7330-0719-4b9b-9ac6-94c62e572e7f","name":"create an account as a user","originalRequest":{"method":"POST","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"46"},{"key":"ETag","value":"W/\"2e-ZHjAzGbo8rW+8pnjQhm8yBbvLjo\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:19:57 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"82931c1b-109f-48d5-b30d-0e3df5110131\"\n}"}],"_postman_id":"0424322c-544d-4485-9285-a76a85cec832"},{"name":"create a third party account as an insurer or admin","id":"122ef205-12d3-4b66-9c04-272f71e30d16","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"test456@yopmail.com\",\n    \"firstName\": \"test456\",\n    \"lastName\": \"test456\",\n    \"insurer\": false\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/customer/account","description":"<p>Role Restrictions:<br />- Required Role: supervisor/insurer or superadmin</p>\n","urlObject":{"path":["customer","account"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"08e7c7c5-2319-4d86-86d3-0c1505d43d90","name":"create a third party account as an insurer or admin","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"pierrot@yopmail.com\",\n    \"firstName\": \"pierrot\",\n    \"lastName\": \"doe\",\n    \"insurer\": true,\n    \"activated\": true\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/customer/account"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"46"},{"key":"ETag","value":"W/\"2e-nhrt0nqXBtC9540WzP5cO9p7y4U\""},{"key":"Date","value":"Thu, 02 Nov 2023 14:31:55 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"db44c3a8-1e6e-4524-82b8-ec3fbb30abad\"\n}"}],"_postman_id":"122ef205-12d3-4b66-9c04-272f71e30d16"},{"name":"get contracts for a customer","id":"4e7864f5-40e0-42a8-9ebf-f7d0d537ebc5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/contract","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["customer","d4d6ed02-f792-4d62-9cb8-04120cba796d","contract"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"a4abeb38-c089-4580-a95b-e7e0015acbcc","name":"get contracts for an inactivated customer","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/contract"},"status":"Conflict","code":409,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"80"},{"key":"ETag","value":"W/\"50-NePo0gxamjIrLOaGizRANLFX2+c\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:25:34 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"user account must be activated\",\n    \"error\": \"Conflict\",\n    \"statusCode\": 409\n}"},{"id":"22d98ea8-8a4e-4ad2-b43f-329b846d78ed","name":"get contracts for a customer","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/contract"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"279"},{"key":"ETag","value":"W/\"117-vN5gjE65Aunuvzs5PbTog08hmHc\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:29:30 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n            \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n            \"status\": \"INACTIVE\",\n            \"paymentDueDay\": 1,\n            \"createdAt\": \"2023-11-02T15:18:16.536Z\",\n            \"updatedAt\": \"2023-11-02T15:18:16.536Z\",\n            \"__v\": 0,\n            \"vehicles\": []\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"4e7864f5-40e0-42a8-9ebf-f7d0d537ebc5"},{"name":"get all customers","id":"1fbc8d00-15e2-49f6-8d07-a13b40002b7c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer?value=lk","description":"<p>Role Restrictions:<br />- Required Role: supervisor/insurer or superadmin</p>\n","urlObject":{"path":["customer"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[{"key":"value","value":"lk"}],"variable":[]}},"response":[{"id":"bfc60e9d-4221-41c0-95ff-c8a3fc9dd096","name":"get all customers","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"655"},{"key":"ETag","value":"W/\"28f-fmDKNZ3QHH4MZhyzXk7j8cmV0Rs\""},{"key":"Date","value":"Thu, 02 Nov 2023 15:13:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"db44c3a8-1e6e-4524-82b8-ec3fbb30abad\",\n            \"insurer\": true,\n            \"status\": \"INACTIVE\",\n            \"authorizationServerUserId\": \"480732c1-9ec9-4749-8943-2e5b3cb597df\",\n            \"contactInformations\": {\n                \"email\": \"pierrot@yopmail.com\"\n            },\n            \"activated\": true,\n            \"createdAt\": \"2023-11-02T14:31:55.870Z\",\n            \"updatedAt\": \"2023-11-02T14:31:55.870Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n            \"insurer\": false,\n            \"status\": \"INACTIVE\",\n            \"authorizationServerUserId\": \"a9611df1-e4d3-4c9c-99da-40e9791e9d26\",\n            \"contactInformations\": {\n                \"email\": \"mike@yopmail.com\"\n            },\n            \"activated\": false,\n            \"createdAt\": \"2023-11-02T13:24:40.667Z\",\n            \"updatedAt\": \"2023-11-02T13:24:40.667Z\",\n            \"__v\": 0\n        }\n    ],\n    \"count\": 2,\n    \"limit\": 10,\n    \"start\": 0\n}"},{"id":"83919c26-4b9a-4d5c-b939-145a3cc6dcf2","name":"get all customers with search filters","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/customer?value=does-not-exists","host":["https://andrew-api.students-epitech.ovh/api"],"path":["customer"],"query":[{"key":"value","value":"does-not-exists"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"ETag","value":"W/\"2d-rTSMt07EeuWShO6uaRJZ2IEFZ/8\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:40:29 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"1fbc8d00-15e2-49f6-8d07-a13b40002b7c"},{"name":"find one customer","id":"e3f7c57e-c11a-45a7-a7f1-8af565c2a482","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["customer","d4d6ed02-f792-4d62-9cb8-04120cba796d"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"4908a608-d481-449e-a4e9-caf10138f0fd","name":"find one customer","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/db44c3a8-1e6e-4524-82b8-ec3fbb30abad"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"305"},{"key":"ETag","value":"W/\"131-C9KgMHB1ov9a5fpC5l8lSAGG8wA\""},{"key":"Date","value":"Thu, 02 Nov 2023 15:15:43 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"db44c3a8-1e6e-4524-82b8-ec3fbb30abad\",\n    \"insurer\": true,\n    \"status\": \"INACTIVE\",\n    \"authorizationServerUserId\": \"480732c1-9ec9-4749-8943-2e5b3cb597df\",\n    \"contactInformations\": {\n        \"email\": \"pierrot@yopmail.com\"\n    },\n    \"activated\": true,\n    \"createdAt\": \"2023-11-02T14:31:55.870Z\",\n    \"updatedAt\": \"2023-11-02T14:31:55.870Z\",\n    \"__v\": 0\n}"}],"_postman_id":"e3f7c57e-c11a-45a7-a7f1-8af565c2a482"},{"name":"get vehicles for a customer","id":"b75e4277-2962-4f5c-babc-23744e2633d1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/vehicle","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["customer","d4d6ed02-f792-4d62-9cb8-04120cba796d","vehicle"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"93d1cf2a-f58b-442a-b822-492fc59272ad","name":"get vehicles for a customer","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/vehicle"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"464"},{"key":"ETag","value":"W/\"1d0-fZx/vtmxwRD9iJM89wPOuCbli6c\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:48:03 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n            \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n            \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n            \"vin\": \"1HGBH41JXMN109186\",\n            \"brand\": \"toyota\",\n            \"model\": \"yaris\",\n            \"year\": 2017,\n            \"registrationNumber\": \"AB-123-CD\",\n            \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n            \"contractSubscriptionKm\": 100000,\n            \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n            \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n            \"__v\": 0\n        }\n    ],\n    \"count\": 1,\n    \"limit\": 10,\n    \"start\": 0\n}"}],"_postman_id":"b75e4277-2962-4f5c-babc-23744e2633d1"},{"name":"get devices for a customer","id":"6287530f-1bab-43ae-9829-80472efeea0e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/device","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["customer","d4d6ed02-f792-4d62-9cb8-04120cba796d","device"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"3690eebf-1d61-4546-acf6-95f09dcff864","name":"get devices for a customer","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d/device"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1305"},{"key":"ETag","value":"W/\"519-N/i+9r2ZIr4dIJWE23BTIlpbqhs\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:49:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n            \"status\": \"PAIRED_INSURER\",\n            \"createdAt\": \"2023-11-01T16:48:57.197Z\",\n            \"updatedAt\": \"2023-11-02T15:53:19.312Z\",\n            \"__v\": 0,\n            \"customer\": {\n                \"_id\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"insurer\": false,\n                \"status\": \"ACTIVE\",\n                \"authorizationServerUserId\": \"4be3d0a7-2124-4555-930f-54d4eae168a8\",\n                \"contactInformations\": {\n                    \"email\": \"mike@yopmail.com\"\n                },\n                \"activated\": true,\n                \"createdAt\": \"2023-11-02T13:24:40.667Z\",\n                \"updatedAt\": \"2023-11-02T13:24:40.667Z\",\n                \"__v\": 0,\n                \"firstName\": \"mike\",\n                \"lastName\": \"doe\",\n                \"fullName\": \"mike doe\"\n            },\n            \"vehicle\": {\n                \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n                \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n                \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"vin\": \"1HGBH41JXMN109186\",\n                \"brand\": \"toyota\",\n                \"model\": \"yaris\",\n                \"year\": 2017,\n                \"registrationNumber\": \"AB-123-CD\",\n                \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n                \"contractSubscriptionKm\": 100000,\n                \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n                \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n                \"__v\": 0\n            },\n            \"insurerActivationDate\": \"2023-11-02T15:53:19.000Z\",\n            \"serialNumber\": \"76BUPWD9R2DCZ3VQS29FAR3TMEFAXEKY\",\n            \"events\": [],\n            \"lastSessions\": [\n                {\n                    \"_id\": \"2d8729cf-e408-4786-a3e3-13aa33eb37d9\",\n                    \"device\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n                    \"start\": \"2023-11-02T08:40:23.600Z\",\n                    \"end\": \"2023-11-02T08:40:32.630Z\",\n                    \"__v\": 0\n                }\n            ]\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"6287530f-1bab-43ae-9829-80472efeea0e"},{"name":"update a customer","id":"6aa511ec-2915-4235-9c7a-eb12ea44a06e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"status\": \"\",\n    \"contactInformations\": {\n        \"phoneNumber\": \"\",\n        \"email\": \"\"\n    },\n    \"billingInformations\": {\n        \"lastName\": \"\",\n        \"firtName\": \"\",\n        \"company\": \"\",\n        \"address\": \"\",\n        \"postCode\": \"\",\n        \"country\": \"\"\n    },\n    \"paymentInformations\": {\n        \"lastName\": \"\",\n        \"firtName\": \"\",\n        \"iban\": \"\",\n        \"bic\": \"\",\n        \"rib\": \"\"\n    },\n    \"identityDocs\": {\n        \"idCardDocURL\": \"\",\n        \"residencyProofDocURL\": \"\"\n    },\n    \"paymentDocs\": {\n        \"directDebitMandateDocURL\": \"\",\n        \"termsOfSaleDocURL\": \"\"\n    },\n    \"activated\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/customer/d4d6ed02-f792-4d62-9cb8-04120cba796d","urlObject":{"path":["customer","d4d6ed02-f792-4d62-9cb8-04120cba796d"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"6aa511ec-2915-4235-9c7a-eb12ea44a06e"}],"id":"c427a9ac-e033-42b9-a59c-f1d63276ff67","_postman_id":"c427a9ac-e033-42b9-a59c-f1d63276ff67","description":""},{"name":"contract","item":[{"name":"find all","id":"cf21bfc1-1871-4374-92aa-7a325d16ab99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract?status=ACTIVE","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["contract"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[{"key":"status","value":"ACTIVE"}],"variable":[]}},"response":[{"id":"22bc730a-7ee7-4c29-b80f-03c0fa525ae2","name":"find all active contract (default)","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/contract?status=ACTIVE","host":["https://andrew-api.students-epitech.ovh/api"],"path":["contract"],"query":[{"key":"status","value":"ACTIVE"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:11:04 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"2d-rTSMt07EeuWShO6uaRJZ2IEFZ/8\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"d0c9d259-2b63-4d97-8650-31f840d0940e","name":"find all inactive contract","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/contract?status=INACTIVE","host":["https://andrew-api.students-epitech.ovh/api"],"path":["contract"],"query":[{"key":"status","value":"INACTIVE"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:09:28 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"2d-rTSMt07EeuWShO6uaRJZ2IEFZ/8\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"4a2fbcce-c2b3-4bdf-8cad-d33fc4a59196","name":"find all canceled contract","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/contract?status=CANCELED","host":["https://andrew-api.students-epitech.ovh/api"],"path":["contract"],"query":[{"key":"status","value":"CANCELED"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:08:51 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"388"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"184-WE/xX2VZVF0TR6XC5z5bIDnn8Ck\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"39c17a04-323e-4dc1-ba92-96366ad86c03\",\n            \"ref\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN\",\n            \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n            \"status\": \"CANCELED\",\n            \"ecommerceProduct\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n            \"ecommerceGateway\": \"STRIPE\",\n            \"createdAt\": \"2023-12-26T12:17:02.385Z\",\n            \"updatedAt\": \"2023-12-27T08:45:31.993Z\",\n            \"__v\": 0,\n            \"vehicles\": []\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"b8577847-64be-4a94-8268-158b0cb64139","name":"find all payment pending contract","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/contract?status=PAYMENT_PENDING","host":["https://andrew-api.students-epitech.ovh/api"],"path":["contract"],"query":[{"key":"status","value":"PAYMENT_PENDING"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:09:55 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"2d-rTSMt07EeuWShO6uaRJZ2IEFZ/8\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"b1583e6f-c725-4fa0-ac1d-d629106c775a","name":"find all payment renewal error contract","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/contract?status=PAYMENT_RENEWAL_ERROR","host":["https://andrew-api.students-epitech.ovh/api"],"path":["contract"],"query":[{"key":"status","value":"PAYMENT_RENEWAL_ERROR"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:10:22 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"2d-rTSMt07EeuWShO6uaRJZ2IEFZ/8\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"7d343ad8-a953-4092-b111-68df359fbfb7","name":"find all with search filters","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/contract?value=UECWLWRGBP","host":["https://andrew-api.students-epitech.ovh/api"],"path":["contract"],"query":[{"key":"value","value":"UECWLWRGBP"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"320"},{"key":"ETag","value":"W/\"140-MDwvm5wSGHYNhvBoiSTYhMVLMtk\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:55:54 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n            \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n            \"status\": \"INACTIVE\",\n            \"paymentDueDay\": 1,\n            \"createdAt\": \"2023-11-02T15:18:16.536Z\",\n            \"updatedAt\": \"2023-11-02T15:18:16.536Z\",\n            \"__v\": 0,\n            \"ref\": \"UECWLWRGBP8M7M4LUD9UKJJZ6BCS6WDT\",\n            \"vehicles\": []\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"cf21bfc1-1871-4374-92aa-7a325d16ab99"},{"name":"cancel subscription","id":"1e33beb0-f418-48e7-bb6e-dbcd7f74de0b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/39c17a04-323e-4dc1-ba92-96366ad86c03/cancel","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["contract","39c17a04-323e-4dc1-ba92-96366ad86c03","cancel"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"1e33beb0-f418-48e7-bb6e-dbcd7f74de0b"},{"name":"find one","id":"193986e0-32b0-47c8-abe3-11a01fd2bf52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/39c17a04-323e-4dc1-ba92-96366ad86c03","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["contract","39c17a04-323e-4dc1-ba92-96366ad86c03"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"eb97c6ec-8215-4cfa-9e64-01dcdeff7f86","name":"find one","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/39c17a04-323e-4dc1-ba92-96366ad86c03"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:12:12 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"386"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"182-ilXfcxVa8YLFQYXp55KTMx5AIDY\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"ecommerceSubscription\": null,\n    \"ecommerceCheckoutURL\": null,\n    \"_id\": \"39c17a04-323e-4dc1-ba92-96366ad86c03\",\n    \"ref\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN\",\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n    \"status\": \"CANCELED\",\n    \"ecommerceProduct\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n    \"ecommerceGateway\": \"STRIPE\",\n    \"createdAt\": \"2023-12-26T12:17:02.385Z\",\n    \"updatedAt\": \"2023-12-27T08:45:31.993Z\",\n    \"__v\": 0\n}"}],"_postman_id":"193986e0-32b0-47c8-abe3-11a01fd2bf52"},{"name":"get devices for a contract","id":"a5bc651c-0ed5-4da0-b92d-2391873c74e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/39c17a04-323e-4dc1-ba92-96366ad86c03/device","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["contract","39c17a04-323e-4dc1-ba92-96366ad86c03","device"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"936fa9ac-dae5-4734-9072-324b7b43c3df","name":"get device for a contract","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/ce8e7910-424f-4e18-bddc-c88017d5b637/device"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"ETag","value":"W/\"2d-sw4U2XDciaQm6HVjoxi9xGqxB/4\""},{"key":"Date","value":"Thu, 02 Nov 2023 15:21:15 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"limit\": 10,\n    \"start\": 0\n}"}],"_postman_id":"a5bc651c-0ed5-4da0-b92d-2391873c74e1"},{"name":"get vehicles for a contract","id":"c5f7f1e5-5441-4a49-88fa-b6ac0feba49a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/39c17a04-323e-4dc1-ba92-96366ad86c03/vehicle","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["contract","39c17a04-323e-4dc1-ba92-96366ad86c03","vehicle"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"26d62dc5-cb60-4687-b812-32b9e3acdfc6","name":"get vehicles for a contract","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/contract/ce8e7910-424f-4e18-bddc-c88017d5b637/vehicle"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"45"},{"key":"ETag","value":"W/\"2d-sw4U2XDciaQm6HVjoxi9xGqxB/4\""},{"key":"Date","value":"Thu, 02 Nov 2023 15:21:49 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [],\n    \"count\": 0,\n    \"limit\": 10,\n    \"start\": 0\n}"}],"_postman_id":"c5f7f1e5-5441-4a49-88fa-b6ac0feba49a"}],"id":"5d60f2c9-c4cb-429e-b993-52cf87d9a9ce","_postman_id":"5d60f2c9-c4cb-429e-b993-52cf87d9a9ce","description":""},{"name":"subscription-application","item":[{"name":"find all","id":"57970346-0ca2-4391-93fc-edf0d5380e55","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/subscription-application","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["subscription-application"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"57970346-0ca2-4391-93fc-edf0d5380e55"},{"name":"update subscription application","id":"96848520-8139-47df-8635-b16044ce6141","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"identityDocs\": {\n        \"idCardDocURL\": \"customer/identity/id-card/2d175e7d-384f-4169-8558-de5201f44ee4_T-CLO-902_pitch.pdf\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/dd3d83c8-f714-446e-ac68-20f1fd95735f","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["subscription-application","dd3d83c8-f714-446e-ac68-20f1fd95735f"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"96848520-8139-47df-8635-b16044ce6141"},{"name":"review subscription application","id":"438a7585-614f-412c-92f7-a3ac50f362b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/309870cf-7373-48b4-914f-7224940635da/review","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["subscription-application","309870cf-7373-48b4-914f-7224940635da","review"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"438a7585-614f-412c-92f7-a3ac50f362b5"},{"name":"finalize subscription application","id":"b87ad5c9-619d-4ee4-97e3-2060252dd9ba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"status\": \"PAYMENT_PENDING\"\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/309870cf-7373-48b4-914f-7224940635da/finalize","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["subscription-application","309870cf-7373-48b4-914f-7224940635da","finalize"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"b87ad5c9-619d-4ee4-97e3-2060252dd9ba"},{"name":"find one","id":"40d23ec8-92b6-4302-92c7-8624f760c4e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/5c69adc7-4238-4372-8e86-d9b44d8da8af","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["subscription-application","5c69adc7-4238-4372-8e86-d9b44d8da8af"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"1d2ca278-cb89-4062-adae-9dd9901fa4fa","name":"find one","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/309870cf-7373-48b4-914f-7224940635da"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:14:25 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1249"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"4e1-TfVh9AQmNCun3x3kUTmkGt7ADD8\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"309870cf-7373-48b4-914f-7224940635da\",\n    \"customer\": {\n        \"_id\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n        \"insurer\": false,\n        \"status\": \"ACTIVE\",\n        \"authorizationServerUserId\": \"4be3d0a7-2124-4555-930f-54d4eae168a8\",\n        \"contactInformations\": {\n            \"email\": \"mike@yopmail.com\"\n        },\n        \"paymentInformations\": {\n            \"ecommerceCustomer\": \"97616cf1-a6ff-4e54-8c5c-db0b77693392\"\n        },\n        \"activated\": false,\n        \"firstName\": \"mike\",\n        \"lastName\": \"doe\",\n        \"fullName\": \"mike doe\",\n        \"createdAt\": \"2023-12-26T10:32:35.801Z\",\n        \"updatedAt\": \"2023-12-26T10:32:35.801Z\",\n        \"__v\": 0\n    },\n    \"status\": \"PAYMENT_CONFIRMED\",\n    \"vehicles\": [\n        {\n            \"vin\": \"1HGBH41JXMN109186\",\n            \"brand\": \"toyota\",\n            \"model\": \"yaris\",\n            \"year\": 2017,\n            \"registrationNumber\": \"AB-123-CD\",\n            \"originalInServiceDate\": \"2023-12-16T11:44:26.916Z\",\n            \"contractSubscriptionKm\": 100000,\n            \"driverLicenceDocURL\": \"vehicle/driver-license/40e1a069-289c-4215-a7fa-d8adc8ac61f7_test.pdf\",\n            \"vehicleRegistrationCardDocURL\": \"vehicle/registration-card/8c6b815f-02e3-4a32-957a-11f55fee09aa_test.pdf\"\n        }\n    ],\n    \"contract\": {\n        \"contractDocURL\": \"contract/contract/26a70e49-9e7f-4e36-9c7b-f0b1fadcea12_test.pdf\",\n        \"ecommerceProduct\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n        \"ecommerceGateway\": \"STRIPE\",\n        \"contract\": \"39c17a04-323e-4dc1-ba92-96366ad86c03\"\n    },\n    \"createdAt\": \"2023-12-26T10:59:19.800Z\",\n    \"updatedAt\": \"2023-12-26T16:50:48.303Z\",\n    \"__v\": 0\n}"}],"_postman_id":"40d23ec8-92b6-4302-92c7-8624f760c4e7"},{"name":"create a subscription application for a customer","id":"175d8310-93e2-4984-a694-878e150e01c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n    \"vehicles\": [\n        {\n            \"vin\": \"1HGBH41JXMN109186\",\n            \"brand\": \"toyota\",\n            \"model\": \"yaris\",\n            \"year\": 2017,\n            \"registrationNumber\": \"AB-123-CD\",\n            \"originalInServiceDate\": \"2023-12-16T11:44:26.916Z\",\n            \"contractSubscriptionKm\": 100000,\n            \"driverLicenceDocURL\": \"vehicle/driver-license/40e1a069-289c-4215-a7fa-d8adc8ac61f7_test.pdf\",\n            \"vehicleRegistrationCardDocURL\": \"vehicle/registration-card/8c6b815f-02e3-4a32-957a-11f55fee09aa_test.pdf\"\n        }\n    ],\n    \"contract\": {\n        \"contractDocURL\": \"contract/contract/26a70e49-9e7f-4e36-9c7b-f0b1fadcea12_test.pdf\",\n        \"ecommerceProduct\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\"\n    },\n    \"contactInformations\": {\n        \"phoneNumber\": \"+33666084313\",\n        \"email\": \"test@yopmail.com\"\n    },\n    \"billingInformations\": {\n        \"lastName\": \"doe\",\n        \"firstName\": \"mike\",\n        \"company\": \"\",\n        \"address\": \"9 rue de la charité\",\n        \"postCode\": \"75001\",\n        \"city\": \"Paris\",\n        \"country\": \"FRANCE\"\n    },\n    \"identityDocs\": {\n        \"idCardDocURL\": \"customer/identity/id-card/62fd3ed1-d2be-4af1-bd85-7882daa71968_test.pdf\",\n        \"residencyProofDocURL\": \"customer/identity/residency-proof/00f03335-7537-47fc-9d22-2c5c22e4dbc0_test.pdf\"\n    },\n    \"paymentDocs\": {\n        \"termsOfSaleDocURL\": \"customer/payments/terms-of-sales/6b947d09-76a6-416c-a566-c278f62622ab_test.pdf\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/register","description":"<p>Role Restrictions:<br />- Required Role: supervisor/insurer or superadmin</p>\n","urlObject":{"path":["subscription-application","register"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"d1b80801-22ad-472e-9f49-4206e370d59c","name":"create a subscription application for a customer","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n    \"vehicles\": [\n        {\n            \"vin\": \"1HGBH41JXMN109186\",\n            \"brand\": \"toyota\",\n            \"model\": \"yaris\",\n            \"year\": 2017,\n            \"registrationNumber\": \"AB-123-CD\",\n            \"originalInServiceDate\": \"2023-12-16T11:44:26.916Z\",\n            \"contractSubscriptionKm\": 100000,\n            \"driverLicenceDocURL\": \"vehicle/driver-license/40e1a069-289c-4215-a7fa-d8adc8ac61f7_test.pdf\",\n            \"vehicleRegistrationCardDocURL\": \"vehicle/registration-card/8c6b815f-02e3-4a32-957a-11f55fee09aa_test.pdf\"\n        }\n    ],\n    \"contract\": {\n        \"contractDocURL\": \"contract/contract/26a70e49-9e7f-4e36-9c7b-f0b1fadcea12_test.pdf\",\n        \"ecommerceProduct\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n        \"ecommerceGateway\": \"STRIPE\"\n    },\n    \"contactInformations\": {\n        \"phoneNumber\": \"+33666084313\",\n        \"email\": \"test@yopmail.com\"\n    },\n    \"billingInformations\": {\n        \"lastName\": \"doe\",\n        \"firstName\": \"mike\",\n        \"company\": \"\",\n        \"address\": \"9 rue de la charité\",\n        \"postCode\": \"75001\",\n        \"city\": \"Paris\",\n        \"country\": \"FRANCE\"\n    },\n    \"identityDocs\": {\n        \"idCardDocURL\": \"customer/identity/id-card/62fd3ed1-d2be-4af1-bd85-7882daa71968_test.pdf\",\n        \"residencyProofDocURL\": \"customer/identity/residency-proof/00f03335-7537-47fc-9d22-2c5c22e4dbc0_test.pdf\"\n    },\n    \"paymentDocs\": {\n        \"termsOfSaleDocURL\": \"customer/payments/terms-of-sales/6b947d09-76a6-416c-a566-c278f62622ab_test.pdf\"\n    }\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/subscription-application/register"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 26 Dec 2023 10:59:19 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"784"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"ETag","value":"W/\"310-iFG4ObEW1OwDfWaMxdsMG2IQcjw\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n    \"status\": \"PENDING\",\n    \"vehicles\": [\n        {\n            \"vin\": \"1HGBH41JXMN109186\",\n            \"brand\": \"toyota\",\n            \"model\": \"yaris\",\n            \"year\": 2017,\n            \"registrationNumber\": \"AB-123-CD\",\n            \"originalInServiceDate\": \"2023-12-16T11:44:26.916Z\",\n            \"contractSubscriptionKm\": 100000,\n            \"driverLicenceDocURL\": \"vehicle/driver-license/40e1a069-289c-4215-a7fa-d8adc8ac61f7_test.pdf\",\n            \"vehicleRegistrationCardDocURL\": \"vehicle/registration-card/8c6b815f-02e3-4a32-957a-11f55fee09aa_test.pdf\"\n        }\n    ],\n    \"contract\": {\n        \"contractDocURL\": \"contract/contract/26a70e49-9e7f-4e36-9c7b-f0b1fadcea12_test.pdf\",\n        \"ecommerceProduct\": \"70b1fcba-3953-4ea3-9f66-8f7f218dd00a\",\n        \"ecommerceGateway\": \"STRIPE\"\n    },\n    \"_id\": \"309870cf-7373-48b4-914f-7224940635da\",\n    \"createdAt\": \"2023-12-26T10:59:19.800Z\",\n    \"updatedAt\": \"2023-12-26T10:59:19.800Z\",\n    \"__v\": 0\n}"}],"_postman_id":"175d8310-93e2-4984-a694-878e150e01c1"},{"name":"create a subscription application as a customer","id":"9dd424e4-c5f2-4077-b15b-95c1d8011091","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/subscription-application","description":"<p>Role Restrictions:<br />- Required Role: supervisor/insurer or superadmin</p>\n","urlObject":{"path":["subscription-application"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"9dd424e4-c5f2-4077-b15b-95c1d8011091"}],"id":"1b9230fe-5f77-4cf7-b195-c35fdf970ffc","_postman_id":"1b9230fe-5f77-4cf7-b195-c35fdf970ffc","description":""},{"name":"device","item":[{"name":"create a device","id":"129781ca-3e0f-4692-8c44-1a9d7a597dba","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"serialNumber\": \"XM39ESJ2QJVYHYWVJA3NZQBTL5VMFWWH\"\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/device","description":"<p>Role Restrictions:<br />- Required Role: supervisor/insurer or superadmin</p>\n","urlObject":{"path":["device"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"b37ef23d-cf48-4062-bf47-1bcd92e21b15","name":"create a device","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"serialNumber\": \"E79JSD4H356L6VK3FQ8QB4ZNF8SUU39S\"\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/device"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"288"},{"key":"ETag","value":"W/\"120-2v2Zqxm09mCqPMqAuAAOhDpKKDw\""},{"key":"Date","value":"Fri, 08 Dec 2023 13:16:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"device\": {\n        \"_id\": \"530c86de-6dc8-459c-894c-00db4e182752\",\n        \"status\": \"INACTIVE\",\n        \"serialNumber\": \"E79JSD4H356L6VK3FQ8QB4ZNF8SUU39S\",\n        \"createdAt\": \"2023-12-08T13:16:04.248Z\",\n        \"updatedAt\": \"2023-12-08T13:16:04.248Z\",\n        \"__v\": 0\n    },\n    \"credentials\": {\n        \"type\": \"secret\",\n        \"value\": \"1S2oztt81Bbu0fC1ZHwNwFM7g4kliWo0\"\n    }\n}"}],"_postman_id":"129781ca-3e0f-4692-8c44-1a9d7a597dba"},{"name":"find all","id":"3524b66e-fbe6-4540-a4aa-6abf760392b0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/device","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["device"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"63a7d6cb-68fd-4303-9c57-3038cb98f677","name":"find all jwt error","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/device"},"status":"Forbidden","code":403,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"69"},{"key":"ETag","value":"W/\"45-MZJWZc+Y+RUbHpnhz2B2Vipii24\""},{"key":"Date","value":"Fri, 08 Dec 2023 12:44:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Forbidden resource\",\n    \"error\": \"Forbidden\",\n    \"statusCode\": 403\n}"},{"id":"35770e0d-22bd-4159-8079-1857185aecf8","name":"find all no search value","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/device"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1250"},{"key":"ETag","value":"W/\"4e2-xb1QOfsRb8stfPWnyjkVb12JnfU\""},{"key":"Date","value":"Fri, 08 Dec 2023 12:58:58 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n            \"status\": \"PAIRED_INSURER\",\n            \"createdAt\": \"2023-11-01T16:48:57.197Z\",\n            \"updatedAt\": \"2023-11-02T15:53:19.312Z\",\n            \"__v\": 0,\n            \"customer\": {\n                \"_id\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"insurer\": false,\n                \"status\": \"INACTIVE\",\n                \"authorizationServerUserId\": \"4be3d0a7-2124-4555-930f-54d4eae168a8\",\n                \"contactInformations\": {\n                    \"email\": \"mike@yopmail.com\"\n                },\n                \"activated\": false,\n                \"createdAt\": \"2023-11-02T13:24:40.667Z\",\n                \"updatedAt\": \"2023-11-02T13:24:40.667Z\",\n                \"__v\": 0\n            },\n            \"vehicle\": {\n                \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n                \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n                \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"vin\": \"1HGBH41JXMN109186\",\n                \"brand\": \"toyota\",\n                \"model\": \"yaris\",\n                \"year\": 2017,\n                \"registrationNumber\": \"AB-123-CD\",\n                \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n                \"contractSubscriptionKm\": 100000,\n                \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n                \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n                \"__v\": 0\n            },\n            \"insurerActivationDate\": \"2023-11-02T15:53:19.000Z\",\n            \"serialNumber\": \"76BUPWD9R2DCZ3VQS29FAR3TMEFAXEKY\",\n            \"events\": [],\n            \"lastSessions\": [\n                {\n                    \"_id\": \"2d8729cf-e408-4786-a3e3-13aa33eb37d9\",\n                    \"device\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n                    \"start\": \"2023-11-02T08:40:23.600Z\",\n                    \"end\": \"2023-11-02T08:40:32.630Z\",\n                    \"__v\": 0\n                }\n            ]\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"},{"id":"b010eeb2-a473-4a32-b509-2b425a4f100b","name":"find all with search value","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://andrew-api.students-epitech.ovh/api/device?value=76BUPWD","host":["https://andrew-api.students-epitech.ovh/api"],"path":["device"],"query":[{"key":"value","value":"76BUPWD"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1250"},{"key":"ETag","value":"W/\"4e2-xb1QOfsRb8stfPWnyjkVb12JnfU\""},{"key":"Date","value":"Fri, 08 Dec 2023 12:59:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n            \"status\": \"PAIRED_INSURER\",\n            \"createdAt\": \"2023-11-01T16:48:57.197Z\",\n            \"updatedAt\": \"2023-11-02T15:53:19.312Z\",\n            \"__v\": 0,\n            \"customer\": {\n                \"_id\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"insurer\": false,\n                \"status\": \"INACTIVE\",\n                \"authorizationServerUserId\": \"4be3d0a7-2124-4555-930f-54d4eae168a8\",\n                \"contactInformations\": {\n                    \"email\": \"mike@yopmail.com\"\n                },\n                \"activated\": false,\n                \"createdAt\": \"2023-11-02T13:24:40.667Z\",\n                \"updatedAt\": \"2023-11-02T13:24:40.667Z\",\n                \"__v\": 0\n            },\n            \"vehicle\": {\n                \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n                \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n                \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"vin\": \"1HGBH41JXMN109186\",\n                \"brand\": \"toyota\",\n                \"model\": \"yaris\",\n                \"year\": 2017,\n                \"registrationNumber\": \"AB-123-CD\",\n                \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n                \"contractSubscriptionKm\": 100000,\n                \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n                \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n                \"__v\": 0\n            },\n            \"insurerActivationDate\": \"2023-11-02T15:53:19.000Z\",\n            \"serialNumber\": \"76BUPWD9R2DCZ3VQS29FAR3TMEFAXEKY\",\n            \"events\": [],\n            \"lastSessions\": [\n                {\n                    \"_id\": \"2d8729cf-e408-4786-a3e3-13aa33eb37d9\",\n                    \"device\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n                    \"start\": \"2023-11-02T08:40:23.600Z\",\n                    \"end\": \"2023-11-02T08:40:32.630Z\",\n                    \"__v\": 0\n                }\n            ]\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"3524b66e-fbe6-4540-a4aa-6abf760392b0"},{"name":"find one","id":"a56571a2-388a-46a7-aa15-36ff0067e146","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/device/795444ab-531d-4f22-95eb-a276726bfb33","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["device","795444ab-531d-4f22-95eb-a276726bfb33"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"f77caf21-c45a-4384-a056-3f2253216dcc","name":"find one","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/device/795444ab-531d-4f22-95eb-a276726bfb33"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 05 Jan 2024 16:15:17 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"340"},{"key":"Connection","value":"keep-alive"},{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"154-H0ZaIjOQjQa/v7vQ2fCSphBEFz4\""},{"key":"Strict-Transport-Security","value":"max-age=15724800; includeSubDomains"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n    \"status\": \"PAIRED\",\n    \"createdAt\": \"2023-11-01T16:48:57.197Z\",\n    \"updatedAt\": \"2023-11-02T15:53:19.312Z\",\n    \"__v\": 0,\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n    \"vehicle\": \"ea4282a5-433d-491e-b3a8-8d0babb4291e\",\n    \"serialNumber\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",\n    \"pairingDate\": \"2023-11-02T15:53:19.000Z\"\n}"}],"_postman_id":"a56571a2-388a-46a7-aa15-36ff0067e146"},{"name":"link a device to a vehicle and customer","id":"8f646b26-cf5d-4657-bf0e-c8fb653ea886","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":" {\n    \"vehicle\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\"\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/device/795444ab-531d-4f22-95eb-a276726bfb33","urlObject":{"path":["device","795444ab-531d-4f22-95eb-a276726bfb33"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f646b26-cf5d-4657-bf0e-c8fb653ea886"}],"id":"67753a79-6aa1-496c-8b1f-fca5af97a077","_postman_id":"67753a79-6aa1-496c-8b1f-fca5af97a077","description":""},{"name":"vehicle","item":[{"name":"find all","id":"75189e2f-f86a-4fa9-88f6-8091b4f55291","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/vehicle","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["vehicle"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"5bd05247-c0a0-44c3-a6f7-9ac387ba0417","name":"find all","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/vehicle"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"464"},{"key":"ETag","value":"W/\"1d0-fZx/vtmxwRD9iJM89wPOuCbli6c\""},{"key":"Date","value":"Fri, 08 Dec 2023 14:06:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n            \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n            \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n            \"vin\": \"1HGBH41JXMN109186\",\n            \"brand\": \"toyota\",\n            \"model\": \"yaris\",\n            \"year\": 2017,\n            \"registrationNumber\": \"AB-123-CD\",\n            \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n            \"contractSubscriptionKm\": 100000,\n            \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n            \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n            \"__v\": 0\n        }\n    ],\n    \"count\": 1,\n    \"limit\": 10,\n    \"start\": 0\n}"}],"_postman_id":"75189e2f-f86a-4fa9-88f6-8091b4f55291"},{"name":"find one","id":"c819ae12-1adf-48c8-9d37-6f9c513b27e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/vehicle/3e4b9e73-c4bf-4245-ab9e-74dba73524f1","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["vehicle","3e4b9e73-c4bf-4245-ab9e-74dba73524f1"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"9350453e-af05-46bf-b290-0d516d77db53","name":"find one","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/vehicle/3e4b9e73-c4bf-4245-ab9e-74dba73524f1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"419"},{"key":"ETag","value":"W/\"1a3-XUloWN+1SxykPYp7kTPMl6Gvkus\""},{"key":"Date","value":"Fri, 08 Dec 2023 14:00:09 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n    \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n    \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n    \"vin\": \"1HGBH41JXMN109186\",\n    \"brand\": \"toyota\",\n    \"model\": \"yaris\",\n    \"year\": 2017,\n    \"registrationNumber\": \"AB-123-CD\",\n    \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n    \"contractSubscriptionKm\": 100000,\n    \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n    \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n    \"__v\": 0\n}"}],"_postman_id":"c819ae12-1adf-48c8-9d37-6f9c513b27e0"},{"name":"find one devices","id":"af404137-6706-463a-981c-750d7aa2916c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/vehicle/3e4b9e73-c4bf-4245-ab9e-74dba73524f1/device","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["vehicle","3e4b9e73-c4bf-4245-ab9e-74dba73524f1","device"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[{"id":"5ce1865a-b633-4202-b5f5-50d33993c318","name":"find one devices","originalRequest":{"method":"GET","header":[],"url":"https://andrew-api.students-epitech.ovh/api/vehicle/3e4b9e73-c4bf-4245-ab9e-74dba73524f1/device"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"1305"},{"key":"ETag","value":"W/\"519-N/i+9r2ZIr4dIJWE23BTIlpbqhs\""},{"key":"Date","value":"Fri, 08 Dec 2023 14:06:46 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"results\": [\n        {\n            \"_id\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n            \"status\": \"PAIRED_INSURER\",\n            \"createdAt\": \"2023-11-01T16:48:57.197Z\",\n            \"updatedAt\": \"2023-11-02T15:53:19.312Z\",\n            \"__v\": 0,\n            \"customer\": {\n                \"_id\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"insurer\": false,\n                \"status\": \"ACTIVE\",\n                \"authorizationServerUserId\": \"4be3d0a7-2124-4555-930f-54d4eae168a8\",\n                \"contactInformations\": {\n                    \"email\": \"mike@yopmail.com\"\n                },\n                \"activated\": true,\n                \"createdAt\": \"2023-11-02T13:24:40.667Z\",\n                \"updatedAt\": \"2023-11-02T13:24:40.667Z\",\n                \"__v\": 0,\n                \"firstName\": \"mike\",\n                \"lastName\": \"doe\",\n                \"fullName\": \"mike doe\"\n            },\n            \"vehicle\": {\n                \"_id\": \"3e4b9e73-c4bf-4245-ab9e-74dba73524f1\",\n                \"contract\": \"ce8e7910-424f-4e18-bddc-c88017d5b637\",\n                \"customer\": \"d4d6ed02-f792-4d62-9cb8-04120cba796d\",\n                \"vin\": \"1HGBH41JXMN109186\",\n                \"brand\": \"toyota\",\n                \"model\": \"yaris\",\n                \"year\": 2017,\n                \"registrationNumber\": \"AB-123-CD\",\n                \"originalInServiceDate\": \"2018-11-03T15:31:05.558Z\",\n                \"contractSubscriptionKm\": 100000,\n                \"createdAt\": \"2023-11-02T15:32:57.883Z\",\n                \"updatedAt\": \"2023-11-02T15:32:57.883Z\",\n                \"__v\": 0\n            },\n            \"insurerActivationDate\": \"2023-11-02T15:53:19.000Z\",\n            \"serialNumber\": \"76BUPWD9R2DCZ3VQS29FAR3TMEFAXEKY\",\n            \"events\": [],\n            \"lastSessions\": [\n                {\n                    \"_id\": \"2d8729cf-e408-4786-a3e3-13aa33eb37d9\",\n                    \"device\": \"795444ab-531d-4f22-95eb-a276726bfb33\",\n                    \"start\": \"2023-11-02T08:40:23.600Z\",\n                    \"end\": \"2023-11-02T08:40:32.630Z\",\n                    \"__v\": 0\n                }\n            ]\n        }\n    ],\n    \"count\": 1,\n    \"start\": 0,\n    \"limit\": 10\n}"}],"_postman_id":"af404137-6706-463a-981c-750d7aa2916c"}],"id":"9b217e48-f0dc-4c21-981f-d215b97fce4c","_postman_id":"9b217e48-f0dc-4c21-981f-d215b97fce4c","description":""},{"name":"object-storage","item":[{"name":"generate an upload url for a document","id":"2bc5f266-8e25-43e8-ad8b-82416a1ce8fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"fileKey\": \"customer/payments/terms-of-sales\",\n    \"fileName\": \"test.pdf\",\n    \"mimetype\": \"application/pdf\"\n\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/object-storage/upload","urlObject":{"path":["object-storage","upload"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"2bc5f266-8e25-43e8-ad8b-82416a1ce8fb"},{"name":"generate a download/view url for a document","id":"4a235c7c-e522-4910-871b-5e78c0007916","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"fileKey\": \"customer/identity/id-card\",\n    \"fileName\": \"75f578c4-f241-43b5-bdcf-89455252e353_6ec9ba33-f5fc-44a3-829c-420bc25f5162_T-CLO-902_pitch (1).pdf\"\n}","options":{"raw":{"language":"json"}}},"url":"https://andrew-api.students-epitech.ovh/api/object-storage/download","description":"<p>Role Restrictions:<br />When making request as a user, data is scoped to the user data</p>\n","urlObject":{"path":["object-storage","download"],"host":["https://andrew-api.students-epitech.ovh/api"],"query":[],"variable":[]}},"response":[],"_postman_id":"4a235c7c-e522-4910-871b-5e78c0007916"},{"name":"store a file on object storage solution using a presigned url","id":"acdb40d7-2937-476c-85c5-bea4a7a1e31e","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"auth":{"type":"noauth","isInherited":false},"method":"PUT","header":[],"body":{"mode":"file","file":{"src":"/Users/antoine/Documents/TEST_TECHNIQUE/iprotego-api/test/data/driver_license.jpeg"}},"url":"https://iprotego.s3.eu-west-3.amazonaws.com/uploads/d655a9b2-5a38-4849-b6b7-eab3ecf69dcf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=ASIASFUIRZO46BTPC6CC%2F20240911%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20240911T171350Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEGkaCWV1LXdlc3QtMyJIMEYCIQCEz5%2B5t5Ot2HM%2FlJk8wg1FfhNMWOC6epXOj9TVKjVqwQIhAIE7gh7oB0MjxA%2Fa4W47GIhiFiRbIIkzNDmsS2FjXHfgKvADCJL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMTQ5NTM2NDkyNDczIgwoUyDniiuipy%2F1hUYqxAPt4LKCTXE5noVhS8RmuDt8VZlqUpn%2F%2Fip8MVVvaTgIIXp893DfsAkd4gMRbHPlJwi5v4ilG6tNarbAqKz3QtXo8WSXiQsOxbuwoqdZlietWSS5uA87DLJVzDnwcmLPMAJAJ4vImaQgJSKCKWdCBN5kCni1Y87Rmyg%2BekRdGnh6URYkrCLh00FifbOZpERo3C1MxuPvjmkopsn4XFzgKavbXljY2QA9VmS7rT%2F%2B9CC5iSA%2BbHy1jukMlcLGd2yQoX%2BCoI2W8bq3tdZO9Iwjag8Qnj2hcsHvTJhUlvqVgvE%2BcF0AWsyHBs8u2kbVENx74ZhQEXK70IXKzQJxAYbcskrmrsUZJqnY6Uom31MmtQkyb6D0NE%2Fmy7oPZ6ohpJFseZL0Bns9eyY%2BYe6k8AlQAyrgz1i1C4jqwpCivPgJl%2F3bZAyxUsvSpaEori0BmG9fkOPtIkJdqQZXDAXezVCjGieNccC4YN8g8A5nkr8HZ1jAo6e%2FwN7F7RrJmZapdaRcmTAipiXpOdySj5hgRP3Jv8OmYTWx6IeL0RwmRytK1io68WRwFCNjgB6AXA6khVg6vBFiE0I2NR7TKg8HtgwmRoSqucRUpzCanoe3BjqkAYe8fZDZ%2FLIUdYGu8o5851e97xyM2R0Zd8Z1jWufbIwqkSDDr3OzRLq7mkQFkoLcUNHbr7%2BS%2FFk8ZSaWEiMvj8waf44zXFp0mn9rkM%2BudRroUPvcc7BUjpGOWhbApV31aeyz33RfF8m9jrMH%2FLOblwRYHiO%2Bw96ynho%2B9h3n6fPlmJgZ6em1KnCfyvqnYl1EO5pDxUHtphwJ%2B9yrFBKu98cFnZW3&X-Amz-Signature=69368ab8c6bf9a7199fb07ebd334ce9644ef69f63004d8ce6ecbf7d5a5674141&X-Amz-SignedHeaders=host&x-id=PutObject","urlObject":{"protocol":"https","path":["uploads","d655a9b2-5a38-4849-b6b7-eab3ecf69dcf"],"host":["iprotego","s3","eu-west-3","amazonaws","com"],"query":[{"key":"X-Amz-Algorithm","value":"AWS4-HMAC-SHA256"},{"key":"X-Amz-Content-Sha256","value":"UNSIGNED-PAYLOAD"},{"key":"X-Amz-Credential","value":"ASIASFUIRZO46BTPC6CC%2F20240911%2Feu-west-3%2Fs3%2Faws4_request"},{"key":"X-Amz-Date","value":"20240911T171350Z"},{"key":"X-Amz-Expires","value":"3600"},{"key":"X-Amz-Security-Token","value":"IQoJb3JpZ2luX2VjEGkaCWV1LXdlc3QtMyJIMEYCIQCEz5%2B5t5Ot2HM%2FlJk8wg1FfhNMWOC6epXOj9TVKjVqwQIhAIE7gh7oB0MjxA%2Fa4W47GIhiFiRbIIkzNDmsS2FjXHfgKvADCJL%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQABoMMTQ5NTM2NDkyNDczIgwoUyDniiuipy%2F1hUYqxAPt4LKCTXE5noVhS8RmuDt8VZlqUpn%2F%2Fip8MVVvaTgIIXp893DfsAkd4gMRbHPlJwi5v4ilG6tNarbAqKz3QtXo8WSXiQsOxbuwoqdZlietWSS5uA87DLJVzDnwcmLPMAJAJ4vImaQgJSKCKWdCBN5kCni1Y87Rmyg%2BekRdGnh6URYkrCLh00FifbOZpERo3C1MxuPvjmkopsn4XFzgKavbXljY2QA9VmS7rT%2F%2B9CC5iSA%2BbHy1jukMlcLGd2yQoX%2BCoI2W8bq3tdZO9Iwjag8Qnj2hcsHvTJhUlvqVgvE%2BcF0AWsyHBs8u2kbVENx74ZhQEXK70IXKzQJxAYbcskrmrsUZJqnY6Uom31MmtQkyb6D0NE%2Fmy7oPZ6ohpJFseZL0Bns9eyY%2BYe6k8AlQAyrgz1i1C4jqwpCivPgJl%2F3bZAyxUsvSpaEori0BmG9fkOPtIkJdqQZXDAXezVCjGieNccC4YN8g8A5nkr8HZ1jAo6e%2FwN7F7RrJmZapdaRcmTAipiXpOdySj5hgRP3Jv8OmYTWx6IeL0RwmRytK1io68WRwFCNjgB6AXA6khVg6vBFiE0I2NR7TKg8HtgwmRoSqucRUpzCanoe3BjqkAYe8fZDZ%2FLIUdYGu8o5851e97xyM2R0Zd8Z1jWufbIwqkSDDr3OzRLq7mkQFkoLcUNHbr7%2BS%2FFk8ZSaWEiMvj8waf44zXFp0mn9rkM%2BudRroUPvcc7BUjpGOWhbApV31aeyz33RfF8m9jrMH%2FLOblwRYHiO%2Bw96ynho%2B9h3n6fPlmJgZ6em1KnCfyvqnYl1EO5pDxUHtphwJ%2B9yrFBKu98cFnZW3"},{"key":"X-Amz-Signature","value":"69368ab8c6bf9a7199fb07ebd334ce9644ef69f63004d8ce6ecbf7d5a5674141"},{"key":"X-Amz-SignedHeaders","value":"host"},{"key":"x-id","value":"PutObject"}],"variable":[]}},"response":[],"_postman_id":"acdb40d7-2937-476c-85c5-bea4a7a1e31e"}],"id":"75e945c9-b57c-4320-8077-fef079702599","_postman_id":"75e945c9-b57c-4320-8077-fef079702599","description":""}],"id":"b8ecc0bc-6b02-4afa-8ccf-e854b4444213","description":"<h2 id=\"global-workflow\">Global workflow</h2>\n<ol>\n<li>As a superadmin i register devices and flash credentials on the devices firmware (IOT)</li>\n<li>As a new user from the landing page offering the subscription to Andrew's insurance products i click on call to action to create my customer account and i am redirected back to the application logged in</li>\n<li>As a logged in user i create a new subscription application and fill out the required informations and documents</li>\n<li>As a logged in user i submit my subscription application for review</li>\n<li>As an logged in insurer i review and validate the subscription application generating a contract attached checkout url</li>\n<li>As the system i takes informations from the subscription application to register a new contract and it's related vehicles generating checkout url using a the configured payment gateway (stripe)</li>\n<li>As the system i receive confirmation of the user subscription and update the contract status accordingly</li>\n<li>As a logged in insurer i select a device from the available device pool and link the device to a vehicle</li>\n<li>As a logged in insurer i activate the selected/linked device</li>\n<li>As a logged in insurer i send the device to the user address by mail</li>\n<li>As a logged in user i receive the device</li>\n<li>As a logged in user i activate the device by plugging it into the obd plug of my vehicle</li>\n<li>As an authorized device i verify the vehicle VIN is valid in the system</li>\n<li>As the system i validate the device from a customer point of view</li>\n<li>As a user, i am now happy i am insured</li>\n<li>As the device i collect vehicle metrics and send them to the system periodically</li>\n<li>As the system i classify the vehicle driver behaviour</li>\n<li>As the system and according to the vehcile driver behaviour classification i grant insurance discount on the user susbscription.</li>\n</ol>\n<h2 id=\"subscription-application-and-contract-status-workflow\">Subscription application and Contract status workflow</h2>\n<p>I. A customer create a subscription application with a status of PENDING<br />II. when all informations filled and the customer wants to apply it confirms it subscription application and asks for a review of it, the status moved from PENDING to REVIEWING<br />III. An insurer review the subscription application and can directly update the data if wanted, or finalize the subscription by applying a status:</p>\n<ol>\n<li>PAYMENT_PENDING: initiate the payment/checkout workflow by generating a checkout url<ul>\n<li>system register a contract with an INACTIVE status and vehicles linked to the contract from data present in subscription application</li>\n<li>customer click on the generated checkout url</li>\n<li>contract status change from INACTIVE to ACTIVE upon successful subscription initialization</li>\n</ul>\n</li>\n<li>REJECTED: customer can create a new susbcription application the current one won't be changed anymore</li>\n<li>TO_AMMEND: customer must update it's subscription application<ul>\n<li>customer can ammend its subscription application and restart from step II</li>\n</ul>\n</li>\n</ol>\n<h2 id=\"roles\">Roles</h2>\n<ul>\n<li>superadmin:<ul>\n<li>devices WRITE + DELETE</li>\n<li>all below roles</li>\n</ul>\n</li>\n<li>supervisor:<ul>\n<li>devices READ</li>\n<li>devices to contract link</li>\n<li>users READ + WRITE + UPDATE + DELETE</li>\n<li>contracts READ + WRITE + UPDATE + DELETE</li>\n<li>vehicles READ + WRITE + UPDATE + DELETE</li>\n<li>subscription application READ + WRITE + UPDATE + DELETE</li>\n</ul>\n</li>\n<li>user:<ul>\n<li>devices READ own data</li>\n<li>contracts READ own data</li>\n<li>vehicle READ own data</li>\n<li>susbscription application WRITE + UPDATE</li>\n</ul>\n</li>\n</ul>\n<h2 id=\"test-users-and-roles\">Test users and roles</h2>\n<ul>\n<li><a href=\"https://mailto:elliot.billie@yopmail.com\">elliot.billie@yopmail.com</a> - superadmin</li>\n<li><a href=\"https://mailto:jacko@yopmail.com\">jacko@yopmail.com</a> - insurer aka supervisor (keycloak)</li>\n<li><a href=\"https://mailto:jack.williams@yopmail.com\">jack.williams@yopmail.com</a> - user</li>\n<li><a href=\"https://mailto:mike@yopmail.com\">mike@yopmail.com</a> - user</li>\n</ul>\n<h2 id=\"url\">URL</h2>\n<ul>\n<li><a href=\"https://andrew-api.students-epitech.ovh/api\">Main API</a></li>\n<li><a href=\"https://andrew-ecommerce.students-epitech.ovh/api\">Ecommerce API</a></li>\n<li><a href=\"https://login.students-epitech.ovh/realms/andrew/protocol/openid-connect/auth\">Authentication Server - Not directly Accessible</a></li>\n</ul>\n","_postman_id":"b8ecc0bc-6b02-4afa-8ccf-e854b4444213"}],"event":[{"listen":"prerequest","script":{"id":"76610a59-5745-49c9-91e0-eee284fb8853","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"dae53692-8339-42e0-8b32-3ea6bdae4c21","type":"text/javascript","exec":[""]}}],"variable":[{"key":"ROOT_URL","value":"https://andrew-api.students-epitech.ovh/api","type":"string"},{"key":"ECOMMERCE_ROOT_URL","value":"","type":"string"}]}