{"openapi":"3.0.0","info":{"version":"1.0.0","title":"1TrueID 3.0 API Customer","description":"This API Platform is used to expose the necessary functions in support to the NEW 1TrueID Mobile App, integrating the OTIChain BlockChain features. \n\nCommon parameters description\n\n* deviceId: The unique identifier of the device. It is necessary to correctly identify the user starting from his registered device\n* otiAccountAddress: The unique identifier of the customer\n* confirmCode: The confirm code is an autogenerated code that is sent by email. It is used for a two step confirmation of the operations\n* tokenId: It represents the Object identifier scanned by the QRCode or the NFC Tag\n","license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"}},"tags":[{"name":"Account","description":"API for account"},{"name":"Product","description":"API for product"}],"paths":{"/bc/account/exists":{"get":{"tags":["Account"],"summary":"Check if email address already exists in the system","parameters":[{"name":"email","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExistsDTO"}}}}}}},"/bc/account/profile":{"get":{"tags":["Account"],"summary":"Returns the account profile informations.","parameters":[{"name":"deviceId","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDTO"}}}}}}},"/bc/account/save":{"post":{"tags":["Account"],"summary":"Saves the account informations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveAccountDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRespDTO"}}}}}}},"/bc/account/login":{"post":{"tags":["Account"],"summary":"Login into the account","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDTO"},"example":{"deviceId":"Device123456"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRespDTO"}}}}}}},"/bc/account/updProfile":{"post":{"tags":["Account"],"summary":"Update the account profile informations","parameters":[{"name":"deviceId","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDTO"}}}}}}},"/bc/account/addDeviceReq":{"post":{"tags":["Account"],"summary":"Creates a device association request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceRequestDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceResponseDTO"}}}}}}},"/bc/account/addDeviceConf":{"post":{"tags":["Account"],"summary":"Confirms a device association request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceConfirmDTO"},"example":{"email":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","confirmCode":"12345678","deviceId":"Device456789"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceResponseDTO"}}}}}}},"/bc/product/list":{"get":{"tags":["Product"],"summary":"Returns the list of products owned by an account","parameters":[{"name":"deviceId","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListDTO"}}}}}}},"/bc/product/get-by-bc/{tokenId}":{"get":{"tags":["Product"],"summary":"Returns the product information given a tokenId","parameters":[{"name":"tokenId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDTO"}}}}}}},"/bc/product/own":{"post":{"tags":["Product"],"summary":"Recall the OWN operation on the selected product","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnRequestDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDTO"}}}}}}}},"components":{"schemas":{"ExistsDTO":{"properties":{"exists":{"type":"boolean"}},"example":{"exists":true}},"AccountDTO":{"properties":{"uid":{"type":"string","uniqueItems":true},"name":{"type":"string"},"surname":{"type":"string"},"dateOfBirth":{"type":"string"},"telephone":{"type":"string"},"mobile":{"type":"string"},"address":{"type":"string"},"civicNumber":{"type":"integer"},"city":{"type":"string"},"province":{"type":"string"},"country":{"type":"string"},"zip":{"type":"string"},"gender":{"type":"string"},"codfisc":{"type":"string"},"piva":{"type":"string"},"ragsoc":{"type":"string"},"otiAddress":{"type":"string"},"username":{"type":"string"},"email":{"type":"string"},"confirmCode":{"type":"string"}},"example":{"uid":"W7e950f1f","name":"Zizzo","surname":"Zizzo","dateOfBirth":"1990-01-21T00:00:00.000Z","telephone":"123","mobile":"456","address":"via Test","civicNumber":69,"city":"Vibo Valentia","province":"VV","country":"Italy","zip":"12345","gender":"M","codfisc":"FFFYYY82K99N567U","piva":"12345678901","ragsoc":"","otiAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","username":"zizzo2@1trueid.com","email":"zizzo2@1trueid.com","confirmCode":"12345678"}},"SaveAccountDTO":{"properties":{"username":{"type":"string"},"name":{"type":"string"},"surname":{"type":"string"},"otiAccountAddress":{"type":"string"},"deviceId":{"type":"string"}},"example":{"username":"zizzo2@1trueid.com","name":"Zizzo","surname":"Zizzo","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","deviceId":"12345678"}},"LoginDTO":{"properties":{"deviceId":{"type":"string"}},"example":{"deviceId":"12345678"}},"LoginRespDTO":{"properties":{"accessToken":{"type":"string"}},"example":{"accessToken":"user-access-token"}},"AddDeviceRequestDTO":{"properties":{"email":{"type":"string"},"otiAccountAddress":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s"}},"AddDeviceConfirmDTO":{"properties":{"email":{"type":"string"},"otiAccountAddress":{"type":"string"},"confirmCode":{"type":"string"},"deviceId":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","confirmCode":"12345678","deviceId":"Device456789"}},"AddDeviceResponseDTO":{"properties":{"status":{"type":"string"}},"example":{"status":"OK"}},"ProductListDTO":{"properties":{"readBalanceData":{"type":"array"},"tokensData":{"type":"array"}},"example":{"readBalanceData":{"0":"2","__length__":1},"tokensData":[{"index":0,"data":{"0":"FF000000000014","__length__":1},"productName":"Exclusive red and white dress"},{"index":1,"data":{"0":"FF000000000015","__length__":1},"productName":"BORSA"}]}},"ProductDTO":{"properties":{"data":{"type":"object"}},"example":{"data":{"uid":"FF000000000300","name":"Bermuda con stampa VLTN MACROGRID - SV3MD01Q5G2 0NI\r\n\r\n\r\n\r\n","brand":{"name":"VALENTINO"},"intro":"","seoDescription":"Bermuda con stampa VLTN MACROGRID\r\n(SV3MD01Q5G2 0NI)\r\n\r\n- 2 tasche laterali \r\n- Coulisse in vita e sul fondo gamba \r\n- Regular fit \r\n- Composizione: 56% Poliammide 44% Cotone \r\n- Made in Italy\r\n","technicalDescription":" ","field2":"","field1":"","owned":false,"mainImage":{"path":"/product-profile/5199/main-image/WID20211720000044831.png"},"technicalImage":{"path":"/product-profile/5199/technical-image/WID20211720000044832.png"},"price":8037,"waterConsumed":4009,"co2Consumed":360,"uses":6238}}},"OwnRequestDTO":{"properties":{"deviceId":{"type":"string"},"otiAccountAddress":{"type":"string"},"ddna":{"type":"string"}},"example":{"deviceId":"Device123456","otiAccountAddress":"sQ8YQ1Kg14F3bwzAufSi7quhMzyRB48bFJ","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC"}}}}}