{"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* appName: The unique identifier of the mobile application calling the services\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* apiKey: It represents a unique identifier for the API using system. It is provided by 1TrueID under specific request, if you want to use these API.\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"}},{"name":"appName","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}},{"name":"apiKey","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"}},{"name":"appName","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}},{"name":"apiKey","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/deleteAccount":{"post":{"tags":["Account"],"summary":"Delete account","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRespDTO"}}}}}}},"/bc/account/save":{"post":{"tags":["Account"],"summary":"Saves the account informations","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","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/LoginRespDTO"}}}}}}},"/bc/account/loginSeller":{"post":{"tags":["Account"],"summary":"Login into the Seller/Maker/Distributor account (for the seller app)","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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"}},{"name":"appName","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}},{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountUpdateDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDTO"}}}}}}},"/bc/account/addDeviceReq":{"post":{"tags":["Account"],"summary":"Creates a device association request","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCodeDTO"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddDeviceResponseDTO"}}}}}}},"/bc/account/testEmail":{"post":{"tags":["Account"],"summary":"Test email sending","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailDTO"}}}},"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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","parameters":[{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"schema":{"type":"string"}}],"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":false,"style":"form","explode":false,"schema":{"type":"string"}},{"name":"address","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"string"}},{"name":"appName","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"string"}},{"name":"apiKey","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"}},{"name":"deviceId","in":"query","required":true,"schema":{"type":"string"}},{"name":"appName","in":"query","required":true,"schema":{"type":"string"}},{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"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"}},{"name":"deviceId","in":"query","required":true,"schema":{"type":"string"}},{"name":"appName","in":"query","required":true,"schema":{"type":"string"}},{"name":"apiKey","in":"query","required":true,"style":"form","explode":false,"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}},"DeleteAccountDTO":{"properties":{"email":{"type":"string"},"appName":{"type":"string"}},"example":{"email":"123@abc.com","appName":"1TRUEID"}},"DeleteAccountRespDTO":{"properties":{"status":{"type":"string"}},"example":{"status":"OK"}},"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"}},"AccountUpdateDTO":{"properties":{"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"}},"example":{"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":""}},"SaveAccountDTO":{"properties":{"username":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"surname":{"type":"string"},"otiAccountAddress":{"type":"string"},"deviceId":{"type":"string"},"confirmCode":{"type":"string"},"appName":{"type":"string"}},"example":{"username":"zizzo2","email":"zizzo2@1trueid.com","name":"Zizzo","surname":"Zizzo","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","deviceId":"12936892","confirmCode":"12345678","appName":"1TRUEID"}},"SaveOverwriteAccountDTO":{"properties":{"email":{"type":"string"},"name":{"type":"string"},"surname":{"type":"string"},"otiAccountAddress":{"type":"string"},"deviceId":{"type":"string"},"confirmCode":{"type":"string"},"appName":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com","name":"Zizzo","surname":"Zizzo","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","deviceId":"12936892","confirmCode":"12345678","appName":"1TRUEID"}},"LoginDTO":{"properties":{"deviceId":{"type":"string"},"appName":{"type":"string"}},"example":{"deviceId":"12345678","appName":"1TRUEID"}},"LoginRespDTO":{"properties":{"accessToken":{"type":"string"}},"example":{"accessToken":"user-access-token"}},"LoginSellerDTO":{"properties":{"username":{"type":"string"},"password":{"type":"string"},"deviceId":{"type":"string"},"appName":{"type":"string"}},"example":{"username":"pippo","password":"pippopw","deviceId":"Device123456","appName":"1TRUEID_SELLER"}},"LoginSellerRespDTO":{"properties":{"accessToken":{"type":"string"}},"example":{"accessToken":"user-access-token"}},"AddDeviceRequestDTO":{"properties":{"email":{"type":"string"},"username":{"type":"string"},"otiAccountAddress":{"type":"string"},"overwriteAddress":{"type":"boolean"},"appName":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com","username":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","overwriteAddress":false,"appName":"1TRUEID"}},"AddDeviceConfirmDTO":{"properties":{"email":{"type":"string"},"username":{"type":"string"},"otiAccountAddress":{"type":"string"},"confirmCode":{"type":"string"},"deviceId":{"type":"string"},"overwriteAddress":{"type":"boolean"},"appName":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com","username":"zizzo2@1trueid.com","otiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s","confirmCode":"12345678","deviceId":"Device456789","overwriteAddress":false,"appName":"1TRUEID"}},"SendCodeDTO":{"properties":{"email":{"type":"string"},"appName":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com","appName":"1TRUEID"}},"ConfirmCodeDTO":{"properties":{"email":{"type":"string"},"appName":{"type":"string"},"confirmCode":{"type":"string"},"cleanCode":{"type":"boolean"}},"example":{"email":"zizzo2@1trueid.com","appName":"1TRUEID","confirmCode":"12345678","cleanCode":false}},"TestEmailDTO":{"properties":{"email":{"type":"string"}},"example":{"email":"zizzo2@1trueid.com"}},"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"},"appName":{"type":"string","description":"Source Mobile Application name"}},"example":{"deviceId":"Device123456","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","ddnaNfc":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","appName":"1TRUEID"}},"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"},"appName":{"type":"string","description":"Source Mobile Application name"}},"example":{"deviceId":"Device123456","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","ddnaNfc":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","appName":"1TRUEID"}},"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","appName"],"properties":{"deviceId":{"type":"string","description":"Device ID of the sender"},"ddna":{"type":"string","description":"DDNA to pass only for QR Codes"},"ddnaNfc":{"type":"string","description":"DDNA to pass only for NFC Codes"},"tokenId":{"type":"string","description":"TokenID of the tag to transfer"},"destOtiAddress":{"type":"string","description":"Receiver OTI Address (alternative to destOtiAccountAddress and destEmail)"},"destOtiAccountAddress":{"type":"string","description":"Receiver OTI Account Unique Address (alternative to destOtiAddress and destEmail)"},"destEmail":{"type":"string","description":"Receiver Email address (alternative to destOtiAddress and destOtiAccountAddress)"},"appName":{"type":"string","description":"Source Mobile Application name"}},"example":{"deviceId":"Device123456","ddna":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","ddnaNfc":"4F1F0E93465C377EB73B77016AE57B55F17E05AC37D12340C3FC371845BB2A24D1F7F242947EEC911C843AC1AD7E2D925013F1C48AA0E0C58FF509D480AB3FCC","tokenId":"112233445566AABB","destOtiAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s-<OPTIONAL VALUE>","destOtiAccountAddress":"sK5qFcALUL999999WDjThtjVecEVKCkH6s-<OPTIONAL VALUE>","destEmail":"zizzo2@1trueid.com-<OPTIONAL VALUE>","appName":"1TRUEID"}},"SendToCustomerResponseDTO":{"properties":{"txid":{"type":"string","description":"Transaction ID"}},"example":{"txid":"4124f89f89a9389398989898b9893849823989c98984192849f"}}}}}