{"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\nthe 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 exists in 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/saveOverwrite":{"post":{"tags":["Account"],"summary":"Saves the account informations overwriting new wallet","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveOverwriteAccountDTO"}}}},"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/loginSeller":{"post":{"tags":["Account"],"summary":"Login into the Seller/Maker/Distributor account (for the seller app)","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSellerDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginSellerRespDTO"}}}}}}},"/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"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceResponseDTO"}}}}}}},"/bc/account/sendCode":{"post":{"tags":["Account"],"summary":"Send the confirmation code","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCodeDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceResponseDTO"}}}}}}},"/bc/account/confirmCode":{"post":{"tags":["Account"],"summary":"Confirm the confirmation code","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCodeDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceResponseDTO"}}}}}}},"/bc/product/deposit":{"post":{"tags":["Product"],"summary":"Deposit the NFT on the 1TrueID Wallet to permit the OWN IT operation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepositResponseDTO"}}}}}}},"/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/OwnResponseDTO"}}}}}}},"/bc/product/sendToCustomer":{"post":{"tags":["Product"],"summary":"Recall the Send To Customer operation on the selected product","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendToCustomerRequestDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendToCustomerResponseDTO"}}}}}}},"/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/informations/get-by-bc/product-uid/{uid}":{"get":{"tags":["Product"],"summary":"Returns the product information given a tokenId","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductDTO"}}}}}}},"/bc/product/informations/get-by-bc/uid/{uid}/payload/{payload}":{"get":{"tags":["Product"],"summary":"Returns the product information given the DDNA","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string"}},{"name":"payload","in":"path","required":true,"schema":{"type":"string"}}],"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"},"confirmCode":{"type":"string"}},"example":{"username":"zizzo2@1trueid.com","name":"Zizzo","surname":"Zizzo","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","deviceId":"12936892","confirmCode":"12345678"}},"SaveOverwriteAccountDTO":{"properties":{"username":{"type":"string"},"name":{"type":"string"},"surname":{"type":"string"},"otiAccountAddress":{"type":"string"},"deviceId":{"type":"string"},"confirmCode":{"type":"string"}},"example":{"username":"zizzo2@1trueid.com","name":"Zizzo","surname":"Zizzo","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","deviceId":"12936892","confirmCode":"12345678"}},"LoginDTO":{"properties":{"deviceId":{"type":"string"}},"example":{"deviceId":"12345678"}},"LoginRespDTO":{"properties":{"accessToken":{"type":"string"}},"example":{"accessToken":"user-access-token"}},"LoginSellerDTO":{"properties":{"username":{"type":"string"},"password":{"type":"string"},"deviceId":{"type":"string"}},"example":{"username":"pippo","password":"pippopw","deviceId":"Device123456"}},"LoginSellerRespDTO":{"properties":{"accessToken":{"type":"string"}},"example":{"accessToken":"user-access-token"}},"AddDeviceRequestDTO":{"properties":{"email":{"type":"string"},"otiAccountAddress":{"type":"string"},"overwriteAddress":{"type":"boolean"}},"example":{"email":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","overwriteAddress":false}},"AddDeviceConfirmDTO":{"properties":{"email":{"type":"string"},"otiAccountAddress":{"type":"string"},"confirmCode":{"type":"string"},"deviceId":{"type":"string"},"overwriteAddress":{"type":"boolean"}},"example":{"email":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","confirmCode":"12345678","deviceId":"Device456789","overwriteAddress":false}},"SendCodeDTO":{"properties":{"email":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com"}},"ConfirmCodeDTO":{"properties":{"email":{"type":"string"},"confirmCode":{"type":"string"},"cleanCode":{"type":"boolean"}},"example":{"email":"zizzo2@1trueid.com","confirmCode":"12345678","cleanCode":false}},"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":{"required":["deviceId"],"properties":{"deviceId":{"type":"string","description":"DeviceID"},"ddna":{"type":"string","description":"DDNA to pass only for QR Codes"},"ddnaNfc":{"type":"string","description":"DDNA to pass only for NFC Codes"}},"example":{"deviceId":"Device123456","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","ddnaNfc":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC"}},"DepositDTO":{"required":["deviceId"],"properties":{"deviceId":{"type":"string","description":"DeviceID"},"ddna":{"type":"string","description":"DDNA to pass only for QR Codes"},"ddnaNfc":{"type":"string","description":"DDNA to pass only for NFC Codes"}},"example":{"deviceId":"Device123456","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","ddnaNfc":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC"}},"DepositResponseDTO":{"properties":{"txid":{"type":"string","description":"Transaction ID"}},"example":{"txid":"4124f89f89a9389398989898b9893849823989c98984192849f"}},"OwnResponseDTO":{"properties":{"txid":{"type":"string","description":"Transaction ID"}},"example":{"txid":"4124f89f89a9389398989898b9893849823989c98984192849f"}},"SendToCustomerRequestDTO":{"required":["deviceId","email"],"properties":{"deviceId":{"type":"string","description":"Device ID of the sender"},"email":{"type":"string","description":"email address of the destination user (must be a registered 1trueid user)"},"ddna":{"type":"string","description":"DDNA to pass only for QR Codes"},"ddnaNfc":{"type":"string","description":"DDNA to pass only for NFC Codes"}},"example":{"deviceId":"Device123456","email":"therealpaperino@email.com","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","ddnaNfc":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC"}},"SendToCustomerResponseDTO":{"properties":{"txid":{"type":"string","description":"Transaction ID"}},"example":{"txid":"4124f89f89a9389398989898b9893849823989c98984192849f"}}}}}