{"openapi":"3.0.0","info":{"title":"Datakeeper API","description":"Containing endpoint and model definitions for organisations using Datakeeper through a Digital Identity Service Provider.","version":"1.0.1"},"servers":[{"url":"https://api-sandbox.rabobank.nl/openapi/sandbox/datakeeper","description":"Sandbox server"},{"url":"https://api.rabobank.nl/openapi/datakeeper","description":"Production server"}],"paths":{"/organisations/my":{"get":{"summary":"Get my organisation details","description":"Retrieves the delegated tenant id and onboarding status of your organisation. The organisation is known by\nDatakeeper based on the credentials provided by the Digital Identity Service Provider.\n","responses":{"200":{"description":"Organisation details retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganisationWithStatusDto"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_AUTHENTICATION_ERROR":{"$ref":"#/components/examples/COMMON_AUTHENTICATION_ERROR"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_DATABASE_ERROR":{"$ref":"#/components/examples/COMMON_DATABASE_ERROR"}}}}}}}},"/sessions":{"post":{"summary":"Creates a new data request","requestBody":{"$ref":"#/components/requestBodies/SessionRequest"},"responses":{"201":{"description":"Session successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSessionResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"VALIDATION_ERROR":{"$ref":"#/components/examples/COMMON_VALIDATION_ERROR"},"TO_SIGN_EMPTY_TO_VERIFY_ERROR":{"$ref":"#/components/examples/COMMON_TO_SIGN_EMPTY_TO_VERIFY_ERROR"},"CORRELATION_GROUP_VALIDATION_ERROR":{"$ref":"#/components/examples/CORRELATION_GROUP_VALIDATION_ERROR"},"CONTEXT_VALIDATION_ERROR":{"$ref":"#/components/examples/CONTEXT_VALIDATION_ERROR"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_AUTHENTICATION_ERROR":{"$ref":"#/components/examples/COMMON_AUTHENTICATION_ERROR"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_DATABASE_ERROR":{"$ref":"#/components/examples/COMMON_DATABASE_ERROR"}}}}}}}},"/sessions/{sessionId}":{"delete":{"summary":"Delete data request session","description":"Removes the session with specified id","parameters":[{"in":"path","schema":{"type":"string"},"required":true,"name":"sessionId","description":"Id of the session that should be removed"}],"responses":{"204":{"description":"Session was removed successfully"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_AUTHENTICATION_ERROR":{"$ref":"#/components/examples/COMMON_AUTHENTICATION_ERROR"}}}}},"404":{"description":"Session was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_QUERY_RESOURCE_NOT_FOUND_ERROR":{"$ref":"#/components/examples/COMMON_QUERY_RESOURCE_NOT_FOUND_ERROR"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_DEFAULT_ERROR":{"$ref":"#/components/examples/COMMON_DEFAULT_ERROR"},"COMMON_DATABASE_ERROR":{"$ref":"#/components/examples/COMMON_DATABASE_ERROR"}}}}}}}},"/sessions/{sessionId}/qr":{"get":{"summary":"Get QR-code for session","parameters":[{"in":"path","name":"sessionId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"PNG image of QR-code as base64 encoded string","content":{"text/plain":{"schema":{"type":"string","example":"data:image/png;base64,<EncodedImage>"}}}},"404":{"description":"Session was already closed or not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_QUERY_RESOURCE_NOT_FOUND_ERROR":{"$ref":"#/components/examples/COMMON_QUERY_RESOURCE_NOT_FOUND_ERROR"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_DEFAULT_ERROR":{"$ref":"#/components/examples/COMMON_DEFAULT_ERROR"},"COMMON_DATABASE_ERROR":{"$ref":"#/components/examples/COMMON_DATABASE_ERROR"}}}}}}}},"/verification-status/{transactionId}":{"get":{"summary":"Get verification transaction details","description":"Retrieves the status and details of a verification transaction containing requested predicates and user's data\nif available.\n","parameters":[{"in":"path","name":"transactionId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VerifiedTransactionItemDto"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_AUTHENTICATION_ERROR":{"$ref":"#/components/examples/COMMON_AUTHENTICATION_ERROR"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_DATABASE_ERROR":{"$ref":"#/components/examples/COMMON_DATABASE_ERROR"}}}}}}},"delete":{"summary":"Remove verification transaction and related session","description":"Removes all user related data if it was submitted together with verification transaction. Also removes related\nsession if it is not yet removed. In case consumer did not send data yet, the next time they open the request\non mobile app, the consumer will see a message in the app that the session has expired.\n","parameters":[{"in":"path","name":"transactionId","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Verification transaction was removed correctly"},"400":{"description":"Bad request","content":{"application/json":{"examples":{"VERIFIED_CREDENTIALS_VERIFICATION_ERROR":{"$ref":"#/components/examples/COMMON_VERIFIED_CREDENTIALS_VERIFICATION_ERROR"},"SIGNATURE_VALIDATION_ERROR":{"$ref":"#/components/examples/COMMON_SIGNATURE_VALIDATION_ERROR"},"COMMON_NO_MATCHING_PREDICATE_ERROR":{"$ref":"#/components/examples/COMMON_NO_MATCHING_PREDICATE_ERROR"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_AUTHENTICATION_ERROR":{"$ref":"#/components/examples/COMMON_AUTHENTICATION_ERROR"}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"COMMON_DATABASE_ERROR":{"$ref":"#/components/examples/COMMON_DATABASE_ERROR"}}}}}}}}},"components":{"requestBodies":{"SessionRequest":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDto"},"example":{"toAttest":{},"toVerify":[{"@context":["https://schema.org/government-documents#passport"],"predicate":"firstName","correlationGroup":"1","allowedIssuers":["did:eth:0xFf32CDC90FD1BE094De7899A82da70469c8E0cae","did:eth:0xF08e1b79E82D6bAF26Cfc7E6028191b3a1B8F6E8","did:eth:0x159F556B01A9Ceaa5008Bfb3286752C7e83B70bf"]},{"@context":["https://schema.org/government-documents#passport"],"predicate":"lastName","correlationGroup":"1","allowedIssuers":["did:eth:0xFf32CDC90FD1BE094De7899A82da70469c8E0cae","did:eth:0xF08e1b79E82D6bAF26Cfc7E6028191b3a1B8F6E8","did:eth:0x159F556B01A9Ceaa5008Bfb3286752C7e83B70bf"]}],"delegatedTenant":"d290f1ee-6c54-4b01-90e6-d701748f0851","userId":"userId123","purpose":"The GDPR purpose of this data request"}}}}},"schemas":{"ToAttest":{"type":"object","description":"Documents that contain predicates to attest","example":{"http://schema.org/government-documents#passport":{"predicates":{"firstName":"Willeke Liselotte","lastName":"de Bruijn"}}}},"ToVerify":{"type":"object","required":["allowedIssuers","predicate"],"properties":{"@context":{"type":"array","items":{"type":"string"}},"predicate":{"type":"string"},"correlationGroup":{"type":"string"},"allowedIssuers":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"},"notOlderThan":{"type":"string","format":"date-time","description":"has to be ISO date-time format","example":"2024-12-01T00:00:00Z"}},"example":{"@context":["https://schema.org/government-documents#passport"],"predicate":"income","allowedIssuers":["did:eth:0xe56315023679fA6C07727aBc06Eb600fE90fa673"],"correlationGroup":"1","optional":true}},"Error":{"required":["errorText","errorCode"],"properties":{"errorText":{"type":"string"},"errorCode":{"type":"integer"}}},"OrganisationWithStatusDto":{"type":"object","properties":{"organisationId":{"type":"string","example":"org-1234567890abcdef"},"delegatedTenantId":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"status":{"type":"string","enum":["WAITING_FOR_APPROVAL","APPROVED","DENIED","REVOKED"]}}},"SessionRequestDto":{"type":"object","required":["userId","toAttest","toVerify"],"properties":{"userId":{"type":"string"},"toAttest":{"$ref":"#/components/schemas/ToAttest"},"toVerify":{"type":"array","items":{"$ref":"#/components/schemas/ToVerify"}}}},"SessionDto":{"type":"object","allOf":[{"$ref":"#/components/schemas/SessionRequestDto"}],"properties":{"delegatedTenant":{"description":"required for DISP delegated tenants","type":"string","format":"uuid"},"toSign":{"description":"has to be filled in case of signing","type":"array","items":{"$ref":"#/components/schemas/ContractDto"}},"purpose":{"description":"the purpose of this data request, has to be filled in accordance with GDPR","type":"string"},"redirectUrl":{"description":"url where the user will be redirected after completing the session","type":"string","example":"https://mycompany.com/verification-completed"},"redirect":{"type":"object","allOf":[{"$ref":"#/components/schemas/RedirectDto"}]},"webhook":{"$ref":"#/components/schemas/WebhookDto"}}},"ContractDto":{"required":["docId","content","documentName","contentHash"],"type":"object","properties":{"docId":{"type":"string"},"content":{"type":"string"},"documentName":{"type":"string"},"contentHash":{"type":"string"}}},"RedirectDto":{"description":"has to be filled when title and description should be shown on the redirect page","required":["redirectUrl"],"type":"object","properties":{"redirectUrl":{"type":"string","example":"https://mycompany.com/verification-completed"},"title":{"type":"object","allOf":[{"$ref":"#/components/schemas/LocaleDto"}]},"description":{"type":"object","allOf":[{"$ref":"#/components/schemas/LocaleDto"}]}}},"LocaleDto":{"required":["nl","en","de"],"type":"object","properties":{"nl":{"description":"human readable text in Dutch","type":"string"},"en":{"description":"human readable text in English","type":"string"},"de":{"description":"human readable text in German","type":"string"}}},"WebhookDto":{"description":"has to be filled in order to receive session status updates via webhook callbacks","required":["version","endpoint"],"type":"object","properties":{"version":{"type":"string","example":"1"},"endpoint":{"type":"string","example":"https://mycompany.com/api/webhook-callback"}}},"StartSessionResponse":{"type":"object","properties":{"sessionId":{"type":"string","example":"ses-6dc8b474-f3cb-47be-95ca-19e065fe4c29"},"qrcode":{"type":"string","deprecated":true,"description":"This field is no longer actively used. Please use dynamicLink instead.","example":"https://mycompany.com/challenges/ses-6dc8b474-f3cb-47be-95ca-19e065fe4c29"},"transactionId":{"type":"string","example":"trx-09fefae8-e2c7-4d3e-b9c1-7d70a351d19f"},"dynamicLink":{"type":"string","description":"Link that can be used either as traditional link or rendered as QR-code","example":"https://link.datakeeper.nl/?link=https%3A%2F%2Fmycompany.com%2FaHR0cHMlM0ElMkYlMkZzc2BpLmRrLmRldmRrLmRldmlubm9odWIubmwlMkZjaVuZ2VzJTJGc2VzLTZkYzhiNDc0LWYzY2ItNDdiZSTE5ZTA2NWZlNGMyOQ%3D%3D&apn=com.app&ibi=com.app&isi=123123123"}}},"VerificationDetailsDto":{"type":"object","properties":{"did":{"type":"string"},"issuer":{"type":"string"},"predicateValues":{"type":"object","additionalProperties":{"type":"string"}}}},"VerifiedTransactionItemDto":{"type":"object","properties":{"id":{"type":"string"},"transactionId":{"type":"string"},"allowedIssuers":{"type":"array","items":{"type":"string"}},"optional":{"type":"boolean"},"predicate":{"type":"string"},"status":{"type":"string","enum":["CREATED","PENDING","CONFIRMED","FAILED","CONFIRMED_UNSUCCESSFUL_ZKP","CANCELLED","EXPIRED"]},"modifyDate":{"type":"string","format":"date-time"},"notOlderThan":{"type":"string","format":"date-time","description":"has to be ISO date-time format","example":"2023-10-29T00:00:00Z"},"details":{"$ref":"#/components/schemas/VerificationDetailsDto"}}}},"examples":{"COMMON_DATABASE_ERROR":{"value":{"errorText":"Database internal error","errorCode":1001}},"COMMON_VALIDATION_ERROR":{"value":{"errorText":"Error occurred during property validation","errorCode":2001}},"COMMON_NO_MATCHING_PREDICATE_ERROR":{"value":{"errorText":"No matching predicate error","errorCode":2002}},"COMMON_VERIFIED_CREDENTIALS_VERIFICATION_ERROR":{"value":{"errorText":"Credentials verification failed","errorCode":2003}},"COMMON_SIGNATURE_VALIDATION_ERROR":{"value":{"errorText":"Signature validation error","errorCode":2004}},"COMMON_TO_SIGN_EMPTY_TO_VERIFY_ERROR":{"value":{"errorText":"toSign validation error - toVerify can not be empty","errorCode":2005}},"CORRELATION_GROUP_VALIDATION_ERROR":{"value":{"errorText":"Correlation group validation error","errorCode":2006}},"NO_MATCHING_VERIFIABLE_CREDENTIAL_ERROR":{"value":{"errorText":"No matching VerifiableCredential validation error","errorCode":2007}},"DOCUMENT_ID_VALIDATION_ERROR":{"value":{"errorText":"DocumentId validation error","errorCode":2008}},"COMMON_QUERY_RESOURCE_NOT_FOUND_ERROR":{"value":{"errorText":"Query resource not found error","errorCode":3001}},"COMMON_UPDATE_RESOURCE_NOT_FOUND_ERROR":{"value":{"errorText":"Update resource not found error","errorCode":3002}},"COMMON_PATH_NOT_FOUND_FOR_METHOD_ERROR":{"value":{"errorText":"Path not found for method","errorCode":4001}},"COMMON_PATH_NOT_FOUND_ERROR":{"value":{"errorText":"The requested path doesnt exist","errorCode":4002}},"COMMON_AUTHENTICATION_ERROR":{"value":{"errorText":"Authentication error","errorCode":5001}},"CONTEXT_VALIDATION_ERROR":{"value":{"errorText":"Context validation error","errorCode":6001}},"COMMON_DEFAULT_ERROR":{"value":{"errorText":"Bad gateway","errorCode":9001}}}}}