From 84506805b96e2e69b6e4892af5ebe5ff1fa3f5a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 06:32:36 +0000 Subject: [PATCH] chore(spec): sync API spec 2026-11-01 --- openapi/SOURCE.json | 8 +- openapi/account.json | 295 +- openapi/verification.json | 31497 ++++++++++++---- .../me/didit/resources/AnalyticsResource.java | 179 + .../java/me/didit/resources/BankResource.java | 4 +- .../resources/IdVerificationResource.java | 2 +- .../me/didit/resources/IdWalletsResource.java | 206 + .../java/me/didit/resources/KybResource.java | 4 +- .../me/didit/resources/PricingResource.java | 2 +- .../me/didit/resources/SessionsResource.java | 3056 +- .../resources/SessionsSignaturesResource.java | 16 +- .../didit/resources/TransactionsResource.java | 2 +- .../didit/resources/TravelRuleResource.java | 11 + .../TravelRuleUnmatchedDepositsResource.java | 325 + .../me/didit/resources/UsersResource.java | 2 +- .../java/me/didit/types/AMLScreening.java | 21 +- .../java/me/didit/types/AMLScreeningRun.java | 65 +- .../me/didit/types/AmlScreenResponse.java | 91 +- .../types/AnalyticsRetrieveTodayParams.java | 99 + .../types/ApplicationAnalyticsToday.java | 401 + .../me/didit/types/BiometricRetention.java | 124 + .../DatabaseValidationValidateParams.java | 322 +- ...letWalletVerificationStartCountryEnum.java | 61 + ...eWalletWalletVerificationStartRequest.java | 195 + .../DigitalIdWalletApiInteractionEnum.java | 6 +- .../DigitalIdWalletApiWalletCatalogEntry.java | 2 + ...alletDigitalCredentialResponseRequest.java | 102 + ...letApiWalletDigitalCredentialsRequest.java | 120 + .../DigitalIdWalletApiWalletNextAction.java | 28 +- ...alIdWalletApiWalletNextActionTypeEnum.java | 6 +- .../me/didit/types/EmailCheckCodeParams.java | 211 +- .../me/didit/types/EmailIntelligence.java | 221 +- .../types/EmailVerificationCheckResponse.java | 22 +- .../me/didit/types/GeolocationAttempt.java | 1750 + .../java/me/didit/types/GeolocationCheck.java | 2023 + .../types/IdVerificationVerifyResponse.java | 4 +- .../me/didit/types/KYBOwnershipStructure.java | 123 + .../types/KYBOwnershipStructureOwner.java | 505 + .../types/KYBRegistryCandidateRequest.java | 4 +- .../java/me/didit/types/KYBRegistryData.java | 932 + .../didit/types/KYBRegistryGroupCompany.java | 144 + .../types/KYBRegistryLiteEnrichment.java | 123 + .../didit/types/KYBRegistrySectionError.java | 102 + .../me/didit/types/KYBRegistrySource.java | 164 + .../didit/types/KYBRegistryUboResolution.java | 252 + .../types/KybListShareholdersResponse.java | 302 +- .../me/didit/types/KybListUbosResponse.java | 302 +- .../me/didit/types/KybSelectResponse.java | 302 +- .../me/didit/types/PhoneCheckCodeParams.java | 274 +- .../me/didit/types/PhoneIntelligence.java | 221 +- .../types/PhoneVerificationCheckResponse.java | 22 +- .../didit/types/SessionDataUpdatedEvent.java | 4 +- .../java/me/didit/types/SessionDecision.java | 4120 +- .../me/didit/types/SessionFilesExport.java | 345 + .../types/SessionStatusUpdatedEvent.java | 4 +- .../didit/types/SessionWebhookEventData.java | 4 +- .../SessionsBulkUpdateAmlHitStatusParams.java | 4 +- ...essionsBulkUpdateAmlHitStatusResponse.java | 4 +- .../SessionsCreateKybPartyDraftParams.java | 643 + .../SessionsCreateKybPartyDraftResponse.java | 773 + .../me/didit/types/SessionsCreateParams.java | 28 +- .../SessionsDeleteKybPartyDraftParams.java | 99 + ...ssionsExportAmlScreeningHistoryParams.java | 22 +- ...SessionsListAmlScreeningHistoryParams.java | 22 +- ...SessionsListKybExtractedPartiesParams.java | 99 + ...ssionsListKybExtractedPartiesResponse.java | 892 + .../SessionsListKybPartyDraftsParams.java | 99 + .../SessionsListKybPartyDraftsResponse.java | 878 + .../me/didit/types/SessionsListParams.java | 63 +- .../me/didit/types/SessionsListResponse.java | 4 +- .../SessionsPreviewDecisionEmailResponse.java | 23 +- .../SessionsPreviewResubmissionParams.java | 5 +- .../SessionsPreviewResubmissionResponse.java | 28 +- .../types/SessionsSubmitKybPartiesParams.java | 119 + .../SessionsSubmitKybPartiesResponse.java | 219 + .../SessionsUpdateAmlHitStatusParams.java | 4 +- .../SessionsUpdateAmlHitStatusResponse.java | 4 +- .../SessionsUpdateKybCompanyDataResponse.java | 12 +- .../SessionsUpdateKybPartyDraftParams.java | 640 + .../SessionsUpdateKybPartyDraftResponse.java | 773 + .../types/SessionsUpdateStatusParams.java | 5 +- .../SessionsUploadKybDocumentsParams.java | 230 + .../SessionsUploadKybDocumentsResponse.java | 159 + .../java/me/didit/types/SignatureResult.java | 85 +- .../me/didit/types/SimpleWorkflowFeature.java | 4 +- .../me/didit/types/TransactionDetail.java | 4 +- .../didit/types/TransactionRuleCondition.java | 4 +- ...ransactionRuleSuggestionsCreatedEvent.java | 530 + .../didit/types/TransactionsCreateParams.java | 12 +- .../didit/types/TransactionsListParams.java | 22 +- .../types/TravelRuleManualMatchRequest.java | 99 + .../types/TravelRuleManualMatchResponse.java | 120 + ...TravelRuleUnmatchedDepositsListParams.java | 280 + ...avelRuleUnmatchedDepositsListResponse.java | 159 + .../me/didit/types/UserSessionListItem.java | 360 +- .../didit/types/UsersBatchDeleteParams.java | 42 +- .../types/WalletScreeningScreenParams.java | 29 +- .../java/me/didit/types/WebhookConfig.java | 22 +- .../java/me/didit/types/WebhookEvent.java | 5 +- .../me/didit/types/WebhookEventPayload.java | 32 +- .../types/WebhooksUpdateConfigParams.java | 22 +- .../java/me/didit/types/WorkflowDetail.java | 150 +- .../resources/AnalyticsResourceTest.java | 18 + .../DatabaseValidationResourceTest.java | 4 +- .../me/didit/resources/EmailResourceTest.java | 4 +- .../resources/IdWalletsResourceTest.java | 39 + .../me/didit/resources/PhoneResourceTest.java | 4 +- .../didit/resources/SessionsResourceTest.java | 172 +- .../resources/TransactionsResourceTest.java | 4 +- ...avelRuleUnmatchedDepositsResourceTest.java | 62 + .../me/didit/resources/UsersResourceTest.java | 4 +- .../didit/resources/WebhooksResourceTest.java | 4 +- 112 files changed, 49840 insertions(+), 8039 deletions(-) create mode 100644 src/main/java/me/didit/resources/TravelRuleUnmatchedDepositsResource.java create mode 100644 src/main/java/me/didit/types/AnalyticsRetrieveTodayParams.java create mode 100644 src/main/java/me/didit/types/ApplicationAnalyticsToday.java create mode 100644 src/main/java/me/didit/types/BiometricRetention.java create mode 100644 src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum.java create mode 100644 src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest.java create mode 100644 src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialResponseRequest.java create mode 100644 src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialsRequest.java create mode 100644 src/main/java/me/didit/types/GeolocationAttempt.java create mode 100644 src/main/java/me/didit/types/GeolocationCheck.java create mode 100644 src/main/java/me/didit/types/KYBOwnershipStructure.java create mode 100644 src/main/java/me/didit/types/KYBOwnershipStructureOwner.java create mode 100644 src/main/java/me/didit/types/KYBRegistryData.java create mode 100644 src/main/java/me/didit/types/KYBRegistryGroupCompany.java create mode 100644 src/main/java/me/didit/types/KYBRegistryLiteEnrichment.java create mode 100644 src/main/java/me/didit/types/KYBRegistrySectionError.java create mode 100644 src/main/java/me/didit/types/KYBRegistrySource.java create mode 100644 src/main/java/me/didit/types/KYBRegistryUboResolution.java create mode 100644 src/main/java/me/didit/types/SessionFilesExport.java create mode 100644 src/main/java/me/didit/types/SessionsCreateKybPartyDraftParams.java create mode 100644 src/main/java/me/didit/types/SessionsCreateKybPartyDraftResponse.java create mode 100644 src/main/java/me/didit/types/SessionsDeleteKybPartyDraftParams.java create mode 100644 src/main/java/me/didit/types/SessionsListKybExtractedPartiesParams.java create mode 100644 src/main/java/me/didit/types/SessionsListKybExtractedPartiesResponse.java create mode 100644 src/main/java/me/didit/types/SessionsListKybPartyDraftsParams.java create mode 100644 src/main/java/me/didit/types/SessionsListKybPartyDraftsResponse.java create mode 100644 src/main/java/me/didit/types/SessionsSubmitKybPartiesParams.java create mode 100644 src/main/java/me/didit/types/SessionsSubmitKybPartiesResponse.java create mode 100644 src/main/java/me/didit/types/SessionsUpdateKybPartyDraftParams.java create mode 100644 src/main/java/me/didit/types/SessionsUpdateKybPartyDraftResponse.java create mode 100644 src/main/java/me/didit/types/SessionsUploadKybDocumentsParams.java create mode 100644 src/main/java/me/didit/types/SessionsUploadKybDocumentsResponse.java create mode 100644 src/main/java/me/didit/types/TransactionRuleSuggestionsCreatedEvent.java create mode 100644 src/main/java/me/didit/types/TravelRuleManualMatchRequest.java create mode 100644 src/main/java/me/didit/types/TravelRuleManualMatchResponse.java create mode 100644 src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListParams.java create mode 100644 src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListResponse.java create mode 100644 src/test/java/me/didit/resources/TravelRuleUnmatchedDepositsResourceTest.java diff --git a/openapi/SOURCE.json b/openapi/SOURCE.json index 9780330..2ece811 100644 --- a/openapi/SOURCE.json +++ b/openapi/SOURCE.json @@ -1,13 +1,13 @@ { "verification.json": { "url": "https://docs.didit.me/openapi-25.json", - "sha256": "12b2fdb05572755d61b93791f6964b7d883ba7b20f7ea9b31543903b6edab8a9", - "fetched_at": "2026-10-29T06:37:04Z" + "sha256": "c6707376c9bcdf636c1fd5452f61955c2c5ca304cce6a1ea8018d4c087fe8914", + "fetched_at": "2026-11-01T06:31:24Z" }, "account.json": { "url": "https://docs.didit.me/openapi-auth.json", - "sha256": "ae1b5e07df822fe93cae27a9eaa0790948069352c9d98c87eecf7efd644c92cb", - "fetched_at": "2026-10-29T06:37:04Z" + "sha256": "5b45b1896ef3107dd9a601c76d9ba35761bae5f04ac731b6c27876603903bf05", + "fetched_at": "2026-11-01T06:31:24Z" }, "webhook-vectors.json": { "generator": "product-automations scripts/server-sdks/make_vectors.py (seeded 2026-10-17)", diff --git a/openapi/account.json b/openapi/account.json index b832f39..22b6117 100644 --- a/openapi/account.json +++ b/openapi/account.json @@ -207,12 +207,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n \"https://apx.didit.me/auth/v2/programmatic/register/\",\n json={\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\",\n },\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json())\n# {'message': 'Registration successful...', 'email': 'you@yourdomain.com'}" + "source": "from didit import Didit\n\n# This call needs no API key.\nclient = Didit()\n\nresult = client.account.register(\n email=\"you@yourdomain.com\",\n password=\"MyStr0ng!Pass\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n \"https://apx.didit.me/auth/v2/programmatic/register/\",\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n email: \"you@yourdomain.com\",\n password: \"MyStr0ng!Pass\",\n }),\n },\n);\nif (!resp.ok) throw new Error(`Register failed: ${resp.status}`);\nconst data = await resp.json();\nconsole.log(data);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// This call needs no API key.\nconst didit = new Didit();\n\nconst result = await didit.account.register({\n email: \"you@yourdomain.com\",\n password: \"MyStr0ng!Pass\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Account.Register(ctx, didit.RegisterRequest{\n\tEmail: \"you@yourdomain.com\",\n\tPassword: \"MyStr0ng!Pass\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.RegisterRequest;\n\n// This call needs no API key.\nDidit client = new Didit();\n\nvar result = client.account().register(RegisterRequest.builder()\n .email(\"you@yourdomain.com\")\n .password(\"MyStr0ng!Pass\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->register([\n 'email' => 'you@yourdomain.com',\n 'password' => 'MyStr0ng!Pass',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# This call needs no API key.\ndidit = Didit::Client.new\n\nresult = didit.account.register(\n email: \"you@yourdomain.com\",\n password: \"MyStr0ng!Pass\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// This call needs no API key.\nusing var client = new DiditClient();\n\nvar result = await client.Account.RegisterAsync(new RegisterRequest\n{\n Email = \"you@yourdomain.com\",\n Password = \"MyStr0ng!Pass\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "security": [ @@ -362,12 +387,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n \"https://apx.didit.me/auth/v2/programmatic/verify-email/\",\n json={\n \"email\": \"you@yourdomain.com\",\n \"code\": \"A3K9F2\",\n },\n timeout=10,\n)\nresp.raise_for_status()\ndata = resp.json()\n\napi_key = data[\"application\"][\"api_key\"]\nprint(f\"Save this for x-api-key: {api_key}\")" + "source": "from didit import Didit\n\n# This call needs no API key.\nclient = Didit()\n\nresult = client.account.verify_email(\n email=\"you@yourdomain.com\",\n code=\"A3K9F2\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n \"https://apx.didit.me/auth/v2/programmatic/verify-email/\",\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n email: \"you@yourdomain.com\",\n code: \"A3K9F2\",\n }),\n },\n);\nif (!resp.ok) throw new Error(`Verify failed: ${resp.status}`);\nconst { application, access_token } = await resp.json();\n// application.api_key -> x-api-key for verification.didit.me/v3\n// access_token -> Authorization: Bearer ... for this auth API" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// This call needs no API key.\nconst didit = new Didit();\n\nconst result = await didit.account.verifyEmail({\n email: \"you@yourdomain.com\",\n code: \"A3K9F2\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Account.VerifyEmail(ctx, didit.VerifyEmailRequest{\n\tEmail: \"you@yourdomain.com\",\n\tCode: \"A3K9F2\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.VerifyEmailRequest;\n\n// This call needs no API key.\nDidit client = new Didit();\n\nvar result = client.account().verifyEmail(VerifyEmailRequest.builder()\n .email(\"you@yourdomain.com\")\n .code(\"A3K9F2\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->verifyEmail([\n 'email' => 'you@yourdomain.com',\n 'code' => 'A3K9F2',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# This call needs no API key.\ndidit = Didit::Client.new\n\nresult = didit.account.verify_email(\n email: \"you@yourdomain.com\",\n code: \"A3K9F2\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// This call needs no API key.\nusing var client = new DiditClient();\n\nvar result = await client.Account.VerifyEmailAsync(new VerifyEmailRequest\n{\n Email = \"you@yourdomain.com\",\n Code = \"A3K9F2\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "security": [ @@ -410,7 +460,7 @@ }, "responses": { "200": { - "description": "Login successful. Returns a fresh JWT pair. Use the `access_token` as `Authorization: Bearer ` against `/organizations/me/...` to look up the `org_id`, `app_id`, and `api_key`.", + "description": "Login successful. Returns a fresh JWT pair. Use the `access_token` as `Authorization: Bearer ` against `/organizations/me/...` to look up the `org_id`, `app_id`, and `api_key`. When the account has an authenticator app or a passkey, the response carries `2fa_required: true` and a `temp_token` instead of tokens.", "content": { "application/json": { "schema": { @@ -497,7 +547,7 @@ } }, "403": { - "description": "The account was recovered and must set up a new sign-in method before it can log in. A link to do that was emailed to the account's address.", + "description": "The account was recovered and must set up a new sign-in method before it can log in. A link to do that was emailed to the account's address. An account whose organization enforces SSO gets `403` with `error: sso_required`, `organization_name`, `organization_slug` and `sso_url`.", "content": { "application/json": { "schema": { @@ -557,12 +607,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n \"https://apx.didit.me/auth/v2/programmatic/login/\",\n json={\n \"email\": \"you@yourdomain.com\",\n \"password\": \"MyStr0ng!Pass\",\n },\n timeout=10,\n)\nresp.raise_for_status()\ntokens = resp.json()\naccess_token = tokens[\"access_token\"]\n\n# Use against the Account Management endpoints on this host\norgs = requests.get(\n \"https://apx.didit.me/auth/v2/organizations/me/\",\n headers={\"Authorization\": f\"Bearer {access_token}\"},\n timeout=10,\n).json()" + "source": "from didit import Didit\n\n# This call needs no API key.\nclient = Didit()\n\nresult = client.account.login(\n email=\"you@yourdomain.com\",\n password=\"MyStr0ng!Pass\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n \"https://apx.didit.me/auth/v2/programmatic/login/\",\n {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({\n email: \"you@yourdomain.com\",\n password: \"MyStr0ng!Pass\",\n }),\n },\n);\nif (!resp.ok) throw new Error(`Login failed: ${resp.status}`);\nconst { access_token } = await resp.json();\n\n// Use against the Account Management endpoints on this host\nconst orgs = await fetch(\n \"https://apx.didit.me/auth/v2/organizations/me/\",\n { headers: { Authorization: `Bearer ${access_token}` } },\n).then((r) => r.json());" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// This call needs no API key.\nconst didit = new Didit();\n\nconst result = await didit.account.login({\n email: \"you@yourdomain.com\",\n password: \"MyStr0ng!Pass\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Account.Login(ctx, didit.LoginRequest{\n\tEmail: \"you@yourdomain.com\",\n\tPassword: \"MyStr0ng!Pass\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.LoginRequest;\n\n// This call needs no API key.\nDidit client = new Didit();\n\nvar result = client.account().login(LoginRequest.builder()\n .email(\"you@yourdomain.com\")\n .password(\"MyStr0ng!Pass\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->login([\n 'email' => 'you@yourdomain.com',\n 'password' => 'MyStr0ng!Pass',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# This call needs no API key.\ndidit = Didit::Client.new\n\nresult = didit.account.login(\n email: \"you@yourdomain.com\",\n password: \"MyStr0ng!Pass\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// This call needs no API key.\nusing var client = new DiditClient();\n\nvar result = await client.Account.LoginAsync(new LoginRequest\n{\n Email = \"you@yourdomain.com\",\n Password = \"MyStr0ng!Pass\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "security": [ @@ -684,12 +759,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n \"https://apx.didit.me/auth/v2/organizations/me/\",\n headers={\"Authorization\": f\"Bearer {access_token}\"},\n timeout=10,\n)\nresp.raise_for_status()\norgs = resp.json()[\"results\"] # paginated: count, next, previous, results\nfirst_org_id = orgs[0][\"uuid\"]" + "source": "from didit import Didit\n\n# Use the access token that account.login returns.\nclient = Didit(account_token=\"YOUR_ACCESS_TOKEN\")\n\nfor item in client.account.organizations.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n \"https://apx.didit.me/auth/v2/organizations/me/\",\n { headers: { Authorization: `Bearer ${accessToken}` } },\n);\nif (!resp.ok) throw new Error(`List orgs failed: ${resp.status}`);\nconst { results: orgs } = await resp.json(); // paginated: count, next, previous, results\nconst firstOrgId = orgs[0].uuid;" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Use the access token that account.login returns.\nconst didit = new Didit({ accountToken: \"YOUR_ACCESS_TOKEN\" });\n\nfor await (const item of didit.account.organizations.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Use the access token that account.login returns.\nclient := didit.NewClient(option.WithAccountToken(\"YOUR_ACCESS_TOKEN\"))\n\niter := client.Account.Organizations.ListAutoPaging(ctx, didit.AccountOrganizationsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Use the access token that account.login returns.\nDidit client = Didit.builder().accountToken(\"YOUR_ACCESS_TOKEN\").build();\n\nfor (var item : client.account().organizations().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->organizations->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Use the access token that account.login returns.\ndidit = Didit::Client.new(account_token: \"YOUR_ACCESS_TOKEN\")\n\ndidit.account.organizations.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Use the access token that account.login returns.\nusing var client = new DiditClient(new DiditClientOptions { AccountToken = \"YOUR_ACCESS_TOKEN\" });\n\nawait foreach (var item in await client.Account.Organizations.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "parameters": [ @@ -952,12 +1052,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n f\"https://apx.didit.me/auth/v2/organizations/me/{org_id}/applications/\",\n headers={\"Authorization\": f\"Bearer {access_token}\"},\n json={\n \"name\": \"Acme Customer App\",\n \"website_url\": \"https://acme.example\",\n \"redirect_uris\": [\"https://acme.example/callback\"],\n },\n timeout=10,\n)\nresp.raise_for_status()\napp = resp.json()\nprint(\"Save this:\", app[\"api_key\"])" + "source": "from didit import Didit\n\n# Use the access token that account.login returns.\nclient = Didit(account_token=\"YOUR_ACCESS_TOKEN\")\n\nresult = client.account.applications.create(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n name=\"Acme Customer App\",\n website_url=\"https://acme.example\",\n redirect_uris=[\"https://acme.example/callback\"],\n terms_url=\"https://acme.example/terms\",\n privacy_url=\"https://acme.example/privacy\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n `https://apx.didit.me/auth/v2/organizations/me/${orgId}/applications/`,\n {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${accessToken}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n name: \"Acme Customer App\",\n website_url: \"https://acme.example\",\n redirect_uris: [\"https://acme.example/callback\"],\n }),\n },\n);\nif (!resp.ok) throw new Error(`Create app failed: ${resp.status}`);\nconst app = await resp.json();\nconsole.log(\"Save this:\", app.api_key);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Use the access token that account.login returns.\nconst didit = new Didit({ accountToken: \"YOUR_ACCESS_TOKEN\" });\n\nconst result = await didit.account.applications.create(\"a1b2c3d4-5678-90ab-cdef-111111111111\", {\n name: \"Acme Customer App\",\n website_url: \"https://acme.example\",\n redirect_uris: [\"https://acme.example/callback\"],\n terms_url: \"https://acme.example/terms\",\n privacy_url: \"https://acme.example/privacy\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Use the access token that account.login returns.\nclient := didit.NewClient(option.WithAccountToken(\"YOUR_ACCESS_TOKEN\"))\n\nresult, err := client.Account.Applications.Create(ctx, \"a1b2c3d4-5678-90ab-cdef-111111111111\", didit.ApplicationCreateRequest{\n\tName: didit.String(\"Acme Customer App\"),\n\tWebsiteURL: didit.String(\"https://acme.example\"),\n\tRedirectURIs: didit.Some([]string{\"https://acme.example/callback\"}),\n\tTermsURL: didit.String(\"https://acme.example/terms\"),\n\tPrivacyURL: didit.String(\"https://acme.example/privacy\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.ApplicationCreateRequest;\n\n// Use the access token that account.login returns.\nDidit client = Didit.builder().accountToken(\"YOUR_ACCESS_TOKEN\").build();\n\nvar result = client.account().applications().create(\"a1b2c3d4-5678-90ab-cdef-111111111111\", ApplicationCreateRequest.builder()\n .name(\"Acme Customer App\")\n .websiteUrl(\"https://acme.example\")\n .redirectUris(List.of(\"https://acme.example/callback\"))\n .termsUrl(\"https://acme.example/terms\")\n .privacyUrl(\"https://acme.example/privacy\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->applications->create('a1b2c3d4-5678-90ab-cdef-111111111111', [\n 'name' => 'Acme Customer App',\n 'website_url' => 'https://acme.example',\n 'redirect_uris' => ['https://acme.example/callback'],\n 'terms_url' => 'https://acme.example/terms',\n 'privacy_url' => 'https://acme.example/privacy',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Use the access token that account.login returns.\ndidit = Didit::Client.new(account_token: \"YOUR_ACCESS_TOKEN\")\n\nresult = didit.account.applications.create(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n name: \"Acme Customer App\",\n website_url: \"https://acme.example\",\n redirect_uris: [\"https://acme.example/callback\"],\n terms_url: \"https://acme.example/terms\",\n privacy_url: \"https://acme.example/privacy\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Use the access token that account.login returns.\nusing var client = new DiditClient(new DiditClientOptions { AccountToken = \"YOUR_ACCESS_TOKEN\" });\n\nvar result = await client.Account.Applications.CreateAsync(\"a1b2c3d4-5678-90ab-cdef-111111111111\", new ApplicationCreateRequest\n{\n Name = \"Acme Customer App\",\n WebsiteUrl = \"https://acme.example\",\n RedirectUris = new string[] { \"https://acme.example/callback\" },\n TermsUrl = \"https://acme.example/terms\",\n PrivacyUrl = \"https://acme.example/privacy\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -1203,6 +1328,43 @@ { "BearerAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Use the access token that account.login returns.\nclient = Didit(account_token=\"YOUR_ACCESS_TOKEN\")\n\nfor item in client.account.applications.list(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Use the access token that account.login returns.\nconst didit = new Didit({ accountToken: \"YOUR_ACCESS_TOKEN\" });\n\nfor await (const item of didit.account.applications.list(\"a1b2c3d4-5678-90ab-cdef-111111111111\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Use the access token that account.login returns.\nclient := didit.NewClient(option.WithAccountToken(\"YOUR_ACCESS_TOKEN\"))\n\niter := client.Account.Applications.ListAutoPaging(ctx, \"a1b2c3d4-5678-90ab-cdef-111111111111\", didit.AccountApplicationsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Use the access token that account.login returns.\nDidit client = Didit.builder().accountToken(\"YOUR_ACCESS_TOKEN\").build();\n\nfor (var item : client.account().applications().list(\"a1b2c3d4-5678-90ab-cdef-111111111111\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->applications->list('a1b2c3d4-5678-90ab-cdef-111111111111') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Use the access token that account.login returns.\ndidit = Didit::Client.new(account_token: \"YOUR_ACCESS_TOKEN\")\n\ndidit.account.applications.list(\"a1b2c3d4-5678-90ab-cdef-111111111111\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Use the access token that account.login returns.\nusing var client = new DiditClient(new DiditClientOptions { AccountToken = \"YOUR_ACCESS_TOKEN\" });\n\nawait foreach (var item in await client.Account.Applications.ListAsync(\"a1b2c3d4-5678-90ab-cdef-111111111111\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] } }, @@ -1388,12 +1550,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n f\"https://apx.didit.me/auth/v2/organizations/me/{org_id}/applications/{app_id}/\",\n headers={\"Authorization\": f\"Bearer {access_token}\"},\n timeout=10,\n)\nresp.raise_for_status()\napp = resp.json()\napi_key = app[\"api_key\"] # use as x-api-key on verification.didit.me" + "source": "from didit import Didit\n\n# Use the access token that account.login returns.\nclient = Didit(account_token=\"YOUR_ACCESS_TOKEN\")\n\nresult = client.account.applications.retrieve(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n \"b2c3d4e5-6789-01bc-defg-222222222222\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n `https://apx.didit.me/auth/v2/organizations/me/${orgId}/applications/${appId}/`,\n { headers: { Authorization: `Bearer ${accessToken}` } },\n);\nif (!resp.ok) throw new Error(`Get app failed: ${resp.status}`);\nconst app = await resp.json();\nconst apiKey = app.api_key; // use as x-api-key on verification.didit.me" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Use the access token that account.login returns.\nconst didit = new Didit({ accountToken: \"YOUR_ACCESS_TOKEN\" });\n\nconst result = await didit.account.applications.retrieve(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n \"b2c3d4e5-6789-01bc-defg-222222222222\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Use the access token that account.login returns.\nclient := didit.NewClient(option.WithAccountToken(\"YOUR_ACCESS_TOKEN\"))\n\nresult, err := client.Account.Applications.Retrieve(ctx, \"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Use the access token that account.login returns.\nDidit client = Didit.builder().accountToken(\"YOUR_ACCESS_TOKEN\").build();\n\nvar result = client.account().applications().retrieve(\"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->applications->retrieve('a1b2c3d4-5678-90ab-cdef-111111111111', 'b2c3d4e5-6789-01bc-defg-222222222222');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Use the access token that account.login returns.\ndidit = Didit::Client.new(account_token: \"YOUR_ACCESS_TOKEN\")\n\nresult = didit.account.applications.retrieve(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n \"b2c3d4e5-6789-01bc-defg-222222222222\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Use the access token that account.login returns.\nusing var client = new DiditClient(new DiditClientOptions { AccountToken = \"YOUR_ACCESS_TOKEN\" });\n\nvar result = await client.Account.Applications.RetrieveAsync(\"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -1633,12 +1820,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.patch(\n f\"https://apx.didit.me/auth/v2/organizations/me/{org_id}/applications/{app_id}/\",\n headers={\"Authorization\": f\"Bearer {access_token}\"},\n json={\n \"name\": \"Acme Production App\",\n \"website_url\": \"https://app.acme.example\",\n },\n timeout=10,\n)\nresp.raise_for_status()\nupdated = resp.json()" + "source": "from didit import Didit\n\n# Use the access token that account.login returns.\nclient = Didit(account_token=\"YOUR_ACCESS_TOKEN\")\n\nresult = client.account.applications.update(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n \"b2c3d4e5-6789-01bc-defg-222222222222\",\n name=\"Acme Production App\",\n website_url=\"https://app.acme.example\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n `https://apx.didit.me/auth/v2/organizations/me/${orgId}/applications/${appId}/`,\n {\n method: \"PATCH\",\n headers: {\n Authorization: `Bearer ${accessToken}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n name: \"Acme Production App\",\n website_url: \"https://app.acme.example\",\n }),\n },\n);\nif (!resp.ok) throw new Error(`Update app failed: ${resp.status}`);\nconst updated = await resp.json();" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Use the access token that account.login returns.\nconst didit = new Didit({ accountToken: \"YOUR_ACCESS_TOKEN\" });\n\nconst result = await didit.account.applications.update(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n \"b2c3d4e5-6789-01bc-defg-222222222222\",\n {\n name: \"Acme Production App\",\n website_url: \"https://app.acme.example\",\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Use the access token that account.login returns.\nclient := didit.NewClient(option.WithAccountToken(\"YOUR_ACCESS_TOKEN\"))\n\nresult, err := client.Account.Applications.Update(ctx, \"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\", didit.ApplicationUpdateRequest{\n\tName: didit.String(\"Acme Production App\"),\n\tWebsiteURL: didit.String(\"https://app.acme.example\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.ApplicationUpdateRequest;\n\n// Use the access token that account.login returns.\nDidit client = Didit.builder().accountToken(\"YOUR_ACCESS_TOKEN\").build();\n\nvar result = client.account().applications().update(\"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\", ApplicationUpdateRequest.builder()\n .name(\"Acme Production App\")\n .websiteUrl(\"https://app.acme.example\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->applications->update('a1b2c3d4-5678-90ab-cdef-111111111111', 'b2c3d4e5-6789-01bc-defg-222222222222', [\n 'name' => 'Acme Production App',\n 'website_url' => 'https://app.acme.example',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Use the access token that account.login returns.\ndidit = Didit::Client.new(account_token: \"YOUR_ACCESS_TOKEN\")\n\nresult = didit.account.applications.update(\n \"a1b2c3d4-5678-90ab-cdef-111111111111\",\n \"b2c3d4e5-6789-01bc-defg-222222222222\",\n name: \"Acme Production App\",\n website_url: \"https://app.acme.example\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Use the access token that account.login returns.\nusing var client = new DiditClient(new DiditClientOptions { AccountToken = \"YOUR_ACCESS_TOKEN\" });\n\nvar result = await client.Account.Applications.UpdateAsync(\"a1b2c3d4-5678-90ab-cdef-111111111111\", \"b2c3d4e5-6789-01bc-defg-222222222222\", new ApplicationUpdateRequest\n{\n Name = \"Acme Production App\",\n WebsiteUrl = \"https://app.acme.example\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -1761,6 +1973,43 @@ }, "security": [ {} + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# This call needs no API key.\nclient = Didit()\n\nresult = client.account.resend_otp(\n email=\"dev@example.com\",\n password=\"S3cure-Passw0rd!\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// This call needs no API key.\nconst didit = new Didit();\n\nconst result = await didit.account.resendOtp({\n email: \"dev@example.com\",\n password: \"S3cure-Passw0rd!\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Account.ResendOTP(ctx, didit.AccountResendOTPParams{\n\tEmail: \"dev@example.com\",\n\tPassword: \"S3cure-Passw0rd!\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.AccountResendOtpParams;\n\n// This call needs no API key.\nDidit client = new Didit();\n\nvar result = client.account().resendOtp(AccountResendOtpParams.builder()\n .email(\"dev@example.com\")\n .password(\"S3cure-Passw0rd!\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "account->resendOtp([\n 'email' => 'dev@example.com',\n 'password' => 'S3cure-Passw0rd!',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# This call needs no API key.\ndidit = Didit::Client.new\n\nresult = didit.account.resend_otp(\n email: \"dev@example.com\",\n password: \"S3cure-Passw0rd!\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// This call needs no API key.\nusing var client = new DiditClient();\n\nvar result = await client.Account.ResendOtpAsync(new AccountResendOtpParams\n{\n Email = \"dev@example.com\",\n Password = \"S3cure-Passw0rd!\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } } diff --git a/openapi/verification.json b/openapi/verification.json index 7736883..304dada 100644 --- a/openapi/verification.json +++ b/openapi/verification.json @@ -119,12 +119,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/email/risk/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"], \"Content-Type\": \"application/json\"},\n json={\n \"email\": \"alice@example.com\",\n \"country_code\": \"US\",\n \"vendor_data\": \"lead-123\",\n \"metadata\": {\"source\": \"signup_prescreen\"},\n },\n timeout=15,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result[\"status\"]) # Approved / In Review / Declined\nprint(result[\"email\"][\"is_breached\"], result[\"email\"][\"is_disposable\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.email.assess_risk(\n email=\"alice@example.com\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/email/risk/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n email: 'alice@example.com',\n country_code: 'US',\n vendor_data: 'lead-123',\n metadata: { source: 'signup_prescreen' },\n }),\n});\nconst data = await res.json();\nconsole.log(data.status, data.email.is_breached, data.email.is_disposable);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.email.assessRisk({\n email: \"alice@example.com\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Email.AssessRisk(ctx, didit.EmailRiskRequest{\n\tEmail: \"alice@example.com\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.EmailRiskRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.email().assessRisk(EmailRiskRequest.builder()\n .email(\"alice@example.com\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "email->assessRisk([\n 'email' => 'alice@example.com',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.email.assess_risk(email: \"alice@example.com\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Email.AssessRiskAsync(new EmailRiskRequest\n{\n Email = \"alice@example.com\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -267,8 +292,12 @@ "is_breached": true, "no_of_breaches": 4, "reason_codes": [ - "BREACH_EXPOSURE", - "FREQUENT_BREACH" + { + "code": "IR-F784B630", + "direction": "risk", + "message": "Email's digital footprint diversity is Very Low", + "impact_level": "low" + } ] }, "enrichment": { @@ -283,8 +312,12 @@ "is_breached": true, "no_of_breaches": 4, "reason_codes": [ - "BREACH_EXPOSURE", - "FREQUENT_BREACH" + { + "code": "IR-F784B630", + "direction": "risk", + "message": "Email's digital footprint diversity is Very Low", + "impact_level": "low" + } ] } }, @@ -337,12 +370,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/ip/risk/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"], \"Content-Type\": \"application/json\"},\n json={\n \"ip_address\": \"8.8.8.8\",\n \"claimed_country\": \"ESP\",\n \"user_agent\": \"Mozilla/5.0\",\n \"vendor_data\": \"lead-123\",\n },\n timeout=15,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result[\"status\"]) # Approved / In Review\nprint(result[\"ip\"][\"ip_country_code\"], result[\"ip\"][\"country_mismatch\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.ip.assess_risk(\n ip_address=\"8.8.8.8\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/ip/risk/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n ip_address: '8.8.8.8',\n claimed_country: 'ESP',\n user_agent: 'Mozilla/5.0',\n vendor_data: 'lead-123',\n }),\n});\nconst data = await res.json();\nconsole.log(data.status, data.ip.country_mismatch);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.ip.assessRisk({\n ip_address: \"8.8.8.8\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IP.AssessRisk(ctx, didit.IPRiskRequest{\n\tIPAddress: \"8.8.8.8\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.IPRiskRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.ip().assessRisk(IPRiskRequest.builder()\n .ipAddress(\"8.8.8.8\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "ip->assessRisk([\n 'ip_address' => '8.8.8.8',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.ip.assess_risk(ip_address: \"8.8.8.8\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Ip.AssessRiskAsync(new IPRiskRequest\n{\n IpAddress = \"8.8.8.8\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -497,12 +555,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/phone/risk/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"], \"Content-Type\": \"application/json\"},\n json={\n \"phone_number\": \"+14155552671\",\n \"country_code\": \"US\",\n \"vendor_data\": \"lead-123\",\n \"metadata\": {\"source\": \"signup_prescreen\"},\n },\n timeout=15,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result[\"status\"]) # Approved / In Review / Declined\nprint(result[\"phone\"][\"phone_intelligence\"][\"score\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.phone.assess_risk(\n phone_number=\"+14155552671\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/phone/risk/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n phone_number: '+14155552671',\n country_code: 'US',\n vendor_data: 'lead-123',\n metadata: { source: 'signup_prescreen' },\n }),\n});\nconst data = await res.json();\nconsole.log(data.status, data.phone.phone_intelligence?.score);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.phone.assessRisk({\n phone_number: \"+14155552671\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Phone.AssessRisk(ctx, didit.PhoneRiskRequest{\n\tPhoneNumber: \"+14155552671\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.PhoneRiskRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.phone().assessRisk(PhoneRiskRequest.builder()\n .phoneNumber(\"+14155552671\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "phone->assessRisk([\n 'phone_number' => '+14155552671',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.phone.assess_risk(phone_number: \"+14155552671\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Phone.AssessRiskAsync(new PhoneRiskRequest\n{\n PhoneNumber = \"+14155552671\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -640,8 +723,12 @@ "is_recently_ported": true, "carrier_type": "voip", "reason_codes": [ - "DISPOSABLE_NUMBER", - "RECENT_PORT" + { + "code": "IR-5AC67A32", + "direction": "risk", + "message": "Phone type identified as non-mobile", + "impact_level": "medium" + } ] }, "enrichment": { @@ -654,8 +741,12 @@ "is_recently_ported": true, "carrier_type": "voip", "reason_codes": [ - "DISPOSABLE_NUMBER", - "RECENT_PORT" + { + "code": "IR-5AC67A32", + "direction": "risk", + "message": "Phone type identified as non-mobile", + "impact_level": "medium" + } ] } }, @@ -843,7 +934,7 @@ } }, "400": { - "description": "Bad request — the payload failed validation (missing or unknown `workflow_id`, invalid `language`, blocklisted `vendor_data`, malformed `portrait_image`, `address` without `country`/`poa_country`, invalid `sandbox_scenario`, `sign` documents, fields or values the workflow's Electronic Signature step refuses, such as `signature_document_not_supported`, `signature_document_conversion_failed`, `field_anchor_not_found` or `field_value_missing`, etc.) or your organization does not have enough credits to start the session.\n\nThe body is an object keyed by the offending field name (or `detail` for non-field errors). Values are an **array of strings** for input-validation failures (e.g. missing required field, invalid language, oversized portrait image) and a **plain string** for failures detected while creating the session (unknown `workflow_id`, blocklisted `vendor_data`, no reference face available for a Face Match workflow). Handle both shapes.", + "description": "Bad request — the payload failed validation (missing or unknown `workflow_id`, invalid `language`, blocklisted `vendor_data`, malformed `portrait_image`, `address` without `country`/`poa_country`, invalid `sandbox_scenario`, `sign` documents, fields or values the workflow's E-signature step refuses, such as `signature_document_not_supported`, `signature_document_conversion_failed`, `field_anchor_not_found` or `field_value_missing`, etc.) or your organization does not have enough credits to start the session.\n\nThe body is an object keyed by the offending field name (or `detail` for non-field errors). Values are an **array of strings** for input-validation failures (e.g. missing required field, invalid language, oversized portrait image) and a **plain string** for failures detected while creating the session (unknown `workflow_id`, blocklisted `vendor_data`, no reference face available for a Face Match workflow). Handle both shapes.", "content": { "application/json": { "schema": { @@ -909,7 +1000,7 @@ } }, "403": { - "description": "Authentication or authorization failed. The endpoint returns `403` whenever the `x-api-key` header is missing, malformed, the API key has expired, or the API key is valid but the client does not have permission to create sessions in this application (for example the API key belongs to a different organization). These failures share the body `{\"detail\": \"You do not have permission to perform this action.\"}`. Check that the `x-api-key` header is present and belongs to the intended application, re-fetch the application API key via the [Auth API](/auth-api/get-credentials) if needed, and retry.\n\n**Deleted application:** for a few minutes after an application is deleted, a request made with one of its API keys can answer `{\"detail\": \"This application was deleted.\", \"code\": \"application_deleted\"}`. Do not retry: the application and its API keys no longer exist. After those few minutes, the key is refused like any other invalid key.", + "description": "Authentication or authorization failed. A wrong, revoked or expired key returns `401`. The endpoint returns `403` when the `x-api-key` header is missing or the API key is valid but the client does not have permission to create sessions in this application (for example the API key belongs to a different organization). These failures share the body `{\"detail\": \"You do not have permission to perform this action.\"}`. Check that the `x-api-key` header is present and belongs to the intended application, re-fetch the application API key via the [Auth API](/auth-api/get-credentials) if needed, and retry.\n\n**Deleted application:** for a few minutes after an application is deleted, a request made with one of its API keys can answer `{\"detail\": \"This application was deleted.\", \"code\": \"application_deleted\"}`. Do not retry: the application and its API keys no longer exist. After those few minutes, the key is refused like any other invalid key.", "content": { "application/json": { "schema": { @@ -1032,12 +1123,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://verification.didit.me/v3/session/\"\nheaders = {\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n}\npayload = {\n \"workflow_id\": \"11111111-2222-3333-4444-555555555555\",\n \"vendor_data\": \"user-123\",\n \"callback\": \"https://example.com/verification/callback\",\n \"callback_method\": \"both\",\n \"metadata\": {\"user_type\": \"premium\", \"account_id\": \"ABC123\"},\n \"language\": \"en\",\n \"contact_details\": {\n \"email\": \"john.doe@example.com\",\n \"send_notification_emails\": True,\n \"email_lang\": \"en\",\n \"phone\": \"+14155552671\",\n },\n \"expected_details\": {\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"id_country\": \"USA\",\n \"expected_document_types\": [\"P\", \"ID\"],\n },\n}\n\nresponse = requests.post(url, json=payload, headers=headers, timeout=15)\nresponse.raise_for_status()\nsession = response.json()\nprint(session[\"session_id\"], session[\"url\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.create(\n workflow_id=\"11111111-2222-3333-4444-555555555555\",\n vendor_data=\"user-123\",\n callback=\"https://example.com/verification/callback\",\n callback_method=\"both\",\n metadata={\"user_type\": \"premium\", \"account_id\": \"ABC123\"},\n language=\"en\",\n contact_details={\n \"email\": \"john.doe@example.com\",\n \"send_notification_emails\": True,\n \"email_lang\": \"en\",\n \"phone\": \"+14155552671\",\n },\n expected_details={\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1990-05-15\",\n \"nationality\": \"USA\",\n \"id_country\": \"USA\",\n \"expected_document_types\": [\"P\", \"ID\"],\n },\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch('https://verification.didit.me/v3/session/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n workflow_id: '11111111-2222-3333-4444-555555555555',\n vendor_data: 'user-123',\n callback: 'https://example.com/verification/callback',\n callback_method: 'both',\n metadata: { user_type: 'premium', account_id: 'ABC123' },\n language: 'en',\n contact_details: {\n email: 'john.doe@example.com',\n send_notification_emails: true,\n email_lang: 'en',\n phone: '+14155552671',\n },\n expected_details: {\n first_name: 'John',\n last_name: 'Doe',\n date_of_birth: '1990-05-15',\n id_country: 'USA',\n expected_document_types: ['P', 'ID'],\n },\n }),\n});\n\nif (!response.ok) {\n throw new Error(`Session create failed: ${response.status}`);\n}\nconst session = await response.json();\nconsole.log(session.session_id, session.url);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.create({\n workflow_id: \"11111111-2222-3333-4444-555555555555\",\n vendor_data: \"user-123\",\n callback: \"https://example.com/verification/callback\",\n callback_method: \"both\",\n metadata: { user_type: \"premium\", account_id: \"ABC123\" },\n language: \"en\",\n contact_details: {\n email: \"john.doe@example.com\",\n send_notification_emails: true,\n email_lang: \"en\",\n phone: \"+14155552671\",\n },\n expected_details: {\n first_name: \"John\",\n last_name: \"Doe\",\n date_of_birth: \"1990-05-15\",\n nationality: \"USA\",\n id_country: \"USA\",\n expected_document_types: [\"P\", \"ID\"],\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Create(ctx, didit.SessionsCreateParams{\n\tWorkflowID: \"11111111-2222-3333-4444-555555555555\",\n\tVendorData: didit.String(\"user-123\"),\n\tCallback: didit.String(\"https://example.com/verification/callback\"),\n\tCallbackMethod: didit.Some(didit.SessionsCreateParamsCallbackMethod(\"both\")),\n\tMetadata: didit.Some[any](map[string]any{\"user_type\": \"premium\", \"account_id\": \"ABC123\"}),\n\tLanguage: didit.Some(didit.SessionsCreateParamsLanguage(\"en\")),\n\tContactDetails: didit.Some(didit.SessionsCreateParamsContactDetails{\n\t\tEmail: didit.String(\"john.doe@example.com\"),\n\t\tSendNotificationEmails: didit.Bool(true),\n\t\tEmailLang: didit.Some(didit.SessionsCreateParamsContactDetailsEmailLang(\"en\")),\n\t\tPhone: didit.String(\"+14155552671\"),\n\t}),\n\tExpectedDetails: didit.Some(didit.SessionsCreateParamsExpectedDetails{\n\t\tFirstName: didit.String(\"John\"),\n\t\tLastName: didit.String(\"Doe\"),\n\t\tDateOfBirth: didit.String(\"1990-05-15\"),\n\t\tNationality: didit.String(\"USA\"),\n\t\tIDCountry: didit.String(\"USA\"),\n\t\tExpectedDocumentTypes: didit.Some([]didit.SessionsCreateParamsExpectedDetailsExpectedDocumentTypes{\"P\", \"ID\"}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().create(SessionsCreateParams.builder()\n .workflowId(\"11111111-2222-3333-4444-555555555555\")\n .vendorData(\"user-123\")\n .callback(\"https://example.com/verification/callback\")\n .callbackMethod(SessionsCreateParams.CallbackMethod.of(\"both\"))\n .metadata(Map.of(\"user_type\", \"premium\", \"account_id\", \"ABC123\"))\n .language(SessionsCreateParams.Language.of(\"en\"))\n .contactDetails(SessionsCreateParams.ContactDetails.builder()\n .email(\"john.doe@example.com\")\n .sendNotificationEmails(true)\n .emailLang(SessionsCreateParams.ContactDetails.EmailLang.of(\"en\"))\n .phone(\"+14155552671\")\n .build())\n .expectedDetails(SessionsCreateParams.ExpectedDetails.builder()\n .firstName(\"John\")\n .lastName(\"Doe\")\n .dateOfBirth(LocalDate.parse(\"1990-05-15\"))\n .nationality(\"USA\")\n .idCountry(\"USA\")\n .expectedDocumentTypes(List.of(SessionsCreateParams.ExpectedDetails.ExpectedDocumentTypes.of(\"P\"), SessionsCreateParams.ExpectedDetails.ExpectedDocumentTypes.of(\"ID\")))\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->create([\n 'workflow_id' => '11111111-2222-3333-4444-555555555555',\n 'vendor_data' => 'user-123',\n 'callback' => 'https://example.com/verification/callback',\n 'callback_method' => 'both',\n 'metadata' => ['user_type' => 'premium', 'account_id' => 'ABC123'],\n 'language' => 'en',\n 'contact_details' => [\n 'email' => 'john.doe@example.com',\n 'send_notification_emails' => true,\n 'email_lang' => 'en',\n 'phone' => '+14155552671',\n ],\n 'expected_details' => [\n 'first_name' => 'John',\n 'last_name' => 'Doe',\n 'date_of_birth' => '1990-05-15',\n 'nationality' => 'USA',\n 'id_country' => 'USA',\n 'expected_document_types' => ['P', 'ID'],\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.create(\n workflow_id: \"11111111-2222-3333-4444-555555555555\",\n vendor_data: \"user-123\",\n callback: \"https://example.com/verification/callback\",\n callback_method: \"both\",\n metadata: { user_type: \"premium\", account_id: \"ABC123\" },\n language: \"en\",\n contact_details: {\n email: \"john.doe@example.com\",\n send_notification_emails: true,\n email_lang: \"en\",\n phone: \"+14155552671\",\n },\n expected_details: {\n first_name: \"John\",\n last_name: \"Doe\",\n date_of_birth: \"1990-05-15\",\n nationality: \"USA\",\n id_country: \"USA\",\n expected_document_types: [\"P\", \"ID\"],\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.CreateAsync(new SessionsCreateParams\n{\n WorkflowId = \"11111111-2222-3333-4444-555555555555\",\n VendorData = \"user-123\",\n Callback = \"https://example.com/verification/callback\",\n CallbackMethod = new SessionsCreateParamsCallbackMethod(\"both\"),\n Metadata = new Dictionary { [\"user_type\"] = \"premium\", [\"account_id\"] = \"ABC123\" },\n Language = new SessionsCreateParamsLanguage(\"en\"),\n ContactDetails = new SessionsCreateParamsContactDetails\n {\n Email = \"john.doe@example.com\",\n SendNotificationEmails = true,\n EmailLang = new SessionsCreateParamsContactDetailsEmailLang(\"en\"),\n Phone = \"+14155552671\",\n },\n ExpectedDetails = new SessionsCreateParamsExpectedDetails\n {\n FirstName = \"John\",\n LastName = \"Doe\",\n DateOfBirth = \"1990-05-15\",\n Nationality = \"USA\",\n IdCountry = \"USA\",\n ExpectedDocumentTypes = new SessionsCreateParamsExpectedDetailsExpectedDocumentTypes[] { \"P\", \"ID\" },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -1063,6 +1179,12 @@ "example": "user-123", "x-readme-id": "0.1" }, + "multi_account_segment": { + "type": "string", + "maxLength": 64, + "description": "Optional duplicate-detection realm inside your organization. Duplicate face checks compare this session only with other sessions that carry the same segment, so separate account bases (personal and business accounts, or one per B2B sub-client) do not flag a person who legitimately holds one account in each. Omit it to use the single default realm, which is what every session uses today. Blocklist and allowlist matching ignore this field.", + "example": "business-accounts" + }, "callback": { "type": "string", "description": "URL to redirect the user to after verification completes. Didit automatically appends `verificationSessionId` and `status` (Approved, Declined, In Review) as query parameters. Custom URL schemes (e.g. `myapp://`) are supported for mobile callbacks. If omitted, the workflow's default `callback_url` is used. When the application has allowed domains (`allowed_domains` on `PATCH /v3/webhook/`), an `http` or `https` callback must be on one of those origins (same scheme, host and port), otherwise the request fails with 400 on `callback`: `callback must be on one of the application's allowed domains: https://app.example.com`. Custom URL schemes are always accepted.", @@ -1406,7 +1528,7 @@ }, "sign": { "type": "object", - "description": "Electronic Signature input for this session. `documents` are the documents to sign, for a workflow whose Electronic Signature step takes documents from the session (`signature_documents_source` `session` or `both`): up to 20 documents and 50 MB in total. `field_values` fills the fields whose `prefill` is `api.`, on workflow and session documents alike. Creating a session again for the same `workflow_id` and `vendor_data` returns the pending session; if that call sends `sign`, its documents, fields and values must be identical to the first ones, and anything different returns `400` with `{\"sign\": \"signature_document_changed\"}`. See [Electronic signature documents](/sessions-api/create-session#electronic-signature-documents).", + "description": "E-signature input for this session. `documents` are the documents to sign, for a workflow whose E-signature step takes documents from the session (`signature_documents_source` `session` or `both`): up to 20 documents and 50 MB in total. `field_values` fills the fields whose `prefill` is `api.`, on workflow and session documents alike. Creating a session again for the same `workflow_id` and `vendor_data` returns the pending session; if that call sends `sign`, its documents, fields and values must be identical to the first ones, and anything different returns `400` with `{\"sign\": \"signature_document_changed\"}`. See [E-signature documents](/sessions-api/create-session#e-signature-documents).", "properties": { "documents": { "type": "array", @@ -1901,7 +2023,7 @@ } }, "403": { - "description": "Imports not enabled, sandbox application, or missing/invalid API key (this endpoint returns `403`, never `401`, for authentication failures). Verification imports are disabled by default and must be enabled per organization by Didit.", + "description": "Imports not enabled, sandbox application, or missing API key (a wrong, revoked or expired key gets `401`). Verification imports are disabled by default and must be enabled per organization by Didit.", "content": { "application/json": { "examples": { @@ -1943,6 +2065,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.create(\n import_type=\"user_verification\",\n workflow_id=\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n source_file_url=\"https://files.example.com/exports/sessions.ndjson\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.create({\n import_type: \"user_verification\",\n workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n source_file_url: \"https://files.example.com/exports/sessions.ndjson\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Create(ctx, didit.SessionsImportsCreateParams{\n\tImportType: didit.Some(didit.SessionsImportsCreateParamsImportType(\"user_verification\")),\n\tWorkflowID: didit.String(\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\"),\n\tSourceFileURL: didit.String(\"https://files.example.com/exports/sessions.ndjson\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsImportsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().create(SessionsImportsCreateParams.builder()\n .importType(SessionsImportsCreateParams.ImportType.of(\"user_verification\"))\n .workflowId(\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\")\n .sourceFileUrl(\"https://files.example.com/exports/sessions.ndjson\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->create([\n 'import_type' => 'user_verification',\n 'workflow_id' => '9f9b1234-aaaa-bbbb-cccc-1234567890ab',\n 'source_file_url' => 'https://files.example.com/exports/sessions.ndjson',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.create(\n import_type: \"user_verification\",\n workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n source_file_url: \"https://files.example.com/exports/sessions.ndjson\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.CreateAsync(new SessionsImportsCreateParams\n{\n ImportType = new SessionsImportsCreateParamsImportType(\"user_verification\"),\n WorkflowId = \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n SourceFileUrl = \"https://files.example.com/exports/sessions.ndjson\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -1990,7 +2149,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot download import templates. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot download import templates. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -2009,6 +2168,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.imports.retrieve_template()\nwith open(\"download.csv\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.imports.retrieveTemplate();\nawait writeFile(\"download.csv\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Imports.RetrieveTemplate(ctx, didit.SessionsImportsRetrieveTemplateParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.csv\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().imports().retrieveTemplate()\n .writeTo(Path.of(\"download.csv\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->retrieveTemplate();\n$content->saveTo('download.csv');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.imports.retrieve_template\nFile.binwrite(\"download.csv\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Imports.RetrieveTemplateAsync();\nawait content.SaveToAsync(\"download.csv\");" + } ] } }, @@ -2063,7 +2259,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot read import jobs for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot read import jobs for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -2082,6 +2278,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -2202,7 +2435,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot read import jobs for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot read import jobs for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -2221,13 +2454,50 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.imports.list_errors(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.imports.listErrors(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.Imports.ListErrorsAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsImportsListErrorsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().imports().listErrors(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->listErrors('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.imports.list_errors(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.Imports.ListErrorsAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] } }, "/v3/session/{sessionId}/decision/": { "get": { "summary": "Retrieve the full decision for a verification session", - "description": "Retrieve the complete decision report for a verification session — the rolled-up session `status` plus one report per verification feature the workflow executed. This is the canonical read endpoint for both User Verification (KYC) and Business Verification (KYB) sessions: the same path serves both, and the top-level `session_kind` discriminator tells you which shape you received (`\"user\"` or `\"business\"`).\n\n**Every feature report is a plural array.** V3 workflows are graphs that can run the same feature more than once, so each block (`id_verifications`, `nfc_verifications`, `liveness_checks`, `face_matches`, `poa_verifications`, `document_ai_documents`, `phone_verifications`, `email_verifications`, `aml_screenings`, `ip_analyses`, `database_validations`, `questionnaire_responses`) is a JSON array whose items each carry a `node_id` identifying the workflow graph node that produced them. Read NFC as `response.nfc_verifications[0]` — never as a singular `nfc` field. A block is `null` until the workflow has run that feature at least once; features the workflow does not include never appear with data. Electronic Signature results are in `signatures`, which is present only when the workflow has an Electronic Signature step.\n\n**When to call.** The recommended pattern is event-driven: wait for the `status.updated` webhook that fires when the session reaches a decision (`Approved`, `Declined`, `In Review`), then call this endpoint once to fetch the full report. Polling also works — the endpoint can be called at any point in the session lifecycle and returns the data produced so far — but webhook-then-fetch is cheaper and faster. Media URLs in the response (document images, videos, PDFs) are short-lived presigned links: fetch them promptly or re-request the decision to get fresh ones, and do not persist them as long-term references.\n\n**Statuses.** The top-level `status` is the session lifecycle status (`Not Started`, `In Progress`, `Awaiting User`, `In Review`, `Approved`, `Declined`, `Resubmitted`, `Expired`, `Kyc Expired`, `Abandoned`). Each feature item additionally carries its own feature-level `status` (`Not Finished`, `Approved`, `Declined`, `In Review`, ...). A session can be `Approved` overall while an individual feature is `In Review`, depending on the workflow's decision rules.\n\n**Authentication and visibility.** Authenticate with the application API key in the `x-api-key` header (a console user Bearer token with the `read:sessions` permission also works). Only sessions owned by the authenticated application are visible. If your workflow restricts response attributes, non-allowed fields inside feature items are returned as `null` while `status`, `warnings`, and `node_id` are always preserved.\n\n**Rate limits.** GET requests are limited to 600 per minute per API key. Exceeding the limit returns `429` with `Retry-After` and `X-RateLimit-*` headers.", + "description": "Retrieve the complete decision report for a verification session — the rolled-up session `status` plus one report per verification feature the workflow executed. This is the canonical read endpoint for both User Verification (KYC) and Business Verification (KYB) sessions: the same path serves both, and the top-level `session_kind` discriminator tells you which shape you received (`\"user\"` or `\"business\"`).\n\n**Every feature report is a plural array.** V3 workflows are graphs that can run the same feature more than once, so each block (`id_verifications`, `nfc_verifications`, `liveness_checks`, `face_matches`, `poa_verifications`, `document_ai_documents`, `phone_verifications`, `email_verifications`, `aml_screenings`, `ip_analyses`, `database_validations`, `questionnaire_responses`) is a JSON array whose items each carry a `node_id` identifying the workflow graph node that produced them. Read NFC as `response.nfc_verifications[0]` — never as a singular `nfc` field. A block is `null` until the workflow has run that feature at least once; features the workflow does not include never appear with data. E-signature results are in `signatures`, which is present only when the workflow has an E-signature step.\n\n**When to call.** The recommended pattern is event-driven: wait for the `status.updated` webhook that fires when the session reaches a decision (`Approved`, `Declined`, `In Review`), then call this endpoint once to fetch the full report. Polling also works — the endpoint can be called at any point in the session lifecycle and returns the data produced so far — but webhook-then-fetch is cheaper and faster. Media URLs in the response (document images, videos, PDFs) are short-lived presigned links: fetch them promptly or re-request the decision to get fresh ones, and do not persist them as long-term references.\n\n**Statuses.** The top-level `status` is the session lifecycle status (`Not Started`, `In Progress`, `Awaiting User`, `In Review`, `Approved`, `Declined`, `Resubmitted`, `Expired`, `Kyc Expired`, `Abandoned`). Each feature item additionally carries its own feature-level `status` (`Not Finished`, `Approved`, `Declined`, `In Review`, ...). A session can be `Approved` overall while an individual feature is `In Review`, depending on the workflow's decision rules.\n\n**Authentication and visibility.** Authenticate with the application API key in the `x-api-key` header (a console user Bearer token with the `read:sessions` permission also works). Only sessions owned by the authenticated application are visible. If your workflow restricts response attributes, non-allowed fields inside feature items are returned as `null` while `status`, `warnings`, and `node_id` are always preserved.\n\n**Rate limits.** GET requests are limited to 600 per minute per API key. Exceeding the limit returns `429` with `Retry-After` and `X-RateLimit-*` headers.", "operationId": "get_v3_session_decision", "x-didit-sdk": { "resource": "sessions", @@ -3413,7 +3683,7 @@ "entity_type": "person", "hits": [ { - "id": "cPtTGRKkyddAcAC4xgsLCm", + "id": "hit_7c1e9a40b2d35f86e0a4c912", "url": "https://news.example.org/articles/sample", "match": false, "score": 0.73, @@ -4092,21 +4362,7 @@ } ], "accounts": null, - "registry_data": { - "addresses_detail": [ - { - "type": "registered", - "address": "1 Example Street, London, EC1A 1AA", - "country": "GB" - } - ], - "industries": [ - { - "code": "62012", - "description": "Business and domestic software development" - } - ] - }, + "registry_data": {}, "user_provided_data": { "company_name": "ACME HOLDINGS", "registration_number": "12345678" @@ -4116,19 +4372,38 @@ "is_editable": false }, "ownership_structure": { - "nodes": [ - { - "id": "company", - "name": "ACME HOLDINGS LTD", - "type": "company" - }, + "shareholders": [ { - "id": "ubo-1", "name": "John Doe", - "type": "person", - "ownership_percent": 75.0 + "first_name": "John", + "last_name": "Doe", + "date_of_birth": null, + "country_of_birth": null, + "company_name": null, + "registration_number": null, + "entity_type": "person", + "nationality": null, + "designation": null, + "roles": [ + "shareholder" + ], + "ownership_min_shares": "75", + "ownership_max_shares": "75", + "voting_min_shares": null, + "voting_max_shares": null, + "appointment_date": null, + "is_active": true, + "shareholding": { + "share_class": "ORDINARY", + "number_of_shares": 750.0, + "currency": "GBP", + "nominal_value": 1.0, + "total_value": null, + "percentage": 75.0 + } } - ] + ], + "beneficial_owners": [] }, "warnings": [] } @@ -4436,7 +4711,7 @@ } }, "403": { - "description": "Authentication or authorization failed. **This endpoint never returns `401`** — Didit's API-key authentication does not emit a `WWW-Authenticate` challenge, so missing or invalid credentials also surface as `403`. Two `detail` strings distinguish the failure modes:\n\n- `\"Authentication credentials were not provided or are invalid.\"` — no `x-api-key` header (and no `Authorization: Bearer` token), or the supplied credential failed introspection (revoked, expired, or malformed).\n- `\"You do not have permission to perform this action.\"` — the credential is valid but not allowed to read this session: a console-user Bearer token lacks the `read:sessions` permission or cannot access the owning application, or an API key belongs to a different organization than the session.\n\nNote that for a completely unknown `sessionId` the endpoint resolves the owning application before validating credentials, so a missing session returns `404` even when the credential is missing or invalid.", + "description": "Authentication or authorization failed. A missing key returns `403`; a wrong, revoked or expired key returns `401`. Two `detail` strings distinguish the failure modes:\n\n- `\"Authentication credentials were not provided or are invalid.\"` — no `x-api-key` header (and no `Authorization: Bearer` token), or the supplied credential failed introspection (revoked, expired, or malformed).\n- `\"You do not have permission to perform this action.\"` — the credential is valid but not allowed to read this session: a console-user Bearer token lacks the `read:sessions` permission or cannot access the owning application, or an API key belongs to a different organization than the session.\n\nNote that for a completely unknown `sessionId` the endpoint resolves the owning application before validating credentials, so a missing session returns `404` even when the credential is missing or invalid.", "content": { "application/json": { "schema": { @@ -4594,12 +4869,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nsession_id = \"11111111-2222-3333-4444-555555555555\"\nurl = f\"https://verification.didit.me/v3/session/{session_id}/decision/\"\nheaders = {\n 'x-api-key': 'YOUR_API_KEY',\n \"Accept\": \"application/json\",\n}\n\nresponse = requests.get(url, headers=headers, timeout=15)\nresponse.raise_for_status()\ndecision = response.json()\n\nprint(\"session_kind:\", decision[\"session_kind\"])\nprint(\"top-level status:\", decision[\"status\"])\n\n# nfc_verifications is ALWAYS an array — never a singular `nfc` field.\nfor nfc in decision.get(\"nfc_verifications\") or []:\n print(\"nfc node_id:\", nfc[\"node_id\"], \"status:\", nfc[\"status\"])\n\nfor id_check in decision.get(\"id_verifications\") or []:\n print(\"id node_id:\", id_check[\"node_id\"], \"status:\", id_check[\"status\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.retrieve_decision(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '11111111-2222-3333-4444-555555555555';\nconst response = await fetch(\n `https://verification.didit.me/v3/session/${sessionId}/decision/`,\n {\n method: 'GET',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n Accept: 'application/json',\n },\n }\n);\n\nif (!response.ok) {\n throw new Error(`Decision fetch failed: ${response.status}`);\n}\nconst decision = await response.json();\n\nconsole.log('session_kind:', decision.session_kind);\nconsole.log('top-level status:', decision.status);\n\n// nfc_verifications is ALWAYS an array — never a singular `nfc` field.\nfor (const nfc of decision.nfc_verifications ?? []) {\n console.log('nfc node_id:', nfc.node_id, 'status:', nfc.status);\n}\n\nfor (const idCheck of decision.id_verifications ?? []) {\n console.log('id node_id:', idCheck.node_id, 'status:', idCheck.status);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.retrieveDecision(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RetrieveDecision(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsRetrieveDecisionParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().retrieveDecision(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->retrieveDecision('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.retrieve_decision(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.RetrieveDecisionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -4607,7 +4907,7 @@ "/v3/session/{sessionId}/delete/": { "delete": { "summary": "Delete a verification session (KYC or KYB)", - "description": "Delete a single verification session, User Verification (KYC) or Business Verification (KYB), by its `session_id`. The id is resolved against KYC sessions first, then KYB sessions, so both kinds are deleted through this one URL.\n\n**What is deleted:**\n- The session and every verification attempt it holds, including results that a resubmission replaced: the decision, extracted data, all related feature records (ID verification, face, liveness, face match, AML, registry checks, IP analysis, and so on), its reviews and its activity log.\n- All stored files owned by the session: document front/back photos (full, cropped, and privacy-blurred variants), document-capture videos, portrait crops, NFC chip portrait and signature images, face reference images, liveness videos, face-match source/target images, Proof of Address documents, and any extra uploaded files (KYC); uploaded company documents and extra files (KYB). Electronic Signature documents, signed PDFs, evidence PDFs and signature images (KYC and KYB): their download paths stop working. Previously issued media URLs (`https:///...`) stop resolving.\n- The session's face data. Its face embedding is deleted too, unless you choose to keep an image-free template (see **Face biometric data**).\n- Webhook deliveries still queued for the session, and their retries. Webhooks already delivered are not affected.\n- For a Business Verification (KYB) session: the verifications it created for its key people (KYC) and its corporate owners (KYB), recursively, reported as `deleted_child_verifications`. A verification it only links to, such as an existing approved KYC it reused, is not deleted.\n\nThe session disappears from every read endpoint immediately: `GET /v3/session/{sessionId}/decision/` returns `404` and `GET /v3/sessions/` stops listing it. Ongoing AML monitoring and KYB registry monitoring started by the deleted verifications stop.\n\n**What is not affected:** blocklist entries created from this session (face or document) are **not** removed; manage those with the blocklist endpoints. Share tokens issued for the session are not revoked, but there is nothing left for them to import: an import with one returns `400` with `{\"share_token\": [\"Original session does not exist.\"]}`. Credits already consumed are **not** refunded. The parent User or Business entity is **not** deleted; use `POST /v3/users/delete/` or `POST /v3/businesses/delete/` for those. If the User's profile portrait came from this session, the portrait is removed with it.\n\n**Face biometric data:** by default the session's face embedding is deleted with the session (`face_retention_outcome: deleted`). An application that opted in to biometric-template retention (`face_retention_policy: retain_until_user_deleted` on `PATCH /v3/webhook/`), or a request with `retain_face_embeddings: true`, keeps one separately managed, image-free face biometric template anchored to the session's User (`retained_with_user`) so that duplicate detection, Face Search, and biometric authentication keep working. The template never contains the face image, media, identity fields, the decision, or the deleted session's id; it is biometric data deleted at `biometric_template_expires_at`, or earlier on User deletion, privacy erasure, or an explicit purge through `/v3/biometric-templates/`. A session without a linked User cannot retain a template (`ineligible_no_vendor_user`). Send `deletion_instruction: privacy_erasure` for data-subject requests: it purges every retained template for that User and never retains a new one.\n\n**Irreversible:** deletion is permanent and there is no restore endpoint. Export anything you need (for example a decision PDF) before you call it.\n\n**Side effects:** no webhook is emitted for deletions.\n\n**Response:** `200 OK` once the deletion has completed, with a JSON body reporting the `face_retention_outcome`, the retained template's expiry and, for a KYB session, `deleted_child_verifications`. Earlier versions of this endpoint returned `204 No Content`; update clients that assert on `204`. Keep your `instruction_id` in your own erasure log.\n\n**Idempotency:** not idempotent at the HTTP level: the first call returns `200`; repeating it returns `404` because the session no longer resolves. After a `503` the session is still in place; repeat the same request to finish deleting it.\n\n**Authentication:** send your application's API key in the `x-api-key` header; the session must belong to that application. Console user access tokens (`Authorization: Bearer ...`) may also call this endpoint when they carry the `delete:sessions` permission. Authentication and permission failures both return `403`; this API never returns `401`.\n\n**Rate limit:** shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n\nTo bulk-delete KYC sessions by their numeric `session_number`, use `POST /v3/sessions/delete/` instead.\n\n**Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.", + "description": "Delete a single verification session, User Verification (KYC) or Business Verification (KYB), by its `session_id`. The id is resolved against KYC sessions first, then KYB sessions, so both kinds are deleted through this one URL.\n\n**What is deleted:**\n- The session and every verification attempt it holds, including results that a resubmission replaced: the decision, extracted data, all related feature records (ID verification, face, liveness, face match, AML, registry checks, IP analysis, and so on), its reviews and its activity log.\n- All stored files owned by the session: document front/back photos (full, cropped, and privacy-blurred variants), document-capture videos, portrait crops, NFC chip portrait and signature images, face reference images, liveness videos, face-match source/target images, Proof of Address documents, and any extra uploaded files (KYC); uploaded company documents and extra files (KYB). E-signature documents, signed PDFs, evidence PDFs and signature images (KYC and KYB): their download paths stop working. Previously issued media URLs (`https:///...`) stop resolving.\n- The session's face data. Its face embedding is deleted too, unless you choose to keep an image-free template (see **Face biometric data**).\n- Webhook deliveries still queued for the session, and their retries. Webhooks already delivered are not affected.\n- For a Business Verification (KYB) session: the verifications it created for its key people (KYC) and its corporate owners (KYB), recursively, reported as `deleted_child_verifications`. A verification it only links to, such as an existing approved KYC it reused, is not deleted.\n\nThe session disappears from every read endpoint immediately: `GET /v3/session/{sessionId}/decision/` returns `404` and `GET /v3/sessions/` stops listing it. Ongoing AML monitoring and KYB registry monitoring started by the deleted verifications stop.\n\n**What is not affected:** blocklist entries created from this session (face or document) are **not** removed; manage those with the blocklist endpoints. Share tokens issued for the session are not revoked, but there is nothing left for them to import: an import with one returns `400` with `{\"share_token\": [\"Original session does not exist.\"]}`. Credits already consumed are **not** refunded. The parent User or Business entity is **not** deleted; use `POST /v3/users/delete/` or `POST /v3/businesses/delete/` for those. If the User's profile portrait came from this session, the portrait is removed with it.\n\n**Face biometric data:** by default the session's face embedding is deleted with the session (`face_retention_outcome: deleted`). An application that opted in to biometric-template retention (`face_retention_policy: retain_until_user_deleted` on `PATCH /v3/webhook/`), or a request with `retain_face_embeddings: true`, keeps one separately managed, image-free face biometric template anchored to the session's User (`retained_with_user`) so that duplicate detection, Face Search, and biometric authentication keep working. The template never contains the face image, media, identity fields, the decision, or the deleted session's id; it is biometric data deleted at `biometric_template_expires_at`, or earlier on User deletion, privacy erasure, or an explicit purge through `/v3/biometric-templates/`. A session without a linked User cannot retain a template (`ineligible_no_vendor_user`). Send `deletion_instruction: privacy_erasure` for data-subject requests: it purges every retained template for that User and never retains a new one.\n\n**Irreversible:** deletion is permanent and there is no restore endpoint. Export anything you need (for example a decision PDF) before you call it.\n\n**Side effects:** no webhook is emitted for deletions.\n\n**Response:** `200 OK` once the deletion has completed, with a JSON body reporting the `face_retention_outcome`, the retained template's expiry and, for a KYB session, `deleted_child_verifications`. Earlier versions of this endpoint returned `204 No Content`; update clients that assert on `204`. Keep your `instruction_id` in your own erasure log.\n\n**Idempotency:** not idempotent at the HTTP level: the first call returns `200`; repeating it returns `404` because the session no longer resolves. After a `503` the session is still in place; repeat the same request to finish deleting it.\n\n**Authentication:** send your application's API key in the `x-api-key` header; the session must belong to that application. Console user access tokens (`Authorization: Bearer ...`) may also call this endpoint when they carry the `delete:sessions` permission. Authentication and permission failures both return `403`; this API never returns `401`.\n\n**Rate limit:** shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.\n\nTo bulk-delete KYC sessions by their numeric `session_number`, use `POST /v3/sessions/delete/` instead.\n\n**Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.", "operationId": "delete_v3_session_by_id", "x-didit-sdk": { "resource": "sessions", @@ -4747,7 +5047,7 @@ } }, "403": { - "description": "Authentication or permission failure. Missing/invalid credentials also return `403` — this API never returns `401`. Exception: when the `sessionId` does not resolve to a live session, the pre-auth owner lookup returns `404` first, even with missing or invalid credentials.", + "description": "Authentication or permission failure. A missing key also returns `403`; a wrong, revoked or expired key returns `401`. Exception: when the `sessionId` does not resolve to a live session, the pre-auth owner lookup returns `404` first, even with missing or invalid credentials.", "content": { "application/json": { "schema": { @@ -4885,12 +5185,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.delete(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/delete/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json={\"retain_face_embeddings\": True, \"face_retention_days\": 365},\n)\nresponse.raise_for_status()\nprint(response.json()[\"face_retention_outcome\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.delete(\n \"11111111-2222-3333-4444-555555555555\",\n retain_face_embeddings=True,\n face_retention_days=365,\n instruction_id=\"post-approval-cleanup-2026-08\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch(\n 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/delete/',\n {\n method: 'DELETE',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ deletion_instruction: 'privacy_erasure', instruction_id: 'dsar-2026-0142' }),\n },\n);\nconst body = await resp.json();\nconsole.log(body.face_retention_outcome);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.delete(\"11111111-2222-3333-4444-555555555555\", {\n retain_face_embeddings: true,\n face_retention_days: 365,\n instruction_id: \"post-approval-cleanup-2026-08\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsDeleteParams{\n\tRetainFaceEmbeddings: didit.Bool(true),\n\tFaceRetentionDays: didit.Int(365),\n\tInstructionID: didit.String(\"post-approval-cleanup-2026-08\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().delete(\"11111111-2222-3333-4444-555555555555\", SessionsDeleteParams.builder()\n .retainFaceEmbeddings(true)\n .faceRetentionDays(365L)\n .instructionId(\"post-approval-cleanup-2026-08\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->delete('11111111-2222-3333-4444-555555555555', [\n 'retain_face_embeddings' => true,\n 'face_retention_days' => 365,\n 'instruction_id' => 'post-approval-cleanup-2026-08',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.delete(\n \"11111111-2222-3333-4444-555555555555\",\n retain_face_embeddings: true,\n face_retention_days: 365,\n instruction_id: \"post-approval-cleanup-2026-08\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsDeleteParams\n{\n RetainFaceEmbeddings = true,\n FaceRetentionDays = 365,\n InstructionId = \"post-approval-cleanup-2026-08\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -5022,7 +5347,7 @@ } }, "403": { - "description": "Authentication, authorization, or session-status failure. **This endpoint never returns `401`** — Didit's API-key authentication does not emit a `WWW-Authenticate` challenge, so missing or invalid credentials also surface as `403`. Distinguish the failure modes by the `detail` string:\n\n- `\"Authentication credentials were not provided or are invalid.\"` — no `x-api-key` header (and no `Authorization: Bearer` token), or the supplied credential failed introspection (revoked, expired, or malformed).\n- `\"You do not have permission to perform this action.\"` — the credential is valid but cannot read this session: a console-user Bearer token lacks the `read:sessions` permission or cannot access the owning application, or an API key belongs to a different organization than the session.\n- `\"You can only generate a PDF for sessions in review, declined, approved or kyc expired\"` — the KYC session exists but is not in an eligible status yet (for example `Not Started` or `In Progress`). Wait for the `status.updated` webhook before requesting the report.\n- `\"You can only generate a PDF for sessions in review, declined or approved\"` — same condition for KYB sessions.\n\nNote that for a completely unknown `sessionId` the endpoint resolves the owning application before validating credentials, so a missing session returns `404` even when the credential is missing or invalid.", + "description": "Authentication, authorization, or session-status failure. A missing key returns `403`; a wrong, revoked or expired key returns `401`. Distinguish the failure modes by the `detail` string:\n\n- `\"Authentication credentials were not provided or are invalid.\"` — no `x-api-key` header (and no `Authorization: Bearer` token), or the supplied credential failed introspection (revoked, expired, or malformed).\n- `\"You do not have permission to perform this action.\"` — the credential is valid but cannot read this session: a console-user Bearer token lacks the `read:sessions` permission or cannot access the owning application, or an API key belongs to a different organization than the session.\n- `\"You can only generate a PDF for sessions in review, declined, approved or kyc expired\"` — the KYC session exists but is not in an eligible status yet (for example `Not Started` or `In Progress`). Wait for the `status.updated` webhook before requesting the report.\n- `\"You can only generate a PDF for sessions in review, declined or approved\"` — same condition for KYB sessions.\n\nNote that for a completely unknown `sessionId` the endpoint resolves the owning application before validating credentials, so a missing session returns `404` even when the credential is missing or invalid.", "content": { "application/json": { "schema": { @@ -5164,12 +5489,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.get(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/generate-pdf/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n stream=True,\n timeout=60,\n)\nresponse.raise_for_status()\nwith open(\"report.pdf\", \"wb\") as fh:\n for chunk in response.iter_content(chunk_size=8192):\n fh.write(chunk)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.generate_pdf(\n \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { writeFile } from 'node:fs/promises';\n\nconst response = await fetch(\n 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/generate-pdf/',\n { headers: { 'x-api-key': 'YOUR_API_KEY' } },\n);\nif (!response.ok) throw new Error(`PDF generation failed: HTTP ${response.status}`);\nawait writeFile('report.pdf', Buffer.from(await response.arrayBuffer()));" + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.generatePdf(\"11111111-2222-3333-4444-555555555555\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.GeneratePDF(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().generatePdf(\"11111111-2222-3333-4444-555555555555\")\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->generatePdf('11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.generate_pdf(\"11111111-2222-3333-4444-555555555555\")\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.GeneratePdfAsync(\"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.pdf\");" } ] } @@ -5426,7 +5776,8 @@ "EMAIL", "KYB_REGISTRY", "KYB_KEY_PEOPLE", - "KYB" + "KYB", + "GEOLOCATION" ], "example": "OCR" } @@ -5641,7 +5992,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions, or a `session_id` that belongs to another application.", + "description": "Missing credentials or insufficient permissions, or a `session_id` that belongs to another application.", "content": { "application/json": { "examples": { @@ -5715,12 +6066,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-status/\",\n headers={\n \"x-api-key\": \"YOUR_API_KEY\",\n \"Content-Type\": \"application/json\",\n },\n json={\n \"new_status\": \"Resubmitted\",\n \"nodes_to_resubmit\": [\n {\"node_id\": \"feature_ocr\", \"feature\": \"OCR\"},\n {\"node_id\": \"feature_liveness\", \"feature\": \"LIVENESS\"},\n ],\n \"send_email\": True,\n \"email_address\": \"user@example.com\",\n \"email_language\": \"en\",\n },\n)\nresponse.raise_for_status()\nprint(response.json()) # {'session_id': '11111111-2222-3333-4444-555555555555'}" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_status(\n \"11111111-2222-3333-4444-555555555555\",\n new_status=\"Approved\",\n comment=\"All checks passed manual review\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-status/',\n {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n new_status: 'Declined',\n comment: 'Suspected fraud',\n }),\n },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst { session_id } = await response.json();" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateStatus(\"11111111-2222-3333-4444-555555555555\", {\n new_status: \"Approved\",\n comment: \"All checks passed manual review\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateStatusParams{\n\tNewStatus: \"Approved\",\n\tComment: didit.String(\"All checks passed manual review\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateStatus(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateStatusParams.builder()\n .newStatus(SessionsUpdateStatusParams.NewStatus.of(\"Approved\"))\n .comment(\"All checks passed manual review\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateStatus('11111111-2222-3333-4444-555555555555', [\n 'new_status' => 'Approved',\n 'comment' => 'All checks passed manual review',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_status(\n \"11111111-2222-3333-4444-555555555555\",\n new_status: \"Approved\",\n comment: \"All checks passed manual review\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateStatusParams\n{\n NewStatus = \"Approved\",\n Comment = \"All checks passed manual review\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -5728,7 +6104,7 @@ "/v3/id-verification/": { "post": { "summary": "ID Verification (document OCR + fraud checks)", - "description": "OCR an identity document and run document fraud checks in one call — returns the extracted holder fields, the parsed MRZ, an `Approved`/`Declined`/`In Review` `status`, and a `warnings` list explaining every issue found. Supports 14,000+ document types from 220+ countries and territories.\n\n**How it works.** Send the document's `front_image` (required) and, for two-sided documents, the `back_image`. Upload uncropped photos with all four corners of the document visible — the service detects, aligns, and crops the document itself, so do not pre-crop. The document is classified automatically (you never declare the country or document type), the visual zone is read with OCR, and the MRZ and any barcodes are decoded. Cross-checks then validate dates, number formats, and MRZ check digits, and compare the visual zone against the MRZ. With `perform_document_liveness=true`, the images are additionally screened for screen replays, printed copies, and portrait manipulation.\n\n**Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Fraud and hard-failure risks always decline: `DOCUMENT_EXPIRED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`, `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, plus extraction failures (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`). (`PORTRAIT_IMAGE_NOT_DETECTED`, `COULD_NOT_DETECT_DOCUMENT_TYPE`, `INVALID_DATE`, and `MRZ_NOT_DETECTED` exist in workflow sessions but are never produced by this standalone endpoint.) Three risk groups are configurable per request via `invalid_mrz_action`, `inconsistent_data_action`, and `expiration_date_not_detected_action` (`DECLINE` or `NO_ACTION`). All other warnings (e.g. `POSSIBLE_DUPLICATED_USER`) are informational and never decline on their own. When `perform_document_liveness=true` (the default) and the forgery check returns no usable score — the provider failed, answered non-200, or answered HTTP 200 with `status=\"ERR\"` - the call returns `200` with `status: \"In Review\"` and a `DOCUMENT_LIVENESS_NOT_COMPUTED` warning (`log_type: \"warning\"`) instead of `Approved`: a check that did not run is not evidence that the document is genuine. This escalation is not configurable and never overrides a `Declined`; with `perform_document_liveness=false` the check is skipped and the status follows the remaining warnings as before. A document that cannot be processed at all returns `400` with `{\"error\": \"COULD_NOT_RECOGNIZE_DOCUMENT\"}`; a readable but problematic document returns `200` with `status: \"Declined\"` — always inspect `id_verification.status` and `id_verification.warnings`, not just the HTTP code.\n\n**Billing.** Each `200` response consumes one ID Verification API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the not-enough-credits error before any image processing.\n\n**Session persistence (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session: it appears in the Business Console, the returned `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/`, the cropped document/portrait images are stored and returned as short-lived media URLs (`https:///ocr/...`), and a `status.updated` webhook is emitted to your configured webhook endpoints. When `false`, nothing is stored, `request_id` is a one-off correlation UUID, and `portrait_image`/`front_image`/`back_image` are returned inline as base64-encoded JPEG strings.\n\n**Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload (a fictional \"Sandbox User\" USA identity card), no session is persisted, and no credits are consumed.\n\n**Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — this API never returns `401`.\n\n**Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.", + "description": "OCR an identity document and run document fraud checks in one call — returns the extracted holder fields, the parsed MRZ, an `Approved`/`Declined`/`In Review` `status`, and a `warnings` list explaining every issue found. Supports 14,000+ document types from 220+ countries and territories.\n\n**How it works.** Send the document's `front_image` (required) and, for two-sided documents, the `back_image`. Upload uncropped photos with all four corners of the document visible — the service detects, aligns, and crops the document itself, so do not pre-crop. The document is classified automatically (you never declare the country or document type), the visual zone is read with OCR, and the MRZ and any barcodes are decoded. Cross-checks then validate dates, number formats, and MRZ check digits, and compare the visual zone against the MRZ. With `perform_document_liveness=true`, the images are additionally screened for screen replays, printed copies, and portrait manipulation.\n\n**Decision logic.** `status` is `Approved` unless at least one warning resolves to a decline. Fraud and hard-failure risks always decline: `DOCUMENT_EXPIRED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`, `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, plus extraction failures (`NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`, `DOCUMENT_NUMBER_NOT_DETECTED`). (`PORTRAIT_IMAGE_NOT_DETECTED`, `INVALID_DATE`, and `MRZ_NOT_DETECTED` exist in workflow sessions but are never produced by this standalone endpoint. `COULD_NOT_DETECT_DOCUMENT_TYPE` is returned here when the front image does not match a known official document design with high confidence, and declines the request.) Three risk groups are configurable per request via `invalid_mrz_action`, `inconsistent_data_action`, and `expiration_date_not_detected_action` (`DECLINE` or `NO_ACTION`). All other warnings (e.g. `POSSIBLE_DUPLICATED_USER`) are informational and never decline on their own. When `perform_document_liveness=true` (the default) and the forgery check returns no usable score — the provider failed, answered non-200, or answered HTTP 200 with `status=\"ERR\"` - the call returns `200` with `status: \"In Review\"` and a `DOCUMENT_LIVENESS_NOT_COMPUTED` warning (`log_type: \"warning\"`) instead of `Approved`: a check that did not run is not evidence that the document is genuine. This escalation is not configurable and never overrides a `Declined`; with `perform_document_liveness=false` the check is skipped and the status follows the remaining warnings as before. A document that cannot be processed at all returns `400` with `{\"error\": \"COULD_NOT_RECOGNIZE_DOCUMENT\"}`; a readable but problematic document returns `200` with `status: \"Declined\"` — always inspect `id_verification.status` and `id_verification.warnings`, not just the HTTP code.\n\n**Billing.** Each `200` response consumes one ID Verification API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns `403` with the not-enough-credits error before any image processing.\n\n**Session persistence (`save_api_request`, default `true`).** When `true`, the call is persisted as an API-type session: it appears in the Business Console, the returned `request_id` is a real session id you can pass to `GET /v3/session/{sessionId}/decision/`, the cropped document/portrait images are stored and returned as short-lived media URLs (`https:///ocr/...`), and a `status.updated` webhook is emitted to your configured webhook endpoints. When `false`, nothing is stored, `request_id` is a one-off correlation UUID, and `portrait_image`/`front_image`/`back_image` are returned inline as base64-encoded JPEG strings.\n\n**Sandbox.** Sandbox API keys skip all processing and billing: after request validation (malformed input still returns `400`), the endpoint returns a static `Approved` mock payload (a fictional \"Sandbox User\" USA identity card), no session is persisted, and no credits are consumed.\n\n**Authentication.** Send your application's API key in the `x-api-key` header. Missing or invalid credentials return `403` (`{\"detail\": \"You do not have permission to perform this action.\"}`) — this API never returns `401`.\n\n**Rate limit.** Shared write budget of 300 requests/min per API key across all POST/PATCH/DELETE endpoints; exceeding it returns `429`.", "operationId": "post_v3id-verification", "x-didit-sdk": { "resource": "id_verification", @@ -6546,7 +6922,7 @@ "properties": { "risk": { "type": "string", - "description": "Machine-readable risk code. Always-decline risks: `DOCUMENT_EXPIRED`, `MINIMUM_AGE_NOT_MET`, `PORTRAIT_IMAGE_NOT_DETECTED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`, `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, `INVALID_DATE`, `COULD_NOT_RECOGNIZE_DOCUMENT` (400-only, never a warning), `DOCUMENT_NUMBER_NOT_DETECTED`, `COULD_NOT_DETECT_DOCUMENT_TYPE`, `NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`. Governed by request options: `MRZ_NOT_DETECTED` / `MRZ_VALIDATION_FAILED` (`invalid_mrz_action`), `DATA_INCONSISTENT` / `MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME` / `DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS` (`inconsistent_data_action`), `EXPIRATION_DATE_NOT_DETECTED` (`expiration_date_not_detected_action`). Other risks (e.g. `POSSIBLE_DUPLICATED_USER`) are informational. `DOCUMENT_LIVENESS_NOT_COMPUTED` is raised when `perform_document_liveness=true` but the forgery check returned no usable score; it sets `status` to `In Review`.", + "description": "Machine-readable risk code. Always-decline risks: `DOCUMENT_EXPIRED`, `MINIMUM_AGE_NOT_MET`, `PORTRAIT_IMAGE_NOT_DETECTED`, `SCREEN_CAPTURE_DETECTED`, `PRINTED_COPY_DETECTED`, `PORTRAIT_MANIPULATION_DETECTED`, `PUBLIC_DOCUMENT_IMAGE_DETECTED`, `INVALID_DATE`, `COULD_NOT_RECOGNIZE_DOCUMENT` (400-only, never a warning), `DOCUMENT_NUMBER_NOT_DETECTED`, `COULD_NOT_DETECT_DOCUMENT_TYPE`, `NAME_NOT_DETECTED`, `DATE_OF_BIRTH_NOT_DETECTED`. Governed by request options: `MRZ_NOT_DETECTED` / `MRZ_VALIDATION_FAILED` (`invalid_mrz_action`), `DATA_INCONSISTENT` / `MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME` / `DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS` (`inconsistent_data_action`), `EXPIRATION_DATE_NOT_DETECTED` (`expiration_date_not_detected_action`). Other risks (e.g. `POSSIBLE_DUPLICATED_USER`) are informational. `DOCUMENT_LIVENESS_NOT_COMPUTED` is raised when `perform_document_liveness=true` but the forgery check returned no usable score; it sets `status` to `In Review`. `COULD_NOT_DETECT_DOCUMENT_TYPE` is also returned when the front of the document does not match a known official document design with high confidence, for example an edited or computer-generated document, or a design that is not supported yet.", "example": "DOCUMENT_EXPIRED" }, "feature": { @@ -6703,7 +7079,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", "content": { "application/json": { "examples": { @@ -6761,12 +7137,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = 'https://verification.didit.me/v3/id-verification/'\nheaders = {'x-api-key': 'YOUR_API_KEY'}\n\nwith open('id_front.jpg', 'rb') as front_f, open('id_back.jpg', 'rb') as back_f:\n files = {\n 'front_image': ('id_front.jpg', front_f, 'image/jpeg'),\n 'back_image': ('id_back.jpg', back_f, 'image/jpeg'),\n }\n data = {\n 'perform_document_liveness': 'true',\n 'save_api_request': 'true',\n 'vendor_data': 'user-123',\n }\n resp = requests.post(url, headers=headers, files=files, data=data, timeout=120)\n\nresp.raise_for_status()\nid_v = resp.json()['id_verification']\nprint('status:', id_v['status'])\nprint('name:', id_v.get('full_name'))\nprint('document:', id_v.get('document_type'), id_v.get('document_number'))\nfor w in id_v.get('warnings', []):\n print('warning:', w['risk'], '-', w['log_type'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_verification.verify(\n front_image=open(\"front_image.jpg\", \"rb\"),\n back_image=open(\"back_image.jpg\", \"rb\"),\n perform_document_liveness=True,\n save_api_request=True,\n vendor_data=\"user-123\",\n metadata={\"flow\": \"onboarding\"},\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import fs from 'node:fs';\n\nconst form = new FormData();\nform.append('front_image', new Blob([fs.readFileSync('./id_front.jpg')]), 'id_front.jpg');\nform.append('back_image', new Blob([fs.readFileSync('./id_back.jpg')]), 'id_back.jpg');\nform.append('perform_document_liveness', 'true');\nform.append('save_api_request', 'true');\nform.append('vendor_data', 'user-123');\n\nconst response = await fetch('https://verification.didit.me/v3/id-verification/', {\n method: 'POST',\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n body: form,\n});\n\nif (!response.ok) throw new Error(`ID verification failed: ${response.status}`);\nconst body = await response.json();\nconsole.log('status:', body.id_verification.status);\nconsole.log('warnings:', body.id_verification.warnings.map((w) => w.risk));" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idVerification.verify({\n front_image: await fileFromPath(\"front_image.jpg\"),\n back_image: await fileFromPath(\"back_image.jpg\"),\n perform_document_liveness: true,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"onboarding\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDVerification.Verify(ctx, didit.IDVerificationVerifyParams{\n\tFrontImage: didit.FileFromPath(\"front_image.jpg\"),\n\tBackImage: didit.Some(didit.FileFromPath(\"back_image.jpg\")),\n\tPerformDocumentLiveness: didit.Bool(true),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData: didit.String(\"user-123\"),\n\tMetadata: didit.Some(map[string]any{\"flow\": \"onboarding\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.IdVerificationVerifyParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idVerification().verify(IdVerificationVerifyParams.builder()\n .frontImage(Path.of(\"front_image.jpg\"))\n .backImage(Path.of(\"back_image.jpg\"))\n .performDocumentLiveness(true)\n .saveApiRequest(true)\n .vendorData(\"user-123\")\n .metadata(Map.of(\"flow\", \"onboarding\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idVerification->verify([\n 'front_image' => File::fromPath('front_image.jpg'),\n 'back_image' => File::fromPath('back_image.jpg'),\n 'perform_document_liveness' => true,\n 'save_api_request' => true,\n 'vendor_data' => 'user-123',\n 'metadata' => ['flow' => 'onboarding'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_verification.verify(\n front_image: Pathname(\"front_image.jpg\"),\n back_image: Pathname(\"back_image.jpg\"),\n perform_document_liveness: true,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"onboarding\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdVerification.VerifyAsync(new IdVerificationVerifyParams\n{\n FrontImage = FileUpload.FromPath(\"front_image.jpg\"),\n BackImage = FileUpload.FromPath(\"back_image.jpg\"),\n PerformDocumentLiveness = true,\n SaveApiRequest = true,\n VendorData = \"user-123\",\n Metadata = new Dictionary { [\"flow\"] = \"onboarding\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -7231,7 +7632,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", "content": { "application/json": { "examples": { @@ -7289,12 +7690,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = 'https://verification.didit.me/v3/face-match/'\nheaders = {'x-api-key': 'YOUR_API_KEY'}\n\nwith open('selfie.jpg', 'rb') as user_f, open('id_portrait.jpg', 'rb') as ref_f:\n files = {\n 'user_image': ('selfie.jpg', user_f, 'image/jpeg'),\n 'ref_image': ('id_portrait.jpg', ref_f, 'image/jpeg'),\n }\n data = {\n 'face_match_score_decline_threshold': 50,\n 'save_api_request': 'true',\n 'vendor_data': 'user-123',\n }\n resp = requests.post(url, headers=headers, files=files, data=data, timeout=60)\n\nresp.raise_for_status()\nbody = resp.json()\nprint('status:', body['face_match']['status'])\nprint('score:', body['face_match']['score'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.face_match.compare(\n user_image=open(\"user_image.jpg\", \"rb\"),\n ref_image=open(\"ref_image.jpg\", \"rb\"),\n face_match_score_decline_threshold=50.0,\n rotate_image=False,\n save_api_request=True,\n vendor_data=\"user-123\",\n metadata={\"flow\": \"login\"},\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import fs from 'node:fs';\n\nconst form = new FormData();\nform.append('user_image', new Blob([fs.readFileSync('./selfie.jpg')]), 'selfie.jpg');\nform.append('ref_image', new Blob([fs.readFileSync('./id_portrait.jpg')]), 'id_portrait.jpg');\nform.append('face_match_score_decline_threshold', '50');\nform.append('save_api_request', 'true');\nform.append('vendor_data', 'user-123');\n\nconst response = await fetch('https://verification.didit.me/v3/face-match/', {\n method: 'POST',\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n body: form,\n});\n\nif (!response.ok) throw new Error(`Face match failed: ${response.status}`);\nconst body = await response.json();\nconsole.log('status:', body.face_match.status, 'score:', body.face_match.score);" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.faceMatch.compare({\n user_image: await fileFromPath(\"user_image.jpg\"),\n ref_image: await fileFromPath(\"ref_image.jpg\"),\n face_match_score_decline_threshold: 50.0,\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"login\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FaceMatch.Compare(ctx, didit.FaceMatchCompareParams{\n\tUserImage: didit.FileFromPath(\"user_image.jpg\"),\n\tRefImage: didit.FileFromPath(\"ref_image.jpg\"),\n\tFaceMatchScoreDeclineThreshold: didit.Float(50.0),\n\tRotateImage: didit.Bool(false),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData: didit.String(\"user-123\"),\n\tMetadata: didit.Some(map[string]any{\"flow\": \"login\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.FaceMatchCompareParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.faceMatch().compare(FaceMatchCompareParams.builder()\n .userImage(Path.of(\"user_image.jpg\"))\n .refImage(Path.of(\"ref_image.jpg\"))\n .faceMatchScoreDeclineThreshold(50.0)\n .rotateImage(false)\n .saveApiRequest(true)\n .vendorData(\"user-123\")\n .metadata(Map.of(\"flow\", \"login\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "faceMatch->compare([\n 'user_image' => File::fromPath('user_image.jpg'),\n 'ref_image' => File::fromPath('ref_image.jpg'),\n 'face_match_score_decline_threshold' => 50.0,\n 'rotate_image' => false,\n 'save_api_request' => true,\n 'vendor_data' => 'user-123',\n 'metadata' => ['flow' => 'login'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.face_match.compare(\n user_image: Pathname(\"user_image.jpg\"),\n ref_image: Pathname(\"ref_image.jpg\"),\n face_match_score_decline_threshold: 50.0,\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"login\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FaceMatch.CompareAsync(new FaceMatchCompareParams\n{\n UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n RefImage = FileUpload.FromPath(\"ref_image.jpg\"),\n FaceMatchScoreDeclineThreshold = 50.0,\n RotateImage = false,\n SaveApiRequest = true,\n VendorData = \"user-123\",\n Metadata = new Dictionary { [\"flow\"] = \"login\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -7720,7 +8146,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", "content": { "application/json": { "examples": { @@ -7778,12 +8204,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = 'https://verification.didit.me/v3/age-estimation/'\nheaders = {'x-api-key': 'YOUR_API_KEY'}\n\nwith open('selfie.jpg', 'rb') as f:\n files = {'user_image': ('selfie.jpg', f, 'image/jpeg')}\n data = {\n 'age_estimation_decline_threshold': 18,\n 'face_liveness_score_decline_threshold': 30,\n 'save_api_request': 'true',\n 'vendor_data': 'user-123',\n }\n resp = requests.post(url, headers=headers, files=files, data=data, timeout=60)\n\nresp.raise_for_status()\nresult = resp.json()['age_estimation']\nprint('status:', result['status'])\nprint('estimated age:', result['age_estimation'])\nprint('liveness score:', result['score'])\nfor w in result['warnings']:\n print('warning:', w['risk'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.age_estimation.estimate(\n user_image=open(\"user_image.jpg\", \"rb\"),\n face_liveness_score_decline_threshold=30.0,\n age_estimation_decline_threshold=18,\n rotate_image=False,\n save_api_request=True,\n vendor_data=\"user-123\",\n metadata={\"flow\": \"age-gate\"},\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import fs from 'node:fs';\n\nconst form = new FormData();\nform.append('user_image', new Blob([fs.readFileSync('./selfie.jpg')]), 'selfie.jpg');\nform.append('age_estimation_decline_threshold', '18');\nform.append('face_liveness_score_decline_threshold', '30');\nform.append('save_api_request', 'true');\nform.append('vendor_data', 'user-123');\n\nconst response = await fetch('https://verification.didit.me/v3/age-estimation/', {\n method: 'POST',\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n body: form,\n});\n\nif (!response.ok) throw new Error(`Age estimation failed: ${response.status}`);\nconst { age_estimation } = await response.json();\nconsole.log('status:', age_estimation.status, 'age:', age_estimation.age_estimation, 'liveness:', age_estimation.score);" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.ageEstimation.estimate({\n user_image: await fileFromPath(\"user_image.jpg\"),\n face_liveness_score_decline_threshold: 30.0,\n age_estimation_decline_threshold: 18,\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"age-gate\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AgeEstimation.Estimate(ctx, didit.AgeEstimationEstimateParams{\n\tUserImage: didit.FileFromPath(\"user_image.jpg\"),\n\tFaceLivenessScoreDeclineThreshold: didit.Float(30.0),\n\tAgeEstimationDeclineThreshold: didit.Int(18),\n\tRotateImage: didit.Bool(false),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData: didit.String(\"user-123\"),\n\tMetadata: didit.Some(map[string]any{\"flow\": \"age-gate\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.AgeEstimationEstimateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.ageEstimation().estimate(AgeEstimationEstimateParams.builder()\n .userImage(Path.of(\"user_image.jpg\"))\n .faceLivenessScoreDeclineThreshold(30.0)\n .ageEstimationDeclineThreshold(18L)\n .rotateImage(false)\n .saveApiRequest(true)\n .vendorData(\"user-123\")\n .metadata(Map.of(\"flow\", \"age-gate\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "ageEstimation->estimate([\n 'user_image' => File::fromPath('user_image.jpg'),\n 'face_liveness_score_decline_threshold' => 30.0,\n 'age_estimation_decline_threshold' => 18,\n 'rotate_image' => false,\n 'save_api_request' => true,\n 'vendor_data' => 'user-123',\n 'metadata' => ['flow' => 'age-gate'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.age_estimation.estimate(\n user_image: Pathname(\"user_image.jpg\"),\n face_liveness_score_decline_threshold: 30.0,\n age_estimation_decline_threshold: 18,\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"age-gate\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.AgeEstimation.EstimateAsync(new AgeEstimationEstimateParams\n{\n UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n FaceLivenessScoreDeclineThreshold = 30.0,\n AgeEstimationDeclineThreshold = 18,\n RotateImage = false,\n SaveApiRequest = true,\n VendorData = \"user-123\",\n Metadata = new Dictionary { [\"flow\"] = \"age-gate\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -8525,7 +8976,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any document processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any document processing happens.", "content": { "application/json": { "examples": { @@ -8583,12 +9034,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = 'https://verification.didit.me/v3/poa/'\nheaders = {'x-api-key': 'YOUR_API_KEY'}\n\nwith open('utility-bill.pdf', 'rb') as f:\n files = {'document': ('utility-bill.pdf', f, 'application/pdf')}\n data = {\n 'expected_address': 'Av. Monseñor Tavella 1291, Salta, Argentina',\n 'expected_country': 'ARG',\n 'expected_first_name': 'Sophia',\n 'expected_last_name': 'Martinez',\n 'poa_languages_allowed': 'en,es',\n 'vendor_data': 'user-123',\n }\n # LLM-based extraction takes 5-15s (multi-page PDFs up to ~30s) - allow headroom\n resp = requests.post(url, headers=headers, files=files, data=data, timeout=45)\n\nresp.raise_for_status()\npoa = resp.json()['poa']\nprint('status:', poa['status'])\nprint('issuer:', poa['issuer'], '| issued:', poa['issue_date'])\nprint('address:', poa['poa_formatted_address'])\nfor w in poa['warnings']:\n print('warning:', w['risk'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.proof_of_address.verify(\n document=open(\"document.pdf\", \"rb\"),\n expected_address=\"Av. Monseñor Tavella 1291, Salta, Argentina\",\n expected_country=\"ARG\",\n expected_first_name=\"Sophia\",\n expected_last_name=\"Martinez\",\n poa_languages_allowed=\"en,es\",\n save_api_request=True,\n vendor_data=\"user-123\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import fs from 'node:fs';\n\nconst form = new FormData();\nform.append('document', new Blob([fs.readFileSync('./utility-bill.pdf')]), 'utility-bill.pdf');\nform.append('expected_address', 'Av. Monseñor Tavella 1291, Salta, Argentina');\nform.append('expected_country', 'ARG');\nform.append('expected_first_name', 'Sophia');\nform.append('expected_last_name', 'Martinez');\nform.append('poa_languages_allowed', 'en,es');\nform.append('vendor_data', 'user-123');\n\n// LLM-based extraction takes 5-15s (multi-page PDFs up to ~30s) - allow >=45s\nconst response = await fetch('https://verification.didit.me/v3/poa/', {\n method: 'POST',\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n body: form,\n signal: AbortSignal.timeout(45_000),\n});\n\nif (!response.ok) throw new Error(`POA verification failed: ${response.status}`);\nconst { poa } = await response.json();\nconsole.log('status:', poa.status);\nconsole.log('warnings:', poa.warnings.map((w) => w.risk));" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.proofOfAddress.verify({\n document: await fileFromPath(\"document.pdf\"),\n expected_address: \"Av. Monseñor Tavella 1291, Salta, Argentina\",\n expected_country: \"ARG\",\n expected_first_name: \"Sophia\",\n expected_last_name: \"Martinez\",\n poa_languages_allowed: \"en,es\",\n save_api_request: true,\n vendor_data: \"user-123\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.ProofOfAddress.Verify(ctx, didit.ProofOfAddressVerifyParams{\n\tDocument: didit.FileFromPath(\"document.pdf\"),\n\tExpectedAddress: didit.String(\"Av. Monseñor Tavella 1291, Salta, Argentina\"),\n\tExpectedCountry: didit.String(\"ARG\"),\n\tExpectedFirstName: didit.String(\"Sophia\"),\n\tExpectedLastName: didit.String(\"Martinez\"),\n\tPOALanguagesAllowed: didit.String(\"en,es\"),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData: didit.String(\"user-123\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.ProofOfAddressVerifyParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.proofOfAddress().verify(ProofOfAddressVerifyParams.builder()\n .document(Path.of(\"document.pdf\"))\n .expectedAddress(\"Av. Monseñor Tavella 1291, Salta, Argentina\")\n .expectedCountry(\"ARG\")\n .expectedFirstName(\"Sophia\")\n .expectedLastName(\"Martinez\")\n .poaLanguagesAllowed(\"en,es\")\n .saveApiRequest(true)\n .vendorData(\"user-123\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "proofOfAddress->verify([\n 'document' => File::fromPath('document.pdf'),\n 'expected_address' => 'Av. Monseñor Tavella 1291, Salta, Argentina',\n 'expected_country' => 'ARG',\n 'expected_first_name' => 'Sophia',\n 'expected_last_name' => 'Martinez',\n 'poa_languages_allowed' => 'en,es',\n 'save_api_request' => true,\n 'vendor_data' => 'user-123',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.proof_of_address.verify(\n document: Pathname(\"document.pdf\"),\n expected_address: \"Av. Monseñor Tavella 1291, Salta, Argentina\",\n expected_country: \"ARG\",\n expected_first_name: \"Sophia\",\n expected_last_name: \"Martinez\",\n poa_languages_allowed: \"en,es\",\n save_api_request: true,\n vendor_data: \"user-123\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.ProofOfAddress.VerifyAsync(new ProofOfAddressVerifyParams\n{\n Document = FileUpload.FromPath(\"document.pdf\"),\n ExpectedAddress = \"Av. Monseñor Tavella 1291, Salta, Argentina\",\n ExpectedCountry = \"ARG\",\n ExpectedFirstName = \"Sophia\",\n ExpectedLastName = \"Martinez\",\n PoaLanguagesAllowed = \"en,es\",\n SaveApiRequest = true,\n VendorData = \"user-123\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -9206,7 +9682,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls — and contract-billed organizations whose rate card has no Document AI API entry — return `403` with `{\"error\": ...}` before any document processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls — and contract-billed organizations whose rate card has no Document AI API entry — return `403` with `{\"error\": ...}` before any document processing happens.", "content": { "application/json": { "examples": { @@ -9266,7 +9742,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.document_ai.analyze(\n document=open(\"document.pdf\", \"rb\"),\n fields=\"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.documentAi.analyze({\n document: await fileFromPath(\"document.pdf\"),\n fields: \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.DocumentAi.Analyze(ctx, didit.DocumentAiAnalyzeParams{\n\tDocument: didit.FileFromPath(\"document.pdf\"),\n\tFields: \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.DocumentAiAnalyzeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.documentAi().analyze(DocumentAiAnalyzeParams.builder()\n .document(Path.of(\"document.pdf\"))\n .fields(\"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "documentAi->analyze([\n 'document' => File::fromPath('document.pdf'),\n 'fields' => '[{\"key\": \"employer_name\", \"name\": \"Employer name\", \"instruction\": \"The employer or company issuing the payslip.\", \"type\": \"text\", \"required\": true, \"is_full_name\": false}, {\"key\": \"employee_name\", \"name\": \"Employee name\", \"instruction\": \"The full name of the employee as printed on the payslip.\", \"type\": \"text\", \"required\": true, \"is_full_name\": true}, {\"key\": \"net_pay\", \"name\": \"Net pay\", \"instruction\": \"The net amount paid to the employee for the period.\", \"type\": \"number\", \"required\": true, \"is_full_name\": false}, {\"key\": \"pay_date\", \"name\": \"Pay date\", \"instruction\": \"The payment date shown on the payslip.\", \"type\": \"date\", \"required\": false, \"is_full_name\": false}]',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.document_ai.analyze(\n document: Pathname(\"document.pdf\"),\n fields: \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.DocumentAi.AnalyzeAsync(new DocumentAiAnalyzeParams\n{\n Document = FileUpload.FromPath(\"document.pdf\"),\n Fields = \"[{\\\"key\\\": \\\"employer_name\\\", \\\"name\\\": \\\"Employer name\\\", \\\"instruction\\\": \\\"The employer or company issuing the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"employee_name\\\", \\\"name\\\": \\\"Employee name\\\", \\\"instruction\\\": \\\"The full name of the employee as printed on the payslip.\\\", \\\"type\\\": \\\"text\\\", \\\"required\\\": true, \\\"is_full_name\\\": true}, {\\\"key\\\": \\\"net_pay\\\", \\\"name\\\": \\\"Net pay\\\", \\\"instruction\\\": \\\"The net amount paid to the employee for the period.\\\", \\\"type\\\": \\\"number\\\", \\\"required\\\": true, \\\"is_full_name\\\": false}, {\\\"key\\\": \\\"pay_date\\\", \\\"name\\\": \\\"Pay date\\\", \\\"instruction\\\": \\\"The payment date shown on the payslip.\\\", \\\"type\\\": \\\"date\\\", \\\"required\\\": false, \\\"is_full_name\\\": false}]\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/aml/": { @@ -9412,6 +9925,14 @@ "example": "decline_aml_hit" } } + }, + "example": { + "full_name": "Antonio Ejemplo Modelo", + "entity_type": "person", + "date_of_birth": "1972-02-29", + "nationality": "ES", + "include_adverse_media": false, + "vendor_data": "user-1234" } } } @@ -9425,12 +9946,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/aml/\",\n headers={\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Content-Type\": \"application/json\",\n \"Idempotency-Key\": \"aml-user-1234-2026-08-20\",\n },\n json={\n \"full_name\": \"Antonio Ejemplo Modelo\",\n \"entity_type\": \"person\",\n \"date_of_birth\": \"1972-02-29\",\n \"nationality\": \"ES\",\n \"include_adverse_media\": False,\n \"vendor_data\": \"user-1234\",\n },\n timeout=60, # adverse media enrichment can add ~30s\n)\nresp.raise_for_status()\nprint(resp.json()[\"aml\"][\"status\"]) # Approved / In Review / Declined" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.aml.screen(\n full_name=\"Antonio Ejemplo Modelo\",\n entity_type=\"person\",\n date_of_birth=\"1972-02-29\",\n nationality=\"ES\",\n include_adverse_media=False,\n vendor_data=\"user-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/aml/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n 'Idempotency-Key': 'aml-user-1234-2026-08-20',\n },\n body: JSON.stringify({\n full_name: 'Antonio Ejemplo Modelo',\n entity_type: 'person',\n date_of_birth: '1972-02-29',\n nationality: 'ES',\n include_adverse_media: false,\n vendor_data: 'user-1234',\n }),\n});\nconst data = await res.json();\nconsole.log(data.aml.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.aml.screen({\n full_name: \"Antonio Ejemplo Modelo\",\n entity_type: \"person\",\n date_of_birth: \"1972-02-29\",\n nationality: \"ES\",\n include_adverse_media: false,\n vendor_data: \"user-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AML.Screen(ctx, didit.AMLScreenParams{\n\tFullName: \"Antonio Ejemplo Modelo\",\n\tEntityType: didit.Some(didit.AMLScreenParamsEntityType(\"person\")),\n\tDateOfBirth: didit.String(\"1972-02-29\"),\n\tNationality: didit.String(\"ES\"),\n\tIncludeAdverseMedia: didit.Bool(false),\n\tVendorData: didit.String(\"user-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport me.didit.Didit;\nimport me.didit.types.AmlScreenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.aml().screen(AmlScreenParams.builder()\n .fullName(\"Antonio Ejemplo Modelo\")\n .entityType(AmlScreenParams.EntityType.of(\"person\"))\n .dateOfBirth(LocalDate.parse(\"1972-02-29\"))\n .nationality(\"ES\")\n .includeAdverseMedia(false)\n .vendorData(\"user-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "aml->screen([\n 'full_name' => 'Antonio Ejemplo Modelo',\n 'entity_type' => 'person',\n 'date_of_birth' => '1972-02-29',\n 'nationality' => 'ES',\n 'include_adverse_media' => false,\n 'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.aml.screen(\n full_name: \"Antonio Ejemplo Modelo\",\n entity_type: \"person\",\n date_of_birth: \"1972-02-29\",\n nationality: \"ES\",\n include_adverse_media: false,\n vendor_data: \"user-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Aml.ScreenAsync(new AmlScreenParams\n{\n FullName = \"Antonio Ejemplo Modelo\",\n EntityType = new AmlScreenParamsEntityType(\"person\"),\n DateOfBirth = \"1972-02-29\",\n Nationality = \"ES\",\n IncludeAdverseMedia = false,\n VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -9479,7 +10025,7 @@ "id": { "type": "string", "nullable": true, - "description": "Stable identifier of the matched entity in the screening datasets." + "description": "Didit's stable identifier for the hit: `hit_` followed by 24 hexadecimal characters. The same matched entity keeps the same `id` when the subject is screened again. Pass it as `hit_id` to the AML hit review endpoints." }, "url": { "type": "string", @@ -9519,9 +10065,24 @@ "type": "array", "nullable": true, "items": { - "type": "string" + "type": "string", + "enum": [ + "PEP", + "PEP Level 1", + "PEP Level 2", + "PEP Level 3", + "PEP Level 4", + "Sanctions", + "Adverse Media", + "Warnings and Regulatory Enforcement", + "Fitness and Probity", + "SIP", + "SIE", + "Insolvency", + "Other Lists" + ] }, - "description": "Datasets the entity appears in (e.g. `PEP`, `PEP Level 1`, sanctions list names)." + "description": "Risk categories the entity is listed under: `PEP` (with its level, `PEP Level 1` to `PEP Level 4`), `Sanctions`, `Adverse Media`, `Warnings and Regulatory Enforcement`, `Fitness and Probity`, `SIP`, `SIE` or `Insolvency`. `Other Lists` when the entity's source states none of these categories." }, "features": { "type": "object", @@ -9935,7 +10496,7 @@ "entity_type": "person", "hits": [ { - "id": "kDpfszrbkDdaxpMVZw3NLg", + "id": "hit_7c1e9a40b2d35f86e0a4c912", "url": "https://news.example.org/articles/sample", "match": false, "score": 0.93, @@ -10134,7 +10695,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", "content": { "application/json": { "examples": { @@ -10714,7 +11275,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", "content": { "application/json": { "examples": { @@ -10772,12 +11333,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = 'https://verification.didit.me/v3/face-search/'\nheaders = {'x-api-key': 'YOUR_API_KEY'}\n\nwith open('selfie.jpg', 'rb') as f:\n files = {'user_image': ('selfie.jpg', f, 'image/jpeg')}\n data = {\n 'search_type': 'most_similar',\n 'save_api_request': 'true',\n 'vendor_data': 'user-123',\n }\n resp = requests.post(url, headers=headers, files=files, data=data, timeout=60)\n\nresp.raise_for_status()\nbody = resp.json()\nprint('status:', body['face_search']['status'])\nprint('matches:', body['face_search']['total_matches'])\nfor m in body['face_search']['matches']:\n print(f\" session={m['session_id']} similarity={m['similarity_percentage']} blocklisted={m['is_blocklisted']}\")" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.face_search.search(\n user_image=open(\"user_image.jpg\", \"rb\"),\n search_type=\"most_similar\",\n rotate_image=False,\n save_api_request=True,\n vendor_data=\"user-123\",\n metadata={\"flow\": \"dedup_check\"},\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import fs from 'node:fs';\n\nconst form = new FormData();\nform.append('user_image', new Blob([fs.readFileSync('./selfie.jpg')]), 'selfie.jpg');\nform.append('search_type', 'most_similar');\nform.append('save_api_request', 'true');\nform.append('vendor_data', 'user-123');\n\nconst response = await fetch('https://verification.didit.me/v3/face-search/', {\n method: 'POST',\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n body: form,\n});\n\nif (!response.ok) throw new Error(`Face search failed: ${response.status}`);\nconst body = await response.json();\nconsole.log('status:', body.face_search.status, 'matches:', body.face_search.total_matches);\nbody.face_search.matches.forEach(m =>\n console.log(` session=${m.session_id} similarity=${m.similarity_percentage} blocklisted=${m.is_blocklisted}`)\n);" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.faceSearch.search({\n user_image: await fileFromPath(\"user_image.jpg\"),\n search_type: \"most_similar\",\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"dedup_check\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FaceSearch.Search(ctx, didit.FaceSearchSearchParams{\n\tUserImage: didit.FileFromPath(\"user_image.jpg\"),\n\tSearchType: didit.Some(didit.FaceSearchSearchParamsSearchType(\"most_similar\")),\n\tRotateImage: didit.Bool(false),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData: didit.String(\"user-123\"),\n\tMetadata: didit.Some(map[string]any{\"flow\": \"dedup_check\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.FaceSearchSearchParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.faceSearch().search(FaceSearchSearchParams.builder()\n .userImage(Path.of(\"user_image.jpg\"))\n .searchType(FaceSearchSearchParams.SearchType.of(\"most_similar\"))\n .rotateImage(false)\n .saveApiRequest(true)\n .vendorData(\"user-123\")\n .metadata(Map.of(\"flow\", \"dedup_check\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "faceSearch->search([\n 'user_image' => File::fromPath('user_image.jpg'),\n 'search_type' => 'most_similar',\n 'rotate_image' => false,\n 'save_api_request' => true,\n 'vendor_data' => 'user-123',\n 'metadata' => ['flow' => 'dedup_check'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.face_search.search(\n user_image: Pathname(\"user_image.jpg\"),\n search_type: \"most_similar\",\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"dedup_check\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FaceSearch.SearchAsync(new FaceSearchSearchParams\n{\n UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n SearchType = new FaceSearchSearchParamsSearchType(\"most_similar\"),\n RotateImage = false,\n SaveApiRequest = true,\n VendorData = \"user-123\",\n Metadata = new Dictionary { [\"flow\"] = \"dedup_check\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -10821,7 +11407,8 @@ "schema": { "type": "integer", "default": 50, - "minimum": 1 + "minimum": 1, + "maximum": 1000000 }, "example": 20 }, @@ -10833,7 +11420,8 @@ "schema": { "type": "integer", "default": 0, - "minimum": 0 + "minimum": 0, + "maximum": 1000000 }, "example": 20 }, @@ -10899,6 +11487,35 @@ }, "example": "2026-06-30" }, + { + "name": "tags", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Comma-separated tag ids (`tags` of your application). Returns the sessions that carry any of them. Ids that are not valid UUIDs are ignored, and when none is valid the list is empty." + }, + { + "name": "decided_from", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "ISO 8601 datetime. Returns the sessions whose status last changed at or after it. It filters on the time of the last status change, not on creation time." + }, + { + "name": "decided_to", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date-time" + }, + "description": "ISO 8601 datetime. Returns the sessions whose status last changed before it. Combine with `decided_from` for a half-open window." + }, { "name": "country", "in": "query", @@ -11061,7 +11678,7 @@ "properties": { "count": { "type": "integer", - "description": "Number of sessions matching the filters. Exact for KYC rows; for KYB rows it is capped at 100 (use `next` to know whether more pages exist). For `session_kind=all` it is the sum of both kinds.", + "description": "Number of sessions matching the filters: exact up to 100 and capped at 100 beyond that, so do not use it as a total. Use `next` to know whether more pages exist. For `session_kind=all` it is the sum of both kinds, each capped at 100.", "example": 2 }, "next": { @@ -11312,7 +11929,7 @@ } }, "403": { - "description": "Missing, malformed, or revoked API key. This API never returns `401`; all authentication failures are `403`.\n\n**Deleted application:** for a few minutes after an application is deleted, a request made with one of its API keys can answer `{\"detail\": \"This application was deleted.\", \"code\": \"application_deleted\"}`. Do not retry: the application and its API keys no longer exist. After those few minutes, the key is refused like any other invalid key.", + "description": "Missing, malformed, or revoked API key. A missing key returns `403`; a wrong, revoked or expired key returns `401`.\n\n**Deleted application:** for a few minutes after an application is deleted, a request made with one of its API keys can answer `{\"detail\": \"This application was deleted.\", \"code\": \"application_deleted\"}`. Do not retry: the application and its API keys no longer exist. After those few minutes, the key is refused like any other invalid key.", "content": { "application/json": { "schema": { @@ -11365,12 +11982,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://verification.didit.me/v3/sessions/\"\nheaders = {\"x-api-key\": \"YOUR_API_KEY\"}\nparams = {\n \"session_kind\": \"user\", # \"user\" (default) | \"business\" | \"all\"\n \"status\": \"Approved,In Review\", # comma-separated, OR within the list\n \"date_from\": \"2026-06-01\",\n \"limit\": 20,\n}\n\nwhile url:\n response = requests.get(url, headers=headers, params=params)\n response.raise_for_status()\n page = response.json()\n for session in page[\"results\"]:\n print(session[\"session_kind\"], session[\"session_id\"], session[\"status\"])\n url, params = page[\"next\"], None # \"next\" already carries the query string" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const params = new URLSearchParams({\n session_kind: 'all',\n status: 'Approved,In Review',\n date_from: '2026-06-01',\n limit: '20',\n});\n\nconst response = await fetch(\n `https://verification.didit.me/v3/sessions/?${params}`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\n\nconst { count, next, results } = await response.json();\nfor (const session of results) {\n // session.session_kind is \"user\" (KYC) or \"business\" (KYB)\n console.log(session.session_kind, session.session_id, session.status);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.ListAutoPaging(ctx, didit.SessionsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->list() as $item) {\n print_r($item);\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] } @@ -11586,12 +12228,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/share/\",\n headers={\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n json={\n \"for_application_id\": \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n \"ttl_in_seconds\": 7200,\n },\n)\nresponse.raise_for_status()\nshare_token = response.json()[\"share_token\"]" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.share(\n \"11111111-2222-3333-4444-555555555555\",\n for_application_id=\"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n ttl_in_seconds=7200,\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/share/',\n {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n for_application_id: 'a5f3bca2-46e2-411e-90ef-a580900a57ee',\n ttl_in_seconds: 7200,\n }),\n },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst { share_token } = await response.json();" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.share(\"11111111-2222-3333-4444-555555555555\", {\n for_application_id: \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n ttl_in_seconds: 7200,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Share(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsShareParams{\n\tForApplicationID: \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n\tTTLInSeconds: didit.Int(7200),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsShareParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().share(\"11111111-2222-3333-4444-555555555555\", SessionsShareParams.builder()\n .forApplicationId(\"a5f3bca2-46e2-411e-90ef-a580900a57ee\")\n .ttlInSeconds(7200L)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->share('11111111-2222-3333-4444-555555555555', [\n 'for_application_id' => 'a5f3bca2-46e2-411e-90ef-a580900a57ee',\n 'ttl_in_seconds' => 7200,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.share(\n \"11111111-2222-3333-4444-555555555555\",\n for_application_id: \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n ttl_in_seconds: 7200\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ShareAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsShareParams\n{\n ForApplicationId = \"a5f3bca2-46e2-411e-90ef-a580900a57ee\",\n TtlInSeconds = 7200,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -11693,7 +12360,7 @@ } }, "403": { - "description": "Missing/invalid API key (this endpoint returns `403`, never `401`, for authentication failures), or this source session has already been imported into the calling application (one redeem per receiver).", + "description": "Missing API key (a wrong, revoked or expired key gets `401`), or this source session has already been imported into the calling application (one redeem per receiver).", "content": { "application/json": { "examples": { @@ -11788,12 +12455,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/session/import-shared/\",\n headers={\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n json={\n \"share_token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n \"trust_review\": False,\n \"workflow_id\": \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n \"vendor_data\": \"user-1\",\n },\n)\nresponse.raise_for_status()\nimported = response.json()" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.import_shared(\n share_token=\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n trust_review=False,\n workflow_id=\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n vendor_data=\"user-1\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/session/import-shared/',\n {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n share_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\n trust_review: false,\n workflow_id: '9f9b1234-aaaa-bbbb-cccc-1234567890ab',\n vendor_data: 'user-1',\n }),\n },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst imported = await response.json();" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.importShared({\n share_token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n trust_review: false,\n workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n vendor_data: \"user-1\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ImportShared(ctx, didit.SessionsImportSharedParams{\n\tShareToken: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n\tTrustReview: false,\n\tWorkflowID: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n\tVendorData: didit.String(\"user-1\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsImportSharedParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().importShared(SessionsImportSharedParams.builder()\n .shareToken(\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\")\n .trustReview(false)\n .workflowId(\"9f9b1234-aaaa-bbbb-cccc-1234567890ab\")\n .vendorData(\"user-1\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->importShared([\n 'share_token' => 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',\n 'trust_review' => false,\n 'workflow_id' => '9f9b1234-aaaa-bbbb-cccc-1234567890ab',\n 'vendor_data' => 'user-1',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.import_shared(\n share_token: \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n trust_review: false,\n workflow_id: \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n vendor_data: \"user-1\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ImportSharedAsync(new SessionsImportSharedParams\n{\n ShareToken = \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n TrustReview = false,\n WorkflowId = \"9f9b1234-aaaa-bbbb-cccc-1234567890ab\",\n VendorData = \"user-1\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -11880,6 +12572,12 @@ "description": "Switches the search to asynchronous mode: the API returns immediately and POSTs an unsigned `kyb.registry_search.resolved` callback to this URL when the candidate list is ready." } } + }, + "example": { + "country_code": "GB", + "name": "Tesco", + "search_type": "contains", + "vendor_data": "company-1234" } } } @@ -11893,12 +12591,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/kyb/search/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"country_code\": \"GB\", \"name\": \"Tesco\"},\n timeout=60, # synchronous mode waits for the registry to resolve\n)\nresp.raise_for_status()\ncandidates = resp.json()[\"kyb_registry\"][\"companies\"]\nkyb_response_id = candidates[0][\"kyb_response_id\"] # pass to /v3/kyb/select/" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.search(\n country_code=\"GB\",\n name=\"Tesco\",\n search_type=\"contains\",\n vendor_data=\"company-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/kyb/search/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ country_code: 'GB', name: 'Tesco' }),\n});\nconst data = await res.json();\nconst kybResponseId = data.kyb_registry.companies[0].kyb_response_id;" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.search({\n country_code: \"GB\",\n name: \"Tesco\",\n search_type: \"contains\",\n vendor_data: \"company-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.Search(ctx, didit.KYBSearchParams{\n\tCountryCode: \"GB\",\n\tName: didit.String(\"Tesco\"),\n\tSearchType: didit.Some(didit.KYBSearchParamsSearchType(\"contains\")),\n\tVendorData: didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.KybSearchParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().search(KybSearchParams.builder()\n .countryCode(\"GB\")\n .name(\"Tesco\")\n .searchType(KybSearchParams.SearchType.of(\"contains\"))\n .vendorData(\"company-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "kyb->search([\n 'country_code' => 'GB',\n 'name' => 'Tesco',\n 'search_type' => 'contains',\n 'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.search(\n country_code: \"GB\",\n name: \"Tesco\",\n search_type: \"contains\",\n vendor_data: \"company-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.SearchAsync(new KybSearchParams\n{\n CountryCode = \"GB\",\n Name = \"Tesco\",\n SearchType = new KybSearchParamsSearchType(\"contains\"),\n VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -11998,7 +12721,7 @@ } }, "400": { - "description": "Validation error. Field-level problems use DRF's standard envelope; the name/registration-number rule reports under `non_field_errors`.", + "description": "Validation error. Field-level problems use DRF's standard envelope; the name/registration-number rule reports under `non_field_errors`. A country the registries do not cover answers `400` with `code: kyb_registry_country_unsupported`.", "content": { "application/json": { "examples": { @@ -12033,13 +12756,20 @@ "Enter a valid URL." ] } + }, + "Country not covered": { + "summary": "No company registry covers the country", + "value": { + "detail": "Company registry search is not available for this country. Enter the company details manually to continue.", + "code": "kyb_registry_country_unsupported" + } } } } } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Also returned before searching when the applicable search fee cannot be covered (`code: \"insufficient_credits\"`), or when a contract search rate is missing.", + "description": "Permission denied. Returned when the `x-api-key` header is missing; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Also returned before searching when the applicable search fee cannot be covered (`code: \"insufficient_credits\"`), or when a contract search rate is missing.", "content": { "application/json": { "examples": { @@ -12054,7 +12784,7 @@ } }, "429": { - "description": "Rate limit exceeded. All POST/PATCH/DELETE endpoints share a budget of 300 write requests per minute per API key. The response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`, and `Retry-After` headers.", + "description": "Rate limit exceeded, or the search allowance is spent. All POST/PATCH/DELETE endpoints share a budget of 300 write requests per minute per API key, with `X-RateLimit-*` and `Retry-After` headers. Separately, paid registry searches are limited to 600 per application per hour: past that the response is `429` with `code: kyb_registry_search_limit_reached`, and searches served only by free sources still work. Wait and search again later.", "content": { "application/json": { "examples": { @@ -12063,6 +12793,13 @@ "value": { "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute." } + }, + "Search allowance spent": { + "summary": "More than 600 paid searches in the last hour", + "value": { + "detail": "The maximum number of company registry searches for this session has been reached. Enter the company details manually to continue.", + "code": "kyb_registry_search_limit_reached" + } } }, "schema": { @@ -12070,6 +12807,9 @@ "properties": { "detail": { "type": "string" + }, + "code": { + "type": "string" } } } @@ -12132,6 +12872,10 @@ "application/json": { "schema": { "$ref": "#/components/schemas/KYBRegistryCandidateRequest" + }, + "example": { + "kyb_response_id": "69aeeb95febb0f1704042259", + "vendor_data": "company-1234" } } } @@ -12145,12 +12889,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nsearch = requests.post(\n \"https://verification.didit.me/v3/kyb/search/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"country_code\": \"GB\", \"name\": \"Tesco\"},\n timeout=60,\n).json()\nkyb_response_id = search[\"kyb_registry\"][\"companies\"][0][\"kyb_response_id\"]\n\nresp = requests.post(\n \"https://verification.didit.me/v3/kyb/select/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"kyb_response_id\": kyb_response_id, \"vendor_data\": \"company-1234\"},\n timeout=90, # waits for the registry to resolve the full profile\n)\nresp.raise_for_status()\ncompany = resp.json()[\"kyb_registry\"]\nprint(company[\"company_name\"], company[\"registry_status\"], company[\"status\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.select(\n kyb_response_id=\"69aeeb95febb0f1704042259\",\n vendor_data=\"company-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/kyb/select/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n kyb_response_id: '69aeeb95febb0f1704042259',\n vendor_data: 'company-1234',\n }),\n});\nconst data = await res.json();\nconsole.log(data.kyb_registry.company_name, data.kyb_registry.registry_status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.select({\n kyb_response_id: \"69aeeb95febb0f1704042259\",\n vendor_data: \"company-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.Select(ctx, didit.KYBRegistryCandidateRequest{\n\tKYBResponseID: \"69aeeb95febb0f1704042259\",\n\tVendorData: didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.KYBRegistryCandidateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().select(KYBRegistryCandidateRequest.builder()\n .kybResponseId(\"69aeeb95febb0f1704042259\")\n .vendorData(\"company-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "kyb->select([\n 'kyb_response_id' => '69aeeb95febb0f1704042259',\n 'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.select(\n kyb_response_id: \"69aeeb95febb0f1704042259\",\n vendor_data: \"company-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.SelectAsync(new KYBRegistryCandidateRequest\n{\n KybResponseId = \"69aeeb95febb0f1704042259\",\n VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -12656,8 +13425,7 @@ "description": "Registry filing dates, when available. Annual returns and general meetings use last_annual_return_date and last_agm_date; they are distinct from financial accounts." }, "registry_data": { - "type": "object", - "description": "Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (`addresses`, `industries`, `ownership`, `beneficial_owners[].shareholding`) instead." + "$ref": "#/components/schemas/KYBRegistryData" }, "user_provided_data": { "type": "object", @@ -12707,6 +13475,55 @@ "type": "string", "nullable": true, "description": "The registry tier the workflow ordered: `basic`, `shareholders` or `ubo`. Also in `ownership.tier_requested`." + }, + "registry_monitoring": { + "type": "object", + "nullable": true, + "description": "The latest registry monitor for the company, or `null` when none exists.", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string" + }, + "unavailable_reason": { + "type": "string", + "nullable": true + }, + "enrolled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "next_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "last_event_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "events_count": { + "type": "integer" + }, + "watched_fields": { + "description": "The company fields the monitor watches." + } + } } } }, @@ -12802,24 +13619,7 @@ "next_account": "26 February 2026", "due_by_date": "26 August 2026" }, - "registry_data": { - "name": "Tesco PLC", - "registration_number": "00445790", - "status": "active", - "type": "Public Limited Company", - "incorporation_date": "1947-11-27", - "tax_number": "GB412 8925 93", - "country_code": "GB", - "fetch_status": "resolved", - "industries_detail": [ - { - "code": "47110", - "name": "Retail Sale In Non-specialised Stores With Food, Beverages Or Tobacco Predominating", - "description": null, - "meta_detail": [] - } - ] - }, + "registry_data": {}, "user_provided_data": null, "confirmed_by_user_at": null, "last_console_edit_at": null, @@ -12884,7 +13684,7 @@ } }, "400": { - "description": "Validation error. Field-level problems use DRF's standard envelope.", + "description": "Validation error. Field-level problems use DRF's standard envelope. A country the registries do not cover answers `400` with `code: kyb_registry_country_unsupported`.", "content": { "application/json": { "examples": { @@ -12903,13 +13703,20 @@ "KYB registry select must be saved so billing and retrieval can be tracked." ] } + }, + "Country not covered": { + "summary": "No company registry covers the country", + "value": { + "detail": "Company registry search is not available for this country. Enter the company details manually to continue.", + "code": "kyb_registry_country_unsupported" + } } } } } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", "content": { "application/json": { "examples": { @@ -13404,7 +14211,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any image processing happens.", "content": { "application/json": { "examples": { @@ -13462,12 +14269,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = 'https://verification.didit.me/v3/passive-liveness/'\nheaders = {'x-api-key': 'YOUR_API_KEY'}\n\nwith open('selfie.jpg', 'rb') as f:\n files = {'user_image': ('selfie.jpg', f, 'image/jpeg')}\n data = {\n 'face_liveness_score_decline_threshold': 30,\n 'save_api_request': 'true',\n 'vendor_data': 'user-123',\n }\n resp = requests.post(url, headers=headers, files=files, data=data, timeout=60)\n\nresp.raise_for_status()\nbody = resp.json()\nprint('status:', body['liveness']['status'])\nprint('score:', body['liveness']['score'])\nfor w in body['liveness']['warnings']:\n print('warning:', w['risk'], '-', w['log_type'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.passive_liveness.check(\n user_image=open(\"user_image.jpg\", \"rb\"),\n face_liveness_score_decline_threshold=30.0,\n rotate_image=False,\n save_api_request=True,\n vendor_data=\"user-123\",\n metadata={\"flow\": \"withdrawal\"},\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import fs from 'node:fs';\n\nconst form = new FormData();\nform.append('user_image', new Blob([fs.readFileSync('./selfie.jpg')]), 'selfie.jpg');\nform.append('face_liveness_score_decline_threshold', '30');\nform.append('save_api_request', 'true');\nform.append('vendor_data', 'user-123');\n\nconst response = await fetch('https://verification.didit.me/v3/passive-liveness/', {\n method: 'POST',\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n body: form,\n});\n\nif (!response.ok) throw new Error(`Passive liveness failed: ${response.status}`);\nconst body = await response.json();\nconsole.log('status:', body.liveness.status, 'score:', body.liveness.score);\nbody.liveness.warnings.forEach(w => console.log('warning:', w.risk, '-', w.log_type));" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.passiveLiveness.check({\n user_image: await fileFromPath(\"user_image.jpg\"),\n face_liveness_score_decline_threshold: 30.0,\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"withdrawal\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.PassiveLiveness.Check(ctx, didit.PassiveLivenessCheckParams{\n\tUserImage: didit.FileFromPath(\"user_image.jpg\"),\n\tFaceLivenessScoreDeclineThreshold: didit.Float(30.0),\n\tRotateImage: didit.Bool(false),\n\tSaveAPIRequest: didit.Bool(true),\n\tVendorData: didit.String(\"user-123\"),\n\tMetadata: didit.Some(map[string]any{\"flow\": \"withdrawal\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.PassiveLivenessCheckParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.passiveLiveness().check(PassiveLivenessCheckParams.builder()\n .userImage(Path.of(\"user_image.jpg\"))\n .faceLivenessScoreDeclineThreshold(30.0)\n .rotateImage(false)\n .saveApiRequest(true)\n .vendorData(\"user-123\")\n .metadata(Map.of(\"flow\", \"withdrawal\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "passiveLiveness->check([\n 'user_image' => File::fromPath('user_image.jpg'),\n 'face_liveness_score_decline_threshold' => 30.0,\n 'rotate_image' => false,\n 'save_api_request' => true,\n 'vendor_data' => 'user-123',\n 'metadata' => ['flow' => 'withdrawal'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.passive_liveness.check(\n user_image: Pathname(\"user_image.jpg\"),\n face_liveness_score_decline_threshold: 30.0,\n rotate_image: false,\n save_api_request: true,\n vendor_data: \"user-123\",\n metadata: { flow: \"withdrawal\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.PassiveLiveness.CheckAsync(new PassiveLivenessCheckParams\n{\n UserImage = FileUpload.FromPath(\"user_image.jpg\"),\n FaceLivenessScoreDeclineThreshold = 30.0,\n RotateImage = false,\n SaveApiRequest = true,\n VendorData = \"user-123\",\n Metadata = new Dictionary { [\"flow\"] = \"withdrawal\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -13789,6 +14621,70 @@ "type": "string", "description": "Bank card number (CHN bank-card verification)." }, + "company_registration_number": { + "type": "string", + "description": "Company registration number as issued by the companies register: the CNPJ in Brazil (e.g. `11222333000181`), the registration number in South Africa (e.g. `1936/007721/06`). Required by the company registry and company directors services (`bra_company_registry`, `bra_company_directors`, `zaf_company_registry`, `zaf_company_directors`)." + }, + "company_name": { + "type": "string", + "description": "Registered company name, cross-checked against the register entry. Optional for `zaf_company_registry`." + }, + "initials": { + "type": "string", + "description": "The person's initials as printed on the document. Required by `zaf_drivers_license`; accepted by `zaf_bank_account_holder`." + }, + "licence_number": { + "type": "string", + "description": "Driving licence number as printed on the card, for `zaf_drivers_license`. When omitted, `document_number` is used." + }, + "refugee_file_number": { + "type": "string", + "description": "Refugee file number issued by South Africa's Department of Home Affairs. Required by `zaf_refugee`." + }, + "bank_name": { + "type": "string", + "description": "Name of the bank that holds the account. Required by `zaf_bank_account_holder`." + }, + "bank_account_number": { + "type": "string", + "description": "Bank account number. Required by `zaf_bank_account_holder`; accepted by `zaf_fraud_prevention`." + }, + "account_type": { + "type": "string", + "description": "Bank account type for `zaf_bank_account_holder`: `current`, `savings`, `transmission`, `subscriptionShare` or `notKnown`, case-insensitive. Any other value returns `400`. Omit it when you do not know the type: the account-type cross-check is then reported as not confirmed." + }, + "phone_number": { + "type": "string", + "description": "Contact mobile number, for the services that cross-check contactability (`zaf_bank_account_holder`, `zaf_fraud_prevention`, `zaf_refugee`)." + }, + "right_thumb": { + "type": "string", + "description": "Base64-encoded right thumb fingerprint for `zaf_dha_fingerprint_match`, with `left_thumb` or on its own." + }, + "left_thumb": { + "type": "string", + "description": "Base64-encoded left thumb fingerprint for `zaf_dha_fingerprint_match`, with `right_thumb` or on its own." + }, + "score_level": { + "type": "integer", + "description": "Minimum biometric score level for `zaf_criminal_face_screening`. Defaults to `3`." + }, + "max_matches": { + "type": "integer", + "description": "Maximum number of candidate matches `zaf_criminal_face_screening` returns. Defaults to `1`." + }, + "vehicle_register_number": { + "type": "string", + "description": "Vehicle register number. Required, with `vehicle_licence_plate` and `vin`, by `zaf_vehicle_ownership`." + }, + "vehicle_licence_plate": { + "type": "string", + "description": "Vehicle licence plate number. Required, with `vehicle_register_number` and `vin`, by `zaf_vehicle_ownership`." + }, + "vin": { + "type": "string", + "description": "Vehicle Identification Number (VIN or chassis number). Required, with `vehicle_register_number` and `vehicle_licence_plate`, by `zaf_vehicle_ownership`." + }, "ssn": { "type": "string", "description": "Social Security Number (USA)." @@ -13844,6 +14740,17 @@ "description": "Free-form JSON stored with the request and echoed back." } } + }, + "example": { + "issuing_state": "BRA", + "services": [ + "bra_cpf" + ], + "identification_number": "12345678900", + "first_name": "John", + "last_name": "Doe", + "date_of_birth": "1980-01-01", + "vendor_data": "user-1234" } }, "multipart/form-data": { @@ -14140,6 +15047,70 @@ "type": "string", "description": "Bank card number (CHN bank-card verification)." }, + "company_registration_number": { + "type": "string", + "description": "Company registration number as issued by the companies register: the CNPJ in Brazil (e.g. `11222333000181`), the registration number in South Africa (e.g. `1936/007721/06`). Required by the company registry and company directors services (`bra_company_registry`, `bra_company_directors`, `zaf_company_registry`, `zaf_company_directors`)." + }, + "company_name": { + "type": "string", + "description": "Registered company name, cross-checked against the register entry. Optional for `zaf_company_registry`." + }, + "initials": { + "type": "string", + "description": "The person's initials as printed on the document. Required by `zaf_drivers_license`; accepted by `zaf_bank_account_holder`." + }, + "licence_number": { + "type": "string", + "description": "Driving licence number as printed on the card, for `zaf_drivers_license`. When omitted, `document_number` is used." + }, + "refugee_file_number": { + "type": "string", + "description": "Refugee file number issued by South Africa's Department of Home Affairs. Required by `zaf_refugee`." + }, + "bank_name": { + "type": "string", + "description": "Name of the bank that holds the account. Required by `zaf_bank_account_holder`." + }, + "bank_account_number": { + "type": "string", + "description": "Bank account number. Required by `zaf_bank_account_holder`; accepted by `zaf_fraud_prevention`." + }, + "account_type": { + "type": "string", + "description": "Bank account type for `zaf_bank_account_holder`: `current`, `savings`, `transmission`, `subscriptionShare` or `notKnown`, case-insensitive. Any other value returns `400`. Omit it when you do not know the type: the account-type cross-check is then reported as not confirmed." + }, + "phone_number": { + "type": "string", + "description": "Contact mobile number, for the services that cross-check contactability (`zaf_bank_account_holder`, `zaf_fraud_prevention`, `zaf_refugee`)." + }, + "right_thumb": { + "type": "string", + "description": "Base64-encoded right thumb fingerprint for `zaf_dha_fingerprint_match`, with `left_thumb` or on its own." + }, + "left_thumb": { + "type": "string", + "description": "Base64-encoded left thumb fingerprint for `zaf_dha_fingerprint_match`, with `right_thumb` or on its own." + }, + "score_level": { + "type": "integer", + "description": "Minimum biometric score level for `zaf_criminal_face_screening`. Defaults to `3`." + }, + "max_matches": { + "type": "integer", + "description": "Maximum number of candidate matches `zaf_criminal_face_screening` returns. Defaults to `1`." + }, + "vehicle_register_number": { + "type": "string", + "description": "Vehicle register number. Required, with `vehicle_licence_plate` and `vin`, by `zaf_vehicle_ownership`." + }, + "vehicle_licence_plate": { + "type": "string", + "description": "Vehicle licence plate number. Required, with `vehicle_register_number` and `vin`, by `zaf_vehicle_ownership`." + }, + "vin": { + "type": "string", + "description": "Vehicle Identification Number (VIN or chassis number). Required, with `vehicle_register_number` and `vehicle_licence_plate`, by `zaf_vehicle_ownership`." + }, "ssn": { "type": "string", "description": "Social Security Number (USA)." @@ -14213,12 +15184,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/database-validation/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\n \"issuing_state\": \"BRA\",\n \"services\": [\"bra_cpf\"],\n \"identification_number\": \"12345678900\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"date_of_birth\": \"1980-01-01\",\n \"vendor_data\": \"user-1234\",\n },\n timeout=45,\n)\nresp.raise_for_status()\ndv = resp.json()[\"database_validation\"]\nprint(dv[\"status\"], dv[\"match_type\"]) # e.g. Approved full_match\n\n# Biometric services need a selfie via multipart/form-data:\n# requests.post(..., data={\"issuing_state\": \"ARG\", \"services\": '[\"arg_renaper\"]',\n# \"identification_number\": \"12345678\", \"gender\": \"M\", ...},\n# files={\"selfie\": open(\"selfie.jpg\", \"rb\")})" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.database_validation.validate(\n issuing_state=\"BRA\",\n services=[\"bra_cpf\"],\n identification_number=\"12345678900\",\n first_name=\"John\",\n last_name=\"Doe\",\n date_of_birth=\"1980-01-01\",\n vendor_data=\"user-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/database-validation/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n issuing_state: 'BRA',\n services: ['bra_cpf'],\n identification_number: '12345678900',\n first_name: 'John',\n last_name: 'Doe',\n date_of_birth: '1980-01-01',\n vendor_data: 'user-1234',\n }),\n});\nconst data = await res.json();\nconsole.log(data.database_validation.status, data.database_validation.match_type);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.databaseValidation.validate({\n issuing_state: \"BRA\",\n services: [\"bra_cpf\"],\n identification_number: \"12345678900\",\n first_name: \"John\",\n last_name: \"Doe\",\n date_of_birth: \"1980-01-01\",\n vendor_data: \"user-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.DatabaseValidation.Validate(ctx, didit.DatabaseValidationValidateParams{\n\tIssuingState: \"BRA\",\n\tServices: didit.Some([]string{\"bra_cpf\"}),\n\tIdentificationNumber: didit.String(\"12345678900\"),\n\tFirstName: didit.String(\"John\"),\n\tLastName: didit.String(\"Doe\"),\n\tDateOfBirth: didit.String(\"1980-01-01\"),\n\tVendorData: didit.String(\"user-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.DatabaseValidationValidateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.databaseValidation().validate(DatabaseValidationValidateParams.builder()\n .issuingState(\"BRA\")\n .services(List.of(\"bra_cpf\"))\n .identificationNumber(\"12345678900\")\n .firstName(\"John\")\n .lastName(\"Doe\")\n .dateOfBirth(LocalDate.parse(\"1980-01-01\"))\n .vendorData(\"user-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "databaseValidation->validate([\n 'issuing_state' => 'BRA',\n 'services' => ['bra_cpf'],\n 'identification_number' => '12345678900',\n 'first_name' => 'John',\n 'last_name' => 'Doe',\n 'date_of_birth' => '1980-01-01',\n 'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.database_validation.validate(\n issuing_state: \"BRA\",\n services: [\"bra_cpf\"],\n identification_number: \"12345678900\",\n first_name: \"John\",\n last_name: \"Doe\",\n date_of_birth: \"1980-01-01\",\n vendor_data: \"user-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.DatabaseValidation.ValidateAsync(new DatabaseValidationValidateParams\n{\n IssuingState = \"BRA\",\n Services = new string[] { \"bra_cpf\" },\n IdentificationNumber = \"12345678900\",\n FirstName = \"John\",\n LastName = \"Doe\",\n DateOfBirth = \"1980-01-01\",\n VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -14761,7 +15757,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", "content": { "application/json": { "examples": { @@ -14882,12 +15878,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/phone/send/\",\n headers={\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Content-Type\": \"application/json\",\n },\n json={\n \"phone_number\": \"+14155552671\",\n \"options\": {\n \"code_size\": 6,\n \"preferred_channel\": \"whatsapp\",\n \"locale\": \"en-US\",\n },\n \"vendor_data\": \"user-1234\",\n },\n timeout=15,\n)\nresp.raise_for_status()\nprint(resp.json()) # {request_id, status, reason, vendor_data, metadata}\n# Then verify with POST /v3/phone/check/ using the same phone_number" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.phone.send_code(\n phone_number=\"+14155552671\",\n options={\n \"locale\": \"en-US\",\n \"preferred_channel\": \"whatsapp\",\n },\n vendor_data=\"user-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/phone/send/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n phone_number: '+14155552671',\n options: { code_size: 6, preferred_channel: 'whatsapp', locale: 'en-US' },\n vendor_data: 'user-1234',\n }),\n});\nif (!res.ok) throw new Error(`Phone send failed: ${res.status}`);\nconst data = await res.json();\nconsole.log(data); // { request_id, status, reason, vendor_data, metadata }\n// Then verify with POST /v3/phone/check/ using the same phone_number" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.phone.sendCode({\n phone_number: \"+14155552671\",\n options: {\n locale: \"en-US\",\n preferred_channel: \"whatsapp\",\n },\n vendor_data: \"user-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Phone.SendCode(ctx, didit.PhoneSendCodeParams{\n\tPhoneNumber: \"+14155552671\",\n\tOptions: didit.Some(didit.PhoneSendCodeParamsOptions{\n\t\tLocale: didit.String(\"en-US\"),\n\t\tPreferredChannel: didit.Some(didit.PhoneSendCodeParamsOptionsPreferredChannel(\"whatsapp\")),\n\t}),\n\tVendorData: didit.String(\"user-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.PhoneSendCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.phone().sendCode(PhoneSendCodeParams.builder()\n .phoneNumber(\"+14155552671\")\n .options(PhoneSendCodeParams.Options.builder()\n .locale(\"en-US\")\n .preferredChannel(PhoneSendCodeParams.Options.PreferredChannel.of(\"whatsapp\"))\n .build())\n .vendorData(\"user-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "phone->sendCode([\n 'phone_number' => '+14155552671',\n 'options' => [\n 'locale' => 'en-US',\n 'preferred_channel' => 'whatsapp',\n ],\n 'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.phone.send_code(\n phone_number: \"+14155552671\",\n options: {\n locale: \"en-US\",\n preferred_channel: \"whatsapp\",\n },\n vendor_data: \"user-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Phone.SendCodeAsync(new PhoneSendCodeParams\n{\n PhoneNumber = \"+14155552671\",\n Options = new PhoneSendCodeParamsOptions\n {\n Locale = \"en-US\",\n PreferredChannel = new PhoneSendCodeParamsOptionsPreferredChannel(\"whatsapp\"),\n },\n VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -15155,7 +16176,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment (`{\"detail\": ...}`) — this API never returns `401`. Also returned before any send when the organization has never topped up (anti-abuse gate) or when its balance cannot cover the destination's send price (`{\"error\": ...}`).", + "description": "Permission denied. Returned when the `x-api-key` header is missing (`{\"detail\": ...}`); a wrong, revoked or expired key returns `401`. Also returned before any send when the organization has never topped up (anti-abuse gate) or when its balance cannot cover the destination's send price (`{\"error\": ...}`).", "content": { "application/json": { "examples": { @@ -15291,12 +16312,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/phone/check/\",\n headers={\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Content-Type\": \"application/json\",\n },\n json={\n \"phone_number\": \"+14155552671\", # same number as the send call\n \"code\": \"123456\",\n \"voip_number_action\": \"DECLINE\",\n },\n timeout=15,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result[\"status\"]) # Approved / Declined / Failed / Expired or Not Found\nif result[\"status\"] in (\"Approved\", \"Declined\"):\n print(result[\"phone\"][\"carrier\"], result[\"phone\"][\"is_virtual\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.phone.check_code(\n phone_number=\"+14155552671\",\n code=\"123456\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/phone/check/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n phone_number: '+14155552671', // same number as the send call\n code: '123456',\n voip_number_action: 'DECLINE',\n }),\n});\nconst data = await res.json();\nif (data.status === 'Approved') {\n // full phone report is in data.phone (carrier, is_virtual, matches, ...)\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.phone.checkCode({\n phone_number: \"+14155552671\",\n code: \"123456\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Phone.CheckCode(ctx, didit.PhoneCheckCodeParams{\n\tPhoneNumber: \"+14155552671\",\n\tCode: \"123456\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.PhoneCheckCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.phone().checkCode(PhoneCheckCodeParams.builder()\n .phoneNumber(\"+14155552671\")\n .code(\"123456\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "phone->checkCode([\n 'phone_number' => '+14155552671',\n 'code' => '123456',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.phone.check_code(\n phone_number: \"+14155552671\",\n code: \"123456\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Phone.CheckCodeAsync(new PhoneCheckCodeParams\n{\n PhoneNumber = \"+14155552671\",\n Code = \"123456\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -15347,6 +16393,48 @@ "default": "NO_ACTION", "description": "What to do when the carrier lookup reports a virtual line type — `voip`, `isp`, or `vpn` (`phone.is_virtual`). `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the risk in `phone.warnings`." }, + "enable_enrichment": { + "type": "boolean", + "default": false, + "description": "When `true`, also run phone intelligence on the number: a risk score, the line type, whether it was recently ported and a trust index. Billed as one `phone_intelligence_api` unit per request ($0.05 at list price) in addition to this endpoint's own price. The request returns `403` when your balance cannot cover it.", + "example": false + }, + "phone_intelligence_score_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the phone intelligence risk score is above the threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, + "phone_type_risk_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the number is a high-risk line type. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, + "recent_port_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the number was ported to another carrier recently. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, + "low_phone_trust_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the phone intelligence trust index is at or below the threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, "enable_social": { "type": "boolean", "default": false, @@ -15682,7 +16770,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — this API never returns `401`. Checks are free, so there is no credit check here.", + "description": "Permission denied. Returned when the `x-api-key` header is missing; a wrong, revoked or expired key returns `401`. Checks are free, so there is no credit check here.", "content": { "application/json": { "examples": { @@ -15786,7 +16874,7 @@ "/v3/bank/account-check/": { "post": { "summary": "Check a bank account", - "description": "Check that a bank account belongs to the person or company you name, before you send money to it. No session and no sign-in: send the name and the account, read the result. It is the [account check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.\n\n**What you send.** The account's `country` (ISO 3166-1 alpha-3), the `account` the way that country writes it, and the `holder` name: `full_name` for a person or `business_name` for a company. A business name checks a business account.\n\n**What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `account` comes back masked to its last 4 characters.\n\n**Billing.** Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a `no_match`, an account that does not exist and a `cannot_verify` are billed too. A request answered with an error is never billed.\n\n**Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response.\n\n**Sandbox.** A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`, `0005` a `503` and `0009` a `400`. Any other ending is a `match`.\n\n**API keys.** A scoped API key needs write access to sessions.", + "description": "**Not available in production yet.** Bank Verification is switched off in production, so until it is switched on this endpoint answers `404` with `bank_verification_not_available`. Do not build on it yet. The rest of this description is what the endpoint does once it is available.\n\nCheck that a bank account belongs to the person or company you name, before you send money to it. No session and no sign-in: send the name and the account, read the result. It is the [account check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend.\n\n**What you send.** The account's `country` (ISO 3166-1 alpha-3), the `account` the way that country writes it, and the `holder` name: `full_name` for a person or `business_name` for a company. A business name checks a business account.\n\n**What you get back.** `result` is `match`, `close_match`, `no_match` or `cannot_verify`. On a `close_match`, `holder_name` is the name the bank holds the account under, when the bank returned it. `account` comes back masked to its last 4 characters.\n\n**Billing.** Each check the bank answers is billed once at the Account check price of the account's country, whatever the result: a `no_match`, an account that does not exist and a `cannot_verify` are billed too. A request answered with an error is never billed.\n\n**Every request is a new check.** There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response.\n\n**Sandbox.** Where Bank Verification is available, a sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: `0001` a `close_match` with a `holder_name`, `0002` a `close_match` without one, `0003` and `0006` a `no_match`, `0004` `cannot_verify`, `0005` a `503` and `0009` a `400`. Any other ending is a `match`.\n\n**API keys.** A scoped API key needs write access to sessions.", "operationId": "post_v3_bank_account_check", "tags": [ "Standalone APIs" @@ -15995,7 +17083,7 @@ } }, "404": { - "description": "No account check serves this account yet, so nothing was checked or billed. `country_not_covered`: none serves its country, or its kind of account (person or business) there. `bank_not_covered`: none serves its bank. `bank_verification_not_available`: Bank Verification is not available yet.", + "description": "No account check serves this account yet, so nothing was checked or billed. `country_not_covered`: none serves its country, or its kind of account (person or business) there. `bank_not_covered`: none serves its bank. `bank_verification_not_available`: Bank Verification is not enabled in production yet, which is the answer for every request there until it is switched on.", "content": { "application/json": { "schema": { @@ -16052,12 +17140,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/bank/account-check/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\n \"country\": \"GBR\",\n \"account\": {\"sort_code\": \"20-45-67\", \"account_number\": \"31926819\"},\n \"holder\": {\"full_name\": \"Maria Oliveira\"},\n \"vendor_data\": \"payout_20481\",\n },\n timeout=30,\n)\nresp.raise_for_status()\ncheck = resp.json()\nif check[\"result\"] == \"match\":\n pass # send the payout\nelif check[\"result\"] == \"close_match\":\n print(check[\"holder_name\"]) # the name the bank holds, when it returned one" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.bank.account_check(\n country=\"GBR\",\n account={\n \"account_number\": \"31926819\",\n \"sort_code\": \"20-45-67\",\n },\n holder={\n \"full_name\": \"Maria Oliveira\",\n },\n vendor_data=\"payout_20481\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/bank/account-check/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n country: 'GBR',\n account: { sort_code: '20-45-67', account_number: '31926819' },\n holder: { full_name: 'Maria Oliveira' },\n vendor_data: 'payout_20481',\n }),\n});\nconst check = await res.json();\n// check.result: match, close_match, no_match or cannot_verify" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.bank.accountCheck({\n country: \"GBR\",\n account: {\n account_number: \"31926819\",\n sort_code: \"20-45-67\",\n },\n holder: {\n full_name: \"Maria Oliveira\",\n },\n vendor_data: \"payout_20481\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Bank.AccountCheck(ctx, didit.BankAccountCheckRequest{\n\tCountry: \"GBR\",\n\tAccount: didit.BankAccountCheckRequestAccount{\n\t\tAccountNumber: didit.String(\"31926819\"),\n\t\tSortCode: didit.String(\"20-45-67\"),\n\t},\n\tHolder: didit.BankAccountCheckHolder{\n\t\tFullName: didit.String(\"Maria Oliveira\"),\n\t},\n\tVendorData: didit.String(\"payout_20481\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BankAccountCheckHolder;\nimport me.didit.types.BankAccountCheckPersonHolder;\nimport me.didit.types.BankAccountCheckRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.bank().accountCheck(BankAccountCheckRequest.builder()\n .country(\"GBR\")\n .account(BankAccountCheckRequest.Account.builder()\n .accountNumber(\"31926819\")\n .sortCode(\"20-45-67\")\n .build())\n .holder(BankAccountCheckHolder.ofBankAccountCheckPersonHolder(BankAccountCheckPersonHolder.builder()\n .fullName(\"Maria Oliveira\")\n .build()))\n .vendorData(\"payout_20481\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "bank->accountCheck([\n 'country' => 'GBR',\n 'account' => [\n 'account_number' => '31926819',\n 'sort_code' => '20-45-67',\n ],\n 'holder' => [\n 'full_name' => 'Maria Oliveira',\n ],\n 'vendor_data' => 'payout_20481',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.bank.account_check(\n country: \"GBR\",\n account: {\n account_number: \"31926819\",\n sort_code: \"20-45-67\",\n },\n holder: {\n full_name: \"Maria Oliveira\",\n },\n vendor_data: \"payout_20481\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Bank.AccountCheckAsync(new BankAccountCheckRequest\n{\n Country = \"GBR\",\n Account = new()\n {\n AccountNumber = \"31926819\",\n SortCode = \"20-45-67\",\n },\n Holder = new()\n {\n FullName = \"Maria Oliveira\",\n },\n VendorData = \"payout_20481\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -16085,12 +17198,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/email/send/\",\n headers={\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Content-Type\": \"application/json\",\n },\n json={\n \"email\": \"alice@example.com\",\n \"options\": {\"code_size\": 6, \"locale\": \"en\"},\n \"vendor_data\": \"user-1234\",\n },\n timeout=15,\n)\nresp.raise_for_status()\nprint(resp.json()) # {request_id, status, reason, vendor_data, metadata}\n# Then verify with POST /v3/email/check/ using the same email" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.email.send_code(\n email=\"alice@example.com\",\n options={\n \"locale\": \"en\",\n },\n vendor_data=\"user-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/email/send/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n email: 'alice@example.com',\n options: { code_size: 6, locale: 'en' },\n vendor_data: 'user-1234',\n }),\n});\nif (!res.ok) throw new Error(`Email send failed: ${res.status}`);\nconst data = await res.json();\nconsole.log(data); // { request_id, status, reason, vendor_data, metadata }\n// Then verify with POST /v3/email/check/ using the same email" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.email.sendCode({\n email: \"alice@example.com\",\n options: {\n locale: \"en\",\n },\n vendor_data: \"user-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Email.SendCode(ctx, didit.EmailSendCodeParams{\n\tEmail: \"alice@example.com\",\n\tOptions: didit.Some(didit.EmailSendCodeParamsOptions{\n\t\tLocale: didit.Some(didit.EmailSendCodeParamsOptionsLocale(\"en\")),\n\t}),\n\tVendorData: didit.String(\"user-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.EmailSendCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.email().sendCode(EmailSendCodeParams.builder()\n .email(\"alice@example.com\")\n .options(EmailSendCodeParams.Options.builder()\n .locale(EmailSendCodeParams.Options.Locale.of(\"en\"))\n .build())\n .vendorData(\"user-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "email->sendCode([\n 'email' => 'alice@example.com',\n 'options' => [\n 'locale' => 'en',\n ],\n 'vendor_data' => 'user-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.email.send_code(\n email: \"alice@example.com\",\n options: {\n locale: \"en\",\n },\n vendor_data: \"user-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Email.SendCodeAsync(new EmailSendCodeParams\n{\n Email = \"alice@example.com\",\n Options = new EmailSendCodeParamsOptions\n {\n Locale = new EmailSendCodeParamsOptionsLocale(\"en\"),\n },\n VendorData = \"user-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -16375,7 +17513,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment (`{\"detail\": ...}`) — this API never returns `401`. Also returned before any send when the organization's balance cannot cover one Email Verification API credit (`{\"error\": ...}`).", + "description": "Permission denied. Returned when the `x-api-key` header is missing (`{\"detail\": ...}`); a wrong, revoked or expired key returns `401`. Also returned before any send when the organization's balance cannot cover one Email Verification API credit (`{\"error\": ...}`).", "content": { "application/json": { "examples": { @@ -16472,12 +17610,37 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/email/check/\",\n headers={\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Content-Type\": \"application/json\",\n },\n json={\n \"email\": \"alice@example.com\", # same address as the send call\n \"code\": \"123456\",\n \"disposable_email_action\": \"DECLINE\",\n },\n timeout=15,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result[\"status\"]) # Approved / Declined / Failed / Expired or Not Found\nif result[\"status\"] in (\"Approved\", \"Declined\"):\n print(result[\"email\"][\"is_breached\"], result[\"email\"][\"is_disposable\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.email.check_code(\n email=\"alice@example.com\",\n code=\"123456\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/email/check/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n email: 'alice@example.com', // same address as the send call\n code: '123456',\n disposable_email_action: 'DECLINE',\n }),\n});\nconst data = await res.json();\nif (data.status === 'Approved') {\n // full email report is in data.email (breaches, is_disposable, matches, ...)\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.email.checkCode({\n email: \"alice@example.com\",\n code: \"123456\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Email.CheckCode(ctx, didit.EmailCheckCodeParams{\n\tEmail: \"alice@example.com\",\n\tCode: \"123456\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.EmailCheckCodeParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.email().checkCode(EmailCheckCodeParams.builder()\n .email(\"alice@example.com\")\n .code(\"123456\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "email->checkCode([\n 'email' => 'alice@example.com',\n 'code' => '123456',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.email.check_code(\n email: \"alice@example.com\",\n code: \"123456\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Email.CheckCodeAsync(new EmailCheckCodeParams\n{\n Email = \"alice@example.com\",\n Code = \"123456\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -16526,6 +17689,39 @@ "default": "NO_ACTION", "description": "What to do when the domain belongs to a disposable/temporary-mail provider (`email.is_disposable`). `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the risk in `email.warnings`." }, + "enable_enrichment": { + "type": "boolean", + "default": false, + "description": "When `true`, also run email intelligence on the address: a risk score and its breach history. Billed as one `email_intelligence_api` unit per request ($0.05 at list price) in addition to this endpoint's own price. The request returns `403` when your balance cannot cover it.", + "example": false + }, + "email_intelligence_score_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the email intelligence risk score is above the threshold. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, + "recent_email_breach_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the address appears in a recent known data breach. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, + "frequent_email_breach_action": { + "type": "string", + "enum": [ + "NO_ACTION", + "DECLINE" + ], + "default": "NO_ACTION", + "description": "Action when the address appears in many known data breaches. `DECLINE` flips the final `status` to `Declined`; `NO_ACTION` records the signal without declining. Only takes effect when `enable_enrichment` is `true`." + }, "enable_social": { "type": "boolean", "default": false, @@ -16811,7 +18007,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — this API never returns `401`. Checks are free, so there is no credit check here.", + "description": "Permission denied. Returned when the `x-api-key` header is missing; a wrong, revoked or expired key returns `401`. Checks are free, so there is no credit check here.", "content": { "application/json": { "examples": { @@ -17032,14 +18228,39 @@ "source": "curl -X GET 'https://verification.didit.me/v3/workflows/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Accept: application/json'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.get(\n \"https://verification.didit.me/v3/workflows/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n timeout=10,\n)\nresp.raise_for_status()\npage = resp.json()\nfor workflow in page[\"results\"]:\n print(workflow[\"uuid\"], workflow[\"workflow_label\"], workflow[\"status\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.workflows.list():\n print(item)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(\"https://verification.didit.me/v3/workflows/\", {\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n});\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst page = await res.json();\npage.results.forEach((w) => console.log(w.uuid, w.workflow_label, w.status));" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.workflows.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Workflows.ListAutoPaging(ctx, didit.WorkflowsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.workflows().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "workflows->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.workflows.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Workflows.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] }, @@ -17172,10 +18393,28 @@ } }, "400": { - "description": "Validation error. Common causes: a top-level key outside the accepted whitelist (e.g. `workflow_type`), an unknown `feature` value, a feature placed before its dependency (e.g., `FACE_MATCH` before `OCR`), a passive feature (`AML`, `IP_ANALYSIS`, `DATABASE_VALIDATION`, `KYB_KEY_PEOPLE`) used as the first step, a `QUESTIONNAIRE` feature whose `config.questionnaire_uuid` does not exist for this application, or an out-of-range threshold. Body is a DRF validation error object — keys are field names, values are arrays of human-readable messages.", + "description": "Validation error. Common causes: a top-level key outside the accepted whitelist (e.g. `workflow_type`), an unknown `feature` value, a feature placed before its dependency (e.g., `FACE_MATCH` before `OCR`), a passive feature (`AML`, `IP_ANALYSIS`, `DATABASE_VALIDATION`, `KYB_KEY_PEOPLE`) used as the first step, a `QUESTIONNAIRE` feature whose `config.questionnaire_uuid` does not exist for this application, a `SIGNATURE` feature that would go live with no document to sign, a `SIGNATURE` feature at `signature_level: \"aes\"` while Advanced (AES) is not available (`aes_not_available`, see `signature_availability` on the workflow), or an out-of-range threshold. Body is a DRF validation error object — keys are field names, values are arrays of human-readable messages.", "content": { "application/json": { "examples": { + "Advanced (AES) not available": { + "value": { + "features": { + "signature_level": [ + "Node 'signature': Advanced (AES) is not available yet (aes_not_available)." + ] + } + } + }, + "Signature step with no document": { + "value": { + "features": { + "non_field_errors": [ + "Node 'signature': Add a document to sign, or let each session bring its own." + ] + } + } + }, "Missing feature": { "value": { "features": [ @@ -17249,14 +18488,39 @@ "source": "curl -X POST 'https://verification.didit.me/v3/workflows/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"workflow_label\": \"Standard KYC\",\n \"features\": [\n {\"feature\": \"OCR\"},\n {\"feature\": \"LIVENESS\", \"config\": {\"face_liveness_method\": \"passive\"}},\n {\"feature\": \"FACE_MATCH\", \"config\": {\"face_match_score_decline_threshold\": 40, \"face_match_score_review_threshold\": 60}}\n ]\n }'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\npayload = {\n \"workflow_label\": \"Standard KYC\",\n \"features\": [\n {\"feature\": \"OCR\"},\n {\"feature\": \"LIVENESS\", \"config\": {\"face_liveness_method\": \"passive\"}},\n {\"feature\": \"FACE_MATCH\"},\n ],\n}\nresp = requests.post(\n \"https://verification.didit.me/v3/workflows/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json=payload,\n timeout=10,\n)\nresp.raise_for_status()\nworkflow = resp.json()\nprint(\"Workflow id:\", workflow[\"uuid\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.workflows.create(\n workflow_label=\"Standard KYC\",\n features=[{\n \"feature\": \"OCR\",\n \"config\": {\"duplicated_user_action\": \"review\"},\n }, {\n \"feature\": \"LIVENESS\",\n \"config\": {\"face_liveness_method\": \"passive\"},\n }, {\n \"feature\": \"FACE_MATCH\",\n \"config\": {\"face_match_score_decline_threshold\": 40, \"face_match_score_review_threshold\": 60},\n }],\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(\"https://verification.didit.me/v3/workflows/\", {\n method: \"POST\",\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n workflow_label: \"Standard KYC\",\n features: [\n { feature: \"OCR\" },\n { feature: \"LIVENESS\", config: { face_liveness_method: \"passive\" } },\n { feature: \"FACE_MATCH\" },\n ],\n }),\n});\nif (!res.ok) throw new Error(`Didit ${res.status}: ${await res.text()}`);\nconst workflow = await res.json();\nconsole.log(\"Workflow id:\", workflow.uuid);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.workflows.create({\n workflow_label: \"Standard KYC\",\n features: [{\n feature: \"OCR\",\n config: { duplicated_user_action: \"review\" },\n }, {\n feature: \"LIVENESS\",\n config: { face_liveness_method: \"passive\" },\n }, {\n feature: \"FACE_MATCH\",\n config: { face_match_score_decline_threshold: 40, face_match_score_review_threshold: 60 },\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Workflows.Create(ctx, didit.SimpleWorkflowRequest{\n\tWorkflowLabel: didit.String(\"Standard KYC\"),\n\tFeatures: []didit.SimpleWorkflowFeature{{\n\t\tFeature: \"OCR\",\n\t\tConfig: didit.Some(map[string]any{\"duplicated_user_action\": \"review\"}),\n\t}, {\n\t\tFeature: \"LIVENESS\",\n\t\tConfig: didit.Some(map[string]any{\"face_liveness_method\": \"passive\"}),\n\t}, {\n\t\tFeature: \"FACE_MATCH\",\n\t\tConfig: didit.Some(map[string]any{\"face_match_score_decline_threshold\": 40, \"face_match_score_review_threshold\": 60}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SimpleWorkflowFeature;\nimport me.didit.types.SimpleWorkflowRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.workflows().create(SimpleWorkflowRequest.builder()\n .workflowLabel(\"Standard KYC\")\n .features(List.of(\n SimpleWorkflowFeature.builder()\n .feature(SimpleWorkflowFeature.Feature.of(\"OCR\"))\n .config(Map.of(\"duplicated_user_action\", \"review\"))\n .build(),\n SimpleWorkflowFeature.builder()\n .feature(SimpleWorkflowFeature.Feature.of(\"LIVENESS\"))\n .config(Map.of(\"face_liveness_method\", \"passive\"))\n .build(),\n SimpleWorkflowFeature.builder()\n .feature(SimpleWorkflowFeature.Feature.of(\"FACE_MATCH\"))\n .config(Map.of(\"face_match_score_decline_threshold\", 40, \"face_match_score_review_threshold\", 60))\n .build()))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "workflows->create([\n 'workflow_label' => 'Standard KYC',\n 'features' => [[\n 'feature' => 'OCR',\n 'config' => ['duplicated_user_action' => 'review'],\n ], [\n 'feature' => 'LIVENESS',\n 'config' => ['face_liveness_method' => 'passive'],\n ], [\n 'feature' => 'FACE_MATCH',\n 'config' => ['face_match_score_decline_threshold' => 40, 'face_match_score_review_threshold' => 60],\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.workflows.create(\n workflow_label: \"Standard KYC\",\n features: [{\n feature: \"OCR\",\n config: { duplicated_user_action: \"review\" },\n }, {\n feature: \"LIVENESS\",\n config: { face_liveness_method: \"passive\" },\n }, {\n feature: \"FACE_MATCH\",\n config: { face_match_score_decline_threshold: 40, face_match_score_review_threshold: 60 },\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Workflows.CreateAsync(new SimpleWorkflowRequest\n{\n WorkflowLabel = \"Standard KYC\",\n Features = new SimpleWorkflowFeature[]\n {\n new()\n {\n Feature = \"OCR\",\n Config = new Dictionary { [\"duplicated_user_action\"] = \"review\" },\n },\n new()\n {\n Feature = \"LIVENESS\",\n Config = new Dictionary { [\"face_liveness_method\"] = \"passive\" },\n },\n new()\n {\n Feature = \"FACE_MATCH\",\n Config = new Dictionary { [\"face_match_score_decline_threshold\"] = 40, [\"face_match_score_review_threshold\"] = 60 },\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -17400,14 +18664,39 @@ "source": "curl -X GET 'https://verification.didit.me/v3/workflows/a1b2c3d4-5678-90ab-cdef-111111111111/' \\\n -H 'x-api-key: YOUR_API_KEY'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.get(\n f\"https://verification.didit.me/v3/workflows/{settings_uuid}/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n timeout=10,\n)\nresp.raise_for_status()\nworkflow = resp.json()\nprint(workflow[\"workflow_label\"], workflow[\"status\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.workflows.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(`https://verification.didit.me/v3/workflows/${settingsUuid}/`, {\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n});\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst workflow = await res.json();\nconsole.log(workflow.workflow_label, workflow.status);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.workflows.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Workflows.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.workflows().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "workflows->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.workflows.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Workflows.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -17507,7 +18796,7 @@ } }, "400": { - "description": "Validation error — a top-level key outside the accepted whitelist, an unknown feature, invalid ordering, out-of-range threshold, referencing a non-existent questionnaire, or `status: \"draft\"` sent for a published version (`\"Cannot revert a published version to draft.\"`). The response body is a DRF validation error keyed by field name." + "description": "Validation error — a top-level key outside the accepted whitelist, an unknown feature, invalid ordering, out-of-range threshold, referencing a non-existent questionnaire, a `SIGNATURE` feature that would go live with no document to sign, a new `SIGNATURE` feature at `signature_level: \"aes\"` while Advanced (AES) is not available (`aes_not_available`, see `signature_availability` on the workflow; a step that already stores `aes` keeps it), or `status: \"draft\"` sent for a published version (`\"Cannot revert a published version to draft.\"`). The response body is a DRF validation error keyed by field name." }, "403": { "description": "API key missing or invalid.", @@ -17548,14 +18837,39 @@ "source": "curl -X PATCH 'https://verification.didit.me/v3/workflows/a1b2c3d4-5678-90ab-cdef-111111111111/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"workflow_label\": \"Premium KYC\"}'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.patch(\n f\"https://verification.didit.me/v3/workflows/{settings_uuid}/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json={\"workflow_label\": \"Premium KYC\"},\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json()[\"workflow_label\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.workflows.update(\n \"11111111-2222-3333-4444-555555555555\",\n features=[{\n \"feature\": \"OCR\",\n }, {\n \"feature\": \"AML\",\n }],\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(`https://verification.didit.me/v3/workflows/${settingsUuid}/`, {\n method: \"PATCH\",\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ workflow_label: \"Premium KYC\" }),\n});\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst workflow = await res.json();\nconsole.log(workflow.workflow_label);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.workflows.update(\"11111111-2222-3333-4444-555555555555\", {\n features: [{\n feature: \"OCR\",\n }, {\n feature: \"AML\",\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Workflows.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SimpleWorkflowUpdateRequest{\n\tFeatures: didit.Some([]didit.SimpleWorkflowFeature{{\n\t\tFeature: \"OCR\",\n\t}, {\n\t\tFeature: \"AML\",\n\t}}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SimpleWorkflowFeature;\nimport me.didit.types.SimpleWorkflowUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.workflows().update(\"11111111-2222-3333-4444-555555555555\", SimpleWorkflowUpdateRequest.builder()\n .features(List.of(\n SimpleWorkflowFeature.builder()\n .feature(SimpleWorkflowFeature.Feature.of(\"OCR\"))\n .build(),\n SimpleWorkflowFeature.builder()\n .feature(SimpleWorkflowFeature.Feature.of(\"AML\"))\n .build()))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "workflows->update('11111111-2222-3333-4444-555555555555', [\n 'features' => [[\n 'feature' => 'OCR',\n ], [\n 'feature' => 'AML',\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.workflows.update(\n \"11111111-2222-3333-4444-555555555555\",\n features: [{\n feature: \"OCR\",\n }, {\n feature: \"AML\",\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Workflows.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new SimpleWorkflowUpdateRequest\n{\n Features = new SimpleWorkflowFeature[]\n {\n new()\n {\n Feature = \"OCR\",\n },\n new()\n {\n Feature = \"AML\",\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -17635,14 +18949,39 @@ "source": "curl -X DELETE 'https://verification.didit.me/v3/workflows/a1b2c3d4-5678-90ab-cdef-111111111111/' \\\n -H 'x-api-key: YOUR_API_KEY'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.delete(\n f\"https://verification.didit.me/v3/workflows/{settings_uuid}/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n timeout=10,\n)\nresp.raise_for_status() # raises on 4xx/5xx; 204 is success" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.workflows.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(`https://verification.didit.me/v3/workflows/${settingsUuid}/`, {\n method: \"DELETE\",\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n});\nif (res.status !== 204) throw new Error(`Didit ${res.status}`);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.workflows.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Workflows.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.workflows().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "workflows->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.workflows.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Workflows.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ] } @@ -17788,14 +19127,39 @@ "source": "curl -X GET 'https://verification.didit.me/v3/questionnaires/' \\\n -H 'x-api-key: YOUR_API_KEY'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.get(\n \"https://verification.didit.me/v3/questionnaires/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n timeout=10,\n)\nresp.raise_for_status()\npage = resp.json()\nfor q in page[\"results\"]:\n print(q[\"uuid\"], q[\"title\"], q[\"status\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.questionnaires.list():\n print(item)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(\"https://verification.didit.me/v3/questionnaires/\", {\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n});\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst page = await res.json();\npage.results.forEach((q) => console.log(q.uuid, q.title, q.status));" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.questionnaires.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Questionnaires.ListAutoPaging(ctx, didit.QuestionnairesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.questionnaires().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "questionnaires->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.questionnaires.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Questionnaires.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] }, @@ -18011,14 +19375,39 @@ "source": "curl -X POST 'https://verification.didit.me/v3/questionnaires/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"title\": \"Customer Onboarding\",\n \"default_language\": \"en\",\n \"languages\": [\"en\"],\n \"form_elements\": [\n {\n \"id\": \"occupation\",\n \"element_type\": \"short_text\",\n \"label\": {\"en\": \"What is your occupation?\"},\n \"is_required\": true\n }\n ]\n }'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\npayload = {\n \"title\": \"Customer Onboarding\",\n \"default_language\": \"en\",\n \"languages\": [\"en\"],\n \"form_elements\": [\n {\n \"id\": \"occupation\",\n \"element_type\": \"short_text\",\n \"label\": {\"en\": \"What is your occupation?\"},\n \"is_required\": True,\n },\n ],\n}\nresp = requests.post(\n \"https://verification.didit.me/v3/questionnaires/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json=payload,\n timeout=10,\n)\nresp.raise_for_status()\nquestionnaire = resp.json()\nprint(\"Questionnaire id:\", questionnaire[\"questionnaire_id\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.questionnaires.create(\n title=\"Customer Onboarding\",\n description=\"Additional information needed for verification\",\n languages=[\"en\"],\n default_language=\"en\",\n is_active=True,\n form_elements=[{\n \"id\": \"occupation\",\n \"element_type\": \"short_text\",\n \"label\": {\"en\": \"What is your occupation?\"},\n \"placeholder\": {\"en\": \"Software engineer\"},\n \"is_required\": True,\n }, {\n \"id\": \"source_of_funds\",\n \"element_type\": \"multiple_choice\",\n \"label\": {\"en\": \"Source of funds\"},\n \"is_required\": True,\n \"options\": [{\n \"value\": \"employment\",\n \"label\": {\"en\": \"Employment\"},\n }, {\n \"value\": \"business\",\n \"label\": {\"en\": \"Business\"},\n }, {\n \"value\": \"investments\",\n \"label\": {\"en\": \"Investments\"},\n }, {\n \"value\": \"other\",\n \"label\": {\"en\": \"Other\"},\n }],\n }],\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(\"https://verification.didit.me/v3/questionnaires/\", {\n method: \"POST\",\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n title: \"Customer Onboarding\",\n default_language: \"en\",\n languages: [\"en\"],\n form_elements: [\n {\n id: \"occupation\",\n element_type: \"short_text\",\n label: { en: \"What is your occupation?\" },\n is_required: true,\n },\n ],\n }),\n});\nif (!res.ok) throw new Error(`Didit ${res.status}: ${await res.text()}`);\nconst questionnaire = await res.json();\nconsole.log(\"Questionnaire id:\", questionnaire.questionnaire_id);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.questionnaires.create({\n title: \"Customer Onboarding\",\n description: \"Additional information needed for verification\",\n languages: [\"en\"],\n default_language: \"en\",\n is_active: true,\n form_elements: [{\n id: \"occupation\",\n element_type: \"short_text\",\n label: { en: \"What is your occupation?\" },\n placeholder: { en: \"Software engineer\" },\n is_required: true,\n }, {\n id: \"source_of_funds\",\n element_type: \"multiple_choice\",\n label: { en: \"Source of funds\" },\n is_required: true,\n options: [{\n value: \"employment\",\n label: { en: \"Employment\" },\n }, {\n value: \"business\",\n label: { en: \"Business\" },\n }, {\n value: \"investments\",\n label: { en: \"Investments\" },\n }, {\n value: \"other\",\n label: { en: \"Other\" },\n }],\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Create(ctx, didit.SimpleQuestionnaireRequest{\n\tTitle: \"Customer Onboarding\",\n\tDescription: didit.String(\"Additional information needed for verification\"),\n\tLanguages: []string{\"en\"},\n\tDefaultLanguage: didit.String(\"en\"),\n\tIsActive: didit.Bool(true),\n\tFormElements: []didit.SimpleQuestionnaireElement{{\n\t\tID: didit.String(\"occupation\"),\n\t\tElementType: \"short_text\",\n\t\tLabel: map[string]string{\"en\": \"What is your occupation?\"},\n\t\tPlaceholder: didit.Some(map[string]string{\"en\": \"Software engineer\"}),\n\t\tIsRequired: didit.Bool(true),\n\t}, {\n\t\tID: didit.String(\"source_of_funds\"),\n\t\tElementType: \"multiple_choice\",\n\t\tLabel: map[string]string{\"en\": \"Source of funds\"},\n\t\tIsRequired: didit.Bool(true),\n\t\tOptions: didit.Some([]didit.SimpleQuestionnaireElementOptions{{\n\t\t\tValue: didit.String(\"employment\"),\n\t\t\tLabel: map[string]string{\"en\": \"Employment\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"business\"),\n\t\t\tLabel: map[string]string{\"en\": \"Business\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"investments\"),\n\t\t\tLabel: map[string]string{\"en\": \"Investments\"},\n\t\t}, {\n\t\t\tValue: didit.String(\"other\"),\n\t\t\tLabel: map[string]string{\"en\": \"Other\"},\n\t\t}}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SimpleQuestionnaireElement;\nimport me.didit.types.SimpleQuestionnaireRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.questionnaires().create(SimpleQuestionnaireRequest.builder()\n .title(\"Customer Onboarding\")\n .description(\"Additional information needed for verification\")\n .languages(List.of(\"en\"))\n .defaultLanguage(\"en\")\n .isActive(true)\n .formElements(List.of(\n SimpleQuestionnaireElement.builder()\n .id(\"occupation\")\n .elementType(SimpleQuestionnaireElement.ElementType.of(\"short_text\"))\n .label(Map.of(\"en\", \"What is your occupation?\"))\n .placeholder(Map.of(\"en\", \"Software engineer\"))\n .isRequired(true)\n .build(),\n SimpleQuestionnaireElement.builder()\n .id(\"source_of_funds\")\n .elementType(SimpleQuestionnaireElement.ElementType.of(\"multiple_choice\"))\n .label(Map.of(\"en\", \"Source of funds\"))\n .isRequired(true)\n .options(List.of(\n SimpleQuestionnaireElement.Options.builder()\n .value(\"employment\")\n .label(Map.of(\"en\", \"Employment\"))\n .build(),\n SimpleQuestionnaireElement.Options.builder()\n .value(\"business\")\n .label(Map.of(\"en\", \"Business\"))\n .build(),\n SimpleQuestionnaireElement.Options.builder()\n .value(\"investments\")\n .label(Map.of(\"en\", \"Investments\"))\n .build(),\n SimpleQuestionnaireElement.Options.builder()\n .value(\"other\")\n .label(Map.of(\"en\", \"Other\"))\n .build()))\n .build()))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "questionnaires->create([\n 'title' => 'Customer Onboarding',\n 'description' => 'Additional information needed for verification',\n 'languages' => ['en'],\n 'default_language' => 'en',\n 'is_active' => true,\n 'form_elements' => [[\n 'id' => 'occupation',\n 'element_type' => 'short_text',\n 'label' => ['en' => 'What is your occupation?'],\n 'placeholder' => ['en' => 'Software engineer'],\n 'is_required' => true,\n ], [\n 'id' => 'source_of_funds',\n 'element_type' => 'multiple_choice',\n 'label' => ['en' => 'Source of funds'],\n 'is_required' => true,\n 'options' => [[\n 'value' => 'employment',\n 'label' => ['en' => 'Employment'],\n ], [\n 'value' => 'business',\n 'label' => ['en' => 'Business'],\n ], [\n 'value' => 'investments',\n 'label' => ['en' => 'Investments'],\n ], [\n 'value' => 'other',\n 'label' => ['en' => 'Other'],\n ]],\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.questionnaires.create(\n title: \"Customer Onboarding\",\n description: \"Additional information needed for verification\",\n languages: [\"en\"],\n default_language: \"en\",\n is_active: true,\n form_elements: [{\n id: \"occupation\",\n element_type: \"short_text\",\n label: { en: \"What is your occupation?\" },\n placeholder: { en: \"Software engineer\" },\n is_required: true,\n }, {\n id: \"source_of_funds\",\n element_type: \"multiple_choice\",\n label: { en: \"Source of funds\" },\n is_required: true,\n options: [{\n value: \"employment\",\n label: { en: \"Employment\" },\n }, {\n value: \"business\",\n label: { en: \"Business\" },\n }, {\n value: \"investments\",\n label: { en: \"Investments\" },\n }, {\n value: \"other\",\n label: { en: \"Other\" },\n }],\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Questionnaires.CreateAsync(new SimpleQuestionnaireRequest\n{\n Title = \"Customer Onboarding\",\n Description = \"Additional information needed for verification\",\n Languages = new string[] { \"en\" },\n DefaultLanguage = \"en\",\n IsActive = true,\n FormElements = new SimpleQuestionnaireElement[]\n {\n new()\n {\n Id = \"occupation\",\n ElementType = \"short_text\",\n Label = new Dictionary { [\"en\"] = \"What is your occupation?\" },\n Placeholder = new Dictionary { [\"en\"] = \"Software engineer\" },\n IsRequired = true,\n },\n new()\n {\n Id = \"source_of_funds\",\n ElementType = \"multiple_choice\",\n Label = new Dictionary { [\"en\"] = \"Source of funds\" },\n IsRequired = true,\n Options = new SimpleQuestionnaireElementOptions[]\n {\n new()\n {\n Value = \"employment\",\n Label = new Dictionary { [\"en\"] = \"Employment\" },\n },\n new()\n {\n Value = \"business\",\n Label = new Dictionary { [\"en\"] = \"Business\" },\n },\n new()\n {\n Value = \"investments\",\n Label = new Dictionary { [\"en\"] = \"Investments\" },\n },\n new()\n {\n Value = \"other\",\n Label = new Dictionary { [\"en\"] = \"Other\" },\n },\n },\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -18179,14 +19568,39 @@ "source": "curl -X GET 'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/' \\\n -H 'x-api-key: YOUR_API_KEY'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.get(\n f\"https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n timeout=10,\n)\nresp.raise_for_status()\nquestionnaire = resp.json()\nprint(questionnaire[\"title\"], questionnaire[\"status\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.questionnaires.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(`https://verification.didit.me/v3/questionnaires/${questionnaireUuid}/`, {\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n});\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst questionnaire = await res.json();\nconsole.log(questionnaire.title, questionnaire.status);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.questionnaires.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.questionnaires().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "questionnaires->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.questionnaires.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Questionnaires.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -18322,14 +19736,39 @@ "source": "curl -X PATCH 'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"title\": \"Updated Customer Onboarding\"}'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.patch(\n f\"https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json={\"title\": \"Updated Customer Onboarding\"},\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json()[\"questionnaire_id\"], resp.json()[\"status\"])" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.questionnaires.update(\n \"11111111-2222-3333-4444-555555555555\",\n title=\"Updated Customer Onboarding\",\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(`https://verification.didit.me/v3/questionnaires/${questionnaireUuid}/`, {\n method: \"PATCH\",\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({ title: \"Updated Customer Onboarding\" }),\n});\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst q = await res.json();\nconsole.log(q.questionnaire_id, q.status);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.questionnaires.update(\"11111111-2222-3333-4444-555555555555\", {\n title: \"Updated Customer Onboarding\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Questionnaires.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SimpleQuestionnaireUpdateRequest{\n\tTitle: didit.String(\"Updated Customer Onboarding\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SimpleQuestionnaireUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.questionnaires().update(\"11111111-2222-3333-4444-555555555555\", SimpleQuestionnaireUpdateRequest.builder()\n .title(\"Updated Customer Onboarding\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "questionnaires->update('11111111-2222-3333-4444-555555555555', [\n 'title' => 'Updated Customer Onboarding',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.questionnaires.update(\n \"11111111-2222-3333-4444-555555555555\",\n title: \"Updated Customer Onboarding\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Questionnaires.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new SimpleQuestionnaireUpdateRequest\n{\n Title = \"Updated Customer Onboarding\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -18409,14 +19848,39 @@ "source": "curl -X DELETE 'https://verification.didit.me/v3/questionnaires/11111111-2222-3333-4444-555555555555/' \\\n -H 'x-api-key: YOUR_API_KEY'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import requests\n\nresp = requests.delete(\n f\"https://verification.didit.me/v3/questionnaires/{questionnaire_uuid}/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n timeout=10,\n)\nresp.raise_for_status() # raises on 4xx/5xx; 204 is success" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.questionnaires.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const res = await fetch(`https://verification.didit.me/v3/questionnaires/${questionnaireUuid}/`, {\n method: \"DELETE\",\n headers: { 'x-api-key': 'YOUR_API_KEY' },\n});\nif (res.status !== 204) throw new Error(`Didit ${res.status}`);" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.questionnaires.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Questionnaires.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.questionnaires().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "questionnaires->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.questionnaires.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Questionnaires.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ] } @@ -18442,7 +19906,8 @@ "schema": { "type": "integer", "default": 50, - "minimum": 1 + "minimum": 1, + "maximum": 1000000 }, "description": "Page size. Defaults to 50 when omitted. There is no enforced maximum, but keep pages small for latency." }, @@ -18452,7 +19917,8 @@ "schema": { "type": "integer", "default": 0, - "minimum": 0 + "minimum": 0, + "maximum": 1000000 }, "description": "Zero-based offset of the first record to return. Prefer following the `next` URL from the previous page over computing this by hand." } @@ -18466,12 +19932,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/users/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n params={'limit': 50},\n)\nresp.raise_for_status()\npage = resp.json()\nfor user in page['results']:\n print(user['vendor_data'], user['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.users.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const url = new URL('https://verification.didit.me/v3/users/');\nurl.searchParams.set('limit', '50');\n\nconst page = await fetch(url, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n}).then((r) => r.json());\n\nconsole.log(page.count, page.results.length);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.users.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Users.ListAutoPaging(ctx, didit.UsersListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.users().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.users.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Users.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -18622,7 +20113,7 @@ } }, "403": { - "description": "Invalid or revoked API key, or the key cannot list users for this application. Note: on this endpoint an *invalid* key returns `403` (not `401`).", + "description": "The key cannot list users for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -18692,12 +20183,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/users/user-abc-123/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n)\nresp.raise_for_status()\nuser = resp.json()\nprint(user['didit_internal_id'], user['status'], user['session_count'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.retrieve(\n \"user-abc-123\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const vendorData = encodeURIComponent('user-abc-123');\nconst user = await fetch(\n `https://verification.didit.me/v3/users/${vendorData}/`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n).then((r) => r.json());\n\nconsole.log(user.didit_internal_id, user.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.retrieve(\"user-abc-123\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Retrieve(ctx, \"user-abc-123\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().retrieve(\"user-abc-123\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->retrieve('user-abc-123');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.retrieve(\"user-abc-123\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.RetrieveAsync(\"user-abc-123\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -18820,7 +20336,7 @@ } }, "403": { - "description": "Invalid or revoked API key, or the key cannot read this application's users. Note: on this endpoint an *invalid* key returns `403` (not `401`).", + "description": "Invalid or revoked API key, or the key cannot read this application's users. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -18902,12 +20418,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/users/user-abc-123/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'display_name': 'Jane S.', 'status': 'FLAGGED'},\n)\nresp.raise_for_status()\nprint(resp.json()['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.update(\n \"user-abc-123\",\n display_name=\"Jane S.\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/users/user-abc-123/', {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ display_name: 'Jane S.', status: 'FLAGGED' }),\n});\nconst user = await resp.json();\nconsole.log(user.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.update(\"user-abc-123\", {\n display_name: \"Jane S.\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Update(ctx, \"user-abc-123\", didit.UsersUpdateParams{\n\tDisplayName: didit.String(\"Jane S.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.UsersUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().update(\"user-abc-123\", UsersUpdateParams.builder()\n .displayName(\"Jane S.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->update('user-abc-123', [\n 'display_name' => 'Jane S.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.update(\n \"user-abc-123\",\n display_name: \"Jane S.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.UpdateAsync(\"user-abc-123\", new UsersUpdateParams\n{\n DisplayName = \"Jane S.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -19043,7 +20584,7 @@ } }, "403": { - "description": "Invalid or revoked API key, or the key cannot update users for this application. Note: on this endpoint an *invalid* key returns `403` (not `401`).", + "description": "The key cannot update users for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -19391,12 +20932,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.get(\n \"https://verification.didit.me/v3/users/user-abc-123/generate-pdf/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n stream=True,\n timeout=120,\n)\nresponse.raise_for_status()\nwith open(\"user-history.pdf\", \"wb\") as fh:\n for chunk in response.iter_content(chunk_size=8192):\n fh.write(chunk)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.users.generate_pdf(\n \"user-abc-123\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { writeFile } from 'node:fs/promises';\n\nconst vendorData = encodeURIComponent('user-abc-123');\nconst response = await fetch(\n `https://verification.didit.me/v3/users/${vendorData}/generate-pdf/`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!response.ok) throw new Error(`PDF generation failed: HTTP ${response.status}`);\nawait writeFile('user-history.pdf', Buffer.from(await response.arrayBuffer()));" + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.users.generatePdf(\"user-abc-123\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Users.GeneratePDF(ctx, \"user-abc-123\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.users().generatePdf(\"user-abc-123\")\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->generatePdf('user-abc-123');\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.users.generate_pdf(\"user-abc-123\")\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Users.GeneratePdfAsync(\"user-abc-123\");\nawait content.SaveToAsync(\"download.pdf\");" } ] } @@ -19404,7 +20970,7 @@ "/v3/users/delete/": { "post": { "summary": "Batch delete users", - "description": "**Permanently delete** users: the user records are removed permanently. For everyday blocking prefer [Update User Status](#patch-/v3/users/-vendor_data-/update-status/) with `BLOCKED`. Select users with `vendor_data_list`, with `didit_internal_id_list`, or with both at once; or pass `delete_all: true`. This endpoint never narrows `delete_all` with filters. The Console's People filters are refused with a `400` (see the `400` response), so a narrowed intent does not turn into a full wipe. Two exceptions: `filter_has_approved_sessions` and `filter_has_declined_sessions` are not refused and not applied, so with `delete_all: true` they still delete every user; do not send them.\n\n**Biometric templates:** every image-free biometric template retained for these users after session deletion (see `/v3/biometric-templates/`) is purged before the user is deleted, so the person stops matching in duplicate detection and Face Search. If a template cannot be purged because a biometric store is unavailable, the call returns `503`, no user in the request is deleted, and repeating the request finishes the job.\n\n**Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.", + "description": "**Permanently delete** users: the user records are removed permanently. For everyday blocking prefer [Update User Status](#patch-/v3/users/-vendor_data-/update-status/) with `BLOCKED`. Select users with `vendor_data_list`, with `didit_internal_id_list`, or with both at once; or pass `delete_all: true`. This endpoint never narrows `delete_all` with filters. The Console's People filters are refused with a `400` (see the `400` response), so a narrowed intent does not turn into a full wipe. Two exceptions: `filter_has_approved_sessions` and `filter_has_declined_sessions` are not refused and not applied, so with `delete_all: true` they still delete every user; do not send them.\n\n**Biometric templates:** unless you set `retain_face_embeddings` to `true`, every image-free biometric template retained for these users after session deletion (see `/v3/biometric-templates/`) is purged before the user is deleted, so the person stops matching in duplicate detection and Face Search. With `retain_face_embeddings: true` and `face_retention_days`, you choose to keep one image-free biometric template per person for that many days, and nothing else about the person is kept. If a template cannot be purged because a biometric store is unavailable, the call returns `503`, no user in the request is deleted, and repeating the request finishes the job.\n\n**Filed regulatory reports:** if the selected data is in a finalized regulatory report, the whole request is refused with `409` and nothing is deleted. The body uses `code: in_filed_report` and names each report with `uuid`, `report_number`, `report_type` and `case_uuid`. Delete the reports, then repeat the request.", "operationId": "batch_delete_users", "x-didit-sdk": { "resource": "users", @@ -19442,6 +21008,18 @@ "type": "boolean", "default": false, "description": "If `true`, deletes every user in the application." + }, + "retain_face_embeddings": { + "type": "boolean", + "default": false, + "description": "Your explicit choice to keep one image-free biometric template of each deleted person for duplicate detection, for `face_retention_days`. Everything else about the person is deleted. Omit it, or send `false`, to delete the templates with the users. When `true`, `face_retention_days` is required." + }, + "face_retention_days": { + "type": "integer", + "minimum": 1, + "maximum": 3650, + "description": "Number of days the image-free biometric template is kept when `retain_face_embeddings` is `true`. Required with it, and rejected without it with a `400` on `face_retention_days`.", + "example": 365 } } }, @@ -19468,6 +21046,16 @@ "value": { "delete_all": true } + }, + "Keep face templates": { + "summary": "Delete users and keep anonymous face templates for 365 days", + "value": { + "vendor_data_list": [ + "user-123" + ], + "retain_face_embeddings": true, + "face_retention_days": 365 + } } } } @@ -19482,12 +21070,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/users/delete/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'vendor_data_list': ['user-123', 'user-456']},\n)\nresp.raise_for_status()\nprint('deleted', resp.json()['deleted'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.batch_delete(\n vendor_data_list=[\"user-123\", \"user-456\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/users/delete/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ vendor_data_list: ['user-123', 'user-456'] }),\n});\nconst body = await resp.json();\nconsole.log('deleted', body.deleted);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.batchDelete({\n vendor_data_list: [\"user-123\", \"user-456\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.BatchDelete(ctx, didit.UsersBatchDeleteParams{\n\tVendorDataList: didit.Some([]string{\"user-123\", \"user-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.UsersBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().batchDelete(UsersBatchDeleteParams.builder()\n .vendorDataList(List.of(\"user-123\", \"user-456\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->batchDelete([\n 'vendor_data_list' => ['user-123', 'user-456'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.batch_delete(vendor_data_list: [\"user-123\", \"user-456\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.BatchDeleteAsync(new UsersBatchDeleteParams\n{\n VendorDataList = new string[] { \"user-123\", \"user-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -19556,7 +21169,7 @@ } }, "403": { - "description": "Invalid or revoked API key, or the key cannot delete users for this application. Note: on this endpoint an *invalid* key returns `403` (not `401`).", + "description": "Invalid or revoked API key, or the key cannot delete users for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -20138,7 +21751,7 @@ } }, "403": { - "description": "Missing or invalid API key. This API returns `403` for authentication failures — never `401`.", + "description": "Missing API key. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "schema": { @@ -20203,12 +21816,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/sessions/delete/\",\n headers={\n \"x-api-key\": \"YOUR_API_KEY\",\n \"Content-Type\": \"application/json\",\n },\n json={\"session_numbers\": [\"1001\", \"1002\", \"1003\"]},\n)\nresponse.raise_for_status()\nif response.status_code == 202: # more than 20 sessions: poll the job\n job_id = response.json()[\"job_id\"]\nelse: # 200: one result per matched session\n print(response.json()[\"results\"])\n\n# Destructive: delete every KYC session in the application\n# requests.post(\n# \"https://verification.didit.me/v3/sessions/delete/\",\n# headers={\"x-api-key\": \"YOUR_API_KEY\"},\n# json={\"delete_all\": True},\n# )" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.batch_delete(\n session_numbers=[\"1001\", \"1002\", \"1003\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/sessions/delete/',\n {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ session_numbers: ['1001', '1002', '1003'] }),\n },\n);\nif (response.status !== 200 && response.status !== 202) throw new Error(`HTTP ${response.status}`);\nconst body = await response.json();\n// 200: body.results, one per matched session. 202: poll /v3/sessions/delete/${body.job_id}/" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.batchDelete({\n session_numbers: [\"1001\", \"1002\", \"1003\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.BatchDelete(ctx, didit.SessionsBatchDeleteParams{\n\tSessionNumbers: didit.Some([]string{\"1001\", \"1002\", \"1003\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().batchDelete(SessionsBatchDeleteParams.builder()\n .sessionNumbers(List.of(\"1001\", \"1002\", \"1003\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->batchDelete([\n 'session_numbers' => ['1001', '1002', '1003'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.batch_delete(session_numbers: [\"1001\", \"1002\", \"1003\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.BatchDeleteAsync(new SessionsBatchDeleteParams\n{\n SessionNumbers = new string[] { \"1001\", \"1002\", \"1003\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -20253,12 +21891,37 @@ { "lang": "python", "label": "Python", - "source": "import time\nimport requests\n\nurl = 'https://verification.didit.me/v3/sessions/delete/JOB_ID/'\nwhile True:\n job = requests.get(url, headers={'x-api-key': 'YOUR_API_KEY'}).json()\n if job['status'] in ('COMPLETED', 'FAILED'):\n break\n time.sleep(3)\nprint(job['status'], job['outcomes'], job['error'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.retrieve_deletion_job(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const url = 'https://verification.didit.me/v3/sessions/delete/JOB_ID/';\nlet job;\ndo {\n await new Promise((r) => setTimeout(r, 3000));\n job = await (await fetch(url, { headers: { 'x-api-key': 'YOUR_API_KEY' } })).json();\n} while (job.status === 'PENDING' || job.status === 'PROCESSING');\nconsole.log(job.status, job.outcomes, job.error);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.retrieveDeletionJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RetrieveDeletionJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().retrieveDeletionJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->retrieveDeletionJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.retrieve_deletion_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.RetrieveDeletionJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -20335,7 +21998,7 @@ } }, "403": { - "description": "Missing or invalid API key. This API returns `403` for authentication failures, never `401`.", + "description": "Missing API key. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "schema": { @@ -20584,7 +22247,7 @@ } }, "403": { - "description": "Missing, malformed, expired, or revoked `x-api-key`. Authentication is checked before the session lookup, so an invalid key returns `403` even when the session UUID does not exist.", + "description": "Missing, malformed, expired, or revoked `x-api-key`. Authentication is checked before the session lookup, so a missing key returns `403` even when the session UUID does not exist.", "content": { "application/json": { "schema": { @@ -20647,14 +22310,39 @@ "source": "curl -s 'https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/?limit=50' \\\n -H 'x-api-key: YOUR_API_KEY'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import os, requests\n\nsession_id = \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\"\nurl = f\"https://verification.didit.me/v3/sessions/{session_id}/reviews/\"\n\nwhile url: # walk every page of the feed\n resp = requests.get(url, headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]}, timeout=10)\n resp.raise_for_status()\n page = resp.json()\n for entry in page[\"results\"]:\n print(entry[\"created_at\"], entry[\"activity_type\"], entry[\"actor_display\"], entry.get(\"new_status\"))\n url = page[\"next\"]" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.reviews.list(\n \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\",\n):\n print(item)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "const sessionId = \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\";\nconst res = await fetch(\n `https://verification.didit.me/v3/sessions/${sessionId}/reviews/`,\n { headers: { 'x-api-key': 'YOUR_API_KEY' } },\n);\nif (!res.ok) throw new Error(`Didit ${res.status}`);\nconst { count, results } = await res.json();\nconsole.log(`${count} feed entries`);\nfor (const entry of results) {\n console.log(entry.created_at, entry.activity_type, entry.actor_display, entry.new_status ?? \"\");\n}" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.reviews.list(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.Reviews.ListAutoPaging(ctx, \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", didit.SessionsReviewsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().reviews().list(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->reviews->list('8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.reviews.list(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.Reviews.ListAsync(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] }, @@ -20845,7 +22533,7 @@ } }, "403": { - "description": "Missing, malformed, expired, or revoked `x-api-key`. Authentication is checked before the session lookup, so an invalid key returns `403` even when the session UUID does not exist.", + "description": "Missing, malformed, expired, or revoked `x-api-key`. Authentication is checked before the session lookup, so a missing key returns `403` even when the session UUID does not exist.", "content": { "application/json": { "schema": { @@ -20908,14 +22596,39 @@ "source": "# Records an audit-trail note only -- the session's status does NOT change.\ncurl -s -X POST https://verification.didit.me/v3/sessions/8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d/reviews/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"new_status\": \"In Review\",\n \"comment\": \"Flagging for manual document re-check.\"\n }'" }, { - "lang": "Python", - "label": "Python (requests)", - "source": "import os, requests\n\n# Records an audit-trail note only -- the session's status does NOT change.\n# To approve/decline a session use PATCH /v3/session/{session_id}/update-status/.\nsession_id = \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\"\nresp = requests.post(\n f\"https://verification.didit.me/v3/sessions/{session_id}/reviews/\",\n headers={\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Content-Type\": \"application/json\",\n },\n json={\n \"new_status\": \"In Review\",\n \"comment\": \"Flagging for manual document re-check.\",\n },\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json()) # {'user': 'Unknown', 'new_status': 'In Review', ...}" + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.reviews.create(\n \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\",\n new_status=\"In Review\",\n comment=\"Flagging for manual document re-check.\",\n)\nprint(result)" }, { - "lang": "JavaScript", - "label": "Node.js (fetch)", - "source": "// Records an audit-trail note only -- the session's status does NOT change.\n// To approve/decline a session use PATCH /v3/session/{session_id}/update-status/.\nconst sessionId = \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\";\nconst res = await fetch(\n `https://verification.didit.me/v3/sessions/${sessionId}/reviews/`,\n {\n method: \"POST\",\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n new_status: \"In Review\",\n comment: \"Flagging for manual document re-check.\",\n }),\n },\n);\nif (!res.ok) throw new Error(`Didit ${res.status}: ${await res.text()}`);\nconsole.log(await res.json()); // { user: 'Unknown', new_status: 'In Review', ... }" + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.reviews.create(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", {\n new_status: \"In Review\",\n comment: \"Flagging for manual document re-check.\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Reviews.Create(ctx, \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", didit.SessionsReviewsCreateParams{\n\tNewStatus: didit.Some(didit.SessionsReviewsCreateParamsNewStatus(\"In Review\")),\n\tComment: didit.String(\"Flagging for manual document re-check.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsReviewsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().reviews().create(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", SessionsReviewsCreateParams.builder()\n .newStatus(SessionsReviewsCreateParams.NewStatus.of(\"In Review\"))\n .comment(\"Flagging for manual document re-check.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->reviews->create('8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d', [\n 'new_status' => 'In Review',\n 'comment' => 'Flagging for manual document re-check.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.reviews.create(\n \"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\",\n new_status: \"In Review\",\n comment: \"Flagging for manual document re-check.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Reviews.CreateAsync(\"8c2f3a14-7e9b-4d23-9e83-3f7d5e8a1c6d\", new SessionsReviewsCreateParams\n{\n NewStatus = new SessionsReviewsCreateParamsNewStatus(\"In Review\"),\n Comment = \"Flagging for manual document re-check.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -20943,12 +22656,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nfrom decimal import Decimal\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/billing/balance/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\ndata = resp.json()\nbalance = Decimal(data['balance'])\nif balance < Decimal('50'):\n print(f'Low balance: ${balance} - top up before launching new sessions.')\nelse:\n print(f'Balance OK: ${balance}')" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.billing.retrieve_balance()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/billing/balance/', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Billing balance failed: ${resp.status}`);\nconst { balance, auto_refill_enabled, auto_refill_threshold } = await resp.json();\nconsole.log({ balance, auto_refill_enabled, auto_refill_threshold });" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.billing.retrieveBalance();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Billing.RetrieveBalance(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.billing().retrieveBalance();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "billing->retrieveBalance();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.billing.retrieve_balance\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Billing.RetrieveBalanceAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -21005,7 +22743,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot read billing data for this organization. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot read billing data for this organization. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -21108,12 +22846,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/billing/top-up/',\n headers={\n 'x-api-key': os.environ['DIDIT_API_KEY'],\n 'Content-Type': 'application/json',\n },\n json={\n 'amount_in_dollars': 500,\n 'success_url': 'https://yourapp.com/billing/success',\n 'cancel_url': 'https://yourapp.com/billing/cancel',\n },\n timeout=10,\n)\nresp.raise_for_status()\nsession = resp.json()\nprint('Redirect customer to:', session['checkout_session_url'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.billing.top_up(\n amount_in_dollars=50.0,\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/billing/top-up/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n amount_in_dollars: 500,\n success_url: 'https://yourapp.com/billing/success',\n cancel_url: 'https://yourapp.com/billing/cancel',\n }),\n});\nif (!resp.ok) throw new Error(`Top-up failed: ${resp.status}`);\nconst { checkout_session_url } = await resp.json();\nwindow.location.assign(checkout_session_url);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.billing.topUp({\n amount_in_dollars: 50.0,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Billing.TopUp(ctx, didit.BillingTopUpParams{\n\tAmountInDollars: 50.0,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BillingTopUpParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.billing().topUp(BillingTopUpParams.builder()\n .amountInDollars(50.0)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "billing->topUp([\n 'amount_in_dollars' => 50.0,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.billing.top_up(amount_in_dollars: 50.0)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Billing.TopUpAsync(new BillingTopUpParams\n{\n AmountInDollars = 50.0,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -21185,7 +22948,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot create top-up sessions for this organization. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot create top-up sessions for this organization. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -21243,12 +23006,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/webhook/destinations/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nfor dest in resp.json():\n print(f\"{dest['label']:30s} {dest['url']:50s} {dest['health_status']}\")" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.list()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/webhook/destinations/', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nconst destinations = await resp.json();\nfor (const d of destinations) {\n console.log(d.label, d.url, d.health_status, `${d.error_rate_percentage}% errors`);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.list();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.List(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().list();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->list();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.webhooks.destinations.list.each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.ListAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -21771,7 +23559,7 @@ } }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -21827,12 +23615,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/webhook/destinations/',\n headers={\n 'x-api-key': os.environ['DIDIT_API_KEY'],\n 'Content-Type': 'application/json',\n },\n json={\n 'label': 'Production session webhooks',\n 'url': 'https://yourapp.com/webhooks/didit',\n 'webhook_version': 'v3',\n 'subscribed_events': ['status.updated', 'data.updated'],\n },\n timeout=10,\n)\nresp.raise_for_status()\ndestination = resp.json()\n# Store secret_shared_key in your secret manager.\nprint('Destination UUID:', destination['uuid'])\nprint('Signing secret:', destination['secret_shared_key'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.create(\n label=\"Production session webhooks\",\n url=\"https://yourapp.com/webhooks/didit\",\n webhook_version=\"v3\",\n subscribed_events=[\"status.updated\", \"data.updated\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/webhook/destinations/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n label: 'Production session webhooks',\n url: 'https://yourapp.com/webhooks/didit',\n webhook_version: 'v3',\n subscribed_events: ['status.updated', 'data.updated'],\n }),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst destination = await resp.json();\nconsole.log('Store this secret securely:', destination.secret_shared_key);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.create({\n label: \"Production session webhooks\",\n url: \"https://yourapp.com/webhooks/didit\",\n webhook_version: \"v3\",\n subscribed_events: [\"status.updated\", \"data.updated\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Create(ctx, didit.WebhooksDestinationsCreateParams{\n\tLabel: \"Production session webhooks\",\n\tURL: \"https://yourapp.com/webhooks/didit\",\n\tWebhookVersion: didit.Some(didit.WebhooksDestinationsCreateParamsWebhookVersion(\"v3\")),\n\tSubscribedEvents: didit.Some([]didit.WebhookEvent{didit.WebhookEvent(\"status.updated\"), didit.WebhookEvent(\"data.updated\")}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.WebhookEvent;\nimport me.didit.types.WebhooksDestinationsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().create(WebhooksDestinationsCreateParams.builder()\n .label(\"Production session webhooks\")\n .url(\"https://yourapp.com/webhooks/didit\")\n .webhookVersion(WebhooksDestinationsCreateParams.WebhookVersion.of(\"v3\"))\n .subscribedEvents(List.of(WebhookEvent.of(\"status.updated\"), WebhookEvent.of(\"data.updated\")))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->create([\n 'label' => 'Production session webhooks',\n 'url' => 'https://yourapp.com/webhooks/didit',\n 'webhook_version' => 'v3',\n 'subscribed_events' => ['status.updated', 'data.updated'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.create(\n label: \"Production session webhooks\",\n url: \"https://yourapp.com/webhooks/didit\",\n webhook_version: \"v3\",\n subscribed_events: [\"status.updated\", \"data.updated\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.CreateAsync(new WebhooksDestinationsCreateParams\n{\n Label = \"Production session webhooks\",\n Url = \"https://yourapp.com/webhooks/didit\",\n WebhookVersion = new WebhooksDestinationsCreateParamsWebhookVersion(\"v3\"),\n SubscribedEvents = new WebhookEvent[] { \"status.updated\", \"data.updated\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -21854,7 +23667,8 @@ "url": { "type": "string", "format": "uri", - "description": "HTTPS URL that will receive `POST` requests. Must be unique among the application's destinations. Use a stable, hardened endpoint: Didit retries failed deliveries on a backoff schedule." + "description": "HTTPS URL that will receive `POST` requests. Must be unique among the application's destinations. Use a stable, hardened endpoint: Didit retries failed deliveries on a backoff schedule.", + "maxLength": 2000 }, "enabled": { "type": "boolean", @@ -22132,7 +23946,7 @@ } }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -22203,12 +24017,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nuuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/webhook/destinations/{uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const uuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/webhook/destinations/${uuid}/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Lookup failed: ${resp.status}`);\nconst destination = await resp.json();\nconsole.log(destination);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -22388,7 +24227,7 @@ } }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -22531,12 +24370,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nuuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.patch(\n f'https://verification.didit.me/v3/webhook/destinations/{uuid}/',\n headers={\n 'x-api-key': os.environ['DIDIT_API_KEY'],\n 'Content-Type': 'application/json',\n },\n json={'enabled': False},\n timeout=10,\n)\nresp.raise_for_status()\nprint('Paused destination:', resp.json()['label'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.update(\n \"11111111-2222-3333-4444-555555555555\",\n enabled=False,\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const uuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/webhook/destinations/${uuid}/`, {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ enabled: false }),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconsole.log(await resp.json());" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.update(\"11111111-2222-3333-4444-555555555555\", {\n enabled: false,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsUpdateParams{\n\tEnabled: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.WebhooksDestinationsUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().update(\"11111111-2222-3333-4444-555555555555\", WebhooksDestinationsUpdateParams.builder()\n .enabled(false)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->update('11111111-2222-3333-4444-555555555555', [\n 'enabled' => false,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.update(\n \"11111111-2222-3333-4444-555555555555\",\n enabled: false\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new WebhooksDestinationsUpdateParams\n{\n Enabled = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -22738,7 +24602,7 @@ } }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -22821,12 +24685,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nuuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.delete(\n f'https://verification.didit.me/v3/webhook/destinations/{uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nassert resp.status_code == 204" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.webhooks.destinations.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const uuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/webhook/destinations/${uuid}/`, {\n method: 'DELETE',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (resp.status !== 204) throw new Error(`Delete failed: ${resp.status}`);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.webhooks.destinations.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Webhooks.Destinations.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.webhooks().destinations().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.webhooks.destinations.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Webhooks.Destinations.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ], "responses": { @@ -22834,7 +24723,7 @@ "description": "Destination, signing secret and delivery log deleted permanently. No response body." }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -22909,8 +24798,7 @@ "schema": { "type": "object", "required": [ - "wallet_address", - "blockchain" + "wallet_address" ], "properties": { "wallet_address": { @@ -22920,7 +24808,7 @@ }, "blockchain": { "type": "string", - "description": "Network identifier. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), and ARB (Arbitrum One). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: `currency`.", + "description": "Optional network identifier. When omitted, the network is read from the address format: `bc1`, `1` and `3` addresses are Bitcoin (BTC), `T` addresses are Tron (TRX) and base58 public keys are Solana (SOL). A `0x` address is valid on every EVM network, so omitting `blockchain` for it answers 422 with the candidate networks in `candidate_chains`. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: `currency`.", "enum": [ "BTC", "LIGHTNING", @@ -22938,6 +24826,10 @@ "BASE", "OP", "ARB", + "AVAX", + "ADA", + "XLM", + "HBAR", "CELO", "MODE", "PLUME" @@ -22955,6 +24847,10 @@ ] } } + }, + "example": { + "wallet_address": "0x94f1b9b64e2932f6a2db338f616844400cd58e8a", + "blockchain": "ETH" } } } @@ -22968,12 +24864,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/wallet-screening/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'wallet_address': '0x94f1b9b64e2932f6a2db338f616844400cd58e8a',\n 'blockchain': 'ETH',\n },\n timeout=20,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result['risk_score'], result['severity'], result['sanctions_hit'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.wallet_screening.screen(\n wallet_address=\"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n blockchain=\"ETH\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const result = await fetch('https://verification.didit.me/v3/wallet-screening/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n wallet_address: '0x94f1b9b64e2932f6a2db338f616844400cd58e8a',\n blockchain: 'ETH',\n }),\n}).then((r) => r.json());\nconsole.log(result.risk_score, result.severity, result.sanctions_hit);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.walletScreening.screen({\n wallet_address: \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n blockchain: \"ETH\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.WalletScreening.Screen(ctx, didit.WalletScreeningScreenParams{\n\tWalletAddress: \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n\tBlockchain: didit.Some(didit.WalletScreeningScreenParamsBlockchain(\"ETH\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.WalletScreeningScreenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.walletScreening().screen(WalletScreeningScreenParams.builder()\n .walletAddress(\"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\")\n .blockchain(WalletScreeningScreenParams.Blockchain.of(\"ETH\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "walletScreening->screen([\n 'wallet_address' => '0x94f1b9b64e2932f6a2db338f616844400cd58e8a',\n 'blockchain' => 'ETH',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.wallet_screening.screen(\n wallet_address: \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n blockchain: \"ETH\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.WalletScreening.ScreenAsync(new WalletScreeningScreenParams\n{\n WalletAddress = \"0x94f1b9b64e2932f6a2db338f616844400cd58e8a\",\n Blockchain = new WalletScreeningScreenParamsBlockchain(\"ETH\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -23163,7 +25084,7 @@ } }, "400": { - "description": "Validation error — malformed wallet address, missing `wallet_address`, unsupported `blockchain`, or LIGHTNING without an Elliptic or Chainalysis BYOK Marketplace connection." + "description": "Validation error — malformed wallet address, missing `wallet_address`, unsupported `blockchain`, `blockchain` omitted for an address whose format names no network, or LIGHTNING without an Elliptic or Chainalysis BYOK Marketplace connection." }, "401": { "description": "Missing or invalid `x-api-key`." @@ -23171,6 +25092,44 @@ "409": { "description": "No AML provider is configured for the application, or the configured provider does not support wallet screening yet. Configure transaction monitoring first." }, + "422": { + "description": "`blockchain` omitted for a `0x` address, which every EVM network shares. Nothing is screened or billed; resend with `blockchain` set to one of `candidate_chains`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "blockchain": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "A 0x address is valid on every EVM chain. Send blockchain as one of: ETH, BNB, MATIC, BASE, ARB, OP, CELO, MODE, PLUME." + ] + }, + "candidate_chains": { + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "ETH", + "BNB", + "MATIC", + "BASE", + "ARB", + "OP", + "CELO", + "MODE", + "PLUME" + ] + } + } + } + } + } + }, "502": { "description": "The AML provider could not complete the screening. Retry later." } @@ -23224,12 +25183,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\n# `result` is the dict returned by POST /v3/wallet-screening/, unmodified\nresponse = requests.post(\n 'https://verification.didit.me/v3/wallet-screening/pdf/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n json=result,\n timeout=30,\n)\nresponse.raise_for_status()\nwith open('wallet_screening_report.pdf', 'wb') as fh:\n fh.write(response.content)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.wallet_screening.screen_pdf(\n provider=\"your-provider\",\n screening_type=\"WALLET_SCREENING\",\n risk_score=1,\n severity=\"UNKNOWN\",\n status=\"SCREENED\",\n summary=\"your-summary\",\n wallet_address=\"your-wallet-address\",\n blockchain=\"your-blockchain\",\n source_of_funds=[{}],\n destination_of_funds=[{}],\n counterparty_connections=[{}],\n sanctions_hit=True,\n dominant_risk_category=\"your-dominant-risk-category\",\n report_signature=\"your-report-signature\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "// `result` is the object returned by POST /v3/wallet-screening/, unmodified\nconst response = await fetch('https://verification.didit.me/v3/wallet-screening/pdf/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(result),\n});\nif (!response.ok) throw new Error(`PDF generation failed: HTTP ${response.status}`);\nconst pdfBuffer = Buffer.from(await response.arrayBuffer());" + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.walletScreening.screenPdf({\n provider: \"your-provider\",\n screening_type: \"WALLET_SCREENING\",\n risk_score: 1,\n severity: \"UNKNOWN\",\n status: \"SCREENED\",\n summary: \"your-summary\",\n wallet_address: \"your-wallet-address\",\n blockchain: \"your-blockchain\",\n source_of_funds: [{}],\n destination_of_funds: [{}],\n counterparty_connections: [{}],\n sanctions_hit: true,\n dominant_risk_category: \"your-dominant-risk-category\",\n report_signature: \"your-report-signature\",\n});\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.WalletScreening.ScreenPDF(ctx, didit.WalletScreeningResultParam{\n\tProvider: \"your-provider\",\n\tScreeningType: \"WALLET_SCREENING\",\n\tRiskScore: 1,\n\tSeverity: \"UNKNOWN\",\n\tStatus: \"SCREENED\",\n\tSummary: \"your-summary\",\n\tWalletAddress: \"your-wallet-address\",\n\tBlockchain: \"your-blockchain\",\n\tSourceOfFunds: []didit.WalletScreeningResultParamSourceOfFunds{{}},\n\tDestinationOfFunds: []didit.WalletScreeningResultParamDestinationOfFunds{{}},\n\tCounterpartyConnections: []didit.WalletScreeningResultParamCounterpartyConnections{{}},\n\tSanctionsHit: true,\n\tDominantRiskCategory: didit.String(\"your-dominant-risk-category\"),\n\tReportSignature: \"your-report-signature\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.WalletScreeningResult;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.walletScreening().screenPdf(WalletScreeningResult.builder()\n .provider(\"your-provider\")\n .screeningType(WalletScreeningResult.ScreeningType.of(\"WALLET_SCREENING\"))\n .riskScore(1L)\n .severity(WalletScreeningResult.Severity.of(\"UNKNOWN\"))\n .status(WalletScreeningResult.Status.of(\"SCREENED\"))\n .summary(\"your-summary\")\n .walletAddress(\"your-wallet-address\")\n .blockchain(\"your-blockchain\")\n .sourceOfFunds(List.of(WalletScreeningResult.SourceOfFunds.builder()\n .build()))\n .destinationOfFunds(List.of(WalletScreeningResult.DestinationOfFunds.builder()\n .build()))\n .counterpartyConnections(List.of(WalletScreeningResult.CounterpartyConnections.builder()\n .build()))\n .sanctionsHit(true)\n .dominantRiskCategory(\"your-dominant-risk-category\")\n .reportSignature(\"your-report-signature\")\n .build())\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "walletScreening->screenPdf([\n 'provider' => 'your-provider',\n 'screening_type' => 'WALLET_SCREENING',\n 'risk_score' => 1,\n 'severity' => 'UNKNOWN',\n 'status' => 'SCREENED',\n 'summary' => 'your-summary',\n 'wallet_address' => 'your-wallet-address',\n 'blockchain' => 'your-blockchain',\n 'source_of_funds' => [[]],\n 'destination_of_funds' => [[]],\n 'counterparty_connections' => [[]],\n 'sanctions_hit' => true,\n 'dominant_risk_category' => 'your-dominant-risk-category',\n 'report_signature' => 'your-report-signature',\n]);\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.wallet_screening.screen_pdf(\n provider: \"your-provider\",\n screening_type: \"WALLET_SCREENING\",\n risk_score: 1,\n severity: \"UNKNOWN\",\n status: \"SCREENED\",\n summary: \"your-summary\",\n wallet_address: \"your-wallet-address\",\n blockchain: \"your-blockchain\",\n source_of_funds: [{}],\n destination_of_funds: [{}],\n counterparty_connections: [{}],\n sanctions_hit: true,\n dominant_risk_category: \"your-dominant-risk-category\",\n report_signature: \"your-report-signature\"\n)\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.WalletScreening.ScreenPdfAsync(new WalletScreeningResult\n{\n Provider = \"your-provider\",\n ScreeningType = \"WALLET_SCREENING\",\n RiskScore = 1,\n Severity = \"UNKNOWN\",\n Status = \"SCREENED\",\n Summary = \"your-summary\",\n WalletAddress = \"your-wallet-address\",\n Blockchain = \"your-blockchain\",\n SourceOfFunds = new WalletScreeningResultSourceOfFunds[] { new() },\n DestinationOfFunds = new WalletScreeningResultDestinationOfFunds[] { new() },\n CounterpartyConnections = new WalletScreeningResultCounterpartyConnections[] { new() },\n SanctionsHit = true,\n DominantRiskCategory = \"your-dominant-risk-category\",\n ReportSignature = \"your-report-signature\",\n});\nawait content.SaveToAsync(\"download.pdf\");" } ], "responses": { @@ -23306,7 +25290,8 @@ "schema": { "type": "integer", "default": 50, - "minimum": 1 + "minimum": 1, + "maximum": 1000000 }, "description": "Page size. Defaults to 50 when omitted. There is no enforced maximum, but keep pages small for latency." }, @@ -23316,7 +25301,8 @@ "schema": { "type": "integer", "default": 0, - "minimum": 0 + "minimum": 0, + "maximum": 1000000 }, "description": "Zero-based offset of the first record to return. Prefer following the `next` URL from the previous page." }, @@ -23328,6 +25314,15 @@ "type": "string" }, "description": "Return only transactions whose Travel Rule transfer is in this exact status (for example `ON_HOLD` or `AWAITING_COUNTERPARTY`). `count` follows this filter; `total_transactions` still counts every transaction in the application." + }, + { + "name": "assignee", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "Comma-separated; a transaction matches when it meets any value. `unassigned` is what nobody holds yet, `rules` is what the rules decided on their own without a reviewer, and a member email matches the reviewer assigned to it. `me` is the signed-in Console reviewer, so an API key sending `me` gets `400`." } ], "x-codeSamples": [ @@ -23339,12 +25334,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/transactions/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'limit': 50},\n timeout=10,\n)\nresp.raise_for_status()\npage = resp.json()\nfor tx in page['results']:\n print(\n tx['transaction_number'],\n tx['status'],\n tx['severity'],\n f\"{tx['amount']} {tx['currency']}\",\n tx.get('subject_name') or tx.get('subject_vendor_data'),\n )" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const url = new URL('https://verification.didit.me/v3/transactions/');\nurl.searchParams.set('limit', '50');\nconst page = await fetch(url, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n}).then((r) => r.json());\nfor (const tx of page.results) {\n console.log(tx.transaction_number, tx.status, tx.severity, tx.amount, tx.currency);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.ListAutoPaging(ctx, didit.TransactionsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -23615,7 +25635,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot list transactions for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot list transactions for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -23665,12 +25685,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/transactions/',\n headers={\n 'x-api-key': os.environ['DIDIT_API_KEY'],\n 'Content-Type': 'application/json',\n },\n json={\n 'transaction_id': 'your-txn-2026-05-17-001',\n 'transaction_category': 'finance',\n 'transaction_details': {\n 'direction': 'outbound',\n 'amount': 1500,\n 'currency': 'EUR',\n 'action_type': 'withdrawal',\n },\n 'subject': {\n 'entity_type': 'individual',\n 'vendor_data': 'user-12345',\n 'full_name': 'Maria Garcia',\n },\n },\n timeout=15,\n)\nresp.raise_for_status()\ntx = resp.json()\nprint(tx['txn_id'], '->', tx['status'], tx['severity'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.create(\n transaction_id=\"your-txn-2026-05-17-001\",\n transaction_category=\"finance\",\n transaction_details={\n \"direction\": \"outbound\",\n \"amount\": 1500.0,\n \"currency\": \"EUR\",\n \"action_type\": \"withdrawal\",\n },\n subject={\n \"entity_type\": \"individual\",\n \"vendor_data\": \"user-12345\",\n \"full_name\": \"Maria Garcia\",\n },\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/transactions/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n transaction_id: 'your-txn-2026-05-17-001',\n transaction_category: 'finance',\n transaction_details: {\n direction: 'outbound',\n amount: 1500,\n currency: 'EUR',\n action_type: 'withdrawal',\n },\n subject: {\n entity_type: 'individual',\n vendor_data: 'user-12345',\n full_name: 'Maria Garcia',\n },\n }),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst tx = await resp.json();\nconsole.log(tx.txn_id, tx.status, tx.severity);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.create({\n transaction_id: \"your-txn-2026-05-17-001\",\n transaction_category: \"finance\",\n transaction_details: {\n direction: \"outbound\",\n amount: 1500.0,\n currency: \"EUR\",\n action_type: \"withdrawal\",\n },\n subject: {\n entity_type: \"individual\",\n vendor_data: \"user-12345\",\n full_name: \"Maria Garcia\",\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Create(ctx, didit.TransactionsCreateParams{\n\tTransactionID: \"your-txn-2026-05-17-001\",\n\tTransactionCategory: \"finance\",\n\tTransactionDetails: didit.TransactionsCreateParamsTransactionDetails{\n\t\tDirection: \"outbound\",\n\t\tAmount: 1500.0,\n\t\tCurrency: \"EUR\",\n\t\tActionType: didit.String(\"withdrawal\"),\n\t},\n\tSubject: didit.TransactionsCreateParamsSubject{\n\t\tEntityType: didit.String(\"individual\"),\n\t\tVendorData: \"user-12345\",\n\t\tFullName: \"Maria Garcia\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TransactionsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().create(TransactionsCreateParams.builder()\n .transactionId(\"your-txn-2026-05-17-001\")\n .transactionCategory(TransactionsCreateParams.TransactionCategory.of(\"finance\"))\n .transactionDetails(TransactionsCreateParams.TransactionDetails.builder()\n .direction(TransactionsCreateParams.TransactionDetails.Direction.of(\"outbound\"))\n .amount(1500.0)\n .currency(\"EUR\")\n .actionType(\"withdrawal\")\n .build())\n .subject(TransactionsCreateParams.Subject.builder()\n .entityType(\"individual\")\n .vendorData(\"user-12345\")\n .fullName(\"Maria Garcia\")\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->create([\n 'transaction_id' => 'your-txn-2026-05-17-001',\n 'transaction_category' => 'finance',\n 'transaction_details' => [\n 'direction' => 'outbound',\n 'amount' => 1500.0,\n 'currency' => 'EUR',\n 'action_type' => 'withdrawal',\n ],\n 'subject' => [\n 'entity_type' => 'individual',\n 'vendor_data' => 'user-12345',\n 'full_name' => 'Maria Garcia',\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.create(\n transaction_id: \"your-txn-2026-05-17-001\",\n transaction_category: \"finance\",\n transaction_details: {\n direction: \"outbound\",\n amount: 1500.0,\n currency: \"EUR\",\n action_type: \"withdrawal\",\n },\n subject: {\n entity_type: \"individual\",\n vendor_data: \"user-12345\",\n full_name: \"Maria Garcia\",\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.CreateAsync(new TransactionsCreateParams\n{\n TransactionId = \"your-txn-2026-05-17-001\",\n TransactionCategory = \"finance\",\n TransactionDetails = new()\n {\n Direction = \"outbound\",\n Amount = 1500.0,\n Currency = \"EUR\",\n ActionType = \"withdrawal\",\n },\n Subject = new()\n {\n EntityType = \"individual\",\n VendorData = \"user-12345\",\n FullName = \"Maria Garcia\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -23732,7 +25777,7 @@ }, "amount": { "type": "number", - "description": "Transaction amount (up to 18 decimal places). Send it as a decimal string (e.g. `\"0.123456789012345678\"`) when exact precision matters: a JSON number is parsed as a binary float first, so digits beyond about 15 significant digits are rounded before the amount is stored.", + "description": "Transaction amount (up to 18 decimal places). Send it as a decimal string (e.g. `\"0.123456789012345678\"`) when exact precision matters: a JSON number is parsed as a binary float first, so digits beyond about 15 significant digits are rounded before the amount is stored. Must be zero or greater: the direction carries the sign, and a negative amount returns `400`.", "example": 1500 }, "currency": { @@ -23747,7 +25792,7 @@ "amount_in_default_currency": { "type": "number", "nullable": true, - "description": "Pre-converted amount in the default currency. If omitted, automatic FX conversion is attempted." + "description": "Pre-converted amount in the default currency. If omitted, automatic FX conversion is attempted. Must be zero or greater." }, "default_currency": { "type": "string", @@ -23774,7 +25819,7 @@ "properties": { "crypto_chain": { "type": "string", - "description": "Actual network used for screening. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism) and ARB (Arbitrum One). Always specify this for multi-network tokens. When it is missing for USDT, USDC or ETH sent with a 0x transaction hash, Didit looks the hash up on Ethereum, BNB Chain, Polygon, Base, Arbitrum and Optimism and screens it on the network where it is found; if no network has it, the transaction is not screened and custom_values.aml_screening_status is FAILED with the reason in custom_values.aml_screening_error. When it is missing for USDT or USDC screened by wallet (no transaction hash), a Tron address is screened on Tron, a Solana address on Solana, and a 0x address on the first of those six networks where it has sent a transaction or holds the token, or on Ethereum when it is active on none of them. Connected-provider coverage varies; LIGHTNING requires a supported connected provider.", + "description": "Actual network used for screening. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). Common network names are accepted too, for example POLYGON or POL for MATIC, BSC for BNB and TRON for TRX. Always specify this for multi-network tokens. When it is missing for USDT, USDC or ETH sent with a 0x transaction hash, Didit looks the hash up on Ethereum, BNB Chain, Polygon, Base, Arbitrum and Optimism and screens it on the network where it is found; if no network has it, the transaction is not screened and custom_values.aml_screening_status is FAILED with the reason in custom_values.aml_screening_error. When it is missing for USDT or USDC screened by wallet (no transaction hash), a Tron address is screened on Tron, a Solana address on Solana, and a 0x address on the first of those six networks where it has sent a transaction or holds the token, or on Ethereum when it is active on none of them. Connected-provider coverage varies; LIGHTNING requires a supported connected provider.", "example": "BASE" } } @@ -24521,7 +26566,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot submit transactions for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot submit transactions for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -24612,12 +26657,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nuuid = 'abcdef12-3456-7890-abcd-ef1234567890'\nresp = requests.get(\n f'https://verification.didit.me/v3/transactions/{uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\ntx = resp.json()\nfor alert in tx['alerts']:\n print(alert.get('code'), alert.get('severity'))" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.retrieve(\n \"abcdef12-3456-7890-abcd-ef1234567890\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const uuid = 'abcdef12-3456-7890-abcd-ef1234567890';\nconst resp = await fetch(`https://verification.didit.me/v3/transactions/${uuid}/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Lookup failed: ${resp.status}`);\nconst tx = await resp.json();\nconsole.log(tx.status, tx.severity, tx.alerts.length, 'alerts');" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.retrieve(\"abcdef12-3456-7890-abcd-ef1234567890\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Retrieve(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().retrieve(\"abcdef12-3456-7890-abcd-ef1234567890\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->retrieve('abcdef12-3456-7890-abcd-ef1234567890');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.retrieve(\"abcdef12-3456-7890-abcd-ef1234567890\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.RetrieveAsync(\"abcdef12-3456-7890-abcd-ef1234567890\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -24719,7 +26789,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot read this application's transactions. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot read this application's transactions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -24832,7 +26902,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/transactions/sdk-token/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'vendor_data': 'user-042', 'ttl_seconds': 900, 'max_uses': 3},\n timeout=10,\n)\nresp.raise_for_status()\ntoken = resp.json()\nprint(token['sdk_token'], token['expires_at'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.create_sdk_token(\n vendor_data=\"user-042\",\n ttl_seconds=900,\n max_uses=3,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.createSdkToken({\n vendor_data: \"user-042\",\n ttl_seconds: 900,\n max_uses: 3,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.CreateSDKToken(ctx, didit.TransactionsCreateSDKTokenParams{\n\tVendorData: \"user-042\",\n\tTTLSeconds: didit.Int(900),\n\tMaxUses: didit.Int(3),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TransactionsCreateSdkTokenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().createSdkToken(TransactionsCreateSdkTokenParams.builder()\n .vendorData(\"user-042\")\n .ttlSeconds(900L)\n .maxUses(3L)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->createSdkToken([\n 'vendor_data' => 'user-042',\n 'ttl_seconds' => 900,\n 'max_uses' => 3,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.create_sdk_token(\n vendor_data: \"user-042\",\n ttl_seconds: 900,\n max_uses: 3\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.CreateSdkTokenAsync(new TransactionsCreateSdkTokenParams\n{\n VendorData = \"user-042\",\n TtlSeconds = 900,\n MaxUses = 3,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -25408,7 +27508,8 @@ "schema": { "type": "integer", "default": 50, - "minimum": 1 + "minimum": 1, + "maximum": 1000000 }, "description": "Page size. Defaults to 50 when omitted. There is no enforced maximum, but keep pages small for latency." }, @@ -25418,7 +27519,8 @@ "schema": { "type": "integer", "default": 0, - "minimum": 0 + "minimum": 0, + "maximum": 1000000 }, "description": "Zero-based offset of the first record to return. Prefer following the `next` URL from the previous page over computing this by hand." } @@ -25432,12 +27534,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/businesses/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n params={'limit': 50},\n)\nresp.raise_for_status()\npage = resp.json()\nfor biz in page['results']:\n print(biz['vendor_data'], biz['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.businesses.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const url = new URL('https://verification.didit.me/v3/businesses/');\nurl.searchParams.set('limit', '50');\n\nconst page = await fetch(url, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n}).then((r) => r.json());\nconsole.log(page.count, page.results.length);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.businesses.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Businesses.ListAutoPaging(ctx, didit.BusinessesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.businesses().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.businesses.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Businesses.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -25519,7 +27646,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot list businesses for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot list businesses for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -25577,12 +27704,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/customization/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n)\nresp.raise_for_status()\nbranding = resp.json()\nprint(branding['font_family'], branding['color_primary'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.customization.retrieve()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const branding = await fetch(\n 'https://verification.didit.me/v3/customization/',\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n).then((r) => r.json());\nconsole.log(branding.font_family, branding.color_primary);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.customization.retrieve();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Customization.Retrieve(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.customization().retrieve();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "customization->retrieve();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.customization.retrieve\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Customization.RetrieveAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -25631,7 +27783,7 @@ } }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -25757,12 +27909,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/customization/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'color_primary': '#123456', 'font_family': 'AR One Sans'},\n)\nresp.raise_for_status()\nprint(resp.json()['color_primary'])\n\n# Upload a logo (multipart):\nwith open('logo.png', 'rb') as logo:\n requests.patch(\n 'https://verification.didit.me/v3/customization/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n files={'image_rectangular': logo},\n )" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.customization.update(\n image_rectangular=open(\"image_rectangular.jpg\", \"rb\"),\n image_rectangular_dark=open(\"image_rectangular_dark.jpg\", \"rb\"),\n image_favicon=open(\"image_favicon.jpg\", \"rb\"),\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/customization/', {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ color_primary: '#123456', font_family: 'AR One Sans' }),\n});\nconst branding = await resp.json();\nconsole.log(branding.color_primary);" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.customization.update({\n image_rectangular: await fileFromPath(\"image_rectangular.jpg\"),\n image_rectangular_dark: await fileFromPath(\"image_rectangular_dark.jpg\"),\n image_favicon: await fileFromPath(\"image_favicon.jpg\"),\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Customization.Update(ctx, didit.CustomizationUpdateParams{\n\tImageRectangular: didit.Some(didit.FileFromPath(\"image_rectangular.jpg\")),\n\tImageRectangularDark: didit.Some(didit.FileFromPath(\"image_rectangular_dark.jpg\")),\n\tImageFavicon: didit.Some(didit.FileFromPath(\"image_favicon.jpg\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.CustomizationUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.customization().update(CustomizationUpdateParams.builder()\n .imageRectangular(Path.of(\"image_rectangular.jpg\"))\n .imageRectangularDark(Path.of(\"image_rectangular_dark.jpg\"))\n .imageFavicon(Path.of(\"image_favicon.jpg\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "customization->update([\n 'image_rectangular' => File::fromPath('image_rectangular.jpg'),\n 'image_rectangular_dark' => File::fromPath('image_rectangular_dark.jpg'),\n 'image_favicon' => File::fromPath('image_favicon.jpg'),\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.customization.update(\n image_rectangular: Pathname(\"image_rectangular.jpg\"),\n image_rectangular_dark: Pathname(\"image_rectangular_dark.jpg\"),\n image_favicon: Pathname(\"image_favicon.jpg\")\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Customization.UpdateAsync(new CustomizationUpdateParams\n{\n ImageRectangular = FileUpload.FromPath(\"image_rectangular.jpg\"),\n ImageRectangularDark = FileUpload.FromPath(\"image_rectangular_dark.jpg\"),\n ImageFavicon = FileUpload.FromPath(\"image_favicon.jpg\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -25872,7 +28049,7 @@ } }, "403": { - "description": "API key missing, malformed, expired, or scoped to a different application. Didit returns 403 (never 401) for all authentication failures on this endpoint.", + "description": "API key missing, malformed, expired, or scoped to a different application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -25931,12 +28108,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/businesses/company-123/',\n headers={'x-api-key': 'YOUR_API_KEY'},\n)\nresp.raise_for_status()\nbiz = resp.json()\nprint(biz['didit_internal_id'], biz['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.retrieve(\n \"company-123\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const vendorData = encodeURIComponent('company-123');\nconst biz = await fetch(\n `https://verification.didit.me/v3/businesses/${vendorData}/`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n).then((r) => r.json());\nconsole.log(biz.didit_internal_id, biz.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.retrieve(\"company-123\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Retrieve(ctx, \"company-123\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().retrieve(\"company-123\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->retrieve('company-123');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.retrieve(\"company-123\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.RetrieveAsync(\"company-123\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -25993,7 +28195,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot read this application's businesses. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot read this application's businesses. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -26166,12 +28368,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/businesses/company-123/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'display_name': 'Acme Corp', 'status': 'FLAGGED'},\n)\nresp.raise_for_status()\nprint(resp.json()['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.update(\n \"company-123\",\n display_name=\"Acme Corp\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/businesses/company-123/', {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ display_name: 'Acme Corp', status: 'FLAGGED' }),\n});\nconst biz = await resp.json();\nconsole.log(biz.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.update(\"company-123\", {\n display_name: \"Acme Corp\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Update(ctx, \"company-123\", didit.BusinessesUpdateParams{\n\tDisplayName: didit.String(\"Acme Corp\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BusinessesUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().update(\"company-123\", BusinessesUpdateParams.builder()\n .displayName(\"Acme Corp\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->update('company-123', [\n 'display_name' => 'Acme Corp',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.update(\n \"company-123\",\n display_name: \"Acme Corp\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.UpdateAsync(\"company-123\", new BusinessesUpdateParams\n{\n DisplayName = \"Acme Corp\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -26259,7 +28486,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot update businesses for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot update businesses for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -26395,12 +28622,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/businesses/company-123/update-status/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'status': 'BLOCKED'},\n)\nresp.raise_for_status()\nprint(resp.json()['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.update_status(\n \"company-123\",\n status=\"FLAGGED\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/businesses/company-123/update-status/', {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ status: 'BLOCKED' }),\n});\nconst biz = await resp.json();\nconsole.log(biz.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.updateStatus(\"company-123\", {\n status: \"FLAGGED\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.UpdateStatus(ctx, \"company-123\", didit.BusinessesUpdateStatusParams{\n\tStatus: \"FLAGGED\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BusinessesUpdateStatusParams;\nimport me.didit.types.EntityStatusUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().updateStatus(\"company-123\", BusinessesUpdateStatusParams.builder()\n .status(EntityStatusUpdateRequest.Status.of(\"FLAGGED\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->updateStatus('company-123', [\n 'status' => 'FLAGGED',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.update_status(\n \"company-123\",\n status: \"FLAGGED\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.UpdateStatusAsync(\"company-123\", new BusinessesUpdateStatusParams\n{\n Status = \"FLAGGED\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -26487,7 +28739,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot update businesses for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot update businesses for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -26618,12 +28870,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/businesses/delete/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'vendor_data_list': ['company-123', 'company-456']},\n)\nresp.raise_for_status()\nprint('deleted', resp.json()['deleted'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.batch_delete(\n vendor_data_list=[\"company-123\", \"company-456\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/businesses/delete/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ vendor_data_list: ['company-123', 'company-456'] }),\n});\nconst body = await resp.json();\nconsole.log('deleted', body.deleted);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.batchDelete({\n vendor_data_list: [\"company-123\", \"company-456\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.BatchDelete(ctx, didit.BusinessesBatchDeleteParams{\n\tVendorDataList: didit.Some([]string{\"company-123\", \"company-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BusinessesBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().batchDelete(BusinessesBatchDeleteParams.builder()\n .vendorDataList(List.of(\"company-123\", \"company-456\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->batchDelete([\n 'vendor_data_list' => ['company-123', 'company-456'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.batch_delete(vendor_data_list: [\"company-123\", \"company-456\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.BatchDeleteAsync(new BusinessesBatchDeleteParams\n{\n VendorDataList = new string[] { \"company-123\", \"company-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -26670,7 +28947,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot delete businesses for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot delete businesses for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -26815,12 +29092,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/users/aml-monitoring/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'is_enabled': True, 'vendor_data_list': ['user-123', 'user-456']},\n)\nresp.raise_for_status()\njob = resp.json()\nprint(job['status'], job['outcomes'])\nfor row in job['results']:\n print(row['vendor_data'], row['outcome'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.set_aml_monitoring(\n is_enabled=True,\n estimate_only=True,\n vendor_data_list=[\"user-123\", \"user-456\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/users/aml-monitoring/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ is_enabled: true, vendor_data_list: ['user-123', 'user-456'] }),\n});\nconst job = await resp.json();\nconsole.log(job.status, job.outcomes);\nfor (const row of job.results) console.log(row.vendor_data, row.outcome);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.setAmlMonitoring({\n is_enabled: true,\n estimate_only: true,\n vendor_data_list: [\"user-123\", \"user-456\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.SetAMLMonitoring(ctx, didit.UsersSetAMLMonitoringParams{\n\tIsEnabled: true,\n\tEstimateOnly: didit.Bool(true),\n\tVendorDataList: didit.Some([]string{\"user-123\", \"user-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.UsersSetAmlMonitoringParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().setAmlMonitoring(UsersSetAmlMonitoringParams.builder()\n .isEnabled(true)\n .estimateOnly(true)\n .vendorDataList(List.of(\"user-123\", \"user-456\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->setAmlMonitoring([\n 'is_enabled' => true,\n 'estimate_only' => true,\n 'vendor_data_list' => ['user-123', 'user-456'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.set_aml_monitoring(\n is_enabled: true,\n estimate_only: true,\n vendor_data_list: [\"user-123\", \"user-456\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.SetAmlMonitoringAsync(new UsersSetAmlMonitoringParams\n{\n IsEnabled = true,\n EstimateOnly = true,\n VendorDataList = new string[] { \"user-123\", \"user-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -27012,12 +29314,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/businesses/aml-monitoring/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'is_enabled': True, 'vendor_data_list': ['company-123', 'company-456']},\n)\nresp.raise_for_status()\njob = resp.json()\nprint(job['status'], job['outcomes'])\nfor row in job['results']:\n print(row['vendor_data'], row['outcome'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.set_aml_monitoring(\n is_enabled=True,\n estimate_only=True,\n vendor_data_list=[\"company-123\", \"company-456\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/businesses/aml-monitoring/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ is_enabled: true, vendor_data_list: ['company-123', 'company-456'] }),\n});\nconst job = await resp.json();\nconsole.log(job.status, job.outcomes);\nfor (const row of job.results) console.log(row.vendor_data, row.outcome);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.setAmlMonitoring({\n is_enabled: true,\n estimate_only: true,\n vendor_data_list: [\"company-123\", \"company-456\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.SetAMLMonitoring(ctx, didit.BusinessesSetAMLMonitoringParams{\n\tIsEnabled: true,\n\tEstimateOnly: didit.Bool(true),\n\tVendorDataList: didit.Some([]string{\"company-123\", \"company-456\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BusinessesSetAmlMonitoringParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().setAmlMonitoring(BusinessesSetAmlMonitoringParams.builder()\n .isEnabled(true)\n .estimateOnly(true)\n .vendorDataList(List.of(\"company-123\", \"company-456\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->setAmlMonitoring([\n 'is_enabled' => true,\n 'estimate_only' => true,\n 'vendor_data_list' => ['company-123', 'company-456'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.set_aml_monitoring(\n is_enabled: true,\n estimate_only: true,\n vendor_data_list: [\"company-123\", \"company-456\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.SetAmlMonitoringAsync(new BusinessesSetAmlMonitoringParams\n{\n IsEnabled = true,\n EstimateOnly = true,\n VendorDataList = new string[] { \"company-123\", \"company-456\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -27149,12 +29476,37 @@ { "lang": "python", "label": "Python", - "source": "import time\nimport requests\n\nurl = 'https://verification.didit.me/v3/aml-monitoring/jobs/JOB_ID/'\nwhile True:\n job = requests.get(url, headers={'x-api-key': 'YOUR_API_KEY'}).json()\n if job['status'] in ('COMPLETED', 'FAILED'):\n break\n time.sleep(2)\nprint(job['outcomes'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.aml_monitoring.retrieve_job(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const url = 'https://verification.didit.me/v3/aml-monitoring/jobs/JOB_ID/';\nlet job;\ndo {\n await new Promise((r) => setTimeout(r, 2000));\n job = await (await fetch(url, { headers: { 'x-api-key': process.env.DIDIT_API_KEY } })).json();\n} while (job.status === 'PENDING' || job.status === 'PROCESSING');\nconsole.log(job.outcomes);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.amlMonitoring.retrieveJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AMLMonitoring.RetrieveJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.amlMonitoring().retrieveJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "amlMonitoring->retrieveJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.aml_monitoring.retrieve_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.AmlMonitoring.RetrieveJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -27387,12 +29739,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/users/user-abc-123/update-status/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'status': 'BLOCKED'},\n)\nresp.raise_for_status()\nprint(resp.json()['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.update_status(\n \"user-123\",\n status=\"ACTIVE\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/users/user-abc-123/update-status/', {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ status: 'BLOCKED' }),\n});\nconst user = await resp.json();\nconsole.log(user.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.updateStatus(\"user-123\", {\n status: \"ACTIVE\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.UpdateStatus(ctx, \"user-123\", didit.UsersUpdateStatusParams{\n\tStatus: \"ACTIVE\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.EntityStatusUpdateRequest;\nimport me.didit.types.UsersUpdateStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().updateStatus(\"user-123\", UsersUpdateStatusParams.builder()\n .status(EntityStatusUpdateRequest.Status.of(\"ACTIVE\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->updateStatus('user-123', [\n 'status' => 'ACTIVE',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.update_status(\n \"user-123\",\n status: \"ACTIVE\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.UpdateStatusAsync(\"user-123\", new UsersUpdateStatusParams\n{\n Status = \"ACTIVE\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -27545,7 +29922,7 @@ } }, "403": { - "description": "Invalid or revoked API key, or the key cannot update users for this application. Note: on this endpoint an *invalid* key returns `403` (not `401`).", + "description": "The key cannot update users for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -27698,12 +30075,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/businesses/create/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={\n 'vendor_data': 'company-456',\n 'legal_name': 'New Corp Ltd',\n 'country_code': 'US',\n },\n)\nresp.raise_for_status()\nbiz = resp.json()\nprint(biz['didit_internal_id'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.businesses.create(\n vendor_data=\"company-456\",\n legal_name=\"New Corp Ltd\",\n country_code=\"US\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/businesses/create/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({\n vendor_data: 'company-456',\n legal_name: 'New Corp Ltd',\n country_code: 'US',\n }),\n});\nconst biz = await resp.json();\nconsole.log(biz.didit_internal_id);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.businesses.create({\n vendor_data: \"company-456\",\n legal_name: \"New Corp Ltd\",\n country_code: \"US\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.Create(ctx, didit.BusinessesCreateParams{\n\tVendorData: didit.String(\"company-456\"),\n\tLegalName: didit.String(\"New Corp Ltd\"),\n\tCountryCode: didit.String(\"US\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BusinessesCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.businesses().create(BusinessesCreateParams.builder()\n .vendorData(\"company-456\")\n .legalName(\"New Corp Ltd\")\n .countryCode(\"US\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->create([\n 'vendor_data' => 'company-456',\n 'legal_name' => 'New Corp Ltd',\n 'country_code' => 'US',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.businesses.create(\n vendor_data: \"company-456\",\n legal_name: \"New Corp Ltd\",\n country_code: \"US\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.CreateAsync(new BusinessesCreateParams\n{\n VendorData = \"company-456\",\n LegalName = \"New Corp Ltd\",\n CountryCode = \"US\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -27775,7 +30177,7 @@ } }, "403": { - "description": "Missing, invalid, or revoked API key, or the key cannot create businesses for this application. This endpoint returns `403` (never `401`) for authentication failures, including requests with no credentials at all.", + "description": "Missing, invalid, or revoked API key, or the key cannot create businesses for this application. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -27995,12 +30397,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/users/create/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={'vendor_data': 'user-abc-123', 'full_name': 'John Doe'},\n)\nresp.raise_for_status()\nuser = resp.json()\nprint(user['didit_internal_id'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.users.create(\n vendor_data=\"user-abc-123\",\n full_name=\"John Doe\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/users/create/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ vendor_data: 'user-abc-123', full_name: 'John Doe' }),\n});\nconst user = await resp.json();\nconsole.log(user.didit_internal_id);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.users.create({\n vendor_data: \"user-abc-123\",\n full_name: \"John Doe\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Users.Create(ctx, didit.UsersCreateParams{\n\tVendorData: \"user-abc-123\",\n\tFullName: didit.String(\"John Doe\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.UsersCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.users().create(UsersCreateParams.builder()\n .vendorData(\"user-abc-123\")\n .fullName(\"John Doe\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->create([\n 'vendor_data' => 'user-abc-123',\n 'full_name' => 'John Doe',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.users.create(\n vendor_data: \"user-abc-123\",\n full_name: \"John Doe\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Users.CreateAsync(new UsersCreateParams\n{\n VendorData = \"user-abc-123\",\n FullName = \"John Doe\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -28250,7 +30677,7 @@ } }, "403": { - "description": "Invalid or revoked API key, or the key cannot create users for this application. A scoped API key needs `users` write, and also `sessions` write when `send_verification_link` is `true`; nothing is written. Note: on this endpoint an *invalid* key returns `403` (not `401`).", + "description": "Invalid or revoked API key, or the key cannot create users for this application. A scoped API key needs `users` write, and also `sessions` write when `send_verification_link` is `true`; nothing is written. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -28381,12 +30808,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/vendor-users/by-id/f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418/faces/upload/',\n headers={'x-api-key': 'YOUR_API_KEY', 'Content-Type': 'application/json'},\n json={\n 'image': '/9j/4AAQSkZJRgABAQEA...',\n 'comment': 'Imported from previous KYC provider',\n },\n)\nresp.raise_for_status()\nface = resp.json()\nprint(face['uuid'], face['image_url'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.upload_face(\n \"11111111-2222-3333-4444-555555555555\",\n image=\"/9j/4AAQSkZJRgABAQEA...\",\n comment=\"Imported from previous KYC provider\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/vendor-users/by-id/f4e5e1f2-94a9-4f86-8c16-2b7d9b4db418/faces/upload/', {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({\n image: '/9j/4AAQSkZJRgABAQEA...',\n comment: 'Imported from previous KYC provider',\n }),\n});\nconst face = await resp.json();\nconsole.log(face.uuid, face.image_url);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.uploadFace(\"11111111-2222-3333-4444-555555555555\", {\n image: \"/9j/4AAQSkZJRgABAQEA...\",\n comment: \"Imported from previous KYC provider\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.UploadFace(ctx, \"11111111-2222-3333-4444-555555555555\", didit.UsersUploadFaceParams{\n\tImage: \"/9j/4AAQSkZJRgABAQEA...\",\n\tComment: didit.String(\"Imported from previous KYC provider\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.UsersUploadFaceParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().uploadFace(\"11111111-2222-3333-4444-555555555555\", UsersUploadFaceParams.builder()\n .image(\"/9j/4AAQSkZJRgABAQEA...\")\n .comment(\"Imported from previous KYC provider\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->uploadFace('11111111-2222-3333-4444-555555555555', [\n 'image' => '/9j/4AAQSkZJRgABAQEA...',\n 'comment' => 'Imported from previous KYC provider',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.upload_face(\n \"11111111-2222-3333-4444-555555555555\",\n image: \"/9j/4AAQSkZJRgABAQEA...\",\n comment: \"Imported from previous KYC provider\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.UploadFaceAsync(\"11111111-2222-3333-4444-555555555555\", new UsersUploadFaceParams\n{\n Image = \"/9j/4AAQSkZJRgABAQEA...\",\n Comment = \"Imported from previous KYC provider\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -29082,7 +31534,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions. This API returns `403` for authentication failures — never `401`.", + "description": "Missing credentials or insufficient permissions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -29168,12 +31620,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-data/\",\n headers={\n \"x-api-key\": \"YOUR_API_KEY\",\n \"Content-Type\": \"application/json\",\n },\n json={\n \"first_name\": \"Carmen\",\n \"last_name\": \"Espanola Espanola\",\n \"date_of_birth\": \"1980-01-01\",\n \"issuing_state\": \"ESP\",\n \"extra_fields\": {\"blood_group\": \"O+\"},\n \"parsed_address\": {\"city\": \"Madrid\", \"postal_code\": \"28013\", \"country\": \"ES\"},\n },\n)\nresponse.raise_for_status()\nkyc = response.json() # full current KYC record\nprint(kyc[\"first_name\"], kyc[\"parsed_address\"][\"formatted_address\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_data(\n \"11111111-2222-3333-4444-555555555555\",\n date_of_birth=\"1980-01-01\",\n issuing_state=\"ESP\",\n first_name=\"Carmen\",\n last_name=\"Espanola Espanola\",\n marital_status=\"MARRIED\",\n extra_fields={\"blood_group\": \"O+\"},\n parsed_address={\n \"city\": \"Madrid\",\n \"street_1\": \"Avda de Madrid 34\",\n \"postal_code\": \"28013\",\n \"country\": \"ES\",\n },\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-data/',\n {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n first_name: 'Carmen',\n last_name: 'Espanola Espanola',\n date_of_birth: '1980-01-01',\n issuing_state: 'ESP',\n parsed_address: { city: 'Madrid', postal_code: '28013', country: 'ES' },\n }),\n },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst kyc = await response.json(); // full current KYC record" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateData(\"11111111-2222-3333-4444-555555555555\", {\n date_of_birth: \"1980-01-01\",\n issuing_state: \"ESP\",\n first_name: \"Carmen\",\n last_name: \"Espanola Espanola\",\n marital_status: \"MARRIED\",\n extra_fields: { blood_group: \"O+\" },\n parsed_address: {\n city: \"Madrid\",\n street_1: \"Avda de Madrid 34\",\n postal_code: \"28013\",\n country: \"ES\",\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateData(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateDataParams{\n\tDateOfBirth: didit.String(\"1980-01-01\"),\n\tIssuingState: didit.String(\"ESP\"),\n\tFirstName: didit.String(\"Carmen\"),\n\tLastName: didit.String(\"Espanola Espanola\"),\n\tMaritalStatus: didit.Some(didit.SessionsUpdateDataParamsMaritalStatus(\"MARRIED\")),\n\tExtraFields: didit.Some(map[string]any{\"blood_group\": \"O+\"}),\n\tParsedAddress: didit.Some(didit.SessionsUpdateDataParamsParsedAddress{\n\t\tCity: didit.String(\"Madrid\"),\n\t\tStreet1: didit.String(\"Avda de Madrid 34\"),\n\t\tPostalCode: didit.String(\"28013\"),\n\t\tCountry: didit.String(\"ES\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdateDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateData(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateDataParams.builder()\n .dateOfBirth(LocalDate.parse(\"1980-01-01\"))\n .issuingState(\"ESP\")\n .firstName(\"Carmen\")\n .lastName(\"Espanola Espanola\")\n .maritalStatus(SessionsUpdateDataParams.MaritalStatus.of(\"MARRIED\"))\n .extraFields(Map.of(\"blood_group\", \"O+\"))\n .parsedAddress(SessionsUpdateDataParams.ParsedAddress.builder()\n .city(\"Madrid\")\n .street1(\"Avda de Madrid 34\")\n .postalCode(\"28013\")\n .country(\"ES\")\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateData('11111111-2222-3333-4444-555555555555', [\n 'date_of_birth' => '1980-01-01',\n 'issuing_state' => 'ESP',\n 'first_name' => 'Carmen',\n 'last_name' => 'Espanola Espanola',\n 'marital_status' => 'MARRIED',\n 'extra_fields' => ['blood_group' => 'O+'],\n 'parsed_address' => [\n 'city' => 'Madrid',\n 'street_1' => 'Avda de Madrid 34',\n 'postal_code' => '28013',\n 'country' => 'ES',\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_data(\n \"11111111-2222-3333-4444-555555555555\",\n date_of_birth: \"1980-01-01\",\n issuing_state: \"ESP\",\n first_name: \"Carmen\",\n last_name: \"Espanola Espanola\",\n marital_status: \"MARRIED\",\n extra_fields: { blood_group: \"O+\" },\n parsed_address: {\n city: \"Madrid\",\n street_1: \"Avda de Madrid 34\",\n postal_code: \"28013\",\n country: \"ES\",\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateDataAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateDataParams\n{\n DateOfBirth = \"1980-01-01\",\n IssuingState = \"ESP\",\n FirstName = \"Carmen\",\n LastName = \"Espanola Espanola\",\n MaritalStatus = new SessionsUpdateDataParamsMaritalStatus(\"MARRIED\"),\n ExtraFields = new Dictionary { [\"blood_group\"] = \"O+\" },\n ParsedAddress = new SessionsUpdateDataParamsParsedAddress\n {\n City = \"Madrid\",\n Street1 = \"Avda de Madrid 34\",\n PostalCode = \"28013\",\n Country = \"ES\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -29464,7 +31941,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions.", + "description": "Missing credentials or insufficient permissions.", "content": { "application/json": { "examples": { @@ -29521,7 +31998,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/features/feature_ocr_1/update-status/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\", \"Content-Type\": \"application/json\"},\n json={\"new_status\": \"Approved\", \"comment\": \"Document manually verified by compliance.\"},\n)\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_feature_status(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_ocr_1\",\n new_status=\"Approved\",\n comment=\"Document manually verified by compliance.\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateFeatureStatus(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_ocr_1\",\n {\n new_status: \"Approved\",\n comment: \"Document manually verified by compliance.\",\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateFeatureStatus(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_ocr_1\", didit.SessionsUpdateFeatureStatusParams{\n\tNewStatus: \"Approved\",\n\tComment: didit.String(\"Document manually verified by compliance.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateFeatureStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateFeatureStatus(\"11111111-2222-3333-4444-555555555555\", \"feature_ocr_1\", SessionsUpdateFeatureStatusParams.builder()\n .newStatus(SessionsUpdateFeatureStatusParams.NewStatus.of(\"Approved\"))\n .comment(\"Document manually verified by compliance.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateFeatureStatus('11111111-2222-3333-4444-555555555555', 'feature_ocr_1', [\n 'new_status' => 'Approved',\n 'comment' => 'Document manually verified by compliance.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_feature_status(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_ocr_1\",\n new_status: \"Approved\",\n comment: \"Document manually verified by compliance.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateFeatureStatusAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_ocr_1\", new SessionsUpdateFeatureStatusParams\n{\n NewStatus = \"Approved\",\n Comment = \"Document manually verified by compliance.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -29529,7 +32036,7 @@ "/v3/session/{sessionId}/update-aml-hit-status/": { "patch": { "summary": "Update an AML hit review status", - "description": "Set the review status of a **single AML hit** (a potential sanction / PEP / watchlist / adverse-media match) returned by AML screening, without changing the overall session decision. Identify the hit by its `hit_id` (the `id` of an entry in the AML check's `hits` array — see the session decision).\n\n`review_status` is one of `Unreviewed`, `Confirmed Match`, `False Positive`, or `Inconclusive`. Reviewer decisions are preserved across ongoing-monitoring updates, so a hit you mark `False Positive` stays that way when the provider re-screens.\n\nA successful call fires a `data.updated` webhook and appends an activity entry (with actor attribution) to the session's review trail. For graph workflows with multiple AML checks, pass `node_id` to target a specific check.\n\nAuthenticate with your API key (`x-api-key`) or a user authorization header — either must carry the `write:sessions` privilege.", + "description": "Set the review status of a **single AML hit** (a potential sanction / PEP / watchlist / adverse-media match) returned by AML screening, without changing the overall session decision. Identify the hit by its `hit_id` (the `id` of an entry in the AML check's `hits` array — see the session decision). A hit id returned in the earlier format is still accepted; the response always names the hit by its current `id`.\n\n`review_status` is one of `Unreviewed`, `Confirmed Match`, `False Positive`, or `Inconclusive`. Reviewer decisions are preserved across ongoing-monitoring updates, so a hit you mark `False Positive` stays that way when the provider re-screens.\n\nA successful call fires a `data.updated` webhook and appends an activity entry (with actor attribution) to the session's review trail. For graph workflows with multiple AML checks, pass `node_id` to target a specific check.\n\nAuthenticate with your API key (`x-api-key`) or a user authorization header — either must carry the `write:sessions` privilege.", "operationId": "patch_v3_session_update_aml_hit_status", "x-didit-sdk": { "resource": "sessions", @@ -29581,8 +32088,8 @@ "properties": { "hit_id": { "type": "string", - "description": "The `id` of the hit in the AML check's `hits` array.", - "example": "abc123" + "description": "The `id` of the hit in the AML check's `hits` array (`hit_...`). A hit id returned in the earlier format is still accepted.", + "example": "hit_7c1e9a40b2d35f86e0a4c912" }, "review_status": { "type": "string", @@ -29601,6 +32108,10 @@ "example": "feature_aml_1" } } + }, + "example": { + "hit_id": "hit_7c1e9a40b2d35f86e0a4c912", + "review_status": "False Positive" } } } @@ -29624,7 +32135,7 @@ }, "hit_id": { "type": "string", - "description": "The updated hit, with surrounding whitespace removed." + "description": "The `id` of the updated hit, as the session decision returns it, also when the request named the hit by an id in the earlier format." }, "review_status": { "type": "string", @@ -29640,7 +32151,7 @@ }, "example": { "message": "Hit status updated successfully", - "hit_id": "abc123", + "hit_id": "hit_7c1e9a40b2d35f86e0a4c912", "review_status": "False Positive" } } @@ -29659,7 +32170,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions. This API returns `403` for authentication failures — never `401`.", + "description": "Missing credentials or insufficient permissions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -29693,7 +32204,7 @@ "Hit Not Found": { "summary": "Unknown hit_id", "value": { - "detail": "Hit with ID 'abc123' not found in the AML check." + "detail": "Hit with ID 'hit_9d2e7f41c0a8b3e65d1f0c47' not found in the AML check." } } } @@ -29710,7 +32221,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-aml-hit-status/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\", \"Content-Type\": \"application/json\"},\n json={\"hit_id\": \"abc123\", \"review_status\": \"False Positive\"},\n)\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_aml_hit_status(\n \"11111111-2222-3333-4444-555555555555\",\n hit_id=\"hit_7c1e9a40b2d35f86e0a4c912\",\n review_status=\"False Positive\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", {\n hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n review_status: \"False Positive\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateAMLHitStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateAMLHitStatusParams{\n\tHitID: \"hit_7c1e9a40b2d35f86e0a4c912\",\n\tReviewStatus: \"False Positive\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateAmlHitStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateAmlHitStatusParams.builder()\n .hitId(\"hit_7c1e9a40b2d35f86e0a4c912\")\n .reviewStatus(SessionsUpdateAmlHitStatusParams.ReviewStatus.of(\"False Positive\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateAmlHitStatus('11111111-2222-3333-4444-555555555555', [\n 'hit_id' => 'hit_7c1e9a40b2d35f86e0a4c912',\n 'review_status' => 'False Positive',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_aml_hit_status(\n \"11111111-2222-3333-4444-555555555555\",\n hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n review_status: \"False Positive\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateAmlHitStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateAmlHitStatusParams\n{\n HitId = \"hit_7c1e9a40b2d35f86e0a4c912\",\n ReviewStatus = \"False Positive\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -29779,7 +32320,8 @@ "properties": { "hit_id": { "type": "string", - "example": "abc123" + "example": "hit_7c1e9a40b2d35f86e0a4c912", + "description": "The `id` of the hit in the AML check's `hits` array (`hit_...`). A hit id returned in the earlier format is still accepted." }, "review_status": { "type": "string", @@ -29800,6 +32342,18 @@ "example": "feature_aml_1" } } + }, + "example": { + "hit_updates": [ + { + "hit_id": "hit_7c1e9a40b2d35f86e0a4c912", + "review_status": "Confirmed Match" + }, + { + "hit_id": "hit_3b8f20d6a91c4e75f0b2d6a8", + "review_status": "False Positive" + } + ] } } } @@ -29825,15 +32379,15 @@ "items": { "type": "string" }, - "description": "The `hit_id` of every entry in `hit_updates`, in request order, including hits whose status did not change." + "description": "The `id` of the hit each entry in `hit_updates` names, as the session decision returns it, in request order, including hits whose status did not change." } } }, "example": { "message": "Updated 2 hit(s) successfully", "updated_hits": [ - "abc123", - "def456" + "hit_7c1e9a40b2d35f86e0a4c912", + "hit_3b8f20d6a91c4e75f0b2d6a8" ] } } @@ -29852,7 +32406,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions. This API returns `403` for authentication failures — never `401`.", + "description": "Missing credentials or insufficient permissions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -29877,7 +32431,7 @@ "content": { "application/json": { "example": { - "detail": "Hits not found: zzz999" + "detail": "Hits not found: hit_9d2e7f41c0a8b3e65d1f0c47" } } } @@ -29892,7 +32446,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/bulk-update-aml-hit-status/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\", \"Content-Type\": \"application/json\"},\n json={\n \"hit_updates\": [\n {\"hit_id\": \"abc123\", \"review_status\": \"Confirmed Match\"},\n {\"hit_id\": \"def456\", \"review_status\": \"False Positive\"},\n ]\n },\n)\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.bulk_update_aml_hit_status(\n \"11111111-2222-3333-4444-555555555555\",\n hit_updates=[{\n \"hit_id\": \"hit_7c1e9a40b2d35f86e0a4c912\",\n \"review_status\": \"Confirmed Match\",\n }, {\n \"hit_id\": \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n \"review_status\": \"False Positive\",\n }],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.bulkUpdateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", {\n hit_updates: [{\n hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n review_status: \"Confirmed Match\",\n }, {\n hit_id: \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n review_status: \"False Positive\",\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.BulkUpdateAMLHitStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsBulkUpdateAMLHitStatusParams{\n\tHitUpdates: []didit.SessionsBulkUpdateAMLHitStatusParamsHitUpdates{{\n\t\tHitID: \"hit_7c1e9a40b2d35f86e0a4c912\",\n\t\tReviewStatus: \"Confirmed Match\",\n\t}, {\n\t\tHitID: \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n\t\tReviewStatus: \"False Positive\",\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsBulkUpdateAmlHitStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().bulkUpdateAmlHitStatus(\"11111111-2222-3333-4444-555555555555\", SessionsBulkUpdateAmlHitStatusParams.builder()\n .hitUpdates(List.of(\n SessionsBulkUpdateAmlHitStatusParams.HitUpdates.builder()\n .hitId(\"hit_7c1e9a40b2d35f86e0a4c912\")\n .reviewStatus(SessionsBulkUpdateAmlHitStatusParams.HitUpdates.ReviewStatus.of(\"Confirmed Match\"))\n .build(),\n SessionsBulkUpdateAmlHitStatusParams.HitUpdates.builder()\n .hitId(\"hit_3b8f20d6a91c4e75f0b2d6a8\")\n .reviewStatus(SessionsBulkUpdateAmlHitStatusParams.HitUpdates.ReviewStatus.of(\"False Positive\"))\n .build()))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->bulkUpdateAmlHitStatus('11111111-2222-3333-4444-555555555555', [\n 'hit_updates' => [[\n 'hit_id' => 'hit_7c1e9a40b2d35f86e0a4c912',\n 'review_status' => 'Confirmed Match',\n ], [\n 'hit_id' => 'hit_3b8f20d6a91c4e75f0b2d6a8',\n 'review_status' => 'False Positive',\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.bulk_update_aml_hit_status(\n \"11111111-2222-3333-4444-555555555555\",\n hit_updates: [{\n hit_id: \"hit_7c1e9a40b2d35f86e0a4c912\",\n review_status: \"Confirmed Match\",\n }, {\n hit_id: \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n review_status: \"False Positive\",\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.BulkUpdateAmlHitStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsBulkUpdateAmlHitStatusParams\n{\n HitUpdates = new SessionsBulkUpdateAmlHitStatusParamsHitUpdates[]\n {\n new()\n {\n HitId = \"hit_7c1e9a40b2d35f86e0a4c912\",\n ReviewStatus = \"Confirmed Match\",\n },\n new()\n {\n HitId = \"hit_3b8f20d6a91c4e75f0b2d6a8\",\n ReviewStatus = \"False Positive\",\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -30295,7 +32879,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions. This API returns `403` for authentication failures — never `401`.", + "description": "Missing credentials or insufficient permissions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -30381,12 +32965,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-poa-data/\",\n headers={\n \"x-api-key\": \"YOUR_API_KEY\",\n \"Content-Type\": \"application/json\",\n },\n json={\n \"issuing_state\": \"ESP\",\n \"document_type\": \"BANK_STATEMENT\",\n \"issuer\": \"Banco Example S.A.\",\n \"issue_date\": \"2026-05-02\",\n \"name_on_document\": \"Carmen Espanola\",\n \"poa_address\": \"Avda de Madrid 34, 28013 Madrid\",\n \"extra_fields\": {\"bank_iban\": \"ES9121000418450200051332\"},\n \"poa_parsed_address\": {\"city\": \"Madrid\", \"postal_code\": \"28013\", \"country\": \"ES\"},\n },\n)\nresponse.raise_for_status()\npoa = response.json() # full current POA record\nprint(poa[\"issuer\"], poa[\"poa_formatted_address\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_poa_data(\n \"11111111-2222-3333-4444-555555555555\",\n issuing_state=\"ESP\",\n document_type=\"BANK_STATEMENT\",\n issuer=\"Banco Example S.A.\",\n issue_date=\"2026-05-02\",\n poa_address=\"Avda de Madrid 34, 28013 Madrid\",\n name_on_document=\"Carmen Espanola\",\n extra_fields={\"bank_iban\": \"ES9121000418450200051332\", \"additional_names\": [\"Carmen E. Espanola\"]},\n poa_parsed_address={\n \"city\": \"Madrid\",\n \"street_1\": \"Avda de Madrid 34\",\n \"postal_code\": \"28013\",\n \"country\": \"ES\",\n },\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/update-poa-data/',\n {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n issuing_state: 'ESP',\n document_type: 'BANK_STATEMENT',\n issuer: 'Banco Example S.A.',\n issue_date: '2026-05-02',\n name_on_document: 'Carmen Espanola',\n poa_address: 'Avda de Madrid 34, 28013 Madrid',\n poa_parsed_address: { city: 'Madrid', postal_code: '28013', country: 'ES' },\n }),\n },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst poa = await response.json(); // full current POA record" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updatePoaData(\"11111111-2222-3333-4444-555555555555\", {\n issuing_state: \"ESP\",\n document_type: \"BANK_STATEMENT\",\n issuer: \"Banco Example S.A.\",\n issue_date: \"2026-05-02\",\n poa_address: \"Avda de Madrid 34, 28013 Madrid\",\n name_on_document: \"Carmen Espanola\",\n extra_fields: { bank_iban: \"ES9121000418450200051332\", additional_names: [\"Carmen E. Espanola\"] },\n poa_parsed_address: {\n city: \"Madrid\",\n street_1: \"Avda de Madrid 34\",\n postal_code: \"28013\",\n country: \"ES\",\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdatePOAData(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdatePOADataParams{\n\tIssuingState: didit.String(\"ESP\"),\n\tDocumentType: didit.Some(didit.SessionsUpdatePOADataParamsDocumentType(\"BANK_STATEMENT\")),\n\tIssuer: didit.String(\"Banco Example S.A.\"),\n\tIssueDate: didit.String(\"2026-05-02\"),\n\tPOAAddress: didit.String(\"Avda de Madrid 34, 28013 Madrid\"),\n\tNameOnDocument: didit.String(\"Carmen Espanola\"),\n\tExtraFields: didit.Some(map[string]any{\"bank_iban\": \"ES9121000418450200051332\", \"additional_names\": []any{\"Carmen E. Espanola\"}}),\n\tPOAParsedAddress: didit.Some(didit.SessionsUpdatePOADataParamsPOAParsedAddress{\n\t\tCity: didit.String(\"Madrid\"),\n\t\tStreet1: didit.String(\"Avda de Madrid 34\"),\n\t\tPostalCode: didit.String(\"28013\"),\n\t\tCountry: didit.String(\"ES\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdatePoaDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updatePoaData(\"11111111-2222-3333-4444-555555555555\", SessionsUpdatePoaDataParams.builder()\n .issuingState(\"ESP\")\n .documentType(SessionsUpdatePoaDataParams.DocumentType.of(\"BANK_STATEMENT\"))\n .issuer(\"Banco Example S.A.\")\n .issueDate(LocalDate.parse(\"2026-05-02\"))\n .poaAddress(\"Avda de Madrid 34, 28013 Madrid\")\n .nameOnDocument(\"Carmen Espanola\")\n .extraFields(Map.of(\"bank_iban\", \"ES9121000418450200051332\", \"additional_names\", List.of(\"Carmen E. Espanola\")))\n .poaParsedAddress(SessionsUpdatePoaDataParams.PoaParsedAddress.builder()\n .city(\"Madrid\")\n .street1(\"Avda de Madrid 34\")\n .postalCode(\"28013\")\n .country(\"ES\")\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updatePoaData('11111111-2222-3333-4444-555555555555', [\n 'issuing_state' => 'ESP',\n 'document_type' => 'BANK_STATEMENT',\n 'issuer' => 'Banco Example S.A.',\n 'issue_date' => '2026-05-02',\n 'poa_address' => 'Avda de Madrid 34, 28013 Madrid',\n 'name_on_document' => 'Carmen Espanola',\n 'extra_fields' => ['bank_iban' => 'ES9121000418450200051332', 'additional_names' => ['Carmen E. Espanola']],\n 'poa_parsed_address' => [\n 'city' => 'Madrid',\n 'street_1' => 'Avda de Madrid 34',\n 'postal_code' => '28013',\n 'country' => 'ES',\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_poa_data(\n \"11111111-2222-3333-4444-555555555555\",\n issuing_state: \"ESP\",\n document_type: \"BANK_STATEMENT\",\n issuer: \"Banco Example S.A.\",\n issue_date: \"2026-05-02\",\n poa_address: \"Avda de Madrid 34, 28013 Madrid\",\n name_on_document: \"Carmen Espanola\",\n extra_fields: { bank_iban: \"ES9121000418450200051332\", additional_names: [\"Carmen E. Espanola\"] },\n poa_parsed_address: {\n city: \"Madrid\",\n street_1: \"Avda de Madrid 34\",\n postal_code: \"28013\",\n country: \"ES\",\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdatePoaDataAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdatePoaDataParams\n{\n IssuingState = \"ESP\",\n DocumentType = new SessionsUpdatePoaDataParamsDocumentType(\"BANK_STATEMENT\"),\n Issuer = \"Banco Example S.A.\",\n IssueDate = \"2026-05-02\",\n PoaAddress = \"Avda de Madrid 34, 28013 Madrid\",\n NameOnDocument = \"Carmen Espanola\",\n ExtraFields = new Dictionary { [\"bank_iban\"] = \"ES9121000418450200051332\", [\"additional_names\"] = new object[] { \"Carmen E. Espanola\" } },\n PoaParsedAddress = new SessionsUpdatePoaDataParamsPoaParsedAddress\n {\n City = \"Madrid\",\n Street1 = \"Avda de Madrid 34\",\n PostalCode = \"28013\",\n Country = \"ES\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -30860,10 +33469,7 @@ "description": "Registry filing dates, when available. Annual returns and general meetings use last_annual_return_date and last_agm_date; they are distinct from financial accounts." }, "registry_data": { - "type": "object", - "nullable": true, - "additionalProperties": true, - "description": "Raw registry payload snapshot. Every key you PATCH is merged into this map (dates serialized as ISO strings), so the \"extracted from registry\" view reflects operator corrections." + "$ref": "#/components/schemas/KYBRegistryData" }, "user_provided_data": { "type": "object", @@ -31026,7 +33632,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions. This API returns `403` for authentication failures — never `401`.", + "description": "Missing credentials or insufficient permissions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -31106,12 +33712,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.patch(\n \"https://verification.didit.me/v3/session/33333333-4444-5555-6666-777777777777/kyb/\"\n \"88888888-9999-aaaa-bbbb-cccccccccccc/update-data/\",\n headers={\n \"x-api-key\": \"YOUR_API_KEY\",\n \"Content-Type\": \"application/json\",\n },\n json={\n \"company_name\": \"Docs Probe Corp\",\n \"registration_number\": \"DPC-001\",\n \"country_code\": \"US\",\n \"incorporation_date\": \"2015-04-12\",\n \"legal_address\": \"1 Example Plaza, Wilmington, DE 19801\",\n \"registry_status\": \"active\",\n },\n)\nresponse.raise_for_status()\ncompany = response.json() # full company record\nprint(company[\"company_name\"], company[\"registered_address\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_kyb_company_data(\n \"33333333-4444-5555-6666-777777777777\",\n \"88888888-9999-aaaa-bbbb-cccccccccccc\",\n company_name=\"Docs Probe Corp\",\n registration_number=\"DPC-001\",\n country_code=\"US\",\n incorporation_date=\"2015-04-12\",\n legal_address=\"1 Example Plaza, Wilmington, DE 19801\",\n company_type=\"Limited Liability Company\",\n registry_status=\"active\",\n verification_status=\"verified\",\n nature_of_business=\"Software development\",\n registered_capital=\"USD 50000\",\n website=\"docsprobe.example.com\",\n email=\"legal@docsprobe.example.com\",\n phone=\"+1 302 555 0143\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const response = await fetch(\n 'https://verification.didit.me/v3/session/33333333-4444-5555-6666-777777777777/kyb/' +\n '88888888-9999-aaaa-bbbb-cccccccccccc/update-data/',\n {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n company_name: 'Docs Probe Corp',\n registration_number: 'DPC-001',\n country_code: 'US',\n incorporation_date: '2015-04-12',\n legal_address: '1 Example Plaza, Wilmington, DE 19801',\n registry_status: 'active',\n }),\n },\n);\nif (!response.ok) throw new Error(`HTTP ${response.status}`);\nconst company = await response.json(); // full company record" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateKybCompanyData(\n \"33333333-4444-5555-6666-777777777777\",\n \"88888888-9999-aaaa-bbbb-cccccccccccc\",\n {\n company_name: \"Docs Probe Corp\",\n registration_number: \"DPC-001\",\n country_code: \"US\",\n incorporation_date: \"2015-04-12\",\n legal_address: \"1 Example Plaza, Wilmington, DE 19801\",\n company_type: \"Limited Liability Company\",\n registry_status: \"active\",\n verification_status: \"verified\",\n nature_of_business: \"Software development\",\n registered_capital: \"USD 50000\",\n website: \"docsprobe.example.com\",\n email: \"legal@docsprobe.example.com\",\n phone: \"+1 302 555 0143\",\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateKYBCompanyData(ctx, \"33333333-4444-5555-6666-777777777777\", \"88888888-9999-aaaa-bbbb-cccccccccccc\", didit.SessionsUpdateKYBCompanyDataParams{\n\tCompanyName: didit.String(\"Docs Probe Corp\"),\n\tRegistrationNumber: didit.String(\"DPC-001\"),\n\tCountryCode: didit.String(\"US\"),\n\tIncorporationDate: didit.String(\"2015-04-12\"),\n\tLegalAddress: didit.String(\"1 Example Plaza, Wilmington, DE 19801\"),\n\tCompanyType: didit.String(\"Limited Liability Company\"),\n\tRegistryStatus: didit.Some(didit.SessionsUpdateKYBCompanyDataParamsRegistryStatus(\"active\")),\n\tVerificationStatus: didit.Some(didit.SessionsUpdateKYBCompanyDataParamsVerificationStatus(\"verified\")),\n\tNatureOfBusiness: didit.String(\"Software development\"),\n\tRegisteredCapital: didit.String(\"USD 50000\"),\n\tWebsite: didit.String(\"docsprobe.example.com\"),\n\tEmail: didit.String(\"legal@docsprobe.example.com\"),\n\tPhone: didit.String(\"+1 302 555 0143\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdateKybCompanyDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateKybCompanyData(\"33333333-4444-5555-6666-777777777777\", \"88888888-9999-aaaa-bbbb-cccccccccccc\", SessionsUpdateKybCompanyDataParams.builder()\n .companyName(\"Docs Probe Corp\")\n .registrationNumber(\"DPC-001\")\n .countryCode(\"US\")\n .incorporationDate(LocalDate.parse(\"2015-04-12\"))\n .legalAddress(\"1 Example Plaza, Wilmington, DE 19801\")\n .companyType(\"Limited Liability Company\")\n .registryStatus(SessionsUpdateKybCompanyDataParams.RegistryStatus.of(\"active\"))\n .verificationStatus(SessionsUpdateKybCompanyDataParams.VerificationStatus.of(\"verified\"))\n .natureOfBusiness(\"Software development\")\n .registeredCapital(\"USD 50000\")\n .website(\"docsprobe.example.com\")\n .email(\"legal@docsprobe.example.com\")\n .phone(\"+1 302 555 0143\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateKybCompanyData('33333333-4444-5555-6666-777777777777', '88888888-9999-aaaa-bbbb-cccccccccccc', [\n 'company_name' => 'Docs Probe Corp',\n 'registration_number' => 'DPC-001',\n 'country_code' => 'US',\n 'incorporation_date' => '2015-04-12',\n 'legal_address' => '1 Example Plaza, Wilmington, DE 19801',\n 'company_type' => 'Limited Liability Company',\n 'registry_status' => 'active',\n 'verification_status' => 'verified',\n 'nature_of_business' => 'Software development',\n 'registered_capital' => 'USD 50000',\n 'website' => 'docsprobe.example.com',\n 'email' => 'legal@docsprobe.example.com',\n 'phone' => '+1 302 555 0143',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_kyb_company_data(\n \"33333333-4444-5555-6666-777777777777\",\n \"88888888-9999-aaaa-bbbb-cccccccccccc\",\n company_name: \"Docs Probe Corp\",\n registration_number: \"DPC-001\",\n country_code: \"US\",\n incorporation_date: \"2015-04-12\",\n legal_address: \"1 Example Plaza, Wilmington, DE 19801\",\n company_type: \"Limited Liability Company\",\n registry_status: \"active\",\n verification_status: \"verified\",\n nature_of_business: \"Software development\",\n registered_capital: \"USD 50000\",\n website: \"docsprobe.example.com\",\n email: \"legal@docsprobe.example.com\",\n phone: \"+1 302 555 0143\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateKybCompanyDataAsync(\"33333333-4444-5555-6666-777777777777\", \"88888888-9999-aaaa-bbbb-cccccccccccc\", new SessionsUpdateKybCompanyDataParams\n{\n CompanyName = \"Docs Probe Corp\",\n RegistrationNumber = \"DPC-001\",\n CountryCode = \"US\",\n IncorporationDate = \"2015-04-12\",\n LegalAddress = \"1 Example Plaza, Wilmington, DE 19801\",\n CompanyType = \"Limited Liability Company\",\n RegistryStatus = new SessionsUpdateKybCompanyDataParamsRegistryStatus(\"active\"),\n VerificationStatus = new SessionsUpdateKybCompanyDataParamsVerificationStatus(\"verified\"),\n NatureOfBusiness = \"Software development\",\n RegisteredCapital = \"USD 50000\",\n Website = \"docsprobe.example.com\",\n Email = \"legal@docsprobe.example.com\",\n Phone = \"+1 302 555 0143\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -31270,7 +33901,7 @@ } }, "403": { - "description": "Missing/invalid credentials or insufficient permissions. This API returns `403` for authentication failures — never `401`.", + "description": "Missing credentials or insufficient permissions. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "examples": { @@ -31334,7 +33965,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_kyb_party(\n \"33333333-4444-5555-6666-777777777777\",\n \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n is_skipped=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateKybParty(\n \"33333333-4444-5555-6666-777777777777\",\n \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n {\n is_skipped: true,\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateKYBParty(ctx, \"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\", didit.SessionsUpdateKYBPartyParams{\n\tIsSkipped: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateKybPartyParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateKybParty(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\", SessionsUpdateKybPartyParams.builder()\n .isSkipped(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateKybParty('33333333-4444-5555-6666-777777777777', '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41', [\n 'is_skipped' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_kyb_party(\n \"33333333-4444-5555-6666-777777777777\",\n \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n is_skipped: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateKybPartyAsync(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\", new SessionsUpdateKybPartyParams\n{\n IsSkipped = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/travel-rule/settings/": { @@ -31361,6 +34029,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/settings/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_settings()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveSettings();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveSettings(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveSettings();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->retrieveSettings();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_settings\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveSettingsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -31504,6 +34207,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PUT https://verification.didit.me/v3/travel-rule/settings/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"is_enabled\": true, \"legal_name\": \"Origin CASP SL\", \"jurisdiction\": \"EU\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.update_settings(\n is_enabled=True,\n legal_name=\"Origin CASP SL\",\n jurisdiction=\"EU\",\n name_matching_strictness=\"DEFAULT\",\n confirmation_timeout_hours=48,\n timeout_outcome=\"HOLD\",\n is_discoverable=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.updateSettings({\n is_enabled: true,\n legal_name: \"Origin CASP SL\",\n jurisdiction: \"EU\",\n name_matching_strictness: \"DEFAULT\",\n confirmation_timeout_hours: 48,\n timeout_outcome: \"HOLD\",\n is_discoverable: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UpdateSettings(ctx, didit.TravelRuleSettingsUpdate{\n\tIsEnabled: didit.Bool(true),\n\tLegalName: didit.String(\"Origin CASP SL\"),\n\tJurisdiction: didit.String(\"EU\"),\n\tNameMatchingStrictness: didit.Some(didit.TravelRuleSettingsUpdateNameMatchingStrictness(\"DEFAULT\")),\n\tConfirmationTimeoutHours: didit.Int(48),\n\tTimeoutOutcome: didit.Some(didit.TravelRuleSettingsUpdateTimeoutOutcome(\"HOLD\")),\n\tIsDiscoverable: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleSettingsUpdate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().updateSettings(TravelRuleSettingsUpdate.builder()\n .isEnabled(true)\n .legalName(\"Origin CASP SL\")\n .jurisdiction(\"EU\")\n .nameMatchingStrictness(TravelRuleSettingsUpdate.NameMatchingStrictness.of(\"DEFAULT\"))\n .confirmationTimeoutHours(48L)\n .timeoutOutcome(TravelRuleSettingsUpdate.TimeoutOutcome.of(\"HOLD\"))\n .isDiscoverable(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->updateSettings([\n 'is_enabled' => true,\n 'legal_name' => 'Origin CASP SL',\n 'jurisdiction' => 'EU',\n 'name_matching_strictness' => 'DEFAULT',\n 'confirmation_timeout_hours' => 48,\n 'timeout_outcome' => 'HOLD',\n 'is_discoverable' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.update_settings(\n is_enabled: true,\n legal_name: \"Origin CASP SL\",\n jurisdiction: \"EU\",\n name_matching_strictness: \"DEFAULT\",\n confirmation_timeout_hours: 48,\n timeout_outcome: \"HOLD\",\n is_discoverable: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.UpdateSettingsAsync(new TravelRuleSettingsUpdate\n{\n IsEnabled = true,\n LegalName = \"Origin CASP SL\",\n Jurisdiction = \"EU\",\n NameMatchingStrictness = new TravelRuleSettingsUpdateNameMatchingStrictness(\"DEFAULT\"),\n ConfirmationTimeoutHours = 48,\n TimeoutOutcome = new TravelRuleSettingsUpdateTimeoutOutcome(\"HOLD\"),\n IsDiscoverable = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -31559,6 +34297,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/settings/compliance-email/confirmation/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.send_compliance_email_confirmation()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.sendComplianceEmailConfirmation();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.SendComplianceEmailConfirmation(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().sendComplianceEmailConfirmation();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->sendComplianceEmailConfirmation();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.send_compliance_email_confirmation\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.SendComplianceEmailConfirmationAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -31666,6 +34439,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/wallet-addresses/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.wallet_addresses.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.walletAddresses.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.WalletAddresses.ListAutoPaging(ctx, didit.TravelRuleWalletAddressesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().walletAddresses().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletAddresses->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.wallet_addresses.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.WalletAddresses.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -31740,6 +34548,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-addresses/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"address\": \"0xBeneficiaryWallet01\", \"chain\": \"ETH\", \"holder_name\": \"Ana Diaz\", \"self_declared\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_addresses.create(\n address=\"0xBeneficiaryWallet01\",\n chain=\"ETH\",\n holder_vendor_data=\"user-042\",\n holder_name=\"Ana Diaz\",\n self_declared=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletAddresses.create({\n address: \"0xBeneficiaryWallet01\",\n chain: \"ETH\",\n holder_vendor_data: \"user-042\",\n holder_name: \"Ana Diaz\",\n self_declared: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.Create(ctx, didit.WalletAddressEntryCreate{\n\tAddress: \"0xBeneficiaryWallet01\",\n\tChain: didit.String(\"ETH\"),\n\tHolderVendorData: didit.String(\"user-042\"),\n\tHolderName: didit.String(\"Ana Diaz\"),\n\tSelfDeclared: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.WalletAddressEntryCreate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletAddresses().create(WalletAddressEntryCreate.builder()\n .address(\"0xBeneficiaryWallet01\")\n .chain(\"ETH\")\n .holderVendorData(\"user-042\")\n .holderName(\"Ana Diaz\")\n .selfDeclared(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletAddresses->create([\n 'address' => '0xBeneficiaryWallet01',\n 'chain' => 'ETH',\n 'holder_vendor_data' => 'user-042',\n 'holder_name' => 'Ana Diaz',\n 'self_declared' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_addresses.create(\n address: \"0xBeneficiaryWallet01\",\n chain: \"ETH\",\n holder_vendor_data: \"user-042\",\n holder_name: \"Ana Diaz\",\n self_declared: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletAddresses.CreateAsync(new WalletAddressEntryCreate\n{\n Address = \"0xBeneficiaryWallet01\",\n Chain = \"ETH\",\n HolderVendorData = \"user-042\",\n HolderName = \"Ana Diaz\",\n SelfDeclared = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -31838,6 +34681,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PATCH https://verification.didit.me/v3/travel-rule/wallet-addresses/{entry_uuid}/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"holder_name\": \"Ana Updated\", \"travel_address\": \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_addresses.update(\n \"11111111-2222-3333-4444-555555555555\",\n holder_name=\"Ana Updated\",\n travel_address=\"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletAddresses.update(\"11111111-2222-3333-4444-555555555555\", {\n holder_name: \"Ana Updated\",\n travel_address: \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WalletAddressEntryUpdateParam{\n\tHolderName: didit.String(\"Ana Updated\"),\n\tTravelAddress: didit.String(\"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.WalletAddressEntryUpdate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletAddresses().update(\"11111111-2222-3333-4444-555555555555\", WalletAddressEntryUpdate.builder()\n .holderName(\"Ana Updated\")\n .travelAddress(\"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletAddresses->update('11111111-2222-3333-4444-555555555555', [\n 'holder_name' => 'Ana Updated',\n 'travel_address' => 'ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_addresses.update(\n \"11111111-2222-3333-4444-555555555555\",\n holder_name: \"Ana Updated\",\n travel_address: \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletAddresses.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new WalletAddressEntryUpdate\n{\n HolderName = \"Ana Updated\",\n TravelAddress = \"ta2ih1MicegQ3JqiKz9xT89KsSuwaDJYw8DgzmeSEp1h9tduJcNDZ5SgKLEHeyGMcS1s2HgbM6undFrMQknhM5aTXw3G9KBzi16hx\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -31906,6 +34784,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE https://verification.didit.me/v3/travel-rule/wallet-addresses/{entry_uuid}/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.travel_rule.wallet_addresses.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.travelRule.walletAddresses.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.TravelRule.WalletAddresses.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.travelRule().walletAddresses().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletAddresses->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.wallet_addresses.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.TravelRule.WalletAddresses.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ], "responses": { @@ -32045,6 +34958,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/travel-rule/vasps/?search=counterparty&reachable=true' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.list_vasps():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.listVasps()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.ListVASPsAutoPaging(ctx, didit.TravelRuleListVASPsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().listVasps()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->listVasps() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.list_vasps.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.ListVaspsAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -32146,6 +35094,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_vasp(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveVasp(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveVASP(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveVasp(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->retrieveVasp('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_vasp(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveVaspAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32216,6 +35199,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_vasp_decision(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->retrieveVaspDecision('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_vasp_decision(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveVaspDecisionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32330,6 +35348,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PUT https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"decision\": \"BLOCKED\", \"reason\": \"Unlicensed in its home jurisdiction\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.update_vasp_decision(\n \"11111111-2222-3333-4444-555555555555\",\n decision=\"BLOCKED\",\n reason=\"Unlicensed in its home jurisdiction\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.updateVaspDecision(\"11111111-2222-3333-4444-555555555555\", {\n decision: \"BLOCKED\",\n reason: \"Unlicensed in its home jurisdiction\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UpdateVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyDecisionRequest{\n\tDecision: \"BLOCKED\",\n\tReason: didit.String(\"Unlicensed in its home jurisdiction\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyDecisionRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().updateVaspDecision(\"11111111-2222-3333-4444-555555555555\", TravelRuleCounterpartyDecisionRequest.builder()\n .decision(TravelRuleCounterpartyDecisionRequest.Decision.of(\"BLOCKED\"))\n .reason(\"Unlicensed in its home jurisdiction\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->updateVaspDecision('11111111-2222-3333-4444-555555555555', [\n 'decision' => 'BLOCKED',\n 'reason' => 'Unlicensed in its home jurisdiction',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.update_vasp_decision(\n \"11111111-2222-3333-4444-555555555555\",\n decision: \"BLOCKED\",\n reason: \"Unlicensed in its home jurisdiction\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.UpdateVaspDecisionAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleCounterpartyDecisionRequest\n{\n Decision = \"BLOCKED\",\n Reason = \"Unlicensed in its home jurisdiction\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32428,6 +35481,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/decision/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.clear_vasp_decision(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.clearVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.ClearVASPDecision(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().clearVaspDecision(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->clearVaspDecision('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.clear_vasp_decision(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.ClearVaspDecisionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32510,6 +35598,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/screening/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.retrieve_vasp_screening(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.retrieveVaspScreening(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RetrieveVASPScreening(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().retrieveVaspScreening(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->retrieveVaspScreening('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.retrieve_vasp_screening(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RetrieveVaspScreeningAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32623,6 +35746,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/screening/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"refresh\": false}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.screen_vasp(\n \"11111111-2222-3333-4444-555555555555\",\n refresh=False,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.screenVasp(\"11111111-2222-3333-4444-555555555555\", {\n refresh: false,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.ScreenVASP(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyScreeningRequest{\n\tRefresh: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyScreeningRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().screenVasp(\"11111111-2222-3333-4444-555555555555\", TravelRuleCounterpartyScreeningRequest.builder()\n .refresh(false)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->screenVasp('11111111-2222-3333-4444-555555555555', [\n 'refresh' => false,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.screen_vasp(\n \"11111111-2222-3333-4444-555555555555\",\n refresh: false\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.ScreenVaspAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleCounterpartyScreeningRequest\n{\n Refresh = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32820,6 +35978,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/questionnaires/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.list_vasp_questionnaires(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.listVaspQuestionnaires(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.ListVASPQuestionnaires(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().listVaspQuestionnaires(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->listVaspQuestionnaires('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.list_vasp_questionnaires(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.ListVaspQuestionnairesAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -32942,6 +36135,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/vasps/{vasp_id}/questionnaires/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"sent_to\": \"travelrule@counterparty.example\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.send_vasp_questionnaire(\n \"11111111-2222-3333-4444-555555555555\",\n sent_to=\"travelrule@counterparty.example\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.sendVaspQuestionnaire(\"11111111-2222-3333-4444-555555555555\", {\n sent_to: \"travelrule@counterparty.example\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.SendVASPQuestionnaire(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleCounterpartyQuestionnaireRequest{\n\tSentTo: didit.String(\"travelrule@counterparty.example\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyQuestionnaireRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().sendVaspQuestionnaire(\"11111111-2222-3333-4444-555555555555\", TravelRuleCounterpartyQuestionnaireRequest.builder()\n .sentTo(\"travelrule@counterparty.example\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->sendVaspQuestionnaire('11111111-2222-3333-4444-555555555555', [\n 'sent_to' => 'travelrule@counterparty.example',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.send_vasp_questionnaire(\n \"11111111-2222-3333-4444-555555555555\",\n sent_to: \"travelrule@counterparty.example\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.SendVaspQuestionnaireAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleCounterpartyQuestionnaireRequest\n{\n SentTo = \"travelrule@counterparty.example\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -33107,6 +36335,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PATCH https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"payment_txn_id\": \"0xchainhash\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.update_transfer(\n \"11111111-2222-3333-4444-555555555555\",\n payment_txn_id=\"0xchainhash\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.updateTransfer(\"11111111-2222-3333-4444-555555555555\", {\n payment_txn_id: \"0xchainhash\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.UpdateTransfer(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleTransferPatchRequest{\n\tPaymentTxnID: didit.String(\"0xchainhash\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleTransferPatchRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().updateTransfer(\"11111111-2222-3333-4444-555555555555\", TravelRuleTransferPatchRequest.builder()\n .paymentTxnId(\"0xchainhash\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->travelRule->updateTransfer('11111111-2222-3333-4444-555555555555', [\n 'payment_txn_id' => '0xchainhash',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.update_transfer(\n \"11111111-2222-3333-4444-555555555555\",\n payment_txn_id: \"0xchainhash\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.UpdateTransferAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleTransferPatchRequest\n{\n PaymentTxnId = \"0xchainhash\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -33227,6 +36490,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/ownership/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"confirmed\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.confirm_ownership(\n \"11111111-2222-3333-4444-555555555555\",\n confirmed=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.confirmOwnership(\"11111111-2222-3333-4444-555555555555\", {\n confirmed: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.ConfirmOwnership(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleOwnershipConfirmRequest{\n\tConfirmed: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleOwnershipConfirmRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().confirmOwnership(\"11111111-2222-3333-4444-555555555555\", TravelRuleOwnershipConfirmRequest.builder()\n .confirmed(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->travelRule->confirmOwnership('11111111-2222-3333-4444-555555555555', [\n 'confirmed' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.confirm_ownership(\n \"11111111-2222-3333-4444-555555555555\",\n confirmed: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.ConfirmOwnershipAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleOwnershipConfirmRequest\n{\n Confirmed = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -33331,6 +36629,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.list_messages(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.listMessages(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.ListMessages(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().listMessages(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->travelRule->listMessages('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.travel_rule.list_messages(\"11111111-2222-3333-4444-555555555555\").each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.ListMessagesAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -33409,6 +36742,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/transactions/{transaction_id}/travel-rule/messages/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"kind\": \"DOCUMENT_REQUEST\", \"body\": \"Please confirm the date of birth of the beneficiary.\", \"requested_documents\": [\"Proof of address\"]}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.create_message(\n \"11111111-2222-3333-4444-555555555555\",\n kind=\"DOCUMENT_REQUEST\",\n body=\"Please confirm the date of birth of the beneficiary.\",\n requested_documents=[\"Proof of address\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.createMessage(\"11111111-2222-3333-4444-555555555555\", {\n kind: \"DOCUMENT_REQUEST\",\n body: \"Please confirm the date of birth of the beneficiary.\",\n requested_documents: [\"Proof of address\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.CreateMessage(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleMessageCreateRequest{\n\tKind: didit.Some(didit.TravelRuleMessageCreateRequestKind(\"DOCUMENT_REQUEST\")),\n\tBody: didit.String(\"Please confirm the date of birth of the beneficiary.\"),\n\tRequestedDocuments: didit.Some([]string{\"Proof of address\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TravelRuleMessageCreateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().createMessage(\"11111111-2222-3333-4444-555555555555\", TravelRuleMessageCreateRequest.builder()\n .kind(TravelRuleMessageCreateRequest.Kind.of(\"DOCUMENT_REQUEST\"))\n .body(\"Please confirm the date of birth of the beneficiary.\")\n .requestedDocuments(List.of(\"Proof of address\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->travelRule->createMessage('11111111-2222-3333-4444-555555555555', [\n 'kind' => 'DOCUMENT_REQUEST',\n 'body' => 'Please confirm the date of birth of the beneficiary.',\n 'requested_documents' => ['Proof of address'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.create_message(\n \"11111111-2222-3333-4444-555555555555\",\n kind: \"DOCUMENT_REQUEST\",\n body: \"Please confirm the date of birth of the beneficiary.\",\n requested_documents: [\"Proof of address\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.CreateMessageAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleMessageCreateRequest\n{\n Kind = new TravelRuleMessageCreateRequestKind(\"DOCUMENT_REQUEST\"),\n Body = \"Please confirm the date of birth of the beneficiary.\",\n RequestedDocuments = new string[] { \"Proof of address\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -33911,6 +37279,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/inbound/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"chain\":\"ETH\",\"txid\":\"0xdeposit-hash\",\"wallet_address\":\"0xYourDepositWallet\",\"amount\":\"500.00\",\"currency\":\"USDC\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.register_inbound(\n chain=\"ETH\",\n txid=\"0xdeposit-hash\",\n wallet_address=\"0xYourDepositWallet\",\n amount=\"500.00\",\n currency=\"USDC\",\n originator_data={\"name\": \"Origin CASP SL\"},\n beneficiary_data={\"name\": \"Ana Diaz\"},\n originating_vasp={\n \"name\": \"Origin CASP SL\",\n \"lei\": \"\",\n \"travel_address\": \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.registerInbound({\n chain: \"ETH\",\n txid: \"0xdeposit-hash\",\n wallet_address: \"0xYourDepositWallet\",\n amount: \"500.00\",\n currency: \"USDC\",\n originator_data: { name: \"Origin CASP SL\" },\n beneficiary_data: { name: \"Ana Diaz\" },\n originating_vasp: {\n name: \"Origin CASP SL\",\n lei: \"\",\n travel_address: \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.RegisterInbound(ctx, didit.TravelRuleInboundRequest{\n\tChain: \"ETH\",\n\tTxid: \"0xdeposit-hash\",\n\tWalletAddress: \"0xYourDepositWallet\",\n\tAmount: \"500.00\",\n\tCurrency: \"USDC\",\n\tOriginatorData: didit.Some(map[string]any{\"name\": \"Origin CASP SL\"}),\n\tBeneficiaryData: didit.Some(map[string]any{\"name\": \"Ana Diaz\"}),\n\tOriginatingVASP: didit.Some(didit.TravelRuleInboundRequestOriginatingVASP{\n\t\tName: didit.String(\"Origin CASP SL\"),\n\t\tLei: didit.String(\"\"),\n\t\tTravelAddress: didit.String(\"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.TravelRuleInboundRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().registerInbound(TravelRuleInboundRequest.builder()\n .chain(\"ETH\")\n .txid(\"0xdeposit-hash\")\n .walletAddress(\"0xYourDepositWallet\")\n .amount(\"500.00\")\n .currency(\"USDC\")\n .originatorData(Map.of(\"name\", \"Origin CASP SL\"))\n .beneficiaryData(Map.of(\"name\", \"Ana Diaz\"))\n .originatingVasp(TravelRuleInboundRequest.OriginatingVasp.builder()\n .name(\"Origin CASP SL\")\n .lei(\"\")\n .travelAddress(\"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\")\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->registerInbound([\n 'chain' => 'ETH',\n 'txid' => '0xdeposit-hash',\n 'wallet_address' => '0xYourDepositWallet',\n 'amount' => '500.00',\n 'currency' => 'USDC',\n 'originator_data' => ['name' => 'Origin CASP SL'],\n 'beneficiary_data' => ['name' => 'Ana Diaz'],\n 'originating_vasp' => [\n 'name' => 'Origin CASP SL',\n 'lei' => '',\n 'travel_address' => 'ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC',\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.register_inbound(\n chain: \"ETH\",\n txid: \"0xdeposit-hash\",\n wallet_address: \"0xYourDepositWallet\",\n amount: \"500.00\",\n currency: \"USDC\",\n originator_data: { name: \"Origin CASP SL\" },\n beneficiary_data: { name: \"Ana Diaz\" },\n originating_vasp: {\n name: \"Origin CASP SL\",\n lei: \"\",\n travel_address: \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.RegisterInboundAsync(new TravelRuleInboundRequest\n{\n Chain = \"ETH\",\n Txid = \"0xdeposit-hash\",\n WalletAddress = \"0xYourDepositWallet\",\n Amount = \"500.00\",\n Currency = \"USDC\",\n OriginatorData = new Dictionary { [\"name\"] = \"Origin CASP SL\" },\n BeneficiaryData = new Dictionary { [\"name\"] = \"Ana Diaz\" },\n OriginatingVasp = new TravelRuleInboundRequestOriginatingVasp\n {\n Name = \"Origin CASP SL\",\n Lei = \"\",\n TravelAddress = \"ta9JbXbsBSuS5ozArJRFVgvBHMVnDGUnrPPChSZYQsuZTn3kPrJXUQ7RSLUEJ5KjyPvr8C9sAxmPtZfGsQVKCi4n8ShxP9BkbDdbtjtA9aumNybAZ1BxC\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -34002,6 +37405,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/test-vasp/inbound/ \\\n -H 'x-api-key: YOUR_SANDBOX_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"beneficiary_wallet_address\":\"0xYourSandboxWallet\",\"scenario\":\"accept\",\"reference\":\"demo-001\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.travel_rule.trigger_test_vasp_inbound(\n beneficiary_wallet_address=\"0xYourSandboxWallet\",\n scenario=\"accept\",\n amount=\"1\",\n reference=\"demo-001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.travelRule.triggerTestVaspInbound({\n beneficiary_wallet_address: \"0xYourSandboxWallet\",\n scenario: \"accept\",\n amount: \"1\",\n reference: \"demo-001\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.TravelRule.TriggerTestVASPInbound(ctx, didit.TravelRuleTestVASPInboundRequest{\n\tBeneficiaryWalletAddress: \"0xYourSandboxWallet\",\n\tScenario: didit.Some(didit.TravelRuleTestVASPInboundRequestScenario(\"accept\")),\n\tAmount: didit.String(\"1\"),\n\tReference: didit.String(\"demo-001\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleTestVaspInboundRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().travelRule().triggerTestVaspInbound(TravelRuleTestVaspInboundRequest.builder()\n .beneficiaryWalletAddress(\"0xYourSandboxWallet\")\n .scenario(TravelRuleTestVaspInboundRequest.Scenario.of(\"accept\"))\n .amount(\"1\")\n .reference(\"demo-001\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->travelRule->triggerTestVaspInbound([\n 'beneficiary_wallet_address' => '0xYourSandboxWallet',\n 'scenario' => 'accept',\n 'amount' => '1',\n 'reference' => 'demo-001',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.travel_rule.trigger_test_vasp_inbound(\n beneficiary_wallet_address: \"0xYourSandboxWallet\",\n scenario: \"accept\",\n amount: \"1\",\n reference: \"demo-001\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.TravelRule.TriggerTestVaspInboundAsync(new TravelRuleTestVaspInboundRequest\n{\n BeneficiaryWalletAddress = \"0xYourSandboxWallet\",\n Scenario = new TravelRuleTestVaspInboundRequestScenario(\"accept\"),\n Amount = \"1\",\n Reference = \"demo-001\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -34085,6 +37523,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/widget-session/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"wallet_address\":\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\"chain\":\"ETH\",\"holder_name\":\"Jane Doe\",\"transaction_id\":\"99999999-aaaa-bbbb-cccc-dddddddddddd\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.create_widget_session(\n wallet_address=\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n chain=\"ETH\",\n holder_name=\"Jane Doe\",\n vendor_data=\"user-042\",\n transaction_id=\"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n expires_in_minutes=60,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.createWidgetSession({\n wallet_address: \"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n chain: \"ETH\",\n holder_name: \"Jane Doe\",\n vendor_data: \"user-042\",\n transaction_id: \"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n expires_in_minutes: 60,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.CreateWidgetSession(ctx, didit.TravelRuleWidgetSessionCreate{\n\tWalletAddress: didit.String(\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\"),\n\tChain: didit.String(\"ETH\"),\n\tHolderName: didit.String(\"Jane Doe\"),\n\tVendorData: didit.String(\"user-042\"),\n\tTransactionID: didit.String(\"99999999-aaaa-bbbb-cccc-dddddddddddd\"),\n\tExpiresInMinutes: didit.Int(60),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWidgetSessionCreate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().createWidgetSession(TravelRuleWidgetSessionCreate.builder()\n .walletAddress(\"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\")\n .chain(\"ETH\")\n .holderName(\"Jane Doe\")\n .vendorData(\"user-042\")\n .transactionId(\"99999999-aaaa-bbbb-cccc-dddddddddddd\")\n .expiresInMinutes(60L)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->createWidgetSession([\n 'wallet_address' => '0xd3b62acb76fb27a7f8961ec40fa11746b113aca9',\n 'chain' => 'ETH',\n 'holder_name' => 'Jane Doe',\n 'vendor_data' => 'user-042',\n 'transaction_id' => '99999999-aaaa-bbbb-cccc-dddddddddddd',\n 'expires_in_minutes' => 60,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.create_widget_session(\n wallet_address: \"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n chain: \"ETH\",\n holder_name: \"Jane Doe\",\n vendor_data: \"user-042\",\n transaction_id: \"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n expires_in_minutes: 60\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.CreateWidgetSessionAsync(new TravelRuleWidgetSessionCreate\n{\n WalletAddress = \"0xd3b62acb76fb27a7f8961ec40fa11746b113aca9\",\n Chain = \"ETH\",\n HolderName = \"Jane Doe\",\n VendorData = \"user-042\",\n TransactionId = \"99999999-aaaa-bbbb-cccc-dddddddddddd\",\n ExpiresInMinutes = 60,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -34504,6 +37977,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/OngoingMonitoringToggleRequest" + }, + "example": { + "is_enabled": true, + "didit_internal_id_list": [ + "5b9a0000-0000-4000-8000-00000000f00d" + ] } } } @@ -34537,6 +38016,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.set_ongoing_monitoring(\n is_enabled=True,\n didit_internal_id_list=[\"5b9a0000-0000-4000-8000-00000000f00d\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.setOngoingMonitoring({\n is_enabled: true,\n didit_internal_id_list: [\"5b9a0000-0000-4000-8000-00000000f00d\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.SetOngoingMonitoring(ctx, didit.OngoingMonitoringToggleRequest{\n\tIsEnabled: true,\n\tDiditInternalIDList: didit.Some([]string{\"5b9a0000-0000-4000-8000-00000000f00d\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.OngoingMonitoringToggleRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().setOngoingMonitoring(OngoingMonitoringToggleRequest.builder()\n .isEnabled(true)\n .diditInternalIdList(List.of(\"5b9a0000-0000-4000-8000-00000000f00d\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->setOngoingMonitoring([\n 'is_enabled' => true,\n 'didit_internal_id_list' => ['5b9a0000-0000-4000-8000-00000000f00d'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.set_ongoing_monitoring(\n is_enabled: true,\n didit_internal_id_list: [\"5b9a0000-0000-4000-8000-00000000f00d\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.SetOngoingMonitoringAsync(new OngoingMonitoringToggleRequest\n{\n IsEnabled = true,\n DiditInternalIdList = new string[] { \"5b9a0000-0000-4000-8000-00000000f00d\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -34606,6 +38122,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.retrieve_ongoing_monitoring_job(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.RetrieveOngoingMonitoringJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->retrieveOngoingMonitoringJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.retrieve_ongoing_monitoring_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.RetrieveOngoingMonitoringJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -34652,6 +38205,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/OngoingMonitoringToggleRequest" + }, + "example": { + "is_enabled": true, + "didit_internal_id_list": [ + "b0000000-0000-4000-8000-0000000000b1" + ] } } } @@ -34685,6 +38244,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.set_ongoing_monitoring(\n is_enabled=True,\n didit_internal_id_list=[\"b0000000-0000-4000-8000-0000000000b1\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.setOngoingMonitoring({\n is_enabled: true,\n didit_internal_id_list: [\"b0000000-0000-4000-8000-0000000000b1\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.SetOngoingMonitoring(ctx, didit.OngoingMonitoringToggleRequest{\n\tIsEnabled: true,\n\tDiditInternalIDList: didit.Some([]string{\"b0000000-0000-4000-8000-0000000000b1\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.OngoingMonitoringToggleRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().setOngoingMonitoring(OngoingMonitoringToggleRequest.builder()\n .isEnabled(true)\n .diditInternalIdList(List.of(\"b0000000-0000-4000-8000-0000000000b1\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->setOngoingMonitoring([\n 'is_enabled' => true,\n 'didit_internal_id_list' => ['b0000000-0000-4000-8000-0000000000b1'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.set_ongoing_monitoring(\n is_enabled: true,\n didit_internal_id_list: [\"b0000000-0000-4000-8000-0000000000b1\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.SetOngoingMonitoringAsync(new OngoingMonitoringToggleRequest\n{\n IsEnabled = true,\n DiditInternalIdList = new string[] { \"b0000000-0000-4000-8000-0000000000b1\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -34754,6 +38350,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.retrieve_ongoing_monitoring_job(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.RetrieveOngoingMonitoringJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().retrieveOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->retrieveOngoingMonitoringJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.retrieve_ongoing_monitoring_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.RetrieveOngoingMonitoringJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -34854,6 +38487,13 @@ "type": "string" } } + }, + "example": { + "is_enabled": true, + "session_numbers": [ + "1001", + "1002" + ] } } } @@ -34887,6 +38527,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.set_session_ongoing_monitoring(\n is_enabled=True,\n session_numbers=[\"1001\", \"1002\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.setSessionOngoingMonitoring({\n is_enabled: true,\n session_numbers: [\"1001\", \"1002\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.SetSessionOngoingMonitoring(ctx, didit.BusinessesSetSessionOngoingMonitoringParams{\n\tIsEnabled: true,\n\tSessionNumbers: didit.Some([]string{\"1001\", \"1002\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BusinessesSetSessionOngoingMonitoringParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().setSessionOngoingMonitoring(BusinessesSetSessionOngoingMonitoringParams.builder()\n .isEnabled(true)\n .sessionNumbers(List.of(\"1001\", \"1002\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->setSessionOngoingMonitoring([\n 'is_enabled' => true,\n 'session_numbers' => ['1001', '1002'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.set_session_ongoing_monitoring(\n is_enabled: true,\n session_numbers: [\"1001\", \"1002\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.SetSessionOngoingMonitoringAsync(new BusinessesSetSessionOngoingMonitoringParams\n{\n IsEnabled = true,\n SessionNumbers = new string[] { \"1001\", \"1002\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -34956,6 +38633,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.retrieve_session_ongoing_monitoring_job(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.retrieveSessionOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.RetrieveSessionOngoingMonitoringJob(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().retrieveSessionOngoingMonitoringJob(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->retrieveSessionOngoingMonitoringJob('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.retrieve_session_ongoing_monitoring_job(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.RetrieveSessionOngoingMonitoringJobAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -35141,7 +38855,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'status__in': 'OPEN,AWAITING_USER', 'ordering': '-due_at'},\n timeout=10,\n)\nresp.raise_for_status()\nfor case in resp.json()['results']:\n print(case['case_number'], case['title'], case['priority'], case['due_at'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.ListAutoPaging(ctx, didit.CasesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -35303,6 +39047,18 @@ "$ref": "#/components/schemas/CaseDuplicateCaseFraudSourceContextRequest" } } + }, + "example": { + "title": "Manual - Jane Doe", + "blueprint": "b1de0000-0000-4000-8000-000000000002", + "priority": "HIGH", + "subject": { + "type": "user", + "uuid": "5b9a0000-0000-4000-8000-00000000f00d" + }, + "tags": [ + "review" + ] } } } @@ -35316,7 +39072,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'title': 'Manual - Jane Doe',\n 'blueprint': 'b1de0000-0000-4000-8000-000000000002',\n 'priority': 'HIGH',\n 'subject': {'type': 'user', 'uuid': '5b9a0000-0000-4000-8000-00000000f00d'},\n },\n timeout=10,\n)\nresp.raise_for_status()\ncase = resp.json()\nprint(case['case_number'], case['uuid'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.create(\n title=\"Manual - Jane Doe\",\n blueprint=\"b1de0000-0000-4000-8000-000000000002\",\n priority=\"HIGH\",\n tags=[\"review\"],\n subject={\n \"type\": \"user\",\n \"uuid\": \"5b9a0000-0000-4000-8000-00000000f00d\",\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.create({\n title: \"Manual - Jane Doe\",\n blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n priority: \"HIGH\",\n tags: [\"review\"],\n subject: {\n type: \"user\",\n uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Create(ctx, didit.CasesCreateParams{\n\tTitle: \"Manual - Jane Doe\",\n\tBlueprint: didit.String(\"b1de0000-0000-4000-8000-000000000002\"),\n\tPriority: didit.Some(didit.CasesCreateParamsPriority(\"HIGH\")),\n\tTags: didit.Some([]string{\"review\"}),\n\tSubject: didit.Some(didit.CasesCreateParamsSubject{\n\t\tType: didit.Some(didit.CasesCreateParamsSubjectType(\"user\")),\n\t\tUUID: didit.String(\"5b9a0000-0000-4000-8000-00000000f00d\"),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().create(CasesCreateParams.builder()\n .title(\"Manual - Jane Doe\")\n .blueprint(\"b1de0000-0000-4000-8000-000000000002\")\n .priority(CasesCreateParams.Priority.of(\"HIGH\"))\n .tags(List.of(\"review\"))\n .subject(CasesCreateParams.Subject.builder()\n .type(CasesCreateParams.Subject.Type.of(\"user\"))\n .uuid(\"5b9a0000-0000-4000-8000-00000000f00d\")\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->create([\n 'title' => 'Manual - Jane Doe',\n 'blueprint' => 'b1de0000-0000-4000-8000-000000000002',\n 'priority' => 'HIGH',\n 'tags' => ['review'],\n 'subject' => [\n 'type' => 'user',\n 'uuid' => '5b9a0000-0000-4000-8000-00000000f00d',\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.create(\n title: \"Manual - Jane Doe\",\n blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n priority: \"HIGH\",\n tags: [\"review\"],\n subject: {\n type: \"user\",\n uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.CreateAsync(new CasesCreateParams\n{\n Title = \"Manual - Jane Doe\",\n Blueprint = \"b1de0000-0000-4000-8000-000000000002\",\n Priority = new CasesCreateParamsPriority(\"HIGH\"),\n Tags = new string[] { \"review\" },\n Subject = new CasesCreateParamsSubject\n {\n Type = new CasesCreateParamsSubjectType(\"user\"),\n Uuid = \"5b9a0000-0000-4000-8000-00000000f00d\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -35404,6 +39190,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.retrieve(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.retrieve(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Retrieve(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().retrieve(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->retrieve('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.retrieve(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RetrieveAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -35558,6 +39379,41 @@ "lang": "curl", "label": "curl (change team)", "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"team\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.update(\n \"c1a5e000-0000-4000-8000-000000000001\",\n priority=\"HIGH\",\n due_at=\"2026-11-01T00:00:00Z\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.update(\"c1a5e000-0000-4000-8000-000000000001\", {\n priority: \"HIGH\",\n due_at: \"2026-11-01T00:00:00Z\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Update(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesUpdateParams{\n\tPriority: didit.Some(didit.CasesUpdateParamsPriority(\"HIGH\")),\n\tDueAt: didit.Time(time.Date(2026, 11, 1, 0, 0, 0, 0, time.UTC)),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.OffsetDateTime;\nimport me.didit.Didit;\nimport me.didit.types.CasesUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().update(\"c1a5e000-0000-4000-8000-000000000001\", CasesUpdateParams.builder()\n .priority(CasesUpdateParams.Priority.of(\"HIGH\"))\n .dueAt(OffsetDateTime.parse(\"2026-11-01T00:00:00Z\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->update('c1a5e000-0000-4000-8000-000000000001', [\n 'priority' => 'HIGH',\n 'due_at' => '2026-11-01T00:00:00Z',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.update(\n \"c1a5e000-0000-4000-8000-000000000001\",\n priority: \"HIGH\",\n due_at: \"2026-11-01T00:00:00Z\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.UpdateAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesUpdateParams\n{\n Priority = new CasesUpdateParamsPriority(\"HIGH\"),\n DueAt = DateTimeOffset.Parse(\"2026-11-01T00:00:00Z\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -35701,6 +39557,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.delete(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.delete(\"c1a5e000-0000-4000-8000-000000000001\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Delete(ctx, \"c1a5e000-0000-4000-8000-000000000001\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().delete(\"c1a5e000-0000-4000-8000-000000000001\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->delete('c1a5e000-0000-4000-8000-000000000001');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.delete(\"c1a5e000-0000-4000-8000-000000000001\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.DeleteAsync(\"c1a5e000-0000-4000-8000-000000000001\");" } ], "responses": { @@ -35829,6 +39720,9 @@ "nullable": true } } + }, + "example": { + "assignee_user_id": "9a000000-0000-4000-8000-0000000000aa" } } } @@ -35838,6 +39732,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/assign/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"assignee_user_id\": \"9a000000-0000-4000-8000-0000000000aa\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.assign(\n \"c1a5e000-0000-4000-8000-000000000001\",\n assignee_user_id=\"9a000000-0000-4000-8000-0000000000aa\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.assign(\"c1a5e000-0000-4000-8000-000000000001\", {\n assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Assign(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesAssignParams{\n\tAssigneeUserID: didit.String(\"9a000000-0000-4000-8000-0000000000aa\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesAssignParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().assign(\"c1a5e000-0000-4000-8000-000000000001\", CasesAssignParams.builder()\n .assigneeUserId(\"9a000000-0000-4000-8000-0000000000aa\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->assign('c1a5e000-0000-4000-8000-000000000001', [\n 'assignee_user_id' => '9a000000-0000-4000-8000-0000000000aa',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.assign(\n \"c1a5e000-0000-4000-8000-000000000001\",\n assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.AssignAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesAssignParams\n{\n AssigneeUserId = \"9a000000-0000-4000-8000-0000000000aa\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -35967,7 +39896,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/resolve/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'resolution': 'FALSE_POSITIVE', 'note': 'Confirmed legitimate activity.'},\n timeout=10,\n)\nresp.raise_for_status()\ncase = resp.json()\nprint(case['status'], case['resolution'], case.get('pending_resolution'))" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.resolve(\n \"c1a5e000-0000-4000-8000-000000000001\",\n resolution=\"FALSE_POSITIVE\",\n note=\"Confirmed legitimate activity after reviewing documents.\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.resolve(\"c1a5e000-0000-4000-8000-000000000001\", {\n resolution: \"FALSE_POSITIVE\",\n note: \"Confirmed legitimate activity after reviewing documents.\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Resolve(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesResolveParams{\n\tResolution: \"FALSE_POSITIVE\",\n\tNote: didit.String(\"Confirmed legitimate activity after reviewing documents.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesResolveParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().resolve(\"c1a5e000-0000-4000-8000-000000000001\", CasesResolveParams.builder()\n .resolution(CasesResolveParams.Resolution.of(\"FALSE_POSITIVE\"))\n .note(\"Confirmed legitimate activity after reviewing documents.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->resolve('c1a5e000-0000-4000-8000-000000000001', [\n 'resolution' => 'FALSE_POSITIVE',\n 'note' => 'Confirmed legitimate activity after reviewing documents.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.resolve(\n \"c1a5e000-0000-4000-8000-000000000001\",\n resolution: \"FALSE_POSITIVE\",\n note: \"Confirmed legitimate activity after reviewing documents.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ResolveAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesResolveParams\n{\n Resolution = \"FALSE_POSITIVE\",\n Note = \"Confirmed legitimate activity after reviewing documents.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36104,6 +40063,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/reopen/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.reopen(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.reopen(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Reopen(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().reopen(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->reopen('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.reopen(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ReopenAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36178,6 +40172,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/request-info/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.request_info(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requestInfo(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RequestInfo(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requestInfo(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requestInfo('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.request_info(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RequestInfoAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36252,6 +40281,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/escalate/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.escalate(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.escalate(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Escalate(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().escalate(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->escalate('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.escalate(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.EscalateAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36336,6 +40400,9 @@ "format": "uuid" } } + }, + "example": { + "target_blueprint": "b1de0000-0000-4000-8000-000000000002" } } } @@ -36345,6 +40412,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/transfer/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"target_blueprint\": \"b1de0000-0000-4000-8000-000000000002\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.transfer(\n \"c1a5e000-0000-4000-8000-000000000001\",\n target_blueprint=\"b1de0000-0000-4000-8000-000000000002\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.transfer(\"c1a5e000-0000-4000-8000-000000000001\", {\n target_blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Transfer(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesTransferParams{\n\tTargetBlueprint: \"b1de0000-0000-4000-8000-000000000002\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesTransferParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().transfer(\"c1a5e000-0000-4000-8000-000000000001\", CasesTransferParams.builder()\n .targetBlueprint(\"b1de0000-0000-4000-8000-000000000002\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->transfer('c1a5e000-0000-4000-8000-000000000001', [\n 'target_blueprint' => 'b1de0000-0000-4000-8000-000000000002',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.transfer(\n \"c1a5e000-0000-4000-8000-000000000001\",\n target_blueprint: \"b1de0000-0000-4000-8000-000000000002\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.TransferAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesTransferParams\n{\n TargetBlueprint = \"b1de0000-0000-4000-8000-000000000002\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36419,6 +40521,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/approve/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.approve_resolution(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.approveResolution(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ApproveResolution(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().approveResolution(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->approveResolution('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.approve_resolution(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ApproveResolutionAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36547,6 +40684,9 @@ "nullable": true } } + }, + "example": { + "notes": "Needs a clearer rationale before this can be approved." } } } @@ -36556,6 +40696,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/reject-approval/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"notes\": \"Needs a clearer rationale before this can be approved.\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.reject_resolution(\n \"c1a5e000-0000-4000-8000-000000000001\",\n notes=\"Needs a clearer rationale before this can be approved.\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.rejectResolution(\"c1a5e000-0000-4000-8000-000000000001\", {\n notes: \"Needs a clearer rationale before this can be approved.\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RejectResolution(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesRejectResolutionParams{\n\tNotes: didit.String(\"Needs a clearer rationale before this can be approved.\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesRejectResolutionParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().rejectResolution(\"c1a5e000-0000-4000-8000-000000000001\", CasesRejectResolutionParams.builder()\n .notes(\"Needs a clearer rationale before this can be approved.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->rejectResolution('c1a5e000-0000-4000-8000-000000000001', [\n 'notes' => 'Needs a clearer rationale before this can be approved.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.reject_resolution(\n \"c1a5e000-0000-4000-8000-000000000001\",\n notes: \"Needs a clearer rationale before this can be approved.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RejectResolutionAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesRejectResolutionParams\n{\n Notes = \"Needs a clearer rationale before this can be approved.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36676,6 +40851,13 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CaseActionCaseEntityActionRequest" + }, + "example": { + "client_reference": "e1a00000-0000-4000-8000-000000000001", + "action": "add_tags", + "tags": [ + "source-of-funds-reviewed" + ] } }, "multipart/form-data": { @@ -36706,7 +40888,44 @@ "ApiKeyAuth": [] } ], - "description": "Apply one explicit action to the case subject. Supply a unique client_reference to obtain an action receipt and make retries idempotent. Reusing that reference with a different payload returns 409. With a reference, inspect receipt.status even when HTTP status is 200: FAILED means no action was applied. Repeating a failed request does not execute it again unless retry is true. Omitting client_reference preserves the legacy response." + "description": "Apply one explicit action to the case subject. Supply a unique client_reference to obtain an action receipt and make retries idempotent. Reusing that reference with a different payload returns 409. With a reference, inspect receipt.status even when HTTP status is 200: FAILED means no action was applied. Repeating a failed request does not execute it again unless retry is true. Omitting client_reference preserves the legacy response.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.apply_entity_action(\n \"11111111-2222-3333-4444-555555555555\",\n client_reference=\"e1a00000-0000-4000-8000-000000000001\",\n action=\"add_tags\",\n tags=[\"source-of-funds-reviewed\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.applyEntityAction(\"11111111-2222-3333-4444-555555555555\", {\n client_reference: \"e1a00000-0000-4000-8000-000000000001\",\n action: \"add_tags\",\n tags: [\"source-of-funds-reviewed\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ApplyEntityAction(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseActionCaseEntityActionRequest{\n\tClientReference: didit.String(\"e1a00000-0000-4000-8000-000000000001\"),\n\tAction: didit.CaseActionActionEnum(\"add_tags\"),\n\tTags: didit.Some([]string{\"source-of-funds-reviewed\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseActionActionEnum;\nimport me.didit.types.CaseActionCaseEntityActionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().applyEntityAction(\"11111111-2222-3333-4444-555555555555\", CaseActionCaseEntityActionRequest.builder()\n .clientReference(\"e1a00000-0000-4000-8000-000000000001\")\n .action(CaseActionActionEnum.of(\"add_tags\"))\n .tags(List.of(\"source-of-funds-reviewed\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->applyEntityAction('11111111-2222-3333-4444-555555555555', [\n 'client_reference' => 'e1a00000-0000-4000-8000-000000000001',\n 'action' => 'add_tags',\n 'tags' => ['source-of-funds-reviewed'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.apply_entity_action(\n \"11111111-2222-3333-4444-555555555555\",\n client_reference: \"e1a00000-0000-4000-8000-000000000001\",\n action: \"add_tags\",\n tags: [\"source-of-funds-reviewed\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ApplyEntityActionAsync(\"11111111-2222-3333-4444-555555555555\", new CaseActionCaseEntityActionRequest\n{\n ClientReference = \"e1a00000-0000-4000-8000-000000000001\",\n Action = \"add_tags\",\n Tags = new string[] { \"source-of-funds-reviewed\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/print/": { @@ -36762,6 +40981,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/print/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.print(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.print(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Print(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().print(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->print('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.print(\"c1a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.PrintAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -36880,6 +41134,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.notes.list(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.notes.list(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Notes.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesNotesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().notes().list(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->notes->list('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.notes.list(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Notes.ListAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] }, "post": { @@ -36930,6 +41221,9 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CaseCollaborationCaseNoteCreateRequest" + }, + "example": { + "comment": "Proof of address matches the ID document." } }, "multipart/form-data": { @@ -36979,7 +41273,44 @@ "ApiKeyAuth": [] } ], - "description": "Add a case-scoped note. An optional client_reference makes an unchanged retry return the same note without duplicate activity or notifications. reply_to must identify a live note in this case. The response includes a bounded parent excerpt without copying that excerpt into the saved reply." + "description": "Add a case-scoped note. An optional client_reference makes an unchanged retry return the same note without duplicate activity or notifications. reply_to must identify a live note in this case. The response includes a bounded parent excerpt without copying that excerpt into the saved reply.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.create(\n \"11111111-2222-3333-4444-555555555555\",\n comment=\"Proof of address matches the ID document.\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.create(\"11111111-2222-3333-4444-555555555555\", {\n comment: \"Proof of address matches the ID document.\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseCollaborationCaseNoteCreateRequest{\n\tComment: \"Proof of address matches the ID document.\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CaseCollaborationCaseNoteCreateRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().create(\"11111111-2222-3333-4444-555555555555\", CaseCollaborationCaseNoteCreateRequest.builder()\n .comment(\"Proof of address matches the ID document.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->notes->create('11111111-2222-3333-4444-555555555555', [\n 'comment' => 'Proof of address matches the ID document.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.create(\n \"11111111-2222-3333-4444-555555555555\",\n comment: \"Proof of address matches the ID document.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new CaseCollaborationCaseNoteCreateRequest\n{\n Comment = \"Proof of address matches the ID document.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/notes/{note_uuid}/": { @@ -37040,6 +41371,9 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CaseCollaborationPatchedCaseNoteUpdateRequest" + }, + "example": { + "is_pinned": true } }, "multipart/form-data": { @@ -37075,7 +41409,44 @@ "ApiKeyAuth": [] } ], - "description": "Pin or unpin an existing note. Pinned notes appear first. Pin changes are recorded in case activity and do not change evidence or source decisions." + "description": "Pin or unpin an existing note. Pinned notes appear first. Pin changes are recorded in case activity and do not change evidence or source decisions.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.update(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n is_pinned=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.update(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n {\n is_pinned: true,\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.Update(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", didit.CaseCollaborationPatchedCaseNoteUpdateRequest{\n\tIsPinned: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CaseCollaborationPatchedCaseNoteUpdateRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().update(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", CaseCollaborationPatchedCaseNoteUpdateRequest.builder()\n .isPinned(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->notes->update('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555', [\n 'is_pinned' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.update(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n is_pinned: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", new CaseCollaborationPatchedCaseNoteUpdateRequest\n{\n IsPinned = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] }, "delete": { "operationId": "delete_case_note", @@ -37142,6 +41513,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.notes.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.notes.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Notes.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().notes().delete(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->notes->delete('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.notes.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\"\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Notes.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");" + } ] } }, @@ -37217,6 +41625,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/notes/presign/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -F 'file=@evidence.pdf'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.create_attachment_upload(\n \"c1a5e000-0000-4000-8000-000000000001\",\n file=open(\"document.pdf\", \"rb\"),\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.createAttachmentUpload(\"c1a5e000-0000-4000-8000-000000000001\", {\n file: await fileFromPath(\"document.pdf\"),\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.CreateAttachmentUpload(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesNotesCreateAttachmentUploadParams{\n\tFile: didit.FileFromPath(\"document.pdf\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.CasesNotesCreateAttachmentUploadParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().createAttachmentUpload(\"c1a5e000-0000-4000-8000-000000000001\", CasesNotesCreateAttachmentUploadParams.builder()\n .file(Path.of(\"document.pdf\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->notes->createAttachmentUpload('c1a5e000-0000-4000-8000-000000000001', [\n 'file' => File::fromPath('document.pdf'),\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.create_attachment_upload(\n \"c1a5e000-0000-4000-8000-000000000001\",\n file: Pathname(\"document.pdf\")\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.CreateAttachmentUploadAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesNotesCreateAttachmentUploadParams\n{\n File = FileUpload.FromPath(\"document.pdf\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -37323,6 +41766,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/notes/presign/?s3_key=case-notes/c1a5e000-0000-4000-8000-000000000001/evidence.pdf' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.notes.retrieve_attachment_url(\n \"c1a5e000-0000-4000-8000-000000000001\",\n s3_key=\"your-s3-key\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.notes.retrieveAttachmentUrl(\"c1a5e000-0000-4000-8000-000000000001\", {\n s3_key: \"your-s3-key\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Notes.RetrieveAttachmentURL(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesNotesRetrieveAttachmentURLParams{\n\tS3Key: \"your-s3-key\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesNotesRetrieveAttachmentUrlParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().notes().retrieveAttachmentUrl(\"c1a5e000-0000-4000-8000-000000000001\", CasesNotesRetrieveAttachmentUrlParams.builder()\n .s3Key(\"your-s3-key\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->notes->retrieveAttachmentUrl('c1a5e000-0000-4000-8000-000000000001', [\n 's3_key' => 'your-s3-key',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.notes.retrieve_attachment_url(\n \"c1a5e000-0000-4000-8000-000000000001\",\n s3_key: \"your-s3-key\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Notes.RetrieveAttachmentUrlAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesNotesRetrieveAttachmentUrlParams\n{\n S3Key = \"your-s3-key\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -37419,6 +41897,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/links/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.links.list(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.links.list(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Links.List(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().links().list(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->links->list('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.links.list(\"c1a5e000-0000-4000-8000-000000000001\").each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Links.ListAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -37513,6 +42026,10 @@ "format": "uuid" } } + }, + "example": { + "entity_type": "transaction", + "entity_uuid": "77000000-0000-4000-8000-000000000077" } } } @@ -37522,6 +42039,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/links/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"entity_type\": \"transaction\", \"entity_uuid\": \"77000000-0000-4000-8000-000000000077\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.links.create(\n \"c1a5e000-0000-4000-8000-000000000001\",\n entity_type=\"transaction\",\n entity_uuid=\"77000000-0000-4000-8000-000000000077\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.links.create(\"c1a5e000-0000-4000-8000-000000000001\", {\n entity_type: \"transaction\",\n entity_uuid: \"77000000-0000-4000-8000-000000000077\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Links.Create(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesLinksCreateParams{\n\tEntityType: \"transaction\",\n\tEntityUUID: \"77000000-0000-4000-8000-000000000077\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesLinksCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().links().create(\"c1a5e000-0000-4000-8000-000000000001\", CasesLinksCreateParams.builder()\n .entityType(CasesLinksCreateParams.EntityType.of(\"transaction\"))\n .entityUuid(\"77000000-0000-4000-8000-000000000077\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->links->create('c1a5e000-0000-4000-8000-000000000001', [\n 'entity_type' => 'transaction',\n 'entity_uuid' => '77000000-0000-4000-8000-000000000077',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.links.create(\n \"c1a5e000-0000-4000-8000-000000000001\",\n entity_type: \"transaction\",\n entity_uuid: \"77000000-0000-4000-8000-000000000077\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Links.CreateAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesLinksCreateParams\n{\n EntityType = \"transaction\",\n EntityUuid = \"77000000-0000-4000-8000-000000000077\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -37622,6 +42174,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/links/11000000-0000-4000-8000-000000000004/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.links.delete(\n \"c1a5e000-0000-4000-8000-000000000001\",\n \"11000000-0000-4000-8000-000000000004\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.links.delete(\n \"c1a5e000-0000-4000-8000-000000000001\",\n \"11000000-0000-4000-8000-000000000004\",\n);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Links.Delete(ctx, \"c1a5e000-0000-4000-8000-000000000001\", \"11000000-0000-4000-8000-000000000004\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().links().delete(\"c1a5e000-0000-4000-8000-000000000001\", \"11000000-0000-4000-8000-000000000004\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->links->delete('c1a5e000-0000-4000-8000-000000000001', '11000000-0000-4000-8000-000000000004');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.links.delete(\n \"c1a5e000-0000-4000-8000-000000000001\",\n \"11000000-0000-4000-8000-000000000004\"\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Links.DeleteAsync(\"c1a5e000-0000-4000-8000-000000000001\", \"11000000-0000-4000-8000-000000000004\");" } ], "responses": { @@ -37709,6 +42296,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/events/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.list_events(\n \"c1a5e000-0000-4000-8000-000000000001\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.listEvents(\"c1a5e000-0000-4000-8000-000000000001\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.ListEventsAutoPaging(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesListEventsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().listEvents(\"c1a5e000-0000-4000-8000-000000000001\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->listEvents('c1a5e000-0000-4000-8000-000000000001') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.list_events(\"c1a5e000-0000-4000-8000-000000000001\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.ListEventsAsync(\"c1a5e000-0000-4000-8000-000000000001\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -37805,6 +42427,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/checklist/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.checklist.list(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.checklist.list(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Checklist.List(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().checklist().list(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->checklist->list('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.checklist.list(\"c1a5e000-0000-4000-8000-000000000001\").each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Checklist.ListAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -37902,6 +42559,9 @@ "type": "boolean" } } + }, + "example": { + "is_completed": true } } } @@ -37911,6 +42571,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/checklist/c4ec0000-0000-4000-8000-000000000005/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"is_completed\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.checklist.toggle_item(\n \"c1a5e000-0000-4000-8000-000000000001\",\n \"c4ec0000-0000-4000-8000-000000000005\",\n is_completed=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.checklist.toggleItem(\n \"c1a5e000-0000-4000-8000-000000000001\",\n \"c4ec0000-0000-4000-8000-000000000005\",\n {\n is_completed: true,\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Checklist.ToggleItem(ctx, \"c1a5e000-0000-4000-8000-000000000001\", \"c4ec0000-0000-4000-8000-000000000005\", didit.CasesChecklistToggleItemParams{\n\tIsCompleted: true,\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesChecklistToggleItemParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().checklist().toggleItem(\"c1a5e000-0000-4000-8000-000000000001\", \"c4ec0000-0000-4000-8000-000000000005\", CasesChecklistToggleItemParams.builder()\n .isCompleted(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->checklist->toggleItem('c1a5e000-0000-4000-8000-000000000001', 'c4ec0000-0000-4000-8000-000000000005', [\n 'is_completed' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.checklist.toggle_item(\n \"c1a5e000-0000-4000-8000-000000000001\",\n \"c4ec0000-0000-4000-8000-000000000005\",\n is_completed: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Checklist.ToggleItemAsync(\"c1a5e000-0000-4000-8000-000000000001\", \"c4ec0000-0000-4000-8000-000000000005\", new CasesChecklistToggleItemParams\n{\n IsCompleted = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -37985,6 +42680,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/aml/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.list_aml_hits(\n \"c1a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.listAmlHits(\"c1a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ListAMLHits(ctx, \"c1a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().listAmlHits(\"c1a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->listAmlHits('c1a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.list_aml_hits(\"c1a5e000-0000-4000-8000-000000000001\").each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ListAmlHitsAsync(\"c1a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -38132,6 +42862,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/statistics/?date_from=2026-06-01&date_to=2026-06-30' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.retrieve_statistics()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.retrieveStatistics();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RetrieveStatistics(ctx, didit.CasesRetrieveStatisticsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().retrieveStatistics();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->retrieveStatistics();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.retrieve_statistics\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RetrieveStatisticsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -38523,6 +43288,13 @@ "nullable": true } } + }, + "example": { + "case_uuids": [ + "c1a5e000-0000-4000-8000-000000000001" + ], + "status": "RESOLVED", + "resolution": "FALSE_POSITIVE" } } } @@ -38532,6 +43304,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/bulk/status/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"case_uuids\": [\"c1a5e000-0000-4000-8000-000000000001\"], \"status\": \"RESOLVED\", \"resolution\": \"FALSE_POSITIVE\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.bulk_update_status(\n case_uuids=[\"c1a5e000-0000-4000-8000-000000000001\"],\n status=\"RESOLVED\",\n resolution=\"FALSE_POSITIVE\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.bulkUpdateStatus({\n case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n status: \"RESOLVED\",\n resolution: \"FALSE_POSITIVE\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.BulkUpdateStatus(ctx, didit.CasesBulkUpdateStatusParams{\n\tCaseUUIDs: []string{\"c1a5e000-0000-4000-8000-000000000001\"},\n\tStatus: \"RESOLVED\",\n\tResolution: didit.Some(didit.CasesBulkUpdateStatusParamsResolution(\"FALSE_POSITIVE\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesBulkUpdateStatusParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().bulkUpdateStatus(CasesBulkUpdateStatusParams.builder()\n .caseUuids(List.of(\"c1a5e000-0000-4000-8000-000000000001\"))\n .status(CasesBulkUpdateStatusParams.Status.of(\"RESOLVED\"))\n .resolution(CasesBulkUpdateStatusParams.Resolution.of(\"FALSE_POSITIVE\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->bulkUpdateStatus([\n 'case_uuids' => ['c1a5e000-0000-4000-8000-000000000001'],\n 'status' => 'RESOLVED',\n 'resolution' => 'FALSE_POSITIVE',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.bulk_update_status(\n case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n status: \"RESOLVED\",\n resolution: \"FALSE_POSITIVE\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.BulkUpdateStatusAsync(new CasesBulkUpdateStatusParams\n{\n CaseUuids = new string[] { \"c1a5e000-0000-4000-8000-000000000001\" },\n Status = \"RESOLVED\",\n Resolution = new CasesBulkUpdateStatusParamsResolution(\"FALSE_POSITIVE\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -38624,6 +43431,12 @@ "nullable": true } } + }, + "example": { + "case_uuids": [ + "c1a5e000-0000-4000-8000-000000000001" + ], + "assignee_user_id": "9a000000-0000-4000-8000-0000000000aa" } } } @@ -38633,6 +43446,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/bulk/assign/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"case_uuids\": [\"c1a5e000-0000-4000-8000-000000000001\"], \"assignee_user_id\": \"9a000000-0000-4000-8000-0000000000aa\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.bulk_assign(\n case_uuids=[\"c1a5e000-0000-4000-8000-000000000001\"],\n assignee_user_id=\"9a000000-0000-4000-8000-0000000000aa\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.bulkAssign({\n case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.BulkAssign(ctx, didit.CasesBulkAssignParams{\n\tCaseUUIDs: []string{\"c1a5e000-0000-4000-8000-000000000001\"},\n\tAssigneeUserID: didit.String(\"9a000000-0000-4000-8000-0000000000aa\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesBulkAssignParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().bulkAssign(CasesBulkAssignParams.builder()\n .caseUuids(List.of(\"c1a5e000-0000-4000-8000-000000000001\"))\n .assigneeUserId(\"9a000000-0000-4000-8000-0000000000aa\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->bulkAssign([\n 'case_uuids' => ['c1a5e000-0000-4000-8000-000000000001'],\n 'assignee_user_id' => '9a000000-0000-4000-8000-0000000000aa',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.bulk_assign(\n case_uuids: [\"c1a5e000-0000-4000-8000-000000000001\"],\n assignee_user_id: \"9a000000-0000-4000-8000-0000000000aa\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.BulkAssignAsync(new CasesBulkAssignParams\n{\n CaseUuids = new string[] { \"c1a5e000-0000-4000-8000-000000000001\" },\n AssigneeUserId = \"9a000000-0000-4000-8000-0000000000aa\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -38716,6 +43564,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.blueprints.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.blueprints.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Blueprints.ListAutoPaging(ctx, didit.CasesBlueprintsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().blueprints().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Blueprints.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -38880,6 +43763,22 @@ "description": "Set false to save a never-published draft. The record remains inactive at version 0 until the draft is explicitly published. Omitting this field preserves immediate creation for existing integrations." } } + }, + "example": { + "name": "AML investigation", + "assignee_pool": [ + "9a000000-0000-4000-8000-0000000000aa" + ], + "assignment_method": "AUTOMATIC", + "max_active_cases": 15, + "require_resolution_note": true, + "content_config": { + "aml_control": { + "enabled": true, + "financial": true, + "identity": false + } + } } } } @@ -38889,6 +43788,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"name\": \"AML investigation\", \"assignee_pool\": [\"9a000000-0000-4000-8000-0000000000aa\"], \"assignment_method\": \"AUTOMATIC\", \"max_active_cases\": 15, \"require_resolution_note\": true, \"content_config\": {\"aml_control\": {\"enabled\": true, \"financial\": true, \"identity\": false}}}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.create(\n name=\"AML investigation\",\n assignee_pool=[\"9a000000-0000-4000-8000-0000000000aa\"],\n assignment_method=\"AUTOMATIC\",\n max_active_cases=15,\n require_resolution_note=True,\n content_config={\n \"aml_control\": {\n \"enabled\": True,\n \"financial\": True,\n \"identity\": False,\n },\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.create({\n name: \"AML investigation\",\n assignee_pool: [\"9a000000-0000-4000-8000-0000000000aa\"],\n assignment_method: \"AUTOMATIC\",\n max_active_cases: 15,\n require_resolution_note: true,\n content_config: {\n aml_control: {\n enabled: true,\n financial: true,\n identity: false,\n },\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Create(ctx, didit.CasesBlueprintsCreateParams{\n\tName: \"AML investigation\",\n\tAssigneePool: []string{\"9a000000-0000-4000-8000-0000000000aa\"},\n\tAssignmentMethod: didit.Some(didit.CasesBlueprintsCreateParamsAssignmentMethod(\"AUTOMATIC\")),\n\tMaxActiveCases: didit.Int(15),\n\tRequireResolutionNote: didit.Bool(true),\n\tContentConfig: didit.Some(didit.CaseContentConfigParam{\n\t\tAMLControl: didit.Some(didit.CaseContentConfigParamAMLControl{\n\t\t\tEnabled: didit.Bool(true),\n\t\t\tFinancial: didit.Bool(true),\n\t\t\tIdentity: didit.Bool(false),\n\t\t}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseContentConfig;\nimport me.didit.types.CasesBlueprintsCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().create(CasesBlueprintsCreateParams.builder()\n .name(\"AML investigation\")\n .assigneePool(List.of(\"9a000000-0000-4000-8000-0000000000aa\"))\n .assignmentMethod(CasesBlueprintsCreateParams.AssignmentMethod.of(\"AUTOMATIC\"))\n .maxActiveCases(15L)\n .requireResolutionNote(true)\n .contentConfig(CaseContentConfig.builder()\n .amlControl(CaseContentConfig.AmlControl.builder()\n .enabled(true)\n .financial(true)\n .identity(false)\n .build())\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->create([\n 'name' => 'AML investigation',\n 'assignee_pool' => ['9a000000-0000-4000-8000-0000000000aa'],\n 'assignment_method' => 'AUTOMATIC',\n 'max_active_cases' => 15,\n 'require_resolution_note' => true,\n 'content_config' => [\n 'aml_control' => [\n 'enabled' => true,\n 'financial' => true,\n 'identity' => false,\n ],\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.create(\n name: \"AML investigation\",\n assignee_pool: [\"9a000000-0000-4000-8000-0000000000aa\"],\n assignment_method: \"AUTOMATIC\",\n max_active_cases: 15,\n require_resolution_note: true,\n content_config: {\n aml_control: {\n enabled: true,\n financial: true,\n identity: false,\n },\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.CreateAsync(new CasesBlueprintsCreateParams\n{\n Name = \"AML investigation\",\n AssigneePool = new string[] { \"9a000000-0000-4000-8000-0000000000aa\" },\n AssignmentMethod = new CasesBlueprintsCreateParamsAssignmentMethod(\"AUTOMATIC\"),\n MaxActiveCases = 15,\n RequireResolutionNote = true,\n ContentConfig = new CaseContentConfig\n {\n AmlControl = new CaseContentConfigAmlControl\n {\n Enabled = true,\n Financial = true,\n Identity = false,\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -38973,6 +43907,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/b1de0000-0000-4000-8000-000000000002/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.retrieve(\n \"b1de0000-0000-4000-8000-000000000002\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.retrieve(\"b1de0000-0000-4000-8000-000000000002\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Retrieve(ctx, \"b1de0000-0000-4000-8000-000000000002\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().retrieve(\"b1de0000-0000-4000-8000-000000000002\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->retrieve('b1de0000-0000-4000-8000-000000000002');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.retrieve(\"b1de0000-0000-4000-8000-000000000002\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.RetrieveAsync(\"b1de0000-0000-4000-8000-000000000002\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39118,6 +44087,9 @@ "description": "The version opened by the editor. A stale version returns 409 without changing the review policy." } } + }, + "example": { + "transfer_enabled": true } } } @@ -39127,6 +44099,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/b1de0000-0000-4000-8000-000000000002/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"transfer_enabled\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.update(\n \"b1de0000-0000-4000-8000-000000000002\",\n transfer_enabled=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.update(\"b1de0000-0000-4000-8000-000000000002\", {\n transfer_enabled: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Update(ctx, \"b1de0000-0000-4000-8000-000000000002\", didit.CasesBlueprintsUpdateParams{\n\tTransferEnabled: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesBlueprintsUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().update(\"b1de0000-0000-4000-8000-000000000002\", CasesBlueprintsUpdateParams.builder()\n .transferEnabled(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->update('b1de0000-0000-4000-8000-000000000002', [\n 'transfer_enabled' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.update(\n \"b1de0000-0000-4000-8000-000000000002\",\n transfer_enabled: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.UpdateAsync(\"b1de0000-0000-4000-8000-000000000002\", new CasesBlueprintsUpdateParams\n{\n TransferEnabled = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39202,6 +44209,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/b1de0000-0000-4000-8000-000000000002/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.blueprints.delete(\n \"b1de0000-0000-4000-8000-000000000002\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.blueprints.delete(\"b1de0000-0000-4000-8000-000000000002\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Blueprints.Delete(ctx, \"b1de0000-0000-4000-8000-000000000002\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().blueprints().delete(\"b1de0000-0000-4000-8000-000000000002\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->delete('b1de0000-0000-4000-8000-000000000002');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.delete(\"b1de0000-0000-4000-8000-000000000002\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Blueprints.DeleteAsync(\"b1de0000-0000-4000-8000-000000000002\");" } ], "responses": { @@ -39258,6 +44300,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/presets/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.list_presets()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.listPresets();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.ListPresets(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().listPresets();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->listPresets();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.list_presets\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.ListPresetsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39363,6 +44440,12 @@ "description": "Subset of screening_hit, aml_investigation, suspicious_activity, kyc. Omit to install all." } } + }, + "example": { + "preset_keys": [ + "aml_investigation", + "kyc" + ] } } } @@ -39372,6 +44455,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/blueprints/presets/install/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"preset_keys\": [\"aml_investigation\", \"kyc\"]}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.install_presets(\n preset_keys=[\"aml_investigation\", \"kyc\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.installPresets({\n preset_keys: [\"aml_investigation\", \"kyc\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.InstallPresets(ctx, didit.CasesBlueprintsInstallPresetsParams{\n\tPresetKeys: didit.Some([]string{\"aml_investigation\", \"kyc\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CasesBlueprintsInstallPresetsParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().installPresets(CasesBlueprintsInstallPresetsParams.builder()\n .presetKeys(List.of(\"aml_investigation\", \"kyc\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->installPresets([\n 'preset_keys' => ['aml_investigation', 'kyc'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.install_presets(preset_keys: [\"aml_investigation\", \"kyc\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.InstallPresetsAsync(new CasesBlueprintsInstallPresetsParams\n{\n PresetKeys = new string[] { \"aml_investigation\", \"kyc\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39465,6 +44583,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.report_templates.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.reportTemplates.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.ReportTemplates.ListAutoPaging(ctx, didit.ReportTemplatesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.reportTemplates().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "reportTemplates->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.report_templates.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.ReportTemplates.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -39580,6 +44733,16 @@ "description": "Reusable goAML header defaults. Template-level obligatory fields: rentity_id, submission_code, and currency_code_local (3-letter). Optional: enabled_fields (which optional report blocks to include) plus reporting_person, location, reason, and action defaults. Per-filing header fields (action, submission_date, transactions, jurisdiction) are enforced when the report is validated or finalized, not on the template." } } + }, + "example": { + "name": "US SAR default", + "jurisdiction": "US", + "report_type": "SAR", + "field_config": { + "rentity_id": "FIU-US-00123", + "submission_code": "E", + "currency_code_local": "USD" + } } } } @@ -39593,7 +44756,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'name': 'US SAR default',\n 'jurisdiction': 'US',\n 'report_type': 'SAR',\n 'field_config': {'rentity_id': 'FIU-US-00123', 'submission_code': 'E', 'currency_code_local': 'USD'},\n },\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json()['uuid'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.report_templates.create(\n name=\"US SAR default\",\n jurisdiction=\"US\",\n report_type=\"SAR\",\n field_config={\"rentity_id\": \"FIU-US-00123\", \"submission_code\": \"E\", \"currency_code_local\": \"USD\"},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.reportTemplates.create({\n name: \"US SAR default\",\n jurisdiction: \"US\",\n report_type: \"SAR\",\n field_config: { rentity_id: \"FIU-US-00123\", submission_code: \"E\", currency_code_local: \"USD\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Create(ctx, didit.ReportTemplatesCreateParams{\n\tName: \"US SAR default\",\n\tJurisdiction: \"US\",\n\tReportType: \"SAR\",\n\tFieldConfig: didit.Some(map[string]any{\"rentity_id\": \"FIU-US-00123\", \"submission_code\": \"E\", \"currency_code_local\": \"USD\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.ReportTemplatesCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.reportTemplates().create(ReportTemplatesCreateParams.builder()\n .name(\"US SAR default\")\n .jurisdiction(\"US\")\n .reportType(ReportTemplatesCreateParams.ReportType.of(\"SAR\"))\n .fieldConfig(Map.of(\"rentity_id\", \"FIU-US-00123\", \"submission_code\", \"E\", \"currency_code_local\", \"USD\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "reportTemplates->create([\n 'name' => 'US SAR default',\n 'jurisdiction' => 'US',\n 'report_type' => 'SAR',\n 'field_config' => ['rentity_id' => 'FIU-US-00123', 'submission_code' => 'E', 'currency_code_local' => 'USD'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.report_templates.create(\n name: \"US SAR default\",\n jurisdiction: \"US\",\n report_type: \"SAR\",\n field_config: { rentity_id: \"FIU-US-00123\", submission_code: \"E\", currency_code_local: \"USD\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.ReportTemplates.CreateAsync(new ReportTemplatesCreateParams\n{\n Name = \"US SAR default\",\n Jurisdiction = \"US\",\n ReportType = \"SAR\",\n FieldConfig = new Dictionary { [\"rentity_id\"] = \"FIU-US-00123\", [\"submission_code\"] = \"E\", [\"currency_code_local\"] = \"USD\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39686,6 +44879,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/7ec00000-0000-4000-8000-000000000006/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.report_templates.retrieve(\n \"7ec00000-0000-4000-8000-000000000006\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.reportTemplates.retrieve(\"7ec00000-0000-4000-8000-000000000006\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Retrieve(ctx, \"7ec00000-0000-4000-8000-000000000006\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.reportTemplates().retrieve(\"7ec00000-0000-4000-8000-000000000006\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "reportTemplates->retrieve('7ec00000-0000-4000-8000-000000000006');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.report_templates.retrieve(\"7ec00000-0000-4000-8000-000000000006\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.ReportTemplates.RetrieveAsync(\"7ec00000-0000-4000-8000-000000000006\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39787,6 +45015,11 @@ "description": "Reusable goAML header defaults. Template-level obligatory fields: rentity_id, submission_code, and currency_code_local (3-letter). Optional: enabled_fields (which optional report blocks to include) plus reporting_person, location, reason, and action defaults. Per-filing header fields (action, submission_date, transactions, jurisdiction) are enforced when the report is validated or finalized, not on the template." } } + }, + "example": { + "field_config": { + "rentity_id": "FIU-US-00124" + } } } } @@ -39796,6 +45029,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/7ec00000-0000-4000-8000-000000000006/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"field_config\": {\"rentity_id\": \"FIU-US-00124\"}}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.report_templates.update(\n \"7ec00000-0000-4000-8000-000000000006\",\n field_config={\"rentity_id\": \"FIU-US-00124\"},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.reportTemplates.update(\"7ec00000-0000-4000-8000-000000000006\", {\n field_config: { rentity_id: \"FIU-US-00124\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.ReportTemplates.Update(ctx, \"7ec00000-0000-4000-8000-000000000006\", didit.ReportTemplatesUpdateParams{\n\tFieldConfig: didit.Some(map[string]any{\"rentity_id\": \"FIU-US-00124\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.ReportTemplatesUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.reportTemplates().update(\"7ec00000-0000-4000-8000-000000000006\", ReportTemplatesUpdateParams.builder()\n .fieldConfig(Map.of(\"rentity_id\", \"FIU-US-00124\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "reportTemplates->update('7ec00000-0000-4000-8000-000000000006', [\n 'field_config' => ['rentity_id' => 'FIU-US-00124'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.report_templates.update(\n \"7ec00000-0000-4000-8000-000000000006\",\n field_config: { rentity_id: \"FIU-US-00124\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.ReportTemplates.UpdateAsync(\"7ec00000-0000-4000-8000-000000000006\", new ReportTemplatesUpdateParams\n{\n FieldConfig = new Dictionary { [\"rentity_id\"] = \"FIU-US-00124\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -39868,6 +45136,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/report-templates/7ec00000-0000-4000-8000-000000000006/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.report_templates.delete(\n \"7ec00000-0000-4000-8000-000000000006\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.reportTemplates.delete(\"7ec00000-0000-4000-8000-000000000006\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.ReportTemplates.Delete(ctx, \"7ec00000-0000-4000-8000-000000000006\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.reportTemplates().delete(\"7ec00000-0000-4000-8000-000000000006\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "reportTemplates->delete('7ec00000-0000-4000-8000-000000000006');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.report_templates.delete(\"7ec00000-0000-4000-8000-000000000006\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.ReportTemplates.DeleteAsync(\"7ec00000-0000-4000-8000-000000000006\");" } ], "responses": { @@ -39955,6 +45258,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/regulatory-reports/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.regulatory_reports.list(\n \"c1a5e000-0000-4000-8000-000000000001\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.regulatoryReports.list(\"c1a5e000-0000-4000-8000-000000000001\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.RegulatoryReports.ListAutoPaging(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesRegulatoryReportsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().regulatoryReports().list(\"c1a5e000-0000-4000-8000-000000000001\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->regulatoryReports->list('c1a5e000-0000-4000-8000-000000000001') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.regulatory_reports.list(\"c1a5e000-0000-4000-8000-000000000001\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.RegulatoryReports.ListAsync(\"c1a5e000-0000-4000-8000-000000000001\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -40153,6 +45491,9 @@ } } } + }, + "example": { + "template": "7ec00000-0000-4000-8000-000000000006" } } } @@ -40162,6 +45503,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/regulatory-reports/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"template\": \"7ec00000-0000-4000-8000-000000000006\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.regulatory_reports.create(\n \"c1a5e000-0000-4000-8000-000000000001\",\n template=\"7ec00000-0000-4000-8000-000000000006\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.regulatoryReports.create(\"c1a5e000-0000-4000-8000-000000000001\", {\n template: \"7ec00000-0000-4000-8000-000000000006\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RegulatoryReports.Create(ctx, \"c1a5e000-0000-4000-8000-000000000001\", didit.CasesRegulatoryReportsCreateParams{\n\tTemplate: didit.String(\"7ec00000-0000-4000-8000-000000000006\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasesRegulatoryReportsCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().regulatoryReports().create(\"c1a5e000-0000-4000-8000-000000000001\", CasesRegulatoryReportsCreateParams.builder()\n .template(\"7ec00000-0000-4000-8000-000000000006\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->regulatoryReports->create('c1a5e000-0000-4000-8000-000000000001', [\n 'template' => '7ec00000-0000-4000-8000-000000000006',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.regulatory_reports.create(\n \"c1a5e000-0000-4000-8000-000000000001\",\n template: \"7ec00000-0000-4000-8000-000000000006\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RegulatoryReports.CreateAsync(\"c1a5e000-0000-4000-8000-000000000001\", new CasesRegulatoryReportsCreateParams\n{\n Template = \"7ec00000-0000-4000-8000-000000000006\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -40300,6 +45676,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.regulatory_reports.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.regulatoryReports.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.RegulatoryReports.ListAutoPaging(ctx, didit.RegulatoryReportsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.regulatoryReports().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.regulatory_reports.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.RegulatoryReports.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -40493,6 +45904,10 @@ } } } + }, + "example": { + "case": "c1a5e000-0000-4000-8000-000000000001", + "template": "7ec00000-0000-4000-8000-000000000006" } } } @@ -40502,6 +45917,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"case\": \"c1a5e000-0000-4000-8000-000000000001\", \"template\": \"7ec00000-0000-4000-8000-000000000006\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.create(\n case=\"c1a5e000-0000-4000-8000-000000000001\",\n template=\"7ec00000-0000-4000-8000-000000000006\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.create({\n case: \"c1a5e000-0000-4000-8000-000000000001\",\n template: \"7ec00000-0000-4000-8000-000000000006\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Create(ctx, didit.RegulatoryReportsCreateParams{\n\tCase: \"c1a5e000-0000-4000-8000-000000000001\",\n\tTemplate: \"7ec00000-0000-4000-8000-000000000006\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.RegulatoryReportsCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().create(RegulatoryReportsCreateParams.builder()\n .case_(\"c1a5e000-0000-4000-8000-000000000001\")\n .template(\"7ec00000-0000-4000-8000-000000000006\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->create([\n 'case' => 'c1a5e000-0000-4000-8000-000000000001',\n 'template' => '7ec00000-0000-4000-8000-000000000006',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.create(\n case: \"c1a5e000-0000-4000-8000-000000000001\",\n template: \"7ec00000-0000-4000-8000-000000000006\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.CreateAsync(new RegulatoryReportsCreateParams\n{\n Case = \"c1a5e000-0000-4000-8000-000000000001\",\n Template = \"7ec00000-0000-4000-8000-000000000006\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -40591,6 +46041,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.retrieve(\n \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.retrieve(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Retrieve(ctx, \"5ec00000-0000-4000-8000-000000000007\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().retrieve(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->retrieve('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.retrieve(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.RetrieveAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -40759,6 +46244,10 @@ } } } + }, + "example": { + "rentity_id": "FIU-US-00123", + "currency_code_local": "USD" } } } @@ -40768,6 +46257,41 @@ "lang": "curl", "label": "curl", "source": "curl -X PATCH 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"rentity_id\": \"FIU-US-00123\", \"currency_code_local\": \"USD\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.update(\n \"5ec00000-0000-4000-8000-000000000007\",\n rentity_id=\"FIU-US-00123\",\n currency_code_local=\"USD\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.update(\"5ec00000-0000-4000-8000-000000000007\", {\n rentity_id: \"FIU-US-00123\",\n currency_code_local: \"USD\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Update(ctx, \"5ec00000-0000-4000-8000-000000000007\", didit.RegulatoryReportsUpdateParams{\n\tRentityID: didit.String(\"FIU-US-00123\"),\n\tCurrencyCodeLocal: didit.String(\"USD\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.RegulatoryReportsUpdateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().update(\"5ec00000-0000-4000-8000-000000000007\", RegulatoryReportsUpdateParams.builder()\n .rentityId(\"FIU-US-00123\")\n .currencyCodeLocal(\"USD\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->update('5ec00000-0000-4000-8000-000000000007', [\n 'rentity_id' => 'FIU-US-00123',\n 'currency_code_local' => 'USD',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.update(\n \"5ec00000-0000-4000-8000-000000000007\",\n rentity_id: \"FIU-US-00123\",\n currency_code_local: \"USD\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.UpdateAsync(\"5ec00000-0000-4000-8000-000000000007\", new RegulatoryReportsUpdateParams\n{\n RentityId = \"FIU-US-00123\",\n CurrencyCodeLocal = \"USD\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -40860,6 +46384,36 @@ "lang": "curl", "label": "curl (finalized report)", "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"confirm_delete\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.regulatory_reports.delete(\n \"5ec00000-0000-4000-8000-000000000007\",\n confirm_delete=True,\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.regulatoryReports.delete(\"5ec00000-0000-4000-8000-000000000007\", {\n confirm_delete: true,\n});" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.RegulatoryReportsDeleteParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.regulatoryReports().delete(\"5ec00000-0000-4000-8000-000000000007\", RegulatoryReportsDeleteParams.builder()\n .confirmDelete(true)\n .build());" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->delete('5ec00000-0000-4000-8000-000000000007', [\n 'confirm_delete' => true,\n]);" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.regulatory_reports.delete(\n \"5ec00000-0000-4000-8000-000000000007\",\n confirm_delete: true\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.RegulatoryReports.DeleteAsync(\"5ec00000-0000-4000-8000-000000000007\", new RegulatoryReportsDeleteParams\n{\n ConfirmDelete = true,\n});" } ], "responses": { @@ -40985,6 +46539,9 @@ "example": { "confirm_delete": true } + }, + "example": { + "confirm_delete": true } } } @@ -41044,6 +46601,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/validate/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.validate(\n \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.validate(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Validate(ctx, \"5ec00000-0000-4000-8000-000000000007\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().validate(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->validate('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.validate(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.ValidateAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -41150,7 +46742,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/finalize/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=30,\n)\nif resp.status_code == 400:\n print('Validation failed:', resp.json()['errors'])\nelse:\n resp.raise_for_status()\n report = resp.json()\n print(report['status'], report['report_number'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.finalize(\n \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.finalize(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.Finalize(ctx, \"5ec00000-0000-4000-8000-000000000007\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().finalize_(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->finalize('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.finalize(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.FinalizeAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -41282,6 +46904,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/regulatory-reports/5ec00000-0000-4000-8000-000000000007/download-url/?file=xml' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.regulatory_reports.retrieve_download_url(\n \"5ec00000-0000-4000-8000-000000000007\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.regulatoryReports.retrieveDownloadUrl(\"5ec00000-0000-4000-8000-000000000007\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.RegulatoryReports.RetrieveDownloadURL(ctx, \"5ec00000-0000-4000-8000-000000000007\", didit.RegulatoryReportsRetrieveDownloadURLParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.regulatoryReports().retrieveDownloadUrl(\"5ec00000-0000-4000-8000-000000000007\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "regulatoryReports->retrieveDownloadUrl('5ec00000-0000-4000-8000-000000000007');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.regulatory_reports.retrieve_download_url(\"5ec00000-0000-4000-8000-000000000007\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.RegulatoryReports.RetrieveDownloadUrlAsync(\"5ec00000-0000-4000-8000-000000000007\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -41472,6 +47129,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/transactions/rules/?source=CUSTOM&ordering=-run_count' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.rules.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.rules.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.Rules.ListAutoPaging(ctx, didit.TransactionsRulesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().rules().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.rules.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.Rules.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] }, @@ -41599,12 +47291,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nrule = {\n \"title\": \"Structuring - inbound (custom)\",\n \"description\": \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n \"category\": \"finance\",\n \"mode\": \"TEST\",\n \"evaluation_mode\": \"ALL\",\n \"scope\": {\n \"transaction_types\": [\n \"finance\"\n ],\n \"directions\": [\n \"INBOUND\"\n ]\n },\n \"conditions\": [\n {\n \"field\": \"currency\",\n \"operator\": \"eq\",\n \"value\": \"EUR\"\n },\n {\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000\n }\n ],\n \"aggregation\": [\n {\n \"metric\": \"count\",\n \"operator\": \"gte\",\n \"value\": 20,\n \"window\": \"30d\",\n \"filters\": {\n \"direction\": \"INBOUND\",\n \"transaction_type\": \"finance\",\n \"subject_vendor_data\": \"__current__\",\n \"currency\": \"EUR\"\n }\n },\n {\n \"metric\": \"max\",\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000,\n \"window\": \"30d\",\n \"filters\": {\n \"direction\": \"INBOUND\",\n \"transaction_type\": \"finance\",\n \"subject_vendor_data\": \"__current__\",\n \"currency\": \"EUR\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"add_score\",\n \"value\": 35\n }\n ]\n}\n\nresp = requests.post(\n 'https://verification.didit.me/v3/transactions/rules/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json=rule,\n timeout=15,\n)\nresp.raise_for_status()\nprint(resp.json()['uuid'], resp.json()['mode'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.create(\n title=\"Structuring - inbound (custom)\",\n description=\"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n category=\"finance\",\n mode=\"TEST\",\n evaluation_mode=\"ALL\",\n scope={\n \"transaction_types\": [\"finance\"],\n \"directions\": [\"INBOUND\"],\n },\n conditions=[{\n \"field\": \"currency\",\n \"operator\": \"eq\",\n \"value\": \"EUR\",\n }, {\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000,\n }],\n aggregation=[{\n \"metric\": \"count\",\n \"operator\": \"gte\",\n \"value\": 20.0,\n \"window\": \"30d\",\n \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n }, {\n \"metric\": \"max\",\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000.0,\n \"window\": \"30d\",\n \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n }],\n actions=[{\n \"type\": \"add_score\",\n \"value\": 35,\n }],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const rule = {\n \"title\": \"Structuring - inbound (custom)\",\n \"description\": \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n \"category\": \"finance\",\n \"mode\": \"TEST\",\n \"evaluation_mode\": \"ALL\",\n \"scope\": {\n \"transaction_types\": [\n \"finance\"\n ],\n \"directions\": [\n \"INBOUND\"\n ]\n },\n \"conditions\": [\n {\n \"field\": \"currency\",\n \"operator\": \"eq\",\n \"value\": \"EUR\"\n },\n {\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000\n }\n ],\n \"aggregation\": [\n {\n \"metric\": \"count\",\n \"operator\": \"gte\",\n \"value\": 20,\n \"window\": \"30d\",\n \"filters\": {\n \"direction\": \"INBOUND\",\n \"transaction_type\": \"finance\",\n \"subject_vendor_data\": \"__current__\",\n \"currency\": \"EUR\"\n }\n },\n {\n \"metric\": \"max\",\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000,\n \"window\": \"30d\",\n \"filters\": {\n \"direction\": \"INBOUND\",\n \"transaction_type\": \"finance\",\n \"subject_vendor_data\": \"__current__\",\n \"currency\": \"EUR\"\n }\n }\n ],\n \"actions\": [\n {\n \"type\": \"add_score\",\n \"value\": 35\n }\n ]\n};\n\nconst resp = await fetch('https://verification.didit.me/v3/transactions/rules/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(rule),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst created = await resp.json();\nconsole.log(created.uuid, created.mode);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.create({\n title: \"Structuring - inbound (custom)\",\n description: \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n category: \"finance\",\n mode: \"TEST\",\n evaluation_mode: \"ALL\",\n scope: {\n transaction_types: [\"finance\"],\n directions: [\"INBOUND\"],\n },\n conditions: [{\n field: \"currency\",\n operator: \"eq\",\n value: \"EUR\",\n }, {\n field: \"amount\",\n operator: \"lt\",\n value: 10000,\n }],\n aggregation: [{\n metric: \"count\",\n operator: \"gte\",\n value: 20.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }, {\n metric: \"max\",\n field: \"amount\",\n operator: \"lt\",\n value: 10000.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }],\n actions: [{\n type: \"add_score\",\n value: 35,\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Create(ctx, didit.TransactionRuleCreateRequest{\n\tTitle: \"Structuring - inbound (custom)\",\n\tDescription: didit.String(\"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\"),\n\tCategory: \"finance\",\n\tMode: \"TEST\",\n\tEvaluationMode: didit.Some(didit.TransactionRuleCreateRequestEvaluationMode(\"ALL\")),\n\tScope: didit.Some(didit.TransactionRuleScopeParam{\n\t\tTransactionTypes: didit.Some([]string{\"finance\"}),\n\t\tDirections: didit.Some([]didit.TransactionRuleScopeDirections{\"INBOUND\"}),\n\t}),\n\tConditions: didit.Some([]didit.TransactionRuleConditionParam{{\n\t\tField: \"currency\",\n\t\tOperator: \"eq\",\n\t\tValue: didit.Some[any](\"EUR\"),\n\t}, {\n\t\tField: \"amount\",\n\t\tOperator: \"lt\",\n\t\tValue: didit.Some[any](10000),\n\t}}),\n\tAggregation: didit.Some([]didit.TransactionRuleAggregationParam{{\n\t\tMetric: didit.Some(didit.TransactionRuleAggregationMetric(\"count\")),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"gte\")),\n\t\tValue: 20.0,\n\t\tWindow: didit.String(\"30d\"),\n\t\tFilters: didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}, {\n\t\tMetric: didit.Some(didit.TransactionRuleAggregationMetric(\"max\")),\n\t\tField: didit.String(\"amount\"),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"lt\")),\n\t\tValue: 10000.0,\n\t\tWindow: didit.String(\"30d\"),\n\t\tFilters: didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}}),\n\tActions: didit.Some([]didit.TransactionRuleActionParam{{\n\t\tType: \"add_score\",\n\t\tValue: didit.Some[any](35),\n\t}}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.TransactionRuleAction;\nimport me.didit.types.TransactionRuleActionAddScore;\nimport me.didit.types.TransactionRuleAggregation;\nimport me.didit.types.TransactionRuleCondition;\nimport me.didit.types.TransactionRuleCreateRequest;\nimport me.didit.types.TransactionRuleScope;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().create(TransactionRuleCreateRequest.builder()\n .title(\"Structuring - inbound (custom)\")\n .description(\"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\")\n .category(\"finance\")\n .mode(TransactionRuleCreateRequest.Mode.of(\"TEST\"))\n .evaluationMode(TransactionRuleCreateRequest.EvaluationMode.of(\"ALL\"))\n .scope(TransactionRuleScope.builder()\n .transactionTypes(List.of(\"finance\"))\n .directions(List.of(TransactionRuleScope.Directions.of(\"INBOUND\")))\n .build())\n .conditions(List.of(\n TransactionRuleCondition.builder()\n .field(\"currency\")\n .operator(TransactionRuleCondition.Operator.of(\"eq\"))\n .value(\"EUR\")\n .build(),\n TransactionRuleCondition.builder()\n .field(\"amount\")\n .operator(TransactionRuleCondition.Operator.of(\"lt\"))\n .value(10000)\n .build()))\n .aggregation(List.of(\n TransactionRuleAggregation.builder()\n .metric(TransactionRuleAggregation.Metric.of(\"count\"))\n .operator(TransactionRuleAggregation.Operator.of(\"gte\"))\n .value(20.0)\n .window(\"30d\")\n .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n .build(),\n TransactionRuleAggregation.builder()\n .metric(TransactionRuleAggregation.Metric.of(\"max\"))\n .field(\"amount\")\n .operator(TransactionRuleAggregation.Operator.of(\"lt\"))\n .value(10000.0)\n .window(\"30d\")\n .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n .build()))\n .actions(List.of(TransactionRuleAction.ofAddScore(TransactionRuleActionAddScore.builder()\n .type(TransactionRuleActionAddScore.Type.of(\"add_score\"))\n .value(35L)\n .build())))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->create([\n 'title' => 'Structuring - inbound (custom)',\n 'description' => '20+ inbound EUR transfers, all under 10,000 EUR, 30 days',\n 'category' => 'finance',\n 'mode' => 'TEST',\n 'evaluation_mode' => 'ALL',\n 'scope' => [\n 'transaction_types' => ['finance'],\n 'directions' => ['INBOUND'],\n ],\n 'conditions' => [[\n 'field' => 'currency',\n 'operator' => 'eq',\n 'value' => 'EUR',\n ], [\n 'field' => 'amount',\n 'operator' => 'lt',\n 'value' => 10000,\n ]],\n 'aggregation' => [[\n 'metric' => 'count',\n 'operator' => 'gte',\n 'value' => 20.0,\n 'window' => '30d',\n 'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n ], [\n 'metric' => 'max',\n 'field' => 'amount',\n 'operator' => 'lt',\n 'value' => 10000.0,\n 'window' => '30d',\n 'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n ]],\n 'actions' => [[\n 'type' => 'add_score',\n 'value' => 35,\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.create(\n title: \"Structuring - inbound (custom)\",\n description: \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n category: \"finance\",\n mode: \"TEST\",\n evaluation_mode: \"ALL\",\n scope: {\n transaction_types: [\"finance\"],\n directions: [\"INBOUND\"],\n },\n conditions: [{\n field: \"currency\",\n operator: \"eq\",\n value: \"EUR\",\n }, {\n field: \"amount\",\n operator: \"lt\",\n value: 10000,\n }],\n aggregation: [{\n metric: \"count\",\n operator: \"gte\",\n value: 20.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }, {\n metric: \"max\",\n field: \"amount\",\n operator: \"lt\",\n value: 10000.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }],\n actions: [{\n type: \"add_score\",\n value: 35,\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.CreateAsync(new TransactionRuleCreateRequest\n{\n Title = \"Structuring - inbound (custom)\",\n Description = \"20+ inbound EUR transfers, all under 10,000 EUR, 30 days\",\n Category = \"finance\",\n Mode = \"TEST\",\n EvaluationMode = new TransactionRuleCreateRequestEvaluationMode(\"ALL\"),\n Scope = new TransactionRuleScope\n {\n TransactionTypes = new string[] { \"finance\" },\n Directions = new TransactionRuleScopeDirections[] { \"INBOUND\" },\n },\n Conditions = new TransactionRuleCondition[]\n {\n new()\n {\n Field = \"currency\",\n Operator = \"eq\",\n Value = \"EUR\",\n },\n new()\n {\n Field = \"amount\",\n Operator = \"lt\",\n Value = 10000,\n },\n },\n Aggregation = new TransactionRuleAggregation[]\n {\n new()\n {\n Metric = new TransactionRuleAggregationMetric(\"count\"),\n Operator = new TransactionRuleAggregationOperator(\"gte\"),\n Value = 20.0,\n Window = \"30d\",\n Filters = new Dictionary { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n },\n new()\n {\n Metric = new TransactionRuleAggregationMetric(\"max\"),\n Field = \"amount\",\n Operator = new TransactionRuleAggregationOperator(\"lt\"),\n Value = 10000.0,\n Window = \"30d\",\n Filters = new Dictionary { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n },\n },\n Actions = new TransactionRuleAction[]\n {\n new()\n {\n Type = new TransactionRuleActionType(\"add_score\"),\n Value = 35,\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -41667,6 +47384,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -41732,7 +47484,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'mode': 'ACTIVE'},\n timeout=15,\n)\nresp.raise_for_status()\nprint(resp.json()['mode'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.update(\n \"11111111-2222-3333-4444-555555555555\",\n mode=\"ACTIVE\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.update(\"11111111-2222-3333-4444-555555555555\", {\n mode: \"ACTIVE\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TransactionRuleUpdateRequest{\n\tMode: didit.Some(didit.TransactionRuleUpdateRequestMode(\"ACTIVE\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TransactionRuleUpdateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().update(\"11111111-2222-3333-4444-555555555555\", TransactionRuleUpdateRequest.builder()\n .mode(TransactionRuleUpdateRequest.Mode.of(\"ACTIVE\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->update('11111111-2222-3333-4444-555555555555', [\n 'mode' => 'ACTIVE',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.update(\n \"11111111-2222-3333-4444-555555555555\",\n mode: \"ACTIVE\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new TransactionRuleUpdateRequest\n{\n Mode = new TransactionRuleUpdateRequestMode(\"ACTIVE\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -41787,6 +47569,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.transactions.rules.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.transactions.rules.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Transactions.Rules.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.transactions().rules().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.rules.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Transactions.Rules.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ] } @@ -41898,7 +47715,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/transactions/rules/backtest/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n \"conditions\": [\n {\n \"field\": \"currency\",\n \"operator\": \"eq\",\n \"value\": \"EUR\"\n },\n {\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000\n }\n ],\n \"aggregation\": [\n {\n \"metric\": \"count\",\n \"operator\": \"gte\",\n \"value\": 20,\n \"window\": \"30d\",\n \"filters\": {\n \"direction\": \"INBOUND\",\n \"transaction_type\": \"finance\",\n \"subject_vendor_data\": \"__current__\",\n \"currency\": \"EUR\"\n }\n },\n {\n \"metric\": \"max\",\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000,\n \"window\": \"30d\",\n \"filters\": {\n \"direction\": \"INBOUND\",\n \"transaction_type\": \"finance\",\n \"subject_vendor_data\": \"__current__\",\n \"currency\": \"EUR\"\n }\n }\n ],\n \"evaluation_mode\": \"ALL\",\n \"scope\": {\n \"transaction_types\": [\n \"finance\"\n ],\n \"directions\": [\n \"INBOUND\"\n ]\n },\n \"period_days\": 90\n},\n timeout=30,\n)\nresp.raise_for_status()\nstats = resp.json()\nprint(stats['matched'], 'matches across', stats['affected_entities'], 'subjects')" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.backtest(\n conditions=[{\n \"field\": \"currency\",\n \"operator\": \"eq\",\n \"value\": \"EUR\",\n }, {\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000,\n }],\n aggregation=[{\n \"metric\": \"count\",\n \"operator\": \"gte\",\n \"value\": 20.0,\n \"window\": \"30d\",\n \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n }, {\n \"metric\": \"max\",\n \"field\": \"amount\",\n \"operator\": \"lt\",\n \"value\": 10000.0,\n \"window\": \"30d\",\n \"filters\": {\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"},\n }],\n evaluation_mode=\"ALL\",\n scope={\n \"transaction_types\": [\"finance\"],\n \"directions\": [\"INBOUND\"],\n },\n period_days=90,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.backtest({\n conditions: [{\n field: \"currency\",\n operator: \"eq\",\n value: \"EUR\",\n }, {\n field: \"amount\",\n operator: \"lt\",\n value: 10000,\n }],\n aggregation: [{\n metric: \"count\",\n operator: \"gte\",\n value: 20.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }, {\n metric: \"max\",\n field: \"amount\",\n operator: \"lt\",\n value: 10000.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }],\n evaluation_mode: \"ALL\",\n scope: {\n transaction_types: [\"finance\"],\n directions: [\"INBOUND\"],\n },\n period_days: 90,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.Backtest(ctx, didit.TransactionRuleBacktestRequest{\n\tConditions: didit.Some([]didit.TransactionRuleConditionParam{{\n\t\tField: \"currency\",\n\t\tOperator: \"eq\",\n\t\tValue: didit.Some[any](\"EUR\"),\n\t}, {\n\t\tField: \"amount\",\n\t\tOperator: \"lt\",\n\t\tValue: didit.Some[any](10000),\n\t}}),\n\tAggregation: didit.Some([]didit.TransactionRuleAggregationParam{{\n\t\tMetric: didit.Some(didit.TransactionRuleAggregationMetric(\"count\")),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"gte\")),\n\t\tValue: 20.0,\n\t\tWindow: didit.String(\"30d\"),\n\t\tFilters: didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}, {\n\t\tMetric: didit.Some(didit.TransactionRuleAggregationMetric(\"max\")),\n\t\tField: didit.String(\"amount\"),\n\t\tOperator: didit.Some(didit.TransactionRuleAggregationOperator(\"lt\")),\n\t\tValue: 10000.0,\n\t\tWindow: didit.String(\"30d\"),\n\t\tFilters: didit.Some(map[string]any{\"direction\": \"INBOUND\", \"transaction_type\": \"finance\", \"subject_vendor_data\": \"__current__\", \"currency\": \"EUR\"}),\n\t}}),\n\tEvaluationMode: didit.Some(didit.TransactionRuleBacktestRequestEvaluationMode(\"ALL\")),\n\tScope: didit.Some(didit.TransactionRuleScopeParam{\n\t\tTransactionTypes: didit.Some([]string{\"finance\"}),\n\t\tDirections: didit.Some([]didit.TransactionRuleScopeDirections{\"INBOUND\"}),\n\t}),\n\tPeriodDays: didit.Int(90),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.TransactionRuleAggregation;\nimport me.didit.types.TransactionRuleBacktestRequest;\nimport me.didit.types.TransactionRuleCondition;\nimport me.didit.types.TransactionRuleScope;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().backtest(TransactionRuleBacktestRequest.builder()\n .conditions(List.of(\n TransactionRuleCondition.builder()\n .field(\"currency\")\n .operator(TransactionRuleCondition.Operator.of(\"eq\"))\n .value(\"EUR\")\n .build(),\n TransactionRuleCondition.builder()\n .field(\"amount\")\n .operator(TransactionRuleCondition.Operator.of(\"lt\"))\n .value(10000)\n .build()))\n .aggregation(List.of(\n TransactionRuleAggregation.builder()\n .metric(TransactionRuleAggregation.Metric.of(\"count\"))\n .operator(TransactionRuleAggregation.Operator.of(\"gte\"))\n .value(20.0)\n .window(\"30d\")\n .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n .build(),\n TransactionRuleAggregation.builder()\n .metric(TransactionRuleAggregation.Metric.of(\"max\"))\n .field(\"amount\")\n .operator(TransactionRuleAggregation.Operator.of(\"lt\"))\n .value(10000.0)\n .window(\"30d\")\n .filters(Map.of(\"direction\", \"INBOUND\", \"transaction_type\", \"finance\", \"subject_vendor_data\", \"__current__\", \"currency\", \"EUR\"))\n .build()))\n .evaluationMode(TransactionRuleBacktestRequest.EvaluationMode.of(\"ALL\"))\n .scope(TransactionRuleScope.builder()\n .transactionTypes(List.of(\"finance\"))\n .directions(List.of(TransactionRuleScope.Directions.of(\"INBOUND\")))\n .build())\n .periodDays(90L)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->backtest([\n 'conditions' => [[\n 'field' => 'currency',\n 'operator' => 'eq',\n 'value' => 'EUR',\n ], [\n 'field' => 'amount',\n 'operator' => 'lt',\n 'value' => 10000,\n ]],\n 'aggregation' => [[\n 'metric' => 'count',\n 'operator' => 'gte',\n 'value' => 20.0,\n 'window' => '30d',\n 'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n ], [\n 'metric' => 'max',\n 'field' => 'amount',\n 'operator' => 'lt',\n 'value' => 10000.0,\n 'window' => '30d',\n 'filters' => ['direction' => 'INBOUND', 'transaction_type' => 'finance', 'subject_vendor_data' => '__current__', 'currency' => 'EUR'],\n ]],\n 'evaluation_mode' => 'ALL',\n 'scope' => [\n 'transaction_types' => ['finance'],\n 'directions' => ['INBOUND'],\n ],\n 'period_days' => 90,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.backtest(\n conditions: [{\n field: \"currency\",\n operator: \"eq\",\n value: \"EUR\",\n }, {\n field: \"amount\",\n operator: \"lt\",\n value: 10000,\n }],\n aggregation: [{\n metric: \"count\",\n operator: \"gte\",\n value: 20.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }, {\n metric: \"max\",\n field: \"amount\",\n operator: \"lt\",\n value: 10000.0,\n window: \"30d\",\n filters: { direction: \"INBOUND\", transaction_type: \"finance\", subject_vendor_data: \"__current__\", currency: \"EUR\" },\n }],\n evaluation_mode: \"ALL\",\n scope: {\n transaction_types: [\"finance\"],\n directions: [\"INBOUND\"],\n },\n period_days: 90\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.BacktestAsync(new TransactionRuleBacktestRequest\n{\n Conditions = new TransactionRuleCondition[]\n {\n new()\n {\n Field = \"currency\",\n Operator = \"eq\",\n Value = \"EUR\",\n },\n new()\n {\n Field = \"amount\",\n Operator = \"lt\",\n Value = 10000,\n },\n },\n Aggregation = new TransactionRuleAggregation[]\n {\n new()\n {\n Metric = new TransactionRuleAggregationMetric(\"count\"),\n Operator = new TransactionRuleAggregationOperator(\"gte\"),\n Value = 20.0,\n Window = \"30d\",\n Filters = new Dictionary { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n },\n new()\n {\n Metric = new TransactionRuleAggregationMetric(\"max\"),\n Field = \"amount\",\n Operator = new TransactionRuleAggregationOperator(\"lt\"),\n Value = 10000.0,\n Window = \"30d\",\n Filters = new Dictionary { [\"direction\"] = \"INBOUND\", [\"transaction_type\"] = \"finance\", [\"subject_vendor_data\"] = \"__current__\", [\"currency\"] = \"EUR\" },\n },\n },\n EvaluationMode = new TransactionRuleBacktestRequestEvaluationMode(\"ALL\"),\n Scope = new TransactionRuleScope\n {\n TransactionTypes = new string[] { \"finance\" },\n Directions = new TransactionRuleScopeDirections[] { \"INBOUND\" },\n },\n PeriodDays = 90,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -42005,6 +47852,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/transactions/rules/library/?bundle=finance' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.rules.list_library():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.rules.listLibrary()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.Rules.ListLibraryAutoPaging(ctx, didit.TransactionsRulesListLibraryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().rules().listLibrary()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->listLibrary() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.rules.list_library.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.Rules.ListLibraryAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] } @@ -42078,6 +47960,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/transactions/rules/install/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"library_keys\": [\"structuring-inbound\", \"structuring-outbound\"]}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.install_library(\n library_keys=[\"structuring-inbound\", \"structuring-outbound\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.installLibrary({\n library_keys: [\"structuring-inbound\", \"structuring-outbound\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.InstallLibrary(ctx, didit.TransactionRuleInstallRequest{\n\tLibraryKeys: didit.Some([]string{\"structuring-inbound\", \"structuring-outbound\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TransactionRuleInstallRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().installLibrary(TransactionRuleInstallRequest.builder()\n .libraryKeys(List.of(\"structuring-inbound\", \"structuring-outbound\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->installLibrary([\n 'library_keys' => ['structuring-inbound', 'structuring-outbound'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.install_library(library_keys: [\"structuring-inbound\", \"structuring-outbound\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.InstallLibraryAsync(new TransactionRuleInstallRequest\n{\n LibraryKeys = new string[] { \"structuring-inbound\", \"structuring-outbound\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -42142,6 +48059,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE 'https://verification.didit.me/v3/transactions/rules/install/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"bundle\": \"responsible_gaming\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.rules.uninstall_library(\n bundle=\"responsible_gaming\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.rules.uninstallLibrary({\n bundle: \"responsible_gaming\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.UninstallLibrary(ctx, didit.TransactionRuleInstallRequest{\n\tBundle: didit.String(\"responsible_gaming\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TransactionRuleInstallRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().rules().uninstallLibrary(TransactionRuleInstallRequest.builder()\n .bundle(\"responsible_gaming\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->rules->uninstallLibrary([\n 'bundle' => 'responsible_gaming',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.rules.uninstall_library(bundle: \"responsible_gaming\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Rules.UninstallLibraryAsync(new TransactionRuleInstallRequest\n{\n Bundle = \"responsible_gaming\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -42346,6 +48298,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/?status=active,in_review&ordering=-risk_score' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.networks.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.networks.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Networks.ListAutoPaging(ctx, didit.NetworksListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.networks().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.networks.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Networks.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -42596,6 +48583,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve(\n \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieve(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.Retrieve(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieve(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->retrieve('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -42911,6 +48933,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/graph/?depth=2' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve_graph(\n \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieveGraph(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveGraph(ctx, \"n3a5e000-0000-4000-8000-000000000001\", didit.NetworksRetrieveGraphParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieveGraph(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->retrieveGraph('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve_graph(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveGraphAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -43000,108 +49057,46 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/members/' \\\n -H 'x-api-key: YOUR_API_KEY'" - } - ], - "responses": { - "200": { - "description": "Network members. Not paginated.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkMember" - } - } - } - } - } - } }, - "404": { - "description": "Network not found (or not visible to this application).", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "detail": { - "type": "string" - } - } - } - } - } - } - }, - "security": [ { - "ApiKeyAuth": [] - } - ] - } - }, - "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/": { - "get": { - "summary": "List network signals", - "description": "List the signals (shared device, IP, face, document number, phone, email, or address values) that link this network's members.", - "operationId": "list_network_signals", - "x-didit-sdk": { - "resource": "networks", - "method": "list_signals", - "auth": "api_key", - "server": true, - "scope": "application" - }, - "tags": [ - "Networks" - ], - "parameters": [ + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.list_members(\n \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, { - "name": "organization_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Organization UUID." + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.listMembers(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" }, { - "name": "application_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Application UUID." + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.ListMembers(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" }, { - "name": "network_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "example": "n3a5e000-0000-4000-8000-000000000001" - }, - "description": "Network UUID." - } - ], - "x-codeSamples": [ + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().listMembers(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, { - "lang": "curl", - "label": "curl", - "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/signals/' \\\n -H 'x-api-key: YOUR_API_KEY'" + "lang": "php", + "label": "PHP", + "source": "networks->listMembers('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.list_members(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.ListMembersAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { "200": { - "description": "Network signals. Not paginated.", + "description": "Network members. Not paginated.", "content": { "application/json": { "schema": { @@ -43110,7 +49105,7 @@ "results": { "type": "array", "items": { - "$ref": "#/components/schemas/NetworkSignal" + "$ref": "#/components/schemas/NetworkMember" } } } @@ -43141,14 +49136,146 @@ ] } }, - "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/": { + "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/signals/": { "get": { - "summary": "Get network timeline", - "description": "Without `contract`: the network's own events (detection, each signal's latest observation and its review), oldest first and not paginated. `limit`, `cursor` and `event_type` are ignored. With `contract=2`: the typed timeline, newest first and paginated by cursor. It adds what the member accounts did (verification attempts, transactions, sign-ins you post through the events API and the live rules they hit) and the cases opened for the network. `note_added` events are returned to console members only, never to an API key. Requires a full-access API key, or `read:networks` for a console member.", - "operationId": "get_network_timeline", + "summary": "List network signals", + "description": "List the signals (shared device, IP, face, document number, phone, email, or address values) that link this network's members.", + "operationId": "list_network_signals", "x-didit-sdk": { "resource": "networks", - "method": "retrieve_timeline", + "method": "list_signals", + "auth": "api_key", + "server": true, + "scope": "application" + }, + "tags": [ + "Networks" + ], + "parameters": [ + { + "name": "organization_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Organization UUID." + }, + { + "name": "application_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Application UUID." + }, + { + "name": "network_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "example": "n3a5e000-0000-4000-8000-000000000001" + }, + "description": "Network UUID." + } + ], + "x-codeSamples": [ + { + "lang": "curl", + "label": "curl", + "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/signals/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.list_signals(\n \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.listSignals(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.ListSignals(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().listSignals(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->listSignals('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.list_signals(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.ListSignalsAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ], + "responses": { + "200": { + "description": "Network signals. Not paginated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkSignal" + } + } + } + } + } + } + }, + "404": { + "description": "Network not found (or not visible to this application).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ] + } + }, + "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/timeline/": { + "get": { + "summary": "Get network timeline", + "description": "Without `contract`: the network's own events (detection, each signal's latest observation and its review), oldest first and not paginated. `limit`, `cursor` and `event_type` are ignored. With `contract=2`: the typed timeline, newest first and paginated by cursor. It adds what the member accounts did (verification attempts, transactions, sign-ins you post through the events API and the live rules they hit) and the cases opened for the network. `note_added` events are returned to console members only, never to an API key. Requires a full-access API key, or `read:networks` for a console member.", + "operationId": "get_network_timeline", + "x-didit-sdk": { + "resource": "networks", + "method": "retrieve_timeline", "auth": "api_key", "server": true, "scope": "application" @@ -43261,6 +49388,41 @@ "lang": "curl", "label": "curl (typed timeline)", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/3fa85f64-5717-4562-b3fc-2c963f66afa6/timeline/?contract=2&limit=50&event_type=verification_attempt,login' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve_timeline(\n \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieveTimeline(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveTimeline(ctx, \"n3a5e000-0000-4000-8000-000000000001\", didit.NetworksRetrieveTimelineParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieveTimeline(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->retrieveTimeline('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve_timeline(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveTimelineAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -43625,6 +49787,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/n3a5e000-0000-4000-8000-000000000001/map/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.retrieve_map(\n \"n3a5e000-0000-4000-8000-000000000001\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.retrieveMap(\"n3a5e000-0000-4000-8000-000000000001\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RetrieveMap(ctx, \"n3a5e000-0000-4000-8000-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().retrieveMap(\"n3a5e000-0000-4000-8000-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->retrieveMap('n3a5e000-0000-4000-8000-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.retrieve_map(\"n3a5e000-0000-4000-8000-000000000001\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RetrieveMapAsync(\"n3a5e000-0000-4000-8000-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -43713,6 +49910,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/sessions/aaaaaaaa-0000-4000-8000-000000000001/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.sessions.list_networks(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.sessions().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -43801,94 +50033,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/business-sessions/aaaaaaaa-0000-4000-8000-000000000002/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" - } - ], - "responses": { - "200": { - "description": "Networks this entity belongs to. Not paginated.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EntityNetworkMembershipList" - } - } - } }, - "404": { - "description": "Entity not found in this application, or has no linked subject to look up.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "detail": { - "type": "string" - } - } - } - } - } - } - }, - "security": [ { - "ApiKeyAuth": [] - } - ] - } - }, - "/v3/organization/{organization_id}/application/{application_id}/users/{vendor_user_uuid}/networks/": { - "get": { - "summary": "List networks for a user", - "description": "List the networks a vendor user belongs to.", - "operationId": "list_user_network_memberships", - "x-didit-sdk": { - "resource": "users", - "method": "list_networks", - "auth": "api_key", - "server": true, - "scope": "application" - }, - "tags": [ - "Networks" - ], - "parameters": [ + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.business_sessions.list_networks(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, { - "name": "organization_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Organization UUID." + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businessSessions.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" }, { - "name": "application_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Application UUID." + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.BusinessSessions.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" }, { - "name": "vendor_user_uuid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - }, - "description": "Vendor user UUID." - } - ], - "x-codeSamples": [ + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businessSessions().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, { - "lang": "curl", - "label": "curl", - "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/users/aaaaaaaa-0000-4000-8000-000000000003/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" + "lang": "php", + "label": "PHP", + "source": "businessSessions->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.business_sessions.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.BusinessSessions.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -43925,13 +50104,136 @@ ] } }, - "/v3/organization/{organization_id}/application/{application_id}/businesses/{vendor_business_uuid}/networks/": { + "/v3/organization/{organization_id}/application/{application_id}/users/{vendor_user_uuid}/networks/": { "get": { - "summary": "List networks for a business", - "description": "List the networks a vendor business belongs to.", - "operationId": "list_business_network_memberships", + "summary": "List networks for a user", + "description": "List the networks a vendor user belongs to.", + "operationId": "list_user_network_memberships", "x-didit-sdk": { - "resource": "businesses", + "resource": "users", + "method": "list_networks", + "auth": "api_key", + "server": true, + "scope": "application" + }, + "tags": [ + "Networks" + ], + "parameters": [ + { + "name": "organization_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Organization UUID." + }, + { + "name": "application_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Application UUID." + }, + { + "name": "vendor_user_uuid", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Vendor user UUID." + } + ], + "x-codeSamples": [ + { + "lang": "curl", + "label": "curl", + "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/users/aaaaaaaa-0000-4000-8000-000000000003/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.users.list_networks(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.users.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Users.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.users().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "users->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.users.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Users.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ], + "responses": { + "200": { + "description": "Networks this entity belongs to. Not paginated.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EntityNetworkMembershipList" + } + } + } + }, + "404": { + "description": "Entity not found in this application, or has no linked subject to look up.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + } + } + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ] + } + }, + "/v3/organization/{organization_id}/application/{application_id}/businesses/{vendor_business_uuid}/networks/": { + "get": { + "summary": "List networks for a business", + "description": "List the networks a vendor business belongs to.", + "operationId": "list_business_network_memberships", + "x-didit-sdk": { + "resource": "businesses", "method": "list_networks", "auth": "api_key", "server": true, @@ -43977,6 +50279,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/businesses/aaaaaaaa-0000-4000-8000-000000000004/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.businesses.list_networks(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.businesses.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Businesses.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.businesses().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.businesses.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Businesses.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -44065,6 +50402,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/aaaaaaaa-0000-4000-8000-000000000005/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.transactions.list_networks(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.transactions.listNetworks(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.ListNetworks(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.transactions().listNetworks(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->listNetworks('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.transactions.list_networks(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.ListNetworksAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -44163,6 +50535,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/aaaaaaaa-0000-4000-8000-000000000005/parties/bbbbbbbb-0000-4000-8000-000000000006/networks/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.transactions.list_party_networks(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.transactions.listPartyNetworks(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.ListPartyNetworks(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.transactions().listPartyNetworks(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->listPartyNetworks('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.transactions.list_party_networks(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.ListPartyNetworksAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -44535,6 +50942,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/biometric-templates/?vendor_data=user-42&status=active' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.biometric_templates.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.biometricTemplates.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.BiometricTemplates.ListAutoPaging(ctx, didit.BiometricTemplatesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.biometricTemplates().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "biometricTemplates->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.biometric_templates.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.BiometricTemplates.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ] } @@ -44690,6 +51132,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/biometric-templates/count/?status=active' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.count()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.count();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Count(ctx, didit.BiometricTemplatesCountParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().count();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "biometricTemplates->count();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.count\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.CountAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -44909,6 +51386,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.retrieve(\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.retrieve(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Retrieve(ctx, \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().retrieve(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "biometricTemplates->retrieve('9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.retrieve(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.RetrieveAsync(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] }, @@ -45037,6 +51549,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE https://verification.didit.me/v3/biometric-templates/9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.delete(\n \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.delete(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.Delete(ctx, \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().delete(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "biometricTemplates->delete('9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.delete(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.DeleteAsync(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -45260,6 +51807,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/biometric-templates/delete/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"delete_all\": true, \"vendor_user_uuid\": \"2f7c1a9e-8b4d-4c6a-9e1f-3d5b7a9c1e2f\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.biometric_templates.batch_delete(\n template_uuids=[\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.biometricTemplates.batchDelete({\n template_uuids: [\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.BiometricTemplates.BatchDelete(ctx, didit.BiometricTemplatesBatchDeleteParams{\n\tTemplateUUIDs: didit.Some([]string{\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.BiometricTemplatesBatchDeleteParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.biometricTemplates().batchDelete(BiometricTemplatesBatchDeleteParams.builder()\n .templateUuids(List.of(\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "biometricTemplates->batchDelete([\n 'template_uuids' => ['9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b', '1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.biometric_templates.batch_delete(template_uuids: [\"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.BiometricTemplates.BatchDeleteAsync(new BiometricTemplatesBatchDeleteParams\n{\n TemplateUuids = new string[] { \"9d2f4b6e-1c3a-4e8f-b7d5-0a1c2e3f4a5b\", \"1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -45283,13 +51865,17 @@ } ], "parameters": [], - "description": "Retrieve the Lite profile **plus the direct shareholders** (natural persons and corporate entities, with their ownership bands) of one candidate returned by `POST /v3/kyb/search/`.\n\n**Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. The search runs on the Lite registry chain; when the country's ownership data lives at another registry Didit re-finds the company there by registration number, at no extra cost.\n\n**Billing.** Billed at the country's Shareholders price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). When the registry holds no shareholder record for the company (or the country offers no ownership data at all) the Lite profile is delivered and billed instead: read `registry_tier_delivered` and `registry_ownership_status`. The balance is checked against the Shareholders price before any registry call (`403` when short).\n\n**Availability.** v3 only. Every call creates a business session (its id is the `request_id`).\n\n**Pending reports.** When a report is still being prepared, or the ownership section has not been retrieved from the registry yet, the endpoint returns 202 Accepted, kyb_registry.fetch_status=pending, kyb_registry.registry_ownership_status=pending, and registry_tier_delivered=null. Keep request_id and retrieve GET /v3/session/{request_id}/decision/ until registry_checks[0].company.fetch_status is resolved. Didit completes the report automatically and charges the delivered tier once it is ready. Do not repeat the purchase while it is pending; every new POST creates a separate request.", + "description": "Retrieve the Lite profile **plus the direct shareholders** (natural persons and corporate entities, with their ownership bands) of one candidate returned by `POST /v3/kyb/search/`.\n\n**Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. Search at the tier you intend to buy (`tier` on `POST /v3/kyb/search/`), because the search runs on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not hold the company. When the country's ownership data lives at another registry, Didit re-finds the company there by registration number, at no extra cost.\n\n**Billing.** Billed at the country's Shareholders price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). When the registry holds no shareholder record for the company (or the country offers no ownership data at all) the Lite profile is delivered and billed instead: read `registry_tier_delivered` and `registry_ownership_status`. The balance is checked against the Shareholders price before any registry call (`403` when short).\n\n**Availability.** v3 only. Every call creates a business session (its id is the `request_id`).\n\n**Pending reports.** When a report is still being prepared, or the ownership section has not been retrieved from the registry yet, the endpoint returns 202 Accepted, kyb_registry.fetch_status=pending, kyb_registry.registry_ownership_status=pending, and registry_tier_delivered=null. Keep request_id and retrieve GET /v3/session/{request_id}/decision/ until registry_checks[0].company.fetch_status is resolved. Didit completes the report automatically and charges the delivered tier once it is ready. Do not repeat the purchase while it is pending; every new POST creates a separate request.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KYBRegistryCandidateRequest" + }, + "example": { + "kyb_response_id": "69aeeb95febb0f1704042259", + "vendor_data": "company-1234" } } } @@ -45303,12 +51889,37 @@ { "lang": "python", "label": "Python", - "source": "import os, time, requests\n\nsearch = requests.post(\n \"https://verification.didit.me/v3/kyb/search/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"country_code\": \"GB\", \"name\": \"Tesco\"},\n timeout=60,\n).json()\nkyb_response_id = search[\"kyb_registry\"][\"companies\"][0][\"kyb_response_id\"]\n\nresp = requests.post(\n \"https://verification.didit.me/v3/kyb/shareholders/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"kyb_response_id\": kyb_response_id, \"vendor_data\": \"company-1234\"},\n timeout=90,\n)\nresp.raise_for_status()\ndata = resp.json()\nrequest_id = data[\"request_id\"]\nprint(\"Keep this request ID:\", request_id)\ncompany = data[\"kyb_registry\"]\nif resp.status_code == 202 or company.get(\"fetch_status\") == \"pending\":\n # This client wait limit does not cancel the report or create a new purchase.\n deadline = time.monotonic() + 300\n while company.get(\"fetch_status\") != \"resolved\" and time.monotonic() < deadline:\n time.sleep(5)\n decision = requests.get(\n f\"https://verification.didit.me/v3/session/{request_id}/decision/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n timeout=30,\n )\n decision.raise_for_status()\n checks = decision.json().get(\"registry_checks\") or []\n if checks:\n company = checks[0].get(\"company\") or company\nif company.get(\"fetch_status\") == \"resolved\":\n print(company[\"company_name\"], company[\"registry_tier_delivered\"])\nelse:\n print(\"Still processing; retrieve this request later:\", request_id)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.list_shareholders(\n kyb_response_id=\"69aeeb95febb0f1704042259\",\n vendor_data=\"company-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/kyb/shareholders/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n kyb_response_id: '69aeeb95febb0f1704042259',\n vendor_data: 'company-1234',\n }),\n});\nif (!res.ok) throw new Error(`Request failed: ${res.status}`);\nconst data = await res.json();\nconst requestId = data.request_id;\nconsole.log('Keep this request ID:', requestId);\nlet company = data.kyb_registry;\nif (res.status === 202 || company.fetch_status === 'pending') {\n // This client wait limit does not cancel the report or create a new purchase.\n const deadline = Date.now() + 300000;\n while (company.fetch_status !== 'resolved' && Date.now() < deadline) {\n await new Promise(resolve => setTimeout(resolve, 5000));\n const decisionResponse = await fetch(\n `https://verification.didit.me/v3/session/${requestId}/decision/`,\n { headers: { 'x-api-key': 'YOUR_API_KEY' }, signal: AbortSignal.timeout(30000) },\n );\n if (!decisionResponse.ok) throw new Error(`Retrieval failed: ${decisionResponse.status}`);\n const decision = await decisionResponse.json();\n company = decision.registry_checks?.[0]?.company ?? company;\n }\n}\nif (company.fetch_status === 'resolved') {\n console.log(company.company_name, company.registry_tier_delivered);\n} else {\n console.log('Still processing; retrieve this request later:', requestId);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.listShareholders({\n kyb_response_id: \"69aeeb95febb0f1704042259\",\n vendor_data: \"company-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.ListShareholders(ctx, didit.KYBRegistryCandidateRequest{\n\tKYBResponseID: \"69aeeb95febb0f1704042259\",\n\tVendorData: didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.KYBRegistryCandidateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().listShareholders(KYBRegistryCandidateRequest.builder()\n .kybResponseId(\"69aeeb95febb0f1704042259\")\n .vendorData(\"company-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "kyb->listShareholders([\n 'kyb_response_id' => '69aeeb95febb0f1704042259',\n 'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.list_shareholders(\n kyb_response_id: \"69aeeb95febb0f1704042259\",\n vendor_data: \"company-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.ListShareholdersAsync(new KYBRegistryCandidateRequest\n{\n KybResponseId = \"69aeeb95febb0f1704042259\",\n VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -45819,8 +52430,7 @@ "description": "Registry filing dates, when available. Annual returns and general meetings use last_annual_return_date and last_agm_date; they are distinct from financial accounts." }, "registry_data": { - "type": "object", - "description": "Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (`addresses`, `industries`, `ownership`, `beneficial_owners[].shareholding`) instead." + "$ref": "#/components/schemas/KYBRegistryData" }, "user_provided_data": { "type": "object", @@ -45874,6 +52484,55 @@ "type": "string", "nullable": true, "description": "The registry tier the workflow ordered: `basic`, `shareholders` or `ubo`. Also in `ownership.tier_requested`." + }, + "registry_monitoring": { + "type": "object", + "nullable": true, + "description": "The latest registry monitor for the company, or `null` when none exists.", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string" + }, + "unavailable_reason": { + "type": "string", + "nullable": true + }, + "enrolled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "next_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "last_event_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "events_count": { + "type": "integer" + }, + "watched_fields": { + "description": "The company fields the monitor watches." + } + } } } }, @@ -45969,24 +52628,7 @@ "next_account": "26 February 2026", "due_by_date": "26 August 2026" }, - "registry_data": { - "name": "Tesco PLC", - "registration_number": "00445790", - "status": "active", - "type": "Public Limited Company", - "incorporation_date": "1947-11-27", - "tax_number": "GB412 8925 93", - "country_code": "GB", - "fetch_status": "resolved", - "industries_detail": [ - { - "code": "47110", - "name": "Retail Sale In Non-specialised Stores With Food, Beverages Or Tobacco Predominating", - "description": null, - "meta_detail": [] - } - ] - }, + "registry_data": {}, "user_provided_data": null, "confirmed_by_user_at": null, "last_console_edit_at": null, @@ -46027,7 +52669,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", "content": { "application/json": { "examples": { @@ -46157,13 +52799,17 @@ } ], "parameters": [], - "description": "Retrieve the Lite profile, the direct shareholders **and the ultimate beneficial owners** resolved through the ownership chain (`registry_data.ubo_resolution` carries the corporate parent chain) of one candidate returned by `POST /v3/kyb/search/`.\n\n**Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. The search runs on the Lite registry chain; when the country's ownership data lives at another registry Didit re-finds the company there by registration number, at no extra cost.\n\n**Billing.** Billed at the country's UBO price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). The tier delivered is the highest the country and the registry can serve: Shareholders when the resolved report names no natural person as a beneficial owner, Lite when there is no ownership record at all; `registry_tier_delivered` names what was billed. The balance is checked against the UBO price before any registry call (`403` when short).\n\n**Availability.** v3 only. Every call creates a business session (its id is the `request_id`).\n\n**Pending reports.** When a report is still being prepared, or the ownership section has not been retrieved from the registry yet, the endpoint returns 202 Accepted, kyb_registry.fetch_status=pending, kyb_registry.registry_ownership_status=pending, and registry_tier_delivered=null. Keep request_id and retrieve GET /v3/session/{request_id}/decision/ until registry_checks[0].company.fetch_status is resolved. Didit completes the report automatically and charges the delivered tier once it is ready. Do not repeat the purchase while it is pending; every new POST creates a separate request.", + "description": "Retrieve the Lite profile, the direct shareholders **and the ultimate beneficial owners** resolved through the ownership chain (`registry_data.ubo_resolution` carries the corporate parent chain) of one candidate returned by `POST /v3/kyb/search/`.\n\n**Pairing with search.** Pass the candidate's `kyb_response_id` exactly as returned by a search of the same application. Search at the tier you intend to buy (`tier` on `POST /v3/kyb/search/`), because the search runs on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not hold the company. When the country's ownership data lives at another registry, Didit re-finds the company there by registration number, at no extra cost.\n\n**Billing.** Billed at the country's UBO price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). The tier delivered is the highest the country and the registry can serve: Shareholders when the resolved report names no natural person as a beneficial owner, Lite when there is no ownership record at all; `registry_tier_delivered` names what was billed. The balance is checked against the UBO price before any registry call (`403` when short).\n\n**Availability.** v3 only. Every call creates a business session (its id is the `request_id`).\n\n**Pending reports.** When a report is still being prepared, or the ownership section has not been retrieved from the registry yet, the endpoint returns 202 Accepted, kyb_registry.fetch_status=pending, kyb_registry.registry_ownership_status=pending, and registry_tier_delivered=null. Keep request_id and retrieve GET /v3/session/{request_id}/decision/ until registry_checks[0].company.fetch_status is resolved. Didit completes the report automatically and charges the delivered tier once it is ready. Do not repeat the purchase while it is pending; every new POST creates a separate request.", "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KYBRegistryCandidateRequest" + }, + "example": { + "kyb_response_id": "69aeeb95febb0f1704042259", + "vendor_data": "company-1234" } } } @@ -46177,12 +52823,37 @@ { "lang": "python", "label": "Python", - "source": "import os, time, requests\n\nsearch = requests.post(\n \"https://verification.didit.me/v3/kyb/search/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"country_code\": \"GB\", \"name\": \"Tesco\"},\n timeout=60,\n).json()\nkyb_response_id = search[\"kyb_registry\"][\"companies\"][0][\"kyb_response_id\"]\n\nresp = requests.post(\n \"https://verification.didit.me/v3/kyb/ubo/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n json={\"kyb_response_id\": kyb_response_id, \"vendor_data\": \"company-1234\"},\n timeout=90,\n)\nresp.raise_for_status()\ndata = resp.json()\nrequest_id = data[\"request_id\"]\nprint(\"Keep this request ID:\", request_id)\ncompany = data[\"kyb_registry\"]\nif resp.status_code == 202 or company.get(\"fetch_status\") == \"pending\":\n # This client wait limit does not cancel the report or create a new purchase.\n deadline = time.monotonic() + 300\n while company.get(\"fetch_status\") != \"resolved\" and time.monotonic() < deadline:\n time.sleep(5)\n decision = requests.get(\n f\"https://verification.didit.me/v3/session/{request_id}/decision/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"]},\n timeout=30,\n )\n decision.raise_for_status()\n checks = decision.json().get(\"registry_checks\") or []\n if checks:\n company = checks[0].get(\"company\") or company\nif company.get(\"fetch_status\") == \"resolved\":\n print(company[\"company_name\"], company[\"registry_tier_delivered\"])\nelse:\n print(\"Still processing; retrieve this request later:\", request_id)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.kyb.list_ubos(\n kyb_response_id=\"69aeeb95febb0f1704042259\",\n vendor_data=\"company-1234\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/kyb/ubo/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n kyb_response_id: '69aeeb95febb0f1704042259',\n vendor_data: 'company-1234',\n }),\n});\nif (!res.ok) throw new Error(`Request failed: ${res.status}`);\nconst data = await res.json();\nconst requestId = data.request_id;\nconsole.log('Keep this request ID:', requestId);\nlet company = data.kyb_registry;\nif (res.status === 202 || company.fetch_status === 'pending') {\n // This client wait limit does not cancel the report or create a new purchase.\n const deadline = Date.now() + 300000;\n while (company.fetch_status !== 'resolved' && Date.now() < deadline) {\n await new Promise(resolve => setTimeout(resolve, 5000));\n const decisionResponse = await fetch(\n `https://verification.didit.me/v3/session/${requestId}/decision/`,\n { headers: { 'x-api-key': 'YOUR_API_KEY' }, signal: AbortSignal.timeout(30000) },\n );\n if (!decisionResponse.ok) throw new Error(`Retrieval failed: ${decisionResponse.status}`);\n const decision = await decisionResponse.json();\n company = decision.registry_checks?.[0]?.company ?? company;\n }\n}\nif (company.fetch_status === 'resolved') {\n console.log(company.company_name, company.registry_tier_delivered);\n} else {\n console.log('Still processing; retrieve this request later:', requestId);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.kyb.listUbos({\n kyb_response_id: \"69aeeb95febb0f1704042259\",\n vendor_data: \"company-1234\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.KYB.ListUBOs(ctx, didit.KYBRegistryCandidateRequest{\n\tKYBResponseID: \"69aeeb95febb0f1704042259\",\n\tVendorData: didit.String(\"company-1234\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.KYBRegistryCandidateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.kyb().listUbos(KYBRegistryCandidateRequest.builder()\n .kybResponseId(\"69aeeb95febb0f1704042259\")\n .vendorData(\"company-1234\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "kyb->listUbos([\n 'kyb_response_id' => '69aeeb95febb0f1704042259',\n 'vendor_data' => 'company-1234',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.kyb.list_ubos(\n kyb_response_id: \"69aeeb95febb0f1704042259\",\n vendor_data: \"company-1234\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Kyb.ListUbosAsync(new KYBRegistryCandidateRequest\n{\n KybResponseId = \"69aeeb95febb0f1704042259\",\n VendorData = \"company-1234\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -46693,8 +53364,7 @@ "description": "Registry filing dates, when available. Annual returns and general meetings use last_annual_return_date and last_agm_date; they are distinct from financial accounts." }, "registry_data": { - "type": "object", - "description": "Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (`addresses`, `industries`, `ownership`, `beneficial_owners[].shareholding`) instead." + "$ref": "#/components/schemas/KYBRegistryData" }, "user_provided_data": { "type": "object", @@ -46748,6 +53418,55 @@ "type": "string", "nullable": true, "description": "The registry tier the workflow ordered: `basic`, `shareholders` or `ubo`. Also in `ownership.tier_requested`." + }, + "registry_monitoring": { + "type": "object", + "nullable": true, + "description": "The latest registry monitor for the company, or `null` when none exists.", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string" + }, + "unavailable_reason": { + "type": "string", + "nullable": true + }, + "enrolled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "next_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "last_event_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "events_count": { + "type": "integer" + }, + "watched_fields": { + "description": "The company fields the monitor watches." + } + } } } }, @@ -46844,22 +53563,11 @@ "due_by_date": "26 August 2026" }, "registry_data": { - "name": "Tesco PLC", - "registration_number": "00445790", - "status": "active", - "type": "Public Limited Company", - "incorporation_date": "1947-11-27", - "tax_number": "GB412 8925 93", - "country_code": "GB", - "fetch_status": "resolved", - "industries_detail": [ - { - "code": "47110", - "name": "Retail Sale In Non-specialised Stores With Food, Beverages Or Tobacco Predominating", - "description": null, - "meta_detail": [] - } - ] + "ubo_resolution": { + "parent_chain": [], + "subsidiaries": [], + "unresolved": [] + } }, "user_provided_data": null, "confirmed_by_user_at": null, @@ -46901,7 +53609,7 @@ } }, "403": { - "description": "Permission denied. Returned when the `x-api-key` header is missing, malformed, revoked, or belongs to another environment — and also when the calling organization's balance cannot cover the call. Authentication failures return `403` with `{\"detail\": ...}`; this API never returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", + "description": "Permission denied. Returned when the `x-api-key` header is missing, and also when the calling organization's balance cannot cover the call; a wrong, revoked or expired key returns `401`. A missing key returns `403` with `{\"detail\": ...}`; a wrong, revoked or expired key returns `401`. Credit shortfalls return `403` with `{\"error\": ...}` before any screening or provider call happens.", "content": { "application/json": { "examples": { @@ -47053,7 +53761,7 @@ } } }, - "description": "Missing or invalid credentials (x-api-key or Authorization: Bearer)." + "description": "Missing credentials (x-api-key or Authorization: Bearer)." } }, "x-codeSamples": [ @@ -47065,7 +53773,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"]\n}\n\nresponse = requests.get(\n \"https://verification.didit.me/v3/id-verification/wallets/\",\n headers=headers,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.list()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.list();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.List(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().list();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->list();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.list\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.ListAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -47155,7 +53893,7 @@ } } }, - "description": "Missing or invalid credentials (x-api-key or Authorization: Bearer)." + "description": "Missing credentials (x-api-key or Authorization: Bearer)." }, "404": { "content": { @@ -47177,7 +53915,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"]\n}\n\nresponse = requests.get(\n \"https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/\",\n headers=headers,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.retrieve_verification(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.retrieveVerification(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.RetrieveVerification(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().retrieveVerification(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->retrieveVerification('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.retrieve_verification(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.RetrieveVerificationAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -47268,7 +54036,7 @@ } } }, - "description": "Missing or invalid credentials (x-api-key or Authorization: Bearer)." + "description": "Missing credentials (x-api-key or Authorization: Bearer)." }, "404": { "content": { @@ -47300,7 +54068,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"]\n}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/poll/\",\n headers=headers,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.poll_verification(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.pollVerification(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.PollVerification(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().pollVerification(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->pollVerification('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.poll_verification(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.PollVerificationAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -47387,7 +54185,7 @@ } } }, - "description": "Missing or invalid credentials (x-api-key or Authorization: Bearer)." + "description": "Missing credentials (x-api-key or Authorization: Bearer)." }, "404": { "content": { @@ -47419,7 +54217,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"]\n}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/cancel/\",\n headers=headers,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.cancel_verification(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.cancelVerification(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.CancelVerification(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().cancelVerification(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->cancelVerification('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.cancel_verification(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.CancelVerificationAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ] } @@ -47545,7 +54373,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -47587,7 +54415,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'DNK',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/mitid/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_mitid(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"DNK\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startMitid({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"DNK\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartMitid(ctx, didit.IDWalletsStartMitidParams{\n\tBody: didit.DigitalIDWalletAPIMitidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIMitidWalletVerificationStartCountryEnum(\"DNK\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiMitidWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiMitidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startMitid(DigitalIdWalletApiMitidWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiMitidWalletVerificationStartCountryEnum.of(\"DNK\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startMitid([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'DNK',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_mitid(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"DNK\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartMitidAsync(new DigitalIdWalletApiMitidWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiMitidWalletVerificationStartCountryEnum(\"DNK\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "mitid" @@ -47714,7 +54572,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -47756,7 +54614,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'SWE',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/bankid-se/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_bankid_se(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"SWE\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBankidSe({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"SWE\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBankidSe(ctx, didit.IDWalletsStartBankidSeParams{\n\tBody: didit.DigitalIDWalletAPIBankidSeWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryEe9enum(\"SWE\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBankidSeWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryEe9Enum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBankidSe(DigitalIdWalletApiBankidSeWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryEe9Enum.of(\"SWE\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startBankidSe([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'SWE',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_bankid_se(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"SWE\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBankidSeAsync(new DigitalIdWalletApiBankidSeWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryEe9Enum(\"SWE\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "bankid_se" @@ -47883,7 +54771,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -47925,7 +54813,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'NOR',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/bankid-no/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_bankid_no(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"NOR\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBankidNo({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NOR\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBankidNo(ctx, didit.IDWalletsStartBankidNoParams{\n\tBody: didit.DigitalIDWalletAPIBankidNoWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryAfcEnum(\"NOR\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBankidNoWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryAfcEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBankidNo(DigitalIdWalletApiBankidNoWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryAfcEnum.of(\"NOR\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startBankidNo([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'NOR',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_bankid_no(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NOR\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBankidNoAsync(new DigitalIdWalletApiBankidNoWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryAfcEnum(\"NOR\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "bankid_no" @@ -48052,7 +54970,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -48094,7 +55012,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'NOR',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/vipps/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_vipps(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"NOR\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startVipps({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NOR\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartVipps(ctx, didit.IDWalletsStartVippsParams{\n\tBody: didit.DigitalIDWalletAPIVippsWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryAfcEnum(\"NOR\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountryAfcEnum;\nimport me.didit.types.DigitalIdWalletApiVippsWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startVipps(DigitalIdWalletApiVippsWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryAfcEnum.of(\"NOR\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startVipps([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'NOR',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_vipps(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NOR\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartVippsAsync(new DigitalIdWalletApiVippsWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryAfcEnum(\"NOR\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "vipps" @@ -48221,7 +55169,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -48263,7 +55211,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'NOR',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/buypass/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_buypass(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"NOR\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBuypass({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NOR\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBuypass(ctx, didit.IDWalletsStartBuypassParams{\n\tBody: didit.DigitalIDWalletAPIBuypassWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryAfcEnum(\"NOR\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBuypassWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryAfcEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBuypass(DigitalIdWalletApiBuypassWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryAfcEnum.of(\"NOR\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startBuypass([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'NOR',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_buypass(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NOR\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBuypassAsync(new DigitalIdWalletApiBuypassWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryAfcEnum(\"NOR\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "buypass" @@ -48390,7 +55368,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -48432,7 +55410,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'BEL',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/itsme/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_itsme(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"BEL\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startItsme({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"BEL\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartItsme(ctx, didit.IDWalletsStartItsmeParams{\n\tBody: didit.DigitalIDWalletAPIItsmeWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.DigitalIDWalletAPIItsmeWalletVerificationStartCountryEnum(\"BEL\"),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiItsmeWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiItsmeWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startItsme(DigitalIdWalletApiItsmeWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiItsmeWalletVerificationStartCountryEnum.of(\"BEL\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startItsme([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'BEL',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_itsme(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"BEL\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartItsmeAsync(new DigitalIdWalletApiItsmeWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = \"BEL\",\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "itsme" @@ -48559,7 +55567,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -48601,7 +55609,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'NLD',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/idin/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_idin(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"NLD\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startIdin({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NLD\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartIdin(ctx, didit.IDWalletsStartIdinParams{\n\tBody: didit.DigitalIDWalletAPIIdinWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIIdinWalletVerificationStartCountryEnum(\"NLD\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiIdinWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiIdinWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startIdin(DigitalIdWalletApiIdinWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiIdinWalletVerificationStartCountryEnum.of(\"NLD\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startIdin([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'NLD',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_idin(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"NLD\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartIdinAsync(new DigitalIdWalletApiIdinWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiIdinWalletVerificationStartCountryEnum(\"NLD\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "idin" @@ -48728,7 +55766,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -48770,7 +55808,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'FIN',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/ftn/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_ftn(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"FIN\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startFtn({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"FIN\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartFtn(ctx, didit.IDWalletsStartFtnParams{\n\tBody: didit.DigitalIDWalletAPIFtnWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIFtnWalletVerificationStartCountryEnum(\"FIN\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startFtn(DigitalIdWalletApiFtnWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiFtnWalletVerificationStartCountryEnum.of(\"FIN\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startFtn([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'FIN',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_ftn(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"FIN\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartFtnAsync(new DigitalIdWalletApiFtnWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiFtnWalletVerificationStartCountryEnum(\"FIN\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "ftn" @@ -48897,7 +55965,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -48939,7 +56007,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'DEU',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/personalausweis/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_personalausweis(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"DEU\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startPersonalausweis({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"DEU\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartPersonalausweis(ctx, didit.IDWalletsStartPersonalausweisParams{\n\tBody: didit.DigitalIDWalletAPIPersonalausweisWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIPersonalausweisWalletVerificationStartCountryEnum(\"DEU\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startPersonalausweis(DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum.of(\"DEU\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startPersonalausweis([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'DEU',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_personalausweis(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"DEU\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartPersonalausweisAsync(new DigitalIdWalletApiPersonalausweisWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiPersonalausweisWalletVerificationStartCountryEnum(\"DEU\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "personalausweis" @@ -49066,7 +56164,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -49108,7 +56206,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'SWE',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/frejaid/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_frejaid(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"SWE\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startFrejaid({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"SWE\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartFrejaid(ctx, didit.IDWalletsStartFrejaidParams{\n\tBody: didit.DigitalIDWalletAPIFrejaidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryEe9enum(\"SWE\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountryEe9Enum;\nimport me.didit.types.DigitalIdWalletApiFrejaidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startFrejaid(DigitalIdWalletApiFrejaidWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryEe9Enum.of(\"SWE\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startFrejaid([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'SWE',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_frejaid(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"SWE\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartFrejaidAsync(new DigitalIdWalletApiFrejaidWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryEe9Enum(\"SWE\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "frejaid" @@ -49235,7 +56363,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -49277,7 +56405,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'ARE',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/uae-pass/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_uae_pass(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"ARE\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startUaePass({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"ARE\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartUaePass(ctx, didit.IDWalletsStartUaePassParams{\n\tBody: didit.DigitalIDWalletAPIUaePassWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIUaePassWalletVerificationStartCountryEnum(\"ARE\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startUaePass(DigitalIdWalletApiUaePassWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum.of(\"ARE\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startUaePass([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'ARE',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_uae_pass(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"ARE\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartUaePassAsync(new DigitalIdWalletApiUaePassWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum(\"ARE\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "uae_pass" @@ -49404,7 +56562,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -49446,7 +56604,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'BRA',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/govbr/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_govbr(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"BRA\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startGovbr({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"BRA\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartGovbr(ctx, didit.IDWalletsStartGovbrParams{\n\tBody: didit.DigitalIDWalletAPIGovbrWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIGovbrWalletVerificationStartCountryEnum(\"BRA\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startGovbr(DigitalIdWalletApiGovbrWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum.of(\"BRA\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startGovbr([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'BRA',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_govbr(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"BRA\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartGovbrAsync(new DigitalIdWalletApiGovbrWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum(\"BRA\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "govbr" @@ -49573,7 +56761,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -49615,7 +56803,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'GBR',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/oneid/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_oneid(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"GBR\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startOneid({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"GBR\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartOneid(ctx, didit.IDWalletsStartOneidParams{\n\tBody: didit.DigitalIDWalletAPIOneidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountry520enum(\"GBR\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountry520Enum;\nimport me.didit.types.DigitalIdWalletApiOneidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startOneid(DigitalIdWalletApiOneidWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountry520Enum.of(\"GBR\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startOneid([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'GBR',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_oneid(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"GBR\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartOneidAsync(new DigitalIdWalletApiOneidWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountry520Enum(\"GBR\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "oneid" @@ -49742,7 +56960,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -49784,7 +57002,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'GBR',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/govuk-wallet/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_govuk_wallet(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"GBR\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startGovukWallet({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"GBR\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartGovukWallet(ctx, didit.IDWalletsStartGovukWalletParams{\n\tBody: didit.DigitalIDWalletAPIGovukWalletWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountry520enum(\"GBR\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountry520Enum;\nimport me.didit.types.DigitalIdWalletApiGovukWalletWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startGovukWallet(DigitalIdWalletApiGovukWalletWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountry520Enum.of(\"GBR\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startGovukWallet([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'GBR',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_govuk_wallet(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"GBR\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartGovukWalletAsync(new DigitalIdWalletApiGovukWalletWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountry520Enum(\"GBR\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "govuk_wallet" @@ -49912,7 +57160,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -49954,7 +57202,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'EST',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'personal_code': '00000000000'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/smart-id/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_smart_id(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"EST\",\n personal_code=\"00000000000\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startSmartId({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"EST\",\n personal_code: \"00000000000\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartSmartID(ctx, didit.IDWalletsStartSmartIDParams{\n\tBody: didit.DigitalIDWalletAPISmartIDWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.DigitalIDWalletAPISmartIDWalletVerificationStartCountryEnum(\"EST\"),\n\t\tPersonalCode: \"00000000000\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiSmartIdWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiSmartIdWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startSmartId(DigitalIdWalletApiSmartIdWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiSmartIdWalletVerificationStartCountryEnum.of(\"EST\"))\n .personalCode(\"00000000000\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startSmartId([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'EST',\n 'personal_code' => '00000000000',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_smart_id(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"EST\",\n personal_code: \"00000000000\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartSmartIdAsync(new DigitalIdWalletApiSmartIdWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = \"EST\",\n PersonalCode = \"00000000000\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "smart_id" @@ -50083,7 +57361,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -50125,7 +57403,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'EST',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'personal_code': '00000000000',\n 'phone_number': '+37200000000'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/mobile-id/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_mobile_id(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"EST\",\n personal_code=\"00000000000\",\n phone_number=\"+37200000000\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startMobileId({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"EST\",\n personal_code: \"00000000000\",\n phone_number: \"+37200000000\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartMobileID(ctx, didit.IDWalletsStartMobileIDParams{\n\tBody: didit.DigitalIDWalletAPIMobileIDWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.DigitalIDWalletAPIMobileIDWalletVerificationStartCountryEnum(\"EST\"),\n\t\tPersonalCode: \"00000000000\",\n\t\tPhoneNumber: \"+37200000000\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiMobileIdWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiMobileIdWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startMobileId(DigitalIdWalletApiMobileIdWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiMobileIdWalletVerificationStartCountryEnum.of(\"EST\"))\n .personalCode(\"00000000000\")\n .phoneNumber(\"+37200000000\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startMobileId([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'EST',\n 'personal_code' => '00000000000',\n 'phone_number' => '+37200000000',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_mobile_id(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"EST\",\n personal_code: \"00000000000\",\n phone_number: \"+37200000000\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartMobileIdAsync(new DigitalIdWalletApiMobileIdWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = \"EST\",\n PersonalCode = \"00000000000\",\n PhoneNumber = \"+37200000000\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "mobile_id" @@ -50252,7 +57560,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -50294,7 +57602,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'EST',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/idcard-ee/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_idcard_ee(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"EST\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startIdcardEe({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"EST\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartIdcardEe(ctx, didit.IDWalletsStartIdcardEeParams{\n\tBody: didit.DigitalIDWalletAPIIdcardEeWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIIdcardEeWalletVerificationStartCountryEnum(\"EST\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiIdcardEeWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startIdcardEe(DigitalIdWalletApiIdcardEeWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum.of(\"EST\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startIdcardEe([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'EST',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_idcard_ee(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"EST\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartIdcardEeAsync(new DigitalIdWalletApiIdcardEeWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiIdcardEeWalletVerificationStartCountryEnum(\"EST\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "idcard_ee" @@ -50421,7 +57759,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -50463,7 +57801,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'LVA',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/eparaksts-mobile/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_eparaksts_mobile(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"LVA\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startEparakstsMobile({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"LVA\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartEparakstsMobile(ctx, didit.IDWalletsStartEparakstsMobileParams{\n\tBody: didit.DigitalIDWalletAPIEparakstsMobileWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIEparakstsMobileWalletVerificationStartCountryEnum(\"LVA\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startEparakstsMobile(DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum.of(\"LVA\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startEparakstsMobile([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'LVA',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_eparaksts_mobile(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"LVA\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartEparakstsMobileAsync(new DigitalIdWalletApiEparakstsMobileWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiEparakstsMobileWalletVerificationStartCountryEnum(\"LVA\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "eparaksts_mobile" @@ -50590,7 +57958,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -50632,7 +58000,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'CZE',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/bankid-cz/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_bankid_cz(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"CZE\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startBankidCz({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"CZE\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartBankidCz(ctx, didit.IDWalletsStartBankidCzParams{\n\tBody: didit.DigitalIDWalletAPIBankidCzWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryE2dEnum(\"CZE\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiBankidCzWalletVerificationStartRequest;\nimport me.didit.types.DigitalIdWalletApiCountryE2dEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startBankidCz(DigitalIdWalletApiBankidCzWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryE2dEnum.of(\"CZE\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startBankidCz([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'CZE',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_bankid_cz(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"CZE\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartBankidCzAsync(new DigitalIdWalletApiBankidCzWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryE2dEnum(\"CZE\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "bankid_cz" @@ -50759,7 +58157,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -50801,7 +58199,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'CZE',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/mojeid/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_mojeid(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"CZE\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startMojeid({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"CZE\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartMojeid(ctx, didit.IDWalletsStartMojeidParams{\n\tBody: didit.DigitalIDWalletAPIMojeidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPICountryE2dEnum(\"CZE\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiCountryE2dEnum;\nimport me.didit.types.DigitalIdWalletApiMojeidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startMojeid(DigitalIdWalletApiMojeidWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiCountryE2dEnum.of(\"CZE\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startMojeid([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'CZE',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_mojeid(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"CZE\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartMojeidAsync(new DigitalIdWalletApiMojeidWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiCountryE2dEnum(\"CZE\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "mojeid" @@ -50928,7 +58356,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -50970,7 +58398,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'UKR',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/diia/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_diia(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"UKR\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startDiia({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"UKR\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartDiia(ctx, didit.IDWalletsStartDiiaParams{\n\tBody: didit.DigitalIDWalletAPIDiiaWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIDiiaWalletVerificationStartCountryEnum(\"UKR\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiDiiaWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startDiia(DigitalIdWalletApiDiiaWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum.of(\"UKR\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startDiia([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'UKR',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_diia(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"UKR\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartDiiaAsync(new DigitalIdWalletApiDiiaWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiDiiaWalletVerificationStartCountryEnum(\"UKR\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "diia" @@ -51097,7 +58555,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -51139,7 +58597,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'FRA',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/franceconnect/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_franceconnect(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"FRA\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startFranceconnect({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"FRA\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartFranceconnect(ctx, didit.IDWalletsStartFranceconnectParams{\n\tBody: didit.DigitalIDWalletAPIFranceconnectWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIFranceconnectWalletVerificationStartCountryEnum(\"FRA\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiFranceconnectWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startFranceconnect(DigitalIdWalletApiFranceconnectWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum.of(\"FRA\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startFranceconnect([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'FRA',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_franceconnect(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"FRA\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartFranceconnectAsync(new DigitalIdWalletApiFranceconnectWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiFranceconnectWalletVerificationStartCountryEnum(\"FRA\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "franceconnect" @@ -51266,7 +58754,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -51308,7 +58796,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'ISL',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/audkenni/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_audkenni(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"ISL\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startAudkenni({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"ISL\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartAudkenni(ctx, didit.IDWalletsStartAudkenniParams{\n\tBody: didit.DigitalIDWalletAPIAudkenniWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIAudkenniWalletVerificationStartCountryEnum(\"ISL\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiAudkenniWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startAudkenni(DigitalIdWalletApiAudkenniWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum.of(\"ISL\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startAudkenni([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'ISL',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_audkenni(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"ISL\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartAudkenniAsync(new DigitalIdWalletApiAudkenniWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiAudkenniWalletVerificationStartCountryEnum(\"ISL\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "audkenni" @@ -51435,7 +58953,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -51477,7 +58995,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'AUS',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/connectid/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_connectid(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"AUS\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startConnectid({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"AUS\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartConnectid(ctx, didit.IDWalletsStartConnectidParams{\n\tBody: didit.DigitalIDWalletAPIConnectidWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.Some(didit.DigitalIDWalletAPIConnectidWalletVerificationStartCountryEnum(\"AUS\")),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiConnectidWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startConnectid(DigitalIdWalletApiConnectidWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum.of(\"AUS\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startConnectid([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'AUS',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_connectid(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"AUS\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartConnectidAsync(new DigitalIdWalletApiConnectidWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = new DigitalIdWalletApiConnectidWalletVerificationStartCountryEnum(\"AUS\"),\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "connectid" @@ -51604,7 +59152,7 @@ } } }, - "description": "Missing or invalid credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." }, "409": { "content": { @@ -51646,7 +59194,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nimport requests\n\nheaders = {\n \"x-api-key\": os.environ[\"DIDIT_API_KEY\"],\n \"Idempotency-Key\": \"your-unique-attempt-key\"\n}\npayload = {'country': 'AUT',\n 'vendor_data': 'your-customer-reference',\n 'metadata': {'reference': 'example'},\n 'return_url': 'https://app.example.com/identity/complete'}\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/id-verification/wallets/eudi/\",\n headers=headers,\n json=payload,\n timeout=30,\n)\nresponse.raise_for_status()\nprint(response.json())\n" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.id_wallets.start_eudi(\n vendor_data=\"your-customer-reference\",\n metadata={\"reference\": \"example\"},\n country=\"AUT\",\n return_url=\"https://app.example.com/identity/complete\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.idWallets.startEudi({\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"AUT\",\n return_url: \"https://app.example.com/identity/complete\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.IDWallets.StartEudi(ctx, didit.IDWalletsStartEudiParams{\n\tBody: didit.DigitalIDWalletAPIEudiWalletVerificationStartRequest{\n\t\tVendorData: didit.String(\"your-customer-reference\"),\n\t\tMetadata: didit.Some(map[string]any{\"reference\": \"example\"}),\n\t\tCountry: didit.DigitalIDWalletAPIEudiWalletVerificationStartCountryEnum(\"AUT\"),\n\t\tReturnURL: \"https://app.example.com/identity/complete\",\n\t},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.DigitalIdWalletApiEudiWalletVerificationStartCountryEnum;\nimport me.didit.types.DigitalIdWalletApiEudiWalletVerificationStartRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.idWallets().startEudi(DigitalIdWalletApiEudiWalletVerificationStartRequest.builder()\n .vendorData(\"your-customer-reference\")\n .metadata(Map.of(\"reference\", \"example\"))\n .country(DigitalIdWalletApiEudiWalletVerificationStartCountryEnum.of(\"AUT\"))\n .returnUrl(\"https://app.example.com/identity/complete\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "idWallets->startEudi([\n 'vendor_data' => 'your-customer-reference',\n 'metadata' => ['reference' => 'example'],\n 'country' => 'AUT',\n 'return_url' => 'https://app.example.com/identity/complete',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.id_wallets.start_eudi(\n vendor_data: \"your-customer-reference\",\n metadata: { reference: \"example\" },\n country: \"AUT\",\n return_url: \"https://app.example.com/identity/complete\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.IdWallets.StartEudiAsync(new DigitalIdWalletApiEudiWalletVerificationStartRequest\n{\n VendorData = \"your-customer-reference\",\n Metadata = new Dictionary { [\"reference\"] = \"example\" },\n Country = \"AUT\",\n ReturnUrl = \"https://app.example.com/identity/complete\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-wallet-id": "eudi" @@ -51751,6 +59329,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.teams.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.teams.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Teams.ListAutoPaging(ctx, didit.CasesTeamsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().teams().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->teams->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.teams.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Teams.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] }, "post": { @@ -51813,6 +59428,15 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CaseReviewTeamCreate" + }, + "example": { + "name": "AML analysts", + "members": [ + { + "user_id": "9a000000-0000-4000-8000-0000000000aa", + "capacity": 10 + } + ] } } } @@ -51821,6 +59445,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.teams.create(\n name=\"AML analysts\",\n members=[{\n \"user_id\": \"9a000000-0000-4000-8000-0000000000aa\",\n \"capacity\": 10,\n }],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.teams.create({\n name: \"AML analysts\",\n members: [{\n user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n capacity: 10,\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Teams.Create(ctx, didit.CaseReviewTeamCreate{\n\tName: \"AML analysts\",\n\tMembers: []didit.CaseReviewTeamMemberParam{{\n\t\tUserID: \"9a000000-0000-4000-8000-0000000000aa\",\n\t\tCapacity: didit.Int(10),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseReviewTeamCreate;\nimport me.didit.types.CaseReviewTeamMember;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().teams().create(CaseReviewTeamCreate.builder()\n .name(\"AML analysts\")\n .members(List.of(CaseReviewTeamMember.builder()\n .userId(\"9a000000-0000-4000-8000-0000000000aa\")\n .capacity(10L)\n .build()))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->teams->create([\n 'name' => 'AML analysts',\n 'members' => [[\n 'user_id' => '9a000000-0000-4000-8000-0000000000aa',\n 'capacity' => 10,\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.teams.create(\n name: \"AML analysts\",\n members: [{\n user_id: \"9a000000-0000-4000-8000-0000000000aa\",\n capacity: 10,\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Teams.CreateAsync(new CaseReviewTeamCreate\n{\n Name = \"AML analysts\",\n Members = new CaseReviewTeamMember[]\n {\n new()\n {\n UserId = \"9a000000-0000-4000-8000-0000000000aa\",\n Capacity = 10,\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -51888,6 +59549,43 @@ ], "tags": [ "Fraud Check" + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.fraud_checks.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.fraudChecks.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.fraudChecks().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "fraudChecks->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.fraud_checks.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FraudChecks.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -51982,6 +59680,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.requests.list(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.requests.list(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Requests.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesRequestsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().requests().list(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->list('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.requests.list(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Requests.ListAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] }, "post": { @@ -52074,7 +59809,44 @@ "ApiKeyAuth": [] } ], - "description": "Confirm the exact signed preview within 15 minutes. Only fixed templates and an OTP-verified contact belonging to the case subject are accepted. The request ID makes retries idempotent. Delivery is queued; SENT, SIMULATED and UNKNOWN are distinct outcomes. An actionable request sets the case to Awaiting user. A review update leaves its status unchanged." + "description": "Confirm the exact signed preview within 15 minutes. Only fixed templates and an OTP-verified contact belonging to the case subject are accepted. The request ID makes retries idempotent. Delivery is queued; SENT, SIMULATED and UNKNOWN are distinct outcomes. An actionable request sets the case to Awaiting user. A review update leaves its status unchanged.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.create(\n \"11111111-2222-3333-4444-555555555555\",\n contact_id=\"11111111-2222-3333-4444-555555555555\",\n purpose=\"identity_document\",\n request_id=\"11111111-2222-3333-4444-555555555555\",\n expires_at=\"2026-01-15T10:00:00Z\",\n preview_token=\"your-preview-token\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.create(\"11111111-2222-3333-4444-555555555555\", {\n contact_id: \"11111111-2222-3333-4444-555555555555\",\n purpose: \"identity_document\",\n request_id: \"11111111-2222-3333-4444-555555555555\",\n expires_at: \"2026-01-15T10:00:00Z\",\n preview_token: \"your-preview-token\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CustomerMessagingCaseRequestConfirmRequest{\n\tContactID: \"11111111-2222-3333-4444-555555555555\",\n\tPurpose: didit.CustomerMessagingPurposeEnum(\"identity_document\"),\n\tRequestID: \"11111111-2222-3333-4444-555555555555\",\n\tExpiresAt: time.Date(2026, 1, 15, 10, 0, 0, 0, time.UTC),\n\tPreviewToken: \"your-preview-token\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.OffsetDateTime;\nimport me.didit.Didit;\nimport me.didit.types.CustomerMessagingCaseRequestConfirmRequest;\nimport me.didit.types.CustomerMessagingPurposeEnum;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().create(\"11111111-2222-3333-4444-555555555555\", CustomerMessagingCaseRequestConfirmRequest.builder()\n .contactId(\"11111111-2222-3333-4444-555555555555\")\n .purpose(CustomerMessagingPurposeEnum.of(\"identity_document\"))\n .requestId(\"11111111-2222-3333-4444-555555555555\")\n .expiresAt(OffsetDateTime.parse(\"2026-01-15T10:00:00Z\"))\n .previewToken(\"your-preview-token\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->create('11111111-2222-3333-4444-555555555555', [\n 'contact_id' => '11111111-2222-3333-4444-555555555555',\n 'purpose' => 'identity_document',\n 'request_id' => '11111111-2222-3333-4444-555555555555',\n 'expires_at' => '2026-01-15T10:00:00Z',\n 'preview_token' => 'your-preview-token',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.create(\n \"11111111-2222-3333-4444-555555555555\",\n contact_id: \"11111111-2222-3333-4444-555555555555\",\n purpose: \"identity_document\",\n request_id: \"11111111-2222-3333-4444-555555555555\",\n expires_at: \"2026-01-15T10:00:00Z\",\n preview_token: \"your-preview-token\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new CustomerMessagingCaseRequestConfirmRequest\n{\n ContactId = \"11111111-2222-3333-4444-555555555555\",\n Purpose = \"identity_document\",\n RequestId = \"11111111-2222-3333-4444-555555555555\",\n ExpiresAt = DateTimeOffset.Parse(\"2026-01-15T10:00:00Z\"),\n PreviewToken = \"your-preview-token\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/fraud/checks/": { @@ -52098,6 +59870,28 @@ "application/json": { "schema": { "$ref": "#/components/schemas/FraudCheckRequestRequest" + }, + "example": { + "client_reference": "review-attempt-001", + "subject": { + "identifiers": [ + { + "type": "email", + "value": "applicant@example.com" + } + ], + "attributes": { + "first_name": "Alex", + "last_name": "Example" + } + }, + "checks": { + "include": [ + "networks_same_org", + "networks_cross_org", + "email_risk" + ] + } } }, "multipart/form-data": { @@ -52196,6 +59990,43 @@ ], "tags": [ "Fraud Check" + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.fraud_checks.create(\n client_reference=\"review-attempt-001\",\n subject={\n \"identifiers\": [{\n \"type\": \"email\",\n \"value\": \"applicant@example.com\",\n }],\n \"attributes\": {\n \"first_name\": \"Alex\",\n \"last_name\": \"Example\",\n },\n },\n checks={\n \"include\": [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.fraudChecks.create({\n client_reference: \"review-attempt-001\",\n subject: {\n identifiers: [{\n type: \"email\",\n value: \"applicant@example.com\",\n }],\n attributes: {\n first_name: \"Alex\",\n last_name: \"Example\",\n },\n },\n checks: {\n include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Create(ctx, didit.FraudCheckRequestRequest{\n\tClientReference: didit.String(\"review-attempt-001\"),\n\tSubject: didit.FraudCheckSubjectRequest{\n\t\tIdentifiers: []didit.FraudCheckIdentifierRequest{{\n\t\t\tType: didit.FraudTypeEnum(\"email\"),\n\t\t\tValue: \"applicant@example.com\",\n\t\t}},\n\t\tAttributes: didit.Some(didit.FraudCheckAttributesRequest{\n\t\t\tFirstName: didit.String(\"Alex\"),\n\t\t\tLastName: didit.String(\"Example\"),\n\t\t}),\n\t},\n\tChecks: didit.Some(didit.FraudCheckModuleSelectionRequest{\n\t\tInclude: didit.Some([]didit.FraudExcludeEnum{didit.FraudExcludeEnum(\"networks_same_org\"), didit.FraudExcludeEnum(\"networks_cross_org\"), didit.FraudExcludeEnum(\"email_risk\")}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.FraudCheckAttributesRequest;\nimport me.didit.types.FraudCheckIdentifierRequest;\nimport me.didit.types.FraudCheckModuleSelectionRequest;\nimport me.didit.types.FraudCheckRequestRequest;\nimport me.didit.types.FraudCheckSubjectRequest;\nimport me.didit.types.FraudExcludeEnum;\nimport me.didit.types.FraudTypeEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.fraudChecks().create(FraudCheckRequestRequest.builder()\n .clientReference(\"review-attempt-001\")\n .subject(FraudCheckSubjectRequest.builder()\n .identifiers(List.of(FraudCheckIdentifierRequest.builder()\n .type(FraudTypeEnum.of(\"email\"))\n .value(\"applicant@example.com\")\n .build()))\n .attributes(FraudCheckAttributesRequest.builder()\n .firstName(\"Alex\")\n .lastName(\"Example\")\n .build())\n .build())\n .checks(FraudCheckModuleSelectionRequest.builder()\n .include(List.of(FraudExcludeEnum.of(\"networks_same_org\"), FraudExcludeEnum.of(\"networks_cross_org\"), FraudExcludeEnum.of(\"email_risk\")))\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "fraudChecks->create([\n 'client_reference' => 'review-attempt-001',\n 'subject' => [\n 'identifiers' => [[\n 'type' => 'email',\n 'value' => 'applicant@example.com',\n ]],\n 'attributes' => [\n 'first_name' => 'Alex',\n 'last_name' => 'Example',\n ],\n ],\n 'checks' => [\n 'include' => ['networks_same_org', 'networks_cross_org', 'email_risk'],\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.fraud_checks.create(\n client_reference: \"review-attempt-001\",\n subject: {\n identifiers: [{\n type: \"email\",\n value: \"applicant@example.com\",\n }],\n attributes: {\n first_name: \"Alex\",\n last_name: \"Example\",\n },\n },\n checks: {\n include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FraudChecks.CreateAsync(new FraudCheckRequestRequest\n{\n ClientReference = \"review-attempt-001\",\n Subject = new()\n {\n Identifiers = new FraudCheckIdentifierRequest[]\n {\n new()\n {\n Type = \"email\",\n Value = \"applicant@example.com\",\n },\n },\n Attributes = new FraudCheckAttributesRequest\n {\n FirstName = \"Alex\",\n LastName = \"Example\",\n },\n },\n Checks = new FraudCheckModuleSelectionRequest\n {\n Include = new FraudExcludeEnum[] { \"networks_same_org\", \"networks_cross_org\", \"email_risk\" },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -52278,6 +60109,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.cancel(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.cancel(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Cancel(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().cancel(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->cancel('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.cancel(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.CancelAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -52345,6 +60213,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.retrieve_options(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.retrieveOptions(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.RetrieveOptions(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().retrieveOptions(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->retrieveOptions('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.retrieve_options(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.RetrieveOptionsAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -52422,6 +60327,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\ncontent = client.cases.requests.retrieve_attachment(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.png\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst content = await didit.cases.requests.retrieveAttachment(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nawait writeFile(\"download.png\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Cases.Requests.RetrieveAttachment(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().requests().retrieveAttachment(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\n .writeTo(Path.of(\"download.png\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->retrieveAttachment('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.png');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ncontent = didit.cases.requests.retrieve_attachment(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nFile.binwrite(\"download.png\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar content = await client.Cases.Requests.RetrieveAttachmentAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.png\");" + } ] } }, @@ -52513,6 +60455,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.routing_rules.list_history(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.routingRules.listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.RoutingRules.ListHistoryAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesRoutingRulesListHistoryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().routingRules().listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->listHistory('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.routing_rules.list_history(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.RoutingRules.ListHistoryAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] } }, @@ -52597,7 +60576,8 @@ "EMAIL", "KYB_REGISTRY", "KYB_KEY_PEOPLE", - "KYB" + "KYB", + "GEOLOCATION" ], "example": "OCR" } @@ -52664,6 +60644,7 @@ "sender_kind", "subject", "html", + "text", "language", "will_be_sent", "not_sent_reason", @@ -52723,6 +60704,11 @@ "description": "The email's HTML exactly as it is sent, with its logo embedded as a data URL. Render it in a sandboxed frame, never directly in your application DOM.", "example": "..." }, + "text": { + "type": "string", + "description": "The email's words as plain text, as the person's Messages thread keeps them, for a compact preview (the HTML stays the email the person receives).", + "example": "Almost there\n\nSome steps need to be completed again.\nHere’s what to fix:\n\nhttps://verify.didit.me/session/abc123" + }, "language": { "type": "string", "description": "The language the email is written in. English (`en`) when the `email_language` you asked for is not offered.", @@ -52786,7 +60772,8 @@ "EMAIL", "KYB_REGISTRY", "KYB_KEY_PEOPLE", - "KYB" + "KYB", + "GEOLOCATION" ], "example": "OCR" } @@ -52917,7 +60904,7 @@ } }, "403": { - "description": "Missing or invalid credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", + "description": "Missing credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", "content": { "application/json": { "examples": { @@ -52972,7 +60959,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.preview_resubmission(\n \"11111111-2222-3333-4444-555555555555\",\n nodes_to_resubmit=[{\n \"node_id\": \"feature_poa_1\",\n \"feature\": \"POA\",\n }],\n email_language=\"en\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.previewResubmission(\"11111111-2222-3333-4444-555555555555\", {\n nodes_to_resubmit: [{\n node_id: \"feature_poa_1\",\n feature: \"POA\",\n }],\n email_language: \"en\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.PreviewResubmission(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsPreviewResubmissionParams{\n\tNodesToResubmit: didit.Some([]didit.SessionsPreviewResubmissionParamsNodesToResubmit{{\n\t\tNodeID: \"feature_poa_1\",\n\t\tFeature: \"POA\",\n\t}}),\n\tEmailLanguage: didit.String(\"en\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsPreviewResubmissionParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().previewResubmission(\"11111111-2222-3333-4444-555555555555\", SessionsPreviewResubmissionParams.builder()\n .nodesToResubmit(List.of(SessionsPreviewResubmissionParams.NodesToResubmit.builder()\n .nodeId(\"feature_poa_1\")\n .feature(SessionsPreviewResubmissionParams.NodesToResubmit.Feature.of(\"POA\"))\n .build()))\n .emailLanguage(\"en\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->previewResubmission('11111111-2222-3333-4444-555555555555', [\n 'nodes_to_resubmit' => [[\n 'node_id' => 'feature_poa_1',\n 'feature' => 'POA',\n ]],\n 'email_language' => 'en',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.preview_resubmission(\n \"11111111-2222-3333-4444-555555555555\",\n nodes_to_resubmit: [{\n node_id: \"feature_poa_1\",\n feature: \"POA\",\n }],\n email_language: \"en\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.PreviewResubmissionAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsPreviewResubmissionParams\n{\n NodesToResubmit = new SessionsPreviewResubmissionParamsNodesToResubmit[]\n {\n new()\n {\n NodeId = \"feature_poa_1\",\n Feature = \"POA\",\n },\n },\n EmailLanguage = \"en\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/{record_uuid}/": { @@ -53046,6 +61070,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] }, "patch": { @@ -53131,6 +61192,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.update(\n \"11111111-2222-3333-4444-555555555555\",\n name=\"your-name\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.update(\"11111111-2222-3333-4444-555555555555\", {\n name: \"your-name\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseRoutingRuleUpdate{\n\tName: didit.String(\"your-name\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CaseRoutingRuleUpdate;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().update(\"11111111-2222-3333-4444-555555555555\", CaseRoutingRuleUpdate.builder()\n .name(\"your-name\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->update('11111111-2222-3333-4444-555555555555', [\n 'name' => 'your-name',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.update(\n \"11111111-2222-3333-4444-555555555555\",\n name: \"your-name\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new CaseRoutingRuleUpdate\n{\n Name = \"your-name\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -53268,6 +61366,28 @@ "application/json": { "schema": { "$ref": "#/components/schemas/FraudCheckRequestRequest" + }, + "example": { + "client_reference": "review-attempt-001", + "subject": { + "identifiers": [ + { + "type": "email", + "value": "applicant@example.com" + } + ], + "attributes": { + "first_name": "Alex", + "last_name": "Example" + } + }, + "checks": { + "include": [ + "networks_same_org", + "networks_cross_org", + "email_risk" + ] + } } }, "multipart/form-data": { @@ -53307,6 +61427,43 @@ { "BearerAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.fraud_checks.plan(\n client_reference=\"review-attempt-001\",\n subject={\n \"identifiers\": [{\n \"type\": \"email\",\n \"value\": \"applicant@example.com\",\n }],\n \"attributes\": {\n \"first_name\": \"Alex\",\n \"last_name\": \"Example\",\n },\n },\n checks={\n \"include\": [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.fraudChecks.plan({\n client_reference: \"review-attempt-001\",\n subject: {\n identifiers: [{\n type: \"email\",\n value: \"applicant@example.com\",\n }],\n attributes: {\n first_name: \"Alex\",\n last_name: \"Example\",\n },\n },\n checks: {\n include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.FraudChecks.Plan(ctx, didit.FraudCheckRequestRequest{\n\tClientReference: didit.String(\"review-attempt-001\"),\n\tSubject: didit.FraudCheckSubjectRequest{\n\t\tIdentifiers: []didit.FraudCheckIdentifierRequest{{\n\t\t\tType: didit.FraudTypeEnum(\"email\"),\n\t\t\tValue: \"applicant@example.com\",\n\t\t}},\n\t\tAttributes: didit.Some(didit.FraudCheckAttributesRequest{\n\t\t\tFirstName: didit.String(\"Alex\"),\n\t\t\tLastName: didit.String(\"Example\"),\n\t\t}),\n\t},\n\tChecks: didit.Some(didit.FraudCheckModuleSelectionRequest{\n\t\tInclude: didit.Some([]didit.FraudExcludeEnum{didit.FraudExcludeEnum(\"networks_same_org\"), didit.FraudExcludeEnum(\"networks_cross_org\"), didit.FraudExcludeEnum(\"email_risk\")}),\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.FraudCheckAttributesRequest;\nimport me.didit.types.FraudCheckIdentifierRequest;\nimport me.didit.types.FraudCheckModuleSelectionRequest;\nimport me.didit.types.FraudCheckRequestRequest;\nimport me.didit.types.FraudCheckSubjectRequest;\nimport me.didit.types.FraudExcludeEnum;\nimport me.didit.types.FraudTypeEnum;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.fraudChecks().plan(FraudCheckRequestRequest.builder()\n .clientReference(\"review-attempt-001\")\n .subject(FraudCheckSubjectRequest.builder()\n .identifiers(List.of(FraudCheckIdentifierRequest.builder()\n .type(FraudTypeEnum.of(\"email\"))\n .value(\"applicant@example.com\")\n .build()))\n .attributes(FraudCheckAttributesRequest.builder()\n .firstName(\"Alex\")\n .lastName(\"Example\")\n .build())\n .build())\n .checks(FraudCheckModuleSelectionRequest.builder()\n .include(List.of(FraudExcludeEnum.of(\"networks_same_org\"), FraudExcludeEnum.of(\"networks_cross_org\"), FraudExcludeEnum.of(\"email_risk\")))\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "fraudChecks->plan([\n 'client_reference' => 'review-attempt-001',\n 'subject' => [\n 'identifiers' => [[\n 'type' => 'email',\n 'value' => 'applicant@example.com',\n ]],\n 'attributes' => [\n 'first_name' => 'Alex',\n 'last_name' => 'Example',\n ],\n ],\n 'checks' => [\n 'include' => ['networks_same_org', 'networks_cross_org', 'email_risk'],\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.fraud_checks.plan(\n client_reference: \"review-attempt-001\",\n subject: {\n identifiers: [{\n type: \"email\",\n value: \"applicant@example.com\",\n }],\n attributes: {\n first_name: \"Alex\",\n last_name: \"Example\",\n },\n },\n checks: {\n include: [\"networks_same_org\", \"networks_cross_org\", \"email_risk\"],\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.FraudChecks.PlanAsync(new FraudCheckRequestRequest\n{\n ClientReference = \"review-attempt-001\",\n Subject = new()\n {\n Identifiers = new FraudCheckIdentifierRequest[]\n {\n new()\n {\n Type = \"email\",\n Value = \"applicant@example.com\",\n },\n },\n Attributes = new FraudCheckAttributesRequest\n {\n FirstName = \"Alex\",\n LastName = \"Example\",\n },\n },\n Checks = new FraudCheckModuleSelectionRequest\n {\n Include = new FraudExcludeEnum[] { \"networks_same_org\", \"networks_cross_org\", \"email_risk\" },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -53409,6 +61566,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.routing_rules.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.routingRules.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.RoutingRules.ListAutoPaging(ctx, didit.CasesRoutingRulesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().routingRules().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.routing_rules.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.RoutingRules.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] }, "post": { @@ -53471,6 +61665,17 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CaseRoutingRuleCreate" + }, + "example": { + "name": "AML screening alerts", + "conditions": [ + { + "field": "source", + "operator": "equals", + "value": "AML_SCREENING" + } + ], + "blueprint": "b1de0000-0000-4000-8000-000000000002" } } } @@ -53479,6 +61684,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.create(\n name=\"AML screening alerts\",\n conditions=[{\n \"field\": \"source\",\n \"operator\": \"equals\",\n \"value\": \"AML_SCREENING\",\n }],\n blueprint=\"b1de0000-0000-4000-8000-000000000002\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.create({\n name: \"AML screening alerts\",\n conditions: [{\n field: \"source\",\n operator: \"equals\",\n value: \"AML_SCREENING\",\n }],\n blueprint: \"b1de0000-0000-4000-8000-000000000002\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Create(ctx, didit.CaseRoutingRuleCreate{\n\tName: \"AML screening alerts\",\n\tConditions: []didit.CaseRoutingConditionParam{{\n\t\tField: \"source\",\n\t\tOperator: \"equals\",\n\t\tValue: \"AML_SCREENING\",\n\t}},\n\tBlueprint: \"b1de0000-0000-4000-8000-000000000002\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.CaseRoutingCondition;\nimport me.didit.types.CaseRoutingRuleCreate;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().create(CaseRoutingRuleCreate.builder()\n .name(\"AML screening alerts\")\n .conditions(List.of(CaseRoutingCondition.builder()\n .field(CaseRoutingCondition.Field.of(\"source\"))\n .operator(CaseRoutingCondition.Operator.of(\"equals\"))\n .value(CaseRoutingCondition.Value.ofString(\"AML_SCREENING\"))\n .build()))\n .blueprint(\"b1de0000-0000-4000-8000-000000000002\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->create([\n 'name' => 'AML screening alerts',\n 'conditions' => [[\n 'field' => 'source',\n 'operator' => 'equals',\n 'value' => 'AML_SCREENING',\n ]],\n 'blueprint' => 'b1de0000-0000-4000-8000-000000000002',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.create(\n name: \"AML screening alerts\",\n conditions: [{\n field: \"source\",\n operator: \"equals\",\n value: \"AML_SCREENING\",\n }],\n blueprint: \"b1de0000-0000-4000-8000-000000000002\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.CreateAsync(new CaseRoutingRuleCreate\n{\n Name = \"AML screening alerts\",\n Conditions = new CaseRoutingCondition[]\n {\n new()\n {\n Field = \"source\",\n Operator = \"equals\",\n Value = \"AML_SCREENING\",\n },\n },\n Blueprint = \"b1de0000-0000-4000-8000-000000000002\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -53566,6 +61808,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.publish(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version=0,\n expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.publish(\"11111111-2222-3333-4444-555555555555\", {\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Publish(ctx, \"11111111-2222-3333-4444-555555555555\", didit.RoutingPublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion: 0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.RoutingPublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().publish(\"11111111-2222-3333-4444-555555555555\", RoutingPublicationPolicyDraftPreconditionRequest.builder()\n .expectedVersion(0L)\n .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->publish('11111111-2222-3333-4444-555555555555', [\n 'expected_version' => 0,\n 'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.publish(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.PublishAsync(\"11111111-2222-3333-4444-555555555555\", new RoutingPublicationPolicyDraftPreconditionRequest\n{\n ExpectedVersion = 0,\n ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -53653,6 +61932,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.publish(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version=0,\n expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.publish(\"11111111-2222-3333-4444-555555555555\", {\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.Publish(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasePublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion: 0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasePublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().publish(\"11111111-2222-3333-4444-555555555555\", CasePublicationPolicyDraftPreconditionRequest.builder()\n .expectedVersion(0L)\n .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->publish('11111111-2222-3333-4444-555555555555', [\n 'expected_version' => 0,\n 'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.publish(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.PublishAsync(\"11111111-2222-3333-4444-555555555555\", new CasePublicationPolicyDraftPreconditionRequest\n{\n ExpectedVersion = 0,\n ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -53747,7 +62063,44 @@ "ApiKeyAuth": [] } ], - "description": "Render the production email without sending or changing the case. Returns the exact recipient, sender, subject, body and a signed preview_token. Send the same contact_id, purpose, language, request_id, expires_at and preview_token to confirm within 15 minutes." + "description": "Render the production email without sending or changing the case. Returns the exact recipient, sender, subject, body and a signed preview_token. Send the same contact_id, purpose, language, request_id, expires_at and preview_token to confirm within 15 minutes.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.preview(\n \"11111111-2222-3333-4444-555555555555\",\n contact_id=\"11111111-2222-3333-4444-555555555555\",\n purpose=\"identity_document\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.preview(\"11111111-2222-3333-4444-555555555555\", {\n contact_id: \"11111111-2222-3333-4444-555555555555\",\n purpose: \"identity_document\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Preview(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CustomerMessagingCaseRequestPreviewRequest{\n\tContactID: \"11111111-2222-3333-4444-555555555555\",\n\tPurpose: didit.CustomerMessagingPurposeEnum(\"identity_document\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CustomerMessagingCaseRequestPreviewRequest;\nimport me.didit.types.CustomerMessagingPurposeEnum;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().preview(\"11111111-2222-3333-4444-555555555555\", CustomerMessagingCaseRequestPreviewRequest.builder()\n .contactId(\"11111111-2222-3333-4444-555555555555\")\n .purpose(CustomerMessagingPurposeEnum.of(\"identity_document\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->preview('11111111-2222-3333-4444-555555555555', [\n 'contact_id' => '11111111-2222-3333-4444-555555555555',\n 'purpose' => 'identity_document',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.preview(\n \"11111111-2222-3333-4444-555555555555\",\n contact_id: \"11111111-2222-3333-4444-555555555555\",\n purpose: \"identity_document\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.PreviewAsync(\"11111111-2222-3333-4444-555555555555\", new CustomerMessagingCaseRequestPreviewRequest\n{\n ContactId = \"11111111-2222-3333-4444-555555555555\",\n Purpose = \"identity_document\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/{case_uuid}/action-receipts/": { @@ -53819,7 +62172,44 @@ "ApiKeyAuth": [] } ], - "description": "List subject-action receipts, newest first, with at most 20 results per page. Use next_offset for the next page. Input note text is not exposed in the history." + "description": "List subject-action receipts, newest first, with at most 20 results per page. Use next_offset for the next page. Input note text is not exposed in the history.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.list_action_receipts(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.listActionReceipts(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ListActionReceipts(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesListActionReceiptsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().listActionReceipts(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->listActionReceipts('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.list_action_receipts(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ListActionReceiptsAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/networks/{network_uuid}/notes/{note_uuid}/": { @@ -53905,6 +62295,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\nclient.networks.notes.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n fetch: (url, init) => {\n const headers = new Headers(init?.headers);\n headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n return fetch(url, { ...init, headers });\n },\n});\n\nawait didit.networks.notes.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\nif err := client.Networks.Notes.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", didit.NetworksNotesDeleteParams{\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n}); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.core.RequestOptions;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nclient.networks().notes().delete(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", RequestOptions.builder()\n .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n .build());" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->notes->delete('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555', [\n 'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]);" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\ndidit.networks.notes.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nawait client.Networks.Notes.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\", requestOptions: new RequestOptions\n{\n Headers = new Dictionary\n {\n [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n },\n});" + } ] } }, @@ -53976,7 +62403,44 @@ "ApiKeyAuth": [] } ], - "description": "Retry only this failed subject action using its saved inputs. Current write permission is checked. Applied actions return their receipt without executing again. Case closure is independent." + "description": "Retry only this failed subject action using its saved inputs. Current write permission is checked. Applied actions return their receipt without executing again. Case closure is independent.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.retry_action_receipt(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.retryActionReceipt(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RetryActionReceipt(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().retryActionReceipt(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->retryActionReceipt('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.retry_action_receipt(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RetryActionReceiptAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/blueprints/{blueprint_uuid}/draft/": { @@ -54040,6 +62504,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.retrieve_draft(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.RetrieveDraft(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->retrieveDraft('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.retrieve_draft(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.RetrieveDraftAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] }, "put": { @@ -54093,6 +62594,13 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CasePublicationPolicyDraftWriteRequest" + }, + "example": { + "expected_version": 1, + "expected_revision": "4e5f0000-0000-4000-8000-000000000003", + "changes": { + "max_active_cases": 20 + } } }, "multipart/form-data": { @@ -54125,6 +62633,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.blueprints.save_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version=1,\n expected_revision=\"4e5f0000-0000-4000-8000-000000000003\",\n changes={\"max_active_cases\": 20},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.blueprints.saveDraft(\"11111111-2222-3333-4444-555555555555\", {\n expected_version: 1,\n expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n changes: { max_active_cases: 20 },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Blueprints.SaveDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasePublicationPolicyDraftWriteRequest{\n\tExpectedVersion: 1,\n\tExpectedRevision: didit.String(\"4e5f0000-0000-4000-8000-000000000003\"),\n\tChanges: map[string]any{\"max_active_cases\": 20},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.CasePublicationPolicyDraftWriteRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().blueprints().saveDraft(\"11111111-2222-3333-4444-555555555555\", CasePublicationPolicyDraftWriteRequest.builder()\n .expectedVersion(1L)\n .expectedRevision(\"4e5f0000-0000-4000-8000-000000000003\")\n .changes(Map.of(\"max_active_cases\", 20))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->saveDraft('11111111-2222-3333-4444-555555555555', [\n 'expected_version' => 1,\n 'expected_revision' => '4e5f0000-0000-4000-8000-000000000003',\n 'changes' => ['max_active_cases' => 20],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.blueprints.save_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version: 1,\n expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n changes: { max_active_cases: 20 }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Blueprints.SaveDraftAsync(\"11111111-2222-3333-4444-555555555555\", new CasePublicationPolicyDraftWriteRequest\n{\n ExpectedVersion = 1,\n ExpectedRevision = \"4e5f0000-0000-4000-8000-000000000003\",\n Changes = new Dictionary { [\"max_active_cases\"] = 20 },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] }, "delete": { @@ -54193,7 +62738,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.blueprints.discard_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version=0,\n expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.blueprints.discardDraft(\"11111111-2222-3333-4444-555555555555\", {\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.Blueprints.DiscardDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasePublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion: 0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n}); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CasePublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().blueprints().discardDraft(\"11111111-2222-3333-4444-555555555555\", CasePublicationPolicyDraftPreconditionRequest.builder()\n .expectedVersion(0L)\n .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n .build());" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->discardDraft('11111111-2222-3333-4444-555555555555', [\n 'expected_version' => 0,\n 'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.discard_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.Blueprints.DiscardDraftAsync(\"11111111-2222-3333-4444-555555555555\", new CasePublicationPolicyDraftPreconditionRequest\n{\n ExpectedVersion = 0,\n ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/teams/{record_uuid}/": { @@ -54267,6 +62849,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.teams.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.teams.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Teams.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().teams().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->teams->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.teams.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Teams.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] }, "patch": { @@ -54349,6 +62968,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.teams.update(\n \"11111111-2222-3333-4444-555555555555\",\n name=\"your-name\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.teams.update(\"11111111-2222-3333-4444-555555555555\", {\n name: \"your-name\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Teams.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CaseReviewTeamUpdate{\n\tName: didit.String(\"your-name\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CaseReviewTeamUpdate;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().teams().update(\"11111111-2222-3333-4444-555555555555\", CaseReviewTeamUpdate.builder()\n .name(\"your-name\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->teams->update('11111111-2222-3333-4444-555555555555', [\n 'name' => 'your-name',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.teams.update(\n \"11111111-2222-3333-4444-555555555555\",\n name: \"your-name\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Teams.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new CaseReviewTeamUpdate\n{\n Name = \"your-name\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -54434,6 +63090,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\ncontent = client.networks.download_report(\n \"11111111-2222-3333-4444-555555555555\",\n extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n fetch: (url, init) => {\n const headers = new Headers(init?.headers);\n headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n return fetch(url, { ...init, headers });\n },\n});\n\nconst content = await didit.networks.downloadReport(\"11111111-2222-3333-4444-555555555555\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\nresp, err := client.Networks.DownloadReport(ctx, \"11111111-2222-3333-4444-555555555555\", didit.NetworksDownloadReportParams{\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.core.RequestOptions;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nclient.networks().downloadReport(\"11111111-2222-3333-4444-555555555555\", RequestOptions.builder()\n .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n .build())\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->downloadReport('11111111-2222-3333-4444-555555555555', [\n 'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]);\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\ncontent = didit.networks.download_report(\n \"11111111-2222-3333-4444-555555555555\",\n request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n)\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nvar content = await client.Networks.DownloadReportAsync(\"11111111-2222-3333-4444-555555555555\", requestOptions: new RequestOptions\n{\n Headers = new Dictionary\n {\n [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n },\n});\nawait content.SaveToAsync(\"download.pdf\");" + } ] } }, @@ -54557,6 +63250,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\nfor item in client.networks.notes.list(\n \"11111111-2222-3333-4444-555555555555\",\n extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n fetch: (url, init) => {\n const headers = new Headers(init?.headers);\n headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n return fetch(url, { ...init, headers });\n },\n});\n\nfor await (const item of didit.networks.notes.list(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\niter := client.Networks.Notes.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.NetworksNotesListParams{\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.core.RequestOptions;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nfor (var item : client.networks().notes().list(\"11111111-2222-3333-4444-555555555555\", RequestOptions.builder()\n .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n .build())) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->notes->list('11111111-2222-3333-4444-555555555555', [\n 'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]) as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\ndidit.networks.notes.list(\n \"11111111-2222-3333-4444-555555555555\",\n request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n).auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Networks.Notes.ListAsync(\"11111111-2222-3333-4444-555555555555\", requestOptions: new RequestOptions\n{\n Headers = new Dictionary\n {\n [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n },\n}))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] }, "post": { @@ -54680,6 +63410,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\nclient = Didit()\n\nresult = client.networks.notes.create(\n \"11111111-2222-3333-4444-555555555555\",\n comment=\"your-comment\",\n client_reference=\"11111111-2222-3333-4444-555555555555\",\n extra_headers={\"Authorization\": \"Bearer YOUR_CONSOLE_USER_TOKEN\"},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nconst didit = new Didit({\n fetch: (url, init) => {\n const headers = new Headers(init?.headers);\n headers.set(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\");\n return fetch(url, { ...init, headers });\n },\n});\n\nconst result = await didit.networks.notes.create(\"11111111-2222-3333-4444-555555555555\", {\n comment: \"your-comment\",\n client_reference: \"11111111-2222-3333-4444-555555555555\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nclient := didit.NewClient()\n\nresult, err := client.Networks.Notes.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.NetworksNotesCreateParams{\n\tComment: \"your-comment\",\n\tClientReference: \"11111111-2222-3333-4444-555555555555\",\n\tAuthorization: \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.core.RequestOptions;\nimport me.didit.types.NetworksNotesCreateParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nDidit client = new Didit();\n\nvar result = client.networks().notes().create(\"11111111-2222-3333-4444-555555555555\", NetworksNotesCreateParams.builder()\n .comment(\"your-comment\")\n .clientReference(\"11111111-2222-3333-4444-555555555555\")\n .build(), RequestOptions.builder()\n .header(\"Authorization\", \"Bearer YOUR_CONSOLE_USER_TOKEN\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->notes->create('11111111-2222-3333-4444-555555555555', [\n 'comment' => 'your-comment',\n 'client_reference' => '11111111-2222-3333-4444-555555555555',\n 'authorization' => 'Bearer YOUR_CONSOLE_USER_TOKEN',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\n# Also needs a console user's access token.\ndidit = Didit::Client.new\n\nresult = didit.networks.notes.create(\n \"11111111-2222-3333-4444-555555555555\",\n comment: \"your-comment\",\n client_reference: \"11111111-2222-3333-4444-555555555555\",\n request_options: { extra_headers: { \"Authorization\" => \"Bearer YOUR_CONSOLE_USER_TOKEN\" } }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\n// Also needs a console user's access token.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.Notes.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new NetworksNotesCreateParams\n{\n Comment = \"your-comment\",\n ClientReference = \"11111111-2222-3333-4444-555555555555\",\n}, requestOptions: new RequestOptions\n{\n Headers = new Dictionary\n {\n [\"Authorization\"] = \"Bearer YOUR_CONSOLE_USER_TOKEN\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -54744,6 +63511,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.retrieve_draft(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.RetrieveDraft(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().retrieveDraft(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->retrieveDraft('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.retrieve_draft(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.RetrieveDraftAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] }, "put": { @@ -54797,6 +63601,13 @@ "application/json": { "schema": { "$ref": "#/components/schemas/RoutingPublicationPolicyDraftWriteRequest" + }, + "example": { + "expected_version": 1, + "expected_revision": "4e5f0000-0000-4000-8000-000000000003", + "changes": { + "priority": 10 + } } }, "multipart/form-data": { @@ -54829,6 +63640,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.save_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version=1,\n expected_revision=\"4e5f0000-0000-4000-8000-000000000003\",\n changes={\"priority\": 10},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.saveDraft(\"11111111-2222-3333-4444-555555555555\", {\n expected_version: 1,\n expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n changes: { priority: 10 },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.SaveDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.RoutingPublicationPolicyDraftWriteRequest{\n\tExpectedVersion: 1,\n\tExpectedRevision: didit.String(\"4e5f0000-0000-4000-8000-000000000003\"),\n\tChanges: map[string]any{\"priority\": 10},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.RoutingPublicationPolicyDraftWriteRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().saveDraft(\"11111111-2222-3333-4444-555555555555\", RoutingPublicationPolicyDraftWriteRequest.builder()\n .expectedVersion(1L)\n .expectedRevision(\"4e5f0000-0000-4000-8000-000000000003\")\n .changes(Map.of(\"priority\", 10))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->saveDraft('11111111-2222-3333-4444-555555555555', [\n 'expected_version' => 1,\n 'expected_revision' => '4e5f0000-0000-4000-8000-000000000003',\n 'changes' => ['priority' => 10],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.save_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version: 1,\n expected_revision: \"4e5f0000-0000-4000-8000-000000000003\",\n changes: { priority: 10 }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.SaveDraftAsync(\"11111111-2222-3333-4444-555555555555\", new RoutingPublicationPolicyDraftWriteRequest\n{\n ExpectedVersion = 1,\n ExpectedRevision = \"4e5f0000-0000-4000-8000-000000000003\",\n Changes = new Dictionary { [\"priority\"] = 10 },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] }, "delete": { @@ -54897,7 +63745,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.cases.routing_rules.discard_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version=0,\n expected_revision=\"11111111-2222-3333-4444-555555555555\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.cases.routingRules.discardDraft(\"11111111-2222-3333-4444-555555555555\", {\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\",\n});" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nif err := client.Cases.RoutingRules.DiscardDraft(ctx, \"11111111-2222-3333-4444-555555555555\", didit.RoutingPublicationPolicyDraftPreconditionRequest{\n\tExpectedVersion: 0,\n\tExpectedRevision: didit.String(\"11111111-2222-3333-4444-555555555555\"),\n}); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.RoutingPublicationPolicyDraftPreconditionRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.cases().routingRules().discardDraft(\"11111111-2222-3333-4444-555555555555\", RoutingPublicationPolicyDraftPreconditionRequest.builder()\n .expectedVersion(0L)\n .expectedRevision(\"11111111-2222-3333-4444-555555555555\")\n .build());" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->discardDraft('11111111-2222-3333-4444-555555555555', [\n 'expected_version' => 0,\n 'expected_revision' => '11111111-2222-3333-4444-555555555555',\n]);" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.routing_rules.discard_draft(\n \"11111111-2222-3333-4444-555555555555\",\n expected_version: 0,\n expected_revision: \"11111111-2222-3333-4444-555555555555\"\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Cases.RoutingRules.DiscardDraftAsync(\"11111111-2222-3333-4444-555555555555\", new RoutingPublicationPolicyDraftPreconditionRequest\n{\n ExpectedVersion = 0,\n ExpectedRevision = \"11111111-2222-3333-4444-555555555555\",\n});" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/duplicates/": { @@ -54943,6 +63828,12 @@ "application/json": { "schema": { "$ref": "#/components/schemas/CaseDuplicateCaseDuplicateQueryRequest" + }, + "example": { + "subject": { + "type": "user", + "uuid": "5b9a0000-0000-4000-8000-00000000f00d" + } } }, "multipart/form-data": { @@ -54969,7 +63860,44 @@ "ApiKeyAuth": [] } ], - "description": "Review existing cases for a subject or owned source record before manual case creation. Both open and resolved investigations are returned. Each page contains at most 20 cases; use next_offset to request another page." + "description": "Review existing cases for a subject or owned source record before manual case creation. Both open and resolved investigations are returned. Each page contains at most 20 cases; use next_offset to request another page.", + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.find_duplicates(\n subject={\n \"type\": \"user\",\n \"uuid\": \"5b9a0000-0000-4000-8000-00000000f00d\",\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.findDuplicates({\n subject: {\n type: \"user\",\n uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.FindDuplicates(ctx, didit.CaseDuplicateCaseDuplicateQueryRequest{\n\tSubject: didit.Some(didit.CaseDuplicateCaseSubjectInputRequest{\n\t\tType: didit.CaseDuplicateTypeEnum(\"user\"),\n\t\tUUID: \"5b9a0000-0000-4000-8000-00000000f00d\",\n\t}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CaseDuplicateCaseDuplicateQueryRequest;\nimport me.didit.types.CaseDuplicateCaseSubjectInputRequest;\nimport me.didit.types.CaseDuplicateTypeEnum;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().findDuplicates(CaseDuplicateCaseDuplicateQueryRequest.builder()\n .subject(CaseDuplicateCaseSubjectInputRequest.builder()\n .type(CaseDuplicateTypeEnum.of(\"user\"))\n .uuid(\"5b9a0000-0000-4000-8000-00000000f00d\")\n .build())\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->findDuplicates([\n 'subject' => [\n 'type' => 'user',\n 'uuid' => '5b9a0000-0000-4000-8000-00000000f00d',\n ],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.find_duplicates(\n subject: {\n type: \"user\",\n uuid: \"5b9a0000-0000-4000-8000-00000000f00d\",\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.FindDuplicatesAsync(new CaseDuplicateCaseDuplicateQueryRequest\n{\n Subject = new CaseDuplicateCaseSubjectInputRequest\n {\n Type = \"user\",\n Uuid = \"5b9a0000-0000-4000-8000-00000000f00d\",\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/organization/{organization_id}/application/{application_id}/cases/routing-rules/preview/": { @@ -55041,6 +63969,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.routing_rules.preview(\n source=\"MANUAL\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.routingRules.preview({\n source: \"MANUAL\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.RoutingRules.Preview(ctx, didit.CaseRoutingPreviewRequest{\n\tSource: \"MANUAL\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.CaseRoutingPreviewRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().routingRules().preview(CaseRoutingPreviewRequest.builder()\n .source(CaseRoutingPreviewRequest.Source.of(\"MANUAL\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->routingRules->preview([\n 'source' => 'MANUAL',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.routing_rules.preview(source: \"MANUAL\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.RoutingRules.PreviewAsync(new CaseRoutingPreviewRequest\n{\n Source = \"MANUAL\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -55127,6 +64092,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.list_reviewers()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.listReviewers();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.ListReviewers(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().listReviewers();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->listReviewers();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.list_reviewers\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.ListReviewersAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -55218,13 +64220,50 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nfor item in client.cases.blueprints.list_history(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nfor await (const item of didit.cases.blueprints.listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\niter := client.Cases.Blueprints.ListHistoryAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.CasesBlueprintsListHistoryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nfor (var item : client.cases().blueprints().listHistory(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->blueprints->listHistory('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.cases.blueprints.list_history(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Cases.Blueprints.ListHistoryAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } ] } }, "/v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/": { "get": { "summary": "Download a signed document", - "description": "Download the signed PDF of one document of an Electronic Signature step. Use the `signed_file` path of `signatures[].documents[]` in the decision. The PDF holds the document the signer was shown with their field values stamped, the evidence page (unless `signature_evidence_page` is off) and the PAdES signature with its timestamp. Didit checks the file against `sha256_signed` before returning it.\n\nWorks for User Verification (KYC) and Business Verification (KYB) sessions. Needs `read:sessions`; your API key works. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature#download-the-signed-documents).", + "description": "Download the signed PDF of one document of an E-signature step. Use the `signed_file` path of `signatures[].documents[]` in the decision. The PDF holds the document the signer was shown with their field values stamped and the evidence page (unless `signature_evidence_page` is off). An Advanced (AES) PDF also carries the PAdES signature with its timestamp; a Simple PDF has no digital signature, seal or timestamp. Didit checks the file against `sha256_signed` before returning it.\n\nWorks for User Verification (KYC) and Business Verification (KYB) sessions. Needs `read:sessions`; your API key works. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature#download-the-signed-documents).", "operationId": "get_v3_session_signature_document_file", "x-didit-sdk": { "resource": "sessions.signatures", @@ -55251,7 +64290,7 @@ "name": "nodeId", "in": "path", "required": true, - "description": "The Electronic Signature step: `node_id` of the item in `signatures[]`.", + "description": "The E-signature step: `node_id` of the item in `signatures[]`.", "schema": { "type": "string", "example": "feature_signature" @@ -55295,7 +64334,7 @@ } }, "403": { - "description": "Missing or invalid credentials, or a credential that can't read this session. Didit's API-key authentication answers `403`, never `401`.", + "description": "Missing credentials, or a credential that can't read this session. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "schema": { @@ -55373,13 +64412,50 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.signatures.download_document(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.signatures.downloadDocument(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadDocument(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().signatures().downloadDocument(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->signatures->downloadDocument('11111111-2222-3333-4444-555555555555', 'feature_signature', '11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.signatures.download_document(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Signatures.DownloadDocumentAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.pdf\");" + } + ] } }, "/v3/session/{sessionId}/signatures/{nodeId}/evidence/": { "get": { "summary": "Download the signature evidence", - "description": "Download a signer's evidence PDF: the level and format, the signer and their verified identity session, the code confirmation, the IP address, each document with its original SHA-256 and field values, the certificate, the timestamp and the SHA-256 of every signed file. Use the `evidence_file` path of the signer's item in `signatures[]`.\n\nAlways pass `signature_id` when a Business Verification step has several signers: without it, the route picks one of the step's signers. Needs `read:sessions`; your API key works.", + "description": "Download a signer's evidence PDF: the level and format, the signer, the IP address, each document with its original SHA-256 and field values and the SHA-256 of every signed file, plus, for an Advanced (AES) signature, the verified identity session, the code confirmation, the certificate and the timestamp. Use the `evidence_file` path of the signer's item in `signatures[]`.\n\nAlways pass `signature_id` when a Business Verification step has several signers: without it, the route picks one of the step's signers. Needs `read:sessions`; your API key works.", "operationId": "get_v3_session_signature_evidence", "x-didit-sdk": { "resource": "sessions.signatures", @@ -55406,7 +64482,7 @@ "name": "nodeId", "in": "path", "required": true, - "description": "The Electronic Signature step: `node_id` of the item in `signatures[]`.", + "description": "The E-signature step: `node_id` of the item in `signatures[]`.", "schema": { "type": "string", "example": "feature_signature" @@ -55450,7 +64526,7 @@ } }, "403": { - "description": "Missing or invalid credentials, or a credential that can't read this session. Didit's API-key authentication answers `403`, never `401`.", + "description": "Missing credentials, or a credential that can't read this session. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "schema": { @@ -55528,7 +64604,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.signatures.download_evidence(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.signatures.downloadEvidence(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n);\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadEvidence(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", didit.SessionsSignaturesDownloadEvidenceParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().signatures().downloadEvidence(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\")\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->signatures->downloadEvidence('11111111-2222-3333-4444-555555555555', 'feature_signature');\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.signatures.download_evidence(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\"\n)\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Signatures.DownloadEvidenceAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\");\nawait content.SaveToAsync(\"download.pdf\");" + } + ] } }, "/v3/session/{sessionId}/signatures/{nodeId}/fields/{fieldId}/image/": { @@ -55561,7 +64674,7 @@ "name": "nodeId", "in": "path", "required": true, - "description": "The Electronic Signature step: `node_id` of the item in `signatures[]`.", + "description": "The E-signature step: `node_id` of the item in `signatures[]`.", "schema": { "type": "string", "example": "feature_signature" @@ -55618,7 +64731,7 @@ } }, "403": { - "description": "Missing or invalid credentials, or a credential that can't read this session. Didit's API-key authentication answers `403`, never `401`.", + "description": "Missing credentials, or a credential that can't read this session. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "schema": { @@ -55662,13 +64775,50 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.signatures.download_field_image(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.png\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.signatures.downloadFieldImage(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nawait writeFile(\"download.png\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.Signatures.DownloadFieldImage(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.png\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().signatures().downloadFieldImage(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\")\n .writeTo(Path.of(\"download.png\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->signatures->downloadFieldImage('11111111-2222-3333-4444-555555555555', 'feature_signature', '11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.png');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.signatures.download_field_image(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nFile.binwrite(\"download.png\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.Signatures.DownloadFieldImageAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", \"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.png\");" + } + ] } }, "/v3/session/{sessionId}/signatures/{nodeId}/validate/": { "post": { "summary": "Validate signatures again", - "description": "Re-check the signed documents of an Electronic Signature step. Didit re-reads every signed PDF, checks its SHA-256 and validates the PAdES signature, the certificate, the revocation data and the timestamp, then saves the result in each signer's `validation` and returns the updated items. Nothing is signed again. Send `signature_id` to check one signer; without it, every signer of the step is checked, and the call fails if any of them hasn't signed.\n\nNeeds `write:sessions`; your API key works. In the console it's the **Validate again** button.", + "description": "Re-check the signed documents of an E-signature step. Didit re-reads every signed PDF, checks its SHA-256 and, for an Advanced (AES) signature, validates the PAdES signature, the certificate, the revocation data and the timestamp (a Simple signature has no digital signature, so only the file integrity is checked), then saves the result in each signer's `validation` and returns the updated items. Nothing is signed again. Send `signature_id` to check one signer; without it, every signer of the step is checked, and the call fails if any of them hasn't signed.\n\nNeeds `write:sessions`; your API key works. In the console it's the **Validate again** button.", "operationId": "post_v3_session_signature_validate", "x-didit-sdk": { "resource": "sessions.signatures", @@ -55695,7 +64845,7 @@ "name": "nodeId", "in": "path", "required": true, - "description": "The Electronic Signature step: `node_id` of the item in `signatures[]`.", + "description": "The E-signature step: `node_id` of the item in `signatures[]`.", "schema": { "type": "string", "example": "feature_signature" @@ -55774,7 +64924,7 @@ } }, "403": { - "description": "Missing or invalid credentials, or a credential that can't read this session. Didit's API-key authentication answers `403`, never `401`.", + "description": "Missing credentials, or a credential that can't read this session. A missing key returns `403`; a wrong, revoked or expired key returns `401`.", "content": { "application/json": { "schema": { @@ -55845,7 +64995,44 @@ } } } - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.signatures.validate(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n signature_id=\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.signatures.validate(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n {\n signature_id: \"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\",\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Signatures.Validate(ctx, \"11111111-2222-3333-4444-555555555555\", \"feature_signature\", didit.SessionsSignaturesValidateParams{\n\tSignatureID: didit.String(\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsSignaturesValidateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().signatures().validate(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", SessionsSignaturesValidateParams.builder()\n .signatureId(\"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->signatures->validate('11111111-2222-3333-4444-555555555555', 'feature_signature', [\n 'signature_id' => '0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.signatures.validate(\n \"11111111-2222-3333-4444-555555555555\",\n \"feature_signature\",\n signature_id: \"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Signatures.ValidateAsync(\"11111111-2222-3333-4444-555555555555\", \"feature_signature\", new SessionsSignaturesValidateParams\n{\n SignatureId = \"0e6c2a8e-6c2f-4b8e-9a51-3f2f6a7d9b10\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/document-ai/{sessionId}/documents/{documentUuid}/": { @@ -55932,12 +65119,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '11111111-2222-3333-4444-555555555555'\ndocument_uuid = '44444444-5555-6666-7777-888888888888'\nresp = requests.patch(\n f'https://verification.didit.me/v3/document-ai/{session_id}/documents/{document_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'extracted_data': {'invoice_number': 'INV-2026-0042'}, 'status': 'Approved'},\n timeout=10,\n)\nresp.raise_for_status()\ndocument = resp.json()\nprint(document['status'], document['extracted_data'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_document_ai_data(\n \"11111111-2222-3333-4444-555555555555\",\n \"44444444-5555-6666-7777-888888888888\",\n extracted_data={\"invoice_number\": \"INV-2026-0042\"},\n status=\"Approved\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '11111111-2222-3333-4444-555555555555';\nconst documentUuid = '44444444-5555-6666-7777-888888888888';\nconst resp = await fetch(`https://verification.didit.me/v3/document-ai/${sessionId}/documents/${documentUuid}/`, {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ extracted_data: { invoice_number: 'INV-2026-0042' }, status: 'Approved' }),\n});\nif (!resp.ok) throw new Error(`Update failed: ${resp.status}`);\nconst document = await resp.json();\nconsole.log(document.status, document.extracted_data);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateDocumentAiData(\n \"11111111-2222-3333-4444-555555555555\",\n \"44444444-5555-6666-7777-888888888888\",\n {\n extracted_data: { invoice_number: \"INV-2026-0042\" },\n status: \"Approved\",\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateDocumentAiData(ctx, \"11111111-2222-3333-4444-555555555555\", \"44444444-5555-6666-7777-888888888888\", didit.SessionsUpdateDocumentAiDataParams{\n\tExtractedData: didit.Some(map[string]any{\"invoice_number\": \"INV-2026-0042\"}),\n\tStatus: didit.Some(didit.SessionsUpdateDocumentAiDataParamsStatus(\"Approved\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUpdateDocumentAiDataParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateDocumentAiData(\"11111111-2222-3333-4444-555555555555\", \"44444444-5555-6666-7777-888888888888\", SessionsUpdateDocumentAiDataParams.builder()\n .extractedData(Map.of(\"invoice_number\", \"INV-2026-0042\"))\n .status(SessionsUpdateDocumentAiDataParams.Status.of(\"Approved\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateDocumentAiData('11111111-2222-3333-4444-555555555555', '44444444-5555-6666-7777-888888888888', [\n 'extracted_data' => ['invoice_number' => 'INV-2026-0042'],\n 'status' => 'Approved',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_document_ai_data(\n \"11111111-2222-3333-4444-555555555555\",\n \"44444444-5555-6666-7777-888888888888\",\n extracted_data: { invoice_number: \"INV-2026-0042\" },\n status: \"Approved\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateDocumentAiDataAsync(\"11111111-2222-3333-4444-555555555555\", \"44444444-5555-6666-7777-888888888888\", new SessionsUpdateDocumentAiDataParams\n{\n ExtractedData = new Dictionary { [\"invoice_number\"] = \"INV-2026-0042\" },\n Status = new SessionsUpdateDocumentAiDataParamsStatus(\"Approved\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -56059,7 +65271,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -56202,12 +65414,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/aml/dataset-freshness/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nbody = resp.json()\nif body['availability'] == 'available':\n for family, info in body['dataset_freshness']['sources'].items():\n print(family, info['last_updated_at'], info['oldest_updated_at'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.aml.retrieve_dataset_freshness()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/aml/dataset-freshness/', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Freshness lookup failed: ${resp.status}`);\nconst body = await resp.json();\nif (body.availability === 'available') {\n for (const [family, info] of Object.entries(body.dataset_freshness.sources)) {\n console.log(family, info.last_updated_at, info.oldest_updated_at);\n }\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.aml.retrieveDatasetFreshness();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.AML.RetrieveDatasetFreshness(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.aml().retrieveDatasetFreshness();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "aml->retrieveDatasetFreshness();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.aml.retrieve_dataset_freshness\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Aml.RetrieveDatasetFreshnessAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -56300,7 +65537,7 @@ } }, "403": { - "description": "The request is not allowed. A missing or invalid API key gets the generic message (never `401`).", + "description": "The request is not allowed. A missing key gets the generic message; a wrong, revoked or expired key gets `401`.", "content": { "application/json": { "schema": { @@ -56493,12 +65730,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/lists/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'list_type': 'blocklist'},\n timeout=10,\n)\nresp.raise_for_status()\nfor item in resp.json()['results']:\n print(item['uuid'], item['entry_type'], item['name'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.lists.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/lists/?list_type=blocklist', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst page = await resp.json();\nconsole.log(page.results.map((list) => [list.uuid, list.entry_type, list.name]));" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.lists.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Lists.ListAutoPaging(ctx, didit.ListsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.lists().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Lists.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -56621,7 +65883,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -56753,12 +66015,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/lists/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'name': 'Trusted office IPs',\n 'description': 'Office egress ranges',\n 'list_type': 'allowlist',\n 'entry_type': 'ip_address',\n },\n timeout=10,\n)\nresp.raise_for_status()\nprint('Created list', resp.json()['uuid'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.create(\n name=\"Trusted office IPs\",\n description=\"Office egress ranges\",\n list_type=\"allowlist\",\n entry_type=\"ip_address\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/lists/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n name: 'Trusted office IPs',\n description: 'Office egress ranges',\n list_type: 'allowlist',\n entry_type: 'ip_address',\n }),\n});\nif (!resp.ok) throw new Error(`Create failed: ${resp.status}`);\nconst list = await resp.json();\nconsole.log('Created list', list.uuid);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.create({\n name: \"Trusted office IPs\",\n description: \"Office egress ranges\",\n list_type: \"allowlist\",\n entry_type: \"ip_address\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Create(ctx, didit.ListsCreateParams{\n\tName: \"Trusted office IPs\",\n\tDescription: didit.String(\"Office egress ranges\"),\n\tListType: \"allowlist\",\n\tEntryType: \"ip_address\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.ListsCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().create(ListsCreateParams.builder()\n .name(\"Trusted office IPs\")\n .description(\"Office egress ranges\")\n .listType(ListsCreateParams.ListType.of(\"allowlist\"))\n .entryType(ListsCreateParams.EntryType.of(\"ip_address\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->create([\n 'name' => 'Trusted office IPs',\n 'description' => 'Office egress ranges',\n 'list_type' => 'allowlist',\n 'entry_type' => 'ip_address',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.create(\n name: \"Trusted office IPs\",\n description: \"Office egress ranges\",\n list_type: \"allowlist\",\n entry_type: \"ip_address\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.CreateAsync(new ListsCreateParams\n{\n Name = \"Trusted office IPs\",\n Description = \"Office egress ranges\",\n ListType = \"allowlist\",\n EntryType = \"ip_address\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -56853,7 +66140,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -56918,12 +66205,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/lists/{list_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const listUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/lists/${listUuid}/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Lookup failed: ${resp.status}`);\nconst list = await resp.json();\nconsole.log(list.name, list.entry_count);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -56968,7 +66280,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -57091,12 +66403,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.patch(\n f'https://verification.didit.me/v3/lists/{list_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'name': 'Trusted office and VPN IPs'},\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.update(\n \"11111111-2222-3333-4444-555555555555\",\n name=\"Trusted office and VPN IPs\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const listUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/lists/${listUuid}/`, {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ name: 'Trusted office and VPN IPs' }),\n});\nif (!resp.ok) throw new Error(`Update failed: ${resp.status}`);\nconsole.log(await resp.json());" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.update(\"11111111-2222-3333-4444-555555555555\", {\n name: \"Trusted office and VPN IPs\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Update(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsUpdateParams{\n\tName: didit.String(\"Trusted office and VPN IPs\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.ListsUpdateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().update(\"11111111-2222-3333-4444-555555555555\", ListsUpdateParams.builder()\n .name(\"Trusted office and VPN IPs\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->update('11111111-2222-3333-4444-555555555555', [\n 'name' => 'Trusted office and VPN IPs',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.update(\n \"11111111-2222-3333-4444-555555555555\",\n name: \"Trusted office and VPN IPs\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.UpdateAsync(\"11111111-2222-3333-4444-555555555555\", new ListsUpdateParams\n{\n Name = \"Trusted office and VPN IPs\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -57177,7 +66514,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -57254,12 +66591,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.delete(\n f'https://verification.didit.me/v3/lists/{list_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nprint('Deleted:', resp.status_code == 204)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.lists.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const listUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/lists/${listUuid}/`, {\n method: 'DELETE',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (resp.status !== 204) throw new Error(`Delete failed: ${resp.status}`);\nconsole.log('List deleted');" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.lists.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Lists.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.lists().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Lists.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ], "responses": { @@ -57295,7 +66657,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -57417,12 +66779,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/lists/{list_uuid}/entries/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'search': 'example.com', 'limit': 100},\n timeout=10,\n)\nresp.raise_for_status()\nfor entry in resp.json()['results']:\n print(entry['uuid'], entry['value'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.lists.entries.list(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const listUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(\n `https://verification.didit.me/v3/lists/${listUuid}/entries/?search=example.com`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst page = await resp.json();\nconsole.log(page.count, page.results.map((entry) => entry.value));" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.lists.entries.list(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Lists.Entries.ListAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsEntriesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.lists().entries().list(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->entries->list('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.entries.list(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Lists.Entries.ListAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -57546,7 +66933,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -57742,12 +67129,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.post(\n f'https://verification.didit.me/v3/lists/{list_uuid}/entries/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'reference_session_id': '33333333-4444-5555-6666-777777777777'},\n timeout=10,\n)\nresp.raise_for_status()\nentry = resp.json()\nprint('Listed', entry['value'], 'as', entry['uuid'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.entries.create(\n \"11111111-2222-3333-4444-555555555555\",\n value=\"+14155552671\",\n comment=\"Reported fraud\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const listUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/lists/${listUuid}/entries/`, {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ value: '+14155552671', comment: 'Reported fraud' }),\n});\nif (!resp.ok) throw new Error(`Create failed: ${resp.status} ${await resp.text()}`);\nconst entry = await resp.json();\nconsole.log('Listed', entry.value, 'as', entry.uuid);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.entries.create(\"11111111-2222-3333-4444-555555555555\", {\n value: \"+14155552671\",\n comment: \"Reported fraud\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Entries.Create(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsEntriesCreateParams{\n\tValue: didit.String(\"+14155552671\"),\n\tComment: didit.String(\"Reported fraud\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.ListsEntriesCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().entries().create(\"11111111-2222-3333-4444-555555555555\", ListsEntriesCreateParams.builder()\n .value(\"+14155552671\")\n .comment(\"Reported fraud\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->entries->create('11111111-2222-3333-4444-555555555555', [\n 'value' => '+14155552671',\n 'comment' => 'Reported fraud',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.entries.create(\n \"11111111-2222-3333-4444-555555555555\",\n value: \"+14155552671\",\n comment: \"Reported fraud\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.Entries.CreateAsync(\"11111111-2222-3333-4444-555555555555\", new ListsEntriesCreateParams\n{\n Value = \"+14155552671\",\n Comment = \"Reported fraud\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -57918,7 +67330,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -58022,12 +67434,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nentry_uuid = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'\nresp = requests.delete(\n f'https://verification.didit.me/v3/lists/{list_uuid}/entries/{entry_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nprint('Deleted:', resp.status_code == 204)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.lists.entries.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const listUuid = '11111111-2222-3333-4444-555555555555';\nconst entryUuid = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';\nconst resp = await fetch(\n `https://verification.didit.me/v3/lists/${listUuid}/entries/${entryUuid}/`,\n { method: 'DELETE', headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (resp.status !== 204) throw new Error(`Delete failed: ${resp.status}`);\nconsole.log('Entry deleted');" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.lists.entries.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Lists.Entries.Delete(ctx, \"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.lists().entries().delete(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->entries->delete('11111111-2222-3333-4444-555555555555', 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.lists.entries.delete(\n \"11111111-2222-3333-4444-555555555555\",\n \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Lists.Entries.DeleteAsync(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");" } ], "responses": { @@ -58049,7 +67486,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -58161,12 +67598,37 @@ { "lang": "python", "label": "Python", - "source": "import base64\nimport os\n\nimport requests\n\nlist_uuid = '11111111-2222-3333-4444-555555555555'\nwith open('face.jpg', 'rb') as image_file:\n image_b64 = base64.b64encode(image_file.read()).decode('ascii')\n\nresp = requests.post(\n f'https://verification.didit.me/v3/lists/{list_uuid}/entries/face-upload/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'image': image_b64, 'comment': 'Known fraud attempt'},\n timeout=10,\n)\nresp.raise_for_status()\nprint('Face entry', resp.json()['uuid'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.lists.entries.upload_face(\n \"11111111-2222-3333-4444-555555555555\",\n image=\"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n comment=\"Known fraud attempt\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { readFile } from 'node:fs/promises';\n\nconst listUuid = '11111111-2222-3333-4444-555555555555';\nconst image = (await readFile('face.jpg')).toString('base64');\nconst resp = await fetch(`https://verification.didit.me/v3/lists/${listUuid}/entries/face-upload/`, {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ image, comment: 'Known fraud attempt' }),\n});\nif (!resp.ok) throw new Error(`Upload failed: ${resp.status} ${await resp.text()}`);\nconst entry = await resp.json();\nconsole.log('Face entry', entry.uuid);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.lists.entries.uploadFace(\"11111111-2222-3333-4444-555555555555\", {\n image: \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n comment: \"Known fraud attempt\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Lists.Entries.UploadFace(ctx, \"11111111-2222-3333-4444-555555555555\", didit.ListsEntriesUploadFaceParams{\n\tImage: \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n\tComment: didit.String(\"Known fraud attempt\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.ListsEntriesUploadFaceParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.lists().entries().uploadFace(\"11111111-2222-3333-4444-555555555555\", ListsEntriesUploadFaceParams.builder()\n .image(\"/9j/4AAQSkZJRgABAQAAAQABAAD...\")\n .comment(\"Known fraud attempt\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "lists->entries->uploadFace('11111111-2222-3333-4444-555555555555', [\n 'image' => '/9j/4AAQSkZJRgABAQAAAQABAAD...',\n 'comment' => 'Known fraud attempt',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.lists.entries.upload_face(\n \"11111111-2222-3333-4444-555555555555\",\n image: \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n comment: \"Known fraud attempt\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Lists.Entries.UploadFaceAsync(\"11111111-2222-3333-4444-555555555555\", new ListsEntriesUploadFaceParams\n{\n Image = \"/9j/4AAQSkZJRgABAQAAAQABAAD...\",\n Comment = \"Known fraud attempt\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -58286,7 +67748,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -58407,12 +67869,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/blocklist/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'item_type': 'document'},\n timeout=10,\n)\nresp.raise_for_status()\nfor item in resp.json()['results']:\n print(item['session_id'], item['document_type'], item['document_number'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.blocklist.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/blocklist/?item_type=document', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst page = await resp.json();\nconsole.log(page.count, page.results);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.blocklist.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Blocklist.ListAutoPaging(ctx, didit.BlocklistListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.blocklist().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "blocklist->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.blocklist.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Blocklist.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -58530,7 +68017,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: read` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -58649,12 +68136,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/blocklist/add/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'session_id': '33333333-4444-5555-6666-777777777777',\n 'blocklist_face': True,\n 'blocklist_document': True,\n },\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json()['message'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.blocklist.add(\n session_id=\"33333333-4444-5555-6666-777777777777\",\n blocklist_face=True,\n blocklist_document=True,\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/blocklist/add/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n session_id: '33333333-4444-5555-6666-777777777777',\n blocklist_face: true,\n blocklist_document: true,\n }),\n});\nif (!resp.ok) throw new Error(`Blocklist failed: ${resp.status} ${await resp.text()}`);\nconsole.log((await resp.json()).message);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.blocklist.add({\n session_id: \"33333333-4444-5555-6666-777777777777\",\n blocklist_face: true,\n blocklist_document: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Blocklist.Add(ctx, didit.BlocklistAddParams{\n\tSessionID: \"33333333-4444-5555-6666-777777777777\",\n\tBlocklistFace: didit.Bool(true),\n\tBlocklistDocument: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BlocklistAddParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.blocklist().add(BlocklistAddParams.builder()\n .sessionId(\"33333333-4444-5555-6666-777777777777\")\n .blocklistFace(true)\n .blocklistDocument(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "blocklist->add([\n 'session_id' => '33333333-4444-5555-6666-777777777777',\n 'blocklist_face' => true,\n 'blocklist_document' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.blocklist.add(\n session_id: \"33333333-4444-5555-6666-777777777777\",\n blocklist_face: true,\n blocklist_document: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Blocklist.AddAsync(new BlocklistAddParams\n{\n SessionId = \"33333333-4444-5555-6666-777777777777\",\n BlocklistFace = true,\n BlocklistDocument = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -58750,7 +68262,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -58852,12 +68364,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/blocklist/remove/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'session_id': '33333333-4444-5555-6666-777777777777',\n 'unblock_face': True,\n 'unblock_document': True,\n },\n timeout=10,\n)\nresp.raise_for_status()\nprint(resp.json()['message'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.blocklist.remove(\n session_id=\"33333333-4444-5555-6666-777777777777\",\n unblock_face=True,\n unblock_document=True,\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/blocklist/remove/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n session_id: '33333333-4444-5555-6666-777777777777',\n unblock_face: true,\n unblock_document: true,\n }),\n});\nif (!resp.ok) throw new Error(`Unblock failed: ${resp.status} ${await resp.text()}`);\nconsole.log((await resp.json()).message);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.blocklist.remove({\n session_id: \"33333333-4444-5555-6666-777777777777\",\n unblock_face: true,\n unblock_document: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Blocklist.Remove(ctx, didit.BlocklistRemoveParams{\n\tSessionID: \"33333333-4444-5555-6666-777777777777\",\n\tUnblockFace: didit.Bool(true),\n\tUnblockDocument: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.BlocklistRemoveParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.blocklist().remove(BlocklistRemoveParams.builder()\n .sessionId(\"33333333-4444-5555-6666-777777777777\")\n .unblockFace(true)\n .unblockDocument(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "blocklist->remove([\n 'session_id' => '33333333-4444-5555-6666-777777777777',\n 'unblock_face' => true,\n 'unblock_document' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.blocklist.remove(\n session_id: \"33333333-4444-5555-6666-777777777777\",\n unblock_face: true,\n unblock_document: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Blocklist.RemoveAsync(new BlocklistRemoveParams\n{\n SessionId = \"33333333-4444-5555-6666-777777777777\",\n UnblockFace = true,\n UnblockDocument = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -58946,7 +68483,7 @@ } }, "403": { - "description": "The `x-api-key` header is missing or invalid, or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", + "description": "The `x-api-key` header is missing (a wrong, revoked or expired key gets `401`), or a scoped API key lacks `workflows: write` or is used from an IP address outside its allowlist.", "content": { "application/json": { "examples": { @@ -58999,12 +68536,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/webhook/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nconfig = resp.json()\nfor destination in config['endpoints']:\n print(destination['label'], destination['url'], destination['subscribed_events'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.retrieve_config()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/webhook/', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst config = await resp.json();\nfor (const destination of config.endpoints) {\n console.log(destination.label, destination.url, destination.subscribed_events);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.retrieveConfig();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.RetrieveConfig(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().retrieveConfig();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->retrieveConfig();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.retrieve_config\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.RetrieveConfigAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -59098,7 +68660,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -59311,6 +68873,18 @@ "type": "string", "maxLength": 253 } + }, + "allowed_domains": { + "type": "array", + "maxItems": 50, + "items": { + "type": "string", + "maxLength": 300 + }, + "description": "Replaces the whole list of allowed origins. Origins (for example `https://app.example.com`; `http` only for `localhost`) the hosted verification flow may be embedded in and may send the user back to with a session callback. Server-to-server calls are not affected. An empty list means no restriction. Didit stores each origin in lower case without a default port. An invalid entry fails with `400` on `allowed_domains`. Send `[]` to remove the restriction.", + "example": [ + "https://app.example.com" + ] } } }, @@ -59353,12 +68927,32 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.patch(\n 'https://verification.didit.me/v3/webhook/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'face_retention_policy': 'retain_until_user_deleted', 'face_retention_days': 365},\n timeout=10,\n)\nresp.raise_for_status()\nconfig = resp.json()\nprint(config['face_retention_policy'], config['face_retention_days'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.update_config(\n face_retention_policy=\"retain_until_user_deleted\",\n face_retention_days=365,\n biometric_consent_mode=\"auto\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/webhook/', {\n method: 'PATCH',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ face_retention_policy: 'retain_until_user_deleted', face_retention_days: 365 }),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst config = await resp.json();\nconsole.log(config.face_retention_policy, config.face_retention_days);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.updateConfig({\n face_retention_policy: \"retain_until_user_deleted\",\n face_retention_days: 365,\n biometric_consent_mode: \"auto\",\n});\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.WebhooksUpdateConfigParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().updateConfig(WebhooksUpdateConfigParams.builder()\n .faceRetentionPolicy(WebhooksUpdateConfigParams.FaceRetentionPolicy.of(\"retain_until_user_deleted\"))\n .faceRetentionDays(365L)\n .biometricConsentMode(WebhooksUpdateConfigParams.BiometricConsentMode.of(\"auto\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->updateConfig([\n 'face_retention_policy' => 'retain_until_user_deleted',\n 'face_retention_days' => 365,\n 'biometric_consent_mode' => 'auto',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.update_config(\n face_retention_policy: \"retain_until_user_deleted\",\n face_retention_days: 365,\n biometric_consent_mode: \"auto\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.UpdateConfigAsync(new WebhooksUpdateConfigParams\n{\n FaceRetentionPolicy = new WebhooksUpdateConfigParamsFaceRetentionPolicy(\"retain_until_user_deleted\"),\n FaceRetentionDays = 365,\n BiometricConsentMode = new WebhooksUpdateConfigParamsBiometricConsentMode(\"auto\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -59500,7 +69094,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -59682,12 +69276,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\ndestination_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/analytics/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'date_from': '2026-10-01', 'date_to': '2026-10-16'},\n timeout=10,\n)\nresp.raise_for_status()\nsummary = resp.json()['summary']\nprint(f\"{summary['failed_deliveries']} of {summary['total_deliveries']} failed ({summary['error_rate_percentage']}%)\")" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.retrieve_analytics(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const destinationUuid = '11111111-2222-3333-4444-555555555555';\nconst params = new URLSearchParams({ date_from: '2026-10-01', date_to: '2026-10-16' });\nconst resp = await fetch(`https://verification.didit.me/v3/webhook/destinations/${destinationUuid}/analytics/?${params}`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst { summary, points } = await resp.json();\nconsole.log(summary.error_rate_percentage, points.length);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.retrieveAnalytics(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.RetrieveAnalytics(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsRetrieveAnalyticsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().retrieveAnalytics(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->retrieveAnalytics('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.retrieve_analytics(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.RetrieveAnalyticsAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -59886,7 +69505,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -60117,12 +69736,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\ndestination_uuid = '11111111-2222-3333-4444-555555555555'\nurl = f'https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/deliveries/'\nparams = {'limit': 50, 'date_from': '2026-10-01'}\n\nwhile url:\n resp = requests.get(\n url,\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params=params,\n timeout=10,\n )\n resp.raise_for_status()\n page = resp.json()\n for delivery in page['results']:\n if delivery['response_status'] is None or delivery['response_status'] >= 400:\n print(delivery['uuid'], delivery['webhook_type'], delivery['response_status'])\n url, params = page['next'], None # next already carries the query string" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.webhooks.destinations.list_deliveries(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const destinationUuid = '11111111-2222-3333-4444-555555555555';\nlet url = `https://verification.didit.me/v3/webhook/destinations/${destinationUuid}/deliveries/?limit=50&date_from=2026-10-01`;\nwhile (url) {\n const resp = await fetch(url, { headers: { 'x-api-key': process.env.DIDIT_API_KEY } });\n if (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\n const page = await resp.json();\n for (const delivery of page.results) {\n if (delivery.response_status === null || delivery.response_status >= 400) {\n console.log(delivery.uuid, delivery.webhook_type, delivery.response_status);\n }\n }\n url = page.next;\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.webhooks.destinations.listDeliveries(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Webhooks.Destinations.ListDeliveriesAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.WebhooksDestinationsListDeliveriesParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.webhooks().destinations().listDeliveries(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->listDeliveries('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.webhooks.destinations.list_deliveries(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Webhooks.Destinations.ListDeliveriesAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -60237,7 +69881,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -60441,12 +70085,37 @@ { "lang": "python", "label": "Python", - "source": "import json\nimport os\n\nimport requests\n\ndestination_uuid = '11111111-2222-3333-4444-555555555555'\ndelivery_uuid = '66666666-7777-8888-9999-000000000001'\nresp = requests.get(\n f'https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\ndelivery = resp.json()\nheaders = json.loads(delivery['request_header'])\npayload = json.loads(delivery['request_body'])\nprint(delivery['response_status'], headers['X-Signature-V2'], payload['event_id'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.retrieve_delivery(\n \"11111111-2222-3333-4444-555555555555\",\n \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const destinationUuid = '11111111-2222-3333-4444-555555555555';\nconst deliveryUuid = '66666666-7777-8888-9999-000000000001';\nconst resp = await fetch(\n `https://verification.didit.me/v3/webhook/destinations/${destinationUuid}/deliveries/${deliveryUuid}/`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst delivery = await resp.json();\nconst headers = JSON.parse(delivery.request_header);\nconst payload = JSON.parse(delivery.request_body);\nconsole.log(delivery.response_status, headers['X-Signature-V2'], payload.event_id);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.retrieveDelivery(\n \"11111111-2222-3333-4444-555555555555\",\n \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.RetrieveDelivery(ctx, \"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().retrieveDelivery(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->retrieveDelivery('11111111-2222-3333-4444-555555555555', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.retrieve_delivery(\n \"11111111-2222-3333-4444-555555555555\",\n \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.RetrieveDeliveryAsync(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -60477,7 +70146,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -60686,12 +70355,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\ndestination_uuid = '11111111-2222-3333-4444-555555555555'\ndelivery_uuid = '66666666-7777-8888-9999-000000000001'\nresp = requests.post(\n f'https://verification.didit.me/v3/webhook/destinations/{destination_uuid}/deliveries/{delivery_uuid}/resend/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nresent = resp.json()\nif resent['response_status'] is None or resent['response_status'] >= 400:\n print('Your endpoint still rejects it:', resent['response_status'])\nelse:\n print('Delivered as', resent['uuid'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.webhooks.destinations.resend_delivery(\n \"11111111-2222-3333-4444-555555555555\",\n \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const destinationUuid = '11111111-2222-3333-4444-555555555555';\nconst deliveryUuid = '66666666-7777-8888-9999-000000000001';\nconst resp = await fetch(\n `https://verification.didit.me/v3/webhook/destinations/${destinationUuid}/deliveries/${deliveryUuid}/resend/`,\n { method: 'POST', headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(await resp.text());\nconst resent = await resp.json();\nconsole.log(resent.uuid, resent.response_status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.webhooks.destinations.resendDelivery(\n \"11111111-2222-3333-4444-555555555555\",\n \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Webhooks.Destinations.ResendDelivery(ctx, \"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.webhooks().destinations().resendDelivery(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "webhooks->destinations->resendDelivery('11111111-2222-3333-4444-555555555555', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.webhooks.destinations.resend_delivery(\n \"11111111-2222-3333-4444-555555555555\",\n \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Webhooks.Destinations.ResendDeliveryAsync(\"11111111-2222-3333-4444-555555555555\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -60750,7 +70444,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -61215,12 +70909,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nurl = 'https://verification.didit.me/v3/events/'\nparams = {\n 'event_category': ['payment', 'dispute'],\n 'matched_only': 'true',\n 'occurred_from': '2026-10-01T00:00:00Z',\n 'limit': 50,\n}\nwhile url:\n resp = requests.get(\n url,\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params=params,\n timeout=10,\n )\n resp.raise_for_status()\n page = resp.json()\n for event in page['results']:\n print(event['event_uuid'], event['action_type'], event['status'])\n url, params = page['next'], None" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.monitoring_events.list():\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const params = new URLSearchParams([\n ['event_category', 'payment'],\n ['event_category', 'dispute'],\n ['matched_only', 'true'],\n ['occurred_from', '2026-10-01T00:00:00Z'],\n ['limit', '50'],\n]);\nlet url = `https://verification.didit.me/v3/events/?${params}`;\nwhile (url) {\n const resp = await fetch(url, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n });\n if (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\n const page = await resp.json();\n for (const event of page.results) console.log(event.event_uuid, event.action_type, event.status);\n url = page.next;\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.monitoringEvents.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.MonitoringEvents.ListAutoPaging(ctx, didit.MonitoringEventsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.monitoringEvents().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.monitoring_events.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.MonitoringEvents.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -61339,7 +71058,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", "content": { "application/json": { "examples": { @@ -61500,12 +71219,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/events/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'event_id': 'login-2026-10-17-000001',\n 'event_category': 'auth',\n 'action_type': 'login',\n 'occurred_at': '2026-10-17T09:15:02.481Z',\n 'subject': {'vendor_data': 'user-42', 'entity_type': 'individual'},\n 'session': {'session_id': 'web-session-abc', 'sequence': 142},\n 'device_context': {\n 'fingerprint': 'fp-a8c1',\n 'network_context': {'ip_address': '203.0.113.42'},\n },\n 'payload': {'method': 'password'},\n },\n timeout=10,\n)\nresp.raise_for_status()\nresult = resp.json()\nprint(result['event_uuid'], result['status'], result['idempotent_replay'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.create(\n event_id=\"login-2026-10-17-000001\",\n event_category=\"auth\",\n action_type=\"login\",\n occurred_at=\"2026-10-17T09:15:02.481Z\",\n time_zone=\"Europe/Madrid\",\n subject={\n \"vendor_data\": \"user-42\",\n \"entity_type\": \"individual\",\n },\n session={\n \"session_id\": \"web-session-abc\",\n \"sequence\": 142,\n },\n device_context={\n \"fingerprint\": \"fp-a8c1\",\n \"network_context\": {\n \"ip_address\": \"203.0.113.42\",\n },\n },\n payload={\"method\": \"password\"},\n custom_values={\"vip_tier\": \"gold\"},\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/events/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n event_id: 'login-2026-10-17-000001',\n event_category: 'auth',\n action_type: 'login',\n occurred_at: '2026-10-17T09:15:02.481Z',\n subject: { vendor_data: 'user-42', entity_type: 'individual' },\n session: { session_id: 'web-session-abc', sequence: 142 },\n device_context: {\n fingerprint: 'fp-a8c1',\n network_context: { ip_address: '203.0.113.42' },\n },\n payload: { method: 'password' },\n }),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst result = await resp.json();\nconsole.log(result.event_uuid, result.status, result.idempotent_replay);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.create({\n event_id: \"login-2026-10-17-000001\",\n event_category: \"auth\",\n action_type: \"login\",\n occurred_at: \"2026-10-17T09:15:02.481Z\",\n time_zone: \"Europe/Madrid\",\n subject: {\n vendor_data: \"user-42\",\n entity_type: \"individual\",\n },\n session: {\n session_id: \"web-session-abc\",\n sequence: 142,\n },\n device_context: {\n fingerprint: \"fp-a8c1\",\n network_context: {\n ip_address: \"203.0.113.42\",\n },\n },\n payload: { method: \"password\" },\n custom_values: { vip_tier: \"gold\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.Create(ctx, didit.MonitoringEventCreateRequest{\n\tEventID: \"login-2026-10-17-000001\",\n\tEventCategory: \"auth\",\n\tActionType: \"login\",\n\tOccurredAt: time.Date(2026, 10, 17, 9, 15, 2, 0, time.UTC),\n\tTimeZone: didit.String(\"Europe/Madrid\"),\n\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\tVendorData: \"user-42\",\n\t\tEntityType: didit.String(\"individual\"),\n\t},\n\tSession: didit.Some(didit.MonitoringEventCreateRequestSession{\n\t\tSessionID: didit.String(\"web-session-abc\"),\n\t\tSequence: didit.Int(142),\n\t}),\n\tDeviceContext: didit.Some(didit.MonitoringEventCreateRequestDeviceContext{\n\t\tFingerprint: didit.String(\"fp-a8c1\"),\n\t\tNetworkContext: didit.Some(didit.MonitoringEventCreateRequestDeviceContextNetworkContext{\n\t\t\tIPAddress: didit.String(\"203.0.113.42\"),\n\t\t}),\n\t}),\n\tPayload: didit.Some(map[string]any{\"method\": \"password\"}),\n\tCustomValues: didit.Some(map[string]any{\"vip_tier\": \"gold\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.OffsetDateTime;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.MonitoringEventCreateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().create(MonitoringEventCreateRequest.builder()\n .eventId(\"login-2026-10-17-000001\")\n .eventCategory(MonitoringEventCreateRequest.EventCategory.of(\"auth\"))\n .actionType(\"login\")\n .occurredAt(OffsetDateTime.parse(\"2026-10-17T09:15:02.481Z\"))\n .timeZone(\"Europe/Madrid\")\n .subject(MonitoringEventCreateRequest.Subject.builder()\n .vendorData(\"user-42\")\n .entityType(\"individual\")\n .build())\n .session(MonitoringEventCreateRequest.Session.builder()\n .sessionId(\"web-session-abc\")\n .sequence(142L)\n .build())\n .deviceContext(MonitoringEventCreateRequest.DeviceContext.builder()\n .fingerprint(\"fp-a8c1\")\n .networkContext(MonitoringEventCreateRequest.DeviceContext.NetworkContext.builder()\n .ipAddress(\"203.0.113.42\")\n .build())\n .build())\n .payload(Map.of(\"method\", \"password\"))\n .customValues(Map.of(\"vip_tier\", MonitoringEventCreateRequest.CustomValuesValue.ofString(\"gold\")))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->create([\n 'event_id' => 'login-2026-10-17-000001',\n 'event_category' => 'auth',\n 'action_type' => 'login',\n 'occurred_at' => '2026-10-17T09:15:02.481Z',\n 'time_zone' => 'Europe/Madrid',\n 'subject' => [\n 'vendor_data' => 'user-42',\n 'entity_type' => 'individual',\n ],\n 'session' => [\n 'session_id' => 'web-session-abc',\n 'sequence' => 142,\n ],\n 'device_context' => [\n 'fingerprint' => 'fp-a8c1',\n 'network_context' => [\n 'ip_address' => '203.0.113.42',\n ],\n ],\n 'payload' => ['method' => 'password'],\n 'custom_values' => ['vip_tier' => 'gold'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.create(\n event_id: \"login-2026-10-17-000001\",\n event_category: \"auth\",\n action_type: \"login\",\n occurred_at: \"2026-10-17T09:15:02.481Z\",\n time_zone: \"Europe/Madrid\",\n subject: {\n vendor_data: \"user-42\",\n entity_type: \"individual\",\n },\n session: {\n session_id: \"web-session-abc\",\n sequence: 142,\n },\n device_context: {\n fingerprint: \"fp-a8c1\",\n network_context: {\n ip_address: \"203.0.113.42\",\n },\n },\n payload: { method: \"password\" },\n custom_values: { vip_tier: \"gold\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.CreateAsync(new MonitoringEventCreateRequest\n{\n EventId = \"login-2026-10-17-000001\",\n EventCategory = \"auth\",\n ActionType = \"login\",\n OccurredAt = DateTimeOffset.Parse(\"2026-10-17T09:15:02.481Z\"),\n TimeZone = \"Europe/Madrid\",\n Subject = new()\n {\n VendorData = \"user-42\",\n EntityType = \"individual\",\n },\n Session = new MonitoringEventCreateRequestSession\n {\n SessionId = \"web-session-abc\",\n Sequence = 142,\n },\n DeviceContext = new MonitoringEventCreateRequestDeviceContext\n {\n Fingerprint = \"fp-a8c1\",\n NetworkContext = new MonitoringEventCreateRequestDeviceContextNetworkContext\n {\n IpAddress = \"203.0.113.42\",\n },\n },\n Payload = new Dictionary { [\"method\"] = \"password\" },\n CustomValues = new Dictionary { [\"vip_tier\"] = \"gold\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -61691,7 +71435,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist. Also returned with `code: event_monitoring_disabled` while event ingestion is switched off for the application; nothing is stored in that case, and the check runs before the body is validated.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist. Also returned with `code: event_monitoring_disabled` while event ingestion is switched off for the application; nothing is stored in that case, and the check runs before the body is validated.", "content": { "application/json": { "examples": { @@ -61849,12 +71593,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nevents = [\n {\n 'event_id': 'login-2026-10-17-000001',\n 'event_category': 'auth',\n 'action_type': 'login',\n 'occurred_at': '2026-10-17T09:15:02.481Z',\n 'subject': {'vendor_data': 'user-42'},\n },\n {\n 'event_id': 'deposit-2026-10-17-000002',\n 'event_category': 'payment',\n 'action_type': 'deposit_completed',\n 'occurred_at': '2026-10-17T09:16:40.000Z',\n 'subject': {'vendor_data': 'user-42'},\n 'transaction_context': {'amount': '100.00', 'currency': 'EUR', 'payment_reference_id': 'dep_736'},\n 'payload': {'payment_method': 'card', 'status': 'completed'},\n },\n]\nresp = requests.post(\n 'https://verification.didit.me/v3/events/batch/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'events': events},\n timeout=10,\n)\nresp.raise_for_status() # 201 and 207 are both success\nbatch = resp.json()\nfor item in batch['results']:\n if item['outcome'] == 'rejected':\n print('fix and resend', events[item['index']]['event_id'], item['errors'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.create_batch(\n events=[{\n \"event_id\": \"login-2026-10-17-000001\",\n \"event_category\": \"auth\",\n \"action_type\": \"login\",\n \"occurred_at\": \"2026-10-17T09:15:02.481Z\",\n \"subject\": {\n \"vendor_data\": \"user-42\",\n },\n }, {\n \"event_id\": \"deposit-2026-10-17-000002\",\n \"event_category\": \"payment\",\n \"action_type\": \"deposit_completed\",\n \"occurred_at\": \"2026-10-17T09:16:40Z\",\n \"subject\": {\n \"vendor_data\": \"user-42\",\n },\n \"transaction_context\": {\n \"amount\": \"100.00\",\n \"currency\": \"EUR\",\n \"payment_reference_id\": \"dep_736\",\n },\n \"payload\": {\"payment_method\": \"card\", \"status\": \"completed\"},\n }],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const events = [\n {\n event_id: 'login-2026-10-17-000001',\n event_category: 'auth',\n action_type: 'login',\n occurred_at: '2026-10-17T09:15:02.481Z',\n subject: { vendor_data: 'user-42' },\n },\n {\n event_id: 'deposit-2026-10-17-000002',\n event_category: 'payment',\n action_type: 'deposit_completed',\n occurred_at: '2026-10-17T09:16:40.000Z',\n subject: { vendor_data: 'user-42' },\n transaction_context: { amount: '100.00', currency: 'EUR', payment_reference_id: 'dep_736' },\n payload: { payment_method: 'card', status: 'completed' },\n },\n];\nconst resp = await fetch('https://verification.didit.me/v3/events/batch/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ events }),\n});\nif (!resp.ok) throw new Error(await resp.text()); // 201 and 207 are both ok\nconst batch = await resp.json();\nfor (const item of batch.results) {\n if (item.outcome === 'rejected') console.log('fix and resend', events[item.index].event_id, item.errors);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.createBatch({\n events: [{\n event_id: \"login-2026-10-17-000001\",\n event_category: \"auth\",\n action_type: \"login\",\n occurred_at: \"2026-10-17T09:15:02.481Z\",\n subject: {\n vendor_data: \"user-42\",\n },\n }, {\n event_id: \"deposit-2026-10-17-000002\",\n event_category: \"payment\",\n action_type: \"deposit_completed\",\n occurred_at: \"2026-10-17T09:16:40Z\",\n subject: {\n vendor_data: \"user-42\",\n },\n transaction_context: {\n amount: \"100.00\",\n currency: \"EUR\",\n payment_reference_id: \"dep_736\",\n },\n payload: { payment_method: \"card\", status: \"completed\" },\n }],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.CreateBatch(ctx, didit.MonitoringEventsCreateBatchParams{\n\tEvents: []didit.MonitoringEventCreateRequest{{\n\t\tEventID: \"login-2026-10-17-000001\",\n\t\tEventCategory: \"auth\",\n\t\tActionType: \"login\",\n\t\tOccurredAt: time.Date(2026, 10, 17, 9, 15, 2, 0, time.UTC),\n\t\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\t\tVendorData: \"user-42\",\n\t\t},\n\t}, {\n\t\tEventID: \"deposit-2026-10-17-000002\",\n\t\tEventCategory: \"payment\",\n\t\tActionType: \"deposit_completed\",\n\t\tOccurredAt: time.Date(2026, 10, 17, 9, 16, 40, 0, time.UTC),\n\t\tSubject: didit.MonitoringEventCreateRequestSubject{\n\t\t\tVendorData: \"user-42\",\n\t\t},\n\t\tTransactionContext: didit.Some(didit.MonitoringEventCreateRequestTransactionContext{\n\t\t\tAmount: didit.String(\"100.00\"),\n\t\t\tCurrency: didit.String(\"EUR\"),\n\t\t\tPaymentReferenceID: didit.String(\"dep_736\"),\n\t\t}),\n\t\tPayload: didit.Some(map[string]any{\"payment_method\": \"card\", \"status\": \"completed\"}),\n\t}},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.OffsetDateTime;\nimport java.util.List;\nimport java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.MonitoringEventCreateRequest;\nimport me.didit.types.MonitoringEventsCreateBatchParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().createBatch(MonitoringEventsCreateBatchParams.builder()\n .events(List.of(\n MonitoringEventCreateRequest.builder()\n .eventId(\"login-2026-10-17-000001\")\n .eventCategory(MonitoringEventCreateRequest.EventCategory.of(\"auth\"))\n .actionType(\"login\")\n .occurredAt(OffsetDateTime.parse(\"2026-10-17T09:15:02.481Z\"))\n .subject(MonitoringEventCreateRequest.Subject.builder()\n .vendorData(\"user-42\")\n .build())\n .build(),\n MonitoringEventCreateRequest.builder()\n .eventId(\"deposit-2026-10-17-000002\")\n .eventCategory(MonitoringEventCreateRequest.EventCategory.of(\"payment\"))\n .actionType(\"deposit_completed\")\n .occurredAt(OffsetDateTime.parse(\"2026-10-17T09:16:40Z\"))\n .subject(MonitoringEventCreateRequest.Subject.builder()\n .vendorData(\"user-42\")\n .build())\n .transactionContext(MonitoringEventCreateRequest.TransactionContext.builder()\n .amount(\"100.00\")\n .currency(\"EUR\")\n .paymentReferenceId(\"dep_736\")\n .build())\n .payload(Map.of(\"payment_method\", \"card\", \"status\", \"completed\"))\n .build()))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->createBatch([\n 'events' => [[\n 'event_id' => 'login-2026-10-17-000001',\n 'event_category' => 'auth',\n 'action_type' => 'login',\n 'occurred_at' => '2026-10-17T09:15:02.481Z',\n 'subject' => [\n 'vendor_data' => 'user-42',\n ],\n ], [\n 'event_id' => 'deposit-2026-10-17-000002',\n 'event_category' => 'payment',\n 'action_type' => 'deposit_completed',\n 'occurred_at' => '2026-10-17T09:16:40Z',\n 'subject' => [\n 'vendor_data' => 'user-42',\n ],\n 'transaction_context' => [\n 'amount' => '100.00',\n 'currency' => 'EUR',\n 'payment_reference_id' => 'dep_736',\n ],\n 'payload' => ['payment_method' => 'card', 'status' => 'completed'],\n ]],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.create_batch(\n events: [{\n event_id: \"login-2026-10-17-000001\",\n event_category: \"auth\",\n action_type: \"login\",\n occurred_at: \"2026-10-17T09:15:02.481Z\",\n subject: {\n vendor_data: \"user-42\",\n },\n }, {\n event_id: \"deposit-2026-10-17-000002\",\n event_category: \"payment\",\n action_type: \"deposit_completed\",\n occurred_at: \"2026-10-17T09:16:40Z\",\n subject: {\n vendor_data: \"user-42\",\n },\n transaction_context: {\n amount: \"100.00\",\n currency: \"EUR\",\n payment_reference_id: \"dep_736\",\n },\n payload: { payment_method: \"card\", status: \"completed\" },\n }]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.CreateBatchAsync(new MonitoringEventsCreateBatchParams\n{\n Events = new MonitoringEventCreateRequest[]\n {\n new()\n {\n EventId = \"login-2026-10-17-000001\",\n EventCategory = \"auth\",\n ActionType = \"login\",\n OccurredAt = DateTimeOffset.Parse(\"2026-10-17T09:15:02.481Z\"),\n Subject = new()\n {\n VendorData = \"user-42\",\n },\n },\n new()\n {\n EventId = \"deposit-2026-10-17-000002\",\n EventCategory = \"payment\",\n ActionType = \"deposit_completed\",\n OccurredAt = DateTimeOffset.Parse(\"2026-10-17T09:16:40Z\"),\n Subject = new()\n {\n VendorData = \"user-42\",\n },\n TransactionContext = new MonitoringEventCreateRequestTransactionContext\n {\n Amount = \"100.00\",\n Currency = \"EUR\",\n PaymentReferenceId = \"dep_736\",\n },\n Payload = new Dictionary { [\"payment_method\"] = \"card\", [\"status\"] = \"completed\" },\n },\n },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -62300,7 +72069,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist. Also returned with `code: event_monitoring_disabled` while event ingestion is switched off for the application; nothing is stored in that case, and the check runs before the body is validated.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist. Also returned with `code: event_monitoring_disabled` while event ingestion is switched off for the application; nothing is stored in that case, and the check runs before the body is validated.", "content": { "application/json": { "examples": { @@ -62467,12 +72236,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.post(\n 'https://verification.didit.me/v3/events/sdk-token/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'vendor_data': 'user-42',\n 'allowed_event_categories': ['auth', 'session', 'gameplay'],\n 'ttl_seconds': 900,\n 'max_uses': 1000,\n 'bind_to_origin': 'https://app.example.com',\n },\n timeout=10,\n)\nresp.raise_for_status()\ncredential = resp.json()\n# Hand only monitoring_token to the app, never the API key.\nprint(credential['monitoring_token'], credential['expires_at'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.create_sdk_token(\n vendor_data=\"user-42\",\n allowed_event_categories=[\"auth\", \"session\", \"gameplay\"],\n ttl_seconds=900,\n max_uses=1000,\n bind_to_origin=\"https://app.example.com\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/events/sdk-token/', {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n vendor_data: 'user-42',\n allowed_event_categories: ['auth', 'session', 'gameplay'],\n ttl_seconds: 900,\n max_uses: 1000,\n bind_to_origin: 'https://app.example.com',\n }),\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst { monitoring_token, expires_at } = await resp.json();\n// Hand only monitoring_token to the app, never the API key.\nconsole.log(monitoring_token, expires_at);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.createSdkToken({\n vendor_data: \"user-42\",\n allowed_event_categories: [\"auth\", \"session\", \"gameplay\"],\n ttl_seconds: 900,\n max_uses: 1000,\n bind_to_origin: \"https://app.example.com\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.CreateSDKToken(ctx, didit.MonitoringEventsCreateSDKTokenParams{\n\tVendorData: \"user-42\",\n\tAllowedEventCategories: didit.Some([]didit.MonitoringEventsCreateSDKTokenParamsAllowedEventCategories{\"auth\", \"session\", \"gameplay\"}),\n\tTTLSeconds: didit.Int(900),\n\tMaxUses: didit.Int(1000),\n\tBindToOrigin: didit.String(\"https://app.example.com\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.MonitoringEventsCreateSdkTokenParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().createSdkToken(MonitoringEventsCreateSdkTokenParams.builder()\n .vendorData(\"user-42\")\n .allowedEventCategories(List.of(MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of(\"auth\"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of(\"session\"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of(\"gameplay\")))\n .ttlSeconds(900L)\n .maxUses(1000L)\n .bindToOrigin(\"https://app.example.com\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->createSdkToken([\n 'vendor_data' => 'user-42',\n 'allowed_event_categories' => ['auth', 'session', 'gameplay'],\n 'ttl_seconds' => 900,\n 'max_uses' => 1000,\n 'bind_to_origin' => 'https://app.example.com',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.create_sdk_token(\n vendor_data: \"user-42\",\n allowed_event_categories: [\"auth\", \"session\", \"gameplay\"],\n ttl_seconds: 900,\n max_uses: 1000,\n bind_to_origin: \"https://app.example.com\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.CreateSdkTokenAsync(new MonitoringEventsCreateSdkTokenParams\n{\n VendorData = \"user-42\",\n AllowedEventCategories = new MonitoringEventsCreateSdkTokenParamsAllowedEventCategories[] { \"auth\", \"session\", \"gameplay\" },\n TtlSeconds = 900,\n MaxUses = 1000,\n BindToOrigin = \"https://app.example.com\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -62591,7 +72385,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist. Also returned with `code: event_monitoring_disabled` while event ingestion is switched off for the application; nothing is stored in that case, and the check runs before the body is validated.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist. Also returned with `code: event_monitoring_disabled` while event ingestion is switched off for the application; nothing is stored in that case, and the check runs before the body is validated.", "content": { "application/json": { "examples": { @@ -62693,12 +72487,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nevent_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/events/{event_uuid}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nevent = resp.json()\nprint(event['status'], event['score'])\nfor run in event['rule_runs']:\n print(run['rule_title'], run['score_delta'], run['action_summary'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.retrieve(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const eventUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/events/${eventUuid}/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst event = await resp.json();\nconsole.log(event.status, event.score, event.rule_runs.length, 'rule runs');" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.retrieve(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.Retrieve(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().retrieve(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->retrieve('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.retrieve(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.RetrieveAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -62857,7 +72676,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", "content": { "application/json": { "examples": { @@ -63237,12 +73056,37 @@ { "lang": "python", "label": "Python", - "source": "import os\nfrom urllib.parse import quote\n\nimport requests\n\nvendor_data = 'user-42'\nresp = requests.get(\n f'https://verification.didit.me/v3/events/subjects/{quote(vendor_data, safe=\"\")}/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'entity_type': 'individual', 'limit': 50},\n timeout=10,\n)\nresp.raise_for_status()\nfor event in resp.json()['results']:\n print(event['occurred_at'], event['event_category'], event['action_type'], event['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.monitoring_events.retrieve_subject_timeline(\n \"user-42\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const vendorData = 'user-42';\nconst url = `https://verification.didit.me/v3/events/subjects/${encodeURIComponent(vendorData)}/?entity_type=individual&limit=50`;\nconst resp = await fetch(url, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst page = await resp.json();\nfor (const event of page.results) console.log(event.occurred_at, event.event_category, event.action_type, event.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.monitoringEvents.retrieveSubjectTimeline(\"user-42\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.MonitoringEvents.RetrieveSubjectTimelineAutoPaging(ctx, \"user-42\", didit.MonitoringEventsRetrieveSubjectTimelineParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.monitoringEvents().retrieveSubjectTimeline(\"user-42\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->retrieveSubjectTimeline('user-42') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.monitoring_events.retrieve_subject_timeline(\"user-42\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.MonitoringEvents.RetrieveSubjectTimelineAsync(\"user-42\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -63369,7 +73213,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", "content": { "application/json": { "examples": { @@ -63467,12 +73311,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nresp = requests.get(\n 'https://verification.didit.me/v3/events/enrichment-metrics/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'days': 30},\n timeout=10,\n)\nresp.raise_for_status()\nmetrics = resp.json()\nprint(metrics['events_ingested'], metrics['cache_hit_rate'], metrics['provider_calls_per_1k_events'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.monitoring_events.retrieve_enrichment_metrics()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const resp = await fetch('https://verification.didit.me/v3/events/enrichment-metrics/?days=30', {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst metrics = await resp.json();\nconsole.log(metrics.events_ingested, metrics.cache_hit_rate, metrics.provider_calls_per_1k_events);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.monitoringEvents.retrieveEnrichmentMetrics();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.MonitoringEvents.RetrieveEnrichmentMetrics(ctx, didit.MonitoringEventsRetrieveEnrichmentMetricsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.monitoringEvents().retrieveEnrichmentMetrics();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->retrieveEnrichmentMetrics();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.monitoring_events.retrieve_enrichment_metrics\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.MonitoringEvents.RetrieveEnrichmentMetricsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -63595,7 +73464,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: read`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", "content": { "application/json": { "examples": { @@ -63691,12 +73560,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nevent_uuid = '11111111-2222-3333-4444-555555555555'\nresp = requests.delete(\n f'https://verification.didit.me/v3/events/{event_uuid}/delete/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status() # 204 No Content\nprint('deleted', event_uuid)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.monitoring_events.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const eventUuid = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/events/${eventUuid}/delete/`, {\n method: 'DELETE',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (resp.status !== 204) throw new Error(`Delete failed: ${resp.status}`);\nconsole.log('deleted', eventUuid);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.monitoringEvents.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.MonitoringEvents.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.monitoringEvents().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "monitoringEvents->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.monitoring_events.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.MonitoringEvents.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ], "responses": { @@ -63718,7 +73612,7 @@ } }, "403": { - "description": "Missing or invalid `x-api-key` (this endpoint answers `403`, never `401`, for a missing or invalid key), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", + "description": "A missing `x-api-key` (a wrong, revoked or expired key gets `401`), a scoped key without `transactions: write`, a key limited to some workflows or to approved sessions (such a key never reaches transaction monitoring data), or a request from outside the key's IP allowlist.", "content": { "application/json": { "examples": { @@ -63839,12 +73733,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '33333333-4444-5555-6666-777777777777'\nparty_uuid = '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41'\nresp = requests.post(\n f'https://verification.didit.me/v3/session/{session_id}/kyb/parties/{party_uuid}/regenerate/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nparty = resp.json()\nprint(party['kyc_session_id'], party['kyc_session_status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.regenerate_kyb_party(\n \"33333333-4444-5555-6666-777777777777\",\n \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '33333333-4444-5555-6666-777777777777';\nconst partyUuid = '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41';\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/kyb/parties/${partyUuid}/regenerate/`, {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Regenerate failed: ${resp.status}`);\nconst party = await resp.json();\nconsole.log(party.kyc_session_id, party.kyc_session_status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.regenerateKybParty(\n \"33333333-4444-5555-6666-777777777777\",\n \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.RegenerateKYBParty(ctx, \"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().regenerateKybParty(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->regenerateKybParty('33333333-4444-5555-6666-777777777777', '0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.regenerate_kyb_party(\n \"33333333-4444-5555-6666-777777777777\",\n \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.RegenerateKybPartyAsync(\"33333333-4444-5555-6666-777777777777\", \"0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -63935,7 +73854,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -64151,12 +74070,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\ntransaction_id = 'abcdef12-3456-7890-abcd-ef1234567890'\nurl = f'https://verification.didit.me/v3/transactions/{transaction_id}/notes/'\nparams = {'limit': 50}\nwhile url:\n resp = requests.get(\n url,\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params=params,\n timeout=10,\n )\n resp.raise_for_status()\n page = resp.json()\n for note in page['results']:\n print(note['created_at'], note['actor_name'], note['note'])\n url, params = page['next'], None" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.notes.list(\n \"abcdef12-3456-7890-abcd-ef1234567890\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const transactionId = 'abcdef12-3456-7890-abcd-ef1234567890';\nlet url = `https://verification.didit.me/v3/transactions/${transactionId}/notes/?limit=50`;\nwhile (url) {\n const resp = await fetch(url, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n });\n if (!resp.ok) throw new Error(`List notes failed: ${resp.status}`);\n const page = await resp.json();\n for (const note of page.results) console.log(note.created_at, note.actor_name, note.note);\n url = page.next;\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.notes.list(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.Notes.ListAutoPaging(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsNotesListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().notes().list(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->notes->list('abcdef12-3456-7890-abcd-ef1234567890') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.notes.list(\"abcdef12-3456-7890-abcd-ef1234567890\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.Notes.ListAsync(\"abcdef12-3456-7890-abcd-ef1234567890\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -64304,7 +74248,7 @@ } }, "403": { - "description": "The request is not allowed. A missing or invalid API key gets the generic message (never `401`).", + "description": "The request is not allowed. A missing key gets the generic message; a wrong, revoked or expired key gets `401`.", "content": { "application/json": { "schema": { @@ -64497,12 +74441,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\ntransaction_id = 'abcdef12-3456-7890-abcd-ef1234567890'\nresp = requests.post(\n f'https://verification.didit.me/v3/transactions/{transaction_id}/notes/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={\n 'note': 'Customer confirmed the withdrawal by phone.',\n 'mentioned_emails': ['analyst@example.com'],\n },\n timeout=10,\n)\nresp.raise_for_status()\nnote = resp.json()\nprint(note['uuid'], note['created_at'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.transactions.notes.create(\n \"abcdef12-3456-7890-abcd-ef1234567890\",\n note=\"Customer confirmed the withdrawal by phone.\",\n mentioned_emails=[\"analyst@example.com\"],\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const transactionId = 'abcdef12-3456-7890-abcd-ef1234567890';\nconst resp = await fetch(`https://verification.didit.me/v3/transactions/${transactionId}/notes/`, {\n method: 'POST',\n headers: {\n 'x-api-key': process.env.DIDIT_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n note: 'Customer confirmed the withdrawal by phone.',\n mentioned_emails: ['analyst@example.com'],\n }),\n});\nif (!resp.ok) throw new Error(`Create note failed: ${resp.status}`);\nconst note = await resp.json();\nconsole.log(note.uuid, note.created_at);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.transactions.notes.create(\"abcdef12-3456-7890-abcd-ef1234567890\", {\n note: \"Customer confirmed the withdrawal by phone.\",\n mentioned_emails: [\"analyst@example.com\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Notes.Create(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsNotesCreateParams{\n\tNote: \"Customer confirmed the withdrawal by phone.\",\n\tMentionedEmails: didit.Some([]string{\"analyst@example.com\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TransactionsNotesCreateParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.transactions().notes().create(\"abcdef12-3456-7890-abcd-ef1234567890\", TransactionsNotesCreateParams.builder()\n .note(\"Customer confirmed the withdrawal by phone.\")\n .mentionedEmails(List.of(\"analyst@example.com\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->notes->create('abcdef12-3456-7890-abcd-ef1234567890', [\n 'note' => 'Customer confirmed the withdrawal by phone.',\n 'mentioned_emails' => ['analyst@example.com'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.transactions.notes.create(\n \"abcdef12-3456-7890-abcd-ef1234567890\",\n note: \"Customer confirmed the withdrawal by phone.\",\n mentioned_emails: [\"analyst@example.com\"]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Transactions.Notes.CreateAsync(\"abcdef12-3456-7890-abcd-ef1234567890\", new TransactionsNotesCreateParams\n{\n Note = \"Customer confirmed the withdrawal by phone.\",\n MentionedEmails = new string[] { \"analyst@example.com\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -64599,7 +74568,7 @@ } }, "403": { - "description": "The request is not allowed. A missing or invalid API key gets the generic message (never `401`).", + "description": "The request is not allowed. A missing key gets the generic message; a wrong, revoked or expired key gets `401`.", "content": { "application/json": { "schema": { @@ -64774,12 +74743,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\ntransaction_id = 'abcdef12-3456-7890-abcd-ef1234567890'\nresp = requests.get(\n f'https://verification.didit.me/v3/transactions/{transaction_id}/related/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'limit': 50},\n timeout=10,\n)\nresp.raise_for_status()\nfor tx in resp.json()['results']:\n print(tx['uuid'], tx['txn_date'], tx['status'], tx['amount'], tx['currency'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.transactions.list_related(\n \"abcdef12-3456-7890-abcd-ef1234567890\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const transactionId = 'abcdef12-3456-7890-abcd-ef1234567890';\nconst resp = await fetch(\n `https://verification.didit.me/v3/transactions/${transactionId}/related/?limit=50`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(`Related lookup failed: ${resp.status}`);\nconst page = await resp.json();\nfor (const tx of page.results) console.log(tx.uuid, tx.status, tx.amount, tx.currency);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.transactions.listRelated(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Transactions.ListRelatedAutoPaging(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\", didit.TransactionsListRelatedParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.transactions().listRelated(\"abcdef12-3456-7890-abcd-ef1234567890\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->listRelated('abcdef12-3456-7890-abcd-ef1234567890') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.transactions.list_related(\"abcdef12-3456-7890-abcd-ef1234567890\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Transactions.ListRelatedAsync(\"abcdef12-3456-7890-abcd-ef1234567890\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -64927,7 +74921,7 @@ } }, "403": { - "description": "The request is not allowed. A missing or invalid API key gets the generic message (never `401`).", + "description": "The request is not allowed. A missing key gets the generic message; a wrong, revoked or expired key gets `401`.", "content": { "application/json": { "schema": { @@ -65101,12 +75095,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\norg_id = '11111111-2222-3333-4444-555555555555'\napp_id = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'\nbusiness_session_id = '22222222-3333-4444-5555-666666666666'\nresp = requests.get(\n f'https://verification.didit.me/v3/organization/{org_id}/application/{app_id}'\n f'/businesses/{business_session_id}/pdf/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=60,\n)\nresp.raise_for_status()\nwith open(f'business_{business_session_id}.pdf', 'wb') as fh:\n fh.write(resp.content)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\ncontent = client.businesses.generate_session_pdf(\n \"22222222-3333-4444-5555-666666666666\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { writeFile } from 'node:fs/promises';\n\nconst orgId = '11111111-2222-3333-4444-555555555555';\nconst appId = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';\nconst businessSessionId = '22222222-3333-4444-5555-666666666666';\nconst resp = await fetch(\n `https://verification.didit.me/v3/organization/${orgId}/application/${appId}/businesses/${businessSessionId}/pdf/`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(`PDF generation failed: ${resp.status}`);\nawait writeFile(`business_${businessSessionId}.pdf`, Buffer.from(await resp.arrayBuffer()));" + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst content = await didit.businesses.generateSessionPdf(\"22222222-3333-4444-5555-666666666666\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Businesses.GenerateSessionPDF(ctx, \"22222222-3333-4444-5555-666666666666\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.businesses().generateSessionPdf(\"22222222-3333-4444-5555-666666666666\")\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "businesses->generateSessionPdf('22222222-3333-4444-5555-666666666666');\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ncontent = didit.businesses.generate_session_pdf(\"22222222-3333-4444-5555-666666666666\")\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar content = await client.Businesses.GenerateSessionPdfAsync(\"22222222-3333-4444-5555-666666666666\");\nawait content.SaveToAsync(\"download.pdf\");" } ], "responses": { @@ -65153,7 +75172,7 @@ } }, "403": { - "description": "The request is not allowed or the session is not finished. Read `detail`: a session that is not `Approved`, `Declined` or `In Review`, a missing or invalid API key (never `401`), an `application_id` that is not the key's application, a scoped key without `media: read` or `businesses: read`, a key limited to workflows or approved sessions, or a request from outside the key's IP list.", + "description": "The request is not allowed or the session is not finished. Read `detail`: a session that is not `Approved`, `Declined` or `In Review`, a missing API key (a wrong, revoked or expired key gets `401`), an `application_id` that is not the key's application, a scoped key without `media: read` or `businesses: read`, a key limited to workflows or approved sessions, or a request from outside the key's IP list.", "content": { "application/json": { "schema": { @@ -65342,12 +75361,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\norg_id = '11111111-2222-3333-4444-555555555555'\napp_id = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'\ntransaction_uuid = 'abcdef12-3456-7890-abcd-ef1234567890'\nresp = requests.get(\n f'https://verification.didit.me/v3/organization/{org_id}/application/{app_id}'\n f'/transactions/{transaction_uuid}/pdf/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=60,\n)\nresp.raise_for_status()\nwith open(f'transaction_{transaction_uuid}.pdf', 'wb') as fh:\n fh.write(resp.content)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\ncontent = client.transactions.generate_pdf(\n \"abcdef12-3456-7890-abcd-ef1234567890\",\n)\nwith open(\"download.pdf\", \"wb\") as file:\n file.write(content)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { writeFile } from 'node:fs/promises';\n\nconst orgId = '11111111-2222-3333-4444-555555555555';\nconst appId = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';\nconst transactionUuid = 'abcdef12-3456-7890-abcd-ef1234567890';\nconst resp = await fetch(\n `https://verification.didit.me/v3/organization/${orgId}/application/${appId}/transactions/${transactionUuid}/pdf/`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(`PDF generation failed: ${resp.status}`);\nawait writeFile(`transaction_${transactionUuid}.pdf`, Buffer.from(await resp.arrayBuffer()));" + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst content = await didit.transactions.generatePdf(\"abcdef12-3456-7890-abcd-ef1234567890\");\nawait writeFile(\"download.pdf\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresp, err := client.Transactions.GeneratePDF(ctx, \"abcdef12-3456-7890-abcd-ef1234567890\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.pdf\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.transactions().generatePdf(\"abcdef12-3456-7890-abcd-ef1234567890\")\n .writeTo(Path.of(\"download.pdf\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->generatePdf('abcdef12-3456-7890-abcd-ef1234567890');\n$content->saveTo('download.pdf');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ncontent = didit.transactions.generate_pdf(\"abcdef12-3456-7890-abcd-ef1234567890\")\nFile.binwrite(\"download.pdf\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar content = await client.Transactions.GeneratePdfAsync(\"abcdef12-3456-7890-abcd-ef1234567890\");\nawait content.SaveToAsync(\"download.pdf\");" } ], "responses": { @@ -65394,7 +75438,7 @@ } }, "403": { - "description": "The request is not allowed. Read `detail`: a missing or invalid API key (never `401`), an `application_id` that is not the key's application, a scoped key without `media: read` or `transactions: read`, a key limited to workflows or approved sessions, or a request from outside the key's IP list.", + "description": "The request is not allowed. Read `detail`: a missing API key (a wrong, revoked or expired key gets `401`), an `application_id` that is not the key's application, a scoped key without `media: read` or `transactions: read`, a key limited to workflows or approved sessions, or a request from outside the key's IP list.", "content": { "application/json": { "schema": { @@ -65673,12 +75717,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\norg_id = '11111111-2222-3333-4444-555555555555'\napp_id = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'\nresp = requests.get(\n f'https://verification.didit.me/v3/organization/{org_id}/application/{app_id}/analytics/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'start_date': '2026-10-01', 'end_date': '2026-10-15'},\n timeout=10,\n)\nresp.raise_for_status()\ndata = resp.json()\nprint(data['request_breakdown']['total_approved'], data['conversion_rate'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.analytics.retrieve()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const orgId = '11111111-2222-3333-4444-555555555555';\nconst appId = 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';\nconst params = new URLSearchParams({ start_date: '2026-10-01', end_date: '2026-10-15' });\nconst resp = await fetch(\n `https://verification.didit.me/v3/organization/${orgId}/application/${appId}/analytics/?${params}`,\n { headers: { 'x-api-key': process.env.DIDIT_API_KEY } },\n);\nif (!resp.ok) throw new Error(`Analytics failed: ${resp.status}`);\nconst data = await resp.json();\nconsole.log(data.request_breakdown.total_approved, data.conversion_rate);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.analytics.retrieve();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Analytics.Retrieve(ctx, didit.AnalyticsRetrieveParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.analytics().retrieve();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "analytics->retrieve();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.analytics.retrieve\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Analytics.RetrieveAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -66185,6 +76254,277 @@ } } }, + "403": { + "description": "The request is not allowed. Read `detail`: a missing API key (a wrong, revoked or expired key gets `401`), a key of another application, any scoped key, or a request from outside the key's IP list.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + }, + "examples": { + "Missing or invalid key": { + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Another application": { + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key": { + "value": { + "detail": "This API key has no access to this endpoint." + } + }, + "Outside the key's IP list": { + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "429": { + "description": "More than 600 GET requests per minute with this API key. Wait the number of seconds in `Retry-After`, then retry.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + }, + "examples": { + "Throttled": { + "value": { + "detail": "GET request rate limit exceeded. You can make up to 600 requests per minute." + } + } + } + } + }, + "headers": { + "Retry-After": { + "description": "Seconds until the current one-minute window resets.", + "schema": { + "type": "integer", + "example": 23 + } + }, + "X-RateLimit-Limit": { + "description": "Requests allowed per minute in this budget.", + "schema": { + "type": "integer" + } + }, + "X-RateLimit-Remaining": { + "description": "Requests left in the current window.", + "schema": { + "type": "integer" + } + }, + "X-RateLimit-Reset": { + "description": "Unix time when the window resets.", + "schema": { + "type": "integer" + } + } + } + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ] + } + }, + "/v3/organization/{organization_id}/application/{application_id}/analytics/today/": { + "get": { + "summary": "Get today's verifications by hour", + "operationId": "get_application_analytics_today", + "x-didit-sdk": { + "resource": "analytics", + "method": "retrieve_today", + "auth": "api_key", + "server": true, + "scope": "application" + }, + "tags": [ + "Analytics" + ], + "description": "Today's user verification (KYC) sessions, from local midnight in `tz`, counted per local hour they were created in, next to the same hours of the same weekday one week before, and split by the outcome each one holds now: approved, in review or declined. This is the volume card of the Business Console's Home.\n\n`total` is today so far. `previous_total_so_far` counts the comparison day only up to the same local time, so a change between them compares the same part of both days. The hours still to come today are `0`. A day on which the clocks change has 23 or 25 hours: the missing hour stays `0` and the repeated hour holds both.", + "parameters": [ + { + "name": "organization_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Organization UUID.", + "example": "11111111-2222-3333-4444-555555555555" + }, + { + "name": "application_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "Application UUID. Must be the application the API key belongs to: a key used on any other application gets `403`.", + "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + }, + { + "name": "tz", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "UTC", + "example": "Europe/Madrid" + }, + "description": "IANA time zone whose midnight starts today, for example `Europe/Madrid` or `America/Mexico_City`. Omit it for UTC." + } + ], + "responses": { + "200": { + "description": "Today's verifications by local hour, the comparison day's, and today's outcomes.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationAnalyticsToday" + }, + "examples": { + "Madrid, 14:00": { + "value": { + "time_zone": "Europe/Madrid", + "date": "2026-10-30", + "current_hour": 14, + "previous_date": "2026-10-23", + "hours": [ + 3, + 1, + 0, + 0, + 1, + 2, + 4, + 9, + 14, + 18, + 21, + 19, + 22, + 24, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "previous_hours": [ + 2, + 1, + 1, + 0, + 1, + 3, + 5, + 8, + 12, + 16, + 19, + 18, + 20, + 22, + 24, + 26, + 23, + 19, + 15, + 12, + 9, + 7, + 5, + 3 + ], + "total": 165, + "previous_total_so_far": 151, + "outcomes": { + "approved": 139, + "in_review": 6, + "declined": 18 + } + } + } + } + } + } + }, + "400": { + "description": "Unknown time zone. The body is keyed by the parameter, with a list of messages.", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "examples": { + "Unknown time zone": { + "value": { + "tz": [ + "Unknown time zone: Europe/Atlantis." + ] + } + } + } + } + } + }, + "401": { + "description": "The API key has expired. Only a key created with an expiry date can expire; after that date every request with it answers `401`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + }, + "examples": { + "Expired key": { + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, "403": { "description": "The request is not allowed. Read `detail`: a missing or invalid API key (never `401`), a key of another application, any scoped key, or a request from outside the key's IP list.", "content": { @@ -66272,6 +76612,13 @@ } } }, + "x-codeSamples": [ + { + "lang": "curl", + "label": "curl", + "source": "curl -X GET 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/analytics/today/?tz=Europe%2FMadrid' \\\n -H 'x-api-key: YOUR_API_KEY'" + } + ], "security": [ { "ApiKeyAuth": [] @@ -66315,12 +76662,37 @@ { "lang": "python", "label": "Python", - "source": "import json\nimport os\n\nimport requests\n\nsession_id = '22222222-3333-4444-5555-666666666666'\nresp = requests.get(\n f'https://verification.didit.me/v3/session/{session_id}/webhooks/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nfor delivery in resp.json():\n payload = json.loads(delivery['request_body'])\n print(delivery['created_at'], delivery['webhook_type'], delivery['response_status'], payload['event_id'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.webhooks.list(\n \"22222222-3333-4444-5555-666666666666\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '22222222-3333-4444-5555-666666666666';\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/webhooks/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst deliveries = await resp.json();\nfor (const delivery of deliveries) {\n const payload = JSON.parse(delivery.request_body);\n console.log(delivery.created_at, delivery.webhook_type, delivery.response_status, payload.event_id);\n}" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.webhooks.list(\"22222222-3333-4444-5555-666666666666\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.List(ctx, \"22222222-3333-4444-5555-666666666666\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().webhooks().list(\"22222222-3333-4444-5555-666666666666\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->webhooks->list('22222222-3333-4444-5555-666666666666');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.webhooks.list(\"22222222-3333-4444-5555-666666666666\").each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Webhooks.ListAsync(\"22222222-3333-4444-5555-666666666666\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -66369,7 +76741,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -66578,12 +76950,37 @@ { "lang": "python", "label": "Python", - "source": "import json\nimport os\n\nimport requests\n\nsession_id = '22222222-3333-4444-5555-666666666666'\nwebhook_uuid = '66666666-7777-8888-9999-000000000001'\nresp = requests.get(\n f'https://verification.didit.me/v3/session/{session_id}/webhook/{webhook_uuid}', # no trailing slash\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\ndelivery = resp.json()\nheaders = json.loads(delivery['request_header'])\npayload = json.loads(delivery['request_body'])\nprint(delivery['response_status'], headers['X-Signature-V2'], payload['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.webhooks.retrieve(\n \"22222222-3333-4444-5555-666666666666\",\n \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '22222222-3333-4444-5555-666666666666';\nconst webhookUuid = '66666666-7777-8888-9999-000000000001';\n// No trailing slash on this path.\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/webhook/${webhookUuid}`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst delivery = await resp.json();\nconst payload = JSON.parse(delivery.request_body);\nconsole.log(delivery.response_status, payload.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.webhooks.retrieve(\n \"22222222-3333-4444-5555-666666666666\",\n \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.Retrieve(ctx, \"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().webhooks().retrieve(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->webhooks->retrieve('22222222-3333-4444-5555-666666666666', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.webhooks.retrieve(\n \"22222222-3333-4444-5555-666666666666\",\n \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Webhooks.RetrieveAsync(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -66613,7 +77010,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -66827,12 +77224,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '22222222-3333-4444-5555-666666666666'\nwebhook_uuid = '66666666-7777-8888-9999-000000000001'\nresp = requests.post(\n f'https://verification.didit.me/v3/session/{session_id}/webhook/{webhook_uuid}/resend', # no trailing slash\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nresent = resp.json()\nprint(resent['uuid'], resent['response_status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.webhooks.resend(\n \"22222222-3333-4444-5555-666666666666\",\n \"66666666-7777-8888-9999-000000000001\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '22222222-3333-4444-5555-666666666666';\nconst webhookUuid = '66666666-7777-8888-9999-000000000001';\n// No trailing slash on this path.\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/webhook/${webhookUuid}/resend`, {\n method: 'POST',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(await resp.text());\nconst resent = await resp.json();\nconsole.log(resent.uuid, resent.response_status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.webhooks.resend(\n \"22222222-3333-4444-5555-666666666666\",\n \"66666666-7777-8888-9999-000000000001\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Webhooks.Resend(ctx, \"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().webhooks().resend(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->webhooks->resend('22222222-3333-4444-5555-666666666666', '66666666-7777-8888-9999-000000000001');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.webhooks.resend(\n \"22222222-3333-4444-5555-666666666666\",\n \"66666666-7777-8888-9999-000000000001\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Webhooks.ResendAsync(\"22222222-3333-4444-5555-666666666666\", \"66666666-7777-8888-9999-000000000001\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -66896,7 +77318,7 @@ } }, "401": { - "description": "The API key has expired: it was created with an expiry date that has passed. A missing, invalid or revoked key gets `403`, not `401`.", + "description": "The API key has expired: it was created with an expiry date that has passed. A wrong or revoked key also gets `401`; a missing key gets `403`.", "content": { "application/json": { "schema": { @@ -67135,12 +77557,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/session/{session_id}/events/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n params={'limit': 50},\n timeout=10,\n)\nresp.raise_for_status()\nfor event in resp.json()['results']:\n print(event['sent_at'], event['event_type'], event['step'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.list_events(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/events/?limit=50`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst page = await resp.json();\nfor (const event of page.results) console.log(event.sent_at, event.event_type, event.step);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.listEvents(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.ListEventsAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsListEventsParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().listEvents(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->listEvents('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.list_events(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.ListEventsAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -67297,7 +77744,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -67419,7 +77866,7 @@ "/v3/session/{sessionId}/aml-screening-history/": { "get": { "summary": "List AML screening history", - "description": "List every completed ongoing-monitoring re-screen of a session's AML check, newest first by `completed_at`, including the runs where nothing changed: alerts, activity entries and webhooks fire only when a result moves, so this history is the evidence that a clean subject was still being screened. Works for KYC and KYB session IDs; pass `node_id` when the session ran more than one AML step. Only ongoing-monitoring re-screens are listed (the first screening is part of the session decision) and runs from before this history existed are not reconstructed, so a session without ongoing monitoring returns an empty list. `count` is exact up to 100 and capped at 100 above that, so follow `next` until it is `null`. A scoped API key needs `decisions: read`; see [Continuous AML monitoring](https://docs.didit.me/core-technology/aml-screening/continuous-monitoring-aml-screening).", + "description": "List every completed ongoing-monitoring re-screen of a session's AML check, newest first by `completed_at`, including the runs where nothing changed: alerts, activity entries and webhooks fire only when a result moves, so this history is the evidence that a clean subject was still being screened. Works for KYC and KYB session IDs; pass `node_id` when the session ran more than one AML step. Only ongoing-monitoring re-screens are listed (the first screening is part of the session decision) and runs from before this history existed are not reconstructed, so a session without ongoing monitoring returns an empty list. `count` is exact up to 100 and capped at 100 above that, so follow `next` until it is `null`. Pass `month` to read one calendar month at a time. A scoped API key needs `decisions: read`; see [Continuous AML monitoring](https://docs.didit.me/core-technology/aml-screening/continuous-monitoring-aml-screening).", "operationId": "get_v3_session_aml_screening_history", "x-didit-sdk": { "resource": "sessions", @@ -67452,6 +77899,17 @@ "example": "feature_aml_1" } }, + { + "name": "month", + "in": "query", + "required": false, + "description": "A UTC calendar month as `YYYY-MM`. Only screenings completed in that month are returned; without it every month is returned. A malformed month returns `400`.", + "schema": { + "type": "string", + "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", + "example": "2026-09" + } + }, { "name": "limit", "in": "query", @@ -67498,12 +77956,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/session/{session_id}/aml-screening-history/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nfor run in resp.json()['results']:\n print(run['completed_at'], run['outcome'], run['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.sessions.list_aml_screening_history(\n \"11111111-2222-3333-4444-555555555555\",\n):\n print(item)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/aml-screening-history/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Request failed: ${resp.status}`);\nconst page = await resp.json();\nfor (const run of page.results) console.log(run.completed_at, run.outcome, run.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.sessions.listAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\")) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Sessions.ListAMLScreeningHistoryAutoPaging(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsListAMLScreeningHistoryParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.sessions().listAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\")) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->listAmlScreeningHistory('11111111-2222-3333-4444-555555555555') as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.list_aml_screening_history(\"11111111-2222-3333-4444-555555555555\").auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Sessions.ListAmlScreeningHistoryAsync(\"11111111-2222-3333-4444-555555555555\"))\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -67554,6 +78037,7 @@ "results": [ { "uuid": "dddddddd-1111-2222-3333-444444444444", + "run_id": "aaaaaaaa-1111-2222-3333-444444444444", "completed_at": "2026-09-14T04:12:33.481207Z", "started_at": "2026-09-14T04:00:01.002311Z", "outcome": "NO_CHANGE", @@ -67562,6 +78046,8 @@ "status": "Approved", "score": 0.0, "total_hits": 0, + "new_hits": 0, + "entities_screened": 1, "dataset_freshness": { "captured_at": "2026-09-14T03:58:02.114820+00:00", "provider": "aml_data_source", @@ -67590,6 +78076,7 @@ }, { "uuid": "eeeeeeee-1111-2222-3333-444444444444", + "run_id": "bbbbbbbb-1111-2222-3333-444444444444", "completed_at": "2026-09-13T04:11:58.020914Z", "started_at": "2026-09-13T04:00:00.871022Z", "outcome": "FAILED", @@ -67598,6 +78085,8 @@ "status": "Approved", "score": 0.0, "total_hits": 0, + "new_hits": null, + "entities_screened": 0, "dataset_freshness": null } ] @@ -67608,7 +78097,7 @@ } }, "400": { - "description": "`limit` or `offset` is above 1,000,000. The body is a JSON array with one message.", + "description": "`limit` or `offset` is above 1,000,000 (a JSON array with one message), or `month` is not a `YYYY-MM` calendar month (an object keyed by `month`).", "content": { "application/json": { "examples": { @@ -67623,13 +78112,36 @@ "value": [ "offset must not exceed 1000000." ] + }, + "Malformed month": { + "summary": "month=2026-13", + "value": { + "month": [ + "Not a calendar month. Use YYYY-MM." + ] + } } }, "schema": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "object", + "properties": { + "month": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + ] } } } @@ -67659,7 +78171,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -67787,7 +78299,7 @@ "/v3/session/{sessionId}/aml-screening-history/export/": { "get": { "summary": "Export AML screening history as CSV", - "description": "Download the same ongoing-monitoring history as `GET /v3/session/{sessionId}/aml-screening-history/` as a CSV file, one line per completed re-screen, newest first, ready to hand to an auditor. The file is streamed whole (no pagination) and starts with a header line; an empty cell means unknown, dataset dates are never estimated, and a value that would start a spreadsheet formula is prefixed with an apostrophe. Works for KYC and KYB session IDs; pass `node_id` when the session ran more than one AML step. Errors are returned as JSON, not CSV. A scoped API key needs `decisions: read` and `media: read`: the response is a file, so a key without `media: read` gets `403`.", + "description": "Download the same ongoing-monitoring history as `GET /v3/session/{sessionId}/aml-screening-history/` as a CSV file, one line per completed re-screen, newest first, ready to hand to an auditor. The file is streamed whole (no pagination) and starts with a header line; an empty cell means unknown, dataset dates are never estimated, and a value that would start a spreadsheet formula is prefixed with an apostrophe. Works for KYC and KYB session IDs; pass `node_id` when the session ran more than one AML step. Pass `month` to export one calendar month. Errors are returned as JSON, not CSV. A scoped API key needs `decisions: read` and `media: read`: the response is a file, so a key without `media: read` gets `403`.", "operationId": "get_v3_session_aml_screening_history_export", "x-didit-sdk": { "resource": "sessions", @@ -67819,6 +78331,17 @@ "type": "string", "example": "feature_aml_1" } + }, + { + "name": "month", + "in": "query", + "required": false, + "description": "A UTC calendar month as `YYYY-MM`. Only screenings completed in that month are returned; without it every month is returned. A malformed month returns `400`.", + "schema": { + "type": "string", + "pattern": "^\\d{4}-(0[1-9]|1[0-2])$", + "example": "2026-09" + } } ], "x-codeSamples": [ @@ -67830,20 +78353,45 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '11111111-2222-3333-4444-555555555555'\nresp = requests.get(\n f'https://verification.didit.me/v3/session/{session_id}/aml-screening-history/export/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n timeout=10,\n)\nresp.raise_for_status()\nwith open('aml-screening-history.csv', 'wb') as fh:\n fh.write(resp.content)" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.sessions.export_aml_screening_history(\n \"11111111-2222-3333-4444-555555555555\",\n)\nwith open(\"download.csv\", \"wb\") as file:\n file.write(content)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { writeFile } from 'node:fs/promises';\n\nconst sessionId = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/aml-screening-history/export/`, {\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n});\nif (!resp.ok) throw new Error(`Export failed: ${resp.status}`);\nawait writeFile('aml-screening-history.csv', await resp.text());" + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.sessions.exportAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\");\nawait writeFile(\"download.csv\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Sessions.ExportAMLScreeningHistory(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsExportAMLScreeningHistoryParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.csv\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().exportAmlScreeningHistory(\"11111111-2222-3333-4444-555555555555\")\n .writeTo(Path.of(\"download.csv\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->exportAmlScreeningHistory('11111111-2222-3333-4444-555555555555');\n$content->saveTo('download.csv');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.sessions.export_aml_screening_history(\"11111111-2222-3333-4444-555555555555\")\nFile.binwrite(\"download.csv\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Sessions.ExportAmlScreeningHistoryAsync(\"11111111-2222-3333-4444-555555555555\");\nawait content.SaveToAsync(\"download.csv\");" } ], "responses": { "200": { - "description": "The CSV file, streamed as `text/csv` with CRLF line endings. Columns, in order: `screened_at` (when the re-screen finished), `outcome` (`NO_CHANGE`, `CHANGED` or `FAILED`), `provider` (opaque identifier of the AML data source; do not branch on it), `aml_status`, `aml_score`, `total_hits`, `datasets_captured_at`, `datasets_sanctions_last_updated_at`, `datasets_pep_last_updated_at`, `datasets_warnings_last_updated_at`, `datasets_adverse_media_last_updated_at` and `datasets_catalog_version`. Dates are ISO 8601 with a UTC offset. A session with no re-screens yet returns the header line only.", + "description": "The CSV file, streamed as `text/csv` with CRLF line endings. Columns, in order: `screened_at` (when the re-screen finished), `outcome` (`NO_CHANGE`, `CHANGED` or `FAILED`), `provider` (opaque identifier of the AML data source; do not branch on it), `aml_status`, `aml_score`, `total_hits`, `datasets_captured_at`, `datasets_sanctions_last_updated_at`, `datasets_pep_last_updated_at`, `datasets_warnings_last_updated_at`, `datasets_adverse_media_last_updated_at`, `datasets_catalog_version`, `run_id` (the monitoring run), `entities_screened` (`1`, or `0` for a failed run) and `new_hits` (empty when unknown). Dates are ISO 8601 with a UTC offset. A session with no re-screens yet returns the header line only.", "headers": { "Content-Disposition": { - "description": "`attachment; filename=\"aml-screening-history-{sessionId}.csv\"`.", + "description": "`attachment; filename=\"aml-screening-history-{sessionId}.csv\"`, or `aml-screening-history-{sessionId}-{month}.csv` when `month` is passed.", "schema": { "type": "string", "example": "attachment; filename=\"aml-screening-history-11111111-2222-3333-4444-555555555555.csv\"" @@ -67856,7 +78404,35 @@ "type": "string", "format": "binary" }, - "example": "screened_at,outcome,provider,aml_status,aml_score,total_hits,datasets_captured_at,datasets_sanctions_last_updated_at,datasets_pep_last_updated_at,datasets_warnings_last_updated_at,datasets_adverse_media_last_updated_at,datasets_catalog_version\r\n2026-09-14T04:12:33.481207+00:00,NO_CHANGE,aml_data_source,Approved,0.0,0,2026-09-14T03:58:02.114820+00:00,2026-09-13T21:10:00+00:00,2026-09-13T08:00:00+00:00,2026-09-12T18:45:00+00:00,,2026-09-13\r\n2026-09-13T04:11:58.020914+00:00,FAILED,aml_data_source,Approved,0.0,0,,,,,,\r\n" + "example": "screened_at,outcome,provider,aml_status,aml_score,total_hits,datasets_captured_at,datasets_sanctions_last_updated_at,datasets_pep_last_updated_at,datasets_warnings_last_updated_at,datasets_adverse_media_last_updated_at,datasets_catalog_version,run_id,entities_screened,new_hits\r\n2026-09-14T04:12:33.481207+00:00,NO_CHANGE,aml_data_source,Approved,0.0,0,2026-09-14T03:58:02.114820+00:00,2026-09-13T21:10:00+00:00,2026-09-13T08:00:00+00:00,2026-09-12T18:45:00+00:00,,2026-09-13,aaaaaaaa-1111-2222-3333-444444444444,1,0\r\n2026-09-13T04:11:58.020914+00:00,FAILED,aml_data_source,Approved,0.0,0,,,,,,,bbbbbbbb-1111-2222-3333-444444444444,0,\r\n" + } + } + }, + "400": { + "description": "`month` is not a `YYYY-MM` calendar month.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "month": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "examples": { + "Malformed month": { + "summary": "month=2026-13", + "value": { + "month": [ + "Not a calendar month. Use YYYY-MM." + ] + } + } + } } } }, @@ -67885,7 +78461,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -68090,12 +78666,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '11111111-2222-3333-4444-555555555555'\nwith open('back-of-id.jpg', 'rb') as fh:\n resp = requests.patch(\n f'https://verification.didit.me/v3/session/{session_id}/add-images/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n files={'file': ('back-of-id.jpg', fh, 'image/jpeg')},\n data={'model_type': 'kyc'},\n timeout=10,\n )\nresp.raise_for_status()\nprint(resp.json()['extra_files'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.add_images(\n \"11111111-2222-3333-4444-555555555555\",\n file=open(\"image.jpg\", \"rb\"),\n model_type=\"kyc\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "import { readFile } from 'node:fs/promises';\n\nconst sessionId = '11111111-2222-3333-4444-555555555555';\nconst form = new FormData();\nform.append('file', new Blob([await readFile('./back-of-id.jpg')], { type: 'image/jpeg' }), 'back-of-id.jpg');\nform.append('model_type', 'kyc');\n\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/add-images/`, {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY },\n body: form,\n});\nif (!resp.ok) throw new Error(`Upload failed: ${resp.status}`);\nconst { extra_files: extraFiles } = await resp.json();\nconsole.log(extraFiles);" + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.addImages(\"11111111-2222-3333-4444-555555555555\", {\n file: await fileFromPath(\"image.jpg\"),\n model_type: \"kyc\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.AddImages(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsAddImagesParams{\n\tFile: didit.FileFromPath(\"image.jpg\"),\n\tModelType: \"kyc\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.SessionsAddImagesParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().addImages(\"11111111-2222-3333-4444-555555555555\", SessionsAddImagesParams.builder()\n .file(Path.of(\"image.jpg\"))\n .modelType(SessionsAddImagesParams.ModelType.of(\"kyc\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->addImages('11111111-2222-3333-4444-555555555555', [\n 'file' => File::fromPath('image.jpg'),\n 'model_type' => 'kyc',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.add_images(\n \"11111111-2222-3333-4444-555555555555\",\n file: Pathname(\"image.jpg\"),\n model_type: \"kyc\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.AddImagesAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsAddImagesParams\n{\n File = FileUpload.FromPath(\"image.jpg\"),\n ModelType = \"kyc\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -68214,7 +78815,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -68426,12 +79027,37 @@ { "lang": "python", "label": "Python", - "source": "import os\n\nimport requests\n\nsession_id = '11111111-2222-3333-4444-555555555555'\nresp = requests.patch(\n f'https://verification.didit.me/v3/session/{session_id}/update-aml-status/',\n headers={'x-api-key': os.environ['DIDIT_API_KEY']},\n json={'status': 'Approved'},\n timeout=10,\n)\nresp.raise_for_status()\nbody = resp.json()\nprint(body['previous_status'], '->', body['status'])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_aml_status(\n \"11111111-2222-3333-4444-555555555555\",\n status=\"Approved\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const sessionId = '11111111-2222-3333-4444-555555555555';\nconst resp = await fetch(`https://verification.didit.me/v3/session/${sessionId}/update-aml-status/`, {\n method: 'PATCH',\n headers: { 'x-api-key': process.env.DIDIT_API_KEY, 'Content-Type': 'application/json' },\n body: JSON.stringify({ status: 'Approved' }),\n});\nif (!resp.ok) throw new Error(`Update failed: ${resp.status}`);\nconst body = await resp.json();\nconsole.log(body.previous_status, '->', body.status);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateAmlStatus(\"11111111-2222-3333-4444-555555555555\", {\n status: \"Approved\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateAMLStatus(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsUpdateAMLStatusParams{\n\tStatus: \"Approved\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateAmlStatusParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateAmlStatus(\"11111111-2222-3333-4444-555555555555\", SessionsUpdateAmlStatusParams.builder()\n .status(SessionsUpdateAmlStatusParams.Status.of(\"Approved\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateAmlStatus('11111111-2222-3333-4444-555555555555', [\n 'status' => 'Approved',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_aml_status(\n \"11111111-2222-3333-4444-555555555555\",\n status: \"Approved\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateAmlStatusAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsUpdateAmlStatusParams\n{\n Status = \"Approved\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -68533,7 +79159,7 @@ } }, "403": { - "description": "Authentication or authorization failure. Missing, invalid and revoked keys return `403` (not `401`); so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist. Distinguish them by `detail`.", + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", "content": { "application/json": { "schema": { @@ -68862,7 +79488,7 @@ "/v3/organization/bank-verification-pricing/": { "get": { "summary": "Get bank verification prices (public, unauthenticated)", - "description": "Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product.\n\nPublic: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified` when nothing changed.\n\nA method is `available` only where Didit serves it in production today, and its `price_usd` is `null` everywhere else, so the feed never shows a price you cannot buy. `available: false` covers a country with no approved price, a method the country does not support, and a route that is not switched on yet.\n\nThese are list prices before your plan discount. Your plan discount applies to the whole bank price, and a negotiated or contract price replaces the list price for your organization.", + "description": "Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. Bank Verification is not enabled in production yet, so a bank step is refused on production workflows until it is; treat these prices as a list price, not as an offer you can buy today. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product.\n\nPublic: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an `ETag`, so send `If-None-Match` to get a `304 Not Modified` when nothing changed.\n\nA method is `available` only where Didit serves it in production today, and its `price_usd` is `null` everywhere else, so the feed never shows a price you cannot buy. `available: false` covers a country with no approved price, a method the country does not support, and a route that is not switched on yet.\n\nThese are list prices before your plan discount. Your plan discount applies to the whole bank price, and a negotiated or contract price replaces the list price for your organization.", "operationId": "get_v3_bank_verification_pricing", "tags": [ "Pricing" @@ -68880,12 +79506,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresp = requests.get('https://verification.didit.me/v3/organization/bank-verification-pricing/', timeout=10)\nresp.raise_for_status()\nfeed = resp.json()\nfor iso3, country in feed['countries'].items():\n sign_in = country['methods']['open_banking']\n if sign_in['available']:\n print(iso3, country['name'], sign_in['price_usd'])" + "source": "from didit import Didit\n\n# This call needs no API key.\nclient = Didit()\n\nresult = client.pricing.bank_verification()\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const feed = await fetch('https://verification.didit.me/v3/organization/bank-verification-pricing/').then((r) => r.json());\nconst gbr = feed.countries.GBR.methods;\nconsole.log(gbr.open_banking.available ? gbr.open_banking.price_usd : 'Not available');\nconsole.log(gbr.account_lookup.available ? gbr.account_lookup.price_usd : 'Not available');" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// This call needs no API key.\nconst didit = new Didit();\n\nconst result = await didit.pricing.bankVerification();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// This call needs no API key.\nclient := didit.NewClient()\n\nresult, err := client.Pricing.BankVerification(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// This call needs no API key.\nDidit client = new Didit();\n\nvar result = client.pricing().bankVerification();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "pricing->bankVerification();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# This call needs no API key.\ndidit = Didit::Client.new\n\nresult = didit.pricing.bank_verification\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// This call needs no API key.\nusing var client = new DiditClient();\n\nvar result = await client.Pricing.BankVerificationAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-sdk": { @@ -69098,7 +79749,7 @@ } }, "403": { - "description": "Missing or invalid credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", + "description": "Missing credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", "content": { "application/json": { "examples": { @@ -69149,7 +79800,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/simulate/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json={\"scenario\": \"decline_aml_hit\", \"send_webhooks\": False},\n)\nresponse.raise_for_status()\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.simulate(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n scenario=\"decline_aml_hit\",\n send_webhooks=False,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.simulate(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n scenario: \"decline_aml_hit\",\n send_webhooks: false,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Simulate(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.SandboxSimulateRequest{\n\tScenario: didit.String(\"decline_aml_hit\"),\n\tSendWebhooks: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SandboxSimulateRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().simulate(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", SandboxSimulateRequest.builder()\n .scenario(\"decline_aml_hit\")\n .sendWebhooks(false)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->simulate('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n 'scenario' => 'decline_aml_hit',\n 'send_webhooks' => false,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.simulate(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n scenario: \"decline_aml_hit\",\n send_webhooks: false\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.SimulateAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new SandboxSimulateRequest\n{\n Scenario = \"decline_aml_hit\",\n SendWebhooks = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-sdk": { @@ -69470,7 +80151,7 @@ } }, "403": { - "description": "Missing or invalid credentials, a caller without the `read:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", + "description": "Missing credentials, a caller without the `read:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", "content": { "application/json": { "examples": { @@ -69521,7 +80202,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.get(\n \"https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/features/overrides/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n)\nresponse.raise_for_status()\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.list_feature_overrides(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listFeatureOverrides(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListFeatureOverrides(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().listFeatureOverrides(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->listFeatureOverrides('3fa85f64-5717-4562-b3fc-2c963f66afa6');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_feature_overrides(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListFeatureOverridesAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-sdk": { @@ -69621,7 +80332,7 @@ } }, "403": { - "description": "Missing or invalid credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", + "description": "Missing credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", "content": { "application/json": { "examples": { @@ -69694,7 +80405,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/features/overrides/9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3/cancel/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n)\nresponse.raise_for_status()\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.cancel_feature_override(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.cancelFeatureOverride(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.CancelFeatureOverride(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().cancelFeatureOverride(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->cancelFeatureOverride('3fa85f64-5717-4562-b3fc-2c963f66afa6', '9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.cancel_feature_override(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.CancelFeatureOverrideAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", \"9b2f4c1e-8d3a-4e5f-a6b7-c8d9e0f1a2b3\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-sdk": { @@ -69769,6 +80510,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/3fa85f64-5717-4562-b3fc-2c963f66afa6/tags/add/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"tag_uuid\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.add_tag(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n tag_uuid=\"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.addTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.AddTag(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.NetworkTagRequest{\n\tTagUUID: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.NetworkTagRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().addTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", NetworkTagRequest.builder()\n .tagUuid(\"7c9e6679-7425-40de-944b-e07fc1f90ae7\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->addTag('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n 'tag_uuid' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.add_tag(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.AddTagAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new NetworkTagRequest\n{\n TagUuid = \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -70248,6 +81024,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/networks/3fa85f64-5717-4562-b3fc-2c963f66afa6/tags/remove/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"tag_uuid\": \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.networks.remove_tag(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n tag_uuid=\"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.networks.removeTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Networks.RemoveTag(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.NetworkTagRequest{\n\tTagUUID: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.NetworkTagRequest;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.networks().removeTag(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", NetworkTagRequest.builder()\n .tagUuid(\"7c9e6679-7425-40de-944b-e07fc1f90ae7\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "networks->removeTag('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n 'tag_uuid' => '7c9e6679-7425-40de-944b-e07fc1f90ae7',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.networks.remove_tag(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n tag_uuid: \"7c9e6679-7425-40de-944b-e07fc1f90ae7\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Networks.RemoveTagAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new NetworkTagRequest\n{\n TagUuid = \"7c9e6679-7425-40de-944b-e07fc1f90ae7\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -70582,6 +81393,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/cases/c1a5e000-0000-4000-8000-000000000001/requests/3fa85f64-5717-4562-b3fc-2c963f66afa6/remind/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nresult = client.cases.requests.remind(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nconst result = await didit.cases.requests.remind(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nclient := didit.NewClient()\n\nresult, err := client.Cases.Requests.Remind(ctx, \"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nvar result = client.cases().requests().remind(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "cases->requests->remind('11111111-2222-3333-4444-555555555555', '11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\nresult = didit.cases.requests.remind(\n \"11111111-2222-3333-4444-555555555555\",\n \"11111111-2222-3333-4444-555555555555\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nvar result = await client.Cases.Requests.RemindAsync(\"11111111-2222-3333-4444-555555555555\", \"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -70856,6 +81702,7 @@ "sender_kind", "subject", "html", + "text", "language", "will_be_sent", "not_sent_reason", @@ -70912,6 +81759,11 @@ "description": "The email's HTML exactly as it is sent, with its logo embedded as a data URL. Render it in a sandboxed frame, never directly in your application DOM.", "example": "..." }, + "text": { + "type": "string", + "description": "The email's words as plain text, as the person's Messages thread keeps them, for a compact preview (the HTML stays the email the person receives).", + "example": "Verification Approved\n\nYour identity has been successfully verified with Acme Pay. No further action is needed on your part." + }, "language": { "type": "string", "description": "The language the email is written in. English (`en`) when the `email_language` you asked for is not offered.", @@ -71028,7 +81880,7 @@ } }, "403": { - "description": "Missing or invalid credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", + "description": "Missing credentials, a caller without the `write:sessions` privilege, a scoped API key without the access this endpoint needs, or a `session_id` that belongs to another application.", "content": { "application/json": { "examples": { @@ -71079,7 +81931,37 @@ { "lang": "python", "label": "Python", - "source": "import requests\n\nresponse = requests.post(\n \"https://verification.didit.me/v3/session/3fa85f64-5717-4562-b3fc-2c963f66afa6/decision-email-preview/\",\n headers={\"x-api-key\": \"YOUR_API_KEY\"},\n json={\"new_status\": \"Approved\", \"email_language\": \"en\"},\n)\nresponse.raise_for_status()\nprint(response.json())" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.preview_decision_email(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n new_status=\"Approved\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.previewDecisionEmail(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", {\n new_status: \"Approved\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.PreviewDecisionEmail(ctx, \"3fa85f64-5717-4562-b3fc-2c963f66afa6\", didit.SessionsPreviewDecisionEmailParams{\n\tNewStatus: \"Approved\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsPreviewDecisionEmailParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().previewDecisionEmail(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", SessionsPreviewDecisionEmailParams.builder()\n .newStatus(SessionsPreviewDecisionEmailParams.NewStatus.of(\"Approved\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->previewDecisionEmail('3fa85f64-5717-4562-b3fc-2c963f66afa6', [\n 'new_status' => 'Approved',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.preview_decision_email(\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n new_status: \"Approved\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.PreviewDecisionEmailAsync(\"3fa85f64-5717-4562-b3fc-2c963f66afa6\", new SessionsPreviewDecisionEmailParams\n{\n NewStatus = \"Approved\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "x-didit-sdk": { @@ -71328,6 +82210,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/workspace/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.get()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.get();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.Get(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().get();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->workspace->get();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.get\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.GetAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -71384,6 +82301,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/claim/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"vasp_id\": \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.claim(\n vasp_id=\"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.claim({\n vasp_id: \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.Claim(ctx, didit.TravelRuleWorkspaceClaimRequest{\n\tVASPID: \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWorkspaceClaimRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().claim(TravelRuleWorkspaceClaimRequest.builder()\n .vaspId(\"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->workspace->claim([\n 'vasp_id' => '0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.claim(vasp_id: \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.ClaimAsync(new TravelRuleWorkspaceClaimRequest\n{\n VaspId = \"0b0c9d3e-5a53-4a3e-9d6e-1f2f6f6a1c11\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -71430,6 +82382,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/domain/code/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.send_domain_code()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.sendDomainCode();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.SendDomainCode(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().sendDomainCode();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->workspace->sendDomainCode();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.send_domain_code\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.SendDomainCodeAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -71486,6 +82473,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/domain/confirm/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"code\": \"123456\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.confirm_domain(\n code=\"123456\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.confirmDomain({\n code: \"123456\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.ConfirmDomain(ctx, didit.TravelRuleWorkspaceDomainConfirmRequest{\n\tCode: \"123456\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWorkspaceDomainConfirmRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().confirmDomain(TravelRuleWorkspaceDomainConfirmRequest.builder()\n .code(\"123456\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->workspace->confirmDomain([\n 'code' => '123456',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.confirm_domain(code: \"123456\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.ConfirmDomainAsync(new TravelRuleWorkspaceDomainConfirmRequest\n{\n Code = \"123456\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -71532,6 +82554,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/domain/dns/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.verify_domain_dns()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.verifyDomainDns();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.VerifyDomainDNS(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().verifyDomainDns();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->workspace->verifyDomainDns();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.verify_domain_dns\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.VerifyDomainDnsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -71591,6 +82648,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/workspace/billing/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"enabled\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.workspace.enable_billing(\n enabled=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.workspace.enableBilling({\n enabled: true,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.Workspace.EnableBilling(ctx, didit.TravelRuleWorkspaceBillingRequest{\n\tEnabled: didit.Bool(true),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWorkspaceBillingRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().workspace().enableBilling(TravelRuleWorkspaceBillingRequest.builder()\n .enabled(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->workspace->enableBilling([\n 'enabled' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.workspace.enable_billing(enabled: true)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Workspace.EnableBillingAsync(new TravelRuleWorkspaceBillingRequest\n{\n Enabled = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -71703,7 +82795,44 @@ "method": "retrieve_summary", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_summary()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveSummary();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveSummary(ctx, didit.InvestigatorRetrieveSummaryParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveSummary();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->retrieveSummary();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_summary\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveSummaryAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/queue/": { @@ -71857,7 +82986,44 @@ "method": "list_queue", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.investigator.list_queue():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.investigator.listQueue()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Investigator.ListQueueAutoPaging(ctx, didit.InvestigatorListQueueParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.investigator().listQueue()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->listQueue() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.investigator.list_queue.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Investigator.ListQueueAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } + ] } }, "/v3/investigator/runs/{run_id}/": { @@ -71910,7 +83076,44 @@ "method": "retrieve_run", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_run(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveRun(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveRun(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveRun(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->retrieveRun('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_run(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveRunAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/runs/{run_id}/accept/": { @@ -71964,6 +83167,9 @@ "application/json": { "schema": { "$ref": "#/components/schemas/InvestigatorAcceptRequest" + }, + "example": { + "send_email": false } } } @@ -71973,7 +83179,44 @@ "method": "accept_run", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.accept_run(\n \"11111111-2222-3333-4444-555555555555\",\n send_email=False,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.acceptRun(\"11111111-2222-3333-4444-555555555555\", {\n send_email: false,\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.AcceptRun(ctx, \"11111111-2222-3333-4444-555555555555\", didit.InvestigatorAcceptRequest{\n\tSendEmail: didit.Bool(false),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.InvestigatorAcceptRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().acceptRun(\"11111111-2222-3333-4444-555555555555\", InvestigatorAcceptRequest.builder()\n .sendEmail(false)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->acceptRun('11111111-2222-3333-4444-555555555555', [\n 'send_email' => false,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.accept_run(\n \"11111111-2222-3333-4444-555555555555\",\n send_email: false\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.AcceptRunAsync(\"11111111-2222-3333-4444-555555555555\", new InvestigatorAcceptRequest\n{\n SendEmail = false,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/runs/{run_id}/override/": { @@ -72027,6 +83270,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/InvestigatorOverrideRequest" + }, + "example": { + "action": "decline", + "category": "evidence_misread", + "reason": "The proof of address is older than three months." } } } @@ -72036,7 +83284,44 @@ "method": "override_run", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.override_run(\n \"11111111-2222-3333-4444-555555555555\",\n action=\"decline\",\n category=\"evidence_misread\",\n reason=\"The proof of address is older than three months.\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.overrideRun(\"11111111-2222-3333-4444-555555555555\", {\n action: \"decline\",\n category: \"evidence_misread\",\n reason: \"The proof of address is older than three months.\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.OverrideRun(ctx, \"11111111-2222-3333-4444-555555555555\", didit.InvestigatorOverrideRequest{\n\tAction: \"decline\",\n\tCategory: \"evidence_misread\",\n\tReason: \"The proof of address is older than three months.\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.InvestigatorOverrideRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().overrideRun(\"11111111-2222-3333-4444-555555555555\", InvestigatorOverrideRequest.builder()\n .action(InvestigatorOverrideRequest.Action.of(\"decline\"))\n .category(InvestigatorOverrideRequest.Category.of(\"evidence_misread\"))\n .reason(\"The proof of address is older than three months.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->overrideRun('11111111-2222-3333-4444-555555555555', [\n 'action' => 'decline',\n 'category' => 'evidence_misread',\n 'reason' => 'The proof of address is older than three months.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.override_run(\n \"11111111-2222-3333-4444-555555555555\",\n action: \"decline\",\n category: \"evidence_misread\",\n reason: \"The proof of address is older than three months.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.OverrideRunAsync(\"11111111-2222-3333-4444-555555555555\", new InvestigatorOverrideRequest\n{\n Action = \"decline\",\n Category = \"evidence_misread\",\n Reason = \"The proof of address is older than three months.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/runs/batch-accept/": { @@ -72085,7 +83370,44 @@ "method": "batch_accept_runs", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.batch_accept_runs(\n run_ids=[\"11111111-2222-3333-4444-555555555555\"],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.batchAcceptRuns({\n run_ids: [\"11111111-2222-3333-4444-555555555555\"],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.BatchAcceptRuns(ctx, didit.InvestigatorBatchAcceptRequest{\n\tRunIDs: []string{\"11111111-2222-3333-4444-555555555555\"},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.InvestigatorBatchAcceptRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().batchAcceptRuns(InvestigatorBatchAcceptRequest.builder()\n .runIds(List.of(\"11111111-2222-3333-4444-555555555555\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->batchAcceptRuns([\n 'run_ids' => ['11111111-2222-3333-4444-555555555555'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.batch_accept_runs(run_ids: [\"11111111-2222-3333-4444-555555555555\"])\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.BatchAcceptRunsAsync(new InvestigatorBatchAcceptRequest\n{\n RunIds = new string[] { \"11111111-2222-3333-4444-555555555555\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/transactions/{transaction_id}/": { @@ -72147,7 +83469,44 @@ "method": "retrieve_transaction", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_transaction(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveTransaction(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveTransaction(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveTransaction(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->retrieveTransaction('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_transaction(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveTransactionAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/guardrails/": { @@ -72215,7 +83574,44 @@ "method": "list_guardrails", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.list_guardrails()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.listGuardrails();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.ListGuardrails(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().listGuardrails();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->listGuardrails();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.list_guardrails\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.ListGuardrailsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/dashboard/": { @@ -72296,7 +83692,44 @@ "method": "retrieve_dashboard", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_dashboard()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveDashboard();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveDashboard(ctx, didit.InvestigatorRetrieveDashboardParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveDashboard();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->retrieveDashboard();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_dashboard\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveDashboardAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/performance/": { @@ -72382,7 +83815,44 @@ "method": "retrieve_performance", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_performance()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrievePerformance();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrievePerformance(ctx, didit.InvestigatorRetrievePerformanceParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrievePerformance();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->retrievePerformance();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_performance\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrievePerformanceAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/investigator/activity/": { @@ -72517,7 +83987,44 @@ "method": "list_activity", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.investigator.list_activity():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.investigator.listActivity()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.Investigator.ListActivityAutoPaging(ctx, didit.InvestigatorListActivityParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.investigator().listActivity()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->listActivity() as $item) {\n print_r($item);\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.investigator.list_activity.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.Investigator.ListActivityAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } + ] } }, "/v3/investigator/activity/export/": { @@ -72609,7 +84116,44 @@ "method": "export_activity", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\ncontent = client.investigator.export_activity()\nwith open(\"download.csv\", \"wb\") as file:\n file.write(content)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import { writeFile } from \"node:fs/promises\";\nimport Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst content = await didit.investigator.exportActivity();\nawait writeFile(\"download.csv\", Buffer.from(await content.arrayBuffer()));" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresp, err := client.Investigator.ExportActivity(ctx, didit.InvestigatorExportActivityParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer resp.Body.Close()\nfile, err := os.Create(\"download.csv\")\nif err != nil {\n\tlog.Fatal(err)\n}\ndefer file.Close()\nif _, err := io.Copy(file, resp.Body); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.investigator().exportActivity()\n .writeTo(Path.of(\"download.csv\"));" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->exportActivity();\n$content->saveTo('download.csv');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ncontent = didit.investigator.export_activity\nFile.binwrite(\"download.csv\", content)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar content = await client.Investigator.ExportActivityAsync();\nawait content.SaveToAsync(\"download.csv\");" + } + ] } }, "/v3/investigator/settings/": { @@ -72648,7 +84192,44 @@ "method": "retrieve_settings", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.retrieve_settings()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.retrieveSettings();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.RetrieveSettings(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().retrieveSettings();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->retrieveSettings();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.retrieve_settings\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.RetrieveSettingsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] }, "patch": { "operationId": "investigator_settings_update", @@ -72689,6 +84270,10 @@ "application/json": { "schema": { "$ref": "#/components/schemas/InvestigatorSettings" + }, + "example": { + "stage": "shadow", + "monthly_spend_limit": "500.00" } } } @@ -72698,7 +84283,44 @@ "method": "update_settings", "auth": "api_key", "server": true - } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.investigator.update_settings(\n stage=\"shadow\",\n monthly_spend_limit=\"500.00\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.investigator.updateSettings({\n stage: \"shadow\",\n monthly_spend_limit: \"500.00\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Investigator.UpdateSettings(ctx, didit.InvestigatorSettingsParam{\n\tStage: didit.Some(didit.InvestigatorSettingsStage(\"shadow\")),\n\tMonthlySpendLimit: didit.String(\"500.00\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.InvestigatorSettings;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.investigator().updateSettings(InvestigatorSettings.builder()\n .stage(InvestigatorSettings.Stage.of(\"shadow\"))\n .monthlySpendLimit(\"500.00\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "investigator->updateSettings([\n 'stage' => 'shadow',\n 'monthly_spend_limit' => '500.00',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.investigator.update_settings(\n stage: \"shadow\",\n monthly_spend_limit: \"500.00\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Investigator.UpdateSettingsAsync(new InvestigatorSettings\n{\n Stage = new InvestigatorSettingsStage(\"shadow\"),\n MonthlySpendLimit = \"500.00\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] } }, "/v3/travel-rule/wallet-addresses/import/": { @@ -72801,6 +84423,41 @@ "lang": "curl", "label": "curl (CSV)", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-addresses/import/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -F 'file=@wallets.csv;type=text/csv'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_addresses.bulk_import(\n body={\n \"entries\": [{\n \"address\": \"0xBeneficiaryWallet01\",\n \"chain\": \"ETH\",\n \"holder_name\": \"Ana Diaz\",\n \"holder_vendor_data\": \"user-042\",\n }, {\n \"address_hash\": \"4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e\",\n \"chain\": \"bitcoin\",\n \"holder_vendor_data\": \"user-043\",\n }, {\n \"address\": \"rExchangeSharedAddress01\",\n \"chain\": \"XRP\",\n \"memo\": \"104729\",\n \"holder_name\": \"Ana Diaz\",\n }],\n },\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletAddresses.bulkImport({\n file: await fileFromPath(\"wallet-addresses.csv\"),\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.WalletAddresses.BulkImport(ctx, didit.TravelRuleWalletAddressesBulkImportParams{\n\tFile: didit.Some(didit.FileFromPath(\"wallet-addresses.csv\")),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport me.didit.Didit;\nimport me.didit.types.TravelRuleWalletAddressesBulkImportParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletAddresses().bulkImport(TravelRuleWalletAddressesBulkImportParams.builder()\n .file(Path.of(\"wallet-addresses.csv\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletAddresses->bulkImport([\n 'file' => File::fromPath('wallet-addresses.csv'),\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_addresses.bulk_import(\n body: {\n entries: [{\n address: \"0xBeneficiaryWallet01\",\n chain: \"ETH\",\n holder_name: \"Ana Diaz\",\n holder_vendor_data: \"user-042\",\n }, {\n address_hash: \"4f7d2e1c9b8a7f6e5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e\",\n chain: \"bitcoin\",\n holder_vendor_data: \"user-043\",\n }, {\n address: \"rExchangeSharedAddress01\",\n chain: \"XRP\",\n memo: \"104729\",\n holder_name: \"Ana Diaz\",\n }],\n }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletAddresses.BulkImportAsync(new TravelRuleWalletAddressesBulkImportParams\n{\n File = FileUpload.FromPath(\"wallet-addresses.csv\"),\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -72954,6 +84611,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/travel-rule/counterparty-contacts/?counterparty={vasp_id}' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.counterparty_contacts.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.counterpartyContacts.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.CounterpartyContacts.ListAutoPaging(ctx, didit.TravelRuleCounterpartyContactsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().counterpartyContacts().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->counterpartyContacts->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.counterparty_contacts.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.CounterpartyContacts.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -73061,6 +84753,41 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/counterparty-contacts/ \\\n -H 'x-api-key: YOUR_API_KEY' -H 'Content-Type: application/json' \\\n -d '{\"counterparty\": \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\", \"email\": \"compliance@counterparty.example\", \"name\": \"Compliance desk\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.counterparty_contacts.create(\n counterparty=\"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n email=\"compliance@counterparty.example\",\n name=\"Compliance desk\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.counterpartyContacts.create({\n counterparty: \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n email: \"compliance@counterparty.example\",\n name: \"Compliance desk\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.CounterpartyContacts.Create(ctx, didit.TravelRuleCounterpartyContactCreate{\n\tCounterparty: \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n\tEmail: \"compliance@counterparty.example\",\n\tName: didit.String(\"Compliance desk\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleCounterpartyContactCreate;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().counterpartyContacts().create(TravelRuleCounterpartyContactCreate.builder()\n .counterparty(\"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\")\n .email(\"compliance@counterparty.example\")\n .name(\"Compliance desk\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->counterpartyContacts->create([\n 'counterparty' => '0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91',\n 'email' => 'compliance@counterparty.example',\n 'name' => 'Compliance desk',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.counterparty_contacts.create(\n counterparty: \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n email: \"compliance@counterparty.example\",\n name: \"Compliance desk\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.CounterpartyContacts.CreateAsync(new TravelRuleCounterpartyContactCreate\n{\n Counterparty = \"0d6f3c2a-6a1e-4c55-9a39-1f2b0c7d8e91\",\n Email = \"compliance@counterparty.example\",\n Name = \"Compliance desk\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -73140,6 +84867,41 @@ "lang": "curl", "label": "curl", "source": "curl -X DELETE https://verification.didit.me/v3/travel-rule/counterparty-contacts/{contact_uuid}/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.travel_rule.counterparty_contacts.delete(\n \"11111111-2222-3333-4444-555555555555\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.travelRule.counterpartyContacts.delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.TravelRule.CounterpartyContacts.Delete(ctx, \"11111111-2222-3333-4444-555555555555\"); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.travelRule().counterpartyContacts().delete(\"11111111-2222-3333-4444-555555555555\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->counterpartyContacts->delete('11111111-2222-3333-4444-555555555555');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.counterparty_contacts.delete(\"11111111-2222-3333-4444-555555555555\")" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.TravelRule.CounterpartyContacts.DeleteAsync(\"11111111-2222-3333-4444-555555555555\");" } ], "responses": { @@ -73273,6 +85035,41 @@ "lang": "curl", "label": "curl", "source": "curl -X GET 'https://verification.didit.me/v3/travel-rule/transfers/?direction=OUTBOUND&status=AWAITING_COUNTERPARTY' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.transfers.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.transfers.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.Transfers.ListAutoPaging(ctx, didit.TravelRuleTransfersListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().transfers().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->transfers->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.transfers.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.Transfers.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -73414,6 +85211,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.list_providers()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.listProviders();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.ListProviders(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().listProviders();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->listProviders();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.list_providers\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ListProvidersAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -73487,6 +85321,13 @@ "provider", "credentials" ] + }, + "example": { + "provider": "sumsub", + "credentials": { + "app_token": "YOUR_PROVIDER_APP_TOKEN", + "secret_key": "YOUR_PROVIDER_SECRET_KEY" + } } } } @@ -73536,6 +85377,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.check_provider(\n provider=\"sumsub\",\n credentials={\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.checkProvider({\n provider: \"sumsub\",\n credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.CheckProvider(ctx, didit.SessionsImportsCheckProviderParams{\n\tProvider: \"sumsub\",\n\tCredentials: map[string]string{\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsImportsCheckProviderParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().checkProvider(SessionsImportsCheckProviderParams.builder()\n .provider(SessionsImportsCheckProviderParams.Provider.of(\"sumsub\"))\n .credentials(Map.of(\"app_token\", \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\", \"YOUR_PROVIDER_SECRET_KEY\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->checkProvider([\n 'provider' => 'sumsub',\n 'credentials' => ['app_token' => 'YOUR_PROVIDER_APP_TOKEN', 'secret_key' => 'YOUR_PROVIDER_SECRET_KEY'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.check_provider(\n provider: \"sumsub\",\n credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.CheckProviderAsync(new SessionsImportsCheckProviderParams\n{\n Provider = \"sumsub\",\n Credentials = new Dictionary { [\"app_token\"] = \"YOUR_PROVIDER_APP_TOKEN\", [\"secret_key\"] = \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -73634,6 +85512,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.start(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.start(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Start(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsImportsStartParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().start(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->start('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.start(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.StartAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -73695,6 +85610,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.pause(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.pause(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Pause(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().pause(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->pause('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.pause(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.PauseAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -73756,6 +85708,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.resume(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.resume(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Resume(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().resume(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->resume('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.resume(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ResumeAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -73817,6 +85806,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.cancel(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.cancel(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Cancel(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().cancel(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->cancel('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.cancel(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.CancelAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -73865,6 +85891,12 @@ "description": "The record IDs or export file again, for `api_ids` and `export_file` providers." } } + }, + "example": { + "credentials": { + "app_token": "YOUR_PROVIDER_APP_TOKEN", + "secret_key": "YOUR_PROVIDER_SECRET_KEY" + } } } } @@ -73902,6 +85934,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.retry(\n \"11111111-2222-3333-4444-555555555555\",\n credentials={\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"},\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.retry(\"11111111-2222-3333-4444-555555555555\", {\n credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.Retry(ctx, \"11111111-2222-3333-4444-555555555555\", didit.SessionsImportsRetryParams{\n\tCredentials: didit.Some(map[string]string{\"app_token\": \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\": \"YOUR_PROVIDER_SECRET_KEY\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.Map;\nimport me.didit.Didit;\nimport me.didit.types.SessionsImportsRetryParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().retry(\"11111111-2222-3333-4444-555555555555\", SessionsImportsRetryParams.builder()\n .credentials(Map.of(\"app_token\", \"YOUR_PROVIDER_APP_TOKEN\", \"secret_key\", \"YOUR_PROVIDER_SECRET_KEY\"))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->retry('11111111-2222-3333-4444-555555555555', [\n 'credentials' => ['app_token' => 'YOUR_PROVIDER_APP_TOKEN', 'secret_key' => 'YOUR_PROVIDER_SECRET_KEY'],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.retry(\n \"11111111-2222-3333-4444-555555555555\",\n credentials: { app_token: \"YOUR_PROVIDER_APP_TOKEN\", secret_key: \"YOUR_PROVIDER_SECRET_KEY\" }\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Collections.Generic;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.RetryAsync(\"11111111-2222-3333-4444-555555555555\", new SessionsImportsRetryParams\n{\n Credentials = new Dictionary { [\"app_token\"] = \"YOUR_PROVIDER_APP_TOKEN\", [\"secret_key\"] = \"YOUR_PROVIDER_SECRET_KEY\" },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -74000,6 +86069,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.list_jobs()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.listJobs();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.ListJobs(ctx, didit.SessionsImportsListJobsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().listJobs();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->listJobs();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.list_jobs\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ListJobsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -74058,6 +86164,43 @@ { "ApiKeyAuth": [] } + ], + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.imports.list_active_jobs()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.imports.listActiveJobs();\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.Imports.ListActiveJobs(ctx)\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().imports().listActiveJobs();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->imports->listActiveJobs();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.imports.list_active_jobs\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.Imports.ListActiveJobsAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } ] } }, @@ -74178,6 +86321,36 @@ "lang": "curl", "label": "curl (selected transactions)", "source": "curl -X DELETE 'https://verification.didit.me/v3/organization/11111111-2222-3333-4444-555555555555/application/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/transactions/delete/' \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"transaction_uuids\": [\"abcdef12-3456-7890-abcd-ef1234567890\"]}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\nclient = Didit()\n\nclient.transactions.batch_delete(\n body={\n \"transaction_uuids\": [\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"],\n },\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nconst didit = new Didit();\n\nawait didit.transactions.batchDelete({\n transaction_uuids: [\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"],\n});" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.TransactionsBatchDeleteParams;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nDidit client = new Didit();\n\nclient.transactions().batchDelete(TransactionsBatchDeleteParams.builder()\n .putAdditionalProperty(\"transaction_uuids\", List.of(\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"))\n .build());" + }, + { + "lang": "php", + "label": "PHP", + "source": "transactions->batchDelete([\n 'transaction_uuids' => ['abcdef12-3456-7890-abcd-ef1234567890', '12345678-90ab-cdef-1234-567890abcdef'],\n]);" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n# and DIDIT_APPLICATION_ID.\ndidit = Didit::Client.new\n\ndidit.transactions.batch_delete(\n body: {\n transaction_uuids: [\"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\"],\n }\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY, DIDIT_ORGANIZATION_ID\n// and DIDIT_APPLICATION_ID.\nusing var client = new DiditClient();\n\nawait client.Transactions.BatchDeleteAsync(new TransactionsBatchDeleteParams\n{\n TransactionUuids = new string[] { \"abcdef12-3456-7890-abcd-ef1234567890\", \"12345678-90ab-cdef-1234-567890abcdef\" },\n});" } ], "responses": { @@ -74264,6 +86437,36 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/networks/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.retrieve()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.retrieve();\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().retrieve();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->networks->retrieve();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.retrieve\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.RetrieveAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -74370,6 +86573,36 @@ "lang": "curl", "label": "curl", "source": "curl -X GET https://verification.didit.me/v3/travel-rule/networks/questionnaire/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.retrieve_questionnaire()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.retrieveQuestionnaire();\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().retrieveQuestionnaire();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->networks->retrieveQuestionnaire();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.retrieve_questionnaire\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.RetrieveQuestionnaireAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -74411,6 +86644,36 @@ "lang": "curl", "label": "curl", "source": "curl -X PUT https://verification.didit.me/v3/travel-rule/networks/questionnaire/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"legal_name\": \"Example VASP Ltd\", \"incorporation_country\": \"ES\", \"aml_ctf_policy_attested\": true}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.update_questionnaire(\n legal_name=\"Example VASP Ltd\",\n incorporation_country=\"ES\",\n aml_ctf_policy_attested=True,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.updateQuestionnaire({\n legal_name: \"Example VASP Ltd\",\n incorporation_country: \"ES\",\n aml_ctf_policy_attested: true,\n});\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleNetworkQuestionnaireAnswers;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().updateQuestionnaire(TravelRuleNetworkQuestionnaireAnswers.builder()\n .legalName(\"Example VASP Ltd\")\n .incorporationCountry(\"ES\")\n .amlCtfPolicyAttested(true)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->networks->updateQuestionnaire([\n 'legal_name' => 'Example VASP Ltd',\n 'incorporation_country' => 'ES',\n 'aml_ctf_policy_attested' => true,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.update_questionnaire(\n legal_name: \"Example VASP Ltd\",\n incorporation_country: \"ES\",\n aml_ctf_policy_attested: true\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.UpdateQuestionnaireAsync(new TravelRuleNetworkQuestionnaireAnswers\n{\n LegalName = \"Example VASP Ltd\",\n IncorporationCountry = \"ES\",\n AmlCtfPolicyAttested = true,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -74419,6 +86682,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaireAnswers" + }, + "example": { + "legal_name": "Example VASP Ltd", + "incorporation_country": "ES", + "aml_ctf_policy_attested": true } } } @@ -74509,6 +86777,36 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/networks/questionnaire/submit/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.submit_questionnaire()\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.submitQuestionnaire();\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().submitQuestionnaire();\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->networks->submitQuestionnaire();\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.submit_questionnaire\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.SubmitQuestionnaireAsync();\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -74612,6 +86910,36 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/networks/gtr/request/ \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.networks.request_access(\n \"your-network\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.networks.requestAccess(\"your-network\");\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().networks().requestAccess(\"your-network\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->networks->requestAccess('your-network');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.networks.request_access(\"your-network\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.Networks.RequestAccessAsync(\"your-network\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -74702,12 +87030,32 @@ { "lang": "python", "label": "Python", - "source": "import os, requests\n\nresp = requests.post(\n \"https://verification.didit.me/v3/address-validation/\",\n headers={\"x-api-key\": os.environ[\"DIDIT_API_KEY\"], \"Content-Type\": \"application/json\"},\n json={\n \"address_line_1\": \"1600 Amphitheatre Pkwy\",\n \"city\": \"Mountain View\",\n \"region\": \"CA\",\n \"postal_code\": \"94043\",\n \"country\": \"US\",\n },\n timeout=15,\n)\nresp.raise_for_status()\nresult = resp.json()[\"address_validation\"]\nprint(result[\"status\"], result[\"formatted_address\"])" + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.address_validation.validate(\n address_line_1=\"1600 Amphitheatre Pkwy\",\n city=\"Mountain View\",\n region=\"CA\",\n postal_code=\"94043\",\n country=\"US\",\n)\nprint(result)" }, { "lang": "javascript", - "label": "JavaScript", - "source": "const res = await fetch('https://verification.didit.me/v3/address-validation/', {\n method: 'POST',\n headers: {\n 'x-api-key': 'YOUR_API_KEY',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ address: 'Paseo de la Castellana 259, 28046 Madrid', country: 'ES' }),\n});\nconst { address_validation } = await res.json();\nconsole.log(address_validation.status, address_validation.formatted_address);" + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.addressValidation.validate({\n address_line_1: \"1600 Amphitheatre Pkwy\",\n city: \"Mountain View\",\n region: \"CA\",\n postal_code: \"94043\",\n country: \"US\",\n});\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.AddressValidationRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.addressValidation().validate(AddressValidationRequest.builder()\n .addressLine1(\"1600 Amphitheatre Pkwy\")\n .city(\"Mountain View\")\n .region(\"CA\")\n .postalCode(\"94043\")\n .country(\"US\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "addressValidation->validate([\n 'address_line_1' => '1600 Amphitheatre Pkwy',\n 'city' => 'Mountain View',\n 'region' => 'CA',\n 'postal_code' => '94043',\n 'country' => 'US',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.address_validation.validate(\n address_line_1: \"1600 Amphitheatre Pkwy\",\n city: \"Mountain View\",\n region: \"CA\",\n postal_code: \"94043\",\n country: \"US\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.AddressValidation.ValidateAsync(new AddressValidationRequest\n{\n AddressLine1 = \"1600 Amphitheatre Pkwy\",\n City = \"Mountain View\",\n Region = \"CA\",\n PostalCode = \"94043\",\n Country = \"US\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "requestBody": { @@ -74882,6 +87230,36 @@ "lang": "curl", "label": "curl", "source": "curl https://verification.didit.me/v3/travel-rule/wallet-proofs/?status=PENDING \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.wallet_proofs.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.walletProofs.list()) {\n console.log(item);\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().walletProofs().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletProofs->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.wallet_proofs.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.WalletProofs.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" } ], "responses": { @@ -74963,6 +87341,10 @@ "application/json": { "schema": { "$ref": "#/components/schemas/TravelRuleWalletProofDecision" + }, + "example": { + "decision": "approve", + "note": "Address matches the wallet app." } } } @@ -74972,6 +87354,36 @@ "lang": "curl", "label": "curl", "source": "curl -X POST https://verification.didit.me/v3/travel-rule/wallet-proofs/{proof_uuid}/decision/ \\\n -H 'x-api-key: YOUR_API_KEY' \\\n -H 'Content-Type: application/json' \\\n -d '{\"decision\": \"approve\", \"note\": \"Address matches the wallet app.\"}'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.wallet_proofs.decide(\n \"11111111-2222-3333-4444-555555555555\",\n decision=\"approve\",\n note=\"Address matches the wallet app.\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.walletProofs.decide(\"11111111-2222-3333-4444-555555555555\", {\n decision: \"approve\",\n note: \"Address matches the wallet app.\",\n});\nconsole.log(result);" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleWalletProofDecision;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().walletProofs().decide(\"11111111-2222-3333-4444-555555555555\", TravelRuleWalletProofDecision.builder()\n .decision(TravelRuleWalletProofDecision.Decision.of(\"approve\"))\n .note(\"Address matches the wallet app.\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->walletProofs->decide('11111111-2222-3333-4444-555555555555', [\n 'decision' => 'approve',\n 'note' => 'Address matches the wallet app.',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.wallet_proofs.decide(\n \"11111111-2222-3333-4444-555555555555\",\n decision: \"approve\",\n note: \"Address matches the wallet app.\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.WalletProofs.DecideAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleWalletProofDecision\n{\n Decision = \"approve\",\n Note = \"Address matches the wallet app.\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" } ], "responses": { @@ -75234,6 +87646,3778 @@ } } } + }, + "/v3/id-verification/wallets/verifications/{request_id}/response/": { + "post": { + "operationId": "submit_wallet_verification_response", + "x-didit-sdk": { + "resource": "id_wallets", + "method": "submit_verification_response", + "auth": "api_key", + "server": true + }, + "description": "Digital Credentials API wallets (Google Wallet): send what the wallet returned to your page or app for a verification whose next_action is request_digital_credential. Didit decrypts it, checks the issuer's signature against the trusted issuer roots, every returned value against its signed digest, and the device signature over your origin and this request, then decides the verification: verified (billed once) or declined with the error code. Single use: a second submit returns the decided verification.", + "summary": "Submit a wallet response", + "parameters": [ + { + "in": "path", + "name": "request_id", + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "The request_id the start endpoint returned.", + "required": true + } + ], + "tags": [ + "Digital ID wallets" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest" + }, + "example": { + "response": { + "protocol": "openid4vp-v1-signed", + "data": { + "response": "" + } + } + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest" + }, + "example": { + "response": { + "protocol": "openid4vp-v1-signed", + "data": { + "response": "" + } + } + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialResponseRequest" + }, + "example": { + "response": { + "protocol": "openid4vp-v1-signed", + "data": { + "response": "" + } + } + } + } + }, + "required": true + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "BearerAuth": [] + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse" + }, + "example": { + "request_id": "00000000-0000-4000-8000-000000000001", + "wallet_verification": { + "wallet": { + "id": "google_wallet", + "name": "Google Wallet", + "issuing_authority": "Google Wallet (ID pass) and US state issuers (mobile driving licence)" + }, + "country": "USA", + "status": "Approved", + "outcome": "verified", + "error": null, + "interaction": "digital_credentials", + "simulated": false, + "expires_at": "2026-01-01T10:10:00Z", + "next_action": null, + "identity": { + "full_name": "Alex Example", + "first_name": "Alex", + "last_name": "Example", + "date_of_birth": "1990-01-31", + "nationality": "USA", + "issuing_state": "USA" + }, + "attributes": { + "document_number": "X0000000", + "document_expiry_date": "2030-01-31" + }, + "level_of_assurance": "substantial", + "verified_at": "2026-01-01T10:01:00Z", + "signature_valid": true, + "credential_type": "person_identification" + }, + "vendor_data": "your-customer-reference", + "metadata": { + "reference": "example" + }, + "created_at": "2026-01-01T10:00:00Z" + } + } + }, + "description": "" + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiClientCredentialsForbiddenErrorMessage" + } + } + }, + "description": "Missing credentials (x-api-key or Authorization: Bearer)." + }, + "404": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError" + } + } + }, + "description": "error not_found: no wallet verification of this application has this request_id." + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest" + } + } + }, + "description": "Field validation errors ({field: [messages]})." + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError" + } + } + }, + "description": "error not_a_digital_credentials_wallet: this verification does not take a wallet response." + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError" + } + } + }, + "description": "error wallet_not_configured: this environment cannot verify the wallet." + } + }, + "x-codeSamples": [ + { + "lang": "curl", + "label": "cURL", + "source": "curl --request POST \\\n --url https://verification.didit.me/v3/id-verification/wallets/verifications/REQUEST_ID/response/ \\\n --header 'x-api-key: YOUR_API_KEY' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"response\": {\n \"protocol\": \"openid4vp-v1-signed\",\n \"data\": {\n \"response\": \"\"\n }\n }\n}'" + } + ] + } + }, + "/v3/id-verification/wallets/google-wallet/": { + "post": { + "operationId": "start_google_wallet_wallet_verification", + "x-didit-sdk": { + "resource": "id_wallets", + "method": "start_google_wallet", + "auth": "api_key", + "server": true + }, + "description": "Start a Google Wallet sign-in (Google Wallet (ID pass) and US state issuers (mobile driving licence); USA, GBR, BRA, SGP, TWN) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=request_digital_credential with a request Didit signed for your application, usable only from origin. In a user gesture there, pass next_action.digital_credentials.request to navigator.credentials.get({digital: ...}) (or to Android Credential Manager as GetDigitalCredentialOption requestJson), then POST what the wallet returns to /v3/id-verification/wallets/verifications/{request_id}/response/. The browser offers its own QR code when the wallet is on another device. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider.", + "summary": "Start Google Wallet verification", + "parameters": [ + { + "in": "header", + "name": "Idempotency-Key", + "schema": { + "type": "string" + }, + "description": "Optional retry-safety key (max 255 characters). Retrying with the same key, wallet and body returns the original verification without starting a second sign-in; the same key with another wallet or body returns 409 idempotency_key_reused." + } + ], + "tags": [ + "Digital ID wallets" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest" + }, + "example": { + "country": "USA", + "vendor_data": "your-customer-reference", + "metadata": { + "reference": "example" + }, + "origin": "https://app.example.com" + } + }, + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest" + } + }, + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest" + } + } + }, + "required": true + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "BearerAuth": [] + } + ], + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationResponse" + }, + "example": { + "request_id": "00000000-0000-4000-8000-000000000001", + "wallet_verification": { + "wallet": { + "id": "google_wallet", + "name": "Google Wallet", + "issuing_authority": "Google Wallet (ID pass) and US state issuers (mobile driving licence)" + }, + "country": "USA", + "status": "Not Finished", + "outcome": "pending", + "error": null, + "interaction": "digital_credentials", + "simulated": false, + "expires_at": "2026-01-01T10:10:00Z", + "next_action": { + "type": "request_digital_credential", + "digital_credentials": { + "protocol": "openid4vp-v1-signed", + "request": { + "requests": [ + { + "protocol": "openid4vp-v1-signed", + "data": { + "request": "" + } + } + ] + } + } + }, + "identity": null, + "attributes": null, + "level_of_assurance": null, + "verified_at": null, + "signature_valid": null, + "credential_type": "person_identification" + }, + "vendor_data": "your-customer-reference", + "metadata": { + "reference": "example" + }, + "created_at": "2026-01-01T10:00:00Z" + } + } + }, + "description": "" + }, + "400": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartBadRequest" + } + } + }, + "description": "Field validation errors ({field: [messages]}), or error return_url_invalid, return_url_not_allowed, origin_invalid, origin_not_allowed, invalid_personal_code, invalid_phone_number or idempotency_key_invalid." + }, + "403": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationStartForbidden" + } + } + }, + "description": "Missing credentials ({detail}), or error wallet_unavailable, insufficient_credits or contract_rate_missing." + }, + "409": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError" + } + } + }, + "description": "error idempotency_key_reused or idempotency_key_in_progress (with Retry-After)." + }, + "502": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError" + } + } + }, + "description": "error wallet_provider_unavailable: the provider could not start; nothing was created." + }, + "503": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletVerificationError" + } + } + }, + "description": "error wallet_not_configured: this environment cannot reach the wallet." + } + }, + "x-codeSamples": [ + { + "lang": "curl", + "label": "cURL", + "source": "curl --request POST \\\n --url https://verification.didit.me/v3/id-verification/wallets/google-wallet/ \\\n --header 'x-api-key: YOUR_API_KEY' \\\n --header 'Idempotency-Key: your-unique-attempt-key' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"country\": \"USA\",\n \"vendor_data\": \"your-customer-reference\",\n \"metadata\": {\n \"reference\": \"example\"\n },\n \"origin\": \"https://app.example.com\"\n}'" + } + ], + "x-didit-wallet-id": "google_wallet" + } + }, + "/v3/session/{sessionId}/kyb/documents/": { + "post": { + "summary": "Upload KYB documents to a session", + "description": "Upload one or more corporate documents (articles of incorporation, shareholder register, certificate of incorporation, ...) to the KYB Documents step of a Business Verification session, from your own server instead of the hosted page. Didit runs the hosted pipeline: compression, OCR, tampering and cross-document checks, document grouping, and advances the session when the required document groups are satisfied. The step costs one flat fee however many files you send. The session must be open and on the KYB Documents step, and the company chosen at the registry step must exist. Read the people the documents name with `GET /v3/session/{sessionId}/kyb/extracted-parties/`. Requires `write:businesses`.", + "operationId": "post_v3_session_kyb_documents", + "x-didit-sdk": { + "resource": "sessions", + "method": "upload_kyb_documents", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "required": [ + "documents" + ], + "properties": { + "documents": { + "type": "array", + "items": { + "type": "string", + "format": "binary" + }, + "description": "Files to upload: JPG, JPEG, PNG, TIFF, WEBP, PDF or ZIP archives of them. PDFs up to 50 MB, photos up to 6 MB before compression." + }, + "document_passwords": { + "type": "array", + "items": { + "type": "string" + }, + "description": "One entry per file in `documents`, in the same order: the password of a protected PDF, empty for any other file." + }, + "document_group": { + "type": "string", + "enum": [ + "LEGAL_PRESENCE", + "COMPANY_DETAILS", + "OWNERSHIP_STRUCTURE", + "REPRESENTATIVES_AUTHORIZATION" + ], + "description": "Required document group this upload answers." + }, + "locale": { + "type": "string", + "maxLength": 10, + "description": "Locale used to translate the response of the next step." + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Documents processed. When every required group is satisfied the session advances and `next_step` names the next step; otherwise it stays on the Documents step and `document_groups` and `document_answer` say what is still missing.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "valid": { + "type": "boolean" + }, + "next_step": { + "type": "string", + "nullable": true, + "description": "Step the session is on after the upload." + }, + "kyb_status": { + "type": "string", + "description": "Status of the company check." + }, + "document_answer": { + "type": "object", + "additionalProperties": true, + "description": "Result per uploaded document and the uploads left." + } + }, + "additionalProperties": true + }, + "example": { + "valid": true, + "next_step": "KYB_KEY_PEOPLE", + "kyb_status": "In Progress" + } + } + } + }, + "400": { + "description": "A document was rejected (tampering, unreadable or unsupported) or the session has no KYB company yet. Retry with another file while attempts remain.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "message": "No KYB company found. Submit company data first." + } + } + } + }, + "402": { + "description": "The organization has no credit left for the documents step.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Insufficient credits." + } + } + } + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session does not exist, was deleted, belongs to another application or is outside a scoped key's limits; no detail distinguishes them.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + }, + "409": { + "description": "The session is finished (`kyb_session_not_writable`) or is not on the KYB Documents step (`kyb_step_mismatch`, with `next_step` naming the step it is on).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + }, + "code": { + "type": "string" + }, + "next_step": { + "type": "string" + } + } + }, + "example": { + "detail": "The session is not on the step this operation completes.", + "code": "kyb_step_mismatch", + "next_step": "KYB_REGISTRY" + } + } + } + }, + "429": { + "description": "Rate limit exceeded: 300 write (POST, PATCH, DELETE) requests per minute per API key. Wait `Retry-After` seconds before retrying; the `X-RateLimit-*` headers show the budget.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Rate limited": { + "summary": "Budget for the current minute exhausted", + "value": { + "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute." + } + } + } + } + }, + "headers": { + "Retry-After": { + "description": "Seconds to wait before retrying.", + "schema": { + "type": "integer", + "minimum": 1, + "example": 30 + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.upload_kyb_documents(\n \"33333333-4444-5555-6666-777777777777\",\n documents=[open(\"document.pdf\", \"rb\")],\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit, { fileFromPath } from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.uploadKybDocuments(\"33333333-4444-5555-6666-777777777777\", {\n documents: [await fileFromPath(\"document.pdf\")],\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UploadKYBDocuments(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsUploadKYBDocumentsParams{\n\tDocuments: []didit.File{didit.FileFromPath(\"document.pdf\")},\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.nio.file.Path;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsUploadKybDocumentsParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().uploadKybDocuments(\"33333333-4444-5555-6666-777777777777\", SessionsUploadKybDocumentsParams.builder()\n .documents(List.of(Path.of(\"document.pdf\")))\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->uploadKybDocuments('33333333-4444-5555-6666-777777777777', [\n 'documents' => [File::fromPath('document.pdf')],\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.upload_kyb_documents(\n \"33333333-4444-5555-6666-777777777777\",\n documents: [Pathname(\"document.pdf\")]\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UploadKybDocumentsAsync(\"33333333-4444-5555-6666-777777777777\", new SessionsUploadKybDocumentsParams\n{\n Documents = new FileUpload[] { FileUpload.FromPath(\"document.pdf\") },\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + } + }, + "/v3/session/{sessionId}/kyb/extracted-parties/": { + "get": { + "summary": "List the parties named by the uploaded documents", + "description": "Return the shareholders and directors that the documents uploaded to this KYB session name, merged per person and attributed to the documents that named them. Show them to your applicant to confirm, then declare them with the party draft endpoints. A range stays a range: `ownership_percent.text` keeps the verbatim figure and `min` / `max` the numbers read from it. Nobody is labelled a UBO here; that is decided when the parties are submitted, from the role settings and ownership thresholds of the workflow. The same list is in the session decision as `document_verifications[].extracted_parties`. Requires `read:businesses` or `read:sessions`.", + "operationId": "get_v3_session_kyb_extracted_parties", + "x-didit-sdk": { + "resource": "sessions", + "method": "list_kyb_extracted_parties", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Parties named by the current documents.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "parties", + "document_count" + ], + "properties": { + "parties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "entity_type": { + "type": "string", + "enum": [ + "person", + "company" + ] + }, + "first_name": { + "type": "string", + "nullable": true + }, + "last_name": { + "type": "string", + "nullable": true + }, + "appointment_date": { + "type": "string", + "nullable": true + }, + "designation": { + "type": "string", + "nullable": true + }, + "roles": { + "type": "array", + "items": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ] + }, + "ownership_percent": { + "type": "object", + "properties": { + "text": { + "type": "string", + "nullable": true, + "description": "The ownership figure exactly as the document states it, such as `25-50%`, `>50%` or `NO EXHIBE`." + }, + "min": { + "type": "number", + "nullable": true, + "description": "Lower number read out of `text`; null when it states none." + }, + "max": { + "type": "number", + "nullable": true, + "description": "Upper number read out of `text`; null when it states none." + } + } + } + } + } + }, + "documents": { + "type": "array", + "description": "The uploaded documents that named this party.", + "items": { + "type": "object", + "properties": { + "document_uuid": { + "type": "string", + "format": "uuid" + }, + "document_type": { + "type": "string", + "nullable": true + }, + "document_subtype": { + "type": "string", + "nullable": true + }, + "original_filename": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "description": "The shareholders and directors the uploaded documents name, merged per person. Nobody is labelled a UBO here: that is decided when the parties are submitted." + }, + "document_count": { + "type": "integer", + "description": "Number of uploaded documents the list was read from." + }, + "node_id": { + "type": "string", + "nullable": true + } + } + }, + "example": { + "parties": [ + { + "name": "Ana Lopez", + "entity_type": "person", + "first_name": "Ana", + "last_name": "Lopez", + "appointment_date": null, + "designation": "Administrador unico", + "roles": [ + { + "role": "shareholder", + "ownership_percent": { + "text": "60%", + "min": 60, + "max": 60 + } + } + ], + "documents": [ + { + "document_uuid": "0a3f1e2c-7c2f-4a1b-9d55-2f8d2a5d6b41", + "document_type": "OWNERSHIP_STRUCTURE", + "document_subtype": "ARTICLES_OF_INCORPORATION", + "original_filename": "acta_constitutiva.pdf", + "status": "Approved" + } + ] + } + ], + "document_count": 1, + "node_id": "node_kyb_documents" + } + } + } + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session does not exist, was deleted, belongs to another application or is outside a scoped key's limits; no detail distinguishes them.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.list_kyb_extracted_parties(\n \"33333333-4444-5555-6666-777777777777\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listKybExtractedParties(\"33333333-4444-5555-6666-777777777777\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListKYBExtractedParties(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsListKYBExtractedPartiesParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().listKybExtractedParties(\"33333333-4444-5555-6666-777777777777\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->listKybExtractedParties('33333333-4444-5555-6666-777777777777');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_kyb_extracted_parties(\"33333333-4444-5555-6666-777777777777\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListKybExtractedPartiesAsync(\"33333333-4444-5555-6666-777777777777\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + } + }, + "/v3/session/{sessionId}/kyb/parties/drafts/": { + "get": { + "summary": "List the KYB party drafts", + "description": "List the parties you are preparing for this KYB session, oldest first. A draft is not a declared party: it does not appear in the decision or the console and creates no verification session until you submit it with `POST /v3/session/{sessionId}/kyb/parties/submit/`. Requires `write:businesses`.", + "operationId": "get_v3_session_kyb_party_drafts", + "x-didit-sdk": { + "resource": "sessions", + "method": "list_kyb_party_drafts", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The stored drafts.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "parties": { + "type": "array", + "items": { + "type": "object", + "required": [ + "draft_id", + "created_at", + "updated_at", + "party" + ], + "properties": { + "draft_id": { + "type": "string", + "format": "uuid" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "party": { + "type": "object", + "required": [ + "entity_type", + "nationality" + ], + "properties": { + "entity_type": { + "type": "string", + "enum": [ + "person", + "company" + ], + "description": "Whether the party is an individual or a company." + }, + "full_name": { + "type": "string", + "maxLength": 255, + "description": "Full name of a person. Send it, or `first_name` and `last_name`." + }, + "first_name": { + "type": "string", + "maxLength": 128 + }, + "last_name": { + "type": "string", + "maxLength": 128 + }, + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ], + "description": "Role the party holds. Interchangeable with `roles`; when both are sent they are merged." + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ] + }, + "description": "Every role the party holds. A person needs at least one role (here or in `role`)." + }, + "position": { + "type": "string", + "maxLength": 128, + "description": "Job title of a person." + }, + "date_of_birth": { + "type": "string", + "format": "date", + "nullable": true + }, + "company_name": { + "type": "string", + "maxLength": 255, + "description": "Name of a company party. Required when `entity_type` is `company`." + }, + "registration_number": { + "type": "string", + "maxLength": 100, + "description": "Registration number of a company party." + }, + "email": { + "type": "string", + "format": "email", + "description": "Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow." + }, + "ownership_percent": { + "type": "number", + "nullable": true, + "description": "Share of the company the party owns." + }, + "nationality": { + "type": "string", + "maxLength": 100, + "description": "Nationality of a person, or country of incorporation of a company. Required for every party." + }, + "phone_number": { + "type": "string", + "maxLength": 32 + }, + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Workflow-defined extra fields." + }, + "skip_verification": { + "type": "boolean", + "default": false, + "description": "Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings." + } + } + } + } + } + }, + "node_id": { + "type": "string", + "nullable": true + } + } + }, + "example": { + "parties": [ + { + "draft_id": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d", + "created_at": "2026-10-31T10:00:00Z", + "updated_at": "2026-10-31T10:00:00Z", + "party": { + "entity_type": "person", + "first_name": "Ana", + "last_name": "Lopez", + "roles": [ + "ubo", + "director" + ], + "ownership_percent": 60, + "nationality": "MEX", + "email": "ana.lopez@example.com", + "date_of_birth": "1984-06-12" + } + } + ], + "node_id": "node_kyb_key_people" + } + } + } + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session does not exist, was deleted, belongs to another application or is outside a scoped key's limits; no detail distinguishes them.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.list_kyb_party_drafts(\n \"33333333-4444-5555-6666-777777777777\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.listKybPartyDrafts(\"33333333-4444-5555-6666-777777777777\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ListKYBPartyDrafts(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsListKYBPartyDraftsParams{})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().listKybPartyDrafts(\"33333333-4444-5555-6666-777777777777\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->listKybPartyDrafts('33333333-4444-5555-6666-777777777777');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.list_kyb_party_drafts(\"33333333-4444-5555-6666-777777777777\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ListKybPartyDraftsAsync(\"33333333-4444-5555-6666-777777777777\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + }, + "post": { + "summary": "Create a KYB party draft", + "description": "Add a party (a person or a company) to the list you are preparing for this KYB session. The same fields and rules as the hosted Key People screen apply: a person needs `full_name` or `first_name` and `last_name`, at least one role and a nationality; a company needs `company_name` and the country of incorporation in `nationality`. Nothing is declared or billed until `POST /v3/session/{sessionId}/kyb/parties/submit/`. Requires `write:businesses`.", + "operationId": "post_v3_session_kyb_party_drafts", + "x-didit-sdk": { + "resource": "sessions", + "method": "create_kyb_party_draft", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "entity_type", + "nationality" + ], + "properties": { + "entity_type": { + "type": "string", + "enum": [ + "person", + "company" + ], + "description": "Whether the party is an individual or a company." + }, + "full_name": { + "type": "string", + "maxLength": 255, + "description": "Full name of a person. Send it, or `first_name` and `last_name`." + }, + "first_name": { + "type": "string", + "maxLength": 128 + }, + "last_name": { + "type": "string", + "maxLength": 128 + }, + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ], + "description": "Role the party holds. Interchangeable with `roles`; when both are sent they are merged." + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ] + }, + "description": "Every role the party holds. A person needs at least one role (here or in `role`)." + }, + "position": { + "type": "string", + "maxLength": 128, + "description": "Job title of a person." + }, + "date_of_birth": { + "type": "string", + "format": "date", + "nullable": true + }, + "company_name": { + "type": "string", + "maxLength": 255, + "description": "Name of a company party. Required when `entity_type` is `company`." + }, + "registration_number": { + "type": "string", + "maxLength": 100, + "description": "Registration number of a company party." + }, + "email": { + "type": "string", + "format": "email", + "description": "Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow." + }, + "ownership_percent": { + "type": "number", + "nullable": true, + "description": "Share of the company the party owns." + }, + "nationality": { + "type": "string", + "maxLength": 100, + "description": "Nationality of a person, or country of incorporation of a company. Required for every party." + }, + "phone_number": { + "type": "string", + "maxLength": 32 + }, + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Workflow-defined extra fields." + }, + "skip_verification": { + "type": "boolean", + "default": false, + "description": "Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings." + } + } + }, + "example": { + "entity_type": "person", + "first_name": "Ana", + "last_name": "Lopez", + "roles": [ + "ubo", + "director" + ], + "ownership_percent": 60, + "nationality": "MEX", + "email": "ana.lopez@example.com", + "date_of_birth": "1984-06-12" + } + } + } + }, + "responses": { + "201": { + "description": "Draft created.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "draft_id", + "created_at", + "updated_at", + "party" + ], + "properties": { + "draft_id": { + "type": "string", + "format": "uuid" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "party": { + "type": "object", + "required": [ + "entity_type", + "nationality" + ], + "properties": { + "entity_type": { + "type": "string", + "enum": [ + "person", + "company" + ], + "description": "Whether the party is an individual or a company." + }, + "full_name": { + "type": "string", + "maxLength": 255, + "description": "Full name of a person. Send it, or `first_name` and `last_name`." + }, + "first_name": { + "type": "string", + "maxLength": 128 + }, + "last_name": { + "type": "string", + "maxLength": 128 + }, + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ], + "description": "Role the party holds. Interchangeable with `roles`; when both are sent they are merged." + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ] + }, + "description": "Every role the party holds. A person needs at least one role (here or in `role`)." + }, + "position": { + "type": "string", + "maxLength": 128, + "description": "Job title of a person." + }, + "date_of_birth": { + "type": "string", + "format": "date", + "nullable": true + }, + "company_name": { + "type": "string", + "maxLength": 255, + "description": "Name of a company party. Required when `entity_type` is `company`." + }, + "registration_number": { + "type": "string", + "maxLength": 100, + "description": "Registration number of a company party." + }, + "email": { + "type": "string", + "format": "email", + "description": "Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow." + }, + "ownership_percent": { + "type": "number", + "nullable": true, + "description": "Share of the company the party owns." + }, + "nationality": { + "type": "string", + "maxLength": 100, + "description": "Nationality of a person, or country of incorporation of a company. Required for every party." + }, + "phone_number": { + "type": "string", + "maxLength": 32 + }, + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Workflow-defined extra fields." + }, + "skip_verification": { + "type": "boolean", + "default": false, + "description": "Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings." + } + } + } + } + }, + "example": { + "draft_id": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d", + "created_at": "2026-10-31T10:00:00Z", + "updated_at": "2026-10-31T10:00:00Z", + "party": { + "entity_type": "person", + "first_name": "Ana", + "last_name": "Lopez", + "roles": [ + "ubo", + "director" + ], + "ownership_percent": 60, + "nationality": "MEX", + "email": "ana.lopez@example.com", + "date_of_birth": "1984-06-12" + } + } + } + } + }, + "400": { + "description": "A party field is invalid or a required one is missing.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "non_field_errors": [ + "Person parties require at least one role." + ] + } + } + } + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session does not exist, was deleted, belongs to another application or is outside a scoped key's limits; no detail distinguishes them.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + }, + "409": { + "description": "The session is finished (`kyb_session_not_writable`).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + }, + "code": { + "type": "string" + } + } + }, + "example": { + "detail": "This verification session is no longer accepting changes.", + "code": "kyb_session_not_writable" + } + } + } + }, + "429": { + "description": "Rate limit exceeded: 300 write (POST, PATCH, DELETE) requests per minute per API key. Wait `Retry-After` seconds before retrying; the `X-RateLimit-*` headers show the budget.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Rate limited": { + "summary": "Budget for the current minute exhausted", + "value": { + "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute." + } + } + } + } + }, + "headers": { + "Retry-After": { + "description": "Seconds to wait before retrying.", + "schema": { + "type": "integer", + "minimum": 1, + "example": 30 + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.create_kyb_party_draft(\n \"33333333-4444-5555-6666-777777777777\",\n entity_type=\"person\",\n first_name=\"Ana\",\n last_name=\"Lopez\",\n roles=[\"ubo\", \"director\"],\n date_of_birth=\"1984-06-12\",\n email=\"ana.lopez@example.com\",\n ownership_percent=60.0,\n nationality=\"MEX\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.createKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", {\n entity_type: \"person\",\n first_name: \"Ana\",\n last_name: \"Lopez\",\n roles: [\"ubo\", \"director\"],\n date_of_birth: \"1984-06-12\",\n email: \"ana.lopez@example.com\",\n ownership_percent: 60.0,\n nationality: \"MEX\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.CreateKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsCreateKYBPartyDraftParams{\n\tEntityType: \"person\",\n\tFirstName: didit.String(\"Ana\"),\n\tLastName: didit.String(\"Lopez\"),\n\tRoles: didit.Some([]didit.SessionsCreateKYBPartyDraftParamsRoles{\"ubo\", \"director\"}),\n\tDateOfBirth: didit.String(\"1984-06-12\"),\n\tEmail: didit.String(\"ana.lopez@example.com\"),\n\tOwnershipPercent: didit.Float(60.0),\n\tNationality: \"MEX\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import java.time.LocalDate;\nimport java.util.List;\nimport me.didit.Didit;\nimport me.didit.types.SessionsCreateKybPartyDraftParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().createKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", SessionsCreateKybPartyDraftParams.builder()\n .entityType(SessionsCreateKybPartyDraftParams.EntityType.of(\"person\"))\n .firstName(\"Ana\")\n .lastName(\"Lopez\")\n .roles(List.of(SessionsCreateKybPartyDraftParams.Roles.of(\"ubo\"), SessionsCreateKybPartyDraftParams.Roles.of(\"director\")))\n .dateOfBirth(LocalDate.parse(\"1984-06-12\"))\n .email(\"ana.lopez@example.com\")\n .ownershipPercent(60.0)\n .nationality(\"MEX\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->createKybPartyDraft('33333333-4444-5555-6666-777777777777', [\n 'entity_type' => 'person',\n 'first_name' => 'Ana',\n 'last_name' => 'Lopez',\n 'roles' => ['ubo', 'director'],\n 'date_of_birth' => '1984-06-12',\n 'email' => 'ana.lopez@example.com',\n 'ownership_percent' => 60.0,\n 'nationality' => 'MEX',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.create_kyb_party_draft(\n \"33333333-4444-5555-6666-777777777777\",\n entity_type: \"person\",\n first_name: \"Ana\",\n last_name: \"Lopez\",\n roles: [\"ubo\", \"director\"],\n date_of_birth: \"1984-06-12\",\n email: \"ana.lopez@example.com\",\n ownership_percent: 60.0,\n nationality: \"MEX\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.CreateKybPartyDraftAsync(\"33333333-4444-5555-6666-777777777777\", new SessionsCreateKybPartyDraftParams\n{\n EntityType = \"person\",\n FirstName = \"Ana\",\n LastName = \"Lopez\",\n Roles = new SessionsCreateKybPartyDraftParamsRoles[] { \"ubo\", \"director\" },\n DateOfBirth = \"1984-06-12\",\n Email = \"ana.lopez@example.com\",\n OwnershipPercent = 60.0,\n Nationality = \"MEX\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + } + }, + "/v3/session/{sessionId}/kyb/parties/drafts/{draftId}/": { + "patch": { + "summary": "Edit a KYB party draft", + "description": "Change fields of one party draft. The edit is merged into the stored draft and the merged party is validated as a whole, so an edit that would leave the party incomplete is rejected. Changing `first_name` or `last_name` replaces the stored full name. Requires `write:businesses`.", + "operationId": "patch_v3_session_kyb_party_draft", + "x-didit-sdk": { + "resource": "sessions", + "method": "update_kyb_party_draft", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "draftId", + "in": "path", + "required": true, + "description": "UUID of the party draft (`draft_id` returned when it was created).", + "schema": { + "type": "string", + "format": "uuid", + "example": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "Any subset of the party fields. The edit is merged into the stored draft and the merged party is validated as a whole, so a draft that could be submitted before an edit can still be submitted after it.", + "properties": { + "entity_type": { + "type": "string", + "enum": [ + "person", + "company" + ], + "description": "Whether the party is an individual or a company." + }, + "full_name": { + "type": "string", + "maxLength": 255, + "description": "Full name of a person. Send it, or `first_name` and `last_name`." + }, + "first_name": { + "type": "string", + "maxLength": 128 + }, + "last_name": { + "type": "string", + "maxLength": 128 + }, + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ], + "description": "Role the party holds. Interchangeable with `roles`; when both are sent they are merged." + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ] + }, + "description": "Every role the party holds. A person needs at least one role (here or in `role`)." + }, + "position": { + "type": "string", + "maxLength": 128, + "description": "Job title of a person." + }, + "date_of_birth": { + "type": "string", + "format": "date", + "nullable": true + }, + "company_name": { + "type": "string", + "maxLength": 255, + "description": "Name of a company party. Required when `entity_type` is `company`." + }, + "registration_number": { + "type": "string", + "maxLength": 100, + "description": "Registration number of a company party." + }, + "email": { + "type": "string", + "format": "email", + "description": "Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow." + }, + "ownership_percent": { + "type": "number", + "nullable": true, + "description": "Share of the company the party owns." + }, + "nationality": { + "type": "string", + "maxLength": 100, + "description": "Nationality of a person, or country of incorporation of a company. Required for every party." + }, + "phone_number": { + "type": "string", + "maxLength": 32 + }, + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Workflow-defined extra fields." + }, + "skip_verification": { + "type": "boolean", + "default": false, + "description": "Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings." + } + } + }, + "example": { + "ownership_percent": 55 + } + } + } + }, + "responses": { + "200": { + "description": "Draft updated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "draft_id", + "created_at", + "updated_at", + "party" + ], + "properties": { + "draft_id": { + "type": "string", + "format": "uuid" + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "party": { + "type": "object", + "required": [ + "entity_type", + "nationality" + ], + "properties": { + "entity_type": { + "type": "string", + "enum": [ + "person", + "company" + ], + "description": "Whether the party is an individual or a company." + }, + "full_name": { + "type": "string", + "maxLength": 255, + "description": "Full name of a person. Send it, or `first_name` and `last_name`." + }, + "first_name": { + "type": "string", + "maxLength": 128 + }, + "last_name": { + "type": "string", + "maxLength": 128 + }, + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ], + "description": "Role the party holds. Interchangeable with `roles`; when both are sent they are merged." + }, + "roles": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ] + }, + "description": "Every role the party holds. A person needs at least one role (here or in `role`)." + }, + "position": { + "type": "string", + "maxLength": 128, + "description": "Job title of a person." + }, + "date_of_birth": { + "type": "string", + "format": "date", + "nullable": true + }, + "company_name": { + "type": "string", + "maxLength": 255, + "description": "Name of a company party. Required when `entity_type` is `company`." + }, + "registration_number": { + "type": "string", + "maxLength": 100, + "description": "Registration number of a company party." + }, + "email": { + "type": "string", + "format": "email", + "description": "Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow." + }, + "ownership_percent": { + "type": "number", + "nullable": true, + "description": "Share of the company the party owns." + }, + "nationality": { + "type": "string", + "maxLength": 100, + "description": "Nationality of a person, or country of incorporation of a company. Required for every party." + }, + "phone_number": { + "type": "string", + "maxLength": 32 + }, + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Workflow-defined extra fields." + }, + "skip_verification": { + "type": "boolean", + "default": false, + "description": "Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings." + } + } + } + } + }, + "example": { + "draft_id": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d", + "created_at": "2026-10-31T10:00:00Z", + "updated_at": "2026-10-31T10:00:00Z", + "party": { + "entity_type": "person", + "first_name": "Ana", + "last_name": "Lopez", + "roles": [ + "ubo", + "director" + ], + "ownership_percent": 55, + "nationality": "MEX", + "email": "ana.lopez@example.com", + "date_of_birth": "1984-06-12" + } + } + } + } + }, + "400": { + "description": "The merged party is invalid.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "non_field_errors": [ + "Person parties require at least one role." + ] + } + } + } + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session or the draft does not exist, or the session is outside the key's application or a scoped key's limits.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + }, + "409": { + "description": "The session is finished (`kyb_session_not_writable`).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + }, + "code": { + "type": "string" + } + } + }, + "example": { + "detail": "This verification session is no longer accepting changes.", + "code": "kyb_session_not_writable" + } + } + } + }, + "429": { + "description": "Rate limit exceeded: 300 write (POST, PATCH, DELETE) requests per minute per API key. Wait `Retry-After` seconds before retrying; the `X-RateLimit-*` headers show the budget.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Rate limited": { + "summary": "Budget for the current minute exhausted", + "value": { + "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute." + } + } + } + } + }, + "headers": { + "Retry-After": { + "description": "Seconds to wait before retrying.", + "schema": { + "type": "integer", + "minimum": 1, + "example": 30 + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.update_kyb_party_draft(\n \"33333333-4444-5555-6666-777777777777\",\n \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n ownership_percent=55.0,\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.updateKybPartyDraft(\n \"33333333-4444-5555-6666-777777777777\",\n \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n {\n ownership_percent: 55.0,\n },\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.UpdateKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", didit.SessionsUpdateKYBPartyDraftParams{\n\tOwnershipPercent: didit.Float(55.0),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsUpdateKybPartyDraftParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().updateKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", SessionsUpdateKybPartyDraftParams.builder()\n .ownershipPercent(55.0)\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->updateKybPartyDraft('33333333-4444-5555-6666-777777777777', '5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d', [\n 'ownership_percent' => 55.0,\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.update_kyb_party_draft(\n \"33333333-4444-5555-6666-777777777777\",\n \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n ownership_percent: 55.0\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.UpdateKybPartyDraftAsync(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", new SessionsUpdateKybPartyDraftParams\n{\n OwnershipPercent = 55.0,\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + }, + "delete": { + "summary": "Delete a KYB party draft", + "description": "Drop one party draft. Declared parties are not affected. Requires `write:businesses`.", + "operationId": "delete_v3_session_kyb_party_draft", + "x-didit-sdk": { + "resource": "sessions", + "method": "delete_kyb_party_draft", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "draftId", + "in": "path", + "required": true, + "description": "UUID of the party draft (`draft_id` returned when it was created).", + "schema": { + "type": "string", + "format": "uuid", + "example": "5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Draft deleted. No body." + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session or the draft does not exist, or the session is outside the key's application or a scoped key's limits.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + }, + "409": { + "description": "The session is finished (`kyb_session_not_writable`).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + }, + "code": { + "type": "string" + } + } + }, + "example": { + "detail": "This verification session is no longer accepting changes.", + "code": "kyb_session_not_writable" + } + } + } + }, + "429": { + "description": "Rate limit exceeded: 300 write (POST, PATCH, DELETE) requests per minute per API key. Wait `Retry-After` seconds before retrying; the `X-RateLimit-*` headers show the budget.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Rate limited": { + "summary": "Budget for the current minute exhausted", + "value": { + "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute." + } + } + } + } + }, + "headers": { + "Retry-After": { + "description": "Seconds to wait before retrying.", + "schema": { + "type": "integer", + "minimum": 1, + "example": 30 + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nclient.sessions.delete_kyb_party_draft(\n \"33333333-4444-5555-6666-777777777777\",\n \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nawait didit.sessions.deleteKybPartyDraft(\n \"33333333-4444-5555-6666-777777777777\",\n \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\",\n);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nif err := client.Sessions.DeleteKYBPartyDraft(ctx, \"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\", didit.SessionsDeleteKYBPartyDraftParams{}); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nclient.sessions().deleteKybPartyDraft(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\");" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->deleteKybPartyDraft('33333333-4444-5555-6666-777777777777', '5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d');" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.sessions.delete_kyb_party_draft(\n \"33333333-4444-5555-6666-777777777777\",\n \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\"\n)" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait client.Sessions.DeleteKybPartyDraftAsync(\"33333333-4444-5555-6666-777777777777\", \"5b0d7a52-9d3e-4f0c-8c6a-0e5f3a1b2c4d\");" + } + ] + } + }, + "/v3/session/{sessionId}/kyb/parties/submit/": { + "post": { + "summary": "Submit the KYB party drafts", + "description": "Declare the stored drafts as the company's key people. This is the hosted Key People step under your API key: Didit decides from the role settings and ownership thresholds of the workflow which parties must be verified, creates one individual KYC session (or a KYB sub-session for a corporate owner) for each of them, sends the emails the workflow asks for, and advances the session. Each child session is billed like in the hosted flow. The drafts are consumed. Repeating the call after a successful submit changes nothing and answers `200` with `already_submitted: true` and the parties that already exist. The session must be on the Key People step. Send each person's `kyc_session_url` to them, or embed it. Requires `write:businesses`.", + "operationId": "post_v3_session_kyb_parties_submit", + "x-didit-sdk": { + "resource": "sessions", + "method": "submit_kyb_parties", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the Business Verification (KYB) session. It must belong to the application of the API key.", + "schema": { + "type": "string", + "format": "uuid", + "example": "33333333-4444-5555-6666-777777777777" + } + }, + { + "name": "node_id", + "in": "query", + "required": false, + "description": "Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "maxLength": 10, + "description": "Locale used to translate the response of the step the session advances to." + } + } + }, + "example": { + "locale": "es" + } + } + } + }, + "responses": { + "200": { + "description": "Parties declared (or already declared).", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "valid": { + "type": "boolean" + }, + "next_step": { + "type": "string", + "nullable": true, + "description": "Step the session is on." + }, + "status": { + "type": "string", + "description": "Status of the business session." + }, + "advanced": { + "type": "boolean", + "description": "`true` when this call declared the parties and advanced the session." + }, + "already_submitted": { + "type": "boolean", + "description": "`true` when the parties had been declared by an earlier call." + }, + "kyb_key_people_status": { + "type": "string" + }, + "parties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KYBKeyPeopleParty" + } + } + } + }, + "example": { + "valid": true, + "next_step": "FINISHED", + "status": "In Progress", + "advanced": true, + "already_submitted": false, + "kyb_key_people_status": "In Progress", + "parties": [] + } + } + } + }, + "402": { + "description": "The organization has no credit left for the child verification sessions.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Insufficient credits." + } + } + } + }, + "401": { + "description": "The scoped API key has expired. This is the only case that returns `401`: a missing, invalid or revoked key returns `403`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Expired key": { + "summary": "The key's expiry date has passed", + "value": { + "detail": "This API key has expired." + } + } + } + } + } + }, + "403": { + "description": "Authentication or authorization failure. A missing key returns `403`, and so do a key of another application, a scoped key without the permission this endpoint needs, and a request from outside the key's IP allowlist; a wrong, revoked or expired key returns `401`. Distinguish them by `detail`.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Missing or invalid credentials": { + "summary": "No x-api-key header, or the key failed validation", + "value": { + "detail": "Authentication credentials were not provided or are invalid." + } + }, + "Other application": { + "summary": "A valid key that belongs to a different application than the session", + "value": { + "detail": "You do not have permission to perform this action." + } + }, + "Scoped key without decisions write": { + "summary": "Scoped key lacks decisions: write", + "value": { + "detail": "This API key has no write access to decisions." + } + }, + "IP not allowed": { + "summary": "Request from outside the key's IP allowlist", + "value": { + "detail": "This API key can't be used from this IP address." + } + } + } + } + } + }, + "404": { + "description": "The session does not exist, was deleted, belongs to another application or is outside a scoped key's limits; no detail distinguishes them.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "example": { + "detail": "Session not found." + } + } + } + }, + "409": { + "description": "`kyb_no_party_drafts`: there is nothing to submit. `kyb_parties_already_submitted`: drafts were added after the parties were declared. `kyb_step_mismatch`: the session is not on the Key People step (`next_step` names its step). `kyb_session_not_writable`: the session is finished.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + }, + "code": { + "type": "string" + }, + "next_step": { + "type": "string" + } + } + }, + "example": { + "detail": "There are no draft parties to submit.", + "code": "kyb_no_party_drafts" + } + } + } + }, + "429": { + "description": "Rate limit exceeded: 300 write (POST, PATCH, DELETE) requests per minute per API key. Wait `Retry-After` seconds before retrying; the `X-RateLimit-*` headers show the budget.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string", + "description": "Human-readable error message." + } + } + }, + "examples": { + "Rate limited": { + "summary": "Budget for the current minute exhausted", + "value": { + "detail": "Write request rate limit exceeded. You can make up to 300 requests per minute." + } + } + } + } + }, + "headers": { + "Retry-After": { + "description": "Seconds to wait before retrying.", + "schema": { + "type": "integer", + "minimum": 1, + "example": 30 + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.submit_kyb_parties(\n \"33333333-4444-5555-6666-777777777777\",\n locale=\"es\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.submitKybParties(\"33333333-4444-5555-6666-777777777777\", {\n locale: \"es\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.SubmitKYBParties(ctx, \"33333333-4444-5555-6666-777777777777\", didit.SessionsSubmitKYBPartiesParams{\n\tLocale: didit.String(\"es\"),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.SessionsSubmitKybPartiesParams;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().submitKybParties(\"33333333-4444-5555-6666-777777777777\", SessionsSubmitKybPartiesParams.builder()\n .locale(\"es\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->submitKybParties('33333333-4444-5555-6666-777777777777', [\n 'locale' => 'es',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.submit_kyb_parties(\n \"33333333-4444-5555-6666-777777777777\",\n locale: \"es\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.SubmitKybPartiesAsync(\"33333333-4444-5555-6666-777777777777\", new SessionsSubmitKybPartiesParams\n{\n Locale = \"es\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + } + }, + "/v3/session/{sessionId}/files-export/": { + "post": { + "summary": "Export every file of a session", + "description": "Start preparing one ZIP with every image, video and document of a User Verification (KYC) or Business Verification (KYB) session, in original quality: the files are stored in the ZIP as they were captured, never recompressed. Answers `202` with the export; read it with `GET /v3/session/{sessionId}/files-export/{exportId}/` until `status` is `READY`, then download `download_url`. While an export of the same session is still being prepared, that export is returned instead of a new one.\n\nThe ZIP is deleted 24 hours after it is ready, and at once when the session is deleted. A deleted session cannot be exported. Every export and every download link handed out is written to the session's audit log. A scoped API key needs `media: read` and `decisions: read`; a console user needs the privilege to read sessions.", + "operationId": "post_v3_session_files_export", + "x-didit-sdk": { + "resource": "sessions", + "method": "export_files", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs. A deleted session returns `404`.", + "schema": { + "type": "string", + "format": "uuid", + "example": "11111111-2222-3333-4444-555555555555" + } + } + ], + "x-codeSamples": [ + { + "lang": "curl", + "label": "curl", + "source": "curl -X POST 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/files-export/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.export_files(\n \"11111111-2222-3333-4444-555555555555\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.exportFiles(\"11111111-2222-3333-4444-555555555555\");\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.ExportFiles(ctx, \"11111111-2222-3333-4444-555555555555\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().exportFiles(\"11111111-2222-3333-4444-555555555555\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->exportFiles('11111111-2222-3333-4444-555555555555');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.export_files(\"11111111-2222-3333-4444-555555555555\")\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.ExportFilesAsync(\"11111111-2222-3333-4444-555555555555\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ], + "responses": { + "202": { + "description": "The export, being prepared.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionFilesExport" + }, + "example": { + "export_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "session_id": "11111111-2222-3333-4444-555555555555", + "status": "PENDING", + "file_count": null, + "size_bytes": null, + "download_url": null, + "expires_at": null, + "error": null, + "created_at": "2026-10-29T12:00:03Z", + "completed_at": null + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ] + } + }, + "/v3/session/{sessionId}/files-export/{exportId}/": { + "get": { + "summary": "Get a session files export", + "description": "Progress of an export started with `POST /v3/session/{sessionId}/files-export/`. Once `status` is `READY`, `download_url` is a signed URL of the ZIP that stays valid for a short time; read the export again for a new one until `expires_at`. Each read that hands out a download link is written to the session's audit log. An export of a deleted session returns `404`.", + "operationId": "get_v3_session_files_export", + "x-didit-sdk": { + "resource": "sessions", + "method": "get_files_export", + "auth": "api_key", + "server": true + }, + "tags": [ + "Sessions" + ], + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs. A deleted session returns `404`.", + "schema": { + "type": "string", + "format": "uuid", + "example": "11111111-2222-3333-4444-555555555555" + } + }, + { + "name": "exportId", + "in": "path", + "required": true, + "description": "The `export_id` returned by `POST /v3/session/{sessionId}/files-export/`.", + "schema": { + "type": "string", + "format": "uuid", + "example": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" + } + } + ], + "x-codeSamples": [ + { + "lang": "curl", + "label": "curl", + "source": "curl -X GET 'https://verification.didit.me/v3/session/11111111-2222-3333-4444-555555555555/files-export/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/' \\\n -H 'x-api-key: YOUR_API_KEY'" + }, + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.sessions.get_files_export(\n \"11111111-2222-3333-4444-555555555555\",\n \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.sessions.getFilesExport(\n \"11111111-2222-3333-4444-555555555555\",\n \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n);\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Sessions.GetFilesExport(ctx, \"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\")\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.sessions().getFilesExport(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "sessions->getFilesExport('11111111-2222-3333-4444-555555555555', 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee');\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.sessions.get_files_export(\n \"11111111-2222-3333-4444-555555555555\",\n \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.Sessions.GetFilesExportAsync(\"11111111-2222-3333-4444-555555555555\", \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\");\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ], + "responses": { + "200": { + "description": "The export.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionFilesExport" + }, + "example": { + "export_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "session_id": "11111111-2222-3333-4444-555555555555", + "status": "READY", + "file_count": 9, + "size_bytes": 18734120, + "download_url": "https://storage.example.com/session/11111111-2222-3333-4444-555555555555/files-export/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/session-42-files.zip?X-Amz-Signature=...", + "expires_at": "2026-10-30T12:00:41Z", + "error": null, + "created_at": "2026-10-29T12:00:03Z", + "completed_at": "2026-10-29T12:00:41Z" + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + } + }, + "security": [ + { + "ApiKeyAuth": [] + } + ] + } + }, + "/v3/travel-rule/unmatched/": { + "get": { + "summary": "List unmatched Travel Rule deposits", + "description": "Inbound deposits that are still waiting for the originating VASP's Travel Rule data: their transfer is `AWAITING_COUNTERPARTY`, `NOT_ENOUGH_COUNTERPARTY_DATA` or `COUNTERPARTY_VASP_NOT_FOUND`, no received message is paired with them, and nobody matched them by hand. The rows and the filters are the same as in `GET /v3/travel-rule/transfers/`, newest first, paginated with `limit` (default 50) and `offset`. Pair a deposit with the message the originating VASP sent with `POST /v3/travel-rule/unmatched/{transaction_uuid}/match/`.", + "operationId": "listUnmatchedTravelRuleDeposits", + "x-didit-sdk": { + "resource": "travel_rule.unmatched_deposits", + "method": "list", + "auth": "api_key", + "server": true + }, + "tags": [ + "Travel Rule" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "direction", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "INBOUND, OUTBOUND, or both comma-separated. Case-sensitive." + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "One or more transfer statuses, comma-separated." + }, + { + "name": "rail", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "One or more of INTERNAL, TRP, GTR, TRUST, VERIFYVASP, SYGNA, EMAIL, TEST_VASP, comma-separated." + }, + { + "name": "kind", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "withdrawal, deposit or message, comma-separated." + }, + { + "name": "currency", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "description": "The transaction's currency, case-insensitive." + }, + { + "name": "start_date", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date" + }, + "description": "Transfers created on or after this day (UTC), YYYY-MM-DD." + }, + { + "name": "end_date", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "date" + }, + "description": "Transfers created on or before this day (UTC), YYYY-MM-DD." + }, + { + "name": "counterparty", + "in": "query", + "required": false, + "schema": { + "type": "string", + "format": "uuid" + }, + "description": "The `id` of a directory entry or Didit network member from GET /v3/travel-rule/vasps/: your transfers with that counterparty. A value that is not a valid id answers 400." + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 1000000 + }, + "description": "Page size, default 50." + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 0, + "maximum": 1000000 + }, + "description": "Rows to skip." + } + ], + "responses": { + "200": { + "description": "A page of unmatched deposits.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "integer" + }, + "next": { + "type": "string", + "nullable": true + }, + "previous": { + "type": "string", + "nullable": true + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TravelRuleTransferRow" + } + } + } + }, + "example": { + "count": 1, + "next": null, + "previous": null, + "results": [ + { + "id": "7d3a1c55-0b9e-4d52-8a3c-1f6e2b9d4a08", + "transaction_id": "c41f9b2e-5a8d-4e0c-9f17-3b6d8a2e5c91", + "txn_id": "dep-2026-10-20-0007", + "txn_date": "2026-10-19T08:41:12Z", + "kind": "deposit", + "direction": "INBOUND", + "status": "AWAITING_COUNTERPARTY", + "rail": "TRP", + "asset": "ETH", + "amount": "1.25", + "originator_vasp": "", + "beneficiary_vasp": "Example Counterparty VASP", + "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7", + "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb", + "originator_memo": "", + "beneficiary_memo": "", + "originator_wallet_type": "vasp", + "beneficiary_wallet_type": "vasp", + "matched_transaction_id": null, + "deadline_at": null, + "created_at": "2026-10-19T08:41:13Z" + } + ] + } + } + } + }, + "400": { + "description": "A filter value is not valid.", + "content": { + "application/json": { + "example": { + "start_date": [ + "Use the YYYY-MM-DD format." + ] + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nfor item in client.travel_rule.unmatched_deposits.list():\n print(item)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nfor await (const item of didit.travelRule.unmatchedDeposits.list()) {\n console.log(item);\n}" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\niter := client.TravelRule.UnmatchedDeposits.ListAutoPaging(ctx, didit.TravelRuleUnmatchedDepositsListParams{})\nfor iter.Next() {\n\tfmt.Printf(\"%+v\\n\", iter.Current())\n}\nif err := iter.Err(); err != nil {\n\tlog.Fatal(err)\n}" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nfor (var item : client.travelRule().unmatchedDeposits().list()) {\n System.out.println(item);\n}" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->unmatchedDeposits->list() as $item) {\n print_r($item->toArray());\n}" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\ndidit.travel_rule.unmatched_deposits.list.auto_paging_each do |item|\n puts item.to_h\nend" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nawait foreach (var item in await client.TravelRule.UnmatchedDeposits.ListAsync())\n{\n Console.WriteLine(JsonSerializer.Serialize(item));\n}" + } + ] + } + }, + "/v3/travel-rule/unmatched/{transaction_uuid}/match/": { + "post": { + "summary": "Match a Travel Rule deposit to a received message", + "operationId": "matchUnmatchedTravelRuleDeposit", + "x-didit-sdk": { + "resource": "travel_rule.unmatched_deposits", + "method": "match", + "auth": "api_key", + "server": true + }, + "tags": [ + "Travel Rule" + ], + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Pair an inbound deposit that is still waiting for originator data with the Travel Rule message the originating VASP sent for it. The deposit takes the message's originator data, counterparty VASP and rail, and both transfers record the match on their timelines. `transaction_uuid` is the deposit's `transaction_id` from `GET /v3/travel-rule/unmatched/`. `transaction_id` in the body is the received message's `transaction_id`, from a row of `GET /v3/travel-rule/transfers/?kind=message`; the transfer's own `id` is not found. The message must be for the same asset as the deposit. A deposit or message deleted from the Console answers `404`; one that has already moved on (matched, or no longer waiting) answers `409`.", + "parameters": [ + { + "name": "transaction_uuid", + "in": "path", + "required": true, + "description": "The `transaction_id` of the unmatched deposit.", + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TravelRuleManualMatchRequest" + }, + "example": { + "transaction_id": "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24" + } + } + } + }, + "responses": { + "200": { + "description": "Both transfers after the match.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TravelRuleManualMatchResponse" + }, + "example": { + "deposit": { + "id": "7d3a1c55-0b9e-4d52-8a3c-1f6e2b9d4a08", + "transaction_id": "c41f9b2e-5a8d-4e0c-9f17-3b6d8a2e5c91", + "txn_id": "dep-2026-10-20-0007", + "txn_date": "2026-10-19T08:41:12Z", + "kind": "deposit", + "direction": "INBOUND", + "status": "AWAITING_COUNTERPARTY", + "rail": "TRP", + "asset": "ETH", + "amount": "1.25", + "originator_vasp": "Example Counterparty VASP", + "beneficiary_vasp": "Example Counterparty VASP", + "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7", + "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb", + "originator_memo": "", + "beneficiary_memo": "", + "originator_wallet_type": "vasp", + "beneficiary_wallet_type": "vasp", + "matched_transaction_id": "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24", + "deadline_at": null, + "created_at": "2026-10-19T08:41:13Z" + }, + "message": { + "id": "2b8e6f10-9c3a-47d1-b5e2-0a4c7d9f3e66", + "transaction_id": "e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24", + "txn_id": "msg-2026-10-20-0003", + "txn_date": "2026-10-19T08:41:12Z", + "kind": "message", + "direction": "INBOUND", + "status": "COMPLETED", + "rail": "TRP", + "asset": "ETH", + "amount": "1.25", + "originator_vasp": "Origin CASP SL", + "beneficiary_vasp": "Example Counterparty VASP", + "originator_wallet": "0x77ccff0cc624a53cd8b8d8703ced826710211ec7", + "beneficiary_wallet": "0xede2d7e4f5b097e6391ab6bbcf2f47a53f4778cb", + "originator_memo": "", + "beneficiary_memo": "", + "originator_wallet_type": "vasp", + "beneficiary_wallet_type": "vasp", + "matched_transaction_id": null, + "deadline_at": "2026-10-21T08:41:13Z", + "created_at": "2026-10-19T08:41:13Z" + } + } + } + } + }, + "400": { + "description": "Validation error: `transaction_id` is missing, is the deposit itself, is not a received Travel Rule message, or is for a different asset than the deposit; or the transaction in the path is not an inbound deposit.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + }, + "examples": { + "Error": { + "value": { + "transaction_id": [ + "The travel rule message is for a different asset than the deposit." + ] + } + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "description": "Unknown deposit or message, or one of them was deleted.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + }, + "example": { + "detail": "No TravelRuleTransfer matches the given query." + } + } + } + }, + "409": { + "description": "The deposit is no longer waiting for originator data, or the message is already matched to a deposit.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "detail": { + "type": "string" + } + } + }, + "examples": { + "Error": { + "value": { + "detail": "This deposit is no longer waiting for originator data." + } + } + } + } + } + } + }, + "x-codeSamples": [ + { + "lang": "python", + "label": "Python", + "source": "from didit import Didit\n\n# Reads DIDIT_API_KEY.\nclient = Didit()\n\nresult = client.travel_rule.unmatched_deposits.match(\n \"11111111-2222-3333-4444-555555555555\",\n transaction_id=\"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n)\nprint(result)" + }, + { + "lang": "javascript", + "label": "Node.js", + "source": "import Didit from \"@didit-protocol/sdk-node\";\n\n// Reads DIDIT_API_KEY.\nconst didit = new Didit();\n\nconst result = await didit.travelRule.unmatchedDeposits.match(\"11111111-2222-3333-4444-555555555555\", {\n transaction_id: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n});\nconsole.log(result);" + }, + { + "lang": "go", + "label": "Go", + "source": "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.TravelRule.UnmatchedDeposits.Match(ctx, \"11111111-2222-3333-4444-555555555555\", didit.TravelRuleManualMatchRequest{\n\tTransactionID: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)" + }, + { + "lang": "java", + "label": "Java", + "source": "import me.didit.Didit;\nimport me.didit.types.TravelRuleManualMatchRequest;\n\n// Reads DIDIT_API_KEY.\nDidit client = new Didit();\n\nvar result = client.travelRule().unmatchedDeposits().match(\"11111111-2222-3333-4444-555555555555\", TravelRuleManualMatchRequest.builder()\n .transactionId(\"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\")\n .build());\nSystem.out.println(result);" + }, + { + "lang": "php", + "label": "PHP", + "source": "travelRule->unmatchedDeposits->match('11111111-2222-3333-4444-555555555555', [\n 'transaction_id' => 'e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24',\n]);\nprint_r($result->toArray());" + }, + { + "lang": "ruby", + "label": "Ruby", + "source": "require \"didit\"\n\n# Reads DIDIT_API_KEY.\ndidit = Didit::Client.new\n\nresult = didit.travel_rule.unmatched_deposits.match(\n \"11111111-2222-3333-4444-555555555555\",\n transaction_id: \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\"\n)\nputs result.to_h" + }, + { + "lang": "csharp", + "label": ".NET", + "source": "using System;\nusing System.Text.Json;\nusing Didit;\n\n// Reads DIDIT_API_KEY.\nusing var client = new DiditClient();\n\nvar result = await client.TravelRule.UnmatchedDeposits.MatchAsync(\"11111111-2222-3333-4444-555555555555\", new TravelRuleManualMatchRequest\n{\n TransactionId = \"e90a4d7b-1c2f-4b83-a6d5-8f0e3c1b7a24\",\n});\nConsole.WriteLine(JsonSerializer.Serialize(result));" + } + ] + } } }, "components": { @@ -75786,6 +91970,7 @@ "transaction.status.updated", "travel_rule.status.updated", "workflow.compliance_changed", + "transaction_rule_suggestions.created", "auth.signup", "auth.login", "auth.login_failed", @@ -76071,6 +92256,14 @@ }, "phone_social": { "$ref": "#/components/schemas/PhoneSocialFootprint" + }, + "phone_intelligence": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneIntelligence" + } + ], + "description": "Phone intelligence signals. Present only when `enable_enrichment` was `true` on the check." } } }, @@ -76356,6 +92549,14 @@ }, "email_social": { "$ref": "#/components/schemas/EmailSocialFootprint" + }, + "email_intelligence": { + "allOf": [ + { + "$ref": "#/components/schemas/EmailIntelligence" + } + ], + "description": "Email intelligence signals. Present only when `enable_enrichment` was `true` on the check." } } }, @@ -76678,7 +92879,7 @@ }, "config": { "type": "object", - "description": "Feature-specific settings. For `QUESTIONNAIRE`, include `questionnaire_uuid` with the `questionnaire_id` returned by the questionnaire create endpoint. For `OCR`, `methods` selects which ID Verification methods each country may use (document capture, non-doc lookup against a government or other authoritative source, and digital identity wallets); omit it and every country is document capture only. For `SIGNATURE`, see [Electronic Signature settings](/management-api/workflows/feature-configs#electronic-signature): `signature_level` accepts `aes` only for now, and workflow documents and their fields are managed in the console, so through the API send documents and fields per session with `signature_documents_source: \"session\"`.", + "description": "Feature-specific settings. For `QUESTIONNAIRE`, include `questionnaire_uuid` with the `questionnaire_id` returned by the questionnaire create endpoint. For `SIGNATURE`, a workflow that goes live needs a document to sign: set `signature_documents_source` to `session` or `both` so each session can bring its own, or send `status: \"draft\"` and add the documents before you publish. `signature_level: \"aes\"` is refused with `aes_not_available` while `signature_availability.aes` is `false` on the workflow. For `OCR`, `methods` selects which ID Verification methods each country may use (document capture, non-doc lookup against a government or other authoritative source, and digital identity wallets); omit it and every country is document capture only. For `SIGNATURE`, see [E-signature settings](/management-api/workflows/feature-configs#e-signature): `signature_level` accepts `simple` (the default, no ID verification, email or phone needed) and `aes` for now, and workflow documents and their fields are managed in the console, so through the API send documents and fields per session with `signature_documents_source: \"session\"`.", "additionalProperties": true }, "label": { @@ -78280,7 +94481,7 @@ } } }, - "description": "Alerts raised by rules and providers." + "description": "Always empty today. An open alert is a transaction with status `IN_REVIEW` or `AWAITING_USER`." }, "rule_runs": { "type": "array", @@ -81951,7 +98152,7 @@ "description": "Comparison operator. in/not_in test membership (value may be a list or a single scalar). contains/not_contains are case-insensitive substring checks against a string value. contains_any takes a list of strings and matches when any is a case-insensitive substring of the field value. regex matches the value pattern against the field. fuzzy_match compares against the value string with the required `score` threshold (0-100). gt/gte/lt/lte never match when either side is missing. exists/is_not_empty/is_not_null (aliases) and not_exists/is_empty/is_null (aliases) are presence checks that ignore `value`." }, "value": { - "description": "Comparison value. Its shape depends on the operator and value_type; omit for the presence-check operators." + "description": "Comparison value. Its shape depends on the operator and value_type; omit it for the presence-check operators. Every other operator needs a value that is not `null` or an empty list, otherwise the rule is refused with `400`. `contains_any` needs a list of strings, and `contains`, `not_contains` and `regex` need a single string." }, "value_type": { "type": "string", @@ -83964,9 +100165,36 @@ "reason_codes": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Stable Didit identifier of the signal, for example `IR-5AC67A32`. Opaque: group and filter on it, do not parse it." + }, + "value": { + "nullable": true, + "description": "For a risk flag (for example `voip`, `leaked`, `disposable`, `spam_trap`), its value: a boolean, a level or a date. Null for a scored reason code." + }, + "direction": { + "type": "string", + "enum": [ + "risk", + "trust" + ], + "description": "Whether the signal raised the risk or added trust." + }, + "message": { + "type": "string", + "description": "Human-readable explanation of the signal, in English." + }, + "impact_level": { + "type": "string", + "nullable": true, + "description": "How strongly the signal moved the score, for example `low`, `medium` or `high`." + } + } }, - "description": "Machine-readable codes explaining the score. Values can grow over time, so do not reject unknown codes." + "description": "Signals that explain the score, each with a stable Didit code, a direction, a message and an impact level. New codes can appear over time, so do not reject unknown codes." } } }, @@ -84027,9 +100255,36 @@ "reason_codes": { "type": "array", "items": { - "type": "string" + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Stable Didit identifier of the signal, for example `IR-5AC67A32`. Opaque: group and filter on it, do not parse it." + }, + "value": { + "nullable": true, + "description": "For a risk flag (for example `voip`, `leaked`, `disposable`, `spam_trap`), its value: a boolean, a level or a date. Null for a scored reason code." + }, + "direction": { + "type": "string", + "enum": [ + "risk", + "trust" + ], + "description": "Whether the signal raised the risk or added trust." + }, + "message": { + "type": "string", + "description": "Human-readable explanation of the signal, in English." + }, + "impact_level": { + "type": "string", + "nullable": true, + "description": "How strongly the signal moved the score, for example `low`, `medium` or `high`." + } + } }, - "description": "Machine-readable codes explaining the score. Values can grow over time, so do not reject unknown codes." + "description": "Signals that explain the score, each with a stable Didit code, a direction, a message and an impact level. New codes can appear over time, so do not reject unknown codes." } } }, @@ -85170,6 +101425,456 @@ "unresolved" ] }, + "KYBRegistryData": { + "type": "object", + "nullable": true, + "description": "Didit's normalized registry detail for the company: the ownership outcome (`ownership_error`, `section_errors`, `ubo_resolution`, `lite_enrichment`), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (`addresses`, `industries`, `ownership`, `beneficial_owners[].shareholding`) for anything they cover.", + "properties": { + "company_name": { + "type": "string", + "description": "Company name as corrected in the console." + }, + "registration_number": { + "type": "string", + "description": "Registration number as the registry or a console correction states it." + }, + "country_code": { + "type": "string", + "description": "Country of the registration as the registry or a console correction states it." + }, + "region": { + "type": "string", + "description": "Region or state of the registration." + }, + "incorporation_date": { + "type": "string", + "description": "Incorporation date (ISO 8601)." + }, + "registration_date": { + "type": "string", + "description": "Registration date (ISO 8601) when the registry states one apart from the incorporation date." + }, + "dissolution_date": { + "type": "string", + "description": "Dissolution date (ISO 8601) when the registry states one." + }, + "tax_number": { + "type": "string", + "description": "Tax identification number." + }, + "vat_number": { + "type": "string", + "description": "VAT number." + }, + "legal_address": { + "type": "string", + "description": "Legal address as corrected in the console." + }, + "registered_address": { + "type": "string", + "description": "Registered address as the registry states it." + }, + "company_type": { + "type": "string", + "description": "Legal form." + }, + "registry_status": { + "type": "string", + "description": "Company status at the registry." + }, + "verification_status": { + "type": "string", + "description": "Verification status." + }, + "alternative_names": { + "type": "string", + "description": "Other names the company trades or traded under." + }, + "nature_of_business": { + "type": "string", + "description": "Activity description." + }, + "registered_capital": { + "type": "string", + "description": "Registered capital as printed." + }, + "registered_capital_amount": { + "type": "string", + "description": "Registered capital amount, as a decimal string." + }, + "registered_capital_currency": { + "type": "string", + "description": "Registered capital currency (ISO 4217)." + }, + "website": { + "type": "string", + "description": "Website." + }, + "email": { + "type": "string", + "description": "Contact email." + }, + "phone": { + "type": "string", + "description": "Contact phone." + }, + "legal_entity_identifier": { + "type": "string", + "description": "Legal Entity Identifier (LEI)." + }, + "location_of_registration": { + "type": "string", + "description": "Place of registration." + }, + "control_scheme": { + "type": "string", + "description": "Governance scheme when the registry exposes it." + }, + "ownership_error": { + "type": "string", + "enum": [ + "no_owners_on_record", + "no_natural_person_owner", + "ownership_section_unavailable", + "company_not_found", + "ambiguous_company_match", + "missing_registration_number", + "entity_type_not_covered", + "provider_unavailable", + "other" + ], + "description": "Why a requested ownership tier was not delivered, in the same codes as `ownership.unavailable_reason`. `no_owners_on_record` (the registry answered and names no owner) and `ownership_section_unavailable` (the registry did not return the ownership section) are different findings." + }, + "section_errors": { + "type": "object", + "description": "Sections the registry did not return, keyed by section (`officers`, `shareholders`, `group_structure`). A section listed here was never delivered: an empty list next to it says nothing about the company.", + "additionalProperties": { + "$ref": "#/components/schemas/KYBRegistrySectionError" + } + }, + "ubo_resolution": { + "$ref": "#/components/schemas/KYBRegistryUboResolution" + }, + "lite_enrichment": { + "$ref": "#/components/schemas/KYBRegistryLiteEnrichment" + }, + "registry_metadata": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + "description": "The register's own fields for the company, keyed as the register names them, as plain values (legacy records). Only fields reviewed as registry facts are included." + }, + "registry_sources": { + "type": "array", + "description": "The official registers the record was read from (legacy records). Other sources are not named.", + "items": { + "$ref": "#/components/schemas/KYBRegistrySource" + } + }, + "previous_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Names the company was registered under before (legacy records)." + }, + "parent_companies": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Parent companies the registry names (legacy records)." + }, + "documents_available": { + "type": "integer", + "description": "How many filings the registry offers for the company (legacy records)." + } + } + }, + "KYBRegistryGroupCompany": { + "type": "object", + "description": "A company of the corporate group, by its registry identity.", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Company name." + }, + "country_code": { + "type": "string", + "nullable": true, + "description": "Country of registration." + }, + "registration_number": { + "type": "string", + "nullable": true, + "description": "Registration number." + } + }, + "required": [ + "name", + "country_code", + "registration_number" + ] + }, + "KYBRegistryUboResolution": { + "type": "object", + "description": "How the UBO tier walked the ownership chain above the company.", + "properties": { + "parent_chain": { + "type": "array", + "description": "Corporate parents from the ultimate parent down to the company.", + "items": { + "$ref": "#/components/schemas/KYBRegistryGroupCompany" + } + }, + "subsidiaries": { + "type": "array", + "description": "Companies directly below the company in its corporate group.", + "items": { + "$ref": "#/components/schemas/KYBRegistryGroupCompany" + } + }, + "unresolved": { + "type": "array", + "description": "Parts of the chain the registry could not resolve (the same entries as `ownership.unresolved`).", + "items": { + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "Why, for example `no_group_structure_on_record`, `selected_company_not_in_group_structure` or `section_error`." + }, + "section": { + "type": "string", + "nullable": true, + "description": "The section concerned, for example `group_structure`." + } + }, + "required": [ + "reason", + "section" + ] + } + } + }, + "required": [ + "parent_chain", + "subsidiaries", + "unresolved" + ] + }, + "KYBRegistrySectionError": { + "type": "object", + "description": "A section the registry did not return.", + "properties": { + "status_code": { + "type": "integer", + "nullable": true, + "description": "The status the registry answered for the section." + } + }, + "required": [ + "status_code" + ] + }, + "KYBRegistryLiteEnrichment": { + "type": "object", + "description": "Blank Lite profile fields another of the country's registry sources filled. The source is not named.", + "properties": { + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The company fields that were filled." + }, + "people_added": { + "type": "integer", + "description": "How many officers or owners were added." + } + }, + "required": [ + "fields", + "people_added" + ] + }, + "KYBRegistrySource": { + "type": "object", + "description": "An official register the record was read from. Only official government registers, regulators and the official identifier system are named; any other source is left out.", + "properties": { + "name": { + "type": "string", + "description": "Register name, for example `UK Companies House`." + }, + "source_type": { + "type": "string", + "enum": [ + "official" + ], + "description": "Always `official`." + } + }, + "required": [ + "name", + "source_type" + ] + }, + "KYBOwnershipStructure": { + "type": "object", + "nullable": true, + "description": "The cap table the registry proved, as it stood when the ownership tier was delivered: direct `shareholders` and `beneficial_owners`. Null when the registry proved no ownership. It never carries the registry source's own rows; read `company.beneficial_owners` and `company.ownership` for the current record.", + "properties": { + "shareholders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KYBOwnershipStructureOwner" + } + }, + "beneficial_owners": { + "type": "array", + "items": { + "$ref": "#/components/schemas/KYBOwnershipStructureOwner" + } + } + }, + "required": [ + "shareholders", + "beneficial_owners" + ] + }, + "KYBOwnershipStructureOwner": { + "type": "object", + "description": "One owner of the ownership snapshot: the same registry identity and stake as `company.beneficial_owners[]`, and its canonical `shareholding`.", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "Owner name as the registry states it." + }, + "first_name": { + "type": "string", + "nullable": true, + "description": "Given name, for a natural person, when the registry states it." + }, + "last_name": { + "type": "string", + "nullable": true, + "description": "Family name, for a natural person, when the registry states it." + }, + "date_of_birth": { + "type": "string", + "nullable": true, + "description": "Date of birth (ISO 8601) when the registry publishes it." + }, + "country_of_birth": { + "type": "string", + "nullable": true, + "description": "Country of birth when the registry publishes it." + }, + "company_name": { + "type": "string", + "nullable": true, + "description": "Company name, for a corporate owner." + }, + "registration_number": { + "type": "string", + "nullable": true, + "description": "Registration number, for a corporate owner." + }, + "entity_type": { + "type": "string", + "nullable": true, + "enum": [ + "person", + "company", + null + ], + "description": "Whether the owner is a natural person or a company." + }, + "nationality": { + "type": "string", + "nullable": true, + "description": "Nationality when the registry states it." + }, + "designation": { + "type": "string", + "nullable": true, + "description": "The owner's title or role as the registry prints it." + }, + "roles": { + "type": "array", + "items": { + "type": "string" + }, + "description": "`shareholder` for a direct holder, `ubo` for a beneficial owner." + }, + "ownership_min_shares": { + "type": "string", + "nullable": true, + "description": "Lower bound of the stake, in percent (equal to the upper bound for an exact stake)." + }, + "ownership_max_shares": { + "type": "string", + "nullable": true, + "description": "Upper bound of the stake, in percent." + }, + "voting_min_shares": { + "type": "string", + "nullable": true, + "description": "Lower bound of the voting rights, in percent." + }, + "voting_max_shares": { + "type": "string", + "nullable": true, + "description": "Upper bound of the voting rights, in percent." + }, + "appointment_date": { + "type": "string", + "nullable": true, + "description": "Date the holding or appointment started (ISO 8601)." + }, + "is_active": { + "type": "boolean", + "nullable": true, + "description": "False for a former owner." + }, + "shareholding": { + "$ref": "#/components/schemas/KYBRegistryShareholding" + } + }, + "required": [ + "name", + "first_name", + "last_name", + "date_of_birth", + "country_of_birth", + "company_name", + "registration_number", + "entity_type", + "nationality", + "designation", + "roles", + "ownership_min_shares", + "ownership_max_shares", + "voting_min_shares", + "voting_max_shares", + "appointment_date", + "is_active", + "shareholding" + ] + }, "DigitalIdWalletApiWalletVerificationError": { "type": "object", "properties": { @@ -85410,13 +102115,21 @@ "$ref": "#/components/schemas/DigitalIdWalletApiWalletNextActionTypeEnum" } ], - "description": "redirect: send the user's browser to url. confirm_in_app: show verification_code to the user, who checks it matches the code in their wallet app and confirms there; then poll.\n\n* `redirect` - redirect\n* `confirm_in_app` - confirm_in_app" + "description": "redirect: send the user's browser to url. confirm_in_app: show verification_code to the user, who checks it matches the code in their wallet app and confirms there; then poll. request_digital_credential: in a user gesture on the origin you started with, ask the wallet with digital_credentials.request, then send what it returns to POST .../verifications/{request_id}/response/.\n\n* `redirect` - redirect\n* `confirm_in_app` - confirm_in_app\n* `request_digital_credential` - request_digital_credential" }, "url": { "type": "string", "format": "uri", "description": "redirect only: where the user signs in with the wallet." }, + "digital_credentials": { + "allOf": [ + { + "$ref": "#/components/schemas/DigitalIdWalletApiWalletDigitalCredentialsRequest" + } + ], + "description": "request_digital_credential only: the request to hand to the wallet." + }, "verification_code": { "type": "string", "description": "confirm_in_app only: the 4-digit comparison code the wallet app shows too." @@ -85433,18 +102146,20 @@ "DigitalIdWalletApiWalletNextActionTypeEnum": { "enum": [ "redirect", - "confirm_in_app" + "confirm_in_app", + "request_digital_credential" ], "type": "string", - "description": "* `redirect` - redirect\n* `confirm_in_app` - confirm_in_app" + "description": "* `redirect` - redirect\n* `confirm_in_app` - confirm_in_app\n* `request_digital_credential` - request_digital_credential" }, "DigitalIdWalletApiInteractionEnum": { "enum": [ "redirect", - "in_app" + "in_app", + "digital_credentials" ], "type": "string", - "description": "* `redirect` - redirect\n* `in_app` - in_app" + "description": "* `redirect` - redirect\n* `in_app` - in_app\n* `digital_credentials` - digital_credentials" }, "DigitalIdWalletApiWalletVerificationResultOutcomeEnum": { "enum": [ @@ -89802,7 +106517,7 @@ }, "SignatureResult": { "type": "object", - "description": "One signer's result for one Electronic Signature step. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature).", + "description": "One signer's result for one E-signature step. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature).", "properties": { "id": { "type": "string", @@ -89838,21 +106553,24 @@ "level": { "type": "string", "enum": [ + "simple", "aes", "qes" ], - "description": "`aes`. `qes` (Qualified Electronic Signature, QES) is coming soon." + "description": "`simple` (default) or `aes`. `qes` (Qualified Electronic Signature, QES) is an add-on that is not available yet." }, "format": { "type": "string", "enum": [ + "pdf", "pades" - ] + ], + "description": "`pdf` for a Simple signature, `pades` for Advanced (AES)." }, "profile": { "type": "string", "nullable": true, - "description": "`PAdES-B-LT` once signed." + "description": "`PAdES-B-LT` once an Advanced (AES) signature is signed, otherwise null." }, "signer": { "type": "object", @@ -89860,7 +106578,7 @@ "name": { "type": "string", "nullable": true, - "description": "Verified name." + "description": "The signer's name. Verified (from the approved ID verification or the session) except at the Simple level without a verified session name, where it is the name the signer typed and is not verified." }, "capacity": { "type": "string", @@ -89894,6 +106612,7 @@ }, "identity_used": { "type": "object", + "description": "The verified identity the signature relies on. Empty for a Simple signature with no verified identity.", "properties": { "session_id": { "type": "string", @@ -89917,7 +106636,7 @@ "certificate": { "type": "object", "nullable": true, - "description": "The certificate the documents were signed with. `null` until signed.", + "description": "The certificate the documents were signed with. `null` until signed, and always `null` for a Simple signature.", "properties": { "issuer": { "type": "string" @@ -89944,10 +106663,12 @@ "properties": { "channel": { "type": "string", + "nullable": true, "enum": [ "email", "sms" - ] + ], + "description": "`null` for a Simple signature, which has no code." }, "destination": { "type": "string", @@ -89968,7 +106689,7 @@ "timestamp": { "type": "object", "nullable": true, - "description": "The trusted timestamp in the signature. `null` until signed.", + "description": "The RFC 3161 timestamp in the signature, issued by Didit. `null` until signed, and always `null` for a Simple signature.", "properties": { "time": { "type": "string", @@ -90150,7 +106871,7 @@ }, "warnings": { "type": "array", - "description": "Warnings raised for this signer. See [Electronic Signature warnings](/core-technology/electronic-signature/warnings-electronic-signature).", + "description": "Warnings raised for this signer. See [E-signature warnings](/core-technology/electronic-signature/warnings-electronic-signature).", "items": { "type": "object", "properties": { @@ -90232,7 +106953,7 @@ "certificate": { "type": "object", "nullable": true, - "description": "The certificate the documents were signed with. `null` until signed.", + "description": "The certificate the documents were signed with. `null` until signed, and always `null` for a Simple signature.", "properties": { "issuer": { "type": "string" @@ -90257,7 +106978,7 @@ "timestamp": { "type": "object", "nullable": true, - "description": "The trusted timestamp in the signature. `null` until signed.", + "description": "The RFC 3161 timestamp in the signature, issued by Didit. `null` until signed, and always `null` for a Simple signature.", "properties": { "time": { "type": "string", @@ -91747,6 +108468,11 @@ "nullable": true, "description": "For a session cloned with `POST /v3/session/import-shared/`: the `session_id` of the original session in the source application. `null` for every other session. Omitted when `include=events` is passed." }, + "shared_from_session_number": { + "type": "integer", + "nullable": true, + "description": "`session_number` of the source session when this session was imported from another application of your organization. `null` otherwise." + }, "session_number": { "type": "integer", "description": "The number of the session.", @@ -91774,6 +108500,213 @@ ], "description": "Overall lifecycle status of the session — the rolled-up workflow result. Terminal values are `Approved`, `Declined`, `In Review`, `Expired`, `Kyc Expired`, and `Abandoned`; `Not Started`, `In Progress`, `Awaiting User`, and `Resubmitted` indicate the session is still moving through the workflow." }, + "status_override": { + "type": "object", + "nullable": true, + "description": "Present when a reviewer set `status` by hand. `null` when the status is the automatic one. Use it to tell a manual approval from an automatic one.", + "properties": { + "overridden_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "automatic_status": { + "type": "string", + "nullable": true, + "description": "The status the platform's own checks conclude." + } + } + }, + "decision_trace": { + "type": "object", + "description": "How the status was reached: who set it and which warnings did.", + "properties": { + "status": { + "type": "string", + "description": "The session status." + }, + "decided_by": { + "type": "string", + "nullable": true, + "enum": [ + "manual", + "automatic", + "investigator", + null + ], + "description": "Who set the status. `null` while the session is not decided." + }, + "decided_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "automatic_status": { + "type": "string", + "nullable": true, + "description": "What the platform's own checks conclude, which differs from `status` after a manual decision." + }, + "terminal_node_id": { + "type": "string", + "nullable": true, + "description": "The workflow status node that ended the session, when one did." + }, + "actor": { + "type": "object", + "nullable": true, + "description": "The reviewer behind a manual decision.", + "properties": { + "user": { + "type": "string", + "nullable": true + }, + "actor_type": { + "type": "string", + "nullable": true + } + } + }, + "warning_counts": { + "type": "object", + "description": "Warnings per `log_type` (`error`, `warning`, `information`) and `total`.", + "additionalProperties": { + "type": "integer" + } + }, + "status_warnings": { + "type": "array", + "description": "The warnings that set a `Declined` or `In Review` status.", + "items": { + "type": "object", + "properties": { + "risk": { + "type": "string" + }, + "feature": { + "type": "string", + "nullable": true + }, + "node_id": { + "type": "string", + "nullable": true + }, + "log_type": { + "type": "string", + "nullable": true + }, + "check_status": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "description": "The payload list the warning came from, for example `id_verifications`." + }, + "short_description": { + "type": "string", + "nullable": true + } + } + } + } + } + }, + "linked_records": { + "type": "object", + "nullable": true, + "description": "A summary of other records linked to the session. `null` when there is nothing to show, and for workflows that declare an age assurance standard.", + "properties": { + "same_face": { + "type": "object", + "nullable": true, + "description": "Other people whose face matched one of this session's face searches.", + "properties": { + "count": { + "type": "integer" + }, + "best_match": { + "type": "object", + "nullable": true, + "properties": { + "session_id": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "session_number": { + "type": "integer", + "nullable": true + }, + "vendor_user_id": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "similarity_percentage": { + "type": "number", + "nullable": true + } + } + } + } + }, + "earlier_verifications": { + "type": "object", + "nullable": true, + "properties": { + "count": { + "type": "integer" + }, + "vendor_user_id": { + "type": "string", + "format": "uuid", + "nullable": true + } + } + }, + "networks": { + "type": "object", + "nullable": true, + "properties": { + "count": { + "type": "integer" + }, + "open": { + "type": "integer" + }, + "dismissed": { + "type": "integer" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "network_id": { + "type": "string", + "format": "uuid" + }, + "display_number": { + "type": "integer", + "nullable": true + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "risk_score": { + "type": "number", + "nullable": true + } + } + } + } + } + } + } + }, "workflow_id": { "type": "string", "format": "uuid", @@ -91786,7 +108719,7 @@ "type": "string", "description": "The feature of the session." }, - "description": "List of verification features configured for this session, as display names: `ID_VERIFICATION`, `NFC`, `LIVENESS`, `FACE_MATCH`, `POA`, `PHONE`, `EMAIL_VERIFICATION`, `AML`, `IP_ANALYSIS`, `DATABASE_VALIDATION`, `QUESTIONNAIRE`, `AGE_ESTIMATION`, `FACE_SEARCH` (Business Verification sessions use the KYB feature set: `KYB_REGISTRY`, `KYB_DOCUMENTS`, `KYB_KEY_PEOPLE`, `AML`, `PHONE`, `EMAIL_VERIFICATION`, `IP_ANALYSIS`, `QUESTIONNAIRE`). With `include=events` each entry becomes an object `{feature, node_id}` instead of a plain string, and the email feature is renamed: it appears as `EMAIL` in events mode instead of the `EMAIL_VERIFICATION` used here." + "description": "List of verification features configured for this session, as display names: `ID_VERIFICATION`, `NFC`, `LIVENESS`, `FACE_MATCH`, `POA`, `PHONE`, `EMAIL_VERIFICATION`, `AML`, `IP_ANALYSIS`, `DATABASE_VALIDATION`, `QUESTIONNAIRE`, `AGE_ESTIMATION`, `FACE_SEARCH`, `GEOLOCATION` (Location verification) (Business Verification sessions use the KYB feature set: `KYB_REGISTRY`, `KYB_DOCUMENTS`, `KYB_KEY_PEOPLE`, `AML`, `PHONE`, `EMAIL_VERIFICATION`, `IP_ANALYSIS`, `QUESTIONNAIRE`). With `include=events` each entry becomes an object `{feature, node_id}` instead of a plain string, and the email feature is renamed: it appears as `EMAIL` in events mode instead of the `EMAIL_VERIFICATION` used here." }, "vendor_data": { "type": "string", @@ -92810,7 +109743,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning (e.g., `ID_VERIFICATION`, `NFC`, `LIVENESS`). The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module, but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -93045,6 +109980,25 @@ ], "nullable": true, "description": "Address Validation of the address printed on this document: whether it exists and its normalised form, as the document read it (a later correction of `address` does not run it again). Present when this ID verification step enabled the Address Validation add-on; `null` otherwise." + }, + "region": { + "type": "string", + "nullable": true, + "description": "Region or state of the document's issuing country where the document identifies one." + }, + "extracted_data": { + "type": "object", + "nullable": true, + "additionalProperties": true, + "description": "Snapshot of the data extracted from the document that the person was shown to review, kept next to the confirmed values so you can compare what was read with what the person confirmed. `null` when the person was not asked to review." + }, + "barcodes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "description": "Data read from the document's barcodes. Empty when the document has none or none was read." } } } @@ -93389,7 +110343,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -93585,7 +110541,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -93690,7 +110648,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -93717,6 +110677,67 @@ } }, "description": "Face match verification warnings" + }, + "face_coverage": { + "type": "object", + "nullable": true, + "description": "Whether the eyes, mouth and face are covered in the captured image. Returned by `GET /v3/session/{sessionId}/decision/` only; it is not part of webhook payloads. `null` when no coverage reading exists.", + "properties": { + "eyes": { + "type": "object", + "properties": { + "covered": { + "type": "boolean", + "nullable": true + }, + "calibrated": { + "type": "boolean", + "nullable": true, + "description": "`false` means the reading is shadow evidence only and no warning acts on it." + }, + "visibility_score": { + "type": "number", + "nullable": true + } + } + }, + "mouth": { + "type": "object", + "properties": { + "covered": { + "type": "boolean", + "nullable": true + }, + "calibrated": { + "type": "boolean", + "nullable": true, + "description": "`false` means the reading is shadow evidence only and no warning acts on it." + }, + "visibility_score": { + "type": "number", + "nullable": true + } + } + }, + "face": { + "type": "object", + "properties": { + "covered": { + "type": "boolean", + "nullable": true + }, + "calibrated": { + "type": "boolean", + "nullable": true, + "description": "`false` means the reading is shadow evidence only and no warning acts on it." + }, + "visibility_score": { + "type": "number", + "nullable": true + } + } + } + } } } } @@ -93864,7 +110885,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -93939,6 +110962,22 @@ } } } + }, + "phone_intelligence": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneIntelligence" + } + ], + "description": "Phone intelligence signals. Present only when the phone intelligence add-on ran for this number." + }, + "phone_social": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneSocialFootprint" + } + ], + "description": "Social footprint of the number. Present only when the social footprint add-on ran for this number." } } } @@ -94058,7 +111097,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -94170,6 +111211,22 @@ } } } + }, + "email_intelligence": { + "allOf": [ + { + "$ref": "#/components/schemas/EmailIntelligence" + } + ], + "description": "Email intelligence signals. Present only when the email intelligence add-on ran for this address." + }, + "email_social": { + "allOf": [ + { + "$ref": "#/components/schemas/EmailSocialFootprint" + } + ], + "description": "Social footprint of the address. Present only when the social footprint add-on ran for this address." } } } @@ -94523,7 +111580,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -94905,14 +111964,14 @@ "bank_verifications": { "type": "array", "nullable": true, - "description": "Bank Verification results, one item per Bank Verification step, for User and Business Verification. `null` until a step produces one. Each item's `method` says how the account was verified: `open_banking` (bank sign-in) or `account_lookup` (account check), or a `statement` or `microdeposits` fallback, and `none` when the person continued without a bank before any attempt was evaluated (`continued_without_bank`). See [Bank verification methods](/core-technology/bank-verification/verification-methods).", + "description": "Bank Verification results, one item per Bank Verification step, for User and Business Verification. `null` until a step produces one. Each item's `method` says how the account was verified: `open_banking` (bank sign-in) or `account_lookup` (account check), or a `statement` or `microdeposits` fallback, and `none` when the person continued without a bank before any attempt was evaluated (`continued_without_bank`). See [Bank verification methods](/core-technology/bank-verification/verification-methods). Bank Verification is not enabled in production yet, so this stays `null` on production sessions until it is.", "items": { "$ref": "#/components/schemas/BankVerificationResult" } }, "signatures": { "type": "array", - "description": "Electronic Signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an Electronic Signature step; an empty array until a signer reaches it. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature).", + "description": "E-signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an E-signature step; an empty array until a signer reaches it. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature).", "items": { "$ref": "#/components/schemas/SignatureResult" } @@ -95141,7 +112200,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -95329,10 +112390,65 @@ } } } + }, + "browser_version": { + "type": "string", + "nullable": true + }, + "os_version": { + "type": "string", + "nullable": true + }, + "user_agent": { + "type": "string", + "nullable": true, + "description": "The browser's user agent string." + }, + "accept_language": { + "type": "string", + "nullable": true, + "description": "The `Accept-Language` header the browser sent." + }, + "session_identifier": { + "type": "string", + "nullable": true, + "description": "Identifier of the browsing session the verification ran in." + }, + "session_age_ms": { + "type": "integer", + "nullable": true, + "description": "Age of that browsing session in milliseconds when the step ran." + }, + "coords_accuracy": { + "type": "number", + "nullable": true, + "description": "Accuracy radius, in metres, of the coordinates the device reported." + }, + "raw_device_data": { + "type": "object", + "nullable": true, + "additionalProperties": true, + "description": "Raw device signals collected for the step." } } } }, + "geolocation_checks": { + "type": "array", + "nullable": true, + "description": "**Array of Location verification results**, one per Location verification step: that step's accepted attempt. `null` until a Location verification step has produced data. Earlier attempts of the same step are in `geolocation_attempts`.", + "items": { + "$ref": "#/components/schemas/GeolocationCheck" + } + }, + "geolocation_attempts": { + "type": "array", + "nullable": true, + "description": "Every attempt of every Location verification step of this session, oldest first. Attempts that a resubmission replaced are left out. A workflow that withholds `geolocation_checks` through its response attributes withholds this list too.", + "items": { + "$ref": "#/components/schemas/GeolocationAttempt" + } + }, "database_validations": { "type": "array", "nullable": true, @@ -95505,7 +112621,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -95536,6 +112654,22 @@ } } }, + "database_validation_not_performed_reason": { + "type": "object", + "nullable": true, + "additionalProperties": true, + "description": "Why a configured database validation produced no result, as `{code, message}` plus context fields. Present only when `database_validations` is `null` for a workflow that has the step, so you can tell \"the registry agreed\" from \"nothing ran\". `null` otherwise.", + "properties": { + "code": { + "type": "string", + "description": "Stable machine-readable reason." + }, + "message": { + "type": "string", + "description": "Human-readable explanation." + } + } + }, "reviews": { "type": "array", "items": { @@ -95558,6 +112692,34 @@ } } }, + "assignee": { + "type": "object", + "nullable": true, + "description": "The Console reviewer the session is assigned to, or `null` when nobody holds it.", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "assigned_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "waiting_since": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the session started waiting for review. `null` unless the session is `In Review` and your application sets a review deadline." + }, + "sla_due_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the review is due. `null` unless the session is `In Review` and your application sets a review deadline." + }, "created_at": { "type": "string", "format": "date-time", @@ -95996,8 +113158,7 @@ "description": "Registry filing dates, when available. Annual returns and general meetings use last_annual_return_date and last_agm_date; they are distinct from financial accounts." }, "registry_data": { - "type": "object", - "description": "Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (`addresses`, `industries`, `ownership`, `beneficial_owners[].shareholding`) instead." + "$ref": "#/components/schemas/KYBRegistryData" }, "user_provided_data": { "type": "object", @@ -96033,12 +113194,60 @@ "type": "string", "nullable": true, "description": "`not_requested`, `pending`, `delivered`, `not_held` or `unavailable`. Also in `ownership.status`." + }, + "registry_monitoring": { + "type": "object", + "nullable": true, + "description": "The latest registry monitor for the company, or `null` when none exists.", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "status": { + "type": "string" + }, + "unavailable_reason": { + "type": "string", + "nullable": true + }, + "enrolled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "next_bill_date": { + "type": "string", + "format": "date", + "nullable": true + }, + "last_event_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "events_count": { + "type": "integer" + }, + "watched_fields": { + "description": "The company fields the monitor watches." + } + } } } }, "ownership_structure": { - "type": "object", - "description": "Raw ownership snapshot kept for reviewers; its shape differs by registry source and is not a stable contract. Read `company.beneficial_owners` and `company.ownership` instead." + "$ref": "#/components/schemas/KYBOwnershipStructure" }, "warnings": { "type": "array", @@ -97136,6 +114345,11 @@ ], "description": "Whether the session was created by a live application (`live`) or a sandbox application (`sandbox`). Sandbox sessions are free, fully simulated, and never bill credits." }, + "sandbox_scenario": { + "type": "string", + "nullable": true, + "description": "The sandbox scenario the session was created with. `null` for live sessions and for sandbox sessions created without one." + }, "resubmissions": { "type": "array", "description": "Returned only with `include=resubmissions`, for user and business sessions. One entry per resubmission request, oldest first. Each entry carries the results the resubmitted steps returned before the request, so earlier submissions stay readable. Deleting the session deletes every submission.", @@ -97371,6 +114585,27 @@ }, "investigator": { "$ref": "#/components/schemas/InvestigatorBlock" + }, + "biometric_retention": { + "$ref": "#/components/schemas/BiometricRetention" + }, + "fraud_check": { + "type": "object", + "nullable": true, + "additionalProperties": true, + "description": "The result of a Fraud Check API call. `null` for every other session." + }, + "full_session_video": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "Expiring URL of the full-session recording. Returned only when your organization records full-session video." + }, + "full_session_video_recorded_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the full-session recording was made. Returned only when your organization records full-session video." } } }, @@ -97513,6 +114748,24 @@ "type": "string", "format": "date-time" }, + "signature_availability": { + "type": "object", + "description": "Which E-signature levels can sign right now. Check it before you set `signature_level`. Returned on `kyc`, `kyb` and graph workflows.", + "properties": { + "simple": { + "type": "boolean", + "description": "Simple is always available." + }, + "aes": { + "type": "boolean", + "description": "Whether Advanced (AES) can sign now. While it is `false`, saving a new step at `signature_level: \"aes\"` is refused with `aes_not_available`." + }, + "qes": { + "type": "boolean", + "description": "Whether Qualified (QES) can sign now. It is `false` until a qualified provider is connected." + } + } + }, "is_bank_verification_enabled": { "type": "boolean", "description": "Whether a simple KYC or KYB workflow runs Bank verification. It runs after the contact steps (and Location verification) and before database validation, AML and IP analysis. Bank verification is not generally available yet: turning it on is refused wherever it is not enabled." @@ -97676,7 +114929,8 @@ "AML", "IP_ANALYSIS", "AGE_ESTIMATION", - "DATABASE_VALIDATION" + "DATABASE_VALIDATION", + "GEOLOCATION" ], "description": "Verification feature identifier.", "example": "ID_VERIFICATION" @@ -97904,6 +115158,63 @@ } } } + }, + "assignee": { + "type": "object", + "nullable": true, + "description": "The Console reviewer the session is assigned to, or `null` when nobody holds it.", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "assigned_at": { + "type": "string", + "format": "date-time", + "nullable": true + } + } + }, + "waiting_since": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the session started waiting for review. `null` unless the session is `In Review`." + }, + "sla_due_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the review is due, from the review deadline set for your application in the Console. `null` unless the session is `In Review` and a deadline is set." + }, + "top_warnings": { + "type": "array", + "description": "Up to a few of the session's most important warnings, for a quick triage view. The full list is in the decision.", + "items": { + "type": "object", + "properties": { + "risk": { + "type": "string", + "description": "Warning code, for example `FACE_MATCH_LOW_SIMILARITY`." + }, + "feature": { + "type": "string", + "description": "The feature that raised it." + }, + "log_type": { + "type": "string", + "nullable": true, + "description": "`error` or `warning`; `null` for a legacy entry." + }, + "short_description": { + "type": "string" + } + } + } + }, + "warnings_count": { + "type": "integer", + "description": "Number of warnings on the session." } } }, @@ -98328,8 +115639,8 @@ "properties": { "kyb_response_id": { "type": "string", - "maxLength": 255, - "description": "Candidate handle from `POST /v3/kyb/search/` (`kyb_registry.companies[].kyb_response_id`). Ephemeral — use it shortly after the search that produced it.", + "maxLength": 1024, + "description": "Candidate handle from `POST /v3/kyb/search/` (`kyb_registry.companies[].kyb_response_id`). Ephemeral: use it shortly after the search that produced it. Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length.", "example": "69aeeb95febb0f1704042259" }, "vendor_data": { @@ -98435,7 +115746,7 @@ }, "trigger": { "type": "string", - "description": "Present when the event was not produced by the verification flow itself, for example `manual_review`, `manual_step_update`, `ongoing_monitoring`, `webhook_reconciliation`, `manual_webhook_recovery`, `kyb_registry_change` or a `console_*` edit." + "description": "Present when the event was not produced by the verification flow itself, for example `manual_review`, `manual_step_update`, `ongoing_monitoring`, `webhook_reconciliation` (a `status.updated` resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on `session_id` and `status`), `manual_webhook_recovery`, `kyb_registry_change`, `biometric_retention` (a `data.updated` sent when the session's live biometric data is deleted on schedule) or a `console_*` edit such as `console_registry_edit`, `console_key_people_skip` or `console_key_people_regenerate`." }, "workflow_id": { "type": "string", @@ -99267,6 +116578,9 @@ }, { "$ref": "#/components/schemas/WorkflowComplianceChangedEvent" + }, + { + "$ref": "#/components/schemas/TransactionRuleSuggestionsCreatedEvent" } ], "discriminator": { @@ -99281,7 +116595,8 @@ "transaction.created": "#/components/schemas/TransactionCreatedEvent", "transaction.status.updated": "#/components/schemas/TransactionStatusUpdatedEvent", "travel_rule.status.updated": "#/components/schemas/TravelRuleStatusUpdatedEvent", - "workflow.compliance_changed": "#/components/schemas/WorkflowComplianceChangedEvent" + "workflow.compliance_changed": "#/components/schemas/WorkflowComplianceChangedEvent", + "transaction_rule_suggestions.created": "#/components/schemas/TransactionRuleSuggestionsCreatedEvent" } } }, @@ -99383,7 +116698,7 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier of the match" + "description": "Didit's stable identifier for the hit: `hit_` followed by 24 hexadecimal characters. The same matched entity keeps the same `id` when the subject is screened again. Pass it as `hit_id` to the AML hit review endpoints." }, "url": { "type": "string", @@ -99428,10 +116743,11 @@ "Fitness and Probity", "SIP", "SIE", - "Insolvency" + "Insolvency", + "Other Lists" ] }, - "description": "List of dataset categories where the match was found. Indicates whether the entity appeared in PEP lists (with level), sanctions databases, adverse media, warnings/regulatory enforcement, or other compliance datasets." + "description": "List of dataset categories where the match was found. Indicates whether the entity appeared in PEP lists (with level), sanctions databases, adverse media, warnings/regulatory enforcement, or other compliance datasets. `Other Lists` when the entity's source states none of these categories." }, "features": { "type": "object", @@ -100160,7 +117476,9 @@ "DOCUMENT_AI", "KYB_REGISTRY", "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE" + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" ], "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Within an AML screening this is typically `AML`, but the enum above is authoritative across all feature warnings on the decision payload." }, @@ -101723,7135 +119041,8215 @@ "format": "date-time", "description": "When Didit recorded it." }, - "score": { + "score": { + "type": "integer", + "description": "Risk score. Higher is riskier." + }, + "severity": { + "type": "string", + "nullable": true, + "enum": [ + "UNKNOWN", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL", + null + ], + "description": "Risk severity, `null` until something sets it." + }, + "decision_reason_code": { + "type": "string", + "nullable": true, + "description": "Machine-readable reason for the current `status`." + }, + "decision_reason_label": { + "type": "string", + "nullable": true, + "description": "Human-readable label for `decision_reason_code`." + }, + "tags": { + "type": "array", + "description": "Tags on the transaction.", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "color": { + "type": "string", + "description": "Hex color, for example `#F59E0B`." + }, + "description": { + "type": "string", + "nullable": true + }, + "source": { + "type": "string", + "enum": [ + "didit", + "custom" + ], + "description": "Didit preset or custom tag." + } + } + } + }, + "subject_name": { + "type": "string", + "nullable": true, + "description": "Full name of the `APPLICANT` party." + }, + "subject_vendor_data": { + "type": "string", + "nullable": true, + "description": "Your `vendor_data` for the applicant." + }, + "subject_type": { + "type": "string", + "nullable": true, + "enum": [ + "user", + "business", + null + ], + "description": "Whether the applicant is linked to a Didit user or business; `null` when it is linked to neither." + }, + "subject_uuid": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "UUID of the Didit user or business the applicant is linked to." + }, + "subject_country": { + "type": "string", + "nullable": true, + "description": "Country code of the applicant." + }, + "counterparty_name": { + "type": "string", + "nullable": true, + "description": "Full name of the `COUNTERPARTY` party, if any." + }, + "counterparty_vendor_data": { + "type": "string", + "nullable": true, + "description": "Your `vendor_data` for the counterparty." + }, + "counterparty_country": { + "type": "string", + "nullable": true, + "description": "Country code of the counterparty." + }, + "assigned_to_name": { + "type": "string", + "nullable": true, + "description": "Name of the Console reviewer assigned to the transaction." + }, + "travel_rule_status": { + "type": "string", + "nullable": true, + "description": "Status of the transaction's Travel Rule transfer, or `null` when it has none." + }, + "application_id": { + "type": "string", + "format": "uuid", + "description": "Application that owns the transaction." + }, + "application_name": { + "type": "string", + "nullable": true, + "description": "Name of that application." + }, + "organization_id": { + "type": "string", + "format": "uuid", + "description": "Organization that owns the application." + }, + "organization_name": { + "type": "string", + "nullable": true, + "description": "Name of that organization." + } + } + }, + "ApplicationAnalyticsDataPoint": { + "type": "object", + "description": "Session counts for one day, by creation date (UTC). Each count reflects the session's current status. Points of the previous period carry at least the required fields.", + "required": [ + "rounded_date", + "total", + "approved", + "declined", + "canceled", + "pending" + ], + "properties": { + "rounded_date": { + "type": "string", + "format": "date", + "description": "The day, `YYYY-MM-DD`." + }, + "total": { + "type": "integer", + "description": "Sessions created that day." + }, + "approved": { + "type": "integer", + "description": "Of those, sessions `Approved` or `Kyc Expired`." + }, + "declined": { + "type": "integer", + "description": "Sessions `Declined`." + }, + "canceled": { + "type": "integer", + "description": "Sessions `Expired` or `Abandoned`." + }, + "pending": { + "type": "integer", + "description": "Sessions `Not Started`, `In Progress` or `In Review`." + }, + "in_review": { + "type": "integer", + "description": "Sessions `In Review`." + }, + "expired": { + "type": "integer", + "description": "Sessions `Expired`." + }, + "abandoned": { + "type": "integer", + "description": "Sessions `Abandoned`." + }, + "in_progress": { + "type": "integer", + "description": "Sessions `In Progress`." + }, + "not_started": { + "type": "integer", + "description": "Sessions `Not Started`." + }, + "manually_approved": { + "type": "integer", + "description": "Sessions a reviewer approved after the workflow gave another verdict." + }, + "manually_declined": { + "type": "integer", + "description": "Sessions a reviewer declined after the workflow gave another verdict." + } + } + }, + "ApplicationAnalyticsRequestBreakdown": { + "type": "object", + "description": "Status totals for the range. The previous-period breakdown carries at least the required fields.", + "required": [ + "total_approved", + "total_in_review", + "total_declined", + "total_canceled", + "total_pending" + ], + "properties": { + "total_approved": { + "type": "integer", + "description": "Sessions `Approved` or `Kyc Expired`." + }, + "total_in_review": { + "type": "integer", + "description": "Sessions `In Review`." + }, + "total_declined": { + "type": "integer", + "description": "Sessions `Declined`." + }, + "total_canceled": { + "type": "integer", + "description": "Sessions `Expired` or `Abandoned`." + }, + "total_pending": { + "type": "integer", + "description": "Sessions `Not Started`, `In Progress` or `In Review` (includes `total_in_review`)." + }, + "total_expired": { + "type": "integer", + "description": "Sessions `Expired`." + }, + "total_abandoned": { + "type": "integer", + "description": "Sessions `Abandoned`." + }, + "total_in_progress": { + "type": "integer", + "description": "Sessions `In Progress`." + }, + "total_not_started": { + "type": "integer", + "description": "Sessions `Not Started`." + }, + "total_manually_approved": { + "type": "integer", + "description": "Approved by a reviewer." + }, + "total_manually_declined": { + "type": "integer", + "description": "Declined by a reviewer." + } + } + }, + "ApplicationAnalyticsCountryCount": { + "type": "object", + "properties": { + "country": { + "type": "string", + "description": "Country name." + }, + "country_code": { + "type": "string", + "description": "Two-letter country code." + }, + "session_count": { + "type": "integer", + "description": "Sessions from that country." + } + } + }, + "ApplicationAnalyticsLocationStats": { + "type": "object", + "properties": { + "ip_countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount" + }, + "description": "Countries of the users' IP addresses, most sessions first." + }, + "countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount" + }, + "description": "Same list as `ip_countries`." + }, + "id_countries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount" + }, + "description": "Issuing countries of the verified ID documents, most sessions first." + }, + "conversion_by_country": { + "type": "array", + "description": "Per document issuing country: finished sessions (approved, declined or in review) and how many were approved. Most finished first.", + "items": { + "type": "object", + "properties": { + "country": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "finished": { + "type": "integer" + }, + "approved": { + "type": "integer" + } + } + } + }, + "cities": { + "type": "array", + "description": "Up to 100 IP cities, most sessions first.", + "items": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "`City, Country`." + }, + "session_count": { + "type": "integer" + }, + "latitude": { + "type": "number", + "nullable": true + }, + "longitude": { + "type": "number", + "nullable": true + } + } + } + } + } + }, + "ApplicationAnalyticsDemographicStats": { + "type": "object", + "properties": { + "age_distribution": { + "type": "object", + "description": "Sessions per age band from the ID document. Empty when there is no data.", + "properties": { + "under_18": { + "type": "integer" + }, + "18_24": { + "type": "integer" + }, + "25_34": { + "type": "integer" + }, + "35_44": { + "type": "integer" + }, + "45_64": { + "type": "integer" + }, + "65_plus": { + "type": "integer" + } + }, + "additionalProperties": { + "type": "integer" + } + }, + "gender_distribution": { + "type": "object", + "description": "Sessions per document gender code: `M`, `F` or `U` (unknown).", + "additionalProperties": { + "type": "integer" + } + } + } + }, + "ApplicationAnalyticsDeviceDetails": { + "type": "object", + "description": "Top five of each, most sessions first.", + "properties": { + "device_models": { + "type": "array", + "description": "Device brands: `Apple`, `Android`, `LG`, everything else grouped as `Other`.", + "items": { + "type": "object", + "properties": { + "device": { + "type": "string" + }, + "count": { + "type": "integer" + } + } + } + }, + "browsers": { + "type": "array", + "description": "Browsers: `Chrome`, `Safari`, `Didit App`, `Firefox`, everything else grouped as `Other`.", + "items": { + "type": "object", + "properties": { + "browser": { + "type": "string" + }, + "count": { + "type": "integer" + } + } + } + }, + "operating_systems": { + "type": "array", + "description": "Operating systems.", + "items": { + "type": "object", + "properties": { + "os": { + "type": "string" + }, + "count": { + "type": "integer" + } + } + } + } + } + }, + "ApplicationAnalyticsWorkflowFunnel": { + "type": "object", + "description": "Keyed by workflow ID. `total` is the sessions started on that workflow; `steps` counts the sessions that reached each step (`OCR`, `LIVENESS`, `FACE_MATCH`, `AML`, `POA`, `PHONE`, `EMAIL`, `NFC`, `DATABASE_VALIDATION`, `QUESTIONNAIRE`, `IP_ANALYSIS`, `AGE_ESTIMATION`, `KYB_REGISTRY`, `KYB_DOCUMENTS`, `KYB_KEY_PEOPLE`). Reaching a step is not passing it.", + "additionalProperties": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "steps": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "reached": { + "type": "integer" + } + } + } + } + } + } + }, + "ApplicationAnalyticsVerificationTimeStats": { + "type": "object", + "description": "Active time users spent verifying, ignoring idle gaps. An empty object when there is no data.", + "properties": { + "overall_avg_seconds": { + "type": "number", + "description": "Average per session, one decimal." + }, + "overall_count": { + "type": "integer", + "description": "Sessions measured." + }, + "per_feature": { + "type": "object", + "description": "Keyed by feature, for example `OCR` or `LIVENESS`.", + "additionalProperties": { + "type": "object", + "properties": { + "avg_seconds": { + "type": "number" + }, + "total_seconds": { + "type": "number" + }, + "count": { + "type": "integer" + } + } + } + }, + "per_sub_step": { + "type": "object", + "description": "Keyed by feature, then by sub-step, for example `front_id_photo`.", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "avg_seconds": { + "type": "number" + }, + "total_seconds": { + "type": "number" + }, + "count": { + "type": "integer" + } + } + } + } + } + } + }, + "ApplicationAnalyticsResubmissionStats": { + "type": "object", + "properties": { + "first_pass": { + "type": "integer", + "description": "Finished sessions with no resubmission." + }, + "second": { "type": "integer", - "description": "Risk score. Higher is riskier." + "description": "Finished sessions resubmitted once." }, - "severity": { - "type": "string", - "nullable": true, - "enum": [ - "UNKNOWN", - "LOW", - "MEDIUM", - "HIGH", - "CRITICAL", - null - ], - "description": "Risk severity, `null` until something sets it." + "third_plus": { + "type": "integer", + "description": "Finished sessions resubmitted two or more times." }, - "decision_reason_code": { - "type": "string", - "nullable": true, - "description": "Machine-readable reason for the current `status`." + "abandoned": { + "type": "integer", + "description": "Abandoned sessions." + } + } + }, + "ApplicationAnalyticsOriginalStatusStats": { + "type": "object", + "description": "The workflow's automatic verdict, before any reviewer changed it.", + "properties": { + "approved": { + "type": "integer" }, - "decision_reason_label": { - "type": "string", - "nullable": true, - "description": "Human-readable label for `decision_reason_code`." + "in_review": { + "type": "integer" }, - "tags": { - "type": "array", - "description": "Tags on the transaction.", - "items": { + "declined": { + "type": "integer" + } + } + }, + "ApplicationAnalyticsWarningStats": { + "type": "object", + "description": "Keyed by feature (`ID_VERIFICATION`, `LIVENESS`, `FACEMATCH`, `AML`, `PROOF_OF_ADDRESS`, `PHONE`, `EMAIL`, `NFC`, `LOCATION`, `DATABASE_VALIDATION`, `QUESTIONNAIRE` and the KYB features). `total` is the sessions that reached the feature; `risks` counts sessions per warning code and level.", + "additionalProperties": { + "type": "object", + "properties": { + "total": { + "type": "integer" + }, + "risks": { "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "name": { - "type": "string" - }, - "color": { - "type": "string", - "description": "Hex color, for example `#F59E0B`." - }, - "description": { - "type": "string", - "nullable": true - }, - "source": { - "type": "string", - "enum": [ - "didit", - "custom" - ], - "description": "Didit preset or custom tag." + "additionalProperties": { + "type": "object", + "properties": { + "error": { + "type": "integer" + }, + "warning": { + "type": "integer" + }, + "information": { + "type": "integer" + } } } } - }, - "subject_name": { + } + } + }, + "ApplicationAnalyticsDemographicPoint": { + "type": "object", + "properties": { + "date": { "type": "string", - "nullable": true, - "description": "Full name of the `APPLICANT` party." + "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." }, - "subject_vendor_data": { - "type": "string", - "nullable": true, - "description": "Your `vendor_data` for the applicant." + "age_distribution": { + "type": "object", + "additionalProperties": { + "type": "integer" + } }, - "subject_type": { + "gender_distribution": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + } + }, + "ApplicationAnalyticsDevicePoint": { + "type": "object", + "properties": { + "date": { "type": "string", - "nullable": true, - "enum": [ - "user", - "business", - null - ], - "description": "Whether the applicant is linked to a Didit user or business; `null` when it is linked to neither." + "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." }, - "subject_uuid": { - "type": "string", - "format": "uuid", - "nullable": true, - "description": "UUID of the Didit user or business the applicant is linked to." + "devices": { + "type": "object", + "additionalProperties": { + "type": "integer" + } }, - "subject_country": { - "type": "string", - "nullable": true, - "description": "Country code of the applicant." + "browsers": { + "type": "object", + "additionalProperties": { + "type": "integer" + } }, - "counterparty_name": { + "operating_systems": { + "type": "object", + "additionalProperties": { + "type": "integer" + } + } + } + }, + "ApplicationAnalyticsVerificationTimePoint": { + "type": "object", + "properties": { + "date": { "type": "string", - "nullable": true, - "description": "Full name of the `COUNTERPARTY` party, if any." + "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." }, - "counterparty_vendor_data": { - "type": "string", - "nullable": true, - "description": "Your `vendor_data` for the counterparty." + "overall_avg": { + "type": "number", + "description": "Average active seconds per session." }, - "counterparty_country": { + "per_feature": { + "type": "object", + "description": "Average active seconds per feature.", + "additionalProperties": { + "type": "number" + } + } + } + }, + "ApplicationAnalyticsResubmissionPoint": { + "type": "object", + "properties": { + "date": { "type": "string", - "nullable": true, - "description": "Country code of the counterparty." + "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." }, - "assigned_to_name": { - "type": "string", - "nullable": true, - "description": "Name of the Console reviewer assigned to the transaction." + "first_pass": { + "type": "integer" }, - "travel_rule_status": { - "type": "string", - "nullable": true, - "description": "Status of the transaction's Travel Rule transfer, or `null` when it has none." + "second": { + "type": "integer" }, - "application_id": { - "type": "string", - "format": "uuid", - "description": "Application that owns the transaction." + "third_plus": { + "type": "integer" }, - "application_name": { + "abandoned": { + "type": "integer" + } + } + }, + "ApplicationAnalyticsOriginalStatusPoint": { + "type": "object", + "properties": { + "date": { "type": "string", - "nullable": true, - "description": "Name of that application." + "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." }, - "organization_id": { - "type": "string", - "format": "uuid", - "description": "Organization that owns the application." + "approved": { + "type": "integer" }, - "organization_name": { - "type": "string", - "nullable": true, - "description": "Name of that organization." + "in_review": { + "type": "integer" + }, + "declined": { + "type": "integer" } } }, - "ApplicationAnalyticsDataPoint": { + "ApplicationAnalyticsSummary": { "type": "object", - "description": "Session counts for one day, by creation date (UTC). Each count reflects the session's current status. Points of the previous period carry at least the required fields.", + "description": "User verification (KYC) summary, returned when neither `scope` nor `widget_keys` is sent.", "required": [ - "rounded_date", - "total", - "approved", - "declined", - "canceled", - "pending" + "data_points", + "request_breakdown", + "previous_data_points", + "previous_request_breakdown", + "conversion_rate", + "location_stats", + "demographic_stats", + "device_details", + "workflow_funnel_stats", + "verification_time_stats", + "resubmission_stats", + "warning_stats", + "original_status_stats", + "grouping_mode", + "demographic_time_series", + "device_time_series", + "verification_time_time_series", + "resubmission_time_series", + "original_status_time_series" ], "properties": { - "rounded_date": { - "type": "string", - "format": "date", - "description": "The day, `YYYY-MM-DD`." + "data_points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" + }, + "description": "One point per day, from the first day with sessions in the range to `end_date`. Always daily, whatever `grouping_mode` says." }, - "total": { - "type": "integer", - "description": "Sessions created that day." + "request_breakdown": { + "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" }, - "approved": { - "type": "integer", - "description": "Of those, sessions `Approved` or `Kyc Expired`." + "previous_data_points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" + }, + "description": "Daily points for the period of the same length right before `start_date`." }, - "declined": { - "type": "integer", - "description": "Sessions `Declined`." + "previous_request_breakdown": { + "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" }, - "canceled": { - "type": "integer", - "description": "Sessions `Expired` or `Abandoned`." + "conversion_rate": { + "type": "number", + "nullable": true, + "description": "`total_approved / (total_approved + total_declined + total_in_review) x 100`, one decimal. `null` when nothing finished." }, - "pending": { - "type": "integer", - "description": "Sessions `Not Started`, `In Progress` or `In Review`." + "location_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsLocationStats" }, - "in_review": { - "type": "integer", - "description": "Sessions `In Review`." + "demographic_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsDemographicStats" }, - "expired": { - "type": "integer", - "description": "Sessions `Expired`." + "device_details": { + "$ref": "#/components/schemas/ApplicationAnalyticsDeviceDetails" }, - "abandoned": { - "type": "integer", - "description": "Sessions `Abandoned`." + "workflow_funnel_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsWorkflowFunnel" }, - "in_progress": { - "type": "integer", - "description": "Sessions `In Progress`." + "verification_time_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimeStats" }, - "not_started": { - "type": "integer", - "description": "Sessions `Not Started`." + "resubmission_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionStats" }, - "manually_approved": { - "type": "integer", - "description": "Sessions a reviewer approved after the workflow gave another verdict." + "warning_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsWarningStats" }, - "manually_declined": { - "type": "integer", - "description": "Sessions a reviewer declined after the workflow gave another verdict." + "original_status_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusStats" + }, + "grouping_mode": { + "type": "string", + "enum": [ + "day", + "week", + "month" + ], + "description": "How the `*_time_series` lists are grouped: `day` for up to 14 days, `week` up to 90, `month` beyond. Measured from the first day with sessions in the range." + }, + "demographic_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsDemographicPoint" + } + }, + "device_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsDevicePoint" + } + }, + "verification_time_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimePoint" + } + }, + "resubmission_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionPoint" + } + }, + "original_status_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusPoint" + } } } }, - "ApplicationAnalyticsRequestBreakdown": { + "ApplicationAnalyticsWidget": { "type": "object", - "description": "Status totals for the range. The previous-period breakdown carries at least the required fields.", + "description": "One dashboard widget. Every widget has `kind` and `title`; the other fields depend on `kind`. The session widgets reuse the summary objects (`data_points`, `request_breakdown`, `workflow_funnel_stats` and so on); list widgets put their entries in `items`; transaction metrics use `value`.", "required": [ - "total_approved", - "total_in_review", - "total_declined", - "total_canceled", - "total_pending" + "kind", + "title" ], "properties": { - "total_approved": { - "type": "integer", - "description": "Sessions `Approved` or `Kyc Expired`." + "kind": { + "type": "string", + "enum": [ + "sessions_volume", + "workflow_funnel", + "average_verification_time", + "country_distribution", + "warning_insights", + "conversion_rate", + "conversion_by_country", + "resubmission_insights", + "original_status_distribution", + "database_validation_coverage", + "database_validation_latency", + "demographics", + "device_details", + "horizontal_bar", + "kyb_registry_coverage", + "kyb_registry_data_completeness", + "metric", + "time_series", + "breakdown", + "status_time_series", + "leaderboard", + "histogram" + ], + "description": "Widget type." }, - "total_in_review": { - "type": "integer", - "description": "Sessions `In Review`." + "title": { + "type": "string", + "description": "Display title, for example `Verification volume`." }, - "total_declined": { - "type": "integer", - "description": "Sessions `Declined`." + "grouping_mode": { + "type": "string", + "enum": [ + "day", + "week", + "month" + ], + "description": "How the `*_time_series` lists are grouped: `day` for up to 14 days, `week` up to 90, `month` beyond. Measured from the first day with sessions in the range." }, - "total_canceled": { - "type": "integer", - "description": "Sessions `Expired` or `Abandoned`." + "data_points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" + } }, - "total_pending": { - "type": "integer", - "description": "Sessions `Not Started`, `In Progress` or `In Review` (includes `total_in_review`)." + "request_breakdown": { + "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" }, - "total_expired": { - "type": "integer", - "description": "Sessions `Expired`." + "previous_data_points": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" + } }, - "total_abandoned": { - "type": "integer", - "description": "Sessions `Abandoned`." + "previous_request_breakdown": { + "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" }, - "total_in_progress": { - "type": "integer", - "description": "Sessions `In Progress`." + "conversion_rate": { + "type": "number", + "nullable": true + }, + "workflow_funnel_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsWorkflowFunnel" + }, + "verification_time_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimeStats" + }, + "verification_time_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimePoint" + } }, - "total_not_started": { - "type": "integer", - "description": "Sessions `Not Started`." + "warning_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsWarningStats" }, - "total_manually_approved": { - "type": "integer", - "description": "Approved by a reviewer." + "resubmission_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionStats" }, - "total_manually_declined": { - "type": "integer", - "description": "Declined by a reviewer." - } - } - }, - "ApplicationAnalyticsCountryCount": { - "type": "object", - "properties": { - "country": { - "type": "string", - "description": "Country name." + "resubmission_time_series": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionPoint" + } }, - "country_code": { - "type": "string", - "description": "Two-letter country code." + "original_status_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusStats" }, - "session_count": { - "type": "integer", - "description": "Sessions from that country." - } - } - }, - "ApplicationAnalyticsLocationStats": { - "type": "object", - "properties": { - "ip_countries": { + "original_status_time_series": { "type": "array", "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount" - }, - "description": "Countries of the users' IP addresses, most sessions first." + "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusPoint" + } }, - "countries": { + "demographic_stats": { + "$ref": "#/components/schemas/ApplicationAnalyticsDemographicStats" + }, + "demographic_time_series": { "type": "array", "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount" - }, - "description": "Same list as `ip_countries`." + "$ref": "#/components/schemas/ApplicationAnalyticsDemographicPoint" + } }, - "id_countries": { + "device_details": { + "$ref": "#/components/schemas/ApplicationAnalyticsDeviceDetails" + }, + "device_time_series": { "type": "array", "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsCountryCount" - }, - "description": "Issuing countries of the verified ID documents, most sessions first." + "$ref": "#/components/schemas/ApplicationAnalyticsDevicePoint" + } }, - "conversion_by_country": { + "items": { "type": "array", - "description": "Per document issuing country: finished sessions (approved, declined or in review) and how many were approved. Most finished first.", + "description": "Entries of a list widget. `country_distribution` (KYC): `country`, `country_code`, `session_count`. `conversion_by_country`: `country`, `country_code`, `finished`, `approved`. `time_series`: `date`, `value`. `status_time_series`: `date`, `approved`, `declined`, `flagged`. `breakdown`: `transaction_type` or `action_type` with `count` and `volume`, or `tag_id`, `tag_name`, `count`. `leaderboard`: `rule_title`, `trigger_count` or `assignee`, `handled_count`, `average_processing_seconds`, each with `approved_percentage`, `declined_percentage`, `flagged_percentage`. `histogram`: `score`, `count`.", "items": { "type": "object", - "properties": { - "country": { - "type": "string" - }, - "country_code": { - "type": "string" - }, - "finished": { - "type": "integer" - }, - "approved": { - "type": "integer" - } - } + "additionalProperties": {} } }, - "cities": { + "previous_items": { "type": "array", - "description": "Up to 100 IP cities, most sessions first.", + "description": "Transaction time series for the period of the same length right before `start_date`.", "items": { "type": "object", - "properties": { - "location": { - "type": "string", - "description": "`City, Country`." - }, - "session_count": { - "type": "integer" - }, - "latitude": { - "type": "number", - "nullable": true - }, - "longitude": { - "type": "number", - "nullable": true - } - } + "additionalProperties": {} } - } - } - }, - "ApplicationAnalyticsDemographicStats": { - "type": "object", - "properties": { - "age_distribution": { + }, + "value": { + "type": "number", + "description": "`metric` widgets: the figure for the range." + }, + "currency": { + "type": "string", + "nullable": true, + "description": "Transaction volume and amount widgets: the application's default transaction currency." + }, + "thresholds": { "type": "object", - "description": "Sessions per age band from the ID document. Empty when there is no data.", + "description": "`histogram` widget: the application's review and decline score thresholds.", "properties": { - "under_18": { - "type": "integer" - }, - "18_24": { - "type": "integer" - }, - "25_34": { + "review": { "type": "integer" }, - "35_44": { + "decline": { "type": "integer" - }, - "45_64": { + } + } + }, + "search": { + "type": "object", + "description": "`kyb_registry_coverage` widget: registry search totals.", + "properties": { + "searches_total": { "type": "integer" }, - "65_plus": { + "searches_with_no_candidates": { "type": "integer" } - }, - "additionalProperties": { - "type": "integer" } + } + } + }, + "ApplicationAnalyticsWidgetResponse": { + "type": "object", + "description": "Dashboard widgets, returned when `scope` or `widget_keys` is sent.", + "required": [ + "scope", + "available_widget_keys", + "requested_widget_keys", + "widgets" + ], + "properties": { + "scope": { + "type": "string", + "enum": [ + "home", + "kyc", + "kyb", + "transactions" + ], + "description": "Dashboard tab." }, - "gender_distribution": { + "available_widget_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Every widget key this scope accepts." + }, + "requested_widget_keys": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The widget keys answered, in order: your valid `widget_keys`, or the scope's defaults." + }, + "widgets": { "type": "object", - "description": "Sessions per document gender code: `M`, `F` or `U` (unknown).", + "description": "Keyed by widget key, in the order of `requested_widget_keys`.", "additionalProperties": { - "type": "integer" + "$ref": "#/components/schemas/ApplicationAnalyticsWidget" } } } }, - "ApplicationAnalyticsDeviceDetails": { + "ApplicationAnalyticsToday": { "type": "object", - "description": "Top five of each, most sessions first.", + "description": "Today's verifications by local hour against the same weekday last week.", + "required": [ + "time_zone", + "date", + "current_hour", + "previous_date", + "hours", + "previous_hours", + "total", + "previous_total_so_far", + "outcomes" + ], "properties": { - "device_models": { - "type": "array", - "description": "Device brands: `Apple`, `Android`, `LG`, everything else grouped as `Other`.", - "items": { - "type": "object", - "properties": { - "device": { - "type": "string" - }, - "count": { - "type": "integer" - } - } - } + "time_zone": { + "type": "string", + "description": "The IANA time zone the day and its hours are in.", + "example": "Europe/Madrid" }, - "browsers": { + "date": { + "type": "string", + "format": "date", + "description": "Today in that time zone.", + "example": "2026-10-30" + }, + "current_hour": { + "type": "integer", + "minimum": 0, + "maximum": 23, + "description": "The local hour it is now.", + "example": 14 + }, + "previous_date": { + "type": "string", + "format": "date", + "description": "The comparison day: the same weekday one week before.", + "example": "2026-10-23" + }, + "hours": { "type": "array", - "description": "Browsers: `Chrome`, `Safari`, `Didit App`, `Firefox`, everything else grouped as `Other`.", "items": { - "type": "object", - "properties": { - "browser": { - "type": "string" - }, - "count": { - "type": "integer" - } - } - } + "type": "integer", + "minimum": 0 + }, + "minItems": 24, + "maxItems": 24, + "description": "Verifications created today, per local hour from 00:00. The hours still to come are 0." }, - "operating_systems": { + "previous_hours": { "type": "array", - "description": "Operating systems.", "items": { - "type": "object", - "properties": { - "os": { - "type": "string" - }, - "count": { - "type": "integer" - } + "type": "integer", + "minimum": 0 + }, + "minItems": 24, + "maxItems": 24, + "description": "Verifications created on the comparison day, per local hour from 00:00." + }, + "total": { + "type": "integer", + "minimum": 0, + "description": "Verifications created today so far.", + "example": 165 + }, + "previous_total_so_far": { + "type": "integer", + "minimum": 0, + "description": "Verifications created on the comparison day up to the same local time.", + "example": 151 + }, + "outcomes": { + "type": "object", + "description": "Of today's verifications, how many are approved, waiting in review and declined now. The rest are not finished yet.", + "required": [ + "approved", + "in_review", + "declined" + ], + "properties": { + "approved": { + "type": "integer", + "minimum": 0 + }, + "in_review": { + "type": "integer", + "minimum": 0 + }, + "declined": { + "type": "integer", + "minimum": 0 } } } } }, - "ApplicationAnalyticsWorkflowFunnel": { + "WebhookConfigDestination": { "type": "object", - "description": "Keyed by workflow ID. `total` is the sessions started on that workflow; `steps` counts the sessions that reached each step (`OCR`, `LIVENESS`, `FACE_MATCH`, `AML`, `POA`, `PHONE`, `EMAIL`, `NFC`, `DATABASE_VALIDATION`, `QUESTIONNAIRE`, `IP_ANALYSIS`, `AGE_ESTIMATION`, `KYB_REGISTRY`, `KYB_DOCUMENTS`, `KYB_KEY_PEOPLE`). Reaching a step is not passing it.", - "additionalProperties": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "steps": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "reached": { - "type": "integer" - } - } - } + "description": "A webhook destination as listed in the webhook configuration, without delivery metrics. `GET /v3/webhook/destinations/{destination_uuid}/` adds its delivery summary.", + "required": [ + "uuid", + "label", + "url", + "enabled", + "webhook_version", + "secret_shared_key", + "subscribed_events", + "created_at", + "updated_at" + ], + "properties": { + "uuid": { + "type": "string", + "format": "uuid", + "description": "Destination ID." + }, + "label": { + "type": "string", + "maxLength": 255, + "description": "Human-readable name." + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 2000, + "description": "HTTPS endpoint Didit posts events to." + }, + "enabled": { + "type": "boolean", + "description": "`false` pauses deliveries to this destination." + }, + "webhook_version": { + "type": "string", + "enum": [ + "v1", + "v2", + "v3" + ], + "description": "Payload version sent to this destination." + }, + "secret_shared_key": { + "type": "string", + "description": "This destination's signing secret (43-character URL-safe token). Verify each webhook with the secret of the destination it was sent to. API-key callers always receive it in full; Console users without `read:webhooks` receive an empty string." + }, + "subscribed_events": { + "type": "array", + "uniqueItems": true, + "description": "Event types delivered to this destination. Empty when the destination was created without events, in which case it receives nothing.", + "items": { + "$ref": "#/components/schemas/WebhookEvent" } + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" } } }, - "ApplicationAnalyticsVerificationTimeStats": { + "WebhookConfig": { "type": "object", - "description": "Active time users spent verifying, ignoring idle gaps. An empty object when there is no data.", + "description": "Application-level webhook configuration, retention policy and Digital ID wallet return hosts, with every webhook destination.", + "required": [ + "webhook_url", + "webhook_version", + "secret_shared_key", + "capture_method", + "data_retention_months", + "face_retention_policy", + "face_retention_days", + "available_events", + "allowed_return_hosts", + "endpoints" + ], "properties": { - "overall_avg_seconds": { - "type": "number", - "description": "Average per session, one decimal." + "webhook_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "Application-level (legacy) webhook URL. Didit sends to it only while the application has no enabled destination, and then only `status.updated` and `data.updated`. Every create, update or delete of a destination sets it to the URL of the oldest enabled destination, or `null` when none is enabled." }, - "overall_count": { + "webhook_version": { + "type": "string", + "enum": [ + "v1", + "v2", + "v3" + ], + "description": "Payload version of the legacy `webhook_url`. Each destination has its own `webhook_version`." + }, + "secret_shared_key": { + "type": "string", + "description": "Application-level signing secret (43-character URL-safe token). It signs only deliveries to the legacy `webhook_url`; each destination signs with its own `secret_shared_key`. API-key callers always receive it in full; Console users without `read:webhooks` receive an empty string." + }, + "capture_method": { + "type": "string", + "enum": [ + "MOBILE", + "MOBILE_AND_DESKTOP" + ], + "description": "Legacy application setting. The verification flow does not read it: capture options are configured per workflow." + }, + "data_retention_months": { "type": "integer", - "description": "Sessions measured." + "nullable": true, + "minimum": 1, + "maximum": 120, + "description": "Automatic deletion window. User verification sessions created more than this many months ago (a month counts as 30 days) are deleted automatically, and that deletion is irreversible. `null` means sessions are never deleted automatically. See [Data retention](https://docs.didit.me/console/data-retention)." }, - "per_feature": { - "type": "object", - "description": "Keyed by feature, for example `OCR` or `LIVENESS`.", - "additionalProperties": { + "face_retention_policy": { + "type": "string", + "enum": [ + "delete_with_session", + "retain_until_user_deleted" + ], + "description": "What happens to a session's face embedding when the session is deleted. `delete_with_session` (default) deletes it with the session. `retain_until_user_deleted` is the opt-in [biometric template retention](https://docs.didit.me/console/data-retention#biometric-template-retention): an image-free biometric template linked to the User is managed separately until its retention period ends, the User is deleted, or you purge it." + }, + "face_retention_days": { + "type": "integer", + "nullable": true, + "minimum": 1, + "maximum": 3650, + "description": "Retention period, in days, of biometric templates under `retain_until_user_deleted`. Required when that policy is set." + }, + "biometric_consent_mode": { + "type": "string", + "enum": [ + "auto", + "always", + "never" + ], + "description": "When the hosted flow and the native SDKs ask the person for explicit biometric consent before a face capture. `auto` (default) asks only where a trigger applies: a declared state, the person's IP, or the identity document's issuer is in Illinois, Texas or Colorado, or the person looks to be in the US without a known state. `always` asks every person whose workflow captures a face. `never` never shows the step, and you collect consent yourself before the selfie. Each change is recorded in the audit log. See [Biometric consent](https://docs.didit.me/getting-started/biometric-consent)." + }, + "available_events": { + "type": "array", + "description": "Every event type a destination can subscribe to, with a display label.", + "items": { "type": "object", + "required": [ + "value", + "label" + ], "properties": { - "avg_seconds": { - "type": "number" - }, - "total_seconds": { - "type": "number" + "value": { + "$ref": "#/components/schemas/WebhookEvent" }, - "count": { - "type": "integer" + "label": { + "type": "string", + "description": "Display label, for example `Session status updated`." } } } }, - "per_sub_step": { - "type": "object", - "description": "Keyed by feature, then by sub-step, for example `front_id_photo`.", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "avg_seconds": { - "type": "number" - }, - "total_seconds": { - "type": "number" - }, - "count": { - "type": "integer" - } - } - } + "allowed_return_hosts": { + "type": "array", + "maxItems": 20, + "description": "Hostnames (exact match, HTTPS only) a standalone Digital ID wallet verification may send the user back to with its `return_url`. Your white-label domain is always allowed as well. See [Register your return destination](https://docs.didit.me/standalone-apis/digital-id-wallets#register-your-return-destination).", + "items": { + "type": "string", + "maxLength": 253 } + }, + "endpoints": { + "type": "array", + "description": "Every webhook destination of the application, oldest first, each with its signing secret. Read only here: manage destinations with the `/v3/webhook/destinations/` endpoints.", + "items": { + "$ref": "#/components/schemas/WebhookConfigDestination" + } + }, + "allowed_domains": { + "type": "array", + "maxItems": 50, + "items": { + "type": "string", + "maxLength": 300 + }, + "description": "Origins (for example `https://app.example.com`; `http` only for `localhost`) the hosted verification flow may be embedded in and may send the user back to with a session callback. Server-to-server calls are not affected. An empty list means no restriction. Didit stores each origin in lower case without a default port. An invalid entry fails with `400` on `allowed_domains`.", + "example": [ + "https://app.example.com" + ] } } }, - "ApplicationAnalyticsResubmissionStats": { + "WebhookDestinationDelivery": { "type": "object", + "description": "One delivery attempt to a webhook destination. The first send of an event, each automatic retry and each resend are separate deliveries.", + "required": [ + "uuid", + "session_id", + "request_url", + "response_status", + "response_time_ms", + "status", + "webhook_type", + "created_at" + ], "properties": { - "first_pass": { - "type": "integer", - "description": "Finished sessions with no resubmission." + "uuid": { + "type": "string", + "format": "uuid", + "description": "Delivery ID, for the detail and resend calls." }, - "second": { - "type": "integer", - "description": "Finished sessions resubmitted once." + "session_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "User verification session the event is about. `null` for business session, user, business, transaction, Travel Rule and workflow events." }, - "third_plus": { + "request_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "URL the delivery was sent to: the destination's URL when the event was generated." + }, + "response_status": { "type": "integer", - "description": "Finished sessions resubmitted two or more times." + "nullable": true, + "description": "HTTP status your endpoint returned. `null` while the delivery is queued and not yet attempted. When no HTTP answer was received Didit records a status of its own: `504` when your endpoint did not answer within 5 seconds, `503` for a connection failure, `400` when the URL was refused as unsafe (for example a private or internal address), and `404` for any other request error. `400` or above counts as a failed delivery." }, - "abandoned": { + "response_time_ms": { "type": "integer", - "description": "Abandoned sessions." + "nullable": true, + "minimum": 0, + "description": "Time the attempt took, in milliseconds. `null` while the delivery is queued." + }, + "status": { + "type": "string", + "nullable": true, + "description": "Status the event reported when it was generated: the session status for session events (for example `Approved` or `In Review`), the person's or company's status for user and business events, and the transaction status for transaction events. `null` for events that carry no status." + }, + "webhook_type": { + "$ref": "#/components/schemas/WebhookEvent" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "When the delivery was created." } } }, - "ApplicationAnalyticsOriginalStatusStats": { + "WebhookDestinationDeliveryDetail": { "type": "object", - "description": "The workflow's automatic verdict, before any reviewer changed it.", + "description": "One delivery attempt to a webhook destination, with the exact request headers and body Didit sent.", + "required": [ + "uuid", + "session_id", + "request_url", + "response_status", + "response_time_ms", + "status", + "webhook_type", + "created_at", + "request_header", + "request_body" + ], "properties": { - "approved": { - "type": "integer" + "uuid": { + "type": "string", + "format": "uuid", + "description": "Delivery ID, for the detail and resend calls." }, - "in_review": { - "type": "integer" + "session_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "User verification session the event is about. `null` for business session, user, business, transaction, Travel Rule and workflow events." }, - "declined": { - "type": "integer" - } - } - }, - "ApplicationAnalyticsWarningStats": { - "type": "object", - "description": "Keyed by feature (`ID_VERIFICATION`, `LIVENESS`, `FACEMATCH`, `AML`, `PROOF_OF_ADDRESS`, `PHONE`, `EMAIL`, `NFC`, `LOCATION`, `DATABASE_VALIDATION`, `QUESTIONNAIRE` and the KYB features). `total` is the sessions that reached the feature; `risks` counts sessions per warning code and level.", - "additionalProperties": { - "type": "object", - "properties": { - "total": { - "type": "integer" - }, - "risks": { - "type": "object", - "additionalProperties": { - "type": "object", - "properties": { - "error": { - "type": "integer" - }, - "warning": { - "type": "integer" - }, - "information": { - "type": "integer" - } - } - } - } + "request_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "URL the delivery was sent to: the destination's URL when the event was generated." + }, + "response_status": { + "type": "integer", + "nullable": true, + "description": "HTTP status your endpoint returned. `null` while the delivery is queued and not yet attempted. When no HTTP answer was received Didit records a status of its own: `504` when your endpoint did not answer within 5 seconds, `503` for a connection failure, `400` when the URL was refused as unsafe (for example a private or internal address), and `404` for any other request error. `400` or above counts as a failed delivery." + }, + "response_time_ms": { + "type": "integer", + "nullable": true, + "minimum": 0, + "description": "Time the attempt took, in milliseconds. `null` while the delivery is queued." + }, + "status": { + "type": "string", + "nullable": true, + "description": "Status the event reported when it was generated: the session status for session events (for example `Approved` or `In Review`), the person's or company's status for user and business events, and the transaction status for transaction events. `null` for events that carry no status." + }, + "webhook_type": { + "$ref": "#/components/schemas/WebhookEvent" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "When the delivery was created." + }, + "request_header": { + "type": "string", + "description": "JSON text (a string) of the request headers Didit sent: `Content-Type`, `X-Signature`, `X-Signature-V2`, `X-Signature-Simple`, `X-Timestamp` and `User-Agent`. Parse it with a JSON parser. It holds signatures, never the signing secret." + }, + "request_body": { + "type": "string", + "description": "JSON text (a string) of the exact payload Didit sent, keys sorted, including `event_id` and `timestamp`. Parse it with a JSON parser; see [Payload shape](https://docs.didit.me/integration/webhooks#payload-shape). For a scoped key without `media: read`, media URLs inside it are `null`; without `sessions: write`, session tokens and hosted verification links are `null`. A body changed that way no longer matches its signatures. Didit does not record the response body your endpoint returned." } } }, - "ApplicationAnalyticsDemographicPoint": { + "SessionWebhookDelivery": { "type": "object", + "description": "One webhook delivery attempt recorded for a verification session, with the exact request headers and body Didit sent.", + "required": [ + "uuid", + "session_id", + "request_url", + "response_status", + "status", + "webhook_type", + "request_header", + "request_body", + "created_at" + ], "properties": { - "date": { + "uuid": { "type": "string", - "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." + "format": "uuid", + "description": "Delivery ID. Use it as `{webhook_uuid}` to get or resend this delivery." }, - "age_distribution": { - "type": "object", - "additionalProperties": { - "type": "integer" - } + "session_id": { + "type": "string", + "format": "uuid", + "description": "The session the delivery belongs to (the session in the path)." }, - "gender_distribution": { - "type": "object", - "additionalProperties": { - "type": "integer" - } + "request_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "URL the delivery was sent to." + }, + "response_status": { + "type": "integer", + "nullable": true, + "description": "HTTP status your endpoint returned. `null` while the delivery is queued and not yet attempted. When no HTTP answer was received Didit records a status of its own: `504` when your endpoint did not answer within 5 seconds, `503` for a connection failure, `400` when the URL was refused as unsafe (for example a private or internal address), and `404` for any other request error. `400` or above counts as a failed delivery." + }, + "status": { + "type": "string", + "nullable": true, + "description": "Session status when the event was generated, for example `In Progress`, `Approved` or `Declined`." + }, + "webhook_type": { + "$ref": "#/components/schemas/WebhookEvent" + }, + "request_header": { + "type": "string", + "description": "JSON text (a string) of the request headers Didit sent: `Content-Type`, `X-Signature`, `X-Signature-V2`, `X-Signature-Simple`, `X-Timestamp` and `User-Agent`. Parse it with a JSON parser. It holds signatures, never the signing secret." + }, + "request_body": { + "type": "string", + "description": "JSON text (a string) of the exact payload Didit sent, keys sorted, including `event_id` and `timestamp`. Parse it with a JSON parser; see [Payload shape](https://docs.didit.me/integration/webhooks#payload-shape). For a scoped key without `media: read`, media URLs inside it are `null`; without `sessions: write`, session tokens and hosted verification links are `null`. A body changed that way no longer matches its signatures. Didit does not record the response body your endpoint returned." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "When the delivery was created." } } }, - "ApplicationAnalyticsDevicePoint": { + "SessionEvent": { "type": "object", + "description": "One entry of a verification session's event timeline.", + "required": [ + "uuid", + "event_type", + "created_at", + "component", + "feature_step", + "step", + "details", + "ip_address", + "user_agent", + "device_info", + "file_url", + "sent_at" + ], "properties": { - "date": { + "uuid": { "type": "string", - "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." + "format": "uuid", + "description": "Event identifier." }, - "devices": { - "type": "object", - "additionalProperties": { - "type": "integer" - } + "event_type": { + "type": "string", + "enum": [ + "SESSION_CREATED", + "SESSION_COMPLETED", + "SESSION_STATUS_CHANGED", + "LINK_OPENED", + "FORM_SUBMITTED", + "BUTTON_CLICKED", + "FILE_UPLOADED", + "ATTEMPT_FAILED", + "FEATURE_STEP_CHANGED", + "STEP_RENDERED", + "NOTE_ADDED", + "MANUAL_REVIEW_STARTED", + "WORKFLOW_BRANCH_EVALUATED", + "WORKFLOW_STATUS_NODE_REACHED", + "LOG" + ], + "description": "What happened. Reported by the device during the hosted flow or SDK: `LINK_OPENED`, `STEP_RENDERED`, `BUTTON_CLICKED`, `FORM_SUBMITTED`, `FILE_UPLOADED`, `ATTEMPT_FAILED` and `LOG` (debugging). Recorded by the server: `SESSION_CREATED`, `SESSION_STATUS_CHANGED` (`details.old_status`, `details.current_status`), `FEATURE_STEP_CHANGED` (`details.old_feature_step`, `details.current_feature_step`), `WORKFLOW_BRANCH_EVALUATED` and `WORKFLOW_STATUS_NODE_REACHED` (the workflow routing trace). `SESSION_COMPLETED`, `NOTE_ADDED` and `MANUAL_REVIEW_STARTED` can appear on older sessions." }, - "browsers": { - "type": "object", - "additionalProperties": { - "type": "integer" - } + "created_at": { + "type": "string", + "format": "date-time", + "description": "When Didit stored the event. Events are stored asynchronously, a few seconds after `sent_at`." }, - "operating_systems": { + "component": { + "type": "string", + "nullable": true, + "description": "UI component that reported the event (device events only)." + }, + "feature_step": { + "type": "string", + "nullable": true, + "enum": [ + "OCR", + "OCR_BACK", + "NFC", + "AML", + "FACE", + "LIVENESS", + "FACE_MATCH", + "IP_ANALYSIS", + "AGE_ESTIMATION", + "PROOF_OF_ADDRESS", + "PHONE_VERIFICATION", + "EMAIL_VERIFICATION", + "FACE_SEARCH", + "DATABASE_VALIDATION", + "QUESTIONNAIRE", + "KYB_REGISTRY", + "KYB_DOCUMENTS", + "KYB_KEY_PEOPLE", + "DOCUMENT_AI", + "GEOLOCATION", + null + ], + "description": "Verification feature the session was on when the event happened." + }, + "step": { + "type": "string", + "nullable": true, + "description": "Screen within the feature, for example `DOCUMENT_CAPTURE_FRONT` or `FACE_PASSIVE_LIVENESS`." + }, + "details": { "type": "object", - "additionalProperties": { - "type": "integer" - } - } - } - }, - "ApplicationAnalyticsVerificationTimePoint": { - "type": "object", - "properties": { - "date": { + "nullable": true, + "additionalProperties": true, + "description": "Event-specific data. The keys depend on `event_type`." + }, + "ip_address": { "type": "string", - "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." + "nullable": true, + "description": "IP address the device reported the event from. `null` for server-recorded events." }, - "overall_avg": { - "type": "number", - "description": "Average active seconds per session." + "user_agent": { + "type": "string", + "nullable": true, + "description": "User agent of the device. `null` for server-recorded events." }, - "per_feature": { + "device_info": { "type": "object", - "description": "Average active seconds per feature.", - "additionalProperties": { - "type": "number" - } + "nullable": true, + "additionalProperties": true, + "description": "Device details the SDK or browser reported." + }, + "file_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "Short-lived presigned link to a file attached to the event (for example a captured image). `null` when there is none, and always `null` for a scoped API key without `media: read`." + }, + "sent_at": { + "type": "integer", + "format": "int64", + "description": "When the event happened, as a Unix timestamp in milliseconds. Results are ordered by it." } } }, - "ApplicationAnalyticsResubmissionPoint": { + "AMLDatasetSourceFreshness": { "type": "object", + "description": "Freshness of one family of AML datasets.", + "required": [ + "last_updated_at", + "oldest_updated_at", + "dataset_count", + "dated_dataset_count" + ], "properties": { - "date": { + "last_updated_at": { "type": "string", - "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." - }, - "first_pass": { - "type": "integer" + "format": "date-time", + "description": "Most recent update of any dataset in the family." }, - "second": { - "type": "integer" + "oldest_updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "Staleness bound: every dataset in the family is at least this current. `null` when at least one dataset in the family reported no update date, because the bound is then unknown." }, - "third_plus": { - "type": "integer" + "dataset_count": { + "type": "integer", + "description": "Number of datasets in the family." }, - "abandoned": { - "type": "integer" + "dated_dataset_count": { + "type": "integer", + "description": "Number of those datasets that reported an update date." } } }, - "ApplicationAnalyticsOriginalStatusPoint": { + "AMLDatasetFreshness": { "type": "object", + "description": "How current the AML datasets were when a screening ran. Dates are never estimated.", + "required": [ + "captured_at", + "provider", + "catalog_version", + "sources" + ], "properties": { - "date": { + "captured_at": { "type": "string", - "description": "Period key: `YYYY-MM-DD` for a day, the Monday of a week, or `YYYY-MM` for a month, following `grouping_mode`." + "format": "date-time", + "description": "When Didit read the dataset catalog this freshness comes from." }, - "approved": { - "type": "integer" + "provider": { + "type": "string", + "description": "Opaque identifier of the AML data source. Treat it as an opaque string; do not branch on it.", + "example": "aml_data_source" }, - "in_review": { - "type": "integer" + "catalog_version": { + "type": "string", + "nullable": true, + "description": "Version identifier of the dataset catalog, when the source reports one." }, - "declined": { - "type": "integer" + "sources": { + "type": "object", + "description": "Freshness per dataset family. A family whose datasets reported no update date is absent rather than filled with `null`.", + "properties": { + "sanctions": { + "$ref": "#/components/schemas/AMLDatasetSourceFreshness" + }, + "pep": { + "$ref": "#/components/schemas/AMLDatasetSourceFreshness" + }, + "warnings": { + "$ref": "#/components/schemas/AMLDatasetSourceFreshness" + }, + "adverse_media": { + "$ref": "#/components/schemas/AMLDatasetSourceFreshness" + } + } } } }, - "ApplicationAnalyticsSummary": { + "AMLScreeningRun": { "type": "object", - "description": "User verification (KYC) summary, returned when neither `scope` nor `widget_keys` is sent.", + "description": "One completed ongoing-monitoring re-screen of an AML check.", "required": [ - "data_points", - "request_breakdown", - "previous_data_points", - "previous_request_breakdown", - "conversion_rate", - "location_stats", - "demographic_stats", - "device_details", - "workflow_funnel_stats", - "verification_time_stats", - "resubmission_stats", - "warning_stats", - "original_status_stats", - "grouping_mode", - "demographic_time_series", - "device_time_series", - "verification_time_time_series", - "resubmission_time_series", - "original_status_time_series" + "uuid", + "run_id", + "completed_at", + "started_at", + "outcome", + "trigger", + "provider", + "status", + "score", + "total_hits", + "new_hits", + "entities_screened", + "dataset_freshness" ], "properties": { - "data_points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" - }, - "description": "One point per day, from the first day with sessions in the range to `end_date`. Always daily, whatever `grouping_mode` says." - }, - "request_breakdown": { - "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" - }, - "previous_data_points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" - }, - "description": "Daily points for the period of the same length right before `start_date`." - }, - "previous_request_breakdown": { - "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" - }, - "conversion_rate": { - "type": "number", - "nullable": true, - "description": "`total_approved / (total_approved + total_declined + total_in_review) x 100`, one decimal. `null` when nothing finished." - }, - "location_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsLocationStats" - }, - "demographic_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsDemographicStats" + "uuid": { + "type": "string", + "format": "uuid", + "description": "Identifier of this screening run." }, - "device_details": { - "$ref": "#/components/schemas/ApplicationAnalyticsDeviceDetails" + "run_id": { + "type": "string", + "format": "uuid", + "description": "The monitoring run this screening belongs to. Every verification screened in the same run shares it." }, - "workflow_funnel_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsWorkflowFunnel" + "completed_at": { + "type": "string", + "format": "date-time", + "description": "When this subject's re-screen finished. Results are ordered by it, newest first." }, - "verification_time_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimeStats" + "started_at": { + "type": "string", + "format": "date-time", + "description": "When the monitoring batch this re-screen belongs to started." }, - "resubmission_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionStats" + "outcome": { + "type": "string", + "enum": [ + "NO_CHANGE", + "CHANGED", + "FAILED" + ], + "description": "`NO_CHANGE`: completed and the result did not move. `CHANGED`: completed and the score, status, hit count or hits changed. `FAILED`: no usable answer for this subject, so the check was left as it was." }, - "warning_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsWarningStats" + "trigger": { + "type": "string", + "enum": [ + "ONGOING_MONITORING" + ], + "description": "What started the screening. Always `ONGOING_MONITORING` today." }, - "original_status_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusStats" + "provider": { + "type": "string", + "description": "Opaque identifier of the AML data source that answered. Treat it as an opaque string; do not branch on it.", + "example": "aml_data_source" }, - "grouping_mode": { + "status": { "type": "string", + "nullable": true, "enum": [ - "day", - "week", - "month" + "Not Finished", + "Approved", + "Declined", + "In Review", + "Resub Requested", + null ], - "description": "How the `*_time_series` lists are grouped: `day` for up to 14 days, `week` up to 90, `month` beyond. Measured from the first day with sessions in the range." + "description": "AML check status this run left the check in." }, - "demographic_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDemographicPoint" - } + "score": { + "type": "number", + "format": "float", + "nullable": true, + "minimum": 0, + "maximum": 100, + "description": "AML score this run left the check in." }, - "device_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDevicePoint" - } + "total_hits": { + "type": "integer", + "nullable": true, + "description": "Number of hits this run left the check in." }, - "verification_time_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimePoint" - } + "new_hits": { + "type": "integer", + "nullable": true, + "description": "Number of hits this run found that the check did not have before it. `0` when nothing new was found; `null` when the run failed or was recorded before this count existed." }, - "resubmission_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionPoint" - } + "entities_screened": { + "type": "integer", + "minimum": 0, + "maximum": 1, + "description": "Number of entities this run screened for the verification: `1` when the subject was screened, `0` when the run failed." }, - "original_status_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusPoint" - } + "dataset_freshness": { + "allOf": [ + { + "$ref": "#/components/schemas/AMLDatasetFreshness" + } + ], + "nullable": true, + "description": "Dataset freshness behind this run, or `null` when no dates were available." } } }, - "ApplicationAnalyticsWidget": { + "KYBKeyPeopleParty": { "type": "object", - "description": "One dashboard widget. Every widget has `kind` and `title`; the other fields depend on `kind`. The session widgets reuse the summary objects (`data_points`, `request_breakdown`, `workflow_funnel_stats` and so on); list widgets put their entries in `items`; transaction metrics use `value`.", + "description": "A Key People party of a Business Verification (KYB) session, with its child verification. The same party appears in `key_people_checks[].submitted.parties[]` of the business session decision.", "required": [ - "kind", - "title" + "uuid", + "entity_type", + "source", + "name", + "is_active", + "is_skipped", + "requires_verification", + "roles", + "kyc_session_deleted", + "kyb_sub_session_deleted" ], "properties": { - "kind": { + "uuid": { "type": "string", - "enum": [ - "sessions_volume", - "workflow_funnel", - "average_verification_time", - "country_distribution", - "warning_insights", - "conversion_rate", - "conversion_by_country", - "resubmission_insights", - "original_status_distribution", - "database_validation_coverage", - "database_validation_latency", - "demographics", - "device_details", - "horizontal_bar", - "kyb_registry_coverage", - "kyb_registry_data_completeness", - "metric", - "time_series", - "breakdown", - "status_time_series", - "leaderboard", - "histogram" - ], - "description": "Widget type." + "format": "uuid", + "description": "Party identifier." }, - "title": { + "entity_type": { "type": "string", - "description": "Display title, for example `Verification volume`." + "enum": [ + "person", + "company" + ], + "description": "Whether the party is an individual or a company." }, - "grouping_mode": { + "source": { "type": "string", "enum": [ - "day", - "week", - "month" + "REGISTRY", + "USER" ], - "description": "How the `*_time_series` lists are grouped: `day` for up to 14 days, `week` up to 90, `month` beyond. Measured from the first day with sessions in the range." + "description": "`REGISTRY`: taken from the company registry. `USER`: entered in the Key People screen." }, - "data_points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" - } + "name": { + "type": "string", + "description": "Display name of the party." }, - "request_breakdown": { - "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" + "first_name": { + "type": "string", + "nullable": true, + "description": "First name (persons)." }, - "previous_data_points": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDataPoint" - } + "last_name": { + "type": "string", + "nullable": true, + "description": "Last name (persons)." }, - "previous_request_breakdown": { - "$ref": "#/components/schemas/ApplicationAnalyticsRequestBreakdown" + "company_name": { + "type": "string", + "nullable": true, + "description": "Company name (company parties)." }, - "conversion_rate": { - "type": "number", - "nullable": true + "registration_number": { + "type": "string", + "nullable": true, + "description": "Company registration number (company parties)." }, - "workflow_funnel_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsWorkflowFunnel" + "email": { + "type": "string", + "format": "email", + "nullable": true, + "description": "Email the verification link is sent to." }, - "verification_time_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimeStats" + "nationality": { + "type": "string", + "nullable": true, + "description": "Nationality for persons, country of incorporation for companies." }, - "verification_time_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsVerificationTimePoint" - } + "phone_number": { + "type": "string", + "nullable": true, + "description": "Phone number collected for the party." }, - "warning_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsWarningStats" + "date_of_birth": { + "type": "string", + "format": "date", + "nullable": true, + "description": "Date of birth (persons)." }, - "resubmission_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionStats" + "position": { + "type": "string", + "nullable": true, + "description": "Free-text job title (persons)." }, - "resubmission_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsResubmissionPoint" - } + "custom_fields": { + "type": "object", + "additionalProperties": true, + "description": "Workflow-defined custom fields collected for the party, keyed by field key." }, - "original_status_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusStats" + "is_active": { + "type": "boolean", + "description": "Whether the party is active." }, - "original_status_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsOriginalStatusPoint" - } + "is_skipped": { + "type": "boolean", + "description": "Whether the party is exempt from verification. Regenerating clears it." }, - "demographic_stats": { - "$ref": "#/components/schemas/ApplicationAnalyticsDemographicStats" + "requires_verification": { + "type": "boolean", + "description": "Whether the role and ownership rules require a verification for this party." }, - "demographic_time_series": { + "roles": { "type": "array", + "description": "Roles the party holds in the company.", "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDemographicPoint" + "type": "object", + "required": [ + "role", + "ownership_percent", + "voting_percent" + ], + "properties": { + "role": { + "type": "string", + "enum": [ + "director", + "non_executive_director", + "secretary", + "chairman", + "ubo", + "shareholder", + "representative", + "founder", + "legal_advisor", + "authorized_signatory", + "trustee", + "beneficiary", + "settlor", + "protector", + "company_officer", + "investor", + "other" + ], + "description": "Role code." + }, + "ownership_percent": { + "type": "number", + "nullable": true, + "description": "Ownership percentage for this role, when known." + }, + "voting_percent": { + "type": "number", + "nullable": true, + "description": "Voting-rights percentage for this role, when known." + } + } } }, - "device_details": { - "$ref": "#/components/schemas/ApplicationAnalyticsDeviceDetails" + "kyc_session_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "Child individual KYC session (persons)." }, - "device_time_series": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ApplicationAnalyticsDevicePoint" - } + "kyc_session_status": { + "type": "string", + "nullable": true, + "enum": [ + "Not Started", + "In Progress", + "Approved", + "Declined", + "In Review", + "Expired", + "Abandoned", + "Kyc Expired", + "Resubmitted", + "Awaiting User", + null + ], + "description": "Status of the child KYC session. A deleted session keeps the status it had when it was deleted." }, - "items": { - "type": "array", - "description": "Entries of a list widget. `country_distribution` (KYC): `country`, `country_code`, `session_count`. `conversion_by_country`: `country`, `country_code`, `finished`, `approved`. `time_series`: `date`, `value`. `status_time_series`: `date`, `approved`, `declined`, `flagged`. `breakdown`: `transaction_type` or `action_type` with `count` and `volume`, or `tag_id`, `tag_name`, `count`. `leaderboard`: `rule_title`, `trigger_count` or `assignee`, `handled_count`, `average_processing_seconds`, each with `approved_percentage`, `declined_percentage`, `flagged_percentage`. `histogram`: `score`, `count`.", - "items": { - "type": "object", - "additionalProperties": {} - } + "kyc_session_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "Hosted link of the child KYC session. `null` when there is none or it was deleted, and for a scoped API key without `sessions: write`." }, - "previous_items": { - "type": "array", - "description": "Transaction time series for the period of the same length right before `start_date`.", - "items": { - "type": "object", - "additionalProperties": {} - } + "kyc_session_deleted": { + "type": "boolean", + "description": "The child KYC session was deleted, so it can never settle." }, - "value": { - "type": "number", - "description": "`metric` widgets: the figure for the range." + "kyb_sub_session_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "Child KYB session (company parties)." }, - "currency": { + "kyb_sub_session_status": { "type": "string", "nullable": true, - "description": "Transaction volume and amount widgets: the application's default transaction currency." + "enum": [ + "Not Started", + "In Progress", + "Approved", + "Declined", + "In Review", + "Expired", + "Abandoned", + "Kyc Expired", + "Resubmitted", + "Awaiting User", + null + ], + "description": "Status of the child KYB session." }, - "thresholds": { - "type": "object", - "description": "`histogram` widget: the application's review and decline score thresholds.", - "properties": { - "review": { - "type": "integer" - }, - "decline": { - "type": "integer" - } - } + "kyb_sub_session_url": { + "type": "string", + "format": "uri", + "nullable": true, + "description": "Hosted link of the child KYB session, with the same `null` rules as `kyc_session_url`." }, - "search": { - "type": "object", - "description": "`kyb_registry_coverage` widget: registry search totals.", - "properties": { - "searches_total": { - "type": "integer" - }, - "searches_with_no_candidates": { - "type": "integer" + "kyb_sub_session_deleted": { + "type": "boolean", + "description": "Company-party counterpart of `kyc_session_deleted`." + }, + "verification_workflow_type": { + "type": "string", + "nullable": true, + "enum": [ + "kyc", + "kyb", + "adaptive_age_verification", + "biometric_authentication", + "address_verification", + "questionnaire_verification", + "email_verification", + "phone_verification", + null + ], + "description": "Type of the workflow the child session runs." + }, + "verification_workflow_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "Workflow the child session runs." + }, + "verification_workflow_label": { + "type": "string", + "nullable": true, + "description": "Label of that workflow." + }, + "verification_workflow_features": { + "type": "array", + "nullable": true, + "description": "Features of the child session's workflow with their current status.", + "items": { + "type": "object", + "required": [ + "feature", + "status" + ], + "properties": { + "feature": { + "type": "string", + "description": "Feature code, for example `ID_VERIFICATION` or `LIVENESS`." + }, + "status": { + "type": "string", + "description": "Feature status, `Not Finished` until it runs." + } } } + }, + "didit_internal_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "Didit's identifier of the verified person, once known." } } }, - "ApplicationAnalyticsWidgetResponse": { + "TravelRuleDelivery": { "type": "object", - "description": "Dashboard widgets, returned when `scope` or `widget_keys` is sent.", + "description": "Where the latest message the transfer owes the other side stands. Didit contacts the counterparty after the request that created or changed the transfer has returned, so this object says whether that message got through: queued, being sent, waiting to be retried after an error, delivered, or failed. A failure the network may still recover from (no answer in time, a failed connection, HTTP `408`, `429` or `5xx`) is tried again after 30 seconds, 2 minutes, 10 minutes, 30 minutes and 1 hour. When a first message (`kind: SEND`) fails for good, because the network refused it or the sixth attempt failed too, the transfer moves to `COUNTERPARTY_VASP_NOT_REACHABLE` with `last_error` in its `timeline`; any other message that fails for good is noted in the `timeline`. The transfer's `status` stays the source of truth for the exchange itself.", "required": [ - "scope", - "available_widget_keys", - "requested_widget_keys", - "widgets" + "kind", + "status", + "rail", + "attempts", + "last_error", + "next_attempt_at", + "delivered_at" ], "properties": { - "scope": { + "kind": { "type": "string", "enum": [ - "home", - "kyc", - "kyb", - "transactions" + "SEND", + "ANSWER", + "TXID", + "CANCEL", + "POLL" ], - "description": "Dashboard tab." + "description": "What the message carries. `SEND`: the transfer's first message to the counterparty (outbound; the rail is chosen when it is sent). `ANSWER`: your accept or decline, owed to the network that asked (inbound). `TXID`: the on-chain transaction hash, after you finish the transfer. `CANCEL`: the cancellation, after you cancel it. `POLL`: a status query to a network that offers one, repeated every 5 minutes while the transfer waits on the counterparty." }, - "available_widget_keys": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Every widget key this scope accepts." + "status": { + "type": "string", + "enum": [ + "QUEUED", + "SENDING", + "RETRYING", + "DELIVERED", + "FAILED" + ], + "description": "`QUEUED`: waiting to be sent. `SENDING`: an attempt is running. `RETRYING`: an attempt failed and the next one runs at `next_attempt_at`. `DELIVERED`: the other side took the message. `FAILED`: the other side refused it, or the last attempt failed." + }, + "rail": { + "type": "string", + "enum": [ + "INTERNAL", + "TRP", + "GTR", + "TRUST", + "VERIFYVASP", + "SYGNA", + "EMAIL", + "" + ], + "description": "The rail that carries the message. Empty until Didit has chosen one for a first message." + }, + "attempts": { + "type": "integer", + "minimum": 0, + "description": "Attempts made so far for this message. A message that is not a status poll is attempted at most 6 times." }, - "requested_widget_keys": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The widget keys answered, in order: your valid `widget_keys`, or the scope's defaults." + "last_error": { + "type": "string", + "description": "The kind of failure the last attempt hit, `\"\"` when none did: for example `email undeliverable`, `trp identity endpoint unreachable` or `trp transfer inquiry delivery failed`. It never carries the counterparty's own answer, which stays on the transfer's `timeline`.\nWhen GTR answers with an error, its own status code and message are included. Response bodies are never included.", + "example": "email undeliverable" }, - "widgets": { - "type": "object", - "description": "Keyed by widget key, in the order of `requested_widget_keys`.", - "additionalProperties": { - "$ref": "#/components/schemas/ApplicationAnalyticsWidget" - } + "next_attempt_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the next attempt runs while the message is `QUEUED` or `RETRYING`." + }, + "delivered_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the other side took the message." } } }, - "WebhookConfigDestination": { + "TravelRuleDiscoveryStep": { "type": "object", - "description": "A webhook destination as listed in the webhook configuration, without delivery metrics. `GET /v3/webhook/destinations/{destination_uuid}/` adds its delivery summary.", - "required": [ - "uuid", - "label", - "url", - "enabled", - "webhook_version", - "secret_shared_key", - "subscribed_events", - "created_at", - "updated_at" - ], + "description": "One step of the counterparty discovery Didit ran for an outbound transfer, in the order it ran them. The first step that names a VASP with a route ends the chain.", "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "Destination ID." - }, - "label": { - "type": "string", - "maxLength": 255, - "description": "Human-readable name." - }, - "url": { + "step": { "type": "string", - "format": "uri", - "maxLength": 2000, - "description": "HTTPS endpoint Didit posts events to." - }, - "enabled": { - "type": "boolean", - "description": "`false` pauses deliveries to this destination." + "enum": [ + "internal_address_book", + "wallet_attribution", + "network_lookup", + "customer_hint", + "end_user" + ], + "description": "`internal_address_book`: another Didit customer that proved control of the destination wallet. `wallet_attribution`: the wallet's blockchain analytics attribution. `network_lookup`: a network that can say which VASP holds the address. `customer_hint`: the VASP name, LEI or jurisdiction you sent in `beneficiary_data`. `end_user`: the counterparty the end user (or you) picked, or the request to pick one." }, - "webhook_version": { + "outcome": { "type": "string", "enum": [ - "v1", - "v2", - "v3" + "match", + "miss", + "skipped" ], - "description": "Payload version sent to this destination." + "description": "`match`: the step named a counterparty. `miss`: it ran and found none. `skipped`: it could not run, and `reason` says why." }, - "secret_shared_key": { + "reason": { "type": "string", - "description": "This destination's signing secret (43-character URL-safe token). Verify each webhook with the secret of the destination it was sent to. API-key callers always receive it in full; Console users without `read:webhooks` receive an empty string." + "description": "Machine-readable reason, `\"\"` on a match: `no_proven_internal_wallet`, `attribution_disabled`, `already_attributed`, `no_attributed_entity`, `directory_match_no_route`, `gtr_address_lookup_runs_on_dispatch`, `no_membership`, `network_switched_off`, `no_network_address_lookup`, `no_directory_match`, `awaiting_end_user` or `picked_member_without_proven_wallet`." }, - "subscribed_events": { - "type": "array", - "uniqueItems": true, - "description": "Event types delivered to this destination. Empty when the destination was created without events, in which case it receives nothing.", - "items": { - "$ref": "#/components/schemas/WebhookEvent" - } + "vasp": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "The directory VASP the step named, when it named one." }, - "created_at": { + "rail": { "type": "string", - "format": "date-time" + "nullable": true, + "description": "The rail that reaches that counterparty, when the step found one." }, - "updated_at": { + "at": { "type": "string", "format": "date-time" } } }, - "WebhookConfig": { + "TravelRuleNextAction": { "type": "object", - "description": "Application-level webhook configuration, retention policy and Digital ID wallet return hosts, with every webhook destination.", - "required": [ - "webhook_url", - "webhook_version", - "secret_shared_key", - "capture_method", - "data_retention_months", - "face_retention_policy", - "face_retention_days", - "available_events", - "allowed_return_hosts", - "endpoints" - ], + "description": "One thing that moves a `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE` transfer on. See [Why a transfer is stuck](/transaction-monitoring/travel-rule#why-a-transfer-is-stuck).", "properties": { - "webhook_url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "Application-level (legacy) webhook URL. Didit sends to it only while the application has no enabled destination, and then only `status.updated` and `data.updated`. Every create, update or delete of a destination sets it to the URL of the oldest enabled destination, or `null` when none is enabled." - }, - "webhook_version": { + "action": { "type": "string", "enum": [ - "v1", - "v2", - "v3" + "select_counterparty_vasp", + "declare_self_hosted", + "add_vasp_hint", + "update_compliance_email", + "resend" ], - "description": "Payload version of the legacy `webhook_url`. Each destination has its own `webhook_version`." + "description": "`select_counterparty_vasp`: the end user picks the destination VASP in the wallet-ownership widget, or you PATCH `action=beneficiary_vasp`. `declare_self_hosted`: the end user declares the wallet self-hosted in the widget. `add_vasp_hint`: tell Didit who the counterparty is, with a VASP name, LEI or travel address (for example a `travel_address` on the destination wallet's address-book entry), then resend. `update_compliance_email` and `resend` are `action` values of `PATCH /v3/transactions/{transaction_id}/travel-rule/`: give the counterparty's compliance email again, and re-run routing." }, - "secret_shared_key": { + "url": { "type": "string", - "description": "Application-level signing secret (43-character URL-safe token). It signs only deliveries to the legacy `webhook_url`; each destination signs with its own `secret_shared_key`. API-key callers always receive it in full; Console users without `read:webhooks` receive an empty string." - }, - "capture_method": { + "format": "uri", + "description": "The wallet-ownership widget link, on `select_counterparty_vasp` and `declare_self_hosted` while the transfer has an open widget session." + } + }, + "required": [ + "action" + ] + }, + "TransactionTravelRule": { + "type": "object", + "description": "A transaction's Travel Rule transfer, as `GET /v3/transactions/{transaction_id}/`, the `201` of `POST /v3/transactions/` and each row of `GET /v3/transactions/` return it. `direction`, `rail`, `counterparty_vasp`, `delivery`, `discovery`, `reason` and `next_actions` have the same shape as on `PATCH /v3/transactions/{transaction_id}/travel-rule/`, so one read of a transaction says why its transfer is stuck and what moves it on.", + "properties": { + "uuid": { "type": "string", - "enum": [ - "MOBILE", - "MOBILE_AND_DESKTOP" - ], - "description": "Legacy application setting. The verification flow does not read it: capture options are configured per workflow." + "format": "uuid" }, - "data_retention_months": { - "type": "integer", - "nullable": true, - "minimum": 1, - "maximum": 120, - "description": "Automatic deletion window. User verification sessions created more than this many months ago (a month counts as 30 days) are deleted automatically, and that deletion is irreversible. `null` means sessions are never deleted automatically. See [Data retention](https://docs.didit.me/console/data-retention)." + "status": { + "type": "string" }, - "face_retention_policy": { + "protocol": { "type": "string", - "enum": [ - "delete_with_session", - "retain_until_user_deleted" - ], - "description": "What happens to a session's face embedding when the session is deleted. `delete_with_session` (default) deletes it with the session. `retain_until_user_deleted` is the opt-in [biometric template retention](https://docs.didit.me/console/data-retention#biometric-template-retention): an image-free biometric template linked to the User is managed separately until its retention period ends, the User is deleted, or you purge it." + "nullable": true }, - "face_retention_days": { - "type": "integer", + "required": { + "type": "boolean" + }, + "obligations_count": { + "type": "integer" + }, + "originator_data": { + "type": "object", + "description": "Originator party. For an inbound transfer the counterparty's values are masked until ownership is confirmed." + }, + "beneficiary_data": { + "type": "object", + "description": "Beneficiary party. For an inbound transfer the counterparty's values are masked until ownership is confirmed." + }, + "name_match": { + "type": "object", "nullable": true, - "minimum": 1, - "maximum": 3650, - "description": "Retention period, in days, of biometric templates under `retain_until_user_deleted`. Required when that policy is set." + "description": "The name comparison that decided the transfer (score and strictness). Null until one ran. The compared names are masked together with the parties." }, - "biometric_consent_mode": { + "data_match": { + "$ref": "#/components/schemas/TravelRuleDataMatch" + }, + "mismatched_fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Shortcut for `data_match.mismatched_fields`. Empty when nothing differs." + }, + "data_unmasked": { + "$ref": "#/components/schemas/TravelRuleDataUnmasked" + }, + "data_masked": { + "type": "boolean", + "description": "True while the counterparty's personal data is masked in this response." + }, + "metadata": { + "type": "object" + }, + "direction": { "type": "string", "enum": [ - "auto", - "always", - "never" + "INBOUND", + "OUTBOUND" ], - "description": "When the hosted flow and the native SDKs ask the person for explicit biometric consent before a face capture. `auto` (default) asks only where a trigger applies: a declared state, the person's IP, or the identity document's issuer is in Illinois, Texas or Colorado, or the person looks to be in the US without a known state. `always` asks every person whose workflow captures a face. `never` never shows the step, and you collect consent yourself before the selfie. Each change is recorded in the audit log. See [Biometric consent](https://docs.didit.me/getting-started/biometric-consent)." + "description": "Which side of the exchange this transfer is." }, - "available_events": { - "type": "array", - "description": "Every event type a destination can subscribe to, with a display label.", - "items": { - "type": "object", - "required": [ - "value", - "label" - ], - "properties": { - "value": { - "$ref": "#/components/schemas/WebhookEvent" - }, - "label": { - "type": "string", - "description": "Display label, for example `Session status updated`." + "rail": { + "type": "string", + "nullable": true, + "description": "The rail the transfer went over: `INTERNAL`, `TRP`, `GTR`, `TRUST`, `VERIFYVASP`, `SYGNA` or `EMAIL` (`TEST_VASP` on a sandbox application, when the Didit Test VASP answered), or `null` until a rail is chosen." + }, + "counterparty_vasp": { + "type": "object", + "nullable": true, + "properties": { + "name": { + "type": "string" + }, + "lei": { + "type": "string" + }, + "dd_score": { + "type": "integer", + "description": "Due-diligence score from 0 to 100, where higher is better. Same scale as in the VASP directory." + }, + "dd_score_breakdown": { + "type": "object", + "description": "Per-component contributions to dd_score, one object per component as in the VASP directory (jurisdiction, verification, protocol, lei, history, essentials, responsiveness), each {points, max, reason, detail}. {} until the counterparty has been assessed.", + "additionalProperties": { + "type": "object", + "properties": { + "points": { + "type": "number", + "description": "Points awarded for this component." + }, + "max": { + "type": "integer", + "description": "Maximum points this component can award." + }, + "reason": { + "type": "string", + "description": "Machine-readable code of the component's verdict." + }, + "detail": { + "type": "string", + "description": "Human-readable reason for the awarded points." + } + } } + }, + "dd_assessed_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the due-diligence assessment last ran. Null until the counterparty has been assessed." } - } + }, + "description": "The counterparty's directory entry, or `null` when the transfer links none." }, - "allowed_return_hosts": { + "delivery": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/TravelRuleDelivery" + } + ], + "description": "The newest message the transfer owes another party. `null` when it has owed none, for example below `threshold_amount` or for a declared self-hosted wallet." + }, + "discovery": { "type": "array", - "maxItems": 20, - "description": "Hostnames (exact match, HTTPS only) a standalone Digital ID wallet verification may send the user back to with its `return_url`. Your white-label domain is always allowed as well. See [Register your return destination](https://docs.didit.me/standalone-apis/digital-id-wallets#register-your-return-destination).", + "description": "How Didit looked for the counterparty, one entry per step that ran. Empty when no discovery ran, for example on an inbound transfer.", "items": { - "type": "string", - "maxLength": 253 + "$ref": "#/components/schemas/TravelRuleDiscoveryStep" } }, - "endpoints": { + "reason": { + "type": "string", + "description": "Why a `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE` transfer is stuck; `\"\"` for any other status. A failed delivery decides it first, on `COUNTERPARTY_VASP_NOT_REACHABLE` only: `email_undeliverable` (the mail provider refused the compliance email and no address is left to try: when it was sent, on a reminder, or as a permanent bounce reported later) or `delivery_failed` (the rail that was delivering failed for good: a network rail refused the message or ran out of retries, a `TRP` identity host did not answer, or the counterparty's `TRP` host did not accept the inquiry). Otherwise the `discovery` trace decides it: `awaiting_end_user` (no step named a counterparty Didit can reach), `directory_match_no_route` (a step named a directory VASP that has no route), `picked_member_without_proven_wallet` (the end user picked a Didit customer that has not proven control of the wallet), or `no_directory_match` when the trace gives no other reason. A resend moves the transfer on, so the reason clears. See [Why a transfer is stuck](/transaction-monitoring/travel-rule#why-a-transfer-is-stuck)." + }, + "next_actions": { "type": "array", - "description": "Every webhook destination of the application, oldest first, each with its signing secret. Read only here: manage destinations with the `/v3/webhook/destinations/` endpoints.", + "description": "What moves the transfer on; `[]` for any status but `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE`. `email_undeliverable` offers `update_compliance_email`, then `resend`. `delivery_failed` offers `resend`. A discovery reason offers `select_counterparty_vasp`, `declare_self_hosted`, `add_vasp_hint` and `resend`.", "items": { - "$ref": "#/components/schemas/WebhookConfigDestination" + "$ref": "#/components/schemas/TravelRuleNextAction" } + }, + "chain_details": { + "$ref": "#/components/schemas/TravelRuleChainDetails" } } }, - "WebhookDestinationDelivery": { + "NetworkListCounts": { "type": "object", - "description": "One delivery attempt to a webhook destination. The first send of an event, each automatic retry and each resend are separate deliveries.", - "required": [ - "uuid", - "session_id", - "request_url", - "response_status", - "response_time_ms", - "status", - "webhook_type", - "created_at" - ], + "description": "Network counts for the list's views and filter options, each network counted once. Returned only when `summary` is not `false`. `scopes` count every network visible to the application. `views` count the visible networks inside the selected `scope`. `facets` count the networks in the selected `scope` and `status` view (dismissed networks are left out unless `status` includes them). The other list filters do not change these counts.", "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "Delivery ID, for the detail and resend calls." - }, - "session_id": { - "type": "string", - "format": "uuid", - "nullable": true, - "description": "User verification session the event is about. `null` for business session, user, business, transaction, Travel Rule and workflow events." - }, - "request_url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "URL the delivery was sent to: the destination's URL when the event was generated." - }, - "response_status": { - "type": "integer", - "nullable": true, - "description": "HTTP status your endpoint returned. `null` while the delivery is queued and not yet attempted. When no HTTP answer was received Didit records a status of its own: `504` when your endpoint did not answer within 5 seconds, `503` for a connection failure, `400` when the URL was refused as unsafe (for example a private or internal address), and `404` for any other request error. `400` or above counts as a failed delivery." - }, - "response_time_ms": { - "type": "integer", - "nullable": true, - "minimum": 0, - "description": "Time the attempt took, in milliseconds. `null` while the delivery is queued." - }, - "status": { - "type": "string", - "nullable": true, - "description": "Status the event reported when it was generated: the session status for session events (for example `Approved` or `In Review`), the person's or company's status for user and business events, and the transaction status for transaction events. `null` for events that carry no status." + "scopes": { + "type": "object", + "description": "Visible networks by product.", + "properties": { + "all": { + "type": "integer" + }, + "identity": { + "type": "integer", + "description": "Every other network." + }, + "transactions": { + "type": "integer", + "description": "Networks whose members are all transaction parties." + } + } }, - "webhook_type": { - "$ref": "#/components/schemas/WebhookEvent" + "views": { + "type": "object", + "description": "Visible networks inside the selected `scope`, by status, plus two saved views.", + "properties": { + "all": { + "type": "integer" + }, + "active": { + "type": "integer" + }, + "in_review": { + "type": "integer" + }, + "resolved": { + "type": "integer" + }, + "dismissed": { + "type": "integer" + }, + "mine": { + "type": "integer", + "description": "Networks assigned to the calling console member. Always 0 for an API key." + }, + "high_risk": { + "type": "integer", + "description": "Networks with a risk score of 80 or more that are not dismissed." + } + } }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "When the delivery was created." + "facets": { + "type": "object", + "description": "Counts for each filter option, inside the selected `scope` and status view.", + "properties": { + "total": { + "type": "integer", + "description": "Networks in the selected `scope` and status view." + }, + "last_activity_days": { + "type": "object", + "description": "Networks with activity in the last 7, 30 and 90 days, keyed by the number of days.", + "properties": { + "7": { + "type": "integer" + }, + "30": { + "type": "integer" + }, + "90": { + "type": "integer" + } + } + }, + "risk_min": { + "type": "object", + "description": "Networks with a risk score of at least 50 and at least 80, keyed by the threshold.", + "properties": { + "50": { + "type": "integer" + }, + "80": { + "type": "integer" + } + } + }, + "signal_types": { + "type": "object", + "description": "Networks with at least one signal of each type.", + "properties": { + "ip_address": { + "type": "integer" + }, + "device": { + "type": "integer" + }, + "face": { + "type": "integer" + }, + "document_number": { + "type": "integer" + }, + "phone": { + "type": "integer" + }, + "email": { + "type": "integer" + }, + "address": { + "type": "integer" + } + } + }, + "priority": { + "type": "object", + "description": "Networks by priority. `none` counts networks without a priority.", + "properties": { + "low": { + "type": "integer" + }, + "medium": { + "type": "integer" + }, + "high": { + "type": "integer" + }, + "none": { + "type": "integer" + } + } + }, + "assignee": { + "type": "object", + "description": "Networks by assignee.", + "properties": { + "me": { + "type": "integer", + "description": "Assigned to the calling console member. Always 0 for an API key." + }, + "unassigned": { + "type": "integer", + "description": "Assigned to nobody." + }, + "users": { + "type": "array", + "description": "One entry per assignee, most networks first.", + "items": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + }, + "full_name": { + "type": "string", + "description": "The assignee's name, or their email when no name is set." + }, + "email": { + "type": "string" + }, + "count": { + "type": "integer" + } + } + } + } + } + }, + "has_case": { + "type": "integer", + "description": "Networks this application opened a case for." + }, + "min_size": { + "type": "object", + "description": "Networks with at least 10 members, keyed by the minimum size.", + "properties": { + "10": { + "type": "integer" + } + } + } + } } } }, - "WebhookDestinationDeliveryDetail": { + "NetworkTag": { "type": "object", - "description": "One delivery attempt to a webhook destination, with the exact request headers and body Didit sent.", - "required": [ - "uuid", - "session_id", - "request_url", - "response_status", - "response_time_ms", - "status", - "webhook_type", - "created_at", - "request_header", - "request_body" - ], + "description": "One of your application's tags on the network.", "properties": { "uuid": { "type": "string", "format": "uuid", - "description": "Delivery ID, for the detail and resend calls." - }, - "session_id": { - "type": "string", - "format": "uuid", - "nullable": true, - "description": "User verification session the event is about. `null` for business session, user, business, transaction, Travel Rule and workflow events." - }, - "request_url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "URL the delivery was sent to: the destination's URL when the event was generated." - }, - "response_status": { - "type": "integer", - "nullable": true, - "description": "HTTP status your endpoint returned. `null` while the delivery is queued and not yet attempted. When no HTTP answer was received Didit records a status of its own: `504` when your endpoint did not answer within 5 seconds, `503` for a connection failure, `400` when the URL was refused as unsafe (for example a private or internal address), and `404` for any other request error. `400` or above counts as a failed delivery." + "description": "The tag's UUID, the same value you pass as `tag_uuid`." }, - "response_time_ms": { - "type": "integer", - "nullable": true, - "minimum": 0, - "description": "Time the attempt took, in milliseconds. `null` while the delivery is queued." + "name": { + "type": "string" }, - "status": { + "color": { "type": "string", - "nullable": true, - "description": "Status the event reported when it was generated: the session status for session events (for example `Approved` or `In Review`), the person's or company's status for user and business events, and the transaction status for transaction events. `null` for events that carry no status." - }, - "webhook_type": { - "$ref": "#/components/schemas/WebhookEvent" + "description": "Hex color, for example `#6366F1`." }, - "created_at": { + "source": { "type": "string", - "format": "date-time", - "description": "When the delivery was created." + "enum": [ + "didit", + "custom" + ], + "description": "`didit` for a Didit preset tag, `custom` for a tag your team created." }, - "request_header": { + "added_by": { "type": "string", - "description": "JSON text (a string) of the request headers Didit sent: `Content-Type`, `X-Signature`, `X-Signature-V2`, `X-Signature-Simple`, `X-Timestamp` and `User-Agent`. Parse it with a JSON parser. It holds signatures, never the signing secret." + "nullable": true, + "description": "Email of the console member who added the tag. Null when an API key added it." }, - "request_body": { + "added_at": { "type": "string", - "description": "JSON text (a string) of the exact payload Didit sent, keys sorted, including `event_id` and `timestamp`. Parse it with a JSON parser; see [Payload shape](https://docs.didit.me/integration/webhooks#payload-shape). For a scoped key without `media: read`, media URLs inside it are `null`; without `sessions: write`, session tokens and hosted verification links are `null`. A body changed that way no longer matches its signatures. Didit does not record the response body your endpoint returned." + "format": "date-time" } } }, - "SessionWebhookDelivery": { + "NetworkOutcomes": { "type": "object", - "description": "One webhook delivery attempt recorded for a verification session, with the exact request headers and body Didit sent.", - "required": [ - "uuid", - "session_id", - "request_url", - "response_status", - "status", - "webhook_type", - "request_header", - "request_body", - "created_at" - ], + "description": "Where the network's people and businesses stand. Each member you may see counts once, by the status of their most recent verification that reached a decision. Transaction parties are not counted.", "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "Delivery ID. Use it as `{webhook_uuid}` to get or resend this delivery." - }, - "session_id": { - "type": "string", - "format": "uuid", - "description": "The session the delivery belongs to (the session in the path)." - }, - "request_url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "URL the delivery was sent to." - }, - "response_status": { + "approved": { "type": "integer", - "nullable": true, - "description": "HTTP status your endpoint returned. `null` while the delivery is queued and not yet attempted. When no HTTP answer was received Didit records a status of its own: `504` when your endpoint did not answer within 5 seconds, `503` for a connection failure, `400` when the URL was refused as unsafe (for example a private or internal address), and `404` for any other request error. `400` or above counts as a failed delivery." - }, - "status": { - "type": "string", - "nullable": true, - "description": "Session status when the event was generated, for example `In Progress`, `Approved` or `Declined`." - }, - "webhook_type": { - "$ref": "#/components/schemas/WebhookEvent" + "description": "Members whose most recent decided verification was approved." }, - "request_header": { - "type": "string", - "description": "JSON text (a string) of the request headers Didit sent: `Content-Type`, `X-Signature`, `X-Signature-V2`, `X-Signature-Simple`, `X-Timestamp` and `User-Agent`. Parse it with a JSON parser. It holds signatures, never the signing secret." + "declined": { + "type": "integer", + "description": "Members whose most recent decided verification was declined." }, - "request_body": { - "type": "string", - "description": "JSON text (a string) of the exact payload Didit sent, keys sorted, including `event_id` and `timestamp`. Parse it with a JSON parser; see [Payload shape](https://docs.didit.me/integration/webhooks#payload-shape). For a scoped key without `media: read`, media URLs inside it are `null`; without `sessions: write`, session tokens and hosted verification links are `null`. A body changed that way no longer matches its signatures. Didit does not record the response body your endpoint returned." + "in_review": { + "type": "integer", + "description": "Members whose most recent decided verification is in review." }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "When the delivery was created." + "total": { + "type": "integer", + "description": "Members with at least one verification, decided or not. A member whose verifications are all undecided (not started, in progress, expired or abandoned) counts here and in no other key." } } }, - "SessionEvent": { + "NetworkPatternScore": { "type": "object", - "description": "One entry of a verification session's event timeline.", - "required": [ - "uuid", - "event_type", - "created_at", - "component", - "feature_step", - "step", - "details", - "ip_address", - "user_agent", - "device_info", - "file_url", - "sent_at" - ], + "description": "How alike one kind of the members' data is across the whole network. A pattern is not a signal: no shared value links the members.", "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "Event identifier." - }, - "event_type": { + "type": { "type": "string", "enum": [ - "SESSION_CREATED", - "SESSION_COMPLETED", - "SESSION_STATUS_CHANGED", - "LINK_OPENED", - "FORM_SUBMITTED", - "BUTTON_CLICKED", - "FILE_UPLOADED", - "ATTEMPT_FAILED", - "FEATURE_STEP_CHANGED", - "STEP_RENDERED", - "NOTE_ADDED", - "MANUAL_REVIEW_STARTED", - "WORKFLOW_BRANCH_EVALUATED", - "WORKFLOW_STATUS_NODE_REACHED", - "LOG" + "background" ], - "description": "What happened. Reported by the device during the hosted flow or SDK: `LINK_OPENED`, `STEP_RENDERED`, `BUTTON_CLICKED`, `FORM_SUBMITTED`, `FILE_UPLOADED`, `ATTEMPT_FAILED` and `LOG` (debugging). Recorded by the server: `SESSION_CREATED`, `SESSION_STATUS_CHANGED` (`details.old_status`, `details.current_status`), `FEATURE_STEP_CHANGED` (`details.old_feature_step`, `details.current_feature_step`), `WORKFLOW_BRANCH_EVALUATED` and `WORKFLOW_STATUS_NODE_REACHED` (the workflow routing trace). `SESSION_COMPLETED`, `NOTE_ADDED` and `MANUAL_REVIEW_STARTED` can appear on older sessions." + "description": "`background`: the mean similarity of every pair of member selfie backgrounds, with the person masked out. It reads the newest selfie of each person, at most the 50 newest, and leaves out age assurance sessions. It covers the whole network, not only the members of your applications." }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "When Didit stored the event. Events are stored asynchronously, a few seconds after `sent_at`." + "score": { + "type": "number", + "nullable": true, + "minimum": 0, + "maximum": 1, + "description": "From 0 to 1, rounded to 4 decimals. Null when `reason` is set." }, - "component": { - "type": "string", + "members": { + "type": "integer", "nullable": true, - "description": "UI component that reported the event (device events only)." + "description": "How many members' selfies the score compared. A selfie that cannot be read, or shows too little background, is not compared. Null while `computing`; 0 or 1 with `not_enough_selfies`." }, - "feature_step": { + "reason": { "type": "string", - "nullable": true, "enum": [ - "OCR", - "OCR_BACK", - "NFC", - "AML", - "FACE", - "LIVENESS", - "FACE_MATCH", - "IP_ANALYSIS", - "AGE_ESTIMATION", - "PROOF_OF_ADDRESS", - "PHONE_VERIFICATION", - "EMAIL_VERIFICATION", - "FACE_SEARCH", - "DATABASE_VALIDATION", - "QUESTIONNAIRE", - "KYB_REGISTRY", - "KYB_DOCUMENTS", - "KYB_KEY_PEOPLE", - "DOCUMENT_AI", - "GEOLOCATION", - null + "computing", + "not_enough_selfies" ], - "description": "Verification feature the session was on when the event happened." - }, - "step": { - "type": "string", - "nullable": true, - "description": "Screen within the feature, for example `DOCUMENT_CAPTURE_FRONT` or `FACE_PASSIVE_LIVENESS`." - }, - "details": { - "type": "object", - "nullable": true, - "additionalProperties": true, - "description": "Event-specific data. The keys depend on `event_type`." - }, - "ip_address": { - "type": "string", "nullable": true, - "description": "IP address the device reported the event from. `null` for server-recorded events." + "description": "Why there is no score. `computing`: the score for the current members is being computed; read the network again later. `not_enough_selfies`: fewer than two members have a usable selfie. Null when there is a score." }, - "user_agent": { + "computed_at": { "type": "string", + "format": "date-time", "nullable": true, - "description": "User agent of the device. `null` for server-recorded events." + "description": "When the score was computed. Null while `computing`." + } + } + }, + "NetworkDetailResponse": { + "description": "The network detail, plus the organization's sharing mode, whether cross-organization signals apply to it, your application's tags on the network, member outcomes and pattern scores.", + "allOf": [ + { + "$ref": "#/components/schemas/NetworkDetail" }, - "device_info": { + { "type": "object", - "nullable": true, - "additionalProperties": true, - "description": "Device details the SDK or browser reported." - }, - "file_url": { - "type": "string", - "format": "uri", - "nullable": true, - "description": "Short-lived presigned link to a file attached to the event (for example a captured image). `null` when there is none, and always `null` for a scoped API key without `media: read`." - }, - "sent_at": { - "type": "integer", - "format": "int64", - "description": "When the event happened, as a Unix timestamp in milliseconds. Results are ordered by it." + "properties": { + "sharing_mode": { + "type": "string", + "enum": [ + "off", + "private", + "global" + ], + "description": "The organization's cross-organization sharing mode. Only `global` compares networks across organizations; `private` and `off` keep them to the organization's own history.", + "example": "global" + }, + "cross_org_available": { + "type": "boolean", + "description": "Whether cross-organization signals apply to this organization. They need both the Enterprise plan and the `global` sharing mode.", + "example": true + }, + "cross_org_unavailable_reason": { + "type": "string", + "enum": [ + "plan", + "sharing_mode" + ], + "nullable": true, + "description": "Why cross-organization signals do not apply, checked in this order. `plan`: the organization's plan does not include the cross-organization fraud network (it needs the Enterprise plan), whatever the sharing mode. `sharing_mode`: the plan includes it, but the sharing mode is `private` or `off`. Null when `cross_org_available` is `true`.", + "example": null + }, + "tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkTag" + }, + "description": "Your application's tags on the network, oldest first. Each application sees only its own tags. `fraud_tags` is separate and unchanged: the tags the network's members carry." + }, + "outcomes": { + "$ref": "#/components/schemas/NetworkOutcomes" + }, + "patterns": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkPatternScore" + }, + "description": "Pattern scores over the whole network. Today one item, `background`." + } + } } - } + ] }, - "AMLDatasetSourceFreshness": { + "NetworkTagRequest": { "type": "object", - "description": "Freshness of one family of AML datasets.", "required": [ - "last_updated_at", - "oldest_updated_at", - "dataset_count", - "dated_dataset_count" + "tag_uuid" ], "properties": { - "last_updated_at": { - "type": "string", - "format": "date-time", - "description": "Most recent update of any dataset in the family." - }, - "oldest_updated_at": { + "tag_uuid": { "type": "string", - "format": "date-time", - "nullable": true, - "description": "Staleness bound: every dataset in the family is at least this current. `null` when at least one dataset in the family reported no update date, because the bound is then unknown." - }, - "dataset_count": { - "type": "integer", - "description": "Number of datasets in the family." - }, - "dated_dataset_count": { - "type": "integer", - "description": "Number of those datasets that reported an update date." + "format": "uuid", + "description": "UUID of one of your application's tags." } + }, + "example": { + "tag_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7" } }, - "AMLDatasetFreshness": { + "NetworkTimeline": { + "title": "Default timeline (no contract)", "type": "object", - "description": "How current the AML datasets were when a screening ran. Dates are never estimated.", - "required": [ - "captured_at", - "provider", - "catalog_version", - "sources" - ], + "description": "Without `contract`: the network's own events, oldest first, not paginated.", "properties": { - "captured_at": { - "type": "string", - "format": "date-time", - "description": "When Didit read the dataset catalog this freshness comes from." - }, - "provider": { - "type": "string", - "description": "Opaque identifier of the AML data source. Treat it as an opaque string; do not branch on it.", - "example": "aml_data_source" + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkTimelineEvent" + } + } + } + }, + "NetworkTimelinePage": { + "title": "Typed timeline page (contract=2)", + "type": "object", + "description": "With `contract=2`: one page of typed events, newest first.", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkTypedTimelineEvent" + } }, - "catalog_version": { + "next_cursor": { "type": "string", "nullable": true, - "description": "Version identifier of the dataset catalog, when the source reports one." - }, - "sources": { - "type": "object", - "description": "Freshness per dataset family. A family whose datasets reported no update date is absent rather than filled with `null`.", - "properties": { - "sanctions": { - "$ref": "#/components/schemas/AMLDatasetSourceFreshness" - }, - "pep": { - "$ref": "#/components/schemas/AMLDatasetSourceFreshness" - }, - "warnings": { - "$ref": "#/components/schemas/AMLDatasetSourceFreshness" - }, - "adverse_media": { - "$ref": "#/components/schemas/AMLDatasetSourceFreshness" - } - } + "description": "Pass as `cursor` to read the next page. Null on the last page." } } }, - "AMLScreeningRun": { + "NetworkTypedTimelineEvent": { "type": "object", - "description": "One completed ongoing-monitoring re-screen of an AML check.", - "required": [ - "uuid", - "completed_at", - "started_at", - "outcome", - "trigger", - "provider", - "status", - "score", - "total_hits", - "dataset_freshness" - ], + "description": "One typed timeline event: the four default fields, plus its id, when Didit stored it, the member account and record it belongs to, and the detail block of its event type. The other detail blocks are null.", "properties": { - "uuid": { + "id": { "type": "string", - "format": "uuid", - "description": "Identifier of this screening run." + "description": "`:`, unique within the timeline.", + "example": "session:3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "completed_at": { + "event_type": { + "type": "string", + "enum": [ + "network_detected", + "signal_observed", + "network_active", + "network_in_review", + "network_resolved", + "network_dismissed", + "verification_attempt", + "transaction", + "login", + "rule_hit", + "case_linked", + "note_added" + ] + }, + "occurred_at": { "type": "string", "format": "date-time", - "description": "When this subject's re-screen finished. Results are ordered by it, newest first." + "description": "When it happened." }, - "started_at": { + "ingested_at": { "type": "string", "format": "date-time", - "description": "When the monitoring batch this re-screen belongs to started." + "description": "When Didit stored it." }, - "outcome": { + "label": { "type": "string", - "enum": [ - "NO_CHANGE", - "CHANGED", - "FAILED" + "description": "A short English label, for example `Verification attempt 2 of 3`." + }, + "metadata": { + "type": "object", + "description": "For the network's own events, the same metadata as the default timeline. Empty otherwise." + }, + "account": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineAccount" + } ], - "description": "`NO_CHANGE`: completed and the result did not move. `CHANGED`: completed and the score, status, hit count or hits changed. `FAILED`: no usable answer for this subject, so the check was left as it was." + "nullable": true, + "description": "The member account. Null for the network's own events, `case_linked` and `note_added`." }, - "trigger": { - "type": "string", - "enum": [ - "ONGOING_MONITORING" + "source_ref": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineSourceRef" + } ], - "description": "What started the screening. Always `ONGOING_MONITORING` today." + "nullable": true, + "description": "The source record. Null for the network's own events and `note_added`." }, - "provider": { - "type": "string", - "description": "Opaque identifier of the AML data source that answered. Treat it as an opaque string; do not branch on it.", - "example": "aml_data_source" + "verification_attempt": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineAttempt" + } + ], + "nullable": true, + "description": "Set on `verification_attempt` events." }, - "status": { - "type": "string", + "transaction": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineTransaction" + } + ], "nullable": true, - "enum": [ - "Not Finished", - "Approved", - "Declined", - "In Review", - "Resub Requested", - null + "description": "Set on `transaction` events." + }, + "login": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineLogin" + } ], - "description": "AML check status this run left the check in." + "nullable": true, + "description": "Set on `login` events." }, - "score": { - "type": "number", - "format": "float", + "rule_hit": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineRuleHit" + } + ], "nullable": true, - "minimum": 0, - "maximum": 100, - "description": "AML score this run left the check in." + "description": "Set on `rule_hit` events." }, - "total_hits": { - "type": "integer", + "case_linked": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineCaseLinked" + } + ], "nullable": true, - "description": "Number of hits this run left the check in." + "description": "Set on `case_linked` events." }, - "dataset_freshness": { + "note_added": { "allOf": [ { - "$ref": "#/components/schemas/AMLDatasetFreshness" + "$ref": "#/components/schemas/NetworkTimelineNoteAdded" } ], "nullable": true, - "description": "Dataset freshness behind this run, or `null` when no dates were available." + "description": "Set on `note_added` events. Never returned to an API key." } } }, - "KYBKeyPeopleParty": { + "NetworkTimelineAccount": { "type": "object", - "description": "A Key People party of a Business Verification (KYB) session, with its child verification. The same party appears in `key_people_checks[].submitted.parties[]` of the business session decision.", - "required": [ - "uuid", - "entity_type", - "source", - "name", - "is_active", - "is_skipped", - "requires_verification", - "roles", - "kyc_session_deleted", - "kyb_sub_session_deleted" - ], + "description": "The member account the event belongs to.", "properties": { - "uuid": { + "node_id": { "type": "string", - "format": "uuid", - "description": "Party identifier." + "description": "`:`, where kind is `vendor_user`, `vendor_business` or `transaction_party`.", + "example": "vendor_user:3fa85f64-5717-4562-b3fc-2c963f66afa6" }, - "entity_type": { + "node_type": { "type": "string", "enum": [ - "person", - "company" - ], - "description": "Whether the party is an individual or a company." + "account", + "business_account", + "transaction_party" + ] }, - "source": { + "uuid": { "type": "string", - "enum": [ - "REGISTRY", - "USER" - ], - "description": "`REGISTRY`: taken from the company registry. `USER`: entered in the Key People screen." + "format": "uuid" }, - "name": { + "vendor_data": { "type": "string", - "description": "Display name of the party." + "nullable": true }, - "first_name": { + "display_name": { "type": "string", - "nullable": true, - "description": "First name (persons)." + "nullable": true }, - "last_name": { + "ownership": { "type": "string", - "nullable": true, - "description": "Last name (persons)." + "enum": [ + "owned", + "organization" + ], + "description": "`owned` when the record belongs to the application you called (for a console member, to an application they were granted). `organization` when it belongs to another application of your organization." }, - "company_name": { + "route": { + "$ref": "#/components/schemas/NetworkTimelineRoute" + } + } + }, + "NetworkTimelineSourceRef": { + "type": "object", + "description": "The record the event was read from.", + "properties": { + "kind": { "type": "string", - "nullable": true, - "description": "Company name (company parties)." + "enum": [ + "session", + "business_session", + "transaction", + "monitoring_event", + "case" + ] }, - "registration_number": { + "id": { "type": "string", - "nullable": true, - "description": "Company registration number (company parties)." + "format": "uuid" }, - "email": { + "ownership": { "type": "string", - "format": "email", - "nullable": true, - "description": "Email the verification link is sent to." + "enum": [ + "owned", + "organization" + ], + "description": "`owned` when the record belongs to the application you called (for a console member, to an application they were granted). `organization` when it belongs to another application of your organization." }, - "nationality": { + "route": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineRoute" + } + ], + "description": "Absent for `monitoring_event` and `case`." + } + } + }, + "NetworkTimelineRoute": { + "type": "object", + "description": "Where the record opens: its kind, its UUID and the application it belongs to.", + "properties": { + "kind": { "type": "string", - "nullable": true, - "description": "Nationality for persons, country of incorporation for companies." + "description": "`user`, `business` or `transaction_party` for an account; `session`, `business_session` or `transaction` for a source record." }, - "phone_number": { + "id": { "type": "string", - "nullable": true, - "description": "Phone number collected for the party." + "format": "uuid" }, - "date_of_birth": { + "application_id": { "type": "string", - "format": "date", - "nullable": true, - "description": "Date of birth (persons)." - }, - "position": { + "format": "uuid" + } + } + }, + "NetworkTimelineAttempt": { + "type": "object", + "description": "One verification session of the account.", + "properties": { + "session_id": { "type": "string", - "nullable": true, - "description": "Free-text job title (persons)." + "format": "uuid", + "description": "The session UUID, or the business session UUID for a company." }, - "custom_fields": { - "type": "object", - "additionalProperties": true, - "description": "Workflow-defined custom fields collected for the party, keyed by field key." + "session_number": { + "type": "integer", + "nullable": true }, - "is_active": { - "type": "boolean", - "description": "Whether the party is active." + "attempt": { + "type": "integer", + "description": "This session's position among the account's sessions, in creation order." }, - "is_skipped": { - "type": "boolean", - "description": "Whether the party is exempt from verification. Regenerating clears it." + "attempt_count": { + "type": "integer", + "description": "How many sessions the account has." }, - "requires_verification": { - "type": "boolean", - "description": "Whether the role and ownership rules require a verification for this party." + "status": { + "type": "string", + "description": "The session status, for example `Approved` or `Declined`." }, - "roles": { + "status_changed_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "decline_reasons": { "type": "array", - "description": "Roles the party holds in the company.", "items": { - "type": "object", - "required": [ - "role", - "ownership_percent", - "voting_percent" - ], - "properties": { - "role": { - "type": "string", - "enum": [ - "director", - "non_executive_director", - "secretary", - "chairman", - "ubo", - "shareholder", - "representative", - "founder", - "legal_advisor", - "authorized_signatory", - "trustee", - "beneficiary", - "settlor", - "protector", - "company_officer", - "investor", - "other" - ], - "description": "Role code." - }, - "ownership_percent": { - "type": "number", - "nullable": true, - "description": "Ownership percentage for this role, when known." - }, - "voting_percent": { - "type": "number", - "nullable": true, - "description": "Voting-rights percentage for this role, when known." - } - } - } - }, - "kyc_session_id": { + "$ref": "#/components/schemas/NetworkTimelineDeclineReason" + }, + "description": "For a declined session only: its warnings, oldest first, once per warning. Empty otherwise." + } + } + }, + "NetworkTimelineDeclineReason": { + "type": "object", + "properties": { + "risk": { "type": "string", - "format": "uuid", - "nullable": true, - "description": "Child individual KYC session (persons)." + "description": "The warning code." }, - "kyc_session_status": { + "feature": { "type": "string", - "nullable": true, - "enum": [ - "Not Started", - "In Progress", - "Approved", - "Declined", - "In Review", - "Expired", - "Abandoned", - "Kyc Expired", - "Resubmitted", - "Awaiting User", - null - ], - "description": "Status of the child KYC session. A deleted session keeps the status it had when it was deleted." + "description": "The feature that raised the warning." }, - "kyc_session_url": { + "short_description": { + "type": "string" + } + } + }, + "NetworkTimelineTransaction": { + "type": "object", + "description": "A transaction a member account took part in, dated by its transaction date.", + "properties": { + "transaction_id": { "type": "string", - "format": "uri", - "nullable": true, - "description": "Hosted link of the child KYC session. `null` when there is none or it was deleted, and for a scoped API key without `sessions: write`." + "format": "uuid" }, - "kyc_session_deleted": { - "type": "boolean", - "description": "The child KYC session was deleted, so it can never settle." + "transaction_number": { + "type": "integer", + "nullable": true }, - "kyb_sub_session_id": { - "type": "string", - "format": "uuid", - "nullable": true, - "description": "Child KYB session (company parties)." + "transaction_type": { + "type": "string" }, - "kyb_sub_session_status": { - "type": "string", - "nullable": true, - "enum": [ - "Not Started", - "In Progress", - "Approved", - "Declined", - "In Review", - "Expired", - "Abandoned", - "Kyc Expired", - "Resubmitted", - "Awaiting User", - null - ], - "description": "Status of the child KYB session." + "action_type": { + "type": "string" }, - "kyb_sub_session_url": { - "type": "string", - "format": "uri", + "amount": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineAmount" + } + ], "nullable": true, - "description": "Hosted link of the child KYB session, with the same `null` rules as `kyc_session_url`." - }, - "kyb_sub_session_deleted": { - "type": "boolean", - "description": "Company-party counterpart of `kyc_session_deleted`." + "description": "Null when the transaction has no amount." }, - "verification_workflow_type": { - "type": "string", - "nullable": true, - "enum": [ - "kyc", - "kyb", - "adaptive_age_verification", - "biometric_authentication", - "address_verification", - "questionnaire_verification", - "email_verification", - "phone_verification", - null - ], - "description": "Type of the workflow the child session runs." + "status": { + "type": "string" }, - "verification_workflow_id": { + "decision_reason_code": { "type": "string", - "format": "uuid", - "nullable": true, - "description": "Workflow the child session runs." + "nullable": true }, - "verification_workflow_label": { + "decision_reason_label": { "type": "string", - "nullable": true, - "description": "Label of that workflow." - }, - "verification_workflow_features": { - "type": "array", - "nullable": true, - "description": "Features of the child session's workflow with their current status.", - "items": { - "type": "object", - "required": [ - "feature", - "status" - ], - "properties": { - "feature": { - "type": "string", - "description": "Feature code, for example `ID_VERIFICATION` or `LIVENESS`." - }, - "status": { - "type": "string", - "description": "Feature status, `Not Finished` until it runs." - } - } - } + "nullable": true }, - "didit_internal_id": { + "party_role": { "type": "string", - "format": "uuid", - "nullable": true, - "description": "Didit's identifier of the verified person, once known." + "description": "The account's role in the transaction: `APPLICANT`, `REMITTER`, `BENEFICIARY` or `COUNTERPARTY`." } } }, - "TravelRuleDelivery": { + "NetworkTimelineAmount": { "type": "object", - "description": "Where the latest message the transfer owes the other side stands. Didit contacts the counterparty after the request that created or changed the transfer has returned, so this object says whether that message got through: queued, being sent, waiting to be retried after an error, delivered, or failed. A failure the network may still recover from (no answer in time, a failed connection, HTTP `408`, `429` or `5xx`) is tried again after 30 seconds, 2 minutes, 10 minutes, 30 minutes and 1 hour. When a first message (`kind: SEND`) fails for good, because the network refused it or the sixth attempt failed too, the transfer moves to `COUNTERPARTY_VASP_NOT_REACHABLE` with `last_error` in its `timeline`; any other message that fails for good is noted in the `timeline`. The transfer's `status` stays the source of truth for the exchange itself.", - "required": [ - "kind", - "status", - "rail", - "attempts", - "last_error", - "next_attempt_at", - "delivered_at" - ], "properties": { - "kind": { + "value": { "type": "string", - "enum": [ - "SEND", - "ANSWER", - "TXID", - "CANCEL", - "POLL" - ], - "description": "What the message carries. `SEND`: the transfer's first message to the counterparty (outbound; the rail is chosen when it is sent). `ANSWER`: your accept or decline, owed to the network that asked (inbound). `TXID`: the on-chain transaction hash, after you finish the transfer. `CANCEL`: the cancellation, after you cancel it. `POLL`: a status query to a network that offers one, repeated every 5 minutes while the transfer waits on the counterparty." + "description": "Decimal amount as a string." }, - "status": { - "type": "string", - "enum": [ - "QUEUED", - "SENDING", - "RETRYING", - "DELIVERED", - "FAILED" - ], - "description": "`QUEUED`: waiting to be sent. `SENDING`: an attempt is running. `RETRYING`: an attempt failed and the next one runs at `next_attempt_at`. `DELIVERED`: the other side took the message. `FAILED`: the other side refused it, or the last attempt failed." + "currency": { + "type": "string" }, - "rail": { + "direction": { "type": "string", - "enum": [ - "INTERNAL", - "TRP", - "GTR", - "TRUST", - "VERIFYVASP", - "SYGNA", - "EMAIL", - "" - ], - "description": "The rail that carries the message. Empty until Didit has chosen one for a first message." + "nullable": true + } + } + }, + "NetworkTimelineLogin": { + "type": "object", + "description": "A sign-in event you posted for a person through the events API.", + "properties": { + "action": { + "type": "string", + "description": "`.`: `auth.login` or `security.login_succeeded` for a sign-in, `auth.login_failed` or `security.login_failed` for a failed one." }, - "attempts": { - "type": "integer", - "minimum": 0, - "description": "Attempts made so far for this message. A message that is not a status poll is attempted at most 6 times." + "succeeded": { + "type": "boolean" }, - "last_error": { + "status": { "type": "string", - "description": "The kind of failure the last attempt hit, `\"\"` when none did: for example `email undeliverable`, `trp identity endpoint unreachable` or `trp transfer inquiry delivery failed`. It never carries the counterparty's own answer, which stays on the transfer's `timeline`.\nWhen GTR answers with an error, its own status code and message are included. Response bodies are never included.", - "example": "email undeliverable" + "description": "The event's status." }, - "next_attempt_at": { - "type": "string", - "format": "date-time", + "ip": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineIP" + } + ], "nullable": true, - "description": "When the next attempt runs while the message is `QUEUED` or `RETRYING`." + "description": "Null when the event has no IP address." }, - "delivered_at": { - "type": "string", - "format": "date-time", + "device": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTimelineDevice" + } + ], "nullable": true, - "description": "When the other side took the message." + "description": "Null when the event has no device fingerprint or context." + }, + "is_first_login": { + "type": "boolean", + "description": "The account's first successful sign-in on record." + }, + "is_new_device": { + "type": "boolean", + "description": "A successful sign-in from a device none of the account's earlier successful sign-ins came from. Never true on the first sign-in." } } }, - "TravelRuleDiscoveryStep": { + "NetworkTimelineIP": { "type": "object", - "description": "One step of the counterparty discovery Didit ran for an outbound transfer, in the order it ran them. The first step that names a VASP with a route ends the chain.", "properties": { - "step": { - "type": "string", - "enum": [ - "internal_address_book", - "wallet_attribution", - "network_lookup", - "customer_hint", - "end_user" - ], - "description": "`internal_address_book`: another Didit customer that proved control of the destination wallet. `wallet_attribution`: the wallet's blockchain analytics attribution. `network_lookup`: a network that can say which VASP holds the address. `customer_hint`: the VASP name, LEI or jurisdiction you sent in `beneficiary_data`. `end_user`: the counterparty the end user (or you) picked, or the request to pick one." + "address": { + "type": "string" }, - "outcome": { + "country_code": { "type": "string", - "enum": [ - "match", - "miss", - "skipped" - ], - "description": "`match`: the step named a counterparty. `miss`: it ran and found none. `skipped`: it could not run, and `reason` says why." + "nullable": true }, - "reason": { + "city": { "type": "string", - "description": "Machine-readable reason, `\"\"` on a match: `no_proven_internal_wallet`, `attribution_disabled`, `already_attributed`, `no_attributed_entity`, `directory_match_no_route`, `gtr_address_lookup_runs_on_dispatch`, `no_membership`, `network_switched_off`, `no_network_address_lookup`, `no_directory_match`, `awaiting_end_user` or `picked_member_without_proven_wallet`." + "nullable": true }, - "vasp": { + "connection_type": { "type": "string", - "format": "uuid", "nullable": true, - "description": "The directory VASP the step named, when it named one." + "description": "The connection type label for the address, as free text." }, - "rail": { - "type": "string", - "nullable": true, - "description": "The rail that reaches that counterparty, when the step found one." + "is_vpn_or_tor": { + "type": "boolean" }, - "at": { - "type": "string", - "format": "date-time" + "is_data_center": { + "type": "boolean" } } }, - "TravelRuleNextAction": { + "NetworkTimelineDevice": { "type": "object", - "description": "One thing that moves a `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE` transfer on. See [Why a transfer is stuck](/transaction-monitoring/travel-rule#why-a-transfer-is-stuck).", "properties": { - "action": { + "fingerprint": { "type": "string", - "enum": [ - "select_counterparty_vasp", - "declare_self_hosted", - "add_vasp_hint", - "update_compliance_email", - "resend" - ], - "description": "`select_counterparty_vasp`: the end user picks the destination VASP in the wallet-ownership widget, or you PATCH `action=beneficiary_vasp`. `declare_self_hosted`: the end user declares the wallet self-hosted in the widget. `add_vasp_hint`: tell Didit who the counterparty is, with a VASP name, LEI or travel address (for example a `travel_address` on the destination wallet's address-book entry), then resend. `update_compliance_email` and `resend` are `action` values of `PATCH /v3/transactions/{transaction_id}/travel-rule/`: give the counterparty's compliance email again, and re-run routing." + "nullable": true }, - "url": { + "label": { "type": "string", - "format": "uri", - "description": "The wallet-ownership widget link, on `select_counterparty_vasp` and `declare_self_hosted` while the transfer has an open widget session." + "nullable": true, + "description": "A readable device label built from the event's device context." } - }, - "required": [ - "action" - ] + } }, - "TransactionTravelRule": { + "NetworkTimelineRuleHit": { "type": "object", - "description": "A transaction's Travel Rule transfer, as `GET /v3/transactions/{transaction_id}/`, the `201` of `POST /v3/transactions/` and each row of `GET /v3/transactions/` return it. `direction`, `rail`, `counterparty_vasp`, `delivery`, `discovery`, `reason` and `next_actions` have the same shape as on `PATCH /v3/transactions/{transaction_id}/travel-rule/`, so one read of a transaction says why its transfer is stuck and what moves it on.", + "description": "A live rule that matched a member's transaction or event. Test-mode matches are not included.", "properties": { - "uuid": { + "rule_id": { "type": "string", "format": "uuid" }, - "status": { + "rule_title": { "type": "string" }, - "protocol": { + "rule_category": { + "type": "string" + }, + "rule_source": { + "type": "string" + }, + "severity": { "type": "string", "nullable": true }, - "required": { - "type": "boolean" - }, - "obligations_count": { + "score_delta": { "type": "integer" }, - "originator_data": { - "type": "object", - "description": "Originator party. For an inbound transfer the counterparty's values are masked until ownership is confirmed." + "status_target": { + "type": "string", + "nullable": true }, - "beneficiary_data": { - "type": "object", - "description": "Beneficiary party. For an inbound transfer the counterparty's values are masked until ownership is confirmed." + "action_summary": { + "type": "string", + "nullable": true + } + } + }, + "NetworkTimelineCaseLinked": { + "type": "object", + "description": "A case opened for the network in your organization. `source_ref.ownership` says whether it belongs to the application you called.", + "properties": { + "case_id": { + "type": "string", + "format": "uuid" }, - "name_match": { - "type": "object", - "nullable": true, - "description": "The name comparison that decided the transfer (score and strictness). Null until one ran. The compared names are masked together with the parties." + "case_number": { + "type": "string", + "nullable": true }, - "data_match": { - "$ref": "#/components/schemas/TravelRuleDataMatch" + "status": { + "type": "string" }, - "mismatched_fields": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Shortcut for `data_match.mismatched_fields`. Empty when nothing differs." + "author_email": { + "type": "string", + "nullable": true }, - "data_unmasked": { - "$ref": "#/components/schemas/TravelRuleDataUnmasked" + "author_name": { + "type": "string", + "nullable": true + } + } + }, + "NetworkTimelineNoteAdded": { + "type": "object", + "description": "A note left on the network. The note text is not included.", + "properties": { + "note_id": { + "type": "string", + "format": "uuid" }, - "data_masked": { - "type": "boolean", - "description": "True while the counterparty's personal data is masked in this response." + "author_email": { + "type": "string" + } + } + }, + "FeatureStatusOverride": { + "type": "object", + "description": "One override of a check (feature) status made with `PATCH /v3/session/{sessionId}/features/{nodeId}/update-status/`: what it changes, whether it applied or still waits for the person to finish the flow, who asked and why.", + "required": [ + "id", + "node_id", + "feature_type", + "feature_model", + "previous_status", + "new_status", + "state", + "forced", + "reason", + "requested_by", + "requested_at", + "applied_at", + "cancelled_at", + "cancel_reason" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Identifier of the override. Pass it to the cancel endpoint.", + "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" }, - "metadata": { - "type": "object" + "node_id": { + "type": "string", + "description": "The workflow node the request named (`default` for a step without a node).", + "example": "feature_ocr_1" }, - "direction": { + "feature_type": { + "type": "string", + "description": "The `feature_type` the request passed, or an empty string when it passed none.", + "example": "" + }, + "feature_model": { + "type": "string", + "description": "The kind of check that was overridden, for example `KYC`, `Face`, `AML` or `GeolocationCheck`.", + "example": "KYC" + }, + "previous_status": { "type": "string", "enum": [ - "INBOUND", - "OUTBOUND" + "Not Finished", + "Approved", + "Declined", + "In Review", + "Resub Requested" ], - "description": "Which side of the exchange this transfer is." + "description": "The check's status when the override was requested.", + "example": "In Review" }, - "rail": { + "new_status": { "type": "string", - "nullable": true, - "description": "The rail the transfer went over: `INTERNAL`, `TRP`, `GTR`, `TRUST`, `VERIFYVASP`, `SYGNA` or `EMAIL` (`TEST_VASP` on a sandbox application, when the Didit Test VASP answered), or `null` until a rail is chosen." - }, - "counterparty_vasp": { - "type": "object", - "nullable": true, - "properties": { - "name": { - "type": "string" - }, - "lei": { - "type": "string" - }, - "dd_score": { - "type": "integer", - "description": "Due-diligence score from 0 to 100, where higher is better. Same scale as in the VASP directory." - }, - "dd_score_breakdown": { - "type": "object", - "description": "Per-component contributions to dd_score, one object per component as in the VASP directory (jurisdiction, verification, protocol, lei, history, essentials, responsiveness), each {points, max, reason, detail}. {} until the counterparty has been assessed.", - "additionalProperties": { - "type": "object", - "properties": { - "points": { - "type": "number", - "description": "Points awarded for this component." - }, - "max": { - "type": "integer", - "description": "Maximum points this component can award." - }, - "reason": { - "type": "string", - "description": "Machine-readable code of the component's verdict." - }, - "detail": { - "type": "string", - "description": "Human-readable reason for the awarded points." - } - } - } - }, - "dd_assessed_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the due-diligence assessment last ran. Null until the counterparty has been assessed." - } - }, - "description": "The counterparty's directory entry, or `null` when the transfer links none." + "enum": [ + "Approved", + "Declined", + "In Review" + ], + "description": "The status the override sets.", + "example": "Approved" }, - "delivery": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/TravelRuleDelivery" - } + "state": { + "type": "string", + "enum": [ + "applied", + "pending_until_flow_finishes", + "cancelled" ], - "description": "The newest message the transfer owes another party. `null` when it has owed none, for example below `threshold_amount` or for a declared self-hosted wallet." + "description": "`applied`: the check has the new status. `pending_until_flow_finishes`: the override waits and applies when the person finishes the flow. `cancelled`: it waited and never applied (see `cancel_reason`).", + "example": "applied" }, - "discovery": { - "type": "array", - "description": "How Didit looked for the counterparty, one entry per step that ran. Empty when no discovery ran, for example on an inbound transfer.", - "items": { - "$ref": "#/components/schemas/TravelRuleDiscoveryStep" - } + "forced": { + "type": "boolean", + "description": "`true` when the override applied at once while the person was still in the flow.", + "example": false }, "reason": { "type": "string", - "description": "Why a `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE` transfer is stuck; `\"\"` for any other status. A failed delivery decides it first, on `COUNTERPARTY_VASP_NOT_REACHABLE` only: `email_undeliverable` (the mail provider refused the compliance email and no address is left to try: when it was sent, on a reminder, or as a permanent bounce reported later) or `delivery_failed` (the rail that was delivering failed for good: a network rail refused the message or ran out of retries, a `TRP` identity host did not answer, or the counterparty's `TRP` host did not accept the inquiry). Otherwise the `discovery` trace decides it: `awaiting_end_user` (no step named a counterparty Didit can reach), `directory_match_no_route` (a step named a directory VASP that has no route), `picked_member_without_proven_wallet` (the end user picked a Didit customer that has not proven control of the wallet), or `no_directory_match` when the trace gives no other reason. A resend moves the transfer on, so the reason clears. See [Why a transfer is stuck](/transaction-monitoring/travel-rule#why-a-transfer-is-stuck)." - }, - "next_actions": { - "type": "array", - "description": "What moves the transfer on; `[]` for any status but `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE`. `email_undeliverable` offers `update_compliance_email`, then `resend`. `delivery_failed` offers `resend`. A discovery reason offers `select_counterparty_vasp`, `declare_self_hosted`, `add_vasp_hint` and `resend`.", - "items": { - "$ref": "#/components/schemas/TravelRuleNextAction" - } - }, - "chain_details": { - "$ref": "#/components/schemas/TravelRuleChainDetails" - } - } - }, - "NetworkListCounts": { - "type": "object", - "description": "Network counts for the list's views and filter options, each network counted once. Returned only when `summary` is not `false`. `scopes` count every network visible to the application. `views` count the visible networks inside the selected `scope`. `facets` count the networks in the selected `scope` and `status` view (dismissed networks are left out unless `status` includes them). The other list filters do not change these counts.", - "properties": { - "scopes": { - "type": "object", - "description": "Visible networks by product.", - "properties": { - "all": { - "type": "integer" - }, - "identity": { - "type": "integer", - "description": "Every other network." - }, - "transactions": { - "type": "integer", - "description": "Networks whose members are all transaction parties." - } - } - }, - "views": { - "type": "object", - "description": "Visible networks inside the selected `scope`, by status, plus two saved views.", - "properties": { - "all": { - "type": "integer" - }, - "active": { - "type": "integer" - }, - "in_review": { - "type": "integer" - }, - "resolved": { - "type": "integer" - }, - "dismissed": { - "type": "integer" - }, - "mine": { - "type": "integer", - "description": "Networks assigned to the calling console member. Always 0 for an API key." - }, - "high_risk": { - "type": "integer", - "description": "Networks with a risk score of 80 or more that are not dismissed." - } - } + "nullable": true, + "description": "The `comment` sent with the request, or `null`.", + "example": "Document manually verified by compliance." }, - "facets": { + "requested_by": { "type": "object", - "description": "Counts for each filter option, inside the selected `scope` and status view.", + "nullable": true, + "description": "Who requested the override, or `null` when that is not known.", "properties": { - "total": { - "type": "integer", - "description": "Networks in the selected `scope` and status view." - }, - "last_activity_days": { - "type": "object", - "description": "Networks with activity in the last 7, 30 and 90 days, keyed by the number of days.", - "properties": { - "7": { - "type": "integer" - }, - "30": { - "type": "integer" - }, - "90": { - "type": "integer" - } - } - }, - "risk_min": { - "type": "object", - "description": "Networks with a risk score of at least 50 and at least 80, keyed by the threshold.", - "properties": { - "50": { - "type": "integer" - }, - "80": { - "type": "integer" - } - } - }, - "signal_types": { - "type": "object", - "description": "Networks with at least one signal of each type.", - "properties": { - "ip_address": { - "type": "integer" - }, - "device": { - "type": "integer" - }, - "face": { - "type": "integer" - }, - "document_number": { - "type": "integer" - }, - "phone": { - "type": "integer" - }, - "email": { - "type": "integer" - }, - "address": { - "type": "integer" - } - } - }, - "priority": { - "type": "object", - "description": "Networks by priority. `none` counts networks without a priority.", - "properties": { - "low": { - "type": "integer" - }, - "medium": { - "type": "integer" - }, - "high": { - "type": "integer" - }, - "none": { - "type": "integer" - } - } - }, - "assignee": { - "type": "object", - "description": "Networks by assignee.", - "properties": { - "me": { - "type": "integer", - "description": "Assigned to the calling console member. Always 0 for an API key." - }, - "unassigned": { - "type": "integer", - "description": "Assigned to nobody." - }, - "users": { - "type": "array", - "description": "One entry per assignee, most networks first.", - "items": { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - }, - "full_name": { - "type": "string", - "description": "The assignee's name, or their email when no name is set." - }, - "email": { - "type": "string" - }, - "count": { - "type": "integer" - } - } - } - } - } + "email": { + "type": "string", + "format": "email", + "nullable": true, + "description": "Email of the console user, or `null` for API keys and the system.", + "example": "reviewer@example.com" }, - "has_case": { - "type": "integer", - "description": "Networks this application opened a case for." + "name": { + "type": "string", + "nullable": true, + "description": "Display name of the requester, or `null`.", + "example": "Alex Reviewer" }, - "min_size": { - "type": "object", - "description": "Networks with at least 10 members, keyed by the minimum size.", - "properties": { - "10": { - "type": "integer" - } - } + "type": { + "type": "string", + "enum": [ + "CONSOLE_USER", + "API_KEY", + "SYSTEM" + ], + "description": "Who made the request: a console user, an API key, or Didit itself.", + "example": "CONSOLE_USER" } } + }, + "requested_at": { + "type": "string", + "format": "date-time", + "description": "When the override was requested.", + "example": "2026-10-13T09:15:00Z" + }, + "applied_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the check took the new status, or `null` while it waits or once it is cancelled.", + "example": "2026-10-13T09:15:00Z" + }, + "cancelled_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When a waiting override was cancelled, or `null`.", + "example": null + }, + "cancel_reason": { + "type": "string", + "nullable": true, + "enum": [ + "cancelled_by_reviewer", + "replaced", + "check_changed", + "session_closed", + null + ], + "description": "Why a waiting override never applied, or `null`. `cancelled_by_reviewer`: cancelled with the cancel endpoint. `replaced`: a newer override on the same check replaced it. `check_changed`: the person redid the check before finishing the flow. `session_closed`: the session left the flow before the person finished it (abandoned, expired, or decided mid-flow).", + "example": null } } }, - "NetworkTag": { + "SandboxSimulateRequest": { "type": "object", - "description": "One of your application's tags on the network.", + "description": "Force a sandbox session's status. Every field is optional, but at least one of `new_status`, `scenario` or `risk` is required.", "properties": { - "uuid": { + "new_status": { "type": "string", - "format": "uuid", - "description": "The tag's UUID, the same value you pass as `tag_uuid`." + "enum": [ + "Approved", + "Declined", + "In Review", + "Expired", + "Abandoned" + ], + "description": "The status to set. When you leave it out, it defaults to the default status of the risk case (`risk`, or the first risk the scenario's magic values carry), else to the scenario's default status.", + "example": "Declined" }, - "name": { - "type": "string" + "comment": { + "type": "string", + "maxLength": 500, + "description": "Note added to the activity entry the status change records.", + "example": "Testing the decline path" }, - "color": { + "scenario": { "type": "string", - "description": "Hex color, for example `#6366F1`." + "maxLength": 100, + "description": "A scenario slug from the catalog (`GET /v1/sandbox/scenarios/`). It supplies the default status and, without `risk`, the warning its magic values carry. An unknown slug returns `400`.", + "example": "decline_aml_hit" }, - "source": { + "risk": { + "type": "string", + "maxLength": 128, + "description": "A risk case from the catalog. Its warning is added to the session, with a log type that follows `new_status`. An unknown value returns `400`.", + "example": "POSSIBLE_MATCH_FOUND" + }, + "node_id": { + "type": "string", + "maxLength": 128, + "description": "Workflow node the risk warning is attached to. Defaults to the session's current node.", + "example": "feature_aml_1" + }, + "send_webhooks": { + "type": "boolean", + "default": true, + "description": "`true` sends exactly the webhooks a real status change sends to the sandbox application's destinations: `status.updated`, plus the `user.status.updated` / `user.data.updated` (or `business.status.updated` / `business.data.updated`) events the change causes, for destinations subscribed to them. `false` changes the status without logging or sending any webhook: the missed-webhook recovery never re-sends that decision, the console still updates live, and the next status change of the session sends webhooks as usual.", + "example": true + } + } + }, + "SandboxSimulateResponse": { + "type": "object", + "required": [ + "session_id", + "previous_status", + "status", + "scenario", + "risk", + "send_webhooks" + ], + "properties": { + "session_id": { + "type": "string", + "format": "uuid", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "previous_status": { "type": "string", "enum": [ - "didit", - "custom" + "Not Started", + "In Progress", + "Approved", + "Declined", + "In Review", + "Expired", + "Abandoned", + "Kyc Expired", + "Resubmitted", + "Awaiting User" ], - "description": "`didit` for a Didit preset tag, `custom` for a tag your team created." + "description": "The session's status before the simulation.", + "example": "In Progress" }, - "added_by": { + "status": { + "type": "string", + "enum": [ + "Approved", + "Declined", + "In Review", + "Expired", + "Abandoned" + ], + "description": "The status the simulation set.", + "example": "Declined" + }, + "scenario": { "type": "string", "nullable": true, - "description": "Email of the console member who added the tag. Null when an API key added it." + "description": "The scenario slug you passed, or `null`.", + "example": "decline_aml_hit" }, - "added_at": { + "risk": { "type": "string", - "format": "date-time" + "nullable": true, + "description": "The risk case applied (`risk`, or the one taken from the scenario), or `null` when none.", + "example": "POSSIBLE_MATCH_FOUND" + }, + "send_webhooks": { + "type": "boolean", + "description": "The `send_webhooks` value the simulation applied.", + "example": false } } }, - "NetworkOutcomes": { + "CaseTeamSummary": { "type": "object", - "description": "Where the network's people and businesses stand. Each member you may see counts once, by the status of their most recent verification that reached a decision. Transaction parties are not counted.", + "nullable": true, + "description": "The review team that owns the case, or null when no team owns it. Routing sets it when a routing rule places the case with one of its teams. Change or clear it with `PATCH .../cases/{case_uuid}/` (`team`).", "properties": { - "approved": { - "type": "integer", - "description": "Members whose most recent decided verification was approved." + "uuid": { + "type": "string", + "format": "uuid" }, - "declined": { - "type": "integer", - "description": "Members whose most recent decided verification was declined." + "name": { + "type": "string" + } + } + }, + "CaseChecker": { + "type": "object", + "nullable": true, + "description": "The member named to approve or reject the pending resolution. Set only while a four-eyes resolution waits on a named checker. Null when nothing is pending, while the pending resolution waits on the checker queue, and once the resolution is approved, rejected, or returned for a new review because the evidence changed.", + "properties": { + "member_uuid": { + "type": "string", + "format": "uuid", + "description": "The member's user uuid: the value you pass as `checker` when you resolve the case." }, - "in_review": { - "type": "integer", - "description": "Members whose most recent decided verification is in review." + "name": { + "type": "string", + "nullable": true, + "description": "The member's full name, or null when it is not known." }, - "total": { - "type": "integer", - "description": "Members with at least one verification, decided or not. A member whose verifications are all undecided (not started, in progress, expired or abandoned) counts here and in no other key." + "email": { + "type": "string", + "format": "email" } } }, - "NetworkPatternScore": { + "ServiceStatusFeed": { "type": "object", - "description": "How alike one kind of the members' data is across the whole network. A pattern is not a signal: no shared value links the members.", + "description": "Public service status: the state of each Didit service, the overall state, and the incidents that are ongoing or were resolved in the last 7 days.", + "required": [ + "status", + "updated_at", + "services", + "incidents" + ], "properties": { - "type": { + "status": { "type": "string", "enum": [ - "background" + "operational", + "degraded", + "down" ], - "description": "`background`: the mean similarity of every pair of member selfie backgrounds, with the person masked out. It reads the newest selfie of each person, at most the 50 newest, and leaves out age assurance sessions. It covers the whole network, not only the members of your applications." + "description": "The worst state of any service right now, decided by the ongoing incidents only.", + "example": "degraded" }, - "score": { - "type": "number", - "nullable": true, - "minimum": 0, - "maximum": 1, - "description": "From 0 to 1, rounded to 4 decimals. Null when `reason` is set." + "updated_at": { + "type": "string", + "format": "date-time", + "description": "When Didit built this response (ISO 8601, UTC). Responses are cached for 30 seconds, so it can be up to 30 seconds old.", + "example": "2026-10-13T09:41:07.512345Z" }, - "members": { - "type": "integer", - "nullable": true, - "description": "How many members' selfies the score compared. A selfie that cannot be read, or shows too little background, is not compared. Null while `computing`; 0 or 1 with `not_enough_selfies`." + "services": { + "type": "array", + "description": "One entry per service, every service always listed.", + "items": { + "$ref": "#/components/schemas/ServiceStatusService" + } }, - "reason": { + "incidents": { + "type": "array", + "description": "Newest `started_at` first. Every ongoing incident, plus the incidents resolved in the last 7 days (at most 50 resolved incidents). Empty when nothing happened in that time.", + "items": { + "$ref": "#/components/schemas/ServiceStatusIncident" + } + } + } + }, + "ServiceStatusService": { + "type": "object", + "required": [ + "key", + "name", + "status" + ], + "properties": { + "key": { "type": "string", "enum": [ - "computing", - "not_enough_selfies" + "service_id_verification", + "service_liveness_face_match", + "service_aml_screening", + "service_kyb_registries", + "service_database_validation", + "service_phone_delivery", + "service_email_delivery", + "service_transaction_monitoring" ], - "nullable": true, - "description": "Why there is no score. `computing`: the score for the current members is being computed; read the network again later. `not_enough_selfies`: fewer than two members have a usable selfie. Null when there is a score." + "description": "Stable service key. Match on this, never on the display name. `service_id_verification`: ID verification, `service_liveness_face_match`: Liveness and face match, `service_aml_screening`: AML screening, `service_kyb_registries`: KYB registries, `service_database_validation`: Database validation, `service_phone_delivery`: Phone verification delivery, `service_email_delivery`: Email verification delivery, `service_transaction_monitoring`: Transaction monitoring.", + "example": "service_database_validation" }, - "computed_at": { + "name": { + "type": "string", + "description": "English display name of the service.", + "example": "Database validation" + }, + "status": { + "type": "string", + "enum": [ + "operational", + "degraded", + "down" + ], + "description": "`operational` when no incident is ongoing for the service, otherwise the worst state of its ongoing incidents.", + "example": "degraded" + } + } + }, + "ServiceStatusIncident": { + "type": "object", + "required": [ + "id", + "service", + "service_name", + "state", + "status", + "title", + "body", + "affected", + "country_name", + "started_at", + "resolved_at", + "duration_minutes" + ], + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "Incident ID.", + "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "service": { + "type": "string", + "enum": [ + "service_id_verification", + "service_liveness_face_match", + "service_aml_screening", + "service_kyb_registries", + "service_database_validation", + "service_phone_delivery", + "service_email_delivery", + "service_transaction_monitoring" + ], + "description": "Key of the affected service (see `services[].key`).", + "example": "service_database_validation" + }, + "service_name": { + "type": "string", + "description": "English display name of the affected service.", + "example": "Database validation" + }, + "state": { + "type": "string", + "enum": [ + "degraded", + "down" + ], + "description": "How the service is affected. A resolved incident keeps the last state it had.", + "example": "degraded" + }, + "status": { + "type": "string", + "enum": [ + "ongoing", + "resolved" + ], + "description": "`ongoing` until the service recovers, then `resolved`.", + "example": "ongoing" + }, + "title": { + "type": "string", + "description": "English headline. To translate it, build your own text from `service`, `state` and `country_name`.", + "example": "Database validation is degraded in Brazil." + }, + "body": { + "type": "string", + "description": "English detail line: since when checks may be slow or fail, or when it recovered.", + "example": "Checks against Brazil (CPF) may be slow or fail since 08:55 UTC." + }, + "affected": { + "type": "string", + "description": "Countries or registries affected, for example `Brazil (CPF)`. Empty when the incident is not tied to a country or registry.", + "example": "Brazil (CPF)" + }, + "country_name": { + "type": "string", + "description": "Country affected, in English. Empty when the incident is not tied to a country.", + "example": "Brazil" + }, + "started_at": { + "type": "string", + "format": "date-time", + "description": "When the incident started (ISO 8601, UTC).", + "example": "2026-10-13T08:55:00Z" + }, + "resolved_at": { "type": "string", "format": "date-time", "nullable": true, - "description": "When the score was computed. Null while `computing`." + "description": "When the service recovered (ISO 8601, UTC). `null` while the incident is ongoing." + }, + "duration_minutes": { + "type": "integer", + "nullable": true, + "description": "Whole minutes from `started_at` to `resolved_at`. `null` while the incident is ongoing." } } }, - "NetworkDetailResponse": { - "description": "The network detail, plus the organization's sharing mode, whether cross-organization signals apply to it, your application's tags on the network, member outcomes and pattern scores.", - "allOf": [ - { - "$ref": "#/components/schemas/NetworkDetail" + "TravelRuleJoinInvitation": { + "type": "object", + "description": "What the join page shows before anything is typed.", + "properties": { + "email": { + "type": "string", + "format": "email", + "description": "The address the invitation went to." }, - { + "vasp_name": { + "type": "string" + }, + "source": { + "type": "string", + "description": "Where the invitation came from, for example `pickup`." + }, + "expires_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "prefill": { "type": "object", "properties": { - "sharing_mode": { + "vasp_id": { "type": "string", - "enum": [ - "off", - "private", - "global" - ], - "description": "The organization's cross-organization sharing mode. Only `global` compares networks across organizations; `private` and `off` keep them to the organization's own history.", - "example": "global" - }, - "cross_org_available": { - "type": "boolean", - "description": "Whether cross-organization signals apply to this organization. They need both the Enterprise plan and the `global` sharing mode.", - "example": true + "format": "uuid", + "nullable": true }, - "cross_org_unavailable_reason": { - "type": "string", - "enum": [ - "plan", - "sharing_mode" - ], - "nullable": true, - "description": "Why cross-organization signals do not apply, checked in this order. `plan`: the organization's plan does not include the cross-organization fraud network (it needs the Enterprise plan), whatever the sharing mode. `sharing_mode`: the plan includes it, but the sharing mode is `private` or `off`. Null when `cross_org_available` is `true`.", - "example": null + "legal_name": { + "type": "string" }, - "tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkTag" - }, - "description": "Your application's tags on the network, oldest first. Each application sees only its own tags. `fraud_tags` is separate and unchanged: the tags the network's members carry." + "lei": { + "type": "string" }, - "outcomes": { - "$ref": "#/components/schemas/NetworkOutcomes" + "jurisdiction": { + "type": "string" }, - "patterns": { + "domains": { "type": "array", "items": { - "$ref": "#/components/schemas/NetworkPatternScore" - }, - "description": "Pattern scores over the whole network. Today one item, `background`." + "type": "string" + } + } + } + } + } + }, + "TravelRuleJoinRegisterRequest": { + "type": "object", + "required": [ + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "format": "email", + "maxLength": 254, + "description": "Must be the address the invitation went to." + }, + "password": { + "type": "string", + "minLength": 8, + "maxLength": 128 + } + } + }, + "TravelRuleJoinVerifyRequest": { + "type": "object", + "required": [ + "email", + "code" + ], + "properties": { + "email": { + "type": "string", + "format": "email", + "maxLength": 254 + }, + "code": { + "type": "string", + "minLength": 6, + "maxLength": 6, + "description": "The 6-character code emailed after registering." + } + } + }, + "TravelRuleJoinCredentials": { + "type": "object", + "description": "The new free organization and the credentials its application calls the API with.", + "properties": { + "organization": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" + } + } + }, + "application": { + "type": "object", + "properties": { + "uuid": { + "type": "string", + "format": "uuid" } } + }, + "client_id": { + "type": "string" + }, + "api_key": { + "type": "string", + "description": "Send as the `x-api-key` header on the workspace endpoints." } - ] + } }, - "NetworkTagRequest": { + "TravelRuleWorkspaceClaimRequest": { "type": "object", "required": [ - "tag_uuid" + "vasp_id" ], "properties": { - "tag_uuid": { + "vasp_id": { "type": "string", "format": "uuid", - "description": "UUID of one of your application's tags." + "description": "The directory entry this workspace is. Read ids from `GET /v3/travel-rule/vasps/`." } - }, - "example": { - "tag_uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7" } }, - "NetworkTimeline": { - "title": "Default timeline (no contract)", + "TravelRuleWorkspaceDomainConfirmRequest": { "type": "object", - "description": "Without `contract`: the network's own events, oldest first, not paginated.", + "required": [ + "code" + ], "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkTimelineEvent" - } + "code": { + "type": "string", + "minLength": 6, + "maxLength": 6 } } }, - "NetworkTimelinePage": { - "title": "Typed timeline page (contract=2)", + "TravelRuleWorkspaceBillingRequest": { "type": "object", - "description": "With `contract=2`: one page of typed events, newest first.", "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkTypedTimelineEvent" - } - }, - "next_cursor": { - "type": "string", - "nullable": true, - "description": "Pass as `cursor` to read the next page. Null on the last page." + "enabled": { + "type": "boolean", + "default": true, + "description": "Only `true` is accepted: outbound billing cannot be turned back off through the API." } } }, - "NetworkTypedTimelineEvent": { + "TravelRuleWorkspaceDomainCodeResponse": { "type": "object", - "description": "One typed timeline event: the four default fields, plus its id, when Didit stored it, the member account and record it belongs to, and the detail block of its event type. The other detail blocks are null.", "properties": { - "id": { - "type": "string", - "description": "`:`, unique within the timeline.", - "example": "session:3fa85f64-5717-4562-b3fc-2c963f66afa6" + "domain": { + "type": "string" }, - "event_type": { + "status": { "type": "string", "enum": [ - "network_detected", - "signal_observed", - "network_active", - "network_in_review", - "network_resolved", - "network_dismissed", - "verification_attempt", - "transaction", - "login", - "rule_hit", - "case_linked", - "note_added" + "unverified", + "code_sent", + "verified" ] }, - "occurred_at": { + "txt": { + "$ref": "#/components/schemas/TravelRuleWorkspaceTxtRecord" + } + } + }, + "TravelRuleWorkspaceTxtRecord": { + "type": "object", + "description": "The TXT record to publish for the DNS proof. Empty until a proof has been started.", + "properties": { + "host": { "type": "string", - "format": "date-time", - "description": "When it happened." + "example": "didit-tr-verify.example.com" }, - "ingested_at": { + "value": { + "type": "string" + } + } + }, + "TravelRuleWorkspace": { + "type": "object", + "description": "The free Travel Rule workspace of an application that joined free.", + "properties": { + "joined_free": { + "type": "boolean" + }, + "work_email": { "type": "string", - "format": "date-time", - "description": "When Didit stored it." + "format": "email" }, - "label": { + "joined_at": { "type": "string", - "description": "A short English label, for example `Verification attempt 2 of 3`." + "format": "date-time", + "nullable": true }, - "metadata": { + "claim": { "type": "object", - "description": "For the network's own events, the same metadata as the default timeline. Empty otherwise." - }, - "account": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineAccount" - } - ], - "nullable": true, - "description": "The member account. Null for the network's own events, `case_linked` and `note_added`." - }, - "source_ref": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineSourceRef" + "properties": { + "status": { + "type": "string", + "enum": [ + "unclaimed", + "pending_review", + "claimed", + "rejected" + ] + }, + "proved_by_domain": { + "type": "boolean" + }, + "claimed_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "reviewed_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "review_note": { + "type": "string" + }, + "vasp_id": { + "type": "string", + "format": "uuid", + "nullable": true + }, + "vasp_name": { + "type": "string" } - ], - "nullable": true, - "description": "The source record. Null for the network's own events and `note_added`." + } }, - "verification_attempt": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineAttempt" - } - ], - "nullable": true, - "description": "Set on `verification_attempt` events." + "prefill": { + "type": "object", + "description": "Profile values taken from the directory entry: `vasp_id`, `legal_name`, `lei`, `jurisdiction`, `compliance_email`, `domains`. Nothing is written until the claim is made." }, - "transaction": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineTransaction" + "domain": { + "type": "object", + "properties": { + "domain": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "unverified", + "code_sent", + "verified" + ] + }, + "verified_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "txt": { + "$ref": "#/components/schemas/TravelRuleWorkspaceTxtRecord" } - ], - "nullable": true, - "description": "Set on `transaction` events." + } }, - "login": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineLogin" - } - ], - "nullable": true, - "description": "Set on `login` events." + "billing_enabled": { + "type": "boolean", + "description": "Receiving Travel Rule data is free. Sending is billed only after billing is enabled." }, - "rule_hit": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineRuleHit" - } - ], - "nullable": true, - "description": "Set on `rule_hit` events." + "billing_enabled_at": { + "type": "string", + "format": "date-time", + "nullable": true }, - "case_linked": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineCaseLinked" - } - ], - "nullable": true, - "description": "Set on `case_linked` events." + "didit_network": { + "type": "object", + "description": "Whether the Didit network lists this VASP and, when not, each condition it still misses." }, - "note_added": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineNoteAdded" - } - ], - "nullable": true, - "description": "Set on `note_added` events. Never returned to an API key." + "settings": { + "$ref": "#/components/schemas/TravelRuleSettingsDetail" } } }, - "NetworkTimelineAccount": { + "InvestigatorDecision": { "type": "object", - "description": "The member account the event belongs to.", + "description": "How the item left the Investigator queue. `decided_by`, `original_outcome` and `overrides` are returned by the accept and override endpoints and the report; the `investigator` block of a session decision carries the other fields.", "properties": { - "node_id": { + "outcome": { "type": "string", - "description": "`:`, where kind is `vendor_user`, `vendor_business` or `transaction_party`.", - "example": "vendor_user:3fa85f64-5717-4562-b3fc-2c963f66afa6" + "enum": [ + "accepted", + "edited", + "overridden", + "decided_elsewhere", + "automated" + ], + "description": "`accepted` or `edited` took the recommendation (`edited` with a rewritten narrative), `overridden` took another action, `decided_elsewhere` is a decision taken outside the Investigator while the report was open, `automated` is a decision the Investigator took on its own." }, - "node_type": { + "action": { "type": "string", "enum": [ - "account", - "business_account", - "transaction_party" + "approve", + "decline", + "escalate", + "request" ] }, - "uuid": { - "type": "string", - "format": "uuid" - }, - "vendor_data": { + "actor_email": { "type": "string", "nullable": true }, - "display_name": { + "actor_name": { "type": "string", "nullable": true }, - "ownership": { - "type": "string", - "enum": [ - "owned", - "organization" - ], - "description": "`owned` when the record belongs to the application you called (for a console member, to an application they were granted). `organization` when it belongs to another application of your organization." - }, - "route": { - "$ref": "#/components/schemas/NetworkTimelineRoute" - } - } - }, - "NetworkTimelineSourceRef": { - "type": "object", - "description": "The record the event was read from.", - "properties": { - "kind": { - "type": "string", - "enum": [ - "session", - "business_session", - "transaction", - "monitoring_event", - "case" - ] - }, - "id": { - "type": "string", - "format": "uuid" - }, - "ownership": { + "override_category": { "type": "string", "enum": [ - "owned", - "organization" - ], - "description": "`owned` when the record belongs to the application you called (for a console member, to an application they were granted). `organization` when it belongs to another application of your organization." - }, - "route": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineRoute" - } + "missing_context", + "needs_information", + "policy_differs", + "evidence_misread", + "other", + "" ], - "description": "Absent for `monitoring_event` and `case`." - } - } - }, - "NetworkTimelineRoute": { - "type": "object", - "description": "Where the record opens: its kind, its UUID and the application it belongs to.", - "properties": { - "kind": { - "type": "string", - "description": "`user`, `business` or `transaction_party` for an account; `session`, `business_session` or `transaction` for a source record." + "nullable": true }, - "id": { + "override_reason": { "type": "string", - "format": "uuid" + "nullable": true }, - "application_id": { - "type": "string", - "format": "uuid" - } - } - }, - "NetworkTimelineAttempt": { - "type": "object", - "description": "One verification session of the account.", - "properties": { - "session_id": { + "final_status": { "type": "string", - "format": "uuid", - "description": "The session UUID, or the business session UUID for a company." + "description": "The item's status after the decision." }, - "session_number": { - "type": "integer", + "agreed": { + "type": "boolean", + "description": "Whether the decision matched the recommendation.", "nullable": true }, - "attempt": { - "type": "integer", - "description": "This session's position among the account's sessions, in creation order." + "decided_at": { + "type": "string", + "format": "date-time" }, - "attempt_count": { - "type": "integer", - "description": "How many sessions the account has." + "billed": { + "type": "boolean", + "description": "The review was charged." }, - "status": { + "decided_by": { "type": "string", - "description": "The session status, for example `Approved` or `Declined`." + "enum": [ + "investigator", + "member" + ] }, - "status_changed_at": { - "type": "string", - "format": "date-time", + "original_outcome": { + "type": "object", + "description": "The decision the Investigator took on its own, unchanged by later overrides. Null for a decision the team took.", + "properties": { + "action": { + "type": "string" + }, + "final_status": { + "type": "string" + }, + "decided_at": { + "type": "string", + "format": "date-time" + } + }, "nullable": true }, - "decline_reasons": { + "overrides": { "type": "array", + "description": "Every override of a decision the Investigator took on its own, oldest first.", "items": { - "$ref": "#/components/schemas/NetworkTimelineDeclineReason" - }, - "description": "For a declined session only: its warnings, oldest first, once per warning. Empty otherwise." + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "actor_email": { + "type": "string", + "nullable": true + }, + "actor_name": { + "type": "string", + "nullable": true + }, + "override_category": { + "type": "string" + }, + "override_reason": { + "type": "string" + }, + "previous_status": { + "type": "string" + }, + "final_status": { + "type": "string" + }, + "agreed": { + "type": "boolean", + "nullable": true + }, + "overridden_at": { + "type": "string", + "format": "date-time" + } + } + } } } }, - "NetworkTimelineDeclineReason": { + "InvestigatorBlock": { "type": "object", + "nullable": true, + "description": "The item's latest Investigator review, or null when it never had one. Carried by the V3 session and business session decision (and so by `status.updated` webhooks).", "properties": { - "risk": { + "run_id": { "type": "string", - "description": "The warning code." + "format": "uuid" }, - "feature": { + "status": { "type": "string", - "description": "The feature that raised the warning." + "enum": [ + "running", + "completed", + "failed" + ] }, - "short_description": { - "type": "string" - } - } - }, - "NetworkTimelineTransaction": { - "type": "object", - "description": "A transaction a member account took part in, dated by its transaction date.", - "properties": { - "transaction_id": { + "stage": { "type": "string", - "format": "uuid" - }, - "transaction_number": { - "type": "integer", - "nullable": true + "enum": [ + "shadow", + "live" + ] }, - "transaction_type": { - "type": "string" + "queue": { + "type": "string", + "enum": [ + "kyc", + "kyb", + "aml", + "transactions", + "cases" + ] }, - "action_type": { - "type": "string" + "is_open": { + "type": "boolean" }, - "amount": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineAmount" - } + "recommendation": { + "type": "string", + "enum": [ + "approve", + "decline", + "escalate", + "request" ], - "nullable": true, - "description": "Null when the transaction has no amount." - }, - "status": { - "type": "string" + "nullable": true }, - "decision_reason_code": { + "recommendation_detail": { "type": "string", "nullable": true }, - "decision_reason_label": { + "confidence": { "type": "string", + "enum": [ + "high", + "moderate", + "low" + ], "nullable": true }, - "party_role": { - "type": "string", - "description": "The account's role in the transaction: `APPLICANT`, `REMITTER`, `BENEFICIARY` or `COUNTERPARTY`." - } - } - }, - "NetworkTimelineAmount": { - "type": "object", - "properties": { - "value": { + "summary": { "type": "string", - "description": "Decimal amount as a string." + "nullable": true }, - "currency": { - "type": "string" + "ready_to_accept": { + "type": "boolean" }, - "direction": { + "prepared_at": { "type": "string", + "format": "date-time", "nullable": true - } - } - }, - "NetworkTimelineLogin": { - "type": "object", - "description": "A sign-in event you posted for a person through the events API.", - "properties": { - "action": { - "type": "string", - "description": "`.`: `auth.login` or `security.login_succeeded` for a sign-in, `auth.login_failed` or `security.login_failed` for a failed one." }, - "succeeded": { - "type": "boolean" + "automated": { + "type": "boolean", + "description": "The Investigator decided on its own, even if the decision was later overridden." }, - "status": { + "decided_by": { "type": "string", - "description": "The event's status." - }, - "ip": { - "allOf": [ - { - "$ref": "#/components/schemas/NetworkTimelineIP" - } + "enum": [ + "investigator", + "member" ], - "nullable": true, - "description": "Null when the event has no IP address." + "nullable": true }, - "device": { + "decision": { + "nullable": true, "allOf": [ { - "$ref": "#/components/schemas/NetworkTimelineDevice" + "$ref": "#/components/schemas/InvestigatorDecision" } ], - "nullable": true, - "description": "Null when the event has no device fingerprint or context." - }, - "is_first_login": { - "type": "boolean", - "description": "The account's first successful sign-in on record." - }, - "is_new_device": { - "type": "boolean", - "description": "A successful sign-in from a device none of the account's earlier successful sign-ins came from. Never true on the first sign-in." + "type": "object" } } }, - "NetworkTimelineIP": { + "InvestigatorQueueRow": { "type": "object", "properties": { - "address": { - "type": "string" + "run_id": { + "type": "string", + "format": "uuid" }, - "country_code": { + "kind": { "type": "string", - "nullable": true + "enum": [ + "session", + "business_session", + "transaction", + "case" + ] }, - "city": { + "queue": { "type": "string", - "nullable": true + "enum": [ + "kyc", + "kyb", + "aml", + "transactions", + "cases" + ] }, - "connection_type": { + "stage": { "type": "string", - "nullable": true, - "description": "The connection type label for the address, as free text." + "enum": [ + "shadow", + "live" + ] }, - "is_vpn_or_tor": { - "type": "boolean" + "subject": { + "type": "object", + "description": "The item under review: `id`, `number`, `status`, `name` and, depending on the kind, `country`, `workflow`, `vendor_data`, `txn_id`, `amount`, `currency`, `direction`, `title` or `priority`.", + "additionalProperties": true }, - "is_data_center": { - "type": "boolean" - } - } - }, - "NetworkTimelineDevice": { - "type": "object", - "properties": { - "fingerprint": { + "recommendation": { "type": "string", - "nullable": true + "enum": [ + "approve", + "decline", + "escalate", + "request" + ] }, - "label": { - "type": "string", - "nullable": true, - "description": "A readable device label built from the event's device context." - } - } - }, - "NetworkTimelineRuleHit": { - "type": "object", - "description": "A live rule that matched a member's transaction or event. Test-mode matches are not included.", - "properties": { - "rule_id": { + "recommendation_detail": { + "type": "string" + }, + "confidence": { "type": "string", - "format": "uuid" + "enum": [ + "high", + "moderate", + "low" + ] }, - "rule_title": { + "summary": { "type": "string" }, - "rule_category": { - "type": "string" + "sources_count": { + "type": "integer" }, - "rule_source": { - "type": "string" + "ready_to_accept": { + "type": "boolean" }, - "severity": { + "guardrails": { + "description": "The locked guardrails that hold this item, if any." + }, + "waiting_since": { "type": "string", + "format": "date-time", "nullable": true }, - "score_delta": { - "type": "integer" - }, - "status_target": { + "due_at": { "type": "string", + "format": "date-time", "nullable": true }, - "action_summary": { + "prepared_at": { "type": "string", + "format": "date-time", "nullable": true } } }, - "NetworkTimelineCaseLinked": { + "InvestigatorRunDetail": { + "allOf": [ + { + "$ref": "#/components/schemas/InvestigatorQueueRow" + }, + { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "is_open": { + "type": "boolean" + }, + "lookups": { + "type": "integer", + "description": "How many sections and linked records it read." + }, + "duration_ms": { + "type": "integer", + "nullable": true + }, + "agent_version": { + "type": "string" + }, + "prepared_before_opened": { + "type": "boolean", + "nullable": true + }, + "report": { + "type": "object", + "additionalProperties": true, + "description": "The report: reasoning, evidence points with their verdict (`ok`, `risk`, `look`, `explained`, `context`) and cited sources, screening hit verdicts (`same`, `not_same`, `unclear`) and suggested next steps." + }, + "trail": { + "description": "What I checked: the overview, sections and records it read, in order." + }, + "decision": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/InvestigatorDecision" + } + ], + "type": "object" + }, + "autonomy": { + "type": "object", + "additionalProperties": true, + "description": "What autonomy made of the report (`result`, `reason`, `tier`, `policy_version`, `rule`, `agreement`, `decisions`, `threshold`, `at`). Null when the queue is not automated.", + "nullable": true + } + } + } + ] + }, + "InvestigatorAcceptRequest": { "type": "object", - "description": "A case opened for the network in your organization. `source_ref.ownership` says whether it belongs to the application you called.", "properties": { - "case_id": { - "type": "string", - "format": "uuid" - }, - "case_number": { + "narrative": { "type": "string", - "nullable": true + "maxLength": 4000, + "description": "A rewritten narrative. Sending one records the decision as edited and accepted." }, - "status": { - "type": "string" + "send_email": { + "type": "boolean", + "default": false, + "description": "Email the person about the decision." }, - "author_email": { + "email_address": { "type": "string", - "nullable": true + "format": "email", + "description": "Required when `send_email` is true." }, - "author_name": { - "type": "string", - "nullable": true - } - } - }, - "NetworkTimelineNoteAdded": { - "type": "object", - "description": "A note left on the network. The note text is not included.", - "properties": { - "note_id": { + "email_language": { "type": "string", - "format": "uuid" - }, - "author_email": { - "type": "string" + "default": "en", + "maxLength": 16 } } }, - "FeatureStatusOverride": { + "InvestigatorOverrideRequest": { "type": "object", - "description": "One override of a check (feature) status made with `PATCH /v3/session/{sessionId}/features/{nodeId}/update-status/`: what it changes, whether it applied or still waits for the person to finish the flow, who asked and why.", "required": [ - "id", - "node_id", - "feature_type", - "feature_model", - "previous_status", - "new_status", - "state", - "forced", - "reason", - "requested_by", - "requested_at", - "applied_at", - "cancelled_at", - "cancel_reason" + "action", + "category", + "reason" ], "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Identifier of the override. Pass it to the cancel endpoint.", - "example": "7c9e6679-7425-40de-944b-e07fc1f90ae7" - }, - "node_id": { - "type": "string", - "description": "The workflow node the request named (`default` for a step without a node).", - "example": "feature_ocr_1" - }, - "feature_type": { - "type": "string", - "description": "The `feature_type` the request passed, or an empty string when it passed none.", - "example": "" - }, - "feature_model": { - "type": "string", - "description": "The kind of check that was overridden, for example `KYC`, `Face`, `AML` or `GeolocationCheck`.", - "example": "KYC" - }, - "previous_status": { - "type": "string", - "enum": [ - "Not Finished", - "Approved", - "Declined", - "In Review", - "Resub Requested" - ], - "description": "The check's status when the override was requested.", - "example": "In Review" - }, - "new_status": { + "action": { "type": "string", "enum": [ - "Approved", - "Declined", - "In Review" - ], - "description": "The status the override sets.", - "example": "Approved" + "approve", + "decline", + "escalate", + "request" + ] }, - "state": { + "category": { "type": "string", "enum": [ - "applied", - "pending_until_flow_finishes", - "cancelled" - ], - "description": "`applied`: the check has the new status. `pending_until_flow_finishes`: the override waits and applies when the person finishes the flow. `cancelled`: it waited and never applied (see `cancel_reason`).", - "example": "applied" - }, - "forced": { - "type": "boolean", - "description": "`true` when the override applied at once while the person was still in the flow.", - "example": false + "missing_context", + "needs_information", + "policy_differs", + "evidence_misread", + "other" + ] }, "reason": { "type": "string", - "nullable": true, - "description": "The `comment` sent with the request, or `null`.", - "example": "Document manually verified by compliance." + "minLength": 10, + "maxLength": 500 }, - "requested_by": { - "type": "object", - "nullable": true, - "description": "Who requested the override, or `null` when that is not known.", - "properties": { - "email": { - "type": "string", - "format": "email", - "nullable": true, - "description": "Email of the console user, or `null` for API keys and the system.", - "example": "reviewer@example.com" - }, - "name": { - "type": "string", - "nullable": true, - "description": "Display name of the requester, or `null`.", - "example": "Alex Reviewer" - }, - "type": { - "type": "string", - "enum": [ - "CONSOLE_USER", - "API_KEY", - "SYSTEM" - ], - "description": "Who made the request: a console user, an API key, or Didit itself.", - "example": "CONSOLE_USER" - } - } + "send_email": { + "type": "boolean", + "default": false, + "description": "Email the person about the decision." }, - "requested_at": { + "email_address": { "type": "string", - "format": "date-time", - "description": "When the override was requested.", - "example": "2026-10-13T09:15:00Z" + "format": "email", + "description": "Required when `send_email` is true." }, - "applied_at": { + "email_language": { "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the check took the new status, or `null` while it waits or once it is cancelled.", - "example": "2026-10-13T09:15:00Z" + "default": "en", + "maxLength": 16 + } + } + }, + "InvestigatorBatchAcceptRequest": { + "type": "object", + "required": [ + "run_ids" + ], + "properties": { + "run_ids": { + "type": "array", + "minItems": 1, + "maxItems": 50, + "items": { + "type": "string", + "format": "uuid" + } + } + } + }, + "InvestigatorBatchAcceptResponse": { + "type": "object", + "properties": { + "accepted": { + "type": "integer" }, - "cancelled_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When a waiting override was cancelled, or `null`.", - "example": null + "skipped": { + "type": "integer" }, - "cancel_reason": { - "type": "string", - "nullable": true, - "enum": [ - "cancelled_by_reviewer", - "replaced", - "check_changed", - "session_closed", - null - ], - "description": "Why a waiting override never applied, or `null`. `cancelled_by_reviewer`: cancelled with the cancel endpoint. `replaced`: a newer override on the same check replaced it. `check_changed`: the person redid the check before finishing the flow. `session_closed`: the session left the flow before the person finished it (abandoned, expired, or decided mid-flow).", - "example": null + "results": { + "type": "array", + "items": { + "type": "object", + "properties": { + "run_id": { + "type": "string", + "format": "uuid" + }, + "result": { + "type": "string", + "enum": [ + "accepted", + "skipped" + ] + }, + "reason": { + "type": "string", + "enum": [ + "not_found", + "forbidden", + "already_decided", + "not_ready", + "guardrail", + "invalid" + ] + }, + "detail": {}, + "action": { + "type": "string" + }, + "final_status": { + "type": "string" + } + } + } } } }, - "SandboxSimulateRequest": { + "InvestigatorSettings": { "type": "object", - "description": "Force a sandbox session's status. Every field is optional, but at least one of `new_status`, `scenario` or `risk` is required.", "properties": { - "new_status": { + "stage": { "type": "string", "enum": [ - "Approved", - "Declined", - "In Review", - "Expired", - "Abandoned" - ], - "description": "The status to set. When you leave it out, it defaults to the default status of the risk case (`risk`, or the first risk the scenario's magic values carry), else to the scenario's default status.", - "example": "Declined" - }, - "comment": { - "type": "string", - "maxLength": 500, - "description": "Note added to the activity entry the status change records.", - "example": "Testing the decline path" + "none", + "shadow", + "live" + ] }, - "scenario": { + "stage_changed_at": { "type": "string", - "maxLength": 100, - "description": "A scenario slug from the catalog (`GET /v1/sandbox/scenarios/`). It supplies the default status and, without `risk`, the warning its magic values carry. An unknown slug returns `400`.", - "example": "decline_aml_hit" + "format": "date-time", + "readOnly": true, + "nullable": true }, - "risk": { + "stage_changed_by": { "type": "string", - "maxLength": 128, - "description": "A risk case from the catalog. Its warning is added to the session, with a log type that follows `new_status`. An unknown value returns `400`.", - "example": "POSSIBLE_MATCH_FOUND" + "readOnly": true }, - "node_id": { + "monthly_spend_limit": { "type": "string", - "maxLength": 128, - "description": "Workflow node the risk warning is attached to. Defaults to the session's current node.", - "example": "feature_aml_1" + "format": "decimal", + "description": "Monthly limit in your billing currency, 0.01 to 1,000,000. Null turns it off.", + "nullable": true }, - "send_webhooks": { - "type": "boolean", - "default": true, - "description": "`true` sends exactly the webhooks a real status change sends to the sandbox application's destinations: `status.updated`, plus the `user.status.updated` / `user.data.updated` (or `business.status.updated` / `business.data.updated`) events the change causes, for destinations subscribed to them. `false` changes the status without logging or sending any webhook: the missed-webhook recovery never re-sends that decision, the console still updates live, and the next status change of the session sends webhooks as usual.", - "example": true + "spend_limit": { + "type": "object", + "readOnly": true, + "properties": { + "enabled": { + "type": "boolean" + }, + "limit": { + "type": "string", + "format": "decimal", + "nullable": true + }, + "spent": { + "type": "string", + "format": "decimal" + }, + "reviews": { + "type": "integer" + }, + "reserved": { + "type": "string", + "format": "decimal", + "description": "The price of every open live report, held back because accepting it charges it." + }, + "currency": { + "type": "string" + }, + "paused": { + "type": "boolean", + "description": "At the limit: no new review starts." + } + } } } }, - "SandboxSimulateResponse": { + "TravelRuleUtxoEntry": { "type": "object", + "description": "One input or output of a UTXO transaction, as the chain recorded it.", "required": [ - "session_id", - "previous_status", - "status", - "scenario", - "risk", - "send_webhooks" + "address" ], "properties": { - "session_id": { - "type": "string", - "format": "uuid", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" - }, - "previous_status": { - "type": "string", - "enum": [ - "Not Started", - "In Progress", - "Approved", - "Declined", - "In Review", - "Expired", - "Abandoned", - "Kyc Expired", - "Resubmitted", - "Awaiting User" - ], - "description": "The session's status before the simulation.", - "example": "In Progress" - }, - "status": { + "address": { "type": "string", - "enum": [ - "Approved", - "Declined", - "In Review", - "Expired", - "Abandoned" - ], - "description": "The status the simulation set.", - "example": "Declined" + "maxLength": 128 }, - "scenario": { + "amount": { "type": "string", "nullable": true, - "description": "The scenario slug you passed, or `null`.", - "example": "decline_aml_hit" + "description": "Decimal string in the coin's own unit (BTC, not satoshis). Optional.", + "example": "0.0125" }, - "risk": { + "txid": { "type": "string", - "nullable": true, - "description": "The risk case applied (`risk`, or the one taken from the scenario), or `null` when none.", - "example": "POSSIBLE_MATCH_FOUND" + "maxLength": 128, + "description": "Optional. The transaction an input spends." }, - "send_webhooks": { - "type": "boolean", - "description": "The `send_webhooks` value the simulation applied.", - "example": false + "vout": { + "type": "integer", + "nullable": true, + "minimum": 0, + "description": "Optional. The output index an input spends." } } }, - "CaseTeamSummary": { + "TravelRuleUtxo": { "type": "object", - "nullable": true, - "description": "The review team that owns the case, or null when no team owns it. Routing sets it when a routing rule places the case with one of its teams. Change or clear it with `PATCH .../cases/{case_uuid}/` (`team`).", + "description": "The inputs and outputs of a UTXO transfer (BTC, LTC, BCH, DOGE). Only accepted on those chains: on any other chain it is a `400`. From them Didit infers the originator wallet (the declared one, else the input address that contributed the most) and the beneficiary output (the declared one, else the only output that does not pay an input address back as change, else the one output paying the transfer amount). The result is on the transfer's `chain_details`.", + "required": [ + "outputs" + ], "properties": { - "uuid": { - "type": "string", - "format": "uuid" + "inputs": { + "type": "array", + "maxItems": 1000, + "items": { + "$ref": "#/components/schemas/TravelRuleUtxoEntry" + }, + "description": "Optional. Without inputs no originator is inferred and no change output is recognised." }, - "name": { - "type": "string" + "outputs": { + "type": "array", + "minItems": 1, + "maxItems": 1000, + "items": { + "$ref": "#/components/schemas/TravelRuleUtxoEntry" + } } } }, - "CaseChecker": { + "TravelRuleChainSide": { "type": "object", - "nullable": true, - "description": "The member named to approve or reject the pending resolution. Set only while a four-eyes resolution waits on a named checker. Null when nothing is pending, while the pending resolution waits on the checker queue, and once the resolution is approved, rejected, or returned for a new review because the evidence changed.", + "description": "One side's wallet as Didit resolved it from the chain data.", "properties": { - "member_uuid": { + "address": { "type": "string", - "format": "uuid", - "description": "The member's user uuid: the value you pass as `checker` when you resolve the case." + "description": "The wallet. On a memo network the classic address (an XRP X-address is split into its classic address and its tag); on Lightning the payee node id or Lightning Address." }, - "name": { + "memo": { "type": "string", - "nullable": true, - "description": "The member's full name, or null when it is not known." + "description": "The destination tag or memo that is part of the wallet; `\"\"` for none." }, - "email": { + "source": { "type": "string", - "format": "email" + "enum": [ + "declared", + "x_address", + "largest_input", + "only_non_change_output", + "amount_match", + "invoice_payee", + "updated" + ], + "description": "Where the wallet came from: `declared` (your request), `x_address` (split from an XRP X-address), `largest_input` (the UTXO input address that contributed the most), `only_non_change_output` (the only UTXO output that is not change), `amount_match` (the one UTXO output paying the transfer amount), `invoice_payee` (the payee a Lightning payment request names), `updated` (set later with `action: update_originator_wallet`)." } } }, - "ServiceStatusFeed": { + "TravelRuleChainDetails": { "type": "object", - "description": "Public service status: the state of each Didit service, the overall state, and the incidents that are ongoing or were resolved in the last 7 days.", - "required": [ - "status", - "updated_at", - "services", - "incidents" - ], + "description": "How the transfer's chain names its two wallets, when that is more than one address paying another. Empty (`{}`) for an account-chain transfer (EVM, Solana, Tron), where the two addresses are the wallets. Matching, routing and the address book read the wallets from here first.", "properties": { - "status": { + "chain": { "type": "string", - "enum": [ - "operational", - "degraded", - "down" - ], - "description": "The worst state of any service right now, decided by the ongoing incidents only.", - "example": "degraded" + "description": "Canonical chain, e.g. `BTC`, `XRP`, or `LIGHTNING` for a Lightning transfer." }, - "updated_at": { + "shape": { "type": "string", - "format": "date-time", - "description": "When Didit built this response (ISO 8601, UTC). Responses are cached for 30 seconds, so it can be up to 30 seconds old.", - "example": "2026-10-13T09:41:07.512345Z" + "enum": [ + "utxo", + "memo", + "lightning" + ] }, - "services": { - "type": "array", - "description": "One entry per service, every service always listed.", - "items": { - "$ref": "#/components/schemas/ServiceStatusService" + "originator": { + "$ref": "#/components/schemas/TravelRuleChainSide" + }, + "beneficiary": { + "$ref": "#/components/schemas/TravelRuleChainSide" + }, + "utxo": { + "type": "object", + "description": "On a UTXO transfer: the inputs and outputs as stored (amounts as decimal strings) and which outputs Didit read as what.", + "properties": { + "inputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TravelRuleUtxoEntry" + } + }, + "outputs": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TravelRuleUtxoEntry" + } + }, + "change_output_indexes": { + "type": "array", + "items": { + "type": "integer" + }, + "description": "Outputs that pay an input address back." + }, + "beneficiary_output_index": { + "type": "integer", + "nullable": true, + "description": "The output that pays the beneficiary; null when none could be told apart." + } } }, - "incidents": { + "lightning": { + "type": "object", + "description": "On a Lightning transfer: what the payment request says. Always `kind` (`bolt11`, `bolt12_offer`, `bolt12_invoice`, `bolt12_invoice_request`, `lnurl`, `lightning_address`, `node_id` or `unknown`); a BOLT11 invoice adds `network`, `payee_node_id`, `payment_hash`, `amount_msat`, `created_at` and `expires_at`; a BOLT12 string `blinded_paths` and `payee_node_id`; an LNURL or a Lightning Address its `domain`. Nothing is resolved over the network: the request is decoded only.", + "additionalProperties": true + }, + "warnings": { "type": "array", - "description": "Newest `started_at` first. Every ongoing incident, plus the incidents resolved in the last 7 days (at most 50 resolved incidents). Empty when nothing happened in that time.", "items": { - "$ref": "#/components/schemas/ServiceStatusIncident" - } + "type": "string", + "enum": [ + "declared_originator_not_an_input", + "declared_beneficiary_not_an_output", + "beneficiary_output_ambiguous", + "beneficiary_output_amount_differs" + ] + }, + "description": "UTXO inconsistencies worth a look: the declared originator is not an input, the declared beneficiary is not an output, no single beneficiary output could be told apart, or the beneficiary output pays a different amount than the transaction states." + }, + "not_applicable_reason": { + "type": "string", + "enum": [ + "LIGHTNING_NO_PAYEE_IDENTIFIER", + "LIGHTNING_BOLT12_BLINDED_PAYEE", + "LIGHTNING_LNURL_NAMES_NO_PAYEE" + ], + "description": "On an outbound Lightning transfer whose payment request names no payee: why the transfer is `NOT_APPLICABLE`. `LIGHTNING_NO_PAYEE_IDENTIFIER` (the request names no payee node, or could not be decoded), `LIGHTNING_BOLT12_BLINDED_PAYEE` (the offer hides its payee behind blinded paths), `LIGHTNING_LNURL_NAMES_NO_PAYEE` (an LNURL names a service, not a payee). The same code opens the transfer's last `timeline` entry." } } }, - "ServiceStatusService": { + "WalletAddressImportRow": { "type": "object", - "required": [ - "key", - "name", - "status" - ], + "description": "One wallet to import: by its `address`, its `address_hash`, or both. The camelCase forms of these fields are accepted too, as are `walletAddress`, `walletAddressHash`, `destinationTag` and `externalUserId`.", "properties": { - "key": { + "address": { + "type": "string", + "maxLength": 128, + "description": "The wallet address. Alias: `walletAddress`." + }, + "address_hash": { + "type": "string", + "description": "SHA-256 of the lowercased address, as 64 hex characters or 44 base64 characters. Send it alone to register a wallet without disclosing its address; sent with `address`, it must be that address's hash. Alias: `walletAddressHash`." + }, + "chain": { + "type": "string", + "maxLength": 32 + }, + "memo": { + "type": "string", + "maxLength": 256, + "description": "The destination tag or memo. XRP: a destination tag, a whole number from 0 to 4294967295 (a JSON number is accepted). XLM: a text memo of up to 28 bytes, a 64-bit id or a 32-byte hash in hex. EOS: up to 256 bytes. ATOM: up to 256 characters. HBAR: up to 100 bytes. Bitcoin, EVM, Solana, Tron, Litecoin, Bitcoin Cash, Dogecoin and Lightning wallets take no memo: one there is a `400`." + }, + "holder_name": { + "type": "string", + "maxLength": 255 + }, + "holder_vendor_data": { + "type": "string", + "maxLength": 255, + "description": "Your internal identifier for the holder. Alias: `externalUserId`." + }, + "entity_type": { "type": "string", "enum": [ - "service_id_verification", - "service_liveness_face_match", - "service_aml_screening", - "service_kyb_registries", - "service_database_validation", - "service_phone_delivery", - "service_email_delivery", - "service_transaction_monitoring" + "individual", + "company" ], - "description": "Stable service key. Match on this, never on the display name. `service_id_verification`: ID verification, `service_liveness_face_match`: Liveness and face match, `service_aml_screening`: AML screening, `service_kyb_registries`: KYB registries, `service_database_validation`: Database validation, `service_phone_delivery`: Phone verification delivery, `service_email_delivery`: Email verification delivery, `service_transaction_monitoring`: Transaction monitoring.", - "example": "service_database_validation" + "default": "individual" }, - "name": { + "label": { "type": "string", - "description": "English display name of the service.", - "example": "Database validation" + "maxLength": 255 }, - "status": { + "owner_type": { "type": "string", "enum": [ - "operational", - "degraded", - "down" + "customer", + "internal", + "vasp" ], - "description": "`operational` when no incident is ongoing for the service, otherwise the worst state of its ongoing incidents.", - "example": "degraded" + "default": "customer" + }, + "travel_address": { + "type": "string", + "maxLength": 512 + }, + "self_declared": { + "type": "boolean", + "default": false, + "description": "Create the entry already verified through a self-declaration, when your settings allow it." } } }, - "ServiceStatusIncident": { + "WalletAddressImportReport": { "type": "object", - "required": [ - "id", - "service", - "service_name", - "state", - "status", - "title", - "body", - "affected", - "country_name", - "started_at", - "resolved_at", - "duration_minutes" - ], + "description": "What happened to each row of an import, in the order sent.", "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "Incident ID.", - "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + "total": { + "type": "integer" }, - "service": { - "type": "string", - "enum": [ - "service_id_verification", - "service_liveness_face_match", - "service_aml_screening", - "service_kyb_registries", - "service_database_validation", - "service_phone_delivery", - "service_email_delivery", - "service_transaction_monitoring" - ], - "description": "Key of the affected service (see `services[].key`).", - "example": "service_database_validation" + "created": { + "type": "integer" }, - "service_name": { - "type": "string", - "description": "English display name of the affected service.", - "example": "Database validation" + "existing": { + "type": "integer" }, - "state": { + "duplicate": { + "type": "integer" + }, + "failed": { + "type": "integer" + }, + "rows": { + "type": "array", + "items": { + "type": "object", + "properties": { + "row": { + "type": "integer", + "description": "The row's number, from 1." + }, + "status": { + "type": "string", + "enum": [ + "created", + "existing", + "duplicate", + "failed" + ], + "description": "`created`: added to the book. `existing`: the wallet is already in the book and was left untouched. `duplicate`: repeats an earlier row of this import. `failed`: see `errors`." + }, + "entry_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "The address-book entry the row created or found." + }, + "errors": { + "type": "object", + "description": "Field errors of a `failed` row; empty otherwise." + }, + "duplicate_of_row": { + "type": "integer", + "nullable": true, + "description": "On a `duplicate` row, the row it repeats." + } + } + } + } + } + }, + "TravelRuleCounterpartyContact": { + "type": "object", + "description": "A compliance address the EMAIL rail writes to for one directory entry.", + "properties": { + "uuid": { "type": "string", - "enum": [ - "degraded", - "down" - ], - "description": "How the service is affected. A resolved incident keeps the last state it had.", - "example": "degraded" + "format": "uuid" }, - "status": { + "counterparty": { "type": "string", - "enum": [ - "ongoing", - "resolved" - ], - "description": "`ongoing` until the service recovers, then `resolved`.", - "example": "ongoing" + "format": "uuid", + "description": "The directory entry's `id`, as GET /v3/travel-rule/vasps/ shows it." }, - "title": { + "counterparty_name": { + "type": "string" + }, + "email": { "type": "string", - "description": "English headline. To translate it, build your own text from `service`, `state` and `country_name`.", - "example": "Database validation is degraded in Brazil." + "format": "email" }, - "body": { + "name": { "type": "string", - "description": "English detail line: since when checks may be slow or fail, or when it recovered.", - "example": "Checks against Brazil (CPF) may be slow or fail since 08:55 UTC." + "description": "Optional label, for example the team name." }, - "affected": { + "source": { "type": "string", - "description": "Countries or registries affected, for example `Brazil (CPF)`. Empty when the incident is not tied to a country or registry.", - "example": "Brazil (CPF)" + "enum": [ + "staff", + "application", + "learned" + ], + "description": "staff: curated by Didit. learned: an address at one of the VASP's own domains that answered a request through its response link. application: added by your application." }, - "country_name": { + "scope": { "type": "string", - "description": "Country affected, in English. Empty when the incident is not tied to a country.", - "example": "Brazil" + "enum": [ + "platform", + "application" + ], + "description": "platform: curated by Didit or learned from a verified answer, used for every Didit customer, read-only for you. application: private to your application." }, - "started_at": { + "created_by": { "type": "string", - "format": "date-time", - "description": "When the incident started (ISO 8601, UTC).", - "example": "2026-10-13T08:55:00Z" + "description": "Empty for platform contacts and for contacts an API key added." }, - "resolved_at": { + "verified_at": { "type": "string", "format": "date-time", "nullable": true, - "description": "When the service recovered (ISO 8601, UTC). `null` while the incident is ongoing." + "description": "When this address last answered a request through its response link." }, - "duration_minutes": { - "type": "integer", - "nullable": true, - "description": "Whole minutes from `started_at` to `resolved_at`. `null` while the incident is ongoing." - } - } - }, - "TravelRuleJoinInvitation": { - "type": "object", - "description": "What the join page shows before anything is typed.", - "properties": { - "email": { - "type": "string", - "format": "email", - "description": "The address the invitation went to." + "is_invalid": { + "type": "boolean", + "description": "true once the address bounced or complained; the EMAIL rail skips it." }, - "vasp_name": { - "type": "string" + "invalid_reason": { + "type": "string", + "enum": [ + "", + "hard_bounce", + "soft_bounce", + "spam_complaint", + "suppressed" + ] }, - "source": { + "invalid_detail": { "type": "string", - "description": "Where the invitation came from, for example `pickup`." + "description": "The receiving mail server's reason, when it gave one." }, - "expires_at": { + "invalid_at": { "type": "string", "format": "date-time", "nullable": true }, - "prefill": { - "type": "object", - "properties": { - "vasp_id": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "legal_name": { - "type": "string" - }, - "lei": { - "type": "string" - }, - "jurisdiction": { - "type": "string" - }, - "domains": { - "type": "array", - "items": { - "type": "string" - } - } - } + "created_at": { + "type": "string", + "format": "date-time" } } }, - "TravelRuleJoinRegisterRequest": { + "TravelRuleCounterpartyContactCreate": { "type": "object", "required": [ - "email", - "password" + "counterparty", + "email" ], "properties": { - "email": { + "counterparty": { "type": "string", - "format": "email", - "maxLength": 254, - "description": "Must be the address the invitation went to." + "format": "uuid", + "description": "The directory entry's `id`." }, - "password": { - "type": "string", - "minLength": 8, - "maxLength": 128 - } - } - }, - "TravelRuleJoinVerifyRequest": { - "type": "object", - "required": [ - "email", - "code" - ], - "properties": { "email": { "type": "string", "format": "email", "maxLength": 254 }, - "code": { + "name": { "type": "string", - "minLength": 6, - "maxLength": 6, - "description": "The 6-character code emailed after registering." + "description": "Optional label.", + "maxLength": 255 } } }, - "TravelRuleJoinCredentials": { + "TravelRuleNameMatch": { "type": "object", - "description": "The new free organization and the credentials its application calls the API with.", + "nullable": true, + "description": "The name comparison that decided the transfer, or null until one ran. While the parties are masked, and on the other customer's copy of an INTERNAL exchange, `transfer_name`, `compared_name`, `matched_names` and `mismatched_names` are hidden. `score` and `matched` can disagree: `matched` follows the strictness, `score` is the similarity of the two full names.", "properties": { - "organization": { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } + "score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "description": "Similarity of the two full names, 0 to 100. 0 when either name is blank." }, - "application": { - "type": "object", - "properties": { - "uuid": { - "type": "string", - "format": "uuid" - } - } + "matched": { + "type": "boolean", + "description": "Whether the names satisfy `strictness`. The transfer's outcome follows `data_match`, which compares every field, so a transfer can be COUNTERPARTY_MISMATCHED_DATA while this is true." }, - "client_id": { - "type": "string" + "method": { + "type": "string", + "enum": [ + "none", + "exact_token", + "token_subset", + "token_containment", + "sequence_ratio" + ], + "description": "How `matched` was decided: none (`NONE`), exact_token (`STRICT`), token_subset (`DEFAULT`), token_containment (`CONTAINS`) or sequence_ratio (`FUZZY`)." }, - "api_key": { + "strictness": { "type": "string", - "description": "Send as the `x-api-key` header on the workspace endpoints." - } - } - }, - "TravelRuleWorkspaceClaimRequest": { - "type": "object", - "required": [ - "vasp_id" - ], - "properties": { - "vasp_id": { + "enum": [ + "NONE", + "STRICT", + "CONTAINS", + "DEFAULT", + "FUZZY" + ] + }, + "compared_with": { "type": "string", - "format": "uuid", - "description": "The directory entry this workspace is. Read ids from `GET /v3/travel-rule/vasps/`." - } - } - }, - "TravelRuleWorkspaceDomainConfirmRequest": { - "type": "object", - "required": [ - "code" - ], - "properties": { - "code": { + "enum": [ + "wallet_holder", + "counterparty_vasp" + ], + "description": "wallet_holder: the holder recorded for the wallet. counterparty_vasp: the name the counterparty answered on the email response page, or the Didit Test VASP's answer in sandbox." + }, + "transfer_name": { "type": "string", - "minLength": 6, - "maxLength": 6 - } - } - }, - "TravelRuleWorkspaceBillingRequest": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "default": true, - "description": "Only `true` is accepted: outbound billing cannot be turned back off through the API." - } - } - }, - "TravelRuleWorkspaceDomainCodeResponse": { - "type": "object", - "properties": { - "domain": { - "type": "string" + "description": "The name on the transfer." }, - "status": { + "compared_name": { "type": "string", - "enum": [ - "unverified", - "code_sent", - "verified" - ] + "description": "The name it was compared with." }, - "txt": { - "$ref": "#/components/schemas/TravelRuleWorkspaceTxtRecord" + "matched_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words of `transfer_name` found in `compared_name`." + }, + "mismatched_names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Words of `transfer_name` missing from `compared_name`, then words of `compared_name` missing from `transfer_name`." } } }, - "TravelRuleWorkspaceTxtRecord": { + "TravelRuleTransferRow": { "type": "object", - "description": "The TXT record to publish for the DNS proof. Empty until a proof has been started.", + "description": "One Travel Rule transfer as the transfers list shows it: VASP names, wallets and memos only, never the originator or beneficiary person data.", "properties": { - "host": { + "id": { "type": "string", - "example": "didit-tr-verify.example.com" + "format": "uuid", + "description": "The transfer's id." }, - "value": { - "type": "string" - } - } - }, - "TravelRuleWorkspace": { - "type": "object", - "description": "The free Travel Rule workspace of an application that joined free.", - "properties": { - "joined_free": { - "type": "boolean" + "transaction_id": { + "type": "string", + "format": "uuid", + "description": "The Didit transaction the transfer belongs to." }, - "work_email": { + "txn_id": { "type": "string", - "format": "email" + "nullable": true, + "description": "Your own id for the transaction. Transfers Didit books for you, such as a Didit Test VASP inbound transfer, carry a generated one." }, - "joined_at": { + "txn_date": { "type": "string", - "format": "date-time", - "nullable": true + "format": "date-time" }, - "claim": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "unclaimed", - "pending_review", - "claimed", - "rejected" - ] - }, - "proved_by_domain": { - "type": "boolean" - }, - "claimed_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "reviewed_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "review_note": { - "type": "string" - }, - "vasp_id": { - "type": "string", - "format": "uuid", - "nullable": true - }, - "vasp_name": { - "type": "string" - } - } + "kind": { + "type": "string", + "enum": [ + "withdrawal", + "deposit", + "message" + ], + "description": "withdrawal: outbound. message: an inbound transfer a rail created from a counterparty's message (a TRP inquiry, the INTERNAL inbound leg, or a GTR, VerifyVASP or Sygna Bridge message). deposit: any other inbound transfer." }, - "prefill": { - "type": "object", - "description": "Profile values taken from the directory entry: `vasp_id`, `legal_name`, `lei`, `jurisdiction`, `compliance_email`, `domains`. Nothing is written until the claim is made." + "direction": { + "type": "string", + "enum": [ + "INBOUND", + "OUTBOUND" + ] }, - "domain": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "status": { - "type": "string", - "enum": [ - "unverified", - "code_sent", - "verified" - ] - }, - "verified_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "txt": { - "$ref": "#/components/schemas/TravelRuleWorkspaceTxtRecord" - } - } + "status": { + "type": "string", + "enum": [ + "AWAITING_COUNTERPARTY", + "ON_HOLD", + "COMPLETED", + "FINISHED", + "CANCELLED", + "EXPIRED", + "COUNTERPARTY_MISMATCHED_DATA", + "COUNTERPARTY_VASP_NOT_FOUND", + "COUNTERPARTY_VASP_NOT_REACHABLE", + "UNCONFIRMED_OWNERSHIP", + "COUNTERPARTY_VASP_GENERAL_DECLINE", + "NOT_ENOUGH_COUNTERPARTY_DATA", + "NOT_APPLICABLE" + ] }, - "billing_enabled": { - "type": "boolean", - "description": "Receiving Travel Rule data is free. Sending is billed only after billing is enabled." + "reason": { + "type": "string", + "description": "Why a `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE` transfer is stuck, the same value as the transfer's own `reason`, so the list tells a bounced compliance email from a counterparty with no route without opening each transfer. `\"\"` for any other status. See [Why a transfer is stuck](/transaction-monitoring/travel-rule#why-a-transfer-is-stuck)." }, - "billing_enabled_at": { + "rail": { "type": "string", - "format": "date-time", - "nullable": true + "nullable": true, + "enum": [ + "INTERNAL", + "TRP", + "GTR", + "TRUST", + "VERIFYVASP", + "SYGNA", + "EMAIL", + "TEST_VASP", + null + ] }, - "didit_network": { - "type": "object", - "description": "Whether the Didit network lists this VASP and, when not, each condition it still misses." + "asset": { + "type": "string", + "description": "The transaction's currency." }, - "settings": { - "$ref": "#/components/schemas/TravelRuleSettingsDetail" - } - } - }, - "InvestigatorDecision": { - "type": "object", - "description": "How the item left the Investigator queue. `decided_by`, `original_outcome` and `overrides` are returned by the accept and override endpoints and the report; the `investigator` block of a session decision carries the other fields.", - "properties": { - "outcome": { + "amount": { "type": "string", - "enum": [ - "accepted", - "edited", - "overridden", - "decided_elsewhere", - "automated" - ], - "description": "`accepted` or `edited` took the recommendation (`edited` with a rewritten narrative), `overridden` took another action, `decided_elsewhere` is a decision taken outside the Investigator while the report was open, `automated` is a decision the Investigator took on its own." + "description": "The amount as a plain decimal, for example \"1.25\"." }, - "action": { + "originator_vasp": { "type": "string", - "enum": [ - "approve", - "decline", - "escalate", - "request" - ] + "description": "Outbound: your VASP's legal name. Inbound: the counterparty's name, from its directory entry, the Didit network member, the TRP sender, the Didit Test VASP, or the name the transfer declared. Empty when none is known." }, - "actor_email": { + "beneficiary_vasp": { "type": "string", - "nullable": true + "description": "Outbound: the counterparty's name, worked out the same way. Inbound: your VASP's legal name." }, - "actor_name": { + "originator_wallet": { + "type": "string" + }, + "beneficiary_wallet": { + "type": "string" + }, + "originator_memo": { "type": "string", - "nullable": true + "description": "Memo or destination tag, empty on chains without one." }, - "override_category": { + "beneficiary_memo": { + "type": "string" + }, + "originator_wallet_type": { "type": "string", "enum": [ - "missing_context", - "needs_information", - "policy_differs", - "evidence_misread", - "other", - "" + "vasp", + "self_hosted", + "own" ], - "nullable": true + "description": "vasp, self_hosted (declared unhosted) or own (a wallet your address book records as yours). Your own side is always vasp." }, - "override_reason": { + "beneficiary_wallet_type": { "type": "string", - "nullable": true + "enum": [ + "vasp", + "self_hosted", + "own" + ] }, - "final_status": { + "matched_transaction_id": { "type": "string", - "description": "The item's status after the decision." + "format": "uuid", + "nullable": true, + "description": "The other side of a deposit you matched to an announced transfer by hand." }, - "agreed": { - "type": "boolean", - "description": "Whether the decision matched the recommendation.", - "nullable": true + "deadline_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the transfer expires if it is still waiting on its counterparty. Set on every transfer you create with `POST /v3/transactions/` that needs an exchange, outbound or inbound. Null below the threshold, on a Lightning payment the Travel Rule does not apply to, and on inbound transfers Didit creates when a counterparty reaches you (an inbound TRP inquiry, a network message or the INTERNAL inbound leg)." }, - "decided_at": { + "created_at": { "type": "string", "format": "date-time" + } + } + }, + "BankAccountCheckHolder": { + "description": "The name the account is checked against. Send exactly one of `full_name` and `business_name`.", + "oneOf": [ + { + "$ref": "#/components/schemas/BankAccountCheckPersonHolder" }, - "billed": { - "type": "boolean", - "description": "The review was charged." - }, - "decided_by": { + { + "$ref": "#/components/schemas/BankAccountCheckBusinessHolder" + } + ] + }, + "BankAccountCheckRequest": { + "type": "object", + "required": [ + "country", + "account", + "holder" + ], + "properties": { + "country": { "type": "string", - "enum": [ - "investigator", - "member" - ] + "minLength": 3, + "maxLength": 3, + "description": "The account's country, as an ISO 3166-1 alpha-3 code, for example `GBR`. Lowercase is accepted.", + "example": "GBR" }, - "original_outcome": { + "account": { "type": "object", - "description": "The decision the Investigator took on its own, unchanged by later overrides. Null for a decision the team took.", + "description": "The account the way its country writes it: an `iban`, or an `account_number` with the bank or branch code the country needs (`sort_code`, `routing_number`, `transit_institution`, `bsb`, `ifsc`, `bank_code` or `bic`). Mexico takes a `clabe` and Argentina a `cbu_cvu`, which already name the bank. A business account adds a `registration_id` where the country asks for one. Spaces, dashes and dots are ignored. Keys the country's check does not use are ignored; a key it needs and does not get is a `400` that names it.", "properties": { - "action": { - "type": "string" + "iban": { + "type": "string", + "maxLength": 64, + "description": "The IBAN, in a country that uses IBANs. It must belong to `country`." }, - "final_status": { - "type": "string" + "account_number": { + "type": "string", + "maxLength": 64, + "description": "The account number, in a country that writes the account with a separate bank or branch code." }, - "decided_at": { + "sort_code": { "type": "string", - "format": "date-time" + "maxLength": 64, + "description": "United Kingdom: the 6-digit sort code." + }, + "routing_number": { + "type": "string", + "maxLength": 64, + "description": "United States: the 9-digit ABA routing number." + }, + "transit_institution": { + "type": "string", + "maxLength": 64, + "description": "Canada: the 8-digit transit and institution number." + }, + "bsb": { + "type": "string", + "maxLength": 64, + "description": "Australia: the 6-digit BSB." + }, + "ifsc": { + "type": "string", + "maxLength": 64, + "description": "India: the 11-character IFSC." + }, + "bank_code": { + "type": "string", + "maxLength": 64, + "description": "The bank's code, where the country needs one, for example in Nigeria." + }, + "bic": { + "type": "string", + "maxLength": 64, + "description": "The bank's BIC, where the country's check asks for one." + }, + "clabe": { + "type": "string", + "maxLength": 64, + "description": "Mexico: the 18-digit CLABE. It already names the bank." + }, + "cbu_cvu": { + "type": "string", + "maxLength": 64, + "description": "Argentina: the 22-digit CBU or CVU. It already names the bank." + }, + "registration_id": { + "type": "string", + "maxLength": 64, + "description": "A business account's registration number, where the country asks for one." } }, - "nullable": true - }, - "overrides": { - "type": "array", - "description": "Every override of a decision the Investigator took on its own, oldest first.", - "items": { - "type": "object", - "properties": { - "action": { - "type": "string" - }, - "actor_email": { - "type": "string", - "nullable": true - }, - "actor_name": { - "type": "string", - "nullable": true - }, - "override_category": { - "type": "string" - }, - "override_reason": { - "type": "string" - }, - "previous_status": { - "type": "string" - }, - "final_status": { - "type": "string" - }, - "agreed": { - "type": "boolean", - "nullable": true - }, - "overridden_at": { - "type": "string", - "format": "date-time" - } - } + "additionalProperties": { + "type": "string", + "maxLength": 64 + }, + "example": { + "sort_code": "20-45-67", + "account_number": "31926819" } + }, + "holder": { + "$ref": "#/components/schemas/BankAccountCheckHolder" + }, + "vendor_data": { + "type": "string", + "nullable": true, + "description": "Your own reference for this check, returned unchanged.", + "example": "payout_20481" } } }, - "InvestigatorBlock": { + "BankAccountCheckResponse": { "type": "object", - "nullable": true, - "description": "The item's latest Investigator review, or null when it never had one. Carried by the V3 session and business session decision (and so by `status.updated` webhooks).", + "required": [ + "request_id", + "result", + "holder_name", + "account", + "vendor_data", + "created_at" + ], "properties": { - "run_id": { + "request_id": { "type": "string", - "format": "uuid" + "format": "uuid", + "description": "The ID of this check." }, - "status": { + "result": { "type": "string", "enum": [ - "running", - "completed", - "failed" - ] + "match", + "close_match", + "no_match", + "cannot_verify" + ], + "description": "`match`: the bank holds the account under the name you sent. `close_match`: under a close name, for example a missing middle name or a typo. `no_match`: under another name, or there is no such account. `cannot_verify`: the bank answered without comparing the name, for example for a blocked or closed account." }, - "stage": { + "holder_name": { "type": "string", - "enum": [ - "shadow", - "live" - ] + "nullable": true, + "description": "Only on a `close_match`, and only when the bank returned it: the name on the account, as the bank holds it. `null` otherwise." }, - "queue": { + "account": { "type": "string", - "enum": [ - "kyc", - "kyb", - "aml", - "transactions", - "cases" - ] - }, - "is_open": { - "type": "boolean" + "description": "The account, masked to its last 4 characters." }, - "recommendation": { + "vendor_data": { "type": "string", - "enum": [ - "approve", - "decline", - "escalate", - "request" - ], - "nullable": true + "nullable": true, + "description": "Your own reference, as you sent it." }, - "recommendation_detail": { + "created_at": { "type": "string", - "nullable": true - }, - "confidence": { + "format": "date-time", + "description": "When the check ran, in UTC." + } + } + }, + "BankAccountCheckError": { + "type": "object", + "required": [ + "detail" + ], + "properties": { + "detail": { "type": "string", - "enum": [ - "high", - "moderate", - "low" - ], - "nullable": true + "description": "What went wrong, in English." }, - "summary": { + "code": { "type": "string", - "nullable": true - }, - "ready_to_accept": { - "type": "boolean" + "description": "A stable code to branch on. Absent on `401` and `403`." }, - "prepared_at": { + "field": { "type": "string", - "format": "date-time", - "nullable": true - }, - "automated": { - "type": "boolean", - "description": "The Investigator decided on its own, even if the decision was later overridden." + "description": "`400` only: the body field to correct, as a dotted path, for example `account.sort_code`." }, - "decided_by": { + "reason": { "type": "string", "enum": [ - "investigator", - "member" - ], - "nullable": true - }, - "decision": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/InvestigatorDecision" - } + "required", + "length", + "format", + "checksum", + "country_mismatch", + "rejected" ], - "type": "object" + "description": "`400` only: why the field was refused. `required`, `length`, `format`, `checksum` and `country_mismatch` (an IBAN of another country) are Didit's own checks; `rejected` means the bank refused the account as sent." } } }, - "InvestigatorQueueRow": { + "BankVerificationResult": { "type": "object", + "description": "One Bank Verification step's result, for User and Business Verification. `method` says how the account was verified, and `none` that the person continued without a bank before any attempt was evaluated. `continued_without_bank` says the person continued without a bank, also after an evaluated attempt. See [Bank verification methods](/core-technology/bank-verification/verification-methods) and [When the person cannot verify their bank](/core-technology/bank-verification/fallbacks).", "properties": { - "run_id": { - "type": "string", - "format": "uuid" + "schema_version": { + "type": "integer", + "description": "Version of this result shape. `1` today." }, - "kind": { + "bank_verification_id": { "type": "string", - "enum": [ - "session", - "business_session", - "transaction", - "case" - ] + "format": "uuid", + "description": "The ID of this result." }, - "queue": { + "node_id": { "type": "string", - "enum": [ - "kyc", - "kyb", - "aml", - "transactions", - "cases" - ] + "description": "The workflow node this result belongs to." }, - "stage": { + "status": { "type": "string", "enum": [ - "shadow", - "live" - ] + "Not Finished", + "Approved", + "Declined", + "In Review", + "Expired" + ], + "description": "The step's verdict, after its actions and status rules." }, - "subject": { - "type": "object", - "description": "The item under review: `id`, `number`, `status`, `name` and, depending on the kind, `country`, `workflow`, `vendor_data`, `txn_id`, `amount`, `currency`, `direction`, `title` or `priority`.", - "additionalProperties": true + "original_status": { + "type": "string", + "nullable": true, + "description": "The first verdict the step reached, before any later change such as a manual review." }, - "recommendation": { + "method": { "type": "string", + "nullable": true, "enum": [ - "approve", - "decline", - "escalate", - "request" - ] + "open_banking", + "account_lookup", + "microdeposits", + "statement", + "none" + ], + "description": "How the account was verified: `open_banking` (bank sign-in: the person signed in at their bank), `account_lookup` (account check: the person typed the account details and the bank confirmed the name), `microdeposits` or `statement` (a statement upload). `none` when the person continued without a bank before any attempt was evaluated, so no account was verified. After an evaluated attempt, it stays the method of that attempt. `null` until an account is evaluated, and when the workflow narrows the data it returns. Workflow rules read the same value as `bank.method`." }, - "recommendation_detail": { - "type": "string" + "provider": { + "type": "string", + "nullable": true, + "description": "The key of the route that ran the connection. Read `method`, not this key, to tell how the account was verified." }, - "confidence": { + "credential_source": { "type": "string", + "nullable": true, "enum": [ - "high", - "moderate", - "low" - ] - }, - "summary": { - "type": "string" - }, - "sources_count": { - "type": "integer" - }, - "ready_to_accept": { - "type": "boolean" - }, - "guardrails": { - "description": "The locked guardrails that hold this item, if any." + "native", + "byok" + ], + "description": "`native`: Didit's own route, billed to your Didit balance. `byok`: a marketplace provider you connected with your own credentials." }, - "waiting_since": { - "type": "string", - "format": "date-time", - "nullable": true + "route": { + "type": "object", + "nullable": true, + "description": "The route chosen before consent. It never changes afterwards.", + "properties": { + "provider_key": { + "type": "string", + "nullable": true, + "description": "The route's key." + }, + "credential_source": { + "type": "string", + "enum": [ + "native", + "byok" + ] + }, + "is_fallback": { + "type": "boolean", + "description": "Whether Didit's own route stood in for a marketplace provider that could not connect." + }, + "provider_connection_id": { + "type": "string", + "nullable": true, + "description": "The marketplace connection used, for `byok`." + }, + "requested_scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The data the connection asked for, for example `ownership` or `balances`." + } + } }, - "due_at": { - "type": "string", - "format": "date-time", - "nullable": true + "connection": { + "type": "object", + "nullable": true, + "description": "The latest attempt's connection. `null` before the first attempt.", + "properties": { + "status": { + "type": "string", + "enum": [ + "pending", + "connected", + "cancelled", + "timeout", + "failed", + "unsupported", + "revoked", + "expired" + ] + }, + "institution_id": { + "type": "string", + "nullable": true, + "description": "The bank's ID. `null` for an account check, where no bank is picked." + }, + "institution_name": { + "type": "string", + "nullable": true, + "description": "The bank's name. `null` for an account check." + }, + "institution_country": { + "type": "string", + "nullable": true, + "description": "The account's country, ISO 3166-1 alpha-3." + }, + "oauth": { + "type": "boolean", + "nullable": true, + "description": "Whether the bank sign-in ran over OAuth or app-to-app. `null` for an account check." + }, + "connected_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the connection succeeded." + }, + "consent_expires_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the bank consent ends, for bank sign-in." + }, + "last_refreshed_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the financial data was last read again." + }, + "attempts": { + "type": "integer", + "description": "The attempts the person spent on this step, every method together." + }, + "reason_code": { + "type": "string", + "nullable": true, + "description": "Why the connection is not simply `connected`, for example `USER_CANCELLED`, `INSTITUTION_DOWN`, `ACCOUNT_NOT_FOUND`, `REFERENCE_IDENTITY_MISSING` or `VERIFICATION_COMPLETED`." + } + } }, - "prepared_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "InvestigatorRunDetail": { - "allOf": [ - { - "$ref": "#/components/schemas/InvestigatorQueueRow" + "account": { + "type": "object", + "nullable": true, + "description": "The evaluated account. `null` until an account is evaluated.", + "properties": { + "account_id_masked": { + "type": "string", + "nullable": true, + "description": "The account number, masked." + }, + "iban_masked": { + "type": "string", + "nullable": true, + "description": "The IBAN, masked." + }, + "sort_code": { + "type": "string", + "nullable": true, + "description": "The sort code, in the United Kingdom." + }, + "routing_number_masked": { + "type": "string", + "nullable": true, + "description": "The routing number, masked." + }, + "type": { + "type": "string", + "nullable": true, + "enum": [ + "checking", + "current", + "savings", + "business", + "other" + ] + }, + "subtype": { + "type": "string", + "nullable": true, + "description": "The bank's own account subtype." + }, + "currency": { + "type": "string", + "nullable": true, + "description": "ISO 4217 currency of the account." + }, + "holder_type": { + "type": "string", + "nullable": true, + "enum": [ + "person", + "business", + "unknown" + ] + }, + "holders_count": { + "type": "integer", + "nullable": true + }, + "is_joint": { + "type": "boolean", + "nullable": true + }, + "is_business": { + "type": "boolean", + "nullable": true + } + } }, - { + "ownership": { "type": "object", + "nullable": true, + "description": "How the account holder compared with the verified identity. `null` until an account is evaluated.", "properties": { - "status": { - "type": "string" + "result": { + "type": "string", + "enum": [ + "match", + "partial_match", + "no_match", + "unknown", + "not_verifiable" + ], + "description": "`partial_match` is a close match. `not_verifiable`: the bank answered with no holder to compare. `unknown`: the evidence could not be read, or there was no identity to compare." }, - "is_open": { - "type": "boolean" + "reference_identity_source": { + "type": "string", + "nullable": true, + "description": "The step whose identity the holder was compared against: `kyc`, `database_validation`, `expected_details`, `questionnaire`, `document_ai` or `kyb`." }, - "lookups": { + "name_score": { "type": "integer", - "description": "How many sections and linked records it read." + "minimum": 0, + "maximum": 100, + "nullable": true, + "description": "Didit's holder name score." }, - "duration_ms": { + "provider_name_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "nullable": true, + "description": "The bank's own holder name score, when it returned one." + }, + "address_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "nullable": true, + "description": "The holder address score, when address matching ran." + }, + "email_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "nullable": true, + "description": "The holder email score, when email matching ran." + }, + "phone_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "nullable": true, + "description": "The holder phone score, when phone matching ran." + }, + "dob_score": { + "type": "integer", + "minimum": 0, + "maximum": 100, + "nullable": true, + "description": "The holder date of birth score, when the bank shared one." + }, + "close_match": { + "type": "boolean", + "nullable": true, + "description": "Whether the name landed in the close-match band." + }, + "holder_confirmation": { + "type": "string", + "nullable": true, + "enum": [ + "pending", + "confirmed", + "rejected" + ], + "description": "The person's answer when asked to confirm a close-match name. `null` when never asked." + }, + "method": { + "type": "string", + "nullable": true, + "enum": [ + "exact", + "token_set", + "nickname", + "transliteration", + "fuzzy", + "provider_only", + "microdeposits" + ], + "description": "Which name comparison produced the score. This is not the verification method: read the top-level `method` for that." + }, + "matched_holder_index": { "type": "integer", "nullable": true }, - "agent_version": { - "type": "string" + "holders": { + "type": "array", + "items": { + "type": "object" + }, + "description": "Each holder the bank listed, with its scores." }, - "prepared_before_opened": { + "owner_identity_available": { "type": "boolean", "nullable": true }, - "report": { + "evidence_freshness": { + "type": "string", + "nullable": true, + "enum": [ + "live", + "cached", + "refreshed" + ] + }, + "evaluated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the verdict was computed." + } + } + }, + "financial_data": { + "type": "object", + "description": "The financial data the step read. Only bank sign-in reads it.", + "properties": { + "balances": { "type": "object", - "additionalProperties": true, - "description": "The report: reasoning, evidence points with their verdict (`ok`, `risk`, `look`, `explained`, `context`) and cited sources, screening hit verdicts (`same`, `not_same`, `unclear`) and suggested next steps." + "nullable": true, + "description": "With the `balances` scope." }, - "trail": { - "description": "What I checked: the overview, sections and records it read, in order." + "transactions": { + "type": "object", + "nullable": true, + "description": "With the `transactions` scope." }, - "decision": { + "income": { + "type": "object", "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/InvestigatorDecision" - } - ], - "type": "object" + "description": "With the `income` scope." }, - "autonomy": { + "categorization": { "type": "object", - "additionalProperties": true, - "description": "What autonomy made of the report (`result`, `reason`, `tier`, `policy_version`, `rule`, `agreement`, `decisions`, `threshold`, `at`). Null when the queue is not automated.", - "nullable": true + "nullable": true, + "description": "Didit's categorization of the transactions read. `null` without them." + }, + "not_collected": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "balances", + "income", + "transactions" + ] + }, + "description": "The data the step asked for that the method which verified the account does not collect. Balances, transactions and income come from bank sign-in only, so an account verified by account check lists them here. Never a failure. Empty otherwise." } } - } - ] - }, - "InvestigatorAcceptRequest": { - "type": "object", - "properties": { - "narrative": { - "type": "string", - "maxLength": 4000, - "description": "A rewritten narrative. Sending one records the decision as edited and accepted." }, - "send_email": { + "billing": { + "type": "object", + "nullable": true, + "properties": { + "route": { + "type": "string", + "enum": [ + "native", + "byok" + ] + }, + "billed": { + "type": "boolean" + }, + "marketplace_fee": { + "type": "string", + "nullable": true, + "description": "The marketplace platform fee charged, for `byok`." + }, + "usage_type": { + "type": "string", + "nullable": true, + "description": "The usage line the charge was booked on: `bank_verification` for a bank sign-in or an account check, `bank_statement_upload` for a statement upload with no charged bank attempt before it, and `bank_byok_fee` for the marketplace fee on your own provider. `null` when nothing was billed." + } + } + }, + "reference_identity": { + "type": "object", + "nullable": true, + "description": "The identity the holder was compared against, with its source." + }, + "signals": { + "type": "object", + "nullable": true, + "description": "Account signals read from the transaction history, when the step read one." + }, + "connection_abandoned": { "type": "boolean", - "default": false, - "description": "Email the person about the decision." + "nullable": true, + "description": "Whether the step ended without a match after the person left at their bank." }, - "email_address": { - "type": "string", - "format": "email", - "description": "Required when `send_email` is true." + "not_covered": { + "type": "boolean", + "nullable": true, + "description": "Whether the person's bank or country could not be reached on this step. Also `true` when the person continued without a bank because no method could verify their country or bank." }, - "email_language": { - "type": "string", - "default": "en", - "maxLength": 16 - } - } - }, - "InvestigatorOverrideRequest": { - "type": "object", - "required": [ - "action", - "category", - "reason" - ], - "properties": { - "action": { - "type": "string", - "enum": [ - "approve", - "decline", - "escalate", - "request" - ] + "continued_without_bank": { + "type": "boolean", + "description": "Whether the person left the step with **Continue without your bank**. `continuation` then says why. `method` is `none` when no attempt was evaluated before they continued. After an evaluated attempt, such as a holder that does not match, `method` stays the method of that attempt and its verdict and reason codes stand. Returned even when the workflow narrows the data it returns." }, - "category": { - "type": "string", - "enum": [ - "missing_context", - "needs_information", - "policy_differs", - "evidence_misread", - "other" - ] + "continuation": { + "type": "object", + "nullable": true, + "description": "How the person continued without a bank. `null` when they did not. When the workflow narrows the data it returns, `reason` is still returned and every other key is `null`.", + "properties": { + "reason": { + "type": "string", + "enum": [ + "no_route", + "institution_unsupported", + "attempts_exhausted", + "person_choice" + ], + "description": "Why, as Didit worked it out when the person continued: `no_route` (no bank sign-in or account check serves their country), `institution_unsupported` (the bank they picked cannot be used on this step), `attempts_exhausted` (every attempt was already spent and none was in progress), or `person_choice` (a way to verify was there and they chose to continue, also when their bank could not be reached right now). `no_route` and `institution_unsupported` follow `bank_unsupported_action`, `attempts_exhausted` follows `bank_attempts_exhausted_action`, and `person_choice` follows `bank_skipped_action`, unless an evaluated attempt already decided the step." + }, + "country": { + "type": "string", + "nullable": true, + "description": "The country the person was verifying in, ISO 3166-1 alpha-3. `null` when they continued before picking one." + }, + "offered": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "statement", + "microdeposits" + ] + }, + "nullable": true, + "description": "The other ways to verify that country offered the person when they continued, in the order it offered them: `statement` (a statement upload), then `microdeposits`. Empty when it offered none." + }, + "institution_id": { + "type": "string", + "nullable": true, + "description": "For `institution_unsupported`, the ID of the bank the person could not use: the bank they picked, or the bank their last attempt ended on. Didit takes it from its own list of banks, never from the person's device, so a bank that list does not have is `null`. `null` for every other reason." + }, + "institution_name": { + "type": "string", + "nullable": true, + "description": "For `institution_unsupported`, the name of that bank, from the same list as `institution_id`. `null` when that list does not have the bank, and for every other reason." + }, + "continued_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the person continued." + } + } }, - "reason": { + "evidence_purged_at": { "type": "string", - "minLength": 10, - "maxLength": 500 + "format": "date-time", + "nullable": true, + "description": "When the bank evidence was deleted under `bank_evidence_retention_days`. `null` otherwise." }, - "send_email": { - "type": "boolean", - "default": false, - "description": "Email the person about the decision." + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Informational codes, for example `holder_declared`. A warning never changes the status on its own." }, - "email_address": { + "reason_codes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Why the verdict came out the way it did, for example `OWNER_NAME_PARTIAL`. Several may apply. `NOT_COVERED`: the person continued without a bank because no method could verify their country or bank. `SKIPPED`: the person chose to continue without a bank while a way to verify was there. Neither is added when an evaluated attempt already decided the step." + }, + "created_at": { "type": "string", - "format": "email", - "description": "Required when `send_email` is true." + "format": "date-time" }, - "email_language": { + "updated_at": { "type": "string", - "default": "en", - "maxLength": 16 + "format": "date-time" } } }, - "InvestigatorBatchAcceptRequest": { + "BankAccountCheckPersonHolder": { "type": "object", + "description": "The person who should hold the account.", "required": [ - "run_ids" + "full_name" ], "properties": { - "run_ids": { - "type": "array", - "minItems": 1, - "maxItems": 50, - "items": { - "type": "string", - "format": "uuid" - } + "full_name": { + "type": "string", + "maxLength": 255, + "description": "The full name of the person who should hold the account.", + "example": "Maria Oliveira" } } }, - "InvestigatorBatchAcceptResponse": { + "BankAccountCheckBusinessHolder": { "type": "object", + "description": "The company that should hold the account. Checks a business account.", + "required": [ + "business_name" + ], "properties": { - "accepted": { - "type": "integer" - }, - "skipped": { - "type": "integer" - }, - "results": { - "type": "array", - "items": { - "type": "object", - "properties": { - "run_id": { - "type": "string", - "format": "uuid" - }, - "result": { - "type": "string", - "enum": [ - "accepted", - "skipped" - ] - }, - "reason": { - "type": "string", - "enum": [ - "not_found", - "forbidden", - "already_decided", - "not_ready", - "guardrail", - "invalid" - ] - }, - "detail": {}, - "action": { - "type": "string" - }, - "final_status": { - "type": "string" - } - } - } + "business_name": { + "type": "string", + "maxLength": 255, + "description": "The name of the company that should hold the account. Checks a business account." } } }, - "InvestigatorSettings": { + "BankVerificationPricing": { "type": "object", + "description": "Public Bank Verification list prices: the statement upload, the own provider key fee and each country's methods.", + "required": [ + "currency", + "statement_upload", + "own_provider_fee_usd", + "countries" + ], "properties": { - "stage": { + "currency": { "type": "string", "enum": [ - "none", - "shadow", - "live" - ] - }, - "stage_changed_at": { - "type": "string", - "format": "date-time", - "readOnly": true, - "nullable": true + "USD" + ], + "description": "Currency of every price in the response.", + "example": "USD" }, - "stage_changed_by": { - "type": "string", - "readOnly": true + "statement_upload": { + "$ref": "#/components/schemas/BankStatementUploadPricing" }, - "monthly_spend_limit": { + "own_provider_fee_usd": { "type": "string", - "format": "decimal", - "description": "Monthly limit in your billing currency, 0.01 to 1,000,000. Null turns it off.", - "nullable": true + "description": "Fee for each billable ownership check on a route that uses your own provider contract instead of Didit's, charged whatever the result. A cancelled, timed out or abandoned connection is not billed. Decimal string with 4 decimals, in USD.", + "example": "0.0200" }, - "spend_limit": { + "countries": { "type": "object", - "readOnly": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "limit": { - "type": "string", - "format": "decimal", - "nullable": true - }, - "spent": { - "type": "string", - "format": "decimal" - }, - "reviews": { - "type": "integer" - }, - "reserved": { - "type": "string", - "format": "decimal", - "description": "The price of every open live report, held back because accepting it charges it." - }, - "currency": { - "type": "string" - }, - "paused": { - "type": "boolean", - "description": "At the limit: no new review starts." - } + "description": "Every country, keyed by ISO 3166-1 alpha-3 code.", + "additionalProperties": { + "$ref": "#/components/schemas/BankVerificationPricingCountry" } } } }, - "TravelRuleUtxoEntry": { + "BankStatementUploadPricing": { "type": "object", - "description": "One input or output of a UTXO transaction, as the chain recorded it.", + "description": "How the bank statement upload is priced.", "required": [ - "address" + "price_usd", + "included_after_charged_bank_attempt", + "standalone_available" ], "properties": { - "address": { - "type": "string", - "maxLength": 128 - }, - "amount": { + "price_usd": { "type": "string", - "nullable": true, - "description": "Decimal string in the coin's own unit (BTC, not satoshis). Optional.", - "example": "0.0125" + "description": "Price of a statement upload after a charged bank attempt. Decimal string with 4 decimals, in USD.", + "example": "0.0000" }, - "txid": { - "type": "string", - "maxLength": 128, - "description": "Optional. The transaction an input spends." + "included_after_charged_bank_attempt": { + "type": "boolean", + "description": "`true` when the upload is included at no extra charge after a charged bank attempt in the same session.", + "example": true }, - "vout": { - "type": "integer", - "nullable": true, - "minimum": 0, - "description": "Optional. The output index an input spends." + "standalone_available": { + "type": "boolean", + "description": "`true` when a statement upload can run on its own, with no bank attempt first. `false` in production; sandbox sessions can test it without billing.", + "example": false } } }, - "TravelRuleUtxo": { + "BankVerificationPricingCountry": { "type": "object", - "description": "The inputs and outputs of a UTXO transfer (BTC, LTC, BCH, DOGE). Only accepted on those chains: on any other chain it is a `400`. From them Didit infers the originator wallet (the declared one, else the input address that contributed the most) and the beneficiary output (the declared one, else the only output that does not pay an input address back as change, else the one output paying the transfer amount). The result is on the transfer's `chain_details`.", + "description": "One country's Bank Verification methods and their list prices.", "required": [ - "outputs" + "name", + "methods" ], "properties": { - "inputs": { - "type": "array", - "maxItems": 1000, - "items": { - "$ref": "#/components/schemas/TravelRuleUtxoEntry" - }, - "description": "Optional. Without inputs no originator is inferred and no change output is recognised." + "name": { + "type": "string", + "description": "Country name in English.", + "example": "United Kingdom" }, - "outputs": { - "type": "array", - "minItems": 1, - "maxItems": 1000, - "items": { - "$ref": "#/components/schemas/TravelRuleUtxoEntry" - } + "methods": { + "$ref": "#/components/schemas/BankVerificationPricingMethods" } } }, - "TravelRuleChainSide": { + "BankVerificationPricingMethods": { "type": "object", - "description": "One side's wallet as Didit resolved it from the chain data.", + "description": "The two Bank Verification methods in a country.", + "required": [ + "open_banking", + "account_lookup" + ], "properties": { - "address": { - "type": "string", - "description": "The wallet. On a memo network the classic address (an XRP X-address is split into its classic address and its tag); on Lightning the payee node id or Lightning Address." - }, - "memo": { - "type": "string", - "description": "The destination tag or memo that is part of the wallet; `\"\"` for none." + "open_banking": { + "$ref": "#/components/schemas/BankSignInPricing" }, - "source": { - "type": "string", - "enum": [ - "declared", - "x_address", - "largest_input", - "only_non_change_output", - "amount_match", - "invoice_payee", - "updated" - ], - "description": "Where the wallet came from: `declared` (your request), `x_address` (split from an XRP X-address), `largest_input` (the UTXO input address that contributed the most), `only_non_change_output` (the only UTXO output that is not change), `amount_match` (the one UTXO output paying the transfer amount), `invoice_payee` (the payee a Lightning payment request names), `updated` (set later with `action: update_originator_wallet`)." + "account_lookup": { + "$ref": "#/components/schemas/BankAccountCheckPricing" } } }, - "TravelRuleChainDetails": { + "BankSignInPricing": { "type": "object", - "description": "How the transfer's chain names its two wallets, when that is more than one address paying another. Empty (`{}`) for an account-chain transfer (EVM, Solana, Tron), where the two addresses are the wallets. Matching, routing and the address book read the wallets from here first.", + "description": "Bank sign-in: the person signs in to their bank. Priced by market, the same for every bank in it.", + "required": [ + "available", + "market", + "price_usd", + "add_ons" + ], "properties": { - "chain": { - "type": "string", - "description": "Canonical chain, e.g. `BTC`, `XRP`, or `LIGHTNING` for a Lightning transfer." + "available": { + "type": "boolean", + "description": "`true` only where Didit serves bank sign-in in this country in production.", + "example": true }, - "shape": { + "market": { "type": "string", - "enum": [ - "utxo", - "memo", - "lightning" - ] - }, - "originator": { - "$ref": "#/components/schemas/TravelRuleChainSide" + "nullable": true, + "description": "The market whose price applies. `null` when not available.", + "example": "UK and EEA" }, - "beneficiary": { - "$ref": "#/components/schemas/TravelRuleChainSide" + "price_usd": { + "type": "string", + "nullable": true, + "description": "List price of one bank sign-in. `null` when not available. Decimal string with 4 decimals, in USD.", + "example": "0.7900" }, - "utxo": { + "add_ons": { "type": "object", - "description": "On a UTXO transfer: the inputs and outputs as stored (amounts as decimal strings) and which outputs Didit read as what.", + "description": "Add-ons priced in this country, each a decimal string with 4 decimals in USD, added to the bank sign-in price. Only the add-ons the country offers are listed; empty when bank sign-in is not available.", "properties": { - "inputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TravelRuleUtxoEntry" - } - }, - "outputs": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TravelRuleUtxoEntry" - } - }, - "change_output_indexes": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "Outputs that pay an input address back." + "balance": { + "type": "string", + "description": "Account balance add-on.", + "example": "0.3500" }, - "beneficiary_output_index": { - "type": "integer", - "nullable": true, - "description": "The output that pays the beneficiary; null when none could be told apart." + "transactions": { + "type": "string", + "description": "Transactions add-on.", + "example": "1.3000" } } - }, - "lightning": { - "type": "object", - "description": "On a Lightning transfer: what the payment request says. Always `kind` (`bolt11`, `bolt12_offer`, `bolt12_invoice`, `bolt12_invoice_request`, `lnurl`, `lightning_address`, `node_id` or `unknown`); a BOLT11 invoice adds `network`, `payee_node_id`, `payment_hash`, `amount_msat`, `created_at` and `expires_at`; a BOLT12 string `blinded_paths` and `payee_node_id`; an LNURL or a Lightning Address its `domain`. Nothing is resolved over the network: the request is decoded only.", - "additionalProperties": true - }, - "warnings": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "declared_originator_not_an_input", - "declared_beneficiary_not_an_output", - "beneficiary_output_ambiguous", - "beneficiary_output_amount_differs" - ] - }, - "description": "UTXO inconsistencies worth a look: the declared originator is not an input, the declared beneficiary is not an output, no single beneficiary output could be told apart, or the beneficiary output pays a different amount than the transaction states." - }, - "not_applicable_reason": { - "type": "string", - "enum": [ - "LIGHTNING_NO_PAYEE_IDENTIFIER", - "LIGHTNING_BOLT12_BLINDED_PAYEE", - "LIGHTNING_LNURL_NAMES_NO_PAYEE" - ], - "description": "On an outbound Lightning transfer whose payment request names no payee: why the transfer is `NOT_APPLICABLE`. `LIGHTNING_NO_PAYEE_IDENTIFIER` (the request names no payee node, or could not be decoded), `LIGHTNING_BOLT12_BLINDED_PAYEE` (the offer hides its payee behind blinded paths), `LIGHTNING_LNURL_NAMES_NO_PAYEE` (an LNURL names a service, not a payee). The same code opens the transfer's last `timeline` entry." } } }, - "WalletAddressImportRow": { + "BankAccountCheckPricing": { "type": "object", - "description": "One wallet to import: by its `address`, its `address_hash`, or both. The camelCase forms of these fields are accepted too, as are `walletAddress`, `walletAddressHash`, `destinationTag` and `externalUserId`.", + "description": "Account check: the person types their account number and Didit checks it with the bank. Priced per country.", + "required": [ + "available", + "price_usd" + ], "properties": { - "address": { - "type": "string", - "maxLength": 128, - "description": "The wallet address. Alias: `walletAddress`." - }, - "address_hash": { - "type": "string", - "description": "SHA-256 of the lowercased address, as 64 hex characters or 44 base64 characters. Send it alone to register a wallet without disclosing its address; sent with `address`, it must be that address's hash. Alias: `walletAddressHash`." - }, - "chain": { - "type": "string", - "maxLength": 32 - }, - "memo": { - "type": "string", - "maxLength": 256, - "description": "The destination tag or memo. XRP: a destination tag, a whole number from 0 to 4294967295 (a JSON number is accepted). XLM: a text memo of up to 28 bytes, a 64-bit id or a 32-byte hash in hex. EOS: up to 256 bytes. ATOM: up to 256 characters. HBAR: up to 100 bytes. Bitcoin, EVM, Solana, Tron, Litecoin, Bitcoin Cash, Dogecoin and Lightning wallets take no memo: one there is a `400`." - }, - "holder_name": { - "type": "string", - "maxLength": 255 - }, - "holder_vendor_data": { - "type": "string", - "maxLength": 255, - "description": "Your internal identifier for the holder. Alias: `externalUserId`." - }, - "entity_type": { - "type": "string", - "enum": [ - "individual", - "company" - ], - "default": "individual" - }, - "label": { - "type": "string", - "maxLength": 255 - }, - "owner_type": { - "type": "string", - "enum": [ - "customer", - "internal", - "vasp" - ], - "default": "customer" + "available": { + "type": "boolean", + "description": "`true` only where Didit serves the account check in this country in production.", + "example": true }, - "travel_address": { + "price_usd": { "type": "string", - "maxLength": 512 - }, - "self_declared": { - "type": "boolean", - "default": false, - "description": "Create the entry already verified through a self-declaration, when your settings allow it." + "nullable": true, + "description": "List price of one account check the bank answers. `null` when not available. Decimal string with 4 decimals, in USD.", + "example": "0.4000" } } }, - "WalletAddressImportReport": { + "ImportProvider": { "type": "object", - "description": "What happened to each row of an import, in the order sent.", "properties": { - "total": { - "type": "integer" - }, - "created": { - "type": "integer" + "key": { + "type": "string", + "enum": [ + "sumsub", + "jumio", + "veriff", + "onfido", + "persona", + "metamap", + "socure", + "idnow", + "shufti", + "idenfy", + "ondato", + "trulioo", + "au10tix", + "complycube", + "other" + ] }, - "existing": { - "type": "integer" + "name": { + "type": "string" }, - "duplicate": { - "type": "integer" + "mode": { + "type": "string", + "enum": [ + "api_list", + "api_ids", + "export_file" + ], + "description": "`api_list`: Didit lists records with the key. `api_ids`: upload the record IDs from an export. `export_file`: upload an export in Didit's format." }, - "failed": { - "type": "integer" + "record_noun": { + "type": "string" }, - "rows": { + "credential_fields": { "type": "array", "items": { "type": "object", "properties": { - "row": { - "type": "integer", - "description": "The row's number, from 1." - }, - "status": { - "type": "string", - "enum": [ - "created", - "existing", - "duplicate", - "failed" - ], - "description": "`created`: added to the book. `existing`: the wallet is already in the book and was left untouched. `duplicate`: repeats an earlier row of this import. `failed`: see `errors`." - }, - "entry_id": { - "type": "string", - "format": "uuid", - "nullable": true, - "description": "The address-book entry the row created or found." + "name": { + "type": "string" }, - "errors": { - "type": "object", - "description": "Field errors of a `failed` row; empty otherwise." + "label": { + "type": "string" }, - "duplicate_of_row": { - "type": "integer", - "nullable": true, - "description": "On a `duplicate` row, the row it repeats." + "secret": { + "type": "boolean" } } } + }, + "regions": { + "type": "array", + "items": { + "type": "string" + } + }, + "required_permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "docs_url": { + "type": "string", + "nullable": true + }, + "status_mapping": { + "type": "object", + "additionalProperties": { + "type": "string", + "enum": [ + "Approved", + "Declined", + "In Review", + "Expired", + "Not Finished", + "Abandoned" + ] + } } } }, - "TravelRuleCounterpartyContact": { + "ImportJobSummary": { "type": "object", - "description": "A compliance address the EMAIL rail writes to for one directory entry.", + "description": "One import job of any kind, in the shape the console's Import jobs drawer reads.", "properties": { - "uuid": { + "id": { "type": "string", "format": "uuid" }, - "counterparty": { + "kind": { "type": "string", - "format": "uuid", - "description": "The directory entry's `id`, as GET /v3/travel-rule/vasps/ shows it." + "enum": [ + "sessions", + "businesses", + "users", + "status_rules", + "transactions" + ] }, - "counterparty_name": { - "type": "string" + "source": { + "type": "string", + "enum": [ + "file", + "api", + "provider" + ] }, - "email": { + "provider": { "type": "string", - "format": "email" + "nullable": true }, - "name": { + "provider_name": { "type": "string", - "description": "Optional label, for example the team name." + "nullable": true }, - "source": { + "filename": { "type": "string", - "enum": [ - "staff", - "application", - "learned" - ], - "description": "staff: curated by Didit. learned: an address at one of the VASP's own domains that answered a request through its response link. application: added by your application." + "nullable": true }, - "scope": { + "state": { "type": "string", "enum": [ - "platform", - "application" + "ready", + "queued", + "running", + "paused", + "completed", + "errors", + "failed", + "cancelled" ], - "description": "platform: curated by Didit or learned from a verified answer, used for every Didit customer, read-only for you. application: private to your application." + "description": "The job's state as the console shows it; `errors` is a completed job with rejected rows." }, - "created_by": { + "status": { + "type": "string" + }, + "is_dry_run": { + "type": "boolean" + }, + "credential_hint": { "type": "string", - "description": "Empty for platform contacts and for contacts an API key added." + "nullable": true }, - "verified_at": { + "resumes_at": { "type": "string", "format": "date-time", - "nullable": true, - "description": "When this address last answered a request through its response link." + "nullable": true }, - "is_invalid": { - "type": "boolean", - "description": "true once the address bounced or complained; the EMAIL rail skips it." + "last_error": { + "type": "string", + "nullable": true + }, + "started_by": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string", + "nullable": true + } + } + }, + "progress": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "format": "int64" + }, + "processed": { + "type": "integer", + "format": "int64" + }, + "imported": { + "type": "integer", + "format": "int64" + }, + "updated": { + "type": "integer", + "format": "int64" + }, + "already_in_didit": { + "type": "integer", + "format": "int64" + }, + "failed": { + "type": "integer", + "format": "int64" + }, + "not_finished": { + "type": "integer", + "format": "int64" + }, + "same_person": { + "type": "integer", + "format": "int64" + } + } + }, + "face_templates": { + "type": "object", + "nullable": true, + "properties": { + "enabled": { + "type": "boolean" + }, + "built": { + "type": "integer", + "format": "int64" + }, + "duplicates": { + "type": "integer", + "format": "int64" + }, + "blocklisted": { + "type": "integer", + "format": "int64" + } + } }, - "invalid_reason": { - "type": "string", - "enum": [ - "", - "hard_bounce", - "soft_bounce", - "spam_complaint", - "suppressed" - ] + "eta_seconds": { + "type": "integer", + "nullable": true }, - "invalid_detail": { + "created_at": { "type": "string", - "description": "The receiving mail server's reason, when it gave one." + "format": "date-time" }, - "invalid_at": { + "started_at": { "type": "string", "format": "date-time", "nullable": true }, - "created_at": { + "completed_at": { "type": "string", - "format": "date-time" + "format": "date-time", + "nullable": true } } }, - "TravelRuleCounterpartyContactCreate": { + "FiledRegulatoryReport": { "type": "object", + "description": "A finalized regulatory report that prevents the requested deletion.", "required": [ - "counterparty", - "email" + "uuid", + "report_number", + "report_type", + "case_uuid" ], "properties": { - "counterparty": { + "uuid": { "type": "string", "format": "uuid", - "description": "The directory entry's `id`." + "description": "Report UUID." }, - "email": { + "report_number": { "type": "string", - "format": "email", - "maxLength": 254 + "description": "Report number shown in the Console (for example, SAR-0001)." }, - "name": { + "report_type": { "type": "string", - "description": "Optional label.", - "maxLength": 255 + "enum": [ + "SAR", + "STR", + "CTR", + "TTR", + "UTR", + "IFT", + "CBR", + "TFR" + ], + "description": "Regulatory report type." + }, + "case_uuid": { + "type": "string", + "format": "uuid", + "description": "Case the report belongs to." } } }, - "TravelRuleNameMatch": { + "FiledReportTransaction": { "type": "object", - "nullable": true, - "description": "The name comparison that decided the transfer, or null until one ran. While the parties are masked, and on the other customer's copy of an INTERNAL exchange, `transfer_name`, `compared_name`, `matched_names` and `mismatched_names` are hidden. `score` and `matched` can disagree: `matched` follows the strictness, `score` is the similarity of the two full names.", + "description": "A transaction that cannot be deleted because a finalized regulatory report lists it.", + "required": [ + "uuid", + "transaction_id", + "reports" + ], "properties": { - "score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "description": "Similarity of the two full names, 0 to 100. 0 when either name is blank." - }, - "matched": { - "type": "boolean", - "description": "Whether the names satisfy `strictness`. The transfer's outcome follows `data_match`, which compares every field, so a transfer can be COUNTERPARTY_MISMATCHED_DATA while this is true." - }, - "method": { + "uuid": { "type": "string", - "enum": [ - "none", - "exact_token", - "token_subset", - "token_containment", - "sequence_ratio" - ], - "description": "How `matched` was decided: none (`NONE`), exact_token (`STRICT`), token_subset (`DEFAULT`), token_containment (`CONTAINS`) or sequence_ratio (`FUZZY`)." + "format": "uuid", + "description": "Didit transaction UUID." }, - "strictness": { + "transaction_id": { "type": "string", - "enum": [ - "NONE", - "STRICT", - "CONTAINS", - "DEFAULT", - "FUZZY" - ] + "description": "The transaction identifier supplied when the transaction was created." }, - "compared_with": { + "reports": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FiledRegulatoryReport" + }, + "description": "Finalized reports that list this transaction." + } + } + }, + "InFiledReportError": { + "type": "object", + "description": "The deletion is refused because the selected data is in a finalized regulatory report. Nothing is deleted. Delete the report, then repeat the request.", + "required": [ + "detail", + "code" + ], + "properties": { + "detail": { + "type": "string" + }, + "code": { "type": "string", "enum": [ - "wallet_holder", - "counterparty_vasp" + "in_filed_report" ], - "description": "wallet_holder: the holder recorded for the wallet. counterparty_vasp: the name the counterparty answered on the email response page, or the Didit Test VASP's answer in sandbox." - }, - "transfer_name": { - "type": "string", - "description": "The name on the transfer." - }, - "compared_name": { - "type": "string", - "description": "The name it was compared with." + "description": "Stable error code for a deletion blocked by a finalized regulatory report." }, - "matched_names": { + "reports": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FiledRegulatoryReport" }, - "description": "Words of `transfer_name` found in `compared_name`." + "description": "Reports that block a person, company, case or session deletion." }, - "mismatched_names": { + "transactions": { "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/FiledReportTransaction" }, - "description": "Words of `transfer_name` missing from `compared_name`, then words of `compared_name` missing from `transfer_name`." + "description": "Transactions that block a transaction deletion, each with the reports that list it." } } }, - "TravelRuleTransferRow": { + "TravelRuleNetworkParticipantSummary": { "type": "object", - "description": "One Travel Rule transfer as the transfers list shows it: VASP names, wallets and memos only, never the originator or beneficiary person data.", + "nullable": true, + "description": "This application's own participant on the network, or null when it has none.", "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "The transfer's id." - }, - "transaction_id": { - "type": "string", - "format": "uuid", - "description": "The Didit transaction the transfer belongs to." - }, - "txn_id": { - "type": "string", - "nullable": true, - "description": "Your own id for the transaction. Transfers Didit books for you, such as a Didit Test VASP inbound transfer, carry a generated one." - }, - "txn_date": { + "mode": { "type": "string", - "format": "date-time" + "enum": [ + "platform", + "own" + ], + "description": "platform: carried by Didit's membership; own: onboarded under the application's own membership." }, - "kind": { + "status": { "type": "string", "enum": [ - "withdrawal", - "deposit", - "message" + "not_requested", + "questionnaire_pending", + "submitted_to_network", + "active", + "suspended", + "rejected" ], - "description": "withdrawal: outbound. message: an inbound transfer a rail created from a counterparty's message (a TRP inquiry, the INTERNAL inbound leg, or a GTR, VerifyVASP or Sygna Bridge message). deposit: any other inbound transfer." + "description": "not_requested: never requested, or the network refused the first request (see last_error); questionnaire_pending: waiting for the due-diligence questionnaire to be approved; submitted_to_network: handed to the network's onboarding; active: the network gave this application its own participant code; suspended / rejected: Didit suspended or rejected it." }, - "direction": { + "participant_code": { "type": "string", - "enum": [ - "INBOUND", - "OUTBOUND" - ] + "description": "The code the network gave this application (for GTR, its VASP code). Outbound messages carry this code, never Didit's own." }, - "status": { + "requested_at": { "type": "string", - "enum": [ - "AWAITING_COUNTERPARTY", - "ON_HOLD", - "COMPLETED", - "FINISHED", - "CANCELLED", - "EXPIRED", - "COUNTERPARTY_MISMATCHED_DATA", - "COUNTERPARTY_VASP_NOT_FOUND", - "COUNTERPARTY_VASP_NOT_REACHABLE", - "UNCONFIRMED_OWNERSHIP", - "COUNTERPARTY_VASP_GENERAL_DECLINE", - "NOT_ENOUGH_COUNTERPARTY_DATA", - "NOT_APPLICABLE" - ] + "format": "date-time", + "nullable": true }, - "reason": { + "activated_at": { "type": "string", - "description": "Why a `COUNTERPARTY_VASP_NOT_FOUND` or `COUNTERPARTY_VASP_NOT_REACHABLE` transfer is stuck, the same value as the transfer's own `reason`, so the list tells a bounced compliance email from a counterparty with no route without opening each transfer. `\"\"` for any other status. See [Why a transfer is stuck](/transaction-monitoring/travel-rule#why-a-transfer-is-stuck)." + "format": "date-time", + "nullable": true }, + "last_error": { + "type": "string", + "description": "The network's answer when it refused the registration; empty otherwise." + } + } + }, + "TravelRuleNetworkState": { + "type": "object", + "description": "How Travel Rule messages on one network would be sent for this application, and why they cannot be. Configuration status, not a live health or delivery check.", + "properties": { "rail": { "type": "string", - "nullable": true, "enum": [ - "INTERNAL", - "TRP", "GTR", "TRUST", "VERIFYVASP", - "SYGNA", - "EMAIL", - "TEST_VASP", - null + "SYGNA" ] }, - "asset": { - "type": "string", - "description": "The transaction's currency." - }, - "amount": { + "mode": { "type": "string", - "description": "The amount as a plain decimal, for example \"1.25\"." + "enum": [ + "own", + "didit", + "off", + "unavailable" + ], + "description": "own: the application's connected membership is used; didit: Didit's membership carries the application as its own active participant; off: platform routing disabled in disabled_networks with no own membership; unavailable: nothing can send on this network yet (see state and reason)." }, - "originator_vasp": { + "state": { "type": "string", - "description": "Outbound: your VASP's legal name. Inbound: the counterparty's name, from its directory entry, the Didit network member, the TRP sender, the Didit Test VASP, or the name the transfer declared. Empty when none is known." + "enum": [ + "own_membership", + "live_through_didit", + "off", + "didit_onboarding", + "questionnaire_needed", + "questionnaire_in_review", + "request_access", + "request_sent", + "unavailable", + "error" + ], + "description": "own_membership: your connected membership sends; live_through_didit: your own participant on Didit's membership sends; off: you switched platform routing off; didit_onboarding: Didit's own membership of this network is not live yet, so it cannot carry anyone; questionnaire_needed / questionnaire_in_review: the due-diligence questionnaire must be submitted or is with Didit; request_access: the questionnaire is approved, request the network; request_sent: your participant is being onboarded; unavailable: see reason; error: see reason." }, - "beneficiary_vasp": { + "reason": { "type": "string", - "description": "Outbound: the counterparty's name, worked out the same way. Inbound: your VASP's legal name." + "enum": [ + "own_membership_connected", + "platform_network_switched_off", + "own_membership_only", + "sandbox_application", + "didit_membership_not_live", + "participant_suspended", + "participant_rejected", + "questionnaire_not_submitted", + "questionnaire_submitted", + "questionnaire_changes_requested", + "questionnaire_rejected", + "participant_not_requested", + "participant_active", + "participant_key_missing", + "participant_key_unresolved", + "provisioning_failed", + "questionnaire_pending", + "submitted_to_network" + ], + "description": "Machine-readable detail of state. own_membership_only: Didit does not carry applications on this network (TRUST), connect your own membership; sandbox_application: sandbox transfers never reach a network; provisioning_failed: the network refused the registration, the participant's last_error says why and requesting the network again retries." }, - "originator_wallet": { - "type": "string" + "platform_available": { + "type": "boolean", + "description": "Whether Didit's own membership of this network is configured; not a live health check." }, - "beneficiary_wallet": { - "type": "string" + "connected": { + "type": "boolean", + "description": "Whether a connected customer membership exists. Credentials are validated locally; network validation occurs on a live exchange." }, - "originator_memo": { - "type": "string", - "description": "Memo or destination tag, empty on chains without one." + "participant": { + "$ref": "#/components/schemas/TravelRuleNetworkParticipantSummary" }, - "beneficiary_memo": { - "type": "string" + "vasps_reachable": { + "type": "integer", + "description": "Directory VASPs reachable on this network." }, - "originator_wallet_type": { + "routed_30d": { + "type": "integer", + "description": "This application's transfers carried on this network in the last 30 days." + } + } + }, + "TravelRuleNetworkQuestionnaireAnswers": { + "type": "object", + "description": "Didit's network due-diligence questionnaire. Saves are partial: a save keeps every answer it does not name. Submitting requires every field except lei and data_protection_contact_email, and the three attestations true.", + "properties": { + "legal_name": { "type": "string", - "enum": [ - "vasp", - "self_hosted", - "own" - ], - "description": "vasp, self_hosted (declared unhosted) or own (a wallet your address book records as yours). Your own side is always vasp." + "maxLength": 255 }, - "beneficiary_wallet_type": { + "registration_number": { "type": "string", - "enum": [ - "vasp", - "self_hosted", - "own" - ] + "maxLength": 255 }, - "matched_transaction_id": { + "incorporation_country": { "type": "string", - "format": "uuid", - "nullable": true, - "description": "The other side of a deposit you matched to an announced transfer by hand." + "minLength": 2, + "maxLength": 2, + "description": "ISO 3166-1 alpha-2 country code." }, - "deadline_at": { + "registered_address": { "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the transfer expires if it is still waiting on its counterparty. Set on every transfer you create with `POST /v3/transactions/` that needs an exchange, outbound or inbound. Null below the threshold, on a Lightning payment the Travel Rule does not apply to, and on inbound transfers Didit creates when a counterparty reaches you (an inbound TRP inquiry, a network message or the INTERNAL inbound leg)." + "maxLength": 1000 }, - "created_at": { + "website": { "type": "string", - "format": "date-time" - } - } - }, - "BankAccountCheckHolder": { - "description": "The name the account is checked against. Send exactly one of `full_name` and `business_name`.", - "oneOf": [ - { - "$ref": "#/components/schemas/BankAccountCheckPersonHolder" + "format": "uri", + "maxLength": 500 }, - { - "$ref": "#/components/schemas/BankAccountCheckBusinessHolder" - } - ] - }, - "BankAccountCheckRequest": { - "type": "object", - "required": [ - "country", - "account", - "holder" - ], - "properties": { - "country": { + "lei": { "type": "string", - "minLength": 3, - "maxLength": 3, - "description": "The account's country, as an ISO 3166-1 alpha-3 code, for example `GBR`. Lowercase is accepted.", - "example": "GBR" + "maxLength": 20, + "description": "Optional. A valid ISO 17442 LEI when given." }, - "account": { - "type": "object", - "description": "The account the way its country writes it: an `iban`, or an `account_number` with the bank or branch code the country needs (`sort_code`, `routing_number`, `transit_institution`, `bsb`, `ifsc`, `bank_code` or `bic`). Mexico takes a `clabe` and Argentina a `cbu_cvu`, which already name the bank. A business account adds a `registration_id` where the country asks for one. Spaces, dashes and dots are ignored. Keys the country's check does not use are ignored; a key it needs and does not get is a `400` that names it.", - "properties": { - "iban": { - "type": "string", - "maxLength": 64, - "description": "The IBAN, in a country that uses IBANs. It must belong to `country`." - }, - "account_number": { - "type": "string", - "maxLength": 64, - "description": "The account number, in a country that writes the account with a separate bank or branch code." - }, - "sort_code": { - "type": "string", - "maxLength": 64, - "description": "United Kingdom: the 6-digit sort code." - }, - "routing_number": { - "type": "string", - "maxLength": 64, - "description": "United States: the 9-digit ABA routing number." - }, - "transit_institution": { - "type": "string", - "maxLength": 64, - "description": "Canada: the 8-digit transit and institution number." - }, - "bsb": { - "type": "string", - "maxLength": 64, - "description": "Australia: the 6-digit BSB." - }, - "ifsc": { - "type": "string", - "maxLength": 64, - "description": "India: the 11-character IFSC." - }, - "bank_code": { - "type": "string", - "maxLength": 64, - "description": "The bank's code, where the country needs one, for example in Nigeria." - }, - "bic": { - "type": "string", - "maxLength": 64, - "description": "The bank's BIC, where the country's check asks for one." - }, - "clabe": { - "type": "string", - "maxLength": 64, - "description": "Mexico: the 18-digit CLABE. It already names the bank." - }, - "cbu_cvu": { - "type": "string", - "maxLength": 64, - "description": "Argentina: the 22-digit CBU or CVU. It already names the bank." - }, - "registration_id": { - "type": "string", - "maxLength": 64, - "description": "A business account's registration number, where the country asks for one." + "licences": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "regulator", + "jurisdiction", + "licence_type", + "licence_number" + ], + "properties": { + "regulator": { + "type": "string", + "maxLength": 255 + }, + "jurisdiction": { + "type": "string", + "minLength": 2, + "maxLength": 2, + "description": "ISO 3166-1 alpha-2 country code." + }, + "licence_type": { + "type": "string", + "maxLength": 255 + }, + "licence_number": { + "type": "string", + "maxLength": 255 + } } }, - "additionalProperties": { + "description": "Every licence or registration the VASP holds." + }, + "operating_jurisdictions": { + "type": "array", + "minItems": 1, + "maxItems": 250, + "items": { "type": "string", - "maxLength": 64 - }, - "example": { - "sort_code": "20-45-67", - "account_number": "31926819" + "minLength": 2, + "maxLength": 2, + "description": "ISO 3166-1 alpha-2 country code." } }, - "holder": { - "$ref": "#/components/schemas/BankAccountCheckHolder" + "compliance_officer_name": { + "type": "string", + "maxLength": 255 + }, + "compliance_officer_email": { + "type": "string", + "format": "email" + }, + "aml_ctf_policy_attested": { + "type": "boolean", + "description": "Must be true to submit." + }, + "sanctions_screening_attested": { + "type": "boolean", + "description": "Must be true to submit." }, - "vendor_data": { + "data_protection_attested": { + "type": "boolean", + "description": "Must be true to submit." + }, + "data_protection_contact_email": { "type": "string", - "nullable": true, - "description": "Your own reference for this check, returned unchanged.", - "example": "payout_20481" + "format": "email", + "description": "Optional." + }, + "expected_monthly_transfers": { + "type": "integer", + "minimum": 0 + }, + "expected_monthly_volume_usd": { + "type": "string", + "format": "decimal", + "description": "Expected monthly volume in USD, up to 2 decimal places. Returned as a string." + }, + "assets": { + "type": "array", + "minItems": 1, + "maxItems": 200, + "items": { + "type": "string", + "maxLength": 32 + }, + "description": "Asset tickers, stored upper-case, sorted and de-duplicated." } } }, - "BankAccountCheckResponse": { + "TravelRuleNetworkQuestionnaire": { "type": "object", - "required": [ - "request_id", - "result", - "holder_name", - "account", - "vendor_data", - "created_at" - ], "properties": { - "request_id": { - "type": "string", - "format": "uuid", - "description": "The ID of this check." - }, - "result": { + "status": { "type": "string", "enum": [ - "match", - "close_match", - "no_match", - "cannot_verify" + "draft", + "submitted", + "changes_requested", + "approved", + "rejected" ], - "description": "`match`: the bank holds the account under the name you sent. `close_match`: under a close name, for example a missing middle name or a typo. `no_match`: under another name, or there is no such account. `cannot_verify`: the bank answered without comparing the name, for example for a blocked or closed account." - }, - "holder_name": { - "type": "string", - "nullable": true, - "description": "Only on a `close_match`, and only when the bank returned it: the name on the account, as the bank holds it. `null` otherwise." + "description": "Answers can be saved while draft or changes_requested; submitted, approved and rejected are Didit's to move." }, - "account": { - "type": "string", - "description": "The account, masked to its last 4 characters." + "answers": { + "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaireAnswers" }, - "vendor_data": { + "submitted_at": { "type": "string", - "nullable": true, - "description": "Your own reference, as you sent it." + "format": "date-time", + "nullable": true }, - "created_at": { + "reviewed_at": { "type": "string", "format": "date-time", - "description": "When the check ran, in UTC." - } - } - }, - "BankAccountCheckError": { - "type": "object", - "required": [ - "detail" - ], - "properties": { - "detail": { - "type": "string", - "description": "What went wrong, in English." + "nullable": true }, - "code": { + "review_note": { "type": "string", - "description": "A stable code to branch on. Absent on `401` and `403`." + "description": "Didit's note on its last decision, for example what to change." }, - "field": { - "type": "string", - "description": "`400` only: the body field to correct, as a dotted path, for example `account.sort_code`." + "history": { + "type": "array", + "readOnly": true, + "description": "Every status change, oldest first.", + "items": { + "type": "object", + "properties": { + "at": { + "type": "string", + "format": "date-time" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "note": { + "type": "string", + "description": "Review note or the network's answer, when there is one." + } + } + } }, - "reason": { + "updated_at": { "type": "string", - "enum": [ - "required", - "length", - "format", - "checksum", - "country_mismatch", - "rejected" - ], - "description": "`400` only: why the field was refused. `required`, `length`, `format`, `checksum` and `country_mismatch` (an IBAN of another country) are Didit's own checks; `rejected` means the bank refused the account as sent." + "format": "date-time", + "nullable": true } } }, - "BankVerificationResult": { + "TravelRuleNetworkParticipant": { "type": "object", - "description": "One Bank Verification step's result, for User and Business Verification. `method` says how the account was verified, and `none` that the person continued without a bank before any attempt was evaluated. `continued_without_bank` says the person continued without a bank, also after an evaluated attempt. See [Bank verification methods](/core-technology/bank-verification/verification-methods) and [When the person cannot verify their bank](/core-technology/bank-verification/fallbacks).", + "description": "This application's own participant on one network.", "properties": { - "schema_version": { - "type": "integer", - "description": "Version of this result shape. `1` today." - }, - "bank_verification_id": { - "type": "string", - "format": "uuid", - "description": "The ID of this result." - }, - "node_id": { - "type": "string", - "description": "The workflow node this result belongs to." - }, - "status": { + "network": { "type": "string", "enum": [ - "Not Finished", - "Approved", - "Declined", - "In Review", - "Expired" - ], - "description": "The step's verdict, after its actions and status rules." - }, - "original_status": { - "type": "string", - "nullable": true, - "description": "The first verdict the step reached, before any later change such as a manual review." + "gtr", + "trust", + "verifyvasp", + "sygna" + ] }, - "method": { + "rail": { "type": "string", - "nullable": true, "enum": [ - "open_banking", - "account_lookup", - "microdeposits", - "statement", - "none" - ], - "description": "How the account was verified: `open_banking` (bank sign-in: the person signed in at their bank), `account_lookup` (account check: the person typed the account details and the bank confirmed the name), `microdeposits` or `statement` (a statement upload). `none` when the person continued without a bank before any attempt was evaluated, so no account was verified. After an evaluated attempt, it stays the method of that attempt. `null` until an account is evaluated, and when the workflow narrows the data it returns. Workflow rules read the same value as `bank.method`." + "GTR", + "TRUST", + "VERIFYVASP", + "SYGNA" + ] }, - "provider": { + "mode": { "type": "string", - "nullable": true, - "description": "The key of the route that ran the connection. Read `method`, not this key, to tell how the account was verified." + "enum": [ + "platform", + "own" + ] }, - "credential_source": { + "status": { "type": "string", - "nullable": true, "enum": [ - "native", - "byok" + "not_requested", + "questionnaire_pending", + "submitted_to_network", + "active", + "suspended", + "rejected" ], - "description": "`native`: Didit's own route, billed to your Didit balance. `byok`: a marketplace provider you connected with your own credentials." + "description": "not_requested: never requested, or the network refused the first request (see last_error); questionnaire_pending: waiting for the due-diligence questionnaire to be approved; submitted_to_network: handed to the network's onboarding; active: the network gave this application its own participant code; suspended / rejected: Didit suspended or rejected it." }, - "route": { - "type": "object", - "nullable": true, - "description": "The route chosen before consent. It never changes afterwards.", - "properties": { - "provider_key": { - "type": "string", - "nullable": true, - "description": "The route's key." - }, - "credential_source": { - "type": "string", - "enum": [ - "native", - "byok" - ] - }, - "is_fallback": { - "type": "boolean", - "description": "Whether Didit's own route stood in for a marketplace provider that could not connect." - }, - "provider_connection_id": { - "type": "string", - "nullable": true, - "description": "The marketplace connection used, for `byok`." - }, - "requested_scopes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "The data the connection asked for, for example `ownership` or `balances`." - } - } + "participant_code": { + "type": "string" }, - "connection": { - "type": "object", - "nullable": true, - "description": "The latest attempt's connection. `null` before the first attempt.", - "properties": { - "status": { - "type": "string", - "enum": [ - "pending", - "connected", - "cancelled", - "timeout", - "failed", - "unsupported", - "revoked", - "expired" - ] - }, - "institution_id": { - "type": "string", - "nullable": true, - "description": "The bank's ID. `null` for an account check, where no bank is picked." - }, - "institution_name": { - "type": "string", - "nullable": true, - "description": "The bank's name. `null` for an account check." - }, - "institution_country": { - "type": "string", - "nullable": true, - "description": "The account's country, ISO 3166-1 alpha-3." - }, - "oauth": { - "type": "boolean", - "nullable": true, - "description": "Whether the bank sign-in ran over OAuth or app-to-app. `null` for an account check." - }, - "connected_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the connection succeeded." - }, - "consent_expires_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the bank consent ends, for bank sign-in." - }, - "last_refreshed_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the financial data was last read again." - }, - "attempts": { - "type": "integer", - "description": "The attempts the person spent on this step, every method together." - }, - "reason_code": { - "type": "string", - "nullable": true, - "description": "Why the connection is not simply `connected`, for example `USER_CANCELLED`, `INSTITUTION_DOWN`, `ACCOUNT_NOT_FOUND`, `REFERENCE_IDENTITY_MISSING` or `VERIFICATION_COMPLETED`." - } - } + "requested_at": { + "type": "string", + "format": "date-time", + "nullable": true }, - "account": { - "type": "object", - "nullable": true, - "description": "The evaluated account. `null` until an account is evaluated.", - "properties": { - "account_id_masked": { - "type": "string", - "nullable": true, - "description": "The account number, masked." - }, - "iban_masked": { - "type": "string", - "nullable": true, - "description": "The IBAN, masked." - }, - "sort_code": { - "type": "string", - "nullable": true, - "description": "The sort code, in the United Kingdom." - }, - "routing_number_masked": { - "type": "string", - "nullable": true, - "description": "The routing number, masked." - }, - "type": { - "type": "string", - "nullable": true, - "enum": [ - "checking", - "current", - "savings", - "business", - "other" - ] - }, - "subtype": { - "type": "string", - "nullable": true, - "description": "The bank's own account subtype." - }, - "currency": { - "type": "string", - "nullable": true, - "description": "ISO 4217 currency of the account." - }, - "holder_type": { - "type": "string", - "nullable": true, - "enum": [ - "person", - "business", - "unknown" - ] - }, - "holders_count": { - "type": "integer", - "nullable": true - }, - "is_joint": { - "type": "boolean", - "nullable": true - }, - "is_business": { - "type": "boolean", - "nullable": true - } - } + "submitted_at": { + "type": "string", + "format": "date-time", + "nullable": true }, - "ownership": { - "type": "object", - "nullable": true, - "description": "How the account holder compared with the verified identity. `null` until an account is evaluated.", - "properties": { - "result": { - "type": "string", - "enum": [ - "match", - "partial_match", - "no_match", - "unknown", - "not_verifiable" - ], - "description": "`partial_match` is a close match. `not_verifiable`: the bank answered with no holder to compare. `unknown`: the evidence could not be read, or there was no identity to compare." - }, - "reference_identity_source": { - "type": "string", - "nullable": true, - "description": "The step whose identity the holder was compared against: `kyc`, `database_validation`, `expected_details`, `questionnaire`, `document_ai` or `kyb`." - }, - "name_score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "nullable": true, - "description": "Didit's holder name score." - }, - "provider_name_score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "nullable": true, - "description": "The bank's own holder name score, when it returned one." - }, - "address_score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "nullable": true, - "description": "The holder address score, when address matching ran." - }, - "email_score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "nullable": true, - "description": "The holder email score, when email matching ran." - }, - "phone_score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "nullable": true, - "description": "The holder phone score, when phone matching ran." - }, - "dob_score": { - "type": "integer", - "minimum": 0, - "maximum": 100, - "nullable": true, - "description": "The holder date of birth score, when the bank shared one." - }, - "close_match": { - "type": "boolean", - "nullable": true, - "description": "Whether the name landed in the close-match band." - }, - "holder_confirmation": { - "type": "string", - "nullable": true, - "enum": [ - "pending", - "confirmed", - "rejected" - ], - "description": "The person's answer when asked to confirm a close-match name. `null` when never asked." - }, - "method": { - "type": "string", - "nullable": true, - "enum": [ - "exact", - "token_set", - "nickname", - "transliteration", - "fuzzy", - "provider_only", - "microdeposits" - ], - "description": "Which name comparison produced the score. This is not the verification method: read the top-level `method` for that." - }, - "matched_holder_index": { - "type": "integer", - "nullable": true - }, - "holders": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Each holder the bank listed, with its scores." - }, - "owner_identity_available": { - "type": "boolean", - "nullable": true - }, - "evidence_freshness": { - "type": "string", - "nullable": true, - "enum": [ - "live", - "cached", - "refreshed" - ] - }, - "evaluated_at": { - "type": "string", - "format": "date-time", - "nullable": true, - "description": "When the verdict was computed." - } - } + "activated_at": { + "type": "string", + "format": "date-time", + "nullable": true }, - "financial_data": { - "type": "object", - "description": "The financial data the step read. Only bank sign-in reads it.", - "properties": { - "balances": { - "type": "object", - "nullable": true, - "description": "With the `balances` scope." - }, - "transactions": { - "type": "object", - "nullable": true, - "description": "With the `transactions` scope." - }, - "income": { - "type": "object", - "nullable": true, - "description": "With the `income` scope." - }, - "categorization": { - "type": "object", - "nullable": true, - "description": "Didit's categorization of the transactions read. `null` without them." - }, - "not_collected": { - "type": "array", - "items": { + "suspended_at": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "last_error": { + "type": "string", + "description": "The network's answer when it refused the registration; empty otherwise." + }, + "history": { + "type": "array", + "readOnly": true, + "description": "Every status change, oldest first.", + "items": { + "type": "object", + "properties": { + "at": { "type": "string", - "enum": [ - "balances", - "income", - "transactions" - ] + "format": "date-time" }, - "description": "The data the step asked for that the method which verified the account does not collect. Balances, transactions and income come from bank sign-in only, so an account verified by account check lists them here. Never a failure. Empty otherwise." + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "note": { + "type": "string", + "description": "Review note or the network's answer, when there is one." + } } } + } + } + }, + "TravelRuleNetworksOverview": { + "type": "object", + "properties": { + "platform_networks_enabled": { + "type": "boolean", + "description": "Whether network access through Didit's membership is open. While false, questionnaire saves, submissions and network requests answer 403." }, - "billing": { + "questionnaire": { + "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaire" + }, + "participants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TravelRuleNetworkParticipant" + } + }, + "networks": { "type": "object", - "nullable": true, + "readOnly": true, + "description": "Per network, how this application would send and why it cannot. No network, including GTR, is included by default: a network is reachable through your own connected membership, or through Didit's membership once Didit's membership of that network is live and your own participant on it is active. Not a live health or delivery check.", "properties": { - "route": { - "type": "string", - "enum": [ - "native", - "byok" - ] + "gtr": { + "$ref": "#/components/schemas/TravelRuleNetworkState" }, - "billed": { - "type": "boolean" + "trust": { + "$ref": "#/components/schemas/TravelRuleNetworkState" }, - "marketplace_fee": { - "type": "string", - "nullable": true, - "description": "The marketplace platform fee charged, for `byok`." + "verifyvasp": { + "$ref": "#/components/schemas/TravelRuleNetworkState" }, - "usage_type": { - "type": "string", - "nullable": true, - "description": "The usage line the charge was booked on: `bank_verification` for a bank sign-in or an account check, `bank_statement_upload` for a statement upload with no charged bank attempt before it, and `bank_byok_fee` for the marketplace fee on your own provider. `null` when nothing was billed." + "sygna": { + "$ref": "#/components/schemas/TravelRuleNetworkState" } } + } + } + }, + "AddressValidationResult": { + "type": "object", + "description": "The result of one Address Validation: whether the address exists, and its normalised form. It confirms the address only; it never links the address to a person.", + "required": [ + "status", + "verification_level", + "address", + "formatted_address", + "latitude", + "longitude" + ], + "properties": { + "status": { + "type": "string", + "enum": [ + "verified", + "partially_verified", + "not_verified", + "unavailable" + ], + "description": "`verified`: the address was confirmed down to the building (or the flat or PO box). `partially_verified`: it was confirmed only to the street, or to the most precise level the postal reference data holds for that place. `not_verified`: only the region or the city matched, or nothing did. `unavailable`: the validation could not run (for example the reference service did not answer); it is not charged and never affects a verification." }, - "reference_identity": { - "type": "object", - "nullable": true, - "description": "The identity the holder was compared against, with its source." - }, - "signals": { - "type": "object", - "nullable": true, - "description": "Account signals read from the transaction history, when the step read one." - }, - "connection_abandoned": { - "type": "boolean", - "nullable": true, - "description": "Whether the step ended without a match after the person left at their bank." - }, - "not_covered": { - "type": "boolean", + "verification_level": { + "type": "string", "nullable": true, - "description": "Whether the person's bank or country could not be reached on this step. Also `true` when the person continued without a bank because no method could verify their country or bank." - }, - "continued_without_bank": { - "type": "boolean", - "description": "Whether the person left the step with **Continue without your bank**. `continuation` then says why. `method` is `none` when no attempt was evaluated before they continued. After an evaluated attempt, such as a holder that does not match, `method` stays the method of that attempt and its verdict and reason codes stand. Returned even when the workflow narrows the data it returns." + "enum": [ + "administrative_area", + "locality", + "thoroughfare", + "premise", + "delivery_point", + null + ], + "description": "The most precise level the address was matched to. `null` when nothing matched or `status` is `unavailable`." }, - "continuation": { + "address": { "type": "object", "nullable": true, - "description": "How the person continued without a bank. `null` when they did not. When the workflow narrows the data it returns, `reason` is still returned and every other key is `null`.", + "description": "The normalised address. `null` when `status` is `unavailable`.", "properties": { - "reason": { + "address_line_1": { "type": "string", - "enum": [ - "no_route", - "institution_unsupported", - "attempts_exhausted", - "person_choice" - ], - "description": "Why, as Didit worked it out when the person continued: `no_route` (no bank sign-in or account check serves their country), `institution_unsupported` (the bank they picked cannot be used on this step), `attempts_exhausted` (every attempt was already spent and none was in progress), or `person_choice` (a way to verify was there and they chose to continue, also when their bank could not be reached right now). `no_route` and `institution_unsupported` follow `bank_unsupported_action`, `attempts_exhausted` follows `bank_attempts_exhausted_action`, and `person_choice` follows `bank_skipped_action`, unless an evaluated attempt already decided the step." + "nullable": true, + "description": "First delivery line, written the way the country writes it.", + "example": "1600 Amphitheatre Pkwy" }, - "country": { + "address_line_2": { "type": "string", "nullable": true, - "description": "The country the person was verifying in, ISO 3166-1 alpha-3. `null` when they continued before picking one." + "description": "Second delivery line (a flat, building or neighbourhood), when the address has one." }, - "offered": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "statement", - "microdeposits" - ] - }, + "city": { + "type": "string", "nullable": true, - "description": "The other ways to verify that country offered the person when they continued, in the order it offered them: `statement` (a statement upload), then `microdeposits`. Empty when it offered none." + "example": "Mountain View" }, - "institution_id": { + "region": { "type": "string", "nullable": true, - "description": "For `institution_unsupported`, the ID of the bank the person could not use: the bank they picked, or the bank their last attempt ended on. Didit takes it from its own list of banks, never from the person's device, so a bank that list does not have is `null`. `null` for every other reason." + "description": "State, province or region.", + "example": "CA" }, - "institution_name": { + "postal_code": { "type": "string", "nullable": true, - "description": "For `institution_unsupported`, the name of that bank, from the same list as `institution_id`. `null` when that list does not have the bank, and for every other reason." + "example": "94043-1351" }, - "continued_at": { + "country": { "type": "string", - "format": "date-time", "nullable": true, - "description": "When the person continued." + "description": "ISO 3166-1 alpha-2 country code.", + "example": "US" } } }, - "evidence_purged_at": { + "formatted_address": { "type": "string", - "format": "date-time", "nullable": true, - "description": "When the bank evidence was deleted under `bank_evidence_retention_days`. `null` otherwise." - }, - "warnings": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Informational codes, for example `holder_declared`. A warning never changes the status on its own." - }, - "reason_codes": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Why the verdict came out the way it did, for example `OWNER_NAME_PARTIAL`. Several may apply. `NOT_COVERED`: the person continued without a bank because no method could verify their country or bank. `SKIPPED`: the person chose to continue without a bank while a way to verify was there. Neither is added when an evaluated attempt already decided the step." + "description": "The normalised address on one line.", + "example": "1600 Amphitheatre Pkwy, Mountain View CA 94043-1351" }, - "created_at": { - "type": "string", - "format": "date-time" + "latitude": { + "type": "number", + "nullable": true, + "example": 37.422022 }, - "updated_at": { - "type": "string", - "format": "date-time" + "longitude": { + "type": "number", + "nullable": true, + "example": -122.08429 } } }, - "BankAccountCheckPersonHolder": { + "AddressValidationRequest": { "type": "object", - "description": "The person who should hold the account.", "required": [ - "full_name" + "country" ], + "description": "One address: on one line (`address`) or as structured fields with at least `address_line_1`, never both.", "properties": { - "full_name": { + "address": { + "type": "string", + "maxLength": 500, + "description": "The whole address on one line.", + "example": "Paseo de la Castellana 259, 28046 Madrid" + }, + "address_line_1": { "type": "string", "maxLength": 255, - "description": "The full name of the person who should hold the account.", - "example": "Maria Oliveira" - } - } - }, - "BankAccountCheckBusinessHolder": { - "type": "object", - "description": "The company that should hold the account. Checks a business account.", - "required": [ - "business_name" - ], - "properties": { - "business_name": { + "description": "Street and number.", + "example": "1600 Amphitheatre Pkwy" + }, + "address_line_2": { "type": "string", "maxLength": 255, - "description": "The name of the company that should hold the account. Checks a business account." - } - } - }, - "BankVerificationPricing": { - "type": "object", - "description": "Public Bank Verification list prices: the statement upload, the own provider key fee and each country's methods.", - "required": [ - "currency", - "statement_upload", - "own_provider_fee_usd", - "countries" - ], - "properties": { - "currency": { + "description": "Apartment, suite, floor or building." + }, + "city": { "type": "string", - "enum": [ - "USD" - ], - "description": "Currency of every price in the response.", - "example": "USD" + "maxLength": 128, + "description": "City or locality.", + "example": "Mountain View" }, - "statement_upload": { - "$ref": "#/components/schemas/BankStatementUploadPricing" + "region": { + "type": "string", + "maxLength": 128, + "description": "State, province or region.", + "example": "CA" }, - "own_provider_fee_usd": { + "postal_code": { "type": "string", - "description": "Fee for each billable ownership check on a route that uses your own provider contract instead of Didit's, charged whatever the result. A cancelled, timed out or abandoned connection is not billed. Decimal string with 4 decimals, in USD.", - "example": "0.0200" + "maxLength": 32, + "example": "94043" }, - "countries": { - "type": "object", - "description": "Every country, keyed by ISO 3166-1 alpha-3 code.", - "additionalProperties": { - "$ref": "#/components/schemas/BankVerificationPricingCountry" - } + "country": { + "type": "string", + "maxLength": 3, + "description": "ISO 3166-1 alpha-2 or alpha-3 code of the address's country.", + "example": "US" } } }, - "BankStatementUploadPricing": { + "AddressValidationResponse": { "type": "object", - "description": "How the bank statement upload is priced.", "required": [ - "price_usd", - "included_after_charged_bank_attempt", - "standalone_available" + "request_id", + "address_validation", + "created_at" ], "properties": { - "price_usd": { + "request_id": { "type": "string", - "description": "Price of a statement upload after a charged bank attempt. Decimal string with 4 decimals, in USD.", - "example": "0.0000" + "format": "uuid", + "description": "Identifier of this request; quote it to support. No session is created." }, - "included_after_charged_bank_attempt": { - "type": "boolean", - "description": "`true` when the upload is included at no extra charge after a charged bank attempt in the same session.", - "example": true + "address_validation": { + "$ref": "#/components/schemas/AddressValidationResult" }, - "standalone_available": { - "type": "boolean", - "description": "`true` when a statement upload can run on its own, with no bank attempt first. `false` in production; sandbox sessions can test it without billing.", - "example": false - } - } - }, - "BankVerificationPricingCountry": { - "type": "object", - "description": "One country's Bank Verification methods and their list prices.", - "required": [ - "name", - "methods" - ], - "properties": { - "name": { + "created_at": { "type": "string", - "description": "Country name in English.", - "example": "United Kingdom" - }, - "methods": { - "$ref": "#/components/schemas/BankVerificationPricingMethods" + "format": "date-time" } } }, - "BankVerificationPricingMethods": { - "type": "object", - "description": "The two Bank Verification methods in a country.", - "required": [ - "open_banking", - "account_lookup" + "TravelRuleWalletProofFailureReason": { + "type": "string", + "enum": [ + "", + "SIGNATURE_INVALID", + "SIGNATURE_UNSUPPORTED_SCHEME", + "DEPOSIT_NOT_FOUND", + "DEPOSIT_UNCONFIRMED", + "DEPOSIT_LOOKUP_FAILED", + "DEPOSIT_MISMATCH", + "DEPOSIT_STALE", + "TXID_REUSED", + "CHAIN_UNSUPPORTED", + "WINDOW_EXPIRED", + "OWNERSHIP_CHANGED", + "METHOD_SWITCHED", + "REVIEW_REJECTED", + "ABANDONED" ], - "properties": { - "open_banking": { - "$ref": "#/components/schemas/BankSignInPricing" - }, - "account_lookup": { - "$ref": "#/components/schemas/BankAccountCheckPricing" - } - } + "description": "Why a wallet-ownership proof, or its last attempt, fell short of VERIFIED. Empty when nothing failed. A PENDING proof can carry one: the last attempt failed and the end user can try again. DEPOSIT_MISMATCH, DEPOSIT_STALE, TXID_REUSED and REVIEW_REJECTED close the proof as REJECTED. SIGNATURE_INVALID: the signature does not match the wallet and challenge. SIGNATURE_UNSUPPORTED_SCHEME: the wallet signed in a format Didit does not verify. DEPOSIT_NOT_FOUND, DEPOSIT_UNCONFIRMED, DEPOSIT_LOOKUP_FAILED: the test deposit is not readable or not confirmed yet; Didit keeps checking it until the test window closes. DEPOSIT_MISMATCH: the transaction does not send the expected amount from the wallet to the deposit address. DEPOSIT_STALE: the transaction predates the challenge. TXID_REUSED: the transaction already proved another wallet. CHAIN_UNSUPPORTED: the method is not available on this chain. WINDOW_EXPIRED: the test window closed. OWNERSHIP_CHANGED: the wallet's holder changed, or the wallet was deleted from your address book, after the widget session was minted. METHOD_SWITCHED: the end user picked another method before finishing this one. REVIEW_REJECTED: your reviewer rejected the screenshot. ABANDONED: the widget session lapsed before the end user finished." }, - "BankSignInPricing": { + "TravelRuleWidgetProofError": { "type": "object", - "description": "Bank sign-in: the person signs in to their bank. Priced by market, the same for every bank in it.", - "required": [ - "available", - "market", - "price_usd", - "add_ons" - ], "properties": { - "available": { - "type": "boolean", - "description": "`true` only where Didit serves bank sign-in in this country in production.", - "example": true + "detail": { + "type": "string", + "description": "Human-readable message in English." }, - "market": { + "code": { + "allOf": [ + { + "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason" + } + ], + "description": "Machine-readable reason, so a client can show its own translated message." + }, + "status": { "type": "string", - "nullable": true, - "description": "The market whose price applies. `null` when not available.", - "example": "UK and EEA" + "enum": [ + "PENDING", + "VERIFIED", + "REJECTED", + "EXPIRED" + ], + "description": "Present when the proof is closed: REJECTED by the deposit just submitted (400), or REJECTED or EXPIRED when evidence is sent to a proof that is already closed (409)." }, - "price_usd": { + "proof_id": { "type": "string", - "nullable": true, - "description": "List price of one bank sign-in. `null` when not available. Decimal string with 4 decimals, in USD.", - "example": "0.7900" + "format": "uuid", + "description": "Present with status: the closed proof." }, - "add_ons": { - "type": "object", - "description": "Add-ons priced in this country, each a decimal string with 4 decimals in USD, added to the bank sign-in price. Only the add-ons the country offers are listed; empty when bank sign-in is not available.", - "properties": { - "balance": { - "type": "string", - "description": "Account balance add-on.", - "example": "0.3500" - }, - "transactions": { - "type": "string", - "description": "Transactions add-on.", - "example": "1.3000" - } - } + "method": { + "type": "string", + "enum": [ + "MESSAGE_SIGNING", + "SATOSHI_TEST", + "SCREENSHOT", + "SELF_DECLARATION" + ], + "description": "Present with status: the closed proof's method." + }, + "max_attempts": { + "type": "integer", + "description": "Present with status: rejected wallet proofs this session allows." + }, + "attempts_used": { + "type": "integer", + "description": "Present with status: rejected proofs so far." + }, + "attempts_remaining": { + "type": "integer", + "description": "Present with status: when 0, starting another proof answers 409 and you mint a new widget session." } } }, - "BankAccountCheckPricing": { + "TravelRuleWidgetProofCreate": { "type": "object", - "description": "Account check: the person types their account number and Didit checks it with the bank. Priced per country.", "required": [ - "available", - "price_usd" + "method" ], "properties": { - "available": { - "type": "boolean", - "description": "`true` only where Didit serves the account check in this country in production.", - "example": true + "method": { + "type": "string", + "enum": [ + "MESSAGE_SIGNING", + "SATOSHI_TEST", + "SCREENSHOT", + "SELF_DECLARATION" + ], + "description": "The proof method the end user picked. It must be one of the context's allowed_methods." + }, + "wallet_address": { + "type": "string", + "maxLength": 128, + "description": "Defaults to the session's wallet_address. Must match the transfer's wallet when the session is linked to a transfer." }, - "price_usd": { + "chain": { "type": "string", - "nullable": true, - "description": "List price of one account check the bank answers. `null` when not available. Decimal string with 4 decimals, in USD.", - "example": "0.4000" + "maxLength": 32, + "description": "Defaults to the session's chain." } } }, - "ImportProvider": { + "TravelRuleWidgetProofVerifyResult": { "type": "object", "properties": { - "key": { + "proof_id": { + "type": "string", + "format": "uuid" + }, + "method": { "type": "string", "enum": [ - "sumsub", - "jumio", - "veriff", - "onfido", - "persona", - "metamap", - "socure", - "idnow", - "shufti", - "idenfy", - "ondato", - "trulioo", - "au10tix", - "complycube", - "other" + "MESSAGE_SIGNING", + "SATOSHI_TEST", + "SCREENSHOT", + "SELF_DECLARATION" ] }, - "name": { - "type": "string" - }, - "mode": { + "status": { "type": "string", "enum": [ - "api_list", - "api_ids", - "export_file" - ], - "description": "`api_list`: Didit lists records with the key. `api_ids`: upload the record IDs from an export. `export_file`: upload an export in Didit's format." - }, - "record_noun": { - "type": "string" - }, - "credential_fields": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "label": { - "type": "string" - }, - "secret": { - "type": "boolean" - } - } - } + "PENDING", + "VERIFIED", + "REJECTED", + "EXPIRED" + ] }, - "regions": { - "type": "array", - "items": { - "type": "string" - } + "is_ownership_verified": { + "type": "boolean", + "description": "Present when the proof is VERIFIED: the address book entry is now ownership-verified." }, - "required_permissions": { - "type": "array", - "items": { - "type": "string" - } + "transfer_status": { + "type": "string", + "nullable": true, + "description": "Present when the proof is VERIFIED: the linked transfer's status, null without one." }, - "docs_url": { + "detail": { "type": "string", - "nullable": true + "description": "Present while the proof stays PENDING: a submitted screenshot awaiting review, or a test deposit that is not confirmed yet." }, - "status_mapping": { - "type": "object", - "additionalProperties": { - "type": "string", - "enum": [ - "Approved", - "Declined", - "In Review", - "Expired", - "Not Finished", - "Abandoned" - ] - } + "code": { + "allOf": [ + { + "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason" + } + ], + "description": "Present on a pending test deposit: why it is not confirmed yet." } } }, - "ImportJobSummary": { + "TravelRuleWalletProofReview": { "type": "object", - "description": "One import job of any kind, in the shape the console's Import jobs drawer reads.", "properties": { - "id": { + "proof_id": { "type": "string", "format": "uuid" }, - "kind": { + "method": { "type": "string", "enum": [ - "sessions", - "businesses", - "users", - "status_rules", - "transactions" + "SCREENSHOT" ] }, - "source": { + "status": { "type": "string", "enum": [ - "file", - "api", - "provider" + "PENDING", + "VERIFIED", + "REJECTED", + "EXPIRED" ] }, - "provider": { - "type": "string", - "nullable": true - }, - "provider_name": { - "type": "string", - "nullable": true - }, - "filename": { - "type": "string", - "nullable": true + "wallet_address": { + "type": "string" }, - "state": { + "chain": { "type": "string", - "enum": [ - "ready", - "queued", - "running", - "paused", - "completed", - "errors", - "failed", - "cancelled" - ], - "description": "The job's state as the console shows it; `errors` is a completed job with rejected rows." + "description": "Canonical chain identifier, e.g. ETH, BTC, SOL, TRX." }, - "status": { + "holder_name": { "type": "string" }, - "is_dry_run": { - "type": "boolean" + "is_ownership_verified": { + "type": "boolean", + "description": "Whether the address book entry is ownership-verified, by this proof or another one." }, - "credential_hint": { + "transaction_id": { "type": "string", - "nullable": true + "format": "uuid", + "nullable": true, + "description": "The transaction whose Travel Rule transfer the widget session was minted for. Null for a session minted without a transaction_id." }, - "resumes_at": { + "file_name": { "type": "string", - "format": "date-time", "nullable": true }, - "last_error": { + "content_type": { "type": "string", "nullable": true }, - "started_by": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - } - } - }, - "progress": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - }, - "processed": { - "type": "integer", - "format": "int64" - }, - "imported": { - "type": "integer", - "format": "int64" - }, - "updated": { - "type": "integer", - "format": "int64" - }, - "already_in_didit": { - "type": "integer", - "format": "int64" - }, - "failed": { - "type": "integer", - "format": "int64" - }, - "not_finished": { - "type": "integer", - "format": "int64" - }, - "same_person": { - "type": "integer", - "format": "int64" - } - } - }, - "face_templates": { - "type": "object", + "screenshot_url": { + "type": "string", "nullable": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "built": { - "type": "integer", - "format": "int64" - }, - "duplicates": { - "type": "integer", - "format": "int64" - }, - "blocklisted": { - "type": "integer", - "format": "int64" - } - } + "description": "Time-limited link to the uploaded screenshot. List the queue again for a fresh link." }, - "eta_seconds": { + "attempts": { "type": "integer", - "nullable": true + "description": "How many files the end user uploaded for this proof." }, - "created_at": { - "type": "string", - "format": "date-time" + "failure_reason": { + "allOf": [ + { + "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason" + } + ], + "description": "REVIEW_REJECTED after a rejection, OWNERSHIP_CHANGED when the wallet changed holder or was deleted before a decision. Empty otherwise." }, - "started_at": { + "method_chosen_at": { "type": "string", "format": "date-time", - "nullable": true + "nullable": true, + "description": "When the end user picked the screenshot method." }, - "completed_at": { + "decided_at": { "type": "string", "format": "date-time", "nullable": true - } - } - }, - "FiledRegulatoryReport": { - "type": "object", - "description": "A finalized regulatory report that prevents the requested deletion.", - "required": [ - "uuid", - "report_number", - "report_type", - "case_uuid" - ], - "properties": { - "uuid": { - "type": "string", - "format": "uuid", - "description": "Report UUID." }, - "report_number": { + "decided_by": { "type": "string", - "description": "Report number shown in the Console (for example, SAR-0001)." + "description": "Who closed the proof: review: for a console reviewer, review for an API-key decision, widget or sweeper when Didit closed it automatically. Empty while PENDING." }, - "report_type": { + "review_note": { "type": "string", - "enum": [ - "SAR", - "STR", - "CTR", - "TTR", - "UTR", - "IFT", - "CBR", - "TFR" - ], - "description": "Regulatory report type." + "description": "The note sent with the decision. Empty when none." }, - "case_uuid": { + "created_at": { "type": "string", - "format": "uuid", - "description": "Case the report belongs to." + "format": "date-time" } } }, - "FiledReportTransaction": { + "TravelRuleWalletProofDecision": { "type": "object", - "description": "A transaction that cannot be deleted because a finalized regulatory report lists it.", "required": [ - "uuid", - "transaction_id", - "reports" + "decision" ], "properties": { - "uuid": { + "decision": { "type": "string", - "format": "uuid", - "description": "Didit transaction UUID." + "enum": [ + "approve", + "reject" + ] }, - "transaction_id": { + "note": { "type": "string", - "description": "The transaction identifier supplied when the transaction was created." - }, - "reports": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FiledRegulatoryReport" - }, - "description": "Finalized reports that list this transaction." + "maxLength": 512, + "description": "Optional. Kept with the proof and returned as review_note." } } }, - "InFiledReportError": { + "DigitalIdWalletApiWalletDigitalCredentialsRequest": { "type": "object", - "description": "The deletion is refused because the selected data is in a finalized regulatory report. Nothing is deleted. Delete the report, then repeat the request.", - "required": [ - "detail", - "code" - ], "properties": { - "detail": { - "type": "string" - }, - "code": { + "protocol": { "type": "string", - "enum": [ - "in_filed_report" - ], - "description": "Stable error code for a deletion blocked by a finalized regulatory report." + "description": "openid4vp-v1-signed." }, - "reports": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FiledRegulatoryReport" - }, - "description": "Reports that block a person, company, case or session deletion." - }, - "transactions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/FiledReportTransaction" - }, - "description": "Transactions that block a transaction deletion, each with the reports that list it." + "request": { + "type": "object", + "additionalProperties": {}, + "description": "Pass as is: navigator.credentials.get({digital: request}) in the browser, or JSON.stringify(request) as GetDigitalCredentialOption's requestJson on Android. Signed by Didit for your application." } - } + }, + "required": [ + "protocol", + "request" + ] }, - "TravelRuleNetworkParticipantSummary": { + "DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest": { "type": "object", - "nullable": true, - "description": "This application's own participant on the network, or null when it has none.", + "description": "Start a Google Wallet verification (USA, GBR, BRA, SGP, TWN).", "properties": { - "mode": { - "type": "string", - "enum": [ - "platform", - "own" - ], - "description": "platform: carried by Didit's membership; own: onboarded under the application's own membership." - }, - "status": { + "vendor_data": { "type": "string", - "enum": [ - "not_requested", - "questionnaire_pending", - "submitted_to_network", - "active", - "suspended", - "rejected" - ], - "description": "not_requested: never requested, or the network refused the first request (see last_error); questionnaire_pending: waiting for the due-diligence questionnaire to be approved; submitted_to_network: handed to the network's onboarding; active: the network gave this application its own participant code; suspended / rejected: Didit suspended or rejected it." + "nullable": true, + "description": "Your own reference for this verification (e.g. your user id). Returned in results and webhooks." }, - "participant_code": { - "type": "string", - "description": "The code the network gave this application (for GTR, its VASP code). Outbound messages carry this code, never Didit's own." + "metadata": { + "type": "object", + "additionalProperties": {}, + "nullable": true, + "description": "Optional JSON object stored with the verification and returned in results and webhooks." }, - "requested_at": { + "sandbox_scenario": { "type": "string", - "format": "date-time", - "nullable": true + "minLength": 1, + "description": "Sandbox applications only: the simulated outcome - 'wallet_cancelled', 'wallet_timeout' or 'wallet_provider_error'; any other scenario (or none) verifies. Rejected on live applications. The full catalog is available at GET /v1/sandbox/scenarios/." }, - "activated_at": { - "type": "string", - "format": "date-time", - "nullable": true + "country": { + "allOf": [ + { + "$ref": "#/components/schemas/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum" + } + ], + "description": "ISO 3166-1 alpha-3 country of the Google Wallet identity.\n\n* `USA` - USA\n* `GBR` - GBR\n* `BRA` - BRA\n* `SGP` - SGP\n* `TWN` - TWN" }, - "last_error": { + "origin": { "type": "string", - "description": "The network's answer when it refused the registration; empty otherwise." + "minLength": 1, + "description": "Where your page or app will ask the wallet: the https origin of your page (its host must be in the application's allowed_return_hosts, or be its white-label domain), e.g. https://app.example.com, or android:apk-key-hash:. The wallet refuses the request anywhere else.", + "maxLength": 256 } - } + }, + "required": [ + "country", + "origin" + ] }, - "TravelRuleNetworkState": { + "DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum": { + "enum": [ + "USA", + "GBR", + "BRA", + "SGP", + "TWN" + ], + "type": "string", + "description": "* `USA` - USA\n* `GBR` - GBR\n* `BRA` - BRA\n* `SGP` - SGP\n* `TWN` - TWN" + }, + "DigitalIdWalletApiWalletDigitalCredentialResponseRequest": { "type": "object", - "description": "How Travel Rule messages on one network would be sent for this application, and why they cannot be. Configuration status, not a live health or delivery check.", + "description": "What the wallet answered your page or app, for a ``request_digital_credential`` verification.", "properties": { - "rail": { - "type": "string", - "enum": [ - "GTR", - "TRUST", - "VERIFYVASP", - "SYGNA" - ] - }, - "mode": { - "type": "string", - "enum": [ - "own", - "didit", - "off", - "unavailable" - ], - "description": "own: the application's connected membership is used; didit: Didit's membership carries the application as its own active participant; off: platform routing disabled in disabled_networks with no own membership; unavailable: nothing can send on this network yet (see state and reason)." - }, - "state": { - "type": "string", - "enum": [ - "own_membership", - "live_through_didit", - "off", - "didit_onboarding", - "questionnaire_needed", - "questionnaire_in_review", - "request_access", - "request_sent", - "unavailable", - "error" - ], - "description": "own_membership: your connected membership sends; live_through_didit: your own participant on Didit's membership sends; off: you switched platform routing off; didit_onboarding: Didit's own membership of this network is not live yet, so it cannot carry anyone; questionnaire_needed / questionnaire_in_review: the due-diligence questionnaire must be submitted or is with Didit; request_access: the questionnaire is approved, request the network; request_sent: your participant is being onboarded; unavailable: see reason; error: see reason." - }, - "reason": { + "response": { + "type": "object", + "additionalProperties": {}, + "description": "Exactly what the wallet returned: {protocol, data} of the DigitalCredential from navigator.credentials.get, or the parsed credentialJson of Android's DigitalCredential. Encrypted to Didit; do not alter it." + } + }, + "required": [ + "response" + ] + }, + "SessionFilesExport": { + "type": "object", + "description": "One ZIP with every file of a session, in original quality.", + "required": [ + "export_id", + "session_id", + "status", + "file_count", + "size_bytes", + "download_url", + "expires_at", + "error", + "created_at", + "completed_at" + ], + "properties": { + "export_id": { "type": "string", - "enum": [ - "own_membership_connected", - "platform_network_switched_off", - "own_membership_only", - "sandbox_application", - "didit_membership_not_live", - "participant_suspended", - "participant_rejected", - "questionnaire_not_submitted", - "questionnaire_submitted", - "questionnaire_changes_requested", - "questionnaire_rejected", - "participant_not_requested", - "participant_active", - "participant_key_missing", - "participant_key_unresolved", - "provisioning_failed", - "questionnaire_pending", - "submitted_to_network" - ], - "description": "Machine-readable detail of state. own_membership_only: Didit does not carry applications on this network (TRUST), connect your own membership; sandbox_application: sandbox transfers never reach a network; provisioning_failed: the network refused the registration, the participant's last_error says why and requesting the network again retries." - }, - "platform_available": { - "type": "boolean", - "description": "Whether Didit's own membership of this network is configured; not a live health check." + "format": "uuid", + "description": "ID of the export. Pass it to `GET /v3/session/{sessionId}/files-export/{exportId}/`." }, - "connected": { - "type": "boolean", - "description": "Whether a connected customer membership exists. Credentials are validated locally; network validation occurs on a live exchange." + "session_id": { + "type": "string", + "format": "uuid", + "description": "The session the files are from." }, - "participant": { - "$ref": "#/components/schemas/TravelRuleNetworkParticipantSummary" + "status": { + "type": "string", + "enum": [ + "PENDING", + "PROCESSING", + "READY", + "FAILED", + "EXPIRED" + ], + "description": "`PENDING` and `PROCESSING` while the ZIP is prepared, `READY` once it can be downloaded, `FAILED` when it could not be prepared (request a new export), `EXPIRED` once the ZIP was deleted." }, - "vasps_reachable": { + "file_count": { "type": "integer", - "description": "Directory VASPs reachable on this network." + "nullable": true, + "description": "Files in the ZIP. Set only while `status` is `READY`." }, - "routed_30d": { + "size_bytes": { "type": "integer", - "description": "This application's transfers carried on this network in the last 30 days." - } - } - }, - "TravelRuleNetworkQuestionnaireAnswers": { - "type": "object", - "description": "Didit's network due-diligence questionnaire. Saves are partial: a save keeps every answer it does not name. Submitting requires every field except lei and data_protection_contact_email, and the three attestations true.", - "properties": { - "legal_name": { - "type": "string", - "maxLength": 255 + "format": "int64", + "nullable": true, + "description": "Size of the ZIP in bytes. Set only while `status` is `READY`." }, - "registration_number": { + "download_url": { "type": "string", - "maxLength": 255 + "format": "uri", + "nullable": true, + "description": "Signed URL of the ZIP, valid for a short time. Set only while `status` is `READY`; read the export again for a new one." }, - "incorporation_country": { + "expires_at": { "type": "string", - "minLength": 2, - "maxLength": 2, - "description": "ISO 3166-1 alpha-2 country code." + "format": "date-time", + "nullable": true, + "description": "When the ZIP is deleted, 24 hours after it was ready. Set only while `status` is `READY`." }, - "registered_address": { + "error": { "type": "string", - "maxLength": 1000 + "nullable": true, + "description": "Why the export failed, when `status` is `FAILED`." }, - "website": { + "created_at": { "type": "string", - "format": "uri", - "maxLength": 500 + "format": "date-time", + "description": "When the export was requested." }, - "lei": { + "completed_at": { "type": "string", - "maxLength": 20, - "description": "Optional. A valid ISO 17442 LEI when given." + "format": "date-time", + "nullable": true, + "description": "When the ZIP was ready or the export failed." + } + } + }, + "TransactionRuleSuggestionsCreatedEvent": { + "description": "A transaction rule suggestion run proposed new rule changes for your application. Sent when the rule-suggestion settings have webhook notifications on. There is no top-level `status`.", + "allOf": [ + { + "$ref": "#/components/schemas/WebhookEventEnvelope" }, - "licences": { - "type": "array", - "minItems": 1, - "items": { - "type": "object", - "required": [ - "regulator", - "jurisdiction", - "licence_type", - "licence_number" - ], - "properties": { - "regulator": { - "type": "string", - "maxLength": 255 - }, - "jurisdiction": { - "type": "string", - "minLength": 2, - "maxLength": 2, - "description": "ISO 3166-1 alpha-2 country code." - }, - "licence_type": { - "type": "string", - "maxLength": 255 - }, - "licence_number": { - "type": "string", - "maxLength": 255 + { + "type": "object", + "properties": { + "webhook_type": { + "type": "string", + "enum": [ + "transaction_rule_suggestions.created" + ], + "description": "Always `transaction_rule_suggestions.created`." + }, + "run_id": { + "type": "string", + "format": "uuid", + "description": "The suggestion run that produced the new suggestions." + }, + "open_count": { + "type": "integer", + "description": "Number of suggestions that are still open after this run, new ones included." + }, + "suggestions": { + "type": "array", + "description": "The suggestions this run created.", + "items": { + "type": "object", + "required": [ + "suggestion_id", + "kind", + "title", + "rule_id", + "expected_impact" + ], + "properties": { + "suggestion_id": { + "type": "string", + "format": "uuid" + }, + "kind": { + "type": "string", + "enum": [ + "ADD", + "TWEAK", + "DISABLE" + ], + "description": "`ADD` proposes a new rule, `TWEAK` changes an existing one, `DISABLE` turns one off." + }, + "title": { + "type": "string" + }, + "rule_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "The rule a `TWEAK` or `DISABLE` suggestion applies to; `null` for `ADD`." + }, + "expected_impact": { + "type": "object", + "additionalProperties": true, + "description": "What the change would do, as the suggestion shows it in the Console." + } + } } } }, - "description": "Every licence or registration the VASP holds." + "required": [ + "webhook_type", + "run_id", + "open_count", + "suggestions" + ] + } + ] + }, + "GeolocationCheck": { + "type": "object", + "description": "One Location verification result, the accepted attempt of one workflow node. Measurement, uncertainty and authenticity are separate keys, so a precise unattested fix reads differently from an imprecise attested one.", + "properties": { + "node_id": { + "type": "string", + "nullable": true, + "description": "Workflow node that produced this result, so a workflow with two Location verification steps stays readable." }, - "operating_jurisdictions": { - "type": "array", - "minItems": 1, - "maxItems": 250, - "items": { - "type": "string", - "minLength": 2, - "maxLength": 2, - "description": "ISO 3166-1 alpha-2 country code." - } + "status": { + "type": "string", + "enum": [ + "Not Finished", + "Approved", + "Declined", + "In Review", + "Resub Requested" + ], + "description": "Feature-level status of this Location verification step, resolved from its warnings. Independent of the session `status`." }, - "compliance_officer_name": { + "outcome": { "type": "string", - "maxLength": 255 + "nullable": true, + "description": "What happened on this attempt.", + "enum": [ + "verified", + "low_accuracy", + "accuracy_undetermined", + "stale", + "approximate", + "denied", + "restricted", + "unavailable", + "timeout", + "mock_detected", + "outside_geofence", + "in_blocked_area", + "anonymizer_detected", + "skipped", + "replay_rejected", + "unsupported_client", + null + ] }, - "compliance_officer_email": { + "permission": { "type": "string", - "format": "email" + "nullable": true, + "description": "What the operating system or browser granted. `not_requested` means the step uses the connection's IP location only, so the person is never asked for a permission.", + "enum": [ + "granted_precise", + "granted_approximate", + "denied", + "restricted", + "unavailable", + "timeout", + "dismissed", + "not_requested", + null + ] }, - "aml_ctf_policy_attested": { - "type": "boolean", - "description": "Must be true to submit." + "latitude": { + "type": "number", + "nullable": true, + "description": "WGS84 latitude of the fix. `null` when there is no fix.", + "format": "double" }, - "sanctions_screening_attested": { - "type": "boolean", - "description": "Must be true to submit." + "longitude": { + "type": "number", + "nullable": true, + "description": "WGS84 longitude of the fix. `null` when there is no fix.", + "format": "double" }, - "data_protection_attested": { - "type": "boolean", - "description": "Must be true to submit." + "accuracy_m": { + "type": "number", + "nullable": true, + "description": "Radius of uncertainty in metres, at the confidence level in `accuracy_confidence`.", + "format": "double" }, - "data_protection_contact_email": { + "accuracy_confidence": { "type": "string", - "format": "email", - "description": "Optional." + "nullable": true, + "description": "Confidence level the platform attaches to `accuracy_m`: `p95` (browsers), `p68` (Android) or `unspecified` (iOS).", + "enum": [ + "p95", + "p68", + "unspecified", + null + ] }, - "expected_monthly_transfers": { + "measured_at": { + "type": "string", + "nullable": true, + "description": "When the device took the fix, by its own clock.", + "format": "date-time" + }, + "age_seconds": { "type": "integer", - "minimum": 0 + "nullable": true, + "description": "Seconds between the device taking the fix and Didit receiving it." }, - "expected_monthly_volume_usd": { + "source": { "type": "string", - "format": "decimal", - "description": "Expected monthly volume in USD, up to 2 decimal places. Returned as a string." + "nullable": true, + "description": "Where the fix came from, when the platform says. `ip` means the position is the connection's IP location.", + "enum": [ + "gps", + "fused", + "network", + "wifi", + "cell", + "browser", + "unknown", + "ip", + null + ] }, - "assets": { - "type": "array", - "minItems": 1, - "maxItems": 200, - "items": { - "type": "string", - "maxLength": 32 - }, - "description": "Asset tickers, stored upper-case, sorted and de-duplicated." - } - } - }, - "TravelRuleNetworkQuestionnaire": { - "type": "object", - "properties": { - "status": { + "platform": { "type": "string", + "nullable": true, + "description": "The client that produced the fix.", "enum": [ - "draft", - "submitted", - "changes_requested", - "approved", - "rejected" - ], - "description": "Answers can be saved while draft or changes_requested; submitted, approved and rejected are Didit's to move." + "web", + "ios", + "android", + "react_native", + "flutter", + null + ] }, - "answers": { - "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaireAnswers" + "sdk_version": { + "type": "string", + "nullable": true, + "description": "Version of the SDK that produced the fix." }, - "submitted_at": { + "is_mock": { + "type": "boolean", + "nullable": true, + "description": "`true` when the device says the fix came from a mock location provider or simulation software. `null` when the platform does not report it (browsers cannot tell); `null` is not `false`." + }, + "produced_by_accessory": { + "type": "boolean", + "nullable": true, + "description": "iOS only: `true` when the fix came from an external accessory. `null` elsewhere." + }, + "integrity": { "type": "string", - "format": "date-time", - "nullable": true + "enum": [ + "attested", + "not_attested", + "failed", + "unsupported", + "not_determined" + ], + "description": "Whether device attestation backs the fix. `unsupported` is what browsers report, because the web has no attestation mechanism; it is not a failure." }, - "reviewed_at": { + "country_code": { "type": "string", - "format": "date-time", - "nullable": true + "nullable": true, + "description": "ISO 3166-1 alpha-2 country the fix is in." }, - "review_note": { + "region_code": { "type": "string", - "description": "Didit's note on its last decision, for example what to change." + "nullable": true, + "description": "ISO 3166-2 subdivision the fix is in." }, - "history": { - "type": "array", - "readOnly": true, - "description": "Every status change, oldest first.", - "items": { - "type": "object", - "properties": { - "at": { - "type": "string", - "format": "date-time" - }, - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "note": { - "type": "string", - "description": "Review note or the network's answer, when there is one." - } + "city": { + "type": "string", + "nullable": true, + "description": "Nearest populated place, a label for reviewers." + }, + "geofence": { + "type": "object", + "description": "Result of the country and area rules of the step.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the step applies any country or area rule." + }, + "result": { + "type": "string", + "nullable": true, + "description": "Where the position sits relative to the rules. `undetermined` means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside.", + "enum": [ + "inside", + "outside", + "undetermined", + null + ] } } }, - "updated_at": { - "type": "string", - "format": "date-time", - "nullable": true - } - } - }, - "TravelRuleNetworkParticipant": { - "type": "object", - "description": "This application's own participant on one network.", - "properties": { - "network": { - "type": "string", - "enum": [ - "gtr", - "trust", - "verifyvasp", - "sygna" - ] + "inside_geofence": { + "type": "boolean", + "nullable": true, + "description": "`true` when `geofence.result` is `inside`, `false` when `outside`, `null` otherwise." }, - "rail": { + "geofence_basis": { "type": "string", + "nullable": true, + "description": "Which position the area result was judged from: the `device` fix, or the connection's `ip` location.", "enum": [ - "GTR", - "TRUST", - "VERIFYVASP", - "SYGNA" + "device", + "ip", + null ] }, - "mode": { + "inside_areas": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ids of the configured allowed areas the position is inside." + }, + "blocked_areas": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ids of the configured blocked areas the position is in." + }, + "position_source": { "type": "string", + "nullable": true, + "description": "Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only.", "enum": [ - "platform", - "own" + "device_and_ip", + "device_only", + "ip_only", + null ] }, - "status": { - "type": "string", - "enum": [ - "not_requested", - "questionnaire_pending", - "submitted_to_network", - "active", - "suspended", - "rejected" - ], - "description": "not_requested: never requested, or the network refused the first request (see last_error); questionnaire_pending: waiting for the due-diligence questionnaire to be approved; submitted_to_network: handed to the network's onboarding; active: the network gave this application its own participant code; suspended / rejected: Didit suspended or rejected it." + "anonymizers": { + "type": "object", + "nullable": true, + "description": "What the connection and device look like, each `true`, `false` or `null` when the source cannot tell.", + "properties": { + "vpn": { + "type": "boolean", + "nullable": true + }, + "proxy": { + "type": "boolean", + "nullable": true + }, + "tor": { + "type": "boolean", + "nullable": true + }, + "spoofing": { + "type": "boolean", + "nullable": true + }, + "emulator": { + "type": "boolean", + "nullable": true + } + } }, - "participant_code": { - "type": "string" + "ip_distance_km": { + "type": "number", + "nullable": true, + "description": "Distance to the session's IP location after both uncertainty radii are subtracted; `0` when they overlap.", + "format": "double" }, - "requested_at": { - "type": "string", - "format": "date-time", - "nullable": true + "ip_distance_uncertainty_km": { + "type": "number", + "nullable": true, + "description": "Combined radius that was subtracted: the IP location's radius plus this fix's accuracy.", + "format": "double" }, - "submitted_at": { - "type": "string", - "format": "date-time", - "nullable": true + "ip_consistent": { + "type": "boolean", + "nullable": true, + "description": "Whether `ip_distance_km` is within the distance configured on the step. `null` when either side is unknown." }, - "activated_at": { - "type": "string", - "format": "date-time", - "nullable": true + "document_distance_km": { + "type": "number", + "nullable": true, + "description": "Distance to the geocoded address on the ID document or proof of address. `null` when no address is on file.", + "format": "double" }, - "suspended_at": { - "type": "string", - "format": "date-time", - "nullable": true + "travel_excused": { + "type": "boolean", + "nullable": true, + "description": "Whether the step's travel tolerance excused the distance from the address. `null` when tolerance is off." }, - "last_error": { - "type": "string", - "description": "The network's answer when it refused the registration; empty otherwise." + "consecutive_mismatches": { + "type": "integer", + "nullable": true, + "description": "On the final attempt: this check plus the same person's earlier mismatches in a row." }, - "history": { + "attempts": { + "type": "integer", + "description": "Number of this attempt within the node, starting at 1." + }, + "consent": { + "type": "object", + "nullable": true, + "description": "The consent the person gave before the system prompt, recorded with the wording version and language they saw.", + "properties": { + "accepted_at": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "string", + "nullable": true + }, + "locale": { + "type": "string", + "nullable": true + } + } + }, + "warnings": { "type": "array", - "readOnly": true, - "description": "Every status change, oldest first.", "items": { "type": "object", "properties": { - "at": { + "feature": { "type": "string", - "format": "date-time" + "enum": [ + "ID_VERIFICATION", + "NFC", + "LIVENESS", + "FACEMATCH", + "PROOF_OF_ADDRESS", + "PHONE", + "EMAIL", + "AML", + "LOCATION", + "DATABASE_VALIDATION", + "QUESTIONNAIRE", + "DOCUMENT_AI", + "KYB_REGISTRY", + "KYB_DOCUMENTS", + "KYB_KEY_PEOPLE", + "GEOLOCATION", + "SIGNATURE" + ], + "description": "The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. `PHONE` inside `phone_verifications[].warnings`), but the enum above is authoritative across all feature warnings on the decision payload." }, - "from": { + "risk": { "type": "string" }, - "to": { + "additional_data": { + "type": "object", + "nullable": true + }, + "log_type": { "type": "string" }, - "note": { + "short_description": { + "type": "string" + }, + "long_description": { + "type": "string" + }, + "node_id": { "type": "string", - "description": "Review note or the network's answer, when there is one." + "description": "The workflow graph node ID that generated this warning" } } - } - } - } - }, - "TravelRuleNetworksOverview": { - "type": "object", - "properties": { - "platform_networks_enabled": { - "type": "boolean", - "description": "Whether network access through Didit's membership is open. While false, questionnaire saves, submissions and network requests answer 403." - }, - "questionnaire": { - "$ref": "#/components/schemas/TravelRuleNetworkQuestionnaire" - }, - "participants": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TravelRuleNetworkParticipant" - } - }, - "networks": { - "type": "object", - "readOnly": true, - "description": "Per network, how this application would send and why it cannot. No network, including GTR, is included by default: a network is reachable through your own connected membership, or through Didit's membership once Didit's membership of that network is live and your own participant on it is active. Not a live health or delivery check.", - "properties": { - "gtr": { - "$ref": "#/components/schemas/TravelRuleNetworkState" - }, - "trust": { - "$ref": "#/components/schemas/TravelRuleNetworkState" - }, - "verifyvasp": { - "$ref": "#/components/schemas/TravelRuleNetworkState" - }, - "sygna": { - "$ref": "#/components/schemas/TravelRuleNetworkState" - } - } + }, + "description": "Warnings this Location verification step raised, with `feature` set to `GEOLOCATION`. Warning codes start with `LOCATION_`." } } }, - "AddressValidationResult": { + "GeolocationAttempt": { "type": "object", - "description": "The result of one Address Validation: whether the address exists, and its normalised form. It confirms the address only; it never links the address to a person.", - "required": [ - "status", - "verification_level", - "address", - "formatted_address", - "latitude", - "longitude" - ], + "description": "One attempt of a Location verification step: the same keys as `geolocation_checks[]` except `warnings`, plus when Didit received it.", "properties": { + "node_id": { + "type": "string", + "nullable": true, + "description": "Workflow node that produced this result, so a workflow with two Location verification steps stays readable." + }, "status": { "type": "string", "enum": [ - "verified", - "partially_verified", - "not_verified", - "unavailable" + "Not Finished", + "Approved", + "Declined", + "In Review", + "Resub Requested" ], - "description": "`verified`: the address was confirmed down to the building (or the flat or PO box). `partially_verified`: it was confirmed only to the street, or to the most precise level the postal reference data holds for that place. `not_verified`: only the region or the city matched, or nothing did. `unavailable`: the validation could not run (for example the reference service did not answer); it is not charged and never affects a verification." + "description": "Feature-level status of this Location verification step, resolved from its warnings. Independent of the session `status`." }, - "verification_level": { + "outcome": { "type": "string", "nullable": true, + "description": "What happened on this attempt.", "enum": [ - "administrative_area", - "locality", - "thoroughfare", - "premise", - "delivery_point", + "verified", + "low_accuracy", + "accuracy_undetermined", + "stale", + "approximate", + "denied", + "restricted", + "unavailable", + "timeout", + "mock_detected", + "outside_geofence", + "in_blocked_area", + "anonymizer_detected", + "skipped", + "replay_rejected", + "unsupported_client", null - ], - "description": "The most precise level the address was matched to. `null` when nothing matched or `status` is `unavailable`." - }, - "address": { - "type": "object", - "nullable": true, - "description": "The normalised address. `null` when `status` is `unavailable`.", - "properties": { - "address_line_1": { - "type": "string", - "nullable": true, - "description": "First delivery line, written the way the country writes it.", - "example": "1600 Amphitheatre Pkwy" - }, - "address_line_2": { - "type": "string", - "nullable": true, - "description": "Second delivery line (a flat, building or neighbourhood), when the address has one." - }, - "city": { - "type": "string", - "nullable": true, - "example": "Mountain View" - }, - "region": { - "type": "string", - "nullable": true, - "description": "State, province or region.", - "example": "CA" - }, - "postal_code": { - "type": "string", - "nullable": true, - "example": "94043-1351" - }, - "country": { - "type": "string", - "nullable": true, - "description": "ISO 3166-1 alpha-2 country code.", - "example": "US" - } - } + ] }, - "formatted_address": { + "permission": { "type": "string", "nullable": true, - "description": "The normalised address on one line.", - "example": "1600 Amphitheatre Pkwy, Mountain View CA 94043-1351" + "description": "What the operating system or browser granted. `not_requested` means the step uses the connection's IP location only, so the person is never asked for a permission.", + "enum": [ + "granted_precise", + "granted_approximate", + "denied", + "restricted", + "unavailable", + "timeout", + "dismissed", + "not_requested", + null + ] }, "latitude": { "type": "number", "nullable": true, - "example": 37.422022 + "description": "WGS84 latitude of the fix. `null` when there is no fix.", + "format": "double" }, "longitude": { "type": "number", "nullable": true, - "example": -122.08429 - } - } - }, - "AddressValidationRequest": { - "type": "object", - "required": [ - "country" - ], - "description": "One address: on one line (`address`) or as structured fields with at least `address_line_1`, never both.", - "properties": { - "address": { - "type": "string", - "maxLength": 500, - "description": "The whole address on one line.", - "example": "Paseo de la Castellana 259, 28046 Madrid" - }, - "address_line_1": { - "type": "string", - "maxLength": 255, - "description": "Street and number.", - "example": "1600 Amphitheatre Pkwy" - }, - "address_line_2": { - "type": "string", - "maxLength": 255, - "description": "Apartment, suite, floor or building." + "description": "WGS84 longitude of the fix. `null` when there is no fix.", + "format": "double" }, - "city": { - "type": "string", - "maxLength": 128, - "description": "City or locality.", - "example": "Mountain View" - }, - "region": { - "type": "string", - "maxLength": 128, - "description": "State, province or region.", - "example": "CA" - }, - "postal_code": { - "type": "string", - "maxLength": 32, - "example": "94043" + "accuracy_m": { + "type": "number", + "nullable": true, + "description": "Radius of uncertainty in metres, at the confidence level in `accuracy_confidence`.", + "format": "double" }, - "country": { - "type": "string", - "maxLength": 3, - "description": "ISO 3166-1 alpha-2 or alpha-3 code of the address's country.", - "example": "US" - } - } - }, - "AddressValidationResponse": { - "type": "object", - "required": [ - "request_id", - "address_validation", - "created_at" - ], - "properties": { - "request_id": { + "accuracy_confidence": { "type": "string", - "format": "uuid", - "description": "Identifier of this request; quote it to support. No session is created." - }, - "address_validation": { - "$ref": "#/components/schemas/AddressValidationResult" + "nullable": true, + "description": "Confidence level the platform attaches to `accuracy_m`: `p95` (browsers), `p68` (Android) or `unspecified` (iOS).", + "enum": [ + "p95", + "p68", + "unspecified", + null + ] }, - "created_at": { + "measured_at": { "type": "string", + "nullable": true, + "description": "When the device took the fix, by its own clock.", "format": "date-time" - } - } - }, - "TravelRuleWalletProofFailureReason": { - "type": "string", - "enum": [ - "", - "SIGNATURE_INVALID", - "SIGNATURE_UNSUPPORTED_SCHEME", - "DEPOSIT_NOT_FOUND", - "DEPOSIT_UNCONFIRMED", - "DEPOSIT_LOOKUP_FAILED", - "DEPOSIT_MISMATCH", - "DEPOSIT_STALE", - "TXID_REUSED", - "CHAIN_UNSUPPORTED", - "WINDOW_EXPIRED", - "OWNERSHIP_CHANGED", - "METHOD_SWITCHED", - "REVIEW_REJECTED", - "ABANDONED" - ], - "description": "Why a wallet-ownership proof, or its last attempt, fell short of VERIFIED. Empty when nothing failed. A PENDING proof can carry one: the last attempt failed and the end user can try again. DEPOSIT_MISMATCH, DEPOSIT_STALE, TXID_REUSED and REVIEW_REJECTED close the proof as REJECTED. SIGNATURE_INVALID: the signature does not match the wallet and challenge. SIGNATURE_UNSUPPORTED_SCHEME: the wallet signed in a format Didit does not verify. DEPOSIT_NOT_FOUND, DEPOSIT_UNCONFIRMED, DEPOSIT_LOOKUP_FAILED: the test deposit is not readable or not confirmed yet; Didit keeps checking it until the test window closes. DEPOSIT_MISMATCH: the transaction does not send the expected amount from the wallet to the deposit address. DEPOSIT_STALE: the transaction predates the challenge. TXID_REUSED: the transaction already proved another wallet. CHAIN_UNSUPPORTED: the method is not available on this chain. WINDOW_EXPIRED: the test window closed. OWNERSHIP_CHANGED: the wallet's holder changed, or the wallet was deleted from your address book, after the widget session was minted. METHOD_SWITCHED: the end user picked another method before finishing this one. REVIEW_REJECTED: your reviewer rejected the screenshot. ABANDONED: the widget session lapsed before the end user finished." - }, - "TravelRuleWidgetProofError": { - "type": "object", - "properties": { - "detail": { - "type": "string", - "description": "Human-readable message in English." }, - "code": { - "allOf": [ - { - "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason" - } - ], - "description": "Machine-readable reason, so a client can show its own translated message." + "age_seconds": { + "type": "integer", + "nullable": true, + "description": "Seconds between the device taking the fix and Didit receiving it." }, - "status": { + "source": { "type": "string", + "nullable": true, + "description": "Where the fix came from, when the platform says. `ip` means the position is the connection's IP location.", "enum": [ - "PENDING", - "VERIFIED", - "REJECTED", - "EXPIRED" - ], - "description": "Present when the proof is closed: REJECTED by the deposit just submitted (400), or REJECTED or EXPIRED when evidence is sent to a proof that is already closed (409)." + "gps", + "fused", + "network", + "wifi", + "cell", + "browser", + "unknown", + "ip", + null + ] }, - "proof_id": { + "platform": { "type": "string", - "format": "uuid", - "description": "Present with status: the closed proof." + "nullable": true, + "description": "The client that produced the fix.", + "enum": [ + "web", + "ios", + "android", + "react_native", + "flutter", + null + ] }, - "method": { + "sdk_version": { "type": "string", - "enum": [ - "MESSAGE_SIGNING", - "SATOSHI_TEST", - "SCREENSHOT", - "SELF_DECLARATION" - ], - "description": "Present with status: the closed proof's method." + "nullable": true, + "description": "Version of the SDK that produced the fix." }, - "max_attempts": { - "type": "integer", - "description": "Present with status: rejected wallet proofs this session allows." + "is_mock": { + "type": "boolean", + "nullable": true, + "description": "`true` when the device says the fix came from a mock location provider or simulation software. `null` when the platform does not report it (browsers cannot tell); `null` is not `false`." }, - "attempts_used": { - "type": "integer", - "description": "Present with status: rejected proofs so far." + "produced_by_accessory": { + "type": "boolean", + "nullable": true, + "description": "iOS only: `true` when the fix came from an external accessory. `null` elsewhere." }, - "attempts_remaining": { - "type": "integer", - "description": "Present with status: when 0, starting another proof answers 409 and you mint a new widget session." - } - } - }, - "TravelRuleWidgetProofCreate": { - "type": "object", - "required": [ - "method" - ], - "properties": { - "method": { + "integrity": { "type": "string", "enum": [ - "MESSAGE_SIGNING", - "SATOSHI_TEST", - "SCREENSHOT", - "SELF_DECLARATION" + "attested", + "not_attested", + "failed", + "unsupported", + "not_determined" ], - "description": "The proof method the end user picked. It must be one of the context's allowed_methods." + "description": "Whether device attestation backs the fix. `unsupported` is what browsers report, because the web has no attestation mechanism; it is not a failure." }, - "wallet_address": { + "country_code": { "type": "string", - "maxLength": 128, - "description": "Defaults to the session's wallet_address. Must match the transfer's wallet when the session is linked to a transfer." + "nullable": true, + "description": "ISO 3166-1 alpha-2 country the fix is in." }, - "chain": { - "type": "string", - "maxLength": 32, - "description": "Defaults to the session's chain." - } - } - }, - "TravelRuleWidgetProofVerifyResult": { - "type": "object", - "properties": { - "proof_id": { + "region_code": { "type": "string", - "format": "uuid" + "nullable": true, + "description": "ISO 3166-2 subdivision the fix is in." }, - "method": { + "city": { "type": "string", - "enum": [ - "MESSAGE_SIGNING", - "SATOSHI_TEST", - "SCREENSHOT", - "SELF_DECLARATION" - ] + "nullable": true, + "description": "Nearest populated place, a label for reviewers." }, - "status": { - "type": "string", - "enum": [ - "PENDING", - "VERIFIED", - "REJECTED", - "EXPIRED" - ] + "geofence": { + "type": "object", + "description": "Result of the country and area rules of the step.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether the step applies any country or area rule." + }, + "result": { + "type": "string", + "nullable": true, + "description": "Where the position sits relative to the rules. `undetermined` means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside.", + "enum": [ + "inside", + "outside", + "undetermined", + null + ] + } + } }, - "is_ownership_verified": { + "inside_geofence": { "type": "boolean", - "description": "Present when the proof is VERIFIED: the address book entry is now ownership-verified." - }, - "transfer_status": { - "type": "string", "nullable": true, - "description": "Present when the proof is VERIFIED: the linked transfer's status, null without one." - }, - "detail": { - "type": "string", - "description": "Present while the proof stays PENDING: a submitted screenshot awaiting review, or a test deposit that is not confirmed yet." - }, - "code": { - "allOf": [ - { - "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason" - } - ], - "description": "Present on a pending test deposit: why it is not confirmed yet." - } - } - }, - "TravelRuleWalletProofReview": { - "type": "object", - "properties": { - "proof_id": { - "type": "string", - "format": "uuid" + "description": "`true` when `geofence.result` is `inside`, `false` when `outside`, `null` otherwise." }, - "method": { + "geofence_basis": { "type": "string", + "nullable": true, + "description": "Which position the area result was judged from: the `device` fix, or the connection's `ip` location.", "enum": [ - "SCREENSHOT" + "device", + "ip", + null ] }, - "status": { + "inside_areas": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ids of the configured allowed areas the position is inside." + }, + "blocked_areas": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Ids of the configured blocked areas the position is in." + }, + "position_source": { "type": "string", + "nullable": true, + "description": "Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only.", "enum": [ - "PENDING", - "VERIFIED", - "REJECTED", - "EXPIRED" + "device_and_ip", + "device_only", + "ip_only", + null ] }, - "wallet_address": { - "type": "string" + "anonymizers": { + "type": "object", + "nullable": true, + "description": "What the connection and device look like, each `true`, `false` or `null` when the source cannot tell.", + "properties": { + "vpn": { + "type": "boolean", + "nullable": true + }, + "proxy": { + "type": "boolean", + "nullable": true + }, + "tor": { + "type": "boolean", + "nullable": true + }, + "spoofing": { + "type": "boolean", + "nullable": true + }, + "emulator": { + "type": "boolean", + "nullable": true + } + } }, - "chain": { - "type": "string", - "description": "Canonical chain identifier, e.g. ETH, BTC, SOL, TRX." + "ip_distance_km": { + "type": "number", + "nullable": true, + "description": "Distance to the session's IP location after both uncertainty radii are subtracted; `0` when they overlap.", + "format": "double" }, - "holder_name": { - "type": "string" + "ip_distance_uncertainty_km": { + "type": "number", + "nullable": true, + "description": "Combined radius that was subtracted: the IP location's radius plus this fix's accuracy.", + "format": "double" }, - "is_ownership_verified": { + "ip_consistent": { "type": "boolean", - "description": "Whether the address book entry is ownership-verified, by this proof or another one." - }, - "transaction_id": { - "type": "string", - "format": "uuid", "nullable": true, - "description": "The transaction whose Travel Rule transfer the widget session was minted for. Null for a session minted without a transaction_id." + "description": "Whether `ip_distance_km` is within the distance configured on the step. `null` when either side is unknown." }, - "file_name": { - "type": "string", - "nullable": true + "document_distance_km": { + "type": "number", + "nullable": true, + "description": "Distance to the geocoded address on the ID document or proof of address. `null` when no address is on file.", + "format": "double" }, - "content_type": { - "type": "string", - "nullable": true + "travel_excused": { + "type": "boolean", + "nullable": true, + "description": "Whether the step's travel tolerance excused the distance from the address. `null` when tolerance is off." }, - "screenshot_url": { - "type": "string", + "consecutive_mismatches": { + "type": "integer", "nullable": true, - "description": "Time-limited link to the uploaded screenshot. List the queue again for a fresh link." + "description": "On the final attempt: this check plus the same person's earlier mismatches in a row." }, "attempts": { "type": "integer", - "description": "How many files the end user uploaded for this proof." + "description": "Number of this attempt within the node, starting at 1." }, - "failure_reason": { - "allOf": [ - { - "$ref": "#/components/schemas/TravelRuleWalletProofFailureReason" + "consent": { + "type": "object", + "nullable": true, + "description": "The consent the person gave before the system prompt, recorded with the wording version and language they saw.", + "properties": { + "accepted_at": { + "type": "string", + "format": "date-time" + }, + "version": { + "type": "string", + "nullable": true + }, + "locale": { + "type": "string", + "nullable": true } - ], - "description": "REVIEW_REJECTED after a rejection, OWNERSHIP_CHANGED when the wallet changed holder or was deleted before a decision. Empty otherwise." + } }, - "method_chosen_at": { + "received_at": { "type": "string", - "format": "date-time", "nullable": true, - "description": "When the end user picked the screenshot method." - }, - "decided_at": { - "type": "string", - "format": "date-time", - "nullable": true - }, - "decided_by": { - "type": "string", - "description": "Who closed the proof: review: for a console reviewer, review for an API-key decision, widget or sweeper when Didit closed it automatically. Empty while PENDING." - }, - "review_note": { - "type": "string", - "description": "The note sent with the decision. Empty when none." + "description": "When Didit received the attempt.", + "format": "date-time" }, "created_at": { "type": "string", @@ -108859,23 +127257,54 @@ } } }, - "TravelRuleWalletProofDecision": { + "BiometricRetention": { "type": "object", + "description": "When the live biometric data of this session is deleted.", "required": [ - "decision" + "jurisdictions", + "deletes_at" ], "properties": { - "decision": { - "type": "string", - "enum": [ - "approve", - "reject" - ] + "jurisdictions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Codes of the US states whose biometric rules set a deletion limit for this person (`US` when the state is unknown). Empty when none applies." }, - "note": { + "deletes_at": { "type": "string", - "maxLength": 512, - "description": "Optional. Kept with the proof and returned as review_note." + "format": "date-time", + "nullable": true, + "description": "The date the live biometric data (face images and templates) of this session is deleted, from your application's retention setting and, where one applies, the legal limit for the person's jurisdiction. `null` when no date applies yet." + } + } + }, + "TravelRuleManualMatchRequest": { + "type": "object", + "required": [ + "transaction_id" + ], + "properties": { + "transaction_id": { + "type": "string", + "format": "uuid", + "description": "The `transaction_id` of the received Travel Rule message (a row with `kind: message`)." + } + } + }, + "TravelRuleManualMatchResponse": { + "type": "object", + "required": [ + "deposit", + "message" + ], + "properties": { + "deposit": { + "$ref": "#/components/schemas/TravelRuleTransferRow" + }, + "message": { + "$ref": "#/components/schemas/TravelRuleTransferRow" } } } @@ -108885,7 +127314,7 @@ "type": "apiKey", "in": "header", "name": "x-api-key", - "description": "Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys." + "description": "Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys." }, "TransactionTokenAuth": { "type": "apiKey", @@ -109601,6 +128030,44 @@ } } } + }, + "transaction_rule_suggestions.created": { + "post": { + "summary": "Transaction rule suggestions created", + "description": "A transaction rule suggestion run proposed new rule changes for your application. Sent when the rule-suggestion settings have webhook notifications on. There is no top-level `status`.", + "tags": [ + "Webhook" + ], + "parameters": [ + { + "$ref": "#/components/parameters/WebhookSignature" + }, + { + "$ref": "#/components/parameters/WebhookSignatureV2" + }, + { + "$ref": "#/components/parameters/WebhookSignatureSimple" + }, + { + "$ref": "#/components/parameters/WebhookTimestamp" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TransactionRuleSuggestionsCreatedEvent" + } + } + } + }, + "responses": { + "2XX": { + "description": "Any 2xx response acknowledges the delivery. Other responses and timeouts are retried; see https://docs.didit.me/integration/webhooks." + } + } + } } } } diff --git a/src/main/java/me/didit/resources/AnalyticsResource.java b/src/main/java/me/didit/resources/AnalyticsResource.java index 9fefb7d..e1c2665 100644 --- a/src/main/java/me/didit/resources/AnalyticsResource.java +++ b/src/main/java/me/didit/resources/AnalyticsResource.java @@ -11,6 +11,8 @@ import me.didit.core.Responses; import me.didit.types.AnalyticsRetrieveParams; import me.didit.types.AnalyticsRetrieveResponse; +import me.didit.types.AnalyticsRetrieveTodayParams; +import me.didit.types.ApplicationAnalyticsToday; /** The {@code analytics} resource: {@code client.analytics()}. */ public final class AnalyticsResource { @@ -120,6 +122,93 @@ public CompletableFuture retrieveAsync() { return client.executeAsync(retrieveRequest(AnalyticsRetrieveParams.builder().build()), RequestOptions.none(), RETRIEVE_RESPONSE).thenApply(RawResponse::data); } + /** + * Get today's verifications by hour + * + *

Today's user verification (KYC) sessions, from local midnight in tz, counted per local hour they were created in, next to the same hours of the same weekday one week before, and split by the outcome each one holds now: approved, in review or declined. This is the volume card of the Business Console's Home. + * + *

total is today so far. previous_total_so_far counts the comparison day only up to the same local time, so a change between them compares the same part of both days. The hours still to come today are 0. A day on which the clocks change has 23 or 25 hours: the missing hour stays 0 and the repeated hour holds both. + * + *

{@code GET /v3/organization/{organization_id}/application/{application_id}/analytics/today/} + *

Application scoped: the organization and application ids come from the client options. + * + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public ApplicationAnalyticsToday retrieveToday(AnalyticsRetrieveTodayParams params, RequestOptions options) { + return client.execute(retrieveTodayRequest(params), options, RETRIEVE_TODAY_RESPONSE).data(); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture retrieveTodayAsync(AnalyticsRetrieveTodayParams params, RequestOptions options) { + return client.executeAsync(retrieveTodayRequest(params), options, RETRIEVE_TODAY_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public ApplicationAnalyticsToday retrieveToday(AnalyticsRetrieveTodayParams params) { + return client.execute(retrieveTodayRequest(params), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE).data(); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture retrieveTodayAsync(AnalyticsRetrieveTodayParams params) { + return client.executeAsync(retrieveTodayRequest(params), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}, without parameters. + * + * @param options per-request options + * @return the result + */ + public ApplicationAnalyticsToday retrieveToday(RequestOptions options) { + return client.execute(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), options, RETRIEVE_TODAY_RESPONSE).data(); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}, without parameters. + * + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture retrieveTodayAsync(RequestOptions options) { + return client.executeAsync(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), options, RETRIEVE_TODAY_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}, without parameters, with the client's options. + * + * @return the result + */ + public ApplicationAnalyticsToday retrieveToday() { + return client.execute(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE).data(); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)}, without parameters, with the client's options. + * + * @return a future completed with the result + */ + public CompletableFuture retrieveTodayAsync() { + return client.executeAsync(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE).thenApply(RawResponse::data); + } + private static final ResponseHandler RETRIEVE_RESPONSE = Responses.json(Conv.union(AnalyticsRetrieveResponse::fromJson)); private static ApiRequest retrieveRequest(AnalyticsRetrieveParams params) { @@ -130,6 +219,16 @@ private static ApiRequest retrieveRequest(AnalyticsRetrieveParams params) { .build(); } + private static final ResponseHandler RETRIEVE_TODAY_RESPONSE = Responses.json(Conv.model(ApplicationAnalyticsToday::fromJson)); + + private static ApiRequest retrieveTodayRequest(AnalyticsRetrieveTodayParams params) { + return ApiRequest.builder("GET", "/v3/organization/{organization_id}/application/{application_id}/analytics/today/") + .applicationScoped() + .params(params) + .queryFields("tz") + .build(); + } + /** The {@code analytics} operations returning {@link RawResponse}. */ public static final class WithRawResponse { private final ApiClient client; @@ -217,5 +316,85 @@ public RawResponse retrieve() { public CompletableFuture> retrieveAsync() { return client.executeAsync(retrieveRequest(AnalyticsRetrieveParams.builder().build()), RequestOptions.none(), RETRIEVE_RESPONSE); } + + /** + * {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse retrieveToday(AnalyticsRetrieveTodayParams params, RequestOptions options) { + return client.execute(retrieveTodayRequest(params), options, RETRIEVE_TODAY_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> retrieveTodayAsync(AnalyticsRetrieveTodayParams params, RequestOptions options) { + return client.executeAsync(retrieveTodayRequest(params), options, RETRIEVE_TODAY_RESPONSE); + } + + /** + * {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse retrieveToday(AnalyticsRetrieveTodayParams params) { + return client.execute(retrieveTodayRequest(params), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> retrieveTodayAsync(AnalyticsRetrieveTodayParams params) { + return client.executeAsync(retrieveTodayRequest(params), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE); + } + + /** + * {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return the result + */ + public RawResponse retrieveToday(RequestOptions options) { + return client.execute(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), options, RETRIEVE_TODAY_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> retrieveTodayAsync(RequestOptions options) { + return client.executeAsync(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), options, RETRIEVE_TODAY_RESPONSE); + } + + /** + * {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return the result + */ + public RawResponse retrieveToday() { + return client.execute(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveToday(AnalyticsRetrieveTodayParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return a future completed with the result + */ + public CompletableFuture> retrieveTodayAsync() { + return client.executeAsync(retrieveTodayRequest(AnalyticsRetrieveTodayParams.builder().build()), RequestOptions.none(), RETRIEVE_TODAY_RESPONSE); + } } } diff --git a/src/main/java/me/didit/resources/BankResource.java b/src/main/java/me/didit/resources/BankResource.java index bfc66fd..1f273e8 100644 --- a/src/main/java/me/didit/resources/BankResource.java +++ b/src/main/java/me/didit/resources/BankResource.java @@ -34,6 +34,8 @@ public WithRawResponse withRawResponse() { /** * Check a bank account * + *

Not available in production yet. Bank Verification is switched off in production, so until it is switched on this endpoint answers 404 with bank_verification_not_available. Do not build on it yet. The rest of this description is what the endpoint does once it is available. + * *

Check that a bank account belongs to the person or company you name, before you send money to it. No session and no sign-in: send the name and the account, read the result. It is the [account check](/core-technology/bank-verification/account-check) of the Bank Verification step, run from your backend. * *

What you send. The account's country (ISO 3166-1 alpha-3), the account the way that country writes it, and the holder name: full_name for a person or business_name for a company. A business name checks a business account. @@ -44,7 +46,7 @@ public WithRawResponse withRawResponse() { * *

Every request is a new check. There is no idempotency key and no endpoint to read a check back, so a retried request runs, and is billed, again. Store the response. * - *

Sandbox. A sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: 0001 a close_match with a holder_name, 0002 a close_match without one, 0003 and 0006 a no_match, 0004 cannot_verify, 0005 a 503 and 0009 a 400. Any other ending is a match. + *

Sandbox. Where Bank Verification is available, a sandbox key calls no bank and is charged nothing. The last 4 characters of the IBAN, else of the account number, choose the answer: 0001 a close_match with a holder_name, 0002 a close_match without one, 0003 and 0006 a no_match, 0004 cannot_verify, 0005 a 503 and 0009 a 400. Any other ending is a match. * *

API keys. A scoped API key needs write access to sessions. * diff --git a/src/main/java/me/didit/resources/IdVerificationResource.java b/src/main/java/me/didit/resources/IdVerificationResource.java index 9610325..69a6d12 100644 --- a/src/main/java/me/didit/resources/IdVerificationResource.java +++ b/src/main/java/me/didit/resources/IdVerificationResource.java @@ -38,7 +38,7 @@ public WithRawResponse withRawResponse() { * *

How it works. Send the document's front_image (required) and, for two-sided documents, the back_image. Upload uncropped photos with all four corners of the document visible — the service detects, aligns, and crops the document itself, so do not pre-crop. The document is classified automatically (you never declare the country or document type), the visual zone is read with OCR, and the MRZ and any barcodes are decoded. Cross-checks then validate dates, number formats, and MRZ check digits, and compare the visual zone against the MRZ. With perform_document_liveness=true, the images are additionally screened for screen replays, printed copies, and portrait manipulation. * - *

Decision logic. status is Approved unless at least one warning resolves to a decline. Fraud and hard-failure risks always decline: DOCUMENT_EXPIRED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, plus extraction failures (NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED, DOCUMENT_NUMBER_NOT_DETECTED). (PORTRAIT_IMAGE_NOT_DETECTED, COULD_NOT_DETECT_DOCUMENT_TYPE, INVALID_DATE, and MRZ_NOT_DETECTED exist in workflow sessions but are never produced by this standalone endpoint.) Three risk groups are configurable per request via invalid_mrz_action, inconsistent_data_action, and expiration_date_not_detected_action (DECLINE or NO_ACTION). All other warnings (e.g. POSSIBLE_DUPLICATED_USER) are informational and never decline on their own. When perform_document_liveness=true (the default) and the forgery check returns no usable score — the provider failed, answered non-200, or answered HTTP 200 with status="ERR" - the call returns 200 with status: "In Review" and a DOCUMENT_LIVENESS_NOT_COMPUTED warning (log_type: "warning") instead of Approved: a check that did not run is not evidence that the document is genuine. This escalation is not configurable and never overrides a Declined; with perform_document_liveness=false the check is skipped and the status follows the remaining warnings as before. A document that cannot be processed at all returns 400 with {"error": "COULD_NOT_RECOGNIZE_DOCUMENT"}; a readable but problematic document returns 200 with status: "Declined" — always inspect id_verification.status and id_verification.warnings, not just the HTTP code. + *

Decision logic. status is Approved unless at least one warning resolves to a decline. Fraud and hard-failure risks always decline: DOCUMENT_EXPIRED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, plus extraction failures (NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED, DOCUMENT_NUMBER_NOT_DETECTED). (PORTRAIT_IMAGE_NOT_DETECTED, INVALID_DATE, and MRZ_NOT_DETECTED exist in workflow sessions but are never produced by this standalone endpoint. COULD_NOT_DETECT_DOCUMENT_TYPE is returned here when the front image does not match a known official document design with high confidence, and declines the request.) Three risk groups are configurable per request via invalid_mrz_action, inconsistent_data_action, and expiration_date_not_detected_action (DECLINE or NO_ACTION). All other warnings (e.g. POSSIBLE_DUPLICATED_USER) are informational and never decline on their own. When perform_document_liveness=true (the default) and the forgery check returns no usable score — the provider failed, answered non-200, or answered HTTP 200 with status="ERR" - the call returns 200 with status: "In Review" and a DOCUMENT_LIVENESS_NOT_COMPUTED warning (log_type: "warning") instead of Approved: a check that did not run is not evidence that the document is genuine. This escalation is not configurable and never overrides a Declined; with perform_document_liveness=false the check is skipped and the status follows the remaining warnings as before. A document that cannot be processed at all returns 400 with {"error": "COULD_NOT_RECOGNIZE_DOCUMENT"}; a readable but problematic document returns 200 with status: "Declined" — always inspect id_verification.status and id_verification.warnings, not just the HTTP code. * *

Billing. Each 200 response consumes one ID Verification API credit (paid from your plan credit or top-up balance). When the organization's balance cannot cover the call, the endpoint returns 403 with the not-enough-credits error before any image processing. * diff --git a/src/main/java/me/didit/resources/IdWalletsResource.java b/src/main/java/me/didit/resources/IdWalletsResource.java index fa8fac2..beb7045 100644 --- a/src/main/java/me/didit/resources/IdWalletsResource.java +++ b/src/main/java/me/didit/resources/IdWalletsResource.java @@ -21,6 +21,7 @@ import me.didit.types.DigitalIdWalletApiFranceconnectWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiFrejaidWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartRequest; +import me.didit.types.DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiGovukWalletWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiIdcardEeWalletVerificationStartRequest; @@ -35,6 +36,7 @@ import me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiVippsWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiWalletCatalogResponse; +import me.didit.types.DigitalIdWalletApiWalletDigitalCredentialResponseRequest; import me.didit.types.DigitalIdWalletApiWalletVerificationResponse; /** The {@code id_wallets} resource: {@code client.idWallets()}. */ @@ -1411,6 +1413,103 @@ public CompletableFuture startEudi return client.executeAsync(startEudiRequest(params), RequestOptions.none(), START_EUDI_RESPONSE).thenApply(RawResponse::data); } + /** + * Submit a wallet response + * + *

Digital Credentials API wallets (Google Wallet): send what the wallet returned to your page or app for a verification whose next_action is request_digital_credential. Didit decrypts it, checks the issuer's signature against the trusted issuer roots, every returned value against its signed digest, and the device signature over your origin and this request, then decides the verification: verified (billed once) or declined with the error code. Single use: a second submit returns the decided verification. + * + *

{@code POST /v3/id-verification/wallets/verifications/{request_id}/response/} + * + * @param requestId The request_id the start endpoint returned. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public DigitalIdWalletApiWalletVerificationResponse submitVerificationResponse(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params, RequestOptions options) { + return client.execute(submitVerificationResponseRequest(requestId, params), options, SUBMIT_VERIFICATION_RESPONSE_RESPONSE).data(); + } + + /** + * Asynchronous {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)}. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture submitVerificationResponseAsync(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params, RequestOptions options) { + return client.executeAsync(submitVerificationResponseRequest(requestId, params), options, SUBMIT_VERIFICATION_RESPONSE_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)}, with the client's options. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @return the result + */ + public DigitalIdWalletApiWalletVerificationResponse submitVerificationResponse(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params) { + return client.execute(submitVerificationResponseRequest(requestId, params), RequestOptions.none(), SUBMIT_VERIFICATION_RESPONSE_RESPONSE).data(); + } + + /** + * Asynchronous {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)}, with the client's options. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture submitVerificationResponseAsync(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params) { + return client.executeAsync(submitVerificationResponseRequest(requestId, params), RequestOptions.none(), SUBMIT_VERIFICATION_RESPONSE_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Start Google Wallet verification + * + *

Start a Google Wallet sign-in (Google Wallet (ID pass) and US state issuers (mobile driving licence); USA, GBR, BRA, SGP, TWN) without any workflow. Billed once, only when the identity is verified. The response carries next_action.type=request_digital_credential with a request Didit signed for your application, usable only from origin. In a user gesture there, pass next_action.digital_credentials.request to navigator.credentials.get({digital: ...}) (or to Android Credential Manager as GetDigitalCredentialOption requestJson), then POST what the wallet returns to /v3/id-verification/wallets/verifications/{request_id}/response/. The browser offers its own QR code when the wallet is on another device. Sandbox applications get a deterministic simulation (simulated: true) that never contacts the provider. + * + *

{@code POST /v3/id-verification/wallets/google-wallet/} + *

Accepts an {@code Idempotency-Key}: set it with {@link RequestOptions.Builder#idempotencyKey(String)}. + * + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public DigitalIdWalletApiWalletVerificationResponse startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params, RequestOptions options) { + return client.execute(startGoogleWalletRequest(params), options, START_GOOGLE_WALLET_RESPONSE).data(); + } + + /** + * Asynchronous {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)}. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture startGoogleWalletAsync(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params, RequestOptions options) { + return client.executeAsync(startGoogleWalletRequest(params), options, START_GOOGLE_WALLET_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)}, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public DigitalIdWalletApiWalletVerificationResponse startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params) { + return client.execute(startGoogleWalletRequest(params), RequestOptions.none(), START_GOOGLE_WALLET_RESPONSE).data(); + } + + /** + * Asynchronous {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)}, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture startGoogleWalletAsync(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params) { + return client.executeAsync(startGoogleWalletRequest(params), RequestOptions.none(), START_GOOGLE_WALLET_RESPONSE).thenApply(RawResponse::data); + } + private static final ResponseHandler LIST_RESPONSE = Responses.json(Conv.model(DigitalIdWalletApiWalletCatalogResponse::fromJson)); private static ApiRequest listRequest() { @@ -1667,6 +1766,25 @@ private static ApiRequest startEudiRequest(DigitalIdWalletApiEudiWalletVerificat .build(); } + private static final ResponseHandler SUBMIT_VERIFICATION_RESPONSE_RESPONSE = Responses.json(Conv.model(DigitalIdWalletApiWalletVerificationResponse::fromJson)); + + private static ApiRequest submitVerificationResponseRequest(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params) { + return ApiRequest.builder("POST", "/v3/id-verification/wallets/verifications/{request_id}/response/") + .pathParam("request_id", requestId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler START_GOOGLE_WALLET_RESPONSE = Responses.json(Conv.model(DigitalIdWalletApiWalletVerificationResponse::fromJson)); + + private static ApiRequest startGoogleWalletRequest(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params) { + return ApiRequest.builder("POST", "/v3/id-verification/wallets/google-wallet/") + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + /** The {@code id_wallets} operations returning {@link RawResponse}. */ public static final class WithRawResponse { private final ApiClient client; @@ -2888,5 +3006,93 @@ public RawResponse startEudi(Digit public CompletableFuture> startEudiAsync(DigitalIdWalletApiEudiWalletVerificationStartRequest params) { return client.executeAsync(startEudiRequest(params), RequestOptions.none(), START_EUDI_RESPONSE); } + + /** + * {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)} with the raw response. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse submitVerificationResponse(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params, RequestOptions options) { + return client.execute(submitVerificationResponseRequest(requestId, params), options, SUBMIT_VERIFICATION_RESPONSE_RESPONSE); + } + + /** + * Asynchronous {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)} with the raw response. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> submitVerificationResponseAsync(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params, RequestOptions options) { + return client.executeAsync(submitVerificationResponseRequest(requestId, params), options, SUBMIT_VERIFICATION_RESPONSE_RESPONSE); + } + + /** + * {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)} with the raw response, with the client's options. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @return the result + */ + public RawResponse submitVerificationResponse(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params) { + return client.execute(submitVerificationResponseRequest(requestId, params), RequestOptions.none(), SUBMIT_VERIFICATION_RESPONSE_RESPONSE); + } + + /** + * Asynchronous {@link #submitVerificationResponse(String, DigitalIdWalletApiWalletDigitalCredentialResponseRequest, RequestOptions)} with the raw response, with the client's options. + * + * @param requestId the {@code request_id} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> submitVerificationResponseAsync(String requestId, DigitalIdWalletApiWalletDigitalCredentialResponseRequest params) { + return client.executeAsync(submitVerificationResponseRequest(requestId, params), RequestOptions.none(), SUBMIT_VERIFICATION_RESPONSE_RESPONSE); + } + + /** + * {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params, RequestOptions options) { + return client.execute(startGoogleWalletRequest(params), options, START_GOOGLE_WALLET_RESPONSE); + } + + /** + * Asynchronous {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> startGoogleWalletAsync(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params, RequestOptions options) { + return client.executeAsync(startGoogleWalletRequest(params), options, START_GOOGLE_WALLET_RESPONSE); + } + + /** + * {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params) { + return client.execute(startGoogleWalletRequest(params), RequestOptions.none(), START_GOOGLE_WALLET_RESPONSE); + } + + /** + * Asynchronous {@link #startGoogleWallet(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> startGoogleWalletAsync(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params) { + return client.executeAsync(startGoogleWalletRequest(params), RequestOptions.none(), START_GOOGLE_WALLET_RESPONSE); + } } } diff --git a/src/main/java/me/didit/resources/KybResource.java b/src/main/java/me/didit/resources/KybResource.java index f51bcb2..aeeb3f5 100644 --- a/src/main/java/me/didit/resources/KybResource.java +++ b/src/main/java/me/didit/resources/KybResource.java @@ -154,7 +154,7 @@ public CompletableFuture selectAsync(KYBRegistryCandidateRequ * *

Retrieve the Lite profile plus the direct shareholders (natural persons and corporate entities, with their ownership bands) of one candidate returned by POST /v3/kyb/search/. * - *

Pairing with search. Pass the candidate's kyb_response_id exactly as returned by a search of the same application. The search runs on the Lite registry chain; when the country's ownership data lives at another registry Didit re-finds the company there by registration number, at no extra cost. + *

Pairing with search. Pass the candidate's kyb_response_id exactly as returned by a search of the same application. Search at the tier you intend to buy (tier on POST /v3/kyb/search/), because the search runs on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not hold the company. When the country's ownership data lives at another registry, Didit re-finds the company there by registration number, at no extra cost. * *

Billing. Billed at the country's Shareholders price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). When the registry holds no shareholder record for the company (or the country offers no ownership data at all) the Lite profile is delivered and billed instead: read registry_tier_delivered and registry_ownership_status. The balance is checked against the Shareholders price before any registry call (403 when short). * @@ -208,7 +208,7 @@ public CompletableFuture listShareholdersAsync(KYBR * *

Retrieve the Lite profile, the direct shareholders and the ultimate beneficial owners resolved through the ownership chain (registry_data.ubo_resolution carries the corporate parent chain) of one candidate returned by POST /v3/kyb/search/. * - *

Pairing with search. Pass the candidate's kyb_response_id exactly as returned by a search of the same application. The search runs on the Lite registry chain; when the country's ownership data lives at another registry Didit re-finds the company there by registration number, at no extra cost. + *

Pairing with search. Pass the candidate's kyb_response_id exactly as returned by a search of the same application. Search at the tier you intend to buy (tier on POST /v3/kyb/search/), because the search runs on the registry chain that serves that tier and an empty Lite search is not proof that the registry does not hold the company. When the country's ownership data lives at another registry, Didit re-finds the company there by registration number, at no extra cost. * *

Billing. Billed at the country's UBO price - see [KYB registry pricing](/getting-started/kyb-registry-pricing). The tier delivered is the highest the country and the registry can serve: Shareholders when the resolved report names no natural person as a beneficial owner, Lite when there is no ownership record at all; registry_tier_delivered names what was billed. The balance is checked against the UBO price before any registry call (403 when short). * diff --git a/src/main/java/me/didit/resources/PricingResource.java b/src/main/java/me/didit/resources/PricingResource.java index ba326f8..9ced4ba 100644 --- a/src/main/java/me/didit/resources/PricingResource.java +++ b/src/main/java/me/didit/resources/PricingResource.java @@ -33,7 +33,7 @@ public WithRawResponse withRawResponse() { /** * Get bank verification prices (public, unauthenticated) * - *

Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product. + *

Returns the list price of each Bank Verification method in every country: bank sign-in with its balance and transactions add-ons, and the account check. Bank Verification is not enabled in production yet, so a bank step is refused on production workflows until it is; treat these prices as a list price, not as an offer you can buy today. Use it to quote a bank step before you build a workflow, or to show bank prices in your own product. * *

Public: send no auth header. The response contains no organization data and is the same for every caller. It is cached publicly for one hour and carries an ETag, so send If-None-Match to get a 304 Not Modified when nothing changed. * diff --git a/src/main/java/me/didit/resources/SessionsResource.java b/src/main/java/me/didit/resources/SessionsResource.java index 761f7f4..46df441 100644 --- a/src/main/java/me/didit/resources/SessionsResource.java +++ b/src/main/java/me/didit/resources/SessionsResource.java @@ -20,14 +20,18 @@ import me.didit.types.SessionDecision; import me.didit.types.SessionDeletionJob; import me.didit.types.SessionEvent; +import me.didit.types.SessionFilesExport; import me.didit.types.SessionsAddImagesParams; import me.didit.types.SessionsAddImagesResponse; import me.didit.types.SessionsBatchDeleteParams; import me.didit.types.SessionsBatchDeleteResponse; import me.didit.types.SessionsBulkUpdateAmlHitStatusParams; import me.didit.types.SessionsBulkUpdateAmlHitStatusResponse; +import me.didit.types.SessionsCreateKybPartyDraftParams; +import me.didit.types.SessionsCreateKybPartyDraftResponse; import me.didit.types.SessionsCreateParams; import me.didit.types.SessionsCreateResponse; +import me.didit.types.SessionsDeleteKybPartyDraftParams; import me.didit.types.SessionsDeleteParams; import me.didit.types.SessionsDeleteResponse; import me.didit.types.SessionsExportAmlScreeningHistoryParams; @@ -35,6 +39,10 @@ import me.didit.types.SessionsListAmlScreeningHistoryParams; import me.didit.types.SessionsListEventsParams; import me.didit.types.SessionsListFeatureOverridesResponse; +import me.didit.types.SessionsListKybExtractedPartiesParams; +import me.didit.types.SessionsListKybExtractedPartiesResponse; +import me.didit.types.SessionsListKybPartyDraftsParams; +import me.didit.types.SessionsListKybPartyDraftsResponse; import me.didit.types.SessionsListParams; import me.didit.types.SessionsListResponse; import me.didit.types.SessionsPreviewDecisionEmailParams; @@ -44,6 +52,8 @@ import me.didit.types.SessionsRetrieveDecisionParams; import me.didit.types.SessionsShareParams; import me.didit.types.SessionsShareResponse; +import me.didit.types.SessionsSubmitKybPartiesParams; +import me.didit.types.SessionsSubmitKybPartiesResponse; import me.didit.types.SessionsUpdateAmlHitStatusParams; import me.didit.types.SessionsUpdateAmlHitStatusResponse; import me.didit.types.SessionsUpdateAmlStatusParams; @@ -56,12 +66,17 @@ import me.didit.types.SessionsUpdateFeatureStatusResponse; import me.didit.types.SessionsUpdateKybCompanyDataParams; import me.didit.types.SessionsUpdateKybCompanyDataResponse; +import me.didit.types.SessionsUpdateKybPartyDraftParams; +import me.didit.types.SessionsUpdateKybPartyDraftResponse; import me.didit.types.SessionsUpdateKybPartyParams; import me.didit.types.SessionsUpdateKybPartyResponse; import me.didit.types.SessionsUpdatePoaDataParams; import me.didit.types.SessionsUpdatePoaDataResponse; import me.didit.types.SessionsUpdateStatusParams; import me.didit.types.SessionsUpdateStatusResponse; +import me.didit.types.SessionsUploadKybDocumentsParams; +import me.didit.types.SessionsUploadKybDocumentsResponse; +import org.jspecify.annotations.Nullable; /** The {@code sessions} resource: {@code client.sessions()}. */ public final class SessionsResource { @@ -183,7 +198,7 @@ public CompletableFuture createAsync(SessionsCreateParam * *

Retrieve the complete decision report for a verification session — the rolled-up session status plus one report per verification feature the workflow executed. This is the canonical read endpoint for both User Verification (KYC) and Business Verification (KYB) sessions: the same path serves both, and the top-level session_kind discriminator tells you which shape you received ("user" or "business"). * - *

Every feature report is a plural array. V3 workflows are graphs that can run the same feature more than once, so each block (id_verifications, nfc_verifications, liveness_checks, face_matches, poa_verifications, document_ai_documents, phone_verifications, email_verifications, aml_screenings, ip_analyses, database_validations, questionnaire_responses) is a JSON array whose items each carry a node_id identifying the workflow graph node that produced them. Read NFC as response.nfc_verifications[0] — never as a singular nfc field. A block is null until the workflow has run that feature at least once; features the workflow does not include never appear with data. Electronic Signature results are in signatures, which is present only when the workflow has an Electronic Signature step. + *

Every feature report is a plural array. V3 workflows are graphs that can run the same feature more than once, so each block (id_verifications, nfc_verifications, liveness_checks, face_matches, poa_verifications, document_ai_documents, phone_verifications, email_verifications, aml_screenings, ip_analyses, database_validations, questionnaire_responses) is a JSON array whose items each carry a node_id identifying the workflow graph node that produced them. Read NFC as response.nfc_verifications[0] — never as a singular nfc field. A block is null until the workflow has run that feature at least once; features the workflow does not include never appear with data. E-signature results are in signatures, which is present only when the workflow has an E-signature step. * *

When to call. The recommended pattern is event-driven: wait for the status.updated webhook that fires when the session reaches a decision (Approved, Declined, In Review), then call this endpoint once to fetch the full report. Polling also works — the endpoint can be called at any point in the session lifecycle and returns the data produced so far — but webhook-then-fetch is cheaper and faster. Media URLs in the response (document images, videos, PDFs) are short-lived presigned links: fetch them promptly or re-request the decision to get fresh ones, and do not persist them as long-term references. * @@ -287,7 +302,7 @@ public CompletableFuture retrieveDecisionAsync(String sessionId * *

What is deleted: * - The session and every verification attempt it holds, including results that a resubmission replaced: the decision, extracted data, all related feature records (ID verification, face, liveness, face match, AML, registry checks, IP analysis, and so on), its reviews and its activity log. - * - All stored files owned by the session: document front/back photos (full, cropped, and privacy-blurred variants), document-capture videos, portrait crops, NFC chip portrait and signature images, face reference images, liveness videos, face-match source/target images, Proof of Address documents, and any extra uploaded files (KYC); uploaded company documents and extra files (KYB). Electronic Signature documents, signed PDFs, evidence PDFs and signature images (KYC and KYB): their download paths stop working. Previously issued media URLs (https://<media-host>/...) stop resolving. + * - All stored files owned by the session: document front/back photos (full, cropped, and privacy-blurred variants), document-capture videos, portrait crops, NFC chip portrait and signature images, face reference images, liveness videos, face-match source/target images, Proof of Address documents, and any extra uploaded files (KYC); uploaded company documents and extra files (KYB). E-signature documents, signed PDFs, evidence PDFs and signature images (KYC and KYB): their download paths stop working. Previously issued media URLs (https://<media-host>/...) stop resolving. * - The session's face data. Its face embedding is deleted too, unless you choose to keep an image-free template (see Face biometric data). * - Webhook deliveries still queued for the session, and their retries. Webhooks already delivered are not affected. * - For a Business Verification (KYB) session: the verifications it created for its key people (KYC) and its corporate owners (KYB), recursively, reported as deleted_child_verifications. A verification it only links to, such as an existing approved KYC it reused, is not deleted. @@ -1063,7 +1078,7 @@ public CompletableFuture updateFeatureStatu /** * Update an AML hit review status * - *

Set the review status of a single AML hit (a potential sanction / PEP / watchlist / adverse-media match) returned by AML screening, without changing the overall session decision. Identify the hit by its hit_id (the id of an entry in the AML check's hits array — see the session decision). + *

Set the review status of a single AML hit (a potential sanction / PEP / watchlist / adverse-media match) returned by AML screening, without changing the overall session decision. Identify the hit by its hit_id (the id of an entry in the AML check's hits array — see the session decision). A hit id returned in the earlier format is still accepted; the response always names the hit by its current id. * *

review_status is one of Unreviewed, Confirmed Match, False Positive, or Inconclusive. Reviewer decisions are preserved across ongoing-monitoring updates, so a hit you mark False Positive stays that way when the provider re-screens. * @@ -1833,7 +1848,7 @@ public CompletableFuture> listEventsAsync(String sessionId) { /** * List AML screening history * - *

List every completed ongoing-monitoring re-screen of a session's AML check, newest first by completed_at, including the runs where nothing changed: alerts, activity entries and webhooks fire only when a result moves, so this history is the evidence that a clean subject was still being screened. Works for KYC and KYB session IDs; pass node_id when the session ran more than one AML step. Only ongoing-monitoring re-screens are listed (the first screening is part of the session decision) and runs from before this history existed are not reconstructed, so a session without ongoing monitoring returns an empty list. count is exact up to 100 and capped at 100 above that, so follow next until it is null. A scoped API key needs decisions: read; see Continuous AML monitoring. + *

List every completed ongoing-monitoring re-screen of a session's AML check, newest first by completed_at, including the runs where nothing changed: alerts, activity entries and webhooks fire only when a result moves, so this history is the evidence that a clean subject was still being screened. Works for KYC and KYB session IDs; pass node_id when the session ran more than one AML step. Only ongoing-monitoring re-screens are listed (the first screening is part of the session decision) and runs from before this history existed are not reconstructed, so a session without ongoing monitoring returns an empty list. count is exact up to 100 and capped at 100 above that, so follow next until it is null. Pass month to read one calendar month at a time. A scoped API key needs decisions: read; see Continuous AML monitoring. * *

{@code GET /v3/session/{sessionId}/aml-screening-history/} *

Returns one page; iterate it to fetch every following page automatically. @@ -1926,7 +1941,7 @@ public CompletableFuture> listAmlScreeningHistoryAsync(Str /** * Export AML screening history as CSV * - *

Download the same ongoing-monitoring history as GET /v3/session/{sessionId}/aml-screening-history/ as a CSV file, one line per completed re-screen, newest first, ready to hand to an auditor. The file is streamed whole (no pagination) and starts with a header line; an empty cell means unknown, dataset dates are never estimated, and a value that would start a spreadsheet formula is prefixed with an apostrophe. Works for KYC and KYB session IDs; pass node_id when the session ran more than one AML step. Errors are returned as JSON, not CSV. A scoped API key needs decisions: read and media: read: the response is a file, so a key without media: read gets 403. + *

Download the same ongoing-monitoring history as GET /v3/session/{sessionId}/aml-screening-history/ as a CSV file, one line per completed re-screen, newest first, ready to hand to an auditor. The file is streamed whole (no pagination) and starts with a header line; an empty cell means unknown, dataset dates are never estimated, and a value that would start a spreadsheet formula is prefixed with an apostrophe. Works for KYC and KYB session IDs; pass node_id when the session ran more than one AML step. Pass month to export one calendar month. Errors are returned as JSON, not CSV. A scoped API key needs decisions: read and media: read: the response is a file, so a key without media: read gets 403. * *

{@code GET /v3/session/{sessionId}/aml-screening-history/export/} *

Returns the file; close the {@link me.didit.core.BinaryResponse} when you stream it. @@ -2332,2178 +2347,3577 @@ public CompletableFuture previewDecisionEm return client.executeAsync(previewDecisionEmailRequest(sessionId, params), RequestOptions.none(), PREVIEW_DECISION_EMAIL_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler CREATE_RESPONSE = Responses.json(Conv.model(SessionsCreateResponse::fromJson)); - - private static ApiRequest createRequest(SessionsCreateParams params) { - return ApiRequest.builder("POST", "/v3/session/") - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Upload KYB documents to a session + * + *

Upload one or more corporate documents (articles of incorporation, shareholder register, certificate of incorporation, ...) to the KYB Documents step of a Business Verification session, from your own server instead of the hosted page. Didit runs the hosted pipeline: compression, OCR, tampering and cross-document checks, document grouping, and advances the session when the required document groups are satisfied. The step costs one flat fee however many files you send. The session must be open and on the KYB Documents step, and the company chosen at the registry step must exist. Read the people the documents name with GET /v3/session/{sessionId}/kyb/extracted-parties/. Requires write:businesses. + * + *

{@code POST /v3/session/{sessionId}/kyb/documents/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public SessionsUploadKybDocumentsResponse uploadKybDocuments(String sessionId, SessionsUploadKybDocumentsParams params, RequestOptions options) { + return client.execute(uploadKybDocumentsRequest(sessionId, params), options, UPLOAD_KYB_DOCUMENTS_RESPONSE).data(); } - private static final ResponseHandler RETRIEVE_DECISION_RESPONSE = Responses.json(Conv.model(SessionDecision::fromJson)); - - private static ApiRequest retrieveDecisionRequest(String sessionId, SessionsRetrieveDecisionParams params) { - return ApiRequest.builder("GET", "/v3/session/{sessionId}/decision/") - .pathParam("sessionId", sessionId) - .params(params) - .queryFields("include") - .build(); + /** + * Asynchronous {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture uploadKybDocumentsAsync(String sessionId, SessionsUploadKybDocumentsParams params, RequestOptions options) { + return client.executeAsync(uploadKybDocumentsRequest(sessionId, params), options, UPLOAD_KYB_DOCUMENTS_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler DELETE_RESPONSE = Responses.json(Conv.model(SessionsDeleteResponse::fromJson)); - - private static ApiRequest deleteRequest(String sessionId, SessionsDeleteParams params) { - return ApiRequest.builder("DELETE", "/v3/session/{sessionId}/delete/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Same as {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public SessionsUploadKybDocumentsResponse uploadKybDocuments(String sessionId, SessionsUploadKybDocumentsParams params) { + return client.execute(uploadKybDocumentsRequest(sessionId, params), RequestOptions.none(), UPLOAD_KYB_DOCUMENTS_RESPONSE).data(); } - private static final ResponseHandler GENERATE_PDF_RESPONSE = Responses.binary(); - - private static ApiRequest generatePdfRequest(String sessionId) { - return ApiRequest.builder("GET", "/v3/session/{sessionId}/generate-pdf/") - .pathParam("sessionId", sessionId) - .accept("application/pdf") - .build(); + /** + * Asynchronous {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture uploadKybDocumentsAsync(String sessionId, SessionsUploadKybDocumentsParams params) { + return client.executeAsync(uploadKybDocumentsRequest(sessionId, params), RequestOptions.none(), UPLOAD_KYB_DOCUMENTS_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler UPDATE_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateStatusResponse::fromJson)); - - private static ApiRequest updateStatusRequest(String sessionId, SessionsUpdateStatusParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-status/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * List the parties named by the uploaded documents + * + *

Return the shareholders and directors that the documents uploaded to this KYB session name, merged per person and attributed to the documents that named them. Show them to your applicant to confirm, then declare them with the party draft endpoints. A range stays a range: ownership_percent.text keeps the verbatim figure and min / max the numbers read from it. Nobody is labelled a UBO here; that is decided when the parties are submitted, from the role settings and ownership thresholds of the workflow. The same list is in the session decision as document_verifications[].extracted_parties. Requires read:businesses or read:sessions. + * + *

{@code GET /v3/session/{sessionId}/kyb/extracted-parties/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public SessionsListKybExtractedPartiesResponse listKybExtractedParties(String sessionId, SessionsListKybExtractedPartiesParams params, RequestOptions options) { + return client.execute(listKybExtractedPartiesRequest(sessionId, params), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE).data(); } - private static final ResponseHandler> LIST_RESPONSE = Responses.page(Conv.union(SessionsListResponse.Results::fromJson)); - - private static ApiRequest listRequest(SessionsListParams params) { - return ApiRequest.builder("GET", "/v3/sessions/") - .params(params) - .queryFields("session_kind", "limit", "offset", "status", "vendor_data", "search", "workflow_id", "date_from", "date_to", "country", "document_type", "document_name", "region", "didit_internal_id", "session_type", "api_service", "screened_full_name", "warning", "status_initialized_as_in_review", "is_kyc_to_be_reviewed", "euuid", "organization_name") - .build(); + /** + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture listKybExtractedPartiesAsync(String sessionId, SessionsListKybExtractedPartiesParams params, RequestOptions options) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, params), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler SHARE_RESPONSE = Responses.json(Conv.model(SessionsShareResponse::fromJson)); + /** + * Same as {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public SessionsListKybExtractedPartiesResponse listKybExtractedParties(String sessionId, SessionsListKybExtractedPartiesParams params) { + return client.execute(listKybExtractedPartiesRequest(sessionId, params), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE).data(); + } - private static ApiRequest shareRequest(String sessionId, SessionsShareParams params) { - return ApiRequest.builder("POST", "/v3/session/{sessionId}/share/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture listKybExtractedPartiesAsync(String sessionId, SessionsListKybExtractedPartiesParams params) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, params), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler IMPORT_SHARED_RESPONSE = Responses.json(Conv.model(SessionDecision::fromJson)); + /** + * Same as {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return the result + */ + public SessionsListKybExtractedPartiesResponse listKybExtractedParties(String sessionId, RequestOptions options) { + return client.execute(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE).data(); + } - private static ApiRequest importSharedRequest(SessionsImportSharedParams params) { - return ApiRequest.builder("POST", "/v3/session/import-shared/") - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture listKybExtractedPartiesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler BATCH_DELETE_RESPONSE = Responses.byStatus(SessionsBatchDeleteResponse::fromResponse); + /** + * Same as {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public SessionsListKybExtractedPartiesResponse listKybExtractedParties(String sessionId) { + return client.execute(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE).data(); + } - private static ApiRequest batchDeleteRequest(SessionsBatchDeleteParams params) { - return ApiRequest.builder("POST", "/v3/sessions/delete/") - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture listKybExtractedPartiesAsync(String sessionId) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler RETRIEVE_DELETION_JOB_RESPONSE = Responses.json(Conv.model(SessionDeletionJob::fromJson)); + /** + * List the KYB party drafts + * + *

List the parties you are preparing for this KYB session, oldest first. A draft is not a declared party: it does not appear in the decision or the console and creates no verification session until you submit it with POST /v3/session/{sessionId}/kyb/parties/submit/. Requires write:businesses. + * + *

{@code GET /v3/session/{sessionId}/kyb/parties/drafts/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public SessionsListKybPartyDraftsResponse listKybPartyDrafts(String sessionId, SessionsListKybPartyDraftsParams params, RequestOptions options) { + return client.execute(listKybPartyDraftsRequest(sessionId, params), options, LIST_KYB_PARTY_DRAFTS_RESPONSE).data(); + } - private static ApiRequest retrieveDeletionJobRequest(String jobId) { - return ApiRequest.builder("GET", "/v3/sessions/delete/{job_id}/") - .pathParam("job_id", jobId) - .build(); + /** + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture listKybPartyDraftsAsync(String sessionId, SessionsListKybPartyDraftsParams params, RequestOptions options) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, params), options, LIST_KYB_PARTY_DRAFTS_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler UPDATE_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdateDataResponse::fromJson)); + /** + * Same as {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public SessionsListKybPartyDraftsResponse listKybPartyDrafts(String sessionId, SessionsListKybPartyDraftsParams params) { + return client.execute(listKybPartyDraftsRequest(sessionId, params), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE).data(); + } - private static ApiRequest updateDataRequest(String sessionId, SessionsUpdateDataParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-data/") - .pathParam("sessionId", sessionId) - .params(params) - .queryFields("node_id") - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture listKybPartyDraftsAsync(String sessionId, SessionsListKybPartyDraftsParams params) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, params), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler UPDATE_FEATURE_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateFeatureStatusResponse::fromJson)); + /** + * Same as {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return the result + */ + public SessionsListKybPartyDraftsResponse listKybPartyDrafts(String sessionId, RequestOptions options) { + return client.execute(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), options, LIST_KYB_PARTY_DRAFTS_RESPONSE).data(); + } - private static ApiRequest updateFeatureStatusRequest(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/features/{nodeId}/update-status/") - .pathParam("sessionId", sessionId) - .pathParam("nodeId", nodeId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture listKybPartyDraftsAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), options, LIST_KYB_PARTY_DRAFTS_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler UPDATE_AML_HIT_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateAmlHitStatusResponse::fromJson)); + /** + * Same as {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public SessionsListKybPartyDraftsResponse listKybPartyDrafts(String sessionId) { + return client.execute(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE).data(); + } - private static ApiRequest updateAmlHitStatusRequest(String sessionId, SessionsUpdateAmlHitStatusParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-aml-hit-status/") - .pathParam("sessionId", sessionId) - .params(params) - .queryField("node_id", "node_id_query") - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture listKybPartyDraftsAsync(String sessionId) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler BULK_UPDATE_AML_HIT_STATUS_RESPONSE = Responses.json(Conv.model(SessionsBulkUpdateAmlHitStatusResponse::fromJson)); + /** + * Create a KYB party draft + * + *

Add a party (a person or a company) to the list you are preparing for this KYB session. The same fields and rules as the hosted Key People screen apply: a person needs full_name or first_name and last_name, at least one role and a nationality; a company needs company_name and the country of incorporation in nationality. Nothing is declared or billed until POST /v3/session/{sessionId}/kyb/parties/submit/. Requires write:businesses. + * + *

{@code POST /v3/session/{sessionId}/kyb/parties/drafts/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public SessionsCreateKybPartyDraftResponse createKybPartyDraft(String sessionId, SessionsCreateKybPartyDraftParams params, RequestOptions options) { + return client.execute(createKybPartyDraftRequest(sessionId, params), options, CREATE_KYB_PARTY_DRAFT_RESPONSE).data(); + } - private static ApiRequest bulkUpdateAmlHitStatusRequest(String sessionId, SessionsBulkUpdateAmlHitStatusParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/bulk-update-aml-hit-status/") - .pathParam("sessionId", sessionId) - .params(params) - .queryField("node_id", "node_id_query") - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture createKybPartyDraftAsync(String sessionId, SessionsCreateKybPartyDraftParams params, RequestOptions options) { + return client.executeAsync(createKybPartyDraftRequest(sessionId, params), options, CREATE_KYB_PARTY_DRAFT_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler UPDATE_POA_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdatePoaDataResponse::fromJson)); + /** + * Same as {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public SessionsCreateKybPartyDraftResponse createKybPartyDraft(String sessionId, SessionsCreateKybPartyDraftParams params) { + return client.execute(createKybPartyDraftRequest(sessionId, params), RequestOptions.none(), CREATE_KYB_PARTY_DRAFT_RESPONSE).data(); + } - private static ApiRequest updatePoaDataRequest(String sessionId, SessionsUpdatePoaDataParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-poa-data/") - .pathParam("sessionId", sessionId) - .params(params) - .queryFields("node_id") - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture createKybPartyDraftAsync(String sessionId, SessionsCreateKybPartyDraftParams params) { + return client.executeAsync(createKybPartyDraftRequest(sessionId, params), RequestOptions.none(), CREATE_KYB_PARTY_DRAFT_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler UPDATE_KYB_COMPANY_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdateKybCompanyDataResponse::fromJson)); - - private static ApiRequest updateKybCompanyDataRequest(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/kyb/{companyUuid}/update-data/") - .pathParam("sessionId", sessionId) - .pathParam("companyUuid", companyUuid) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Edit a KYB party draft + * + *

Change fields of one party draft. The edit is merged into the stored draft and the merged party is validated as a whole, so an edit that would leave the party incomplete is rejected. Changing first_name or last_name replaces the stored full name. Requires write:businesses. + * + *

{@code PATCH /v3/session/{sessionId}/kyb/parties/drafts/{draftId}/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param draftId UUID of the party draft (`draft_id` returned when it was created). + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public SessionsUpdateKybPartyDraftResponse updateKybPartyDraft(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params, RequestOptions options) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, params), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE).data(); } - private static final ResponseHandler UPDATE_KYB_PARTY_RESPONSE = Responses.json(Conv.model(SessionsUpdateKybPartyResponse::fromJson)); - - private static ApiRequest updateKybPartyRequest(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/kyb/parties/{partyUuid}/") - .pathParam("sessionId", sessionId) - .pathParam("partyUuid", partyUuid) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture updateKybPartyDraftAsync(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params, RequestOptions options) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, params), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE).thenApply(RawResponse::data); } - private static final ResponseHandler LIST_NETWORKS_RESPONSE = Responses.json(Conv.model(EntityNetworkMembershipList::fromJson)); - - private static ApiRequest listNetworksRequest(String sessionId) { - return ApiRequest.builder("GET", "/v3/organization/{organization_id}/application/{application_id}/sessions/{session_id}/networks/") - .applicationScoped() - .pathParam("session_id", sessionId) - .build(); + /** + * Same as {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param params the request parameters + * @return the result + */ + public SessionsUpdateKybPartyDraftResponse updateKybPartyDraft(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE).data(); } - private static final ResponseHandler PREVIEW_RESUBMISSION_RESPONSE = Responses.json(Conv.model(SessionsPreviewResubmissionResponse::fromJson)); + /** + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture updateKybPartyDraftAsync(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE).thenApply(RawResponse::data); + } - private static ApiRequest previewResubmissionRequest(String sessionId, SessionsPreviewResubmissionParams params) { - return ApiRequest.builder("POST", "/v3/session/{sessionId}/resubmission-preview/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Same as {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param options per-request options + * @return the result + */ + public SessionsUpdateKybPartyDraftResponse updateKybPartyDraft(String sessionId, String draftId, RequestOptions options) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE).data(); } - private static final ResponseHandler UPDATE_DOCUMENT_AI_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdateDocumentAiDataResponse::fromJson)); + /** + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture updateKybPartyDraftAsync(String sessionId, String draftId, RequestOptions options) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE).thenApply(RawResponse::data); + } - private static ApiRequest updateDocumentAiDataRequest(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params) { - return ApiRequest.builder("PATCH", "/v3/document-ai/{sessionId}/documents/{documentUuid}/") - .pathParam("sessionId", sessionId) - .pathParam("documentUuid", documentUuid) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Same as {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @return the result + */ + public SessionsUpdateKybPartyDraftResponse updateKybPartyDraft(String sessionId, String draftId) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE).data(); } - private static final ResponseHandler REGENERATE_KYB_PARTY_RESPONSE = Responses.json(Conv.model(KYBKeyPeopleParty::fromJson)); + /** + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @return a future completed with the result + */ + public CompletableFuture updateKybPartyDraftAsync(String sessionId, String draftId) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE).thenApply(RawResponse::data); + } - private static ApiRequest regenerateKybPartyRequest(String sessionId, String partyUuid) { - return ApiRequest.builder("POST", "/v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/") - .pathParam("sessionId", sessionId) - .pathParam("partyUuid", partyUuid) - .build(); + /** + * Delete a KYB party draft + * + *

Drop one party draft. Declared parties are not affected. Requires write:businesses. + * + *

{@code DELETE /v3/session/{sessionId}/kyb/parties/drafts/{draftId}/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param draftId UUID of the party draft (`draft_id` returned when it was created). + * @param params the request parameters + * @param options per-request options that override the client options + */ + public void deleteKybPartyDraft(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params, RequestOptions options) { + client.execute(deleteKybPartyDraftRequest(sessionId, draftId, params), options, DELETE_KYB_PARTY_DRAFT_RESPONSE); } - private static final ResponseHandler> LIST_EVENTS_RESPONSE = Responses.page(Conv.model(SessionEvent::fromJson)); + /** + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture deleteKybPartyDraftAsync(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params, RequestOptions options) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, params), options, DELETE_KYB_PARTY_DRAFT_RESPONSE).thenAccept(response -> {}); + } - private static ApiRequest listEventsRequest(String sessionId, SessionsListEventsParams params) { - return ApiRequest.builder("GET", "/v3/session/{sessionId}/events/") - .pathParam("sessionId", sessionId) - .params(params) - .queryFields("limit", "offset", "ordering") - .build(); + /** + * Same as {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param params the request parameters + */ + public void deleteKybPartyDraft(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params) { + client.execute(deleteKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE); } - private static final ResponseHandler> LIST_AML_SCREENING_HISTORY_RESPONSE = Responses.page(Conv.model(AMLScreeningRun::fromJson)); + /** + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture deleteKybPartyDraftAsync(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE).thenAccept(response -> {}); + } - private static ApiRequest listAmlScreeningHistoryRequest(String sessionId, SessionsListAmlScreeningHistoryParams params) { - return ApiRequest.builder("GET", "/v3/session/{sessionId}/aml-screening-history/") - .pathParam("sessionId", sessionId) - .params(params) - .queryFields("node_id", "limit", "offset", "ordering") - .build(); + /** + * Same as {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param options per-request options + */ + public void deleteKybPartyDraft(String sessionId, String draftId, RequestOptions options) { + client.execute(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), options, DELETE_KYB_PARTY_DRAFT_RESPONSE); } - private static final ResponseHandler EXPORT_AML_SCREENING_HISTORY_RESPONSE = Responses.binary(); + /** + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture deleteKybPartyDraftAsync(String sessionId, String draftId, RequestOptions options) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), options, DELETE_KYB_PARTY_DRAFT_RESPONSE).thenAccept(response -> {}); + } - private static ApiRequest exportAmlScreeningHistoryRequest(String sessionId, SessionsExportAmlScreeningHistoryParams params) { - return ApiRequest.builder("GET", "/v3/session/{sessionId}/aml-screening-history/export/") - .pathParam("sessionId", sessionId) - .params(params) - .queryFields("node_id") - .accept("text/csv") - .build(); + /** + * Same as {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + */ + public void deleteKybPartyDraft(String sessionId, String draftId) { + client.execute(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE); } - private static final ResponseHandler ADD_IMAGES_RESPONSE = Responses.json(Conv.model(SessionsAddImagesResponse::fromJson)); + /** + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} + * @return a future completed with the result + */ + public CompletableFuture deleteKybPartyDraftAsync(String sessionId, String draftId) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE).thenAccept(response -> {}); + } - private static ApiRequest addImagesRequest(String sessionId, SessionsAddImagesParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/add-images/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.MULTIPART) - .build(); + /** + * Submit the KYB party drafts + * + *

Declare the stored drafts as the company's key people. This is the hosted Key People step under your API key: Didit decides from the role settings and ownership thresholds of the workflow which parties must be verified, creates one individual KYC session (or a KYB sub-session for a corporate owner) for each of them, sends the emails the workflow asks for, and advances the session. Each child session is billed like in the hosted flow. The drafts are consumed. Repeating the call after a successful submit changes nothing and answers 200 with already_submitted: true and the parties that already exist. The session must be on the Key People step. Send each person's kyc_session_url to them, or embed it. Requires write:businesses. + * + *

{@code POST /v3/session/{sessionId}/kyb/parties/submit/} + * + * @param sessionId UUID of the Business Verification (KYB) session. It must belong to the application of the API key. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public SessionsSubmitKybPartiesResponse submitKybParties(String sessionId, SessionsSubmitKybPartiesParams params, RequestOptions options) { + return client.execute(submitKybPartiesRequest(sessionId, params), options, SUBMIT_KYB_PARTIES_RESPONSE).data(); } - private static final ResponseHandler UPDATE_AML_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateAmlStatusResponse::fromJson)); + /** + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture submitKybPartiesAsync(String sessionId, SessionsSubmitKybPartiesParams params, RequestOptions options) { + return client.executeAsync(submitKybPartiesRequest(sessionId, params), options, SUBMIT_KYB_PARTIES_RESPONSE).thenApply(RawResponse::data); + } - private static ApiRequest updateAmlStatusRequest(String sessionId, SessionsUpdateAmlStatusParams params) { - return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-aml-status/") - .pathParam("sessionId", sessionId) - .params(params) - .queryField("node_id", "node_id_query") - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Same as {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public SessionsSubmitKybPartiesResponse submitKybParties(String sessionId, SessionsSubmitKybPartiesParams params) { + return client.execute(submitKybPartiesRequest(sessionId, params), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE).data(); } - private static final ResponseHandler SIMULATE_RESPONSE = Responses.json(Conv.model(SandboxSimulateResponse::fromJson)); + /** + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture submitKybPartiesAsync(String sessionId, SessionsSubmitKybPartiesParams params) { + return client.executeAsync(submitKybPartiesRequest(sessionId, params), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE).thenApply(RawResponse::data); + } - private static ApiRequest simulateRequest(String sessionId, SandboxSimulateRequest params) { - return ApiRequest.builder("POST", "/v3/session/{sessionId}/simulate/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); + /** + * Same as {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return the result + */ + public SessionsSubmitKybPartiesResponse submitKybParties(String sessionId, RequestOptions options) { + return client.execute(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), options, SUBMIT_KYB_PARTIES_RESPONSE).data(); } - private static final ResponseHandler LIST_FEATURE_OVERRIDES_RESPONSE = Responses.json(Conv.model(SessionsListFeatureOverridesResponse::fromJson)); + /** + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture submitKybPartiesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), options, SUBMIT_KYB_PARTIES_RESPONSE).thenApply(RawResponse::data); + } - private static ApiRequest listFeatureOverridesRequest(String sessionId) { - return ApiRequest.builder("GET", "/v3/session/{sessionId}/features/overrides/") - .pathParam("sessionId", sessionId) - .build(); + /** + * Same as {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public SessionsSubmitKybPartiesResponse submitKybParties(String sessionId) { + return client.execute(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE).data(); } - private static final ResponseHandler CANCEL_FEATURE_OVERRIDE_RESPONSE = Responses.json(Conv.model(FeatureStatusOverride::fromJson)); + /** + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)}, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture submitKybPartiesAsync(String sessionId) { + return client.executeAsync(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Export every file of a session + * + *

Start preparing one ZIP with every image, video and document of a User Verification (KYC) or Business Verification (KYB) session, in original quality: the files are stored in the ZIP as they were captured, never recompressed. Answers 202 with the export; read it with GET /v3/session/{sessionId}/files-export/{exportId}/ until status is READY, then download download_url. While an export of the same session is still being prepared, that export is returned instead of a new one. + * + *

The ZIP is deleted 24 hours after it is ready, and at once when the session is deleted. A deleted session cannot be exported. Every export and every download link handed out is written to the session's audit log. A scoped API key needs media: read and decisions: read; a console user needs the privilege to read sessions. + * + *

{@code POST /v3/session/{sessionId}/files-export/} + * + * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs. A deleted session returns `404`. + * @param options per-request options that override the client options + * @return the response body + */ + public SessionFilesExport exportFiles(String sessionId, RequestOptions options) { + return client.execute(exportFilesRequest(sessionId), options, EXPORT_FILES_RESPONSE).data(); + } + + /** + * Asynchronous {@link #exportFiles(String, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture exportFilesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(exportFilesRequest(sessionId), options, EXPORT_FILES_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #exportFiles(String, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public SessionFilesExport exportFiles(String sessionId) { + return client.execute(exportFilesRequest(sessionId), RequestOptions.none(), EXPORT_FILES_RESPONSE).data(); + } + + /** + * Asynchronous {@link #exportFiles(String, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture exportFilesAsync(String sessionId) { + return client.executeAsync(exportFilesRequest(sessionId), RequestOptions.none(), EXPORT_FILES_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Get a session files export + * + *

Progress of an export started with POST /v3/session/{sessionId}/files-export/. Once status is READY, download_url is a signed URL of the ZIP that stays valid for a short time; read the export again for a new one until expires_at. Each read that hands out a download link is written to the session's audit log. An export of a deleted session returns 404. + * + *

{@code GET /v3/session/{sessionId}/files-export/{exportId}/} + * + * @param sessionId UUID of the verification session (the `session_id` returned by `POST /v3/session/`). Accepts both User Verification (KYC) and Business Verification (KYB) session IDs. A deleted session returns `404`. + * @param exportId The `export_id` returned by `POST /v3/session/{sessionId}/files-export/`. + * @param options per-request options that override the client options + * @return the response body + */ + public SessionFilesExport getFilesExport(String sessionId, String exportId, RequestOptions options) { + return client.execute(getFilesExportRequest(sessionId, exportId), options, GET_FILES_EXPORT_RESPONSE).data(); + } + + /** + * Asynchronous {@link #getFilesExport(String, String, RequestOptions)}. + * + * @param sessionId the {@code sessionId} + * @param exportId the {@code exportId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture getFilesExportAsync(String sessionId, String exportId, RequestOptions options) { + return client.executeAsync(getFilesExportRequest(sessionId, exportId), options, GET_FILES_EXPORT_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #getFilesExport(String, String, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param exportId the {@code exportId} + * @return the result + */ + public SessionFilesExport getFilesExport(String sessionId, String exportId) { + return client.execute(getFilesExportRequest(sessionId, exportId), RequestOptions.none(), GET_FILES_EXPORT_RESPONSE).data(); + } + + /** + * Asynchronous {@link #getFilesExport(String, String, RequestOptions)}, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param exportId the {@code exportId} + * @return a future completed with the result + */ + public CompletableFuture getFilesExportAsync(String sessionId, String exportId) { + return client.executeAsync(getFilesExportRequest(sessionId, exportId), RequestOptions.none(), GET_FILES_EXPORT_RESPONSE).thenApply(RawResponse::data); + } + + private static final ResponseHandler CREATE_RESPONSE = Responses.json(Conv.model(SessionsCreateResponse::fromJson)); + + private static ApiRequest createRequest(SessionsCreateParams params) { + return ApiRequest.builder("POST", "/v3/session/") + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler RETRIEVE_DECISION_RESPONSE = Responses.json(Conv.model(SessionDecision::fromJson)); + + private static ApiRequest retrieveDecisionRequest(String sessionId, SessionsRetrieveDecisionParams params) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/decision/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("include") + .build(); + } + + private static final ResponseHandler DELETE_RESPONSE = Responses.json(Conv.model(SessionsDeleteResponse::fromJson)); + + private static ApiRequest deleteRequest(String sessionId, SessionsDeleteParams params) { + return ApiRequest.builder("DELETE", "/v3/session/{sessionId}/delete/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler GENERATE_PDF_RESPONSE = Responses.binary(); + + private static ApiRequest generatePdfRequest(String sessionId) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/generate-pdf/") + .pathParam("sessionId", sessionId) + .accept("application/pdf") + .build(); + } + + private static final ResponseHandler UPDATE_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateStatusResponse::fromJson)); + + private static ApiRequest updateStatusRequest(String sessionId, SessionsUpdateStatusParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-status/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler> LIST_RESPONSE = Responses.page(Conv.union(SessionsListResponse.Results::fromJson)); + + private static ApiRequest listRequest(SessionsListParams params) { + return ApiRequest.builder("GET", "/v3/sessions/") + .params(params) + .queryFields("session_kind", "limit", "offset", "status", "vendor_data", "search", "workflow_id", "date_from", "date_to", "tags", "decided_from", "decided_to", "country", "document_type", "document_name", "region", "didit_internal_id", "session_type", "api_service", "screened_full_name", "warning", "status_initialized_as_in_review", "is_kyc_to_be_reviewed", "euuid", "organization_name") + .build(); + } + + private static final ResponseHandler SHARE_RESPONSE = Responses.json(Conv.model(SessionsShareResponse::fromJson)); + + private static ApiRequest shareRequest(String sessionId, SessionsShareParams params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/share/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler IMPORT_SHARED_RESPONSE = Responses.json(Conv.model(SessionDecision::fromJson)); + + private static ApiRequest importSharedRequest(SessionsImportSharedParams params) { + return ApiRequest.builder("POST", "/v3/session/import-shared/") + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler BATCH_DELETE_RESPONSE = Responses.byStatus(SessionsBatchDeleteResponse::fromResponse); + + private static ApiRequest batchDeleteRequest(SessionsBatchDeleteParams params) { + return ApiRequest.builder("POST", "/v3/sessions/delete/") + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler RETRIEVE_DELETION_JOB_RESPONSE = Responses.json(Conv.model(SessionDeletionJob::fromJson)); + + private static ApiRequest retrieveDeletionJobRequest(String jobId) { + return ApiRequest.builder("GET", "/v3/sessions/delete/{job_id}/") + .pathParam("job_id", jobId) + .build(); + } + + private static final ResponseHandler UPDATE_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdateDataResponse::fromJson)); + + private static ApiRequest updateDataRequest(String sessionId, SessionsUpdateDataParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-data/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_FEATURE_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateFeatureStatusResponse::fromJson)); + + private static ApiRequest updateFeatureStatusRequest(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/features/{nodeId}/update-status/") + .pathParam("sessionId", sessionId) + .pathParam("nodeId", nodeId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_AML_HIT_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateAmlHitStatusResponse::fromJson)); + + private static ApiRequest updateAmlHitStatusRequest(String sessionId, SessionsUpdateAmlHitStatusParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-aml-hit-status/") + .pathParam("sessionId", sessionId) + .params(params) + .queryField("node_id", "node_id_query") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler BULK_UPDATE_AML_HIT_STATUS_RESPONSE = Responses.json(Conv.model(SessionsBulkUpdateAmlHitStatusResponse::fromJson)); + + private static ApiRequest bulkUpdateAmlHitStatusRequest(String sessionId, SessionsBulkUpdateAmlHitStatusParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/bulk-update-aml-hit-status/") + .pathParam("sessionId", sessionId) + .params(params) + .queryField("node_id", "node_id_query") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_POA_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdatePoaDataResponse::fromJson)); + + private static ApiRequest updatePoaDataRequest(String sessionId, SessionsUpdatePoaDataParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-poa-data/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_KYB_COMPANY_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdateKybCompanyDataResponse::fromJson)); + + private static ApiRequest updateKybCompanyDataRequest(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/kyb/{companyUuid}/update-data/") + .pathParam("sessionId", sessionId) + .pathParam("companyUuid", companyUuid) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_KYB_PARTY_RESPONSE = Responses.json(Conv.model(SessionsUpdateKybPartyResponse::fromJson)); + + private static ApiRequest updateKybPartyRequest(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/kyb/parties/{partyUuid}/") + .pathParam("sessionId", sessionId) + .pathParam("partyUuid", partyUuid) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler LIST_NETWORKS_RESPONSE = Responses.json(Conv.model(EntityNetworkMembershipList::fromJson)); + + private static ApiRequest listNetworksRequest(String sessionId) { + return ApiRequest.builder("GET", "/v3/organization/{organization_id}/application/{application_id}/sessions/{session_id}/networks/") + .applicationScoped() + .pathParam("session_id", sessionId) + .build(); + } + + private static final ResponseHandler PREVIEW_RESUBMISSION_RESPONSE = Responses.json(Conv.model(SessionsPreviewResubmissionResponse::fromJson)); + + private static ApiRequest previewResubmissionRequest(String sessionId, SessionsPreviewResubmissionParams params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/resubmission-preview/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_DOCUMENT_AI_DATA_RESPONSE = Responses.json(Conv.model(SessionsUpdateDocumentAiDataResponse::fromJson)); + + private static ApiRequest updateDocumentAiDataRequest(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params) { + return ApiRequest.builder("PATCH", "/v3/document-ai/{sessionId}/documents/{documentUuid}/") + .pathParam("sessionId", sessionId) + .pathParam("documentUuid", documentUuid) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler REGENERATE_KYB_PARTY_RESPONSE = Responses.json(Conv.model(KYBKeyPeopleParty::fromJson)); + + private static ApiRequest regenerateKybPartyRequest(String sessionId, String partyUuid) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/kyb/parties/{partyUuid}/regenerate/") + .pathParam("sessionId", sessionId) + .pathParam("partyUuid", partyUuid) + .build(); + } + + private static final ResponseHandler> LIST_EVENTS_RESPONSE = Responses.page(Conv.model(SessionEvent::fromJson)); + + private static ApiRequest listEventsRequest(String sessionId, SessionsListEventsParams params) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/events/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("limit", "offset", "ordering") + .build(); + } + + private static final ResponseHandler> LIST_AML_SCREENING_HISTORY_RESPONSE = Responses.page(Conv.model(AMLScreeningRun::fromJson)); + + private static ApiRequest listAmlScreeningHistoryRequest(String sessionId, SessionsListAmlScreeningHistoryParams params) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/aml-screening-history/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id", "month", "limit", "offset", "ordering") + .build(); + } + + private static final ResponseHandler EXPORT_AML_SCREENING_HISTORY_RESPONSE = Responses.binary(); + + private static ApiRequest exportAmlScreeningHistoryRequest(String sessionId, SessionsExportAmlScreeningHistoryParams params) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/aml-screening-history/export/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id", "month") + .accept("text/csv") + .build(); + } + + private static final ResponseHandler ADD_IMAGES_RESPONSE = Responses.json(Conv.model(SessionsAddImagesResponse::fromJson)); + + private static ApiRequest addImagesRequest(String sessionId, SessionsAddImagesParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/add-images/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.MULTIPART) + .build(); + } + + private static final ResponseHandler UPDATE_AML_STATUS_RESPONSE = Responses.json(Conv.model(SessionsUpdateAmlStatusResponse::fromJson)); + + private static ApiRequest updateAmlStatusRequest(String sessionId, SessionsUpdateAmlStatusParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/update-aml-status/") + .pathParam("sessionId", sessionId) + .params(params) + .queryField("node_id", "node_id_query") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler SIMULATE_RESPONSE = Responses.json(Conv.model(SandboxSimulateResponse::fromJson)); + + private static ApiRequest simulateRequest(String sessionId, SandboxSimulateRequest params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/simulate/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler LIST_FEATURE_OVERRIDES_RESPONSE = Responses.json(Conv.model(SessionsListFeatureOverridesResponse::fromJson)); + + private static ApiRequest listFeatureOverridesRequest(String sessionId) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/features/overrides/") + .pathParam("sessionId", sessionId) + .build(); + } + + private static final ResponseHandler CANCEL_FEATURE_OVERRIDE_RESPONSE = Responses.json(Conv.model(FeatureStatusOverride::fromJson)); + + private static ApiRequest cancelFeatureOverrideRequest(String sessionId, String overrideId) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/") + .pathParam("sessionId", sessionId) + .pathParam("overrideId", overrideId) + .build(); + } + + private static final ResponseHandler PREVIEW_DECISION_EMAIL_RESPONSE = Responses.json(Conv.model(SessionsPreviewDecisionEmailResponse::fromJson)); + + private static ApiRequest previewDecisionEmailRequest(String sessionId, SessionsPreviewDecisionEmailParams params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/decision-email-preview/") + .pathParam("sessionId", sessionId) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPLOAD_KYB_DOCUMENTS_RESPONSE = Responses.json(Conv.model(SessionsUploadKybDocumentsResponse::fromJson)); + + private static ApiRequest uploadKybDocumentsRequest(String sessionId, SessionsUploadKybDocumentsParams params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/kyb/documents/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .body(ApiRequest.BodyEncoding.MULTIPART) + .build(); + } + + private static final ResponseHandler LIST_KYB_EXTRACTED_PARTIES_RESPONSE = Responses.json(Conv.model(SessionsListKybExtractedPartiesResponse::fromJson)); + + private static ApiRequest listKybExtractedPartiesRequest(String sessionId, SessionsListKybExtractedPartiesParams params) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/kyb/extracted-parties/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .build(); + } + + private static final ResponseHandler LIST_KYB_PARTY_DRAFTS_RESPONSE = Responses.json(Conv.model(SessionsListKybPartyDraftsResponse::fromJson)); + + private static ApiRequest listKybPartyDraftsRequest(String sessionId, SessionsListKybPartyDraftsParams params) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/kyb/parties/drafts/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .build(); + } + + private static final ResponseHandler CREATE_KYB_PARTY_DRAFT_RESPONSE = Responses.json(Conv.model(SessionsCreateKybPartyDraftResponse::fromJson)); + + private static ApiRequest createKybPartyDraftRequest(String sessionId, SessionsCreateKybPartyDraftParams params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/kyb/parties/drafts/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler UPDATE_KYB_PARTY_DRAFT_RESPONSE = Responses.json(Conv.model(SessionsUpdateKybPartyDraftResponse::fromJson)); + + private static ApiRequest updateKybPartyDraftRequest(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params) { + return ApiRequest.builder("PATCH", "/v3/session/{sessionId}/kyb/parties/drafts/{draftId}/") + .pathParam("sessionId", sessionId) + .pathParam("draftId", draftId) + .params(params) + .queryFields("node_id") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler<@Nullable Void> DELETE_KYB_PARTY_DRAFT_RESPONSE = Responses.none(); + + private static ApiRequest deleteKybPartyDraftRequest(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params) { + return ApiRequest.builder("DELETE", "/v3/session/{sessionId}/kyb/parties/drafts/{draftId}/") + .pathParam("sessionId", sessionId) + .pathParam("draftId", draftId) + .params(params) + .queryFields("node_id") + .build(); + } + + private static final ResponseHandler SUBMIT_KYB_PARTIES_RESPONSE = Responses.json(Conv.model(SessionsSubmitKybPartiesResponse::fromJson)); + + private static ApiRequest submitKybPartiesRequest(String sessionId, SessionsSubmitKybPartiesParams params) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/kyb/parties/submit/") + .pathParam("sessionId", sessionId) + .params(params) + .queryFields("node_id") + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + private static final ResponseHandler EXPORT_FILES_RESPONSE = Responses.json(Conv.model(SessionFilesExport::fromJson)); + + private static ApiRequest exportFilesRequest(String sessionId) { + return ApiRequest.builder("POST", "/v3/session/{sessionId}/files-export/") + .pathParam("sessionId", sessionId) + .build(); + } + + private static final ResponseHandler GET_FILES_EXPORT_RESPONSE = Responses.json(Conv.model(SessionFilesExport::fromJson)); + + private static ApiRequest getFilesExportRequest(String sessionId, String exportId) { + return ApiRequest.builder("GET", "/v3/session/{sessionId}/files-export/{exportId}/") + .pathParam("sessionId", sessionId) + .pathParam("exportId", exportId) + .build(); + } + + /** The {@code sessions} operations returning {@link RawResponse}. */ + public static final class WithRawResponse { + private final ApiClient client; + + WithRawResponse(ApiClient client) { + this.client = client; + } + + /** + * {@link #create(SessionsCreateParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse create(SessionsCreateParams params, RequestOptions options) { + return client.execute(createRequest(params), options, CREATE_RESPONSE); + } + + /** + * Asynchronous {@link #create(SessionsCreateParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> createAsync(SessionsCreateParams params, RequestOptions options) { + return client.executeAsync(createRequest(params), options, CREATE_RESPONSE); + } + + /** + * {@link #create(SessionsCreateParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse create(SessionsCreateParams params) { + return client.execute(createRequest(params), RequestOptions.none(), CREATE_RESPONSE); + } + + /** + * Asynchronous {@link #create(SessionsCreateParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> createAsync(SessionsCreateParams params) { + return client.executeAsync(createRequest(params), RequestOptions.none(), CREATE_RESPONSE); + } + + /** + * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse retrieveDecision(String sessionId, SessionsRetrieveDecisionParams params, RequestOptions options) { + return client.execute(retrieveDecisionRequest(sessionId, params), options, RETRIEVE_DECISION_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> retrieveDecisionAsync(String sessionId, SessionsRetrieveDecisionParams params, RequestOptions options) { + return client.executeAsync(retrieveDecisionRequest(sessionId, params), options, RETRIEVE_DECISION_RESPONSE); + } + + /** + * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public RawResponse retrieveDecision(String sessionId, SessionsRetrieveDecisionParams params) { + return client.execute(retrieveDecisionRequest(sessionId, params), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> retrieveDecisionAsync(String sessionId, SessionsRetrieveDecisionParams params) { + return client.executeAsync(retrieveDecisionRequest(sessionId, params), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + } + + /** + * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return the result + */ + public RawResponse retrieveDecision(String sessionId, RequestOptions options) { + return client.execute(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), options, RETRIEVE_DECISION_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> retrieveDecisionAsync(String sessionId, RequestOptions options) { + return client.executeAsync(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), options, RETRIEVE_DECISION_RESPONSE); + } + + /** + * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public RawResponse retrieveDecision(String sessionId) { + return client.execute(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture> retrieveDecisionAsync(String sessionId) { + return client.executeAsync(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + } + + /** + * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse delete(String sessionId, SessionsDeleteParams params, RequestOptions options) { + return client.execute(deleteRequest(sessionId, params), options, DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> deleteAsync(String sessionId, SessionsDeleteParams params, RequestOptions options) { + return client.executeAsync(deleteRequest(sessionId, params), options, DELETE_RESPONSE); + } + + /** + * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public RawResponse delete(String sessionId, SessionsDeleteParams params) { + return client.execute(deleteRequest(sessionId, params), RequestOptions.none(), DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> deleteAsync(String sessionId, SessionsDeleteParams params) { + return client.executeAsync(deleteRequest(sessionId, params), RequestOptions.none(), DELETE_RESPONSE); + } + + /** + * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return the result + */ + public RawResponse delete(String sessionId, RequestOptions options) { + return client.execute(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), options, DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> deleteAsync(String sessionId, RequestOptions options) { + return client.executeAsync(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), options, DELETE_RESPONSE); + } + + /** + * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public RawResponse delete(String sessionId) { + return client.execute(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), RequestOptions.none(), DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture> deleteAsync(String sessionId) { + return client.executeAsync(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), RequestOptions.none(), DELETE_RESPONSE); + } + + /** + * {@link #generatePdf(String, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return the result + */ + public RawResponse generatePdf(String sessionId, RequestOptions options) { + return client.execute(generatePdfRequest(sessionId), options, GENERATE_PDF_RESPONSE); + } + + /** + * Asynchronous {@link #generatePdf(String, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> generatePdfAsync(String sessionId, RequestOptions options) { + return client.executeAsync(generatePdfRequest(sessionId), options, GENERATE_PDF_RESPONSE); + } + + /** + * {@link #generatePdf(String, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return the result + */ + public RawResponse generatePdf(String sessionId) { + return client.execute(generatePdfRequest(sessionId), RequestOptions.none(), GENERATE_PDF_RESPONSE); + } + + /** + * Asynchronous {@link #generatePdf(String, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @return a future completed with the result + */ + public CompletableFuture> generatePdfAsync(String sessionId) { + return client.executeAsync(generatePdfRequest(sessionId), RequestOptions.none(), GENERATE_PDF_RESPONSE); + } + + /** + * {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse updateStatus(String sessionId, SessionsUpdateStatusParams params, RequestOptions options) { + return client.execute(updateStatusRequest(sessionId, params), options, UPDATE_STATUS_RESPONSE); + } + + /** + * Asynchronous {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> updateStatusAsync(String sessionId, SessionsUpdateStatusParams params, RequestOptions options) { + return client.executeAsync(updateStatusRequest(sessionId, params), options, UPDATE_STATUS_RESPONSE); + } + + /** + * {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public RawResponse updateStatus(String sessionId, SessionsUpdateStatusParams params) { + return client.execute(updateStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_STATUS_RESPONSE); + } + + /** + * Asynchronous {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> updateStatusAsync(String sessionId, SessionsUpdateStatusParams params) { + return client.executeAsync(updateStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_STATUS_RESPONSE); + } + + /** + * {@link #list(SessionsListParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse> list(SessionsListParams params, RequestOptions options) { + return client.execute(listRequest(params), options, LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture>> listAsync(SessionsListParams params, RequestOptions options) { + return client.executeAsync(listRequest(params), options, LIST_RESPONSE); + } + + /** + * {@link #list(SessionsListParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse> list(SessionsListParams params) { + return client.execute(listRequest(params), RequestOptions.none(), LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture>> listAsync(SessionsListParams params) { + return client.executeAsync(listRequest(params), RequestOptions.none(), LIST_RESPONSE); + } + + /** + * {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return the result + */ + public RawResponse> list(RequestOptions options) { + return client.execute(listRequest(SessionsListParams.builder().build()), options, LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture>> listAsync(RequestOptions options) { + return client.executeAsync(listRequest(SessionsListParams.builder().build()), options, LIST_RESPONSE); + } - private static ApiRequest cancelFeatureOverrideRequest(String sessionId, String overrideId) { - return ApiRequest.builder("POST", "/v3/session/{sessionId}/features/overrides/{overrideId}/cancel/") - .pathParam("sessionId", sessionId) - .pathParam("overrideId", overrideId) - .build(); - } + /** + * {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return the result + */ + public RawResponse> list() { + return client.execute(listRequest(SessionsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE); + } - private static final ResponseHandler PREVIEW_DECISION_EMAIL_RESPONSE = Responses.json(Conv.model(SessionsPreviewDecisionEmailResponse::fromJson)); + /** + * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return a future completed with the result + */ + public CompletableFuture>> listAsync() { + return client.executeAsync(listRequest(SessionsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE); + } - private static ApiRequest previewDecisionEmailRequest(String sessionId, SessionsPreviewDecisionEmailParams params) { - return ApiRequest.builder("POST", "/v3/session/{sessionId}/decision-email-preview/") - .pathParam("sessionId", sessionId) - .params(params) - .body(ApiRequest.BodyEncoding.JSON) - .build(); - } + /** + * {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse share(String sessionId, SessionsShareParams params, RequestOptions options) { + return client.execute(shareRequest(sessionId, params), options, SHARE_RESPONSE); + } - /** The {@code sessions} operations returning {@link RawResponse}. */ - public static final class WithRawResponse { - private final ApiClient client; + /** + * Asynchronous {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> shareAsync(String sessionId, SessionsShareParams params, RequestOptions options) { + return client.executeAsync(shareRequest(sessionId, params), options, SHARE_RESPONSE); + } - WithRawResponse(ApiClient client) { - this.client = client; + /** + * {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return the result + */ + public RawResponse share(String sessionId, SessionsShareParams params) { + return client.execute(shareRequest(sessionId, params), RequestOptions.none(), SHARE_RESPONSE); } /** - * {@link #create(SessionsCreateParams, RequestOptions)} with the raw response. + * Asynchronous {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response, with the client's options. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> shareAsync(String sessionId, SessionsShareParams params) { + return client.executeAsync(shareRequest(sessionId, params), RequestOptions.none(), SHARE_RESPONSE); + } + + /** + * {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response. * * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse create(SessionsCreateParams params, RequestOptions options) { - return client.execute(createRequest(params), options, CREATE_RESPONSE); + public RawResponse importShared(SessionsImportSharedParams params, RequestOptions options) { + return client.execute(importSharedRequest(params), options, IMPORT_SHARED_RESPONSE); } /** - * Asynchronous {@link #create(SessionsCreateParams, RequestOptions)} with the raw response. + * Asynchronous {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response. * * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> createAsync(SessionsCreateParams params, RequestOptions options) { - return client.executeAsync(createRequest(params), options, CREATE_RESPONSE); + public CompletableFuture> importSharedAsync(SessionsImportSharedParams params, RequestOptions options) { + return client.executeAsync(importSharedRequest(params), options, IMPORT_SHARED_RESPONSE); + } + + /** + * {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse importShared(SessionsImportSharedParams params) { + return client.execute(importSharedRequest(params), RequestOptions.none(), IMPORT_SHARED_RESPONSE); + } + + /** + * Asynchronous {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> importSharedAsync(SessionsImportSharedParams params) { + return client.executeAsync(importSharedRequest(params), RequestOptions.none(), IMPORT_SHARED_RESPONSE); + } + + /** + * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse batchDelete(SessionsBatchDeleteParams params, RequestOptions options) { + return client.execute(batchDeleteRequest(params), options, BATCH_DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> batchDeleteAsync(SessionsBatchDeleteParams params, RequestOptions options) { + return client.executeAsync(batchDeleteRequest(params), options, BATCH_DELETE_RESPONSE); + } + + /** + * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse batchDelete(SessionsBatchDeleteParams params) { + return client.execute(batchDeleteRequest(params), RequestOptions.none(), BATCH_DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> batchDeleteAsync(SessionsBatchDeleteParams params) { + return client.executeAsync(batchDeleteRequest(params), RequestOptions.none(), BATCH_DELETE_RESPONSE); + } + + /** + * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return the result + */ + public RawResponse batchDelete(RequestOptions options) { + return client.execute(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), options, BATCH_DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> batchDeleteAsync(RequestOptions options) { + return client.executeAsync(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), options, BATCH_DELETE_RESPONSE); + } + + /** + * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return the result + */ + public RawResponse batchDelete() { + return client.execute(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), RequestOptions.none(), BATCH_DELETE_RESPONSE); + } + + /** + * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return a future completed with the result + */ + public CompletableFuture> batchDeleteAsync() { + return client.executeAsync(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), RequestOptions.none(), BATCH_DELETE_RESPONSE); + } + + /** + * {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response. + * + * @param jobId the {@code job_id} + * @param options per-request options + * @return the result + */ + public RawResponse retrieveDeletionJob(String jobId, RequestOptions options) { + return client.execute(retrieveDeletionJobRequest(jobId), options, RETRIEVE_DELETION_JOB_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response. + * + * @param jobId the {@code job_id} + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> retrieveDeletionJobAsync(String jobId, RequestOptions options) { + return client.executeAsync(retrieveDeletionJobRequest(jobId), options, RETRIEVE_DELETION_JOB_RESPONSE); + } + + /** + * {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response, with the client's options. + * + * @param jobId the {@code job_id} + * @return the result + */ + public RawResponse retrieveDeletionJob(String jobId) { + return client.execute(retrieveDeletionJobRequest(jobId), RequestOptions.none(), RETRIEVE_DELETION_JOB_RESPONSE); + } + + /** + * Asynchronous {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response, with the client's options. + * + * @param jobId the {@code job_id} + * @return a future completed with the result + */ + public CompletableFuture> retrieveDeletionJobAsync(String jobId) { + return client.executeAsync(retrieveDeletionJobRequest(jobId), RequestOptions.none(), RETRIEVE_DELETION_JOB_RESPONSE); + } + + /** + * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse updateData(String sessionId, SessionsUpdateDataParams params, RequestOptions options) { + return client.execute(updateDataRequest(sessionId, params), options, UPDATE_DATA_RESPONSE); + } + + /** + * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response. + * + * @param sessionId the {@code sessionId} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> updateDataAsync(String sessionId, SessionsUpdateDataParams params, RequestOptions options) { + return client.executeAsync(updateDataRequest(sessionId, params), options, UPDATE_DATA_RESPONSE); } /** - * {@link #create(SessionsCreateParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, with the client's options. * + * @param sessionId the {@code sessionId} * @param params the request parameters * @return the result */ - public RawResponse create(SessionsCreateParams params) { - return client.execute(createRequest(params), RequestOptions.none(), CREATE_RESPONSE); + public RawResponse updateData(String sessionId, SessionsUpdateDataParams params) { + return client.execute(updateDataRequest(sessionId, params), RequestOptions.none(), UPDATE_DATA_RESPONSE); } /** - * Asynchronous {@link #create(SessionsCreateParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, with the client's options. * + * @param sessionId the {@code sessionId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> createAsync(SessionsCreateParams params) { - return client.executeAsync(createRequest(params), RequestOptions.none(), CREATE_RESPONSE); + public CompletableFuture> updateDataAsync(String sessionId, SessionsUpdateDataParams params) { + return client.executeAsync(updateDataRequest(sessionId, params), RequestOptions.none(), UPDATE_DATA_RESPONSE); } /** - * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response. + * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse retrieveDecision(String sessionId, SessionsRetrieveDecisionParams params, RequestOptions options) { - return client.execute(retrieveDecisionRequest(sessionId, params), options, RETRIEVE_DECISION_RESPONSE); + public RawResponse updateData(String sessionId, RequestOptions options) { + return client.execute(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), options, UPDATE_DATA_RESPONSE); } /** - * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> retrieveDecisionAsync(String sessionId, SessionsRetrieveDecisionParams params, RequestOptions options) { - return client.executeAsync(retrieveDecisionRequest(sessionId, params), options, RETRIEVE_DECISION_RESPONSE); + public CompletableFuture> updateDataAsync(String sessionId, RequestOptions options) { + return client.executeAsync(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), options, UPDATE_DATA_RESPONSE); } /** - * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse retrieveDecision(String sessionId, SessionsRetrieveDecisionParams params) { - return client.execute(retrieveDecisionRequest(sessionId, params), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + public RawResponse updateData(String sessionId) { + return client.execute(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), RequestOptions.none(), UPDATE_DATA_RESPONSE); } /** - * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> retrieveDecisionAsync(String sessionId, SessionsRetrieveDecisionParams params) { - return client.executeAsync(retrieveDecisionRequest(sessionId, params), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + public CompletableFuture> updateDataAsync(String sessionId) { + return client.executeAsync(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), RequestOptions.none(), UPDATE_DATA_RESPONSE); } /** - * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters. + * {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param nodeId the {@code nodeId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse retrieveDecision(String sessionId, RequestOptions options) { - return client.execute(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), options, RETRIEVE_DECISION_RESPONSE); + public RawResponse updateFeatureStatus(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params, RequestOptions options) { + return client.execute(updateFeatureStatusRequest(sessionId, nodeId, params), options, UPDATE_FEATURE_STATUS_RESPONSE); } /** - * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param nodeId the {@code nodeId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> retrieveDecisionAsync(String sessionId, RequestOptions options) { - return client.executeAsync(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), options, RETRIEVE_DECISION_RESPONSE); + public CompletableFuture> updateFeatureStatusAsync(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params, RequestOptions options) { + return client.executeAsync(updateFeatureStatusRequest(sessionId, nodeId, params), options, UPDATE_FEATURE_STATUS_RESPONSE); } /** - * {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param nodeId the {@code nodeId} + * @param params the request parameters * @return the result */ - public RawResponse retrieveDecision(String sessionId) { - return client.execute(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + public RawResponse updateFeatureStatus(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params) { + return client.execute(updateFeatureStatusRequest(sessionId, nodeId, params), RequestOptions.none(), UPDATE_FEATURE_STATUS_RESPONSE); } /** - * Asynchronous {@link #retrieveDecision(String, SessionsRetrieveDecisionParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param nodeId the {@code nodeId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> retrieveDecisionAsync(String sessionId) { - return client.executeAsync(retrieveDecisionRequest(sessionId, SessionsRetrieveDecisionParams.builder().build()), RequestOptions.none(), RETRIEVE_DECISION_RESPONSE); + public CompletableFuture> updateFeatureStatusAsync(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params) { + return client.executeAsync(updateFeatureStatusRequest(sessionId, nodeId, params), RequestOptions.none(), UPDATE_FEATURE_STATUS_RESPONSE); } /** - * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response. + * {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse delete(String sessionId, SessionsDeleteParams params, RequestOptions options) { - return client.execute(deleteRequest(sessionId, params), options, DELETE_RESPONSE); + public RawResponse updateAmlHitStatus(String sessionId, SessionsUpdateAmlHitStatusParams params, RequestOptions options) { + return client.execute(updateAmlHitStatusRequest(sessionId, params), options, UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> deleteAsync(String sessionId, SessionsDeleteParams params, RequestOptions options) { - return client.executeAsync(deleteRequest(sessionId, params), options, DELETE_RESPONSE); + public CompletableFuture> updateAmlHitStatusAsync(String sessionId, SessionsUpdateAmlHitStatusParams params, RequestOptions options) { + return client.executeAsync(updateAmlHitStatusRequest(sessionId, params), options, UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} * @param params the request parameters * @return the result */ - public RawResponse delete(String sessionId, SessionsDeleteParams params) { - return client.execute(deleteRequest(sessionId, params), RequestOptions.none(), DELETE_RESPONSE); + public RawResponse updateAmlHitStatus(String sessionId, SessionsUpdateAmlHitStatusParams params) { + return client.execute(updateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> deleteAsync(String sessionId, SessionsDeleteParams params) { - return client.executeAsync(deleteRequest(sessionId, params), RequestOptions.none(), DELETE_RESPONSE); + public CompletableFuture> updateAmlHitStatusAsync(String sessionId, SessionsUpdateAmlHitStatusParams params) { + return client.executeAsync(updateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters. + * {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse delete(String sessionId, RequestOptions options) { - return client.execute(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), options, DELETE_RESPONSE); + public RawResponse bulkUpdateAmlHitStatus(String sessionId, SessionsBulkUpdateAmlHitStatusParams params, RequestOptions options) { + return client.execute(bulkUpdateAmlHitStatusRequest(sessionId, params), options, BULK_UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> deleteAsync(String sessionId, RequestOptions options) { - return client.executeAsync(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), options, DELETE_RESPONSE); + public CompletableFuture> bulkUpdateAmlHitStatusAsync(String sessionId, SessionsBulkUpdateAmlHitStatusParams params, RequestOptions options) { + return client.executeAsync(bulkUpdateAmlHitStatusRequest(sessionId, params), options, BULK_UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return the result */ - public RawResponse delete(String sessionId) { - return client.execute(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), RequestOptions.none(), DELETE_RESPONSE); + public RawResponse bulkUpdateAmlHitStatus(String sessionId, SessionsBulkUpdateAmlHitStatusParams params) { + return client.execute(bulkUpdateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), BULK_UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * Asynchronous {@link #delete(String, SessionsDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> deleteAsync(String sessionId) { - return client.executeAsync(deleteRequest(sessionId, SessionsDeleteParams.builder().build()), RequestOptions.none(), DELETE_RESPONSE); + public CompletableFuture> bulkUpdateAmlHitStatusAsync(String sessionId, SessionsBulkUpdateAmlHitStatusParams params) { + return client.executeAsync(bulkUpdateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), BULK_UPDATE_AML_HIT_STATUS_RESPONSE); } /** - * {@link #generatePdf(String, RequestOptions)} with the raw response. + * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse generatePdf(String sessionId, RequestOptions options) { - return client.execute(generatePdfRequest(sessionId), options, GENERATE_PDF_RESPONSE); + public RawResponse updatePoaData(String sessionId, SessionsUpdatePoaDataParams params, RequestOptions options) { + return client.execute(updatePoaDataRequest(sessionId, params), options, UPDATE_POA_DATA_RESPONSE); } /** - * Asynchronous {@link #generatePdf(String, RequestOptions)} with the raw response. + * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> generatePdfAsync(String sessionId, RequestOptions options) { - return client.executeAsync(generatePdfRequest(sessionId), options, GENERATE_PDF_RESPONSE); + public CompletableFuture> updatePoaDataAsync(String sessionId, SessionsUpdatePoaDataParams params, RequestOptions options) { + return client.executeAsync(updatePoaDataRequest(sessionId, params), options, UPDATE_POA_DATA_RESPONSE); } /** - * {@link #generatePdf(String, RequestOptions)} with the raw response, with the client's options. + * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return the result */ - public RawResponse generatePdf(String sessionId) { - return client.execute(generatePdfRequest(sessionId), RequestOptions.none(), GENERATE_PDF_RESPONSE); + public RawResponse updatePoaData(String sessionId, SessionsUpdatePoaDataParams params) { + return client.execute(updatePoaDataRequest(sessionId, params), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); } /** - * Asynchronous {@link #generatePdf(String, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> generatePdfAsync(String sessionId) { - return client.executeAsync(generatePdfRequest(sessionId), RequestOptions.none(), GENERATE_PDF_RESPONSE); + public CompletableFuture> updatePoaDataAsync(String sessionId, SessionsUpdatePoaDataParams params) { + return client.executeAsync(updatePoaDataRequest(sessionId, params), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); } /** - * {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response. + * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateStatus(String sessionId, SessionsUpdateStatusParams params, RequestOptions options) { - return client.execute(updateStatusRequest(sessionId, params), options, UPDATE_STATUS_RESPONSE); + public RawResponse updatePoaData(String sessionId, RequestOptions options) { + return client.execute(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), options, UPDATE_POA_DATA_RESPONSE); } /** - * Asynchronous {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateStatusAsync(String sessionId, SessionsUpdateStatusParams params, RequestOptions options) { - return client.executeAsync(updateStatusRequest(sessionId, params), options, UPDATE_STATUS_RESPONSE); + public CompletableFuture> updatePoaDataAsync(String sessionId, RequestOptions options) { + return client.executeAsync(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), options, UPDATE_POA_DATA_RESPONSE); } /** - * {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse updateStatus(String sessionId, SessionsUpdateStatusParams params) { - return client.execute(updateStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_STATUS_RESPONSE); + public RawResponse updatePoaData(String sessionId) { + return client.execute(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); } /** - * Asynchronous {@link #updateStatus(String, SessionsUpdateStatusParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateStatusAsync(String sessionId, SessionsUpdateStatusParams params) { - return client.executeAsync(updateStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_STATUS_RESPONSE); + public CompletableFuture> updatePoaDataAsync(String sessionId) { + return client.executeAsync(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); } /** - * {@link #list(SessionsListParams, RequestOptions)} with the raw response. + * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse> list(SessionsListParams params, RequestOptions options) { - return client.execute(listRequest(params), options, LIST_RESPONSE); + public RawResponse updateKybCompanyData(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params, RequestOptions options) { + return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, params), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture>> listAsync(SessionsListParams params, RequestOptions options) { - return client.executeAsync(listRequest(params), options, LIST_RESPONSE); + public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params, RequestOptions options) { + return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, params), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * {@link #list(SessionsListParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, with the client's options. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @param params the request parameters * @return the result */ - public RawResponse> list(SessionsListParams params) { - return client.execute(listRequest(params), RequestOptions.none(), LIST_RESPONSE); + public RawResponse updateKybCompanyData(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params) { + return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, params), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, with the client's options. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture>> listAsync(SessionsListParams params) { - return client.executeAsync(listRequest(params), RequestOptions.none(), LIST_RESPONSE); + public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params) { + return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, params), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters. + * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @param options per-request options * @return the result */ - public RawResponse> list(RequestOptions options) { - return client.execute(listRequest(SessionsListParams.builder().build()), options, LIST_RESPONSE); + public RawResponse updateKybCompanyData(String sessionId, String companyUuid, RequestOptions options) { + return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture>> listAsync(RequestOptions options) { - return client.executeAsync(listRequest(SessionsListParams.builder().build()), options, LIST_RESPONSE); + public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid, RequestOptions options) { + return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @return the result */ - public RawResponse> list() { - return client.execute(listRequest(SessionsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE); + public RawResponse updateKybCompanyData(String sessionId, String companyUuid) { + return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * Asynchronous {@link #list(SessionsListParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * + * @param sessionId the {@code sessionId} + * @param companyUuid the {@code companyUuid} * @return a future completed with the result */ - public CompletableFuture>> listAsync() { - return client.executeAsync(listRequest(SessionsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE); + public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid) { + return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); } /** - * {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response. + * {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse share(String sessionId, SessionsShareParams params, RequestOptions options) { - return client.execute(shareRequest(sessionId, params), options, SHARE_RESPONSE); + public RawResponse updateKybParty(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params, RequestOptions options) { + return client.execute(updateKybPartyRequest(sessionId, partyUuid, params), options, UPDATE_KYB_PARTY_RESPONSE); } /** - * Asynchronous {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> shareAsync(String sessionId, SessionsShareParams params, RequestOptions options) { - return client.executeAsync(shareRequest(sessionId, params), options, SHARE_RESPONSE); + public CompletableFuture> updateKybPartyAsync(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params, RequestOptions options) { + return client.executeAsync(updateKybPartyRequest(sessionId, partyUuid, params), options, UPDATE_KYB_PARTY_RESPONSE); } /** - * {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @param params the request parameters * @return the result */ - public RawResponse share(String sessionId, SessionsShareParams params) { - return client.execute(shareRequest(sessionId, params), RequestOptions.none(), SHARE_RESPONSE); + public RawResponse updateKybParty(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params) { + return client.execute(updateKybPartyRequest(sessionId, partyUuid, params), RequestOptions.none(), UPDATE_KYB_PARTY_RESPONSE); } /** - * Asynchronous {@link #share(String, SessionsShareParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> shareAsync(String sessionId, SessionsShareParams params) { - return client.executeAsync(shareRequest(sessionId, params), RequestOptions.none(), SHARE_RESPONSE); + public CompletableFuture> updateKybPartyAsync(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params) { + return client.executeAsync(updateKybPartyRequest(sessionId, partyUuid, params), RequestOptions.none(), UPDATE_KYB_PARTY_RESPONSE); } /** - * {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response. + * {@link #listNetworks(String, RequestOptions)} with the raw response. * - * @param params the request parameters + * @param sessionId the {@code session_id} * @param options per-request options * @return the result */ - public RawResponse importShared(SessionsImportSharedParams params, RequestOptions options) { - return client.execute(importSharedRequest(params), options, IMPORT_SHARED_RESPONSE); + public RawResponse listNetworks(String sessionId, RequestOptions options) { + return client.execute(listNetworksRequest(sessionId), options, LIST_NETWORKS_RESPONSE); } /** - * Asynchronous {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listNetworks(String, RequestOptions)} with the raw response. * - * @param params the request parameters + * @param sessionId the {@code session_id} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> importSharedAsync(SessionsImportSharedParams params, RequestOptions options) { - return client.executeAsync(importSharedRequest(params), options, IMPORT_SHARED_RESPONSE); + public CompletableFuture> listNetworksAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listNetworksRequest(sessionId), options, LIST_NETWORKS_RESPONSE); } /** - * {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listNetworks(String, RequestOptions)} with the raw response, with the client's options. * - * @param params the request parameters + * @param sessionId the {@code session_id} * @return the result */ - public RawResponse importShared(SessionsImportSharedParams params) { - return client.execute(importSharedRequest(params), RequestOptions.none(), IMPORT_SHARED_RESPONSE); + public RawResponse listNetworks(String sessionId) { + return client.execute(listNetworksRequest(sessionId), RequestOptions.none(), LIST_NETWORKS_RESPONSE); } /** - * Asynchronous {@link #importShared(SessionsImportSharedParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listNetworks(String, RequestOptions)} with the raw response, with the client's options. * - * @param params the request parameters + * @param sessionId the {@code session_id} * @return a future completed with the result */ - public CompletableFuture> importSharedAsync(SessionsImportSharedParams params) { - return client.executeAsync(importSharedRequest(params), RequestOptions.none(), IMPORT_SHARED_RESPONSE); + public CompletableFuture> listNetworksAsync(String sessionId) { + return client.executeAsync(listNetworksRequest(sessionId), RequestOptions.none(), LIST_NETWORKS_RESPONSE); } /** - * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response. + * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response. * + * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse batchDelete(SessionsBatchDeleteParams params, RequestOptions options) { - return client.execute(batchDeleteRequest(params), options, BATCH_DELETE_RESPONSE); + public RawResponse previewResubmission(String sessionId, SessionsPreviewResubmissionParams params, RequestOptions options) { + return client.execute(previewResubmissionRequest(sessionId, params), options, PREVIEW_RESUBMISSION_RESPONSE); } /** - * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response. + * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response. * + * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> batchDeleteAsync(SessionsBatchDeleteParams params, RequestOptions options) { - return client.executeAsync(batchDeleteRequest(params), options, BATCH_DELETE_RESPONSE); + public CompletableFuture> previewResubmissionAsync(String sessionId, SessionsPreviewResubmissionParams params, RequestOptions options) { + return client.executeAsync(previewResubmissionRequest(sessionId, params), options, PREVIEW_RESUBMISSION_RESPONSE); } /** - * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, with the client's options. + * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, with the client's options. * + * @param sessionId the {@code sessionId} * @param params the request parameters * @return the result */ - public RawResponse batchDelete(SessionsBatchDeleteParams params) { - return client.execute(batchDeleteRequest(params), RequestOptions.none(), BATCH_DELETE_RESPONSE); + public RawResponse previewResubmission(String sessionId, SessionsPreviewResubmissionParams params) { + return client.execute(previewResubmissionRequest(sessionId, params), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); } /** - * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, with the client's options. * + * @param sessionId the {@code sessionId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> batchDeleteAsync(SessionsBatchDeleteParams params) { - return client.executeAsync(batchDeleteRequest(params), RequestOptions.none(), BATCH_DELETE_RESPONSE); + public CompletableFuture> previewResubmissionAsync(String sessionId, SessionsPreviewResubmissionParams params) { + return client.executeAsync(previewResubmissionRequest(sessionId, params), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); } /** - * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters. + * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters. * + * @param sessionId the {@code sessionId} * @param options per-request options * @return the result */ - public RawResponse batchDelete(RequestOptions options) { - return client.execute(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), options, BATCH_DELETE_RESPONSE); + public RawResponse previewResubmission(String sessionId, RequestOptions options) { + return client.execute(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), options, PREVIEW_RESUBMISSION_RESPONSE); } /** - * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters. * + * @param sessionId the {@code sessionId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> batchDeleteAsync(RequestOptions options) { - return client.executeAsync(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), options, BATCH_DELETE_RESPONSE); + public CompletableFuture> previewResubmissionAsync(String sessionId, RequestOptions options) { + return client.executeAsync(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), options, PREVIEW_RESUBMISSION_RESPONSE); } /** - * {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters, with the client's options. * + * @param sessionId the {@code sessionId} * @return the result */ - public RawResponse batchDelete() { - return client.execute(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), RequestOptions.none(), BATCH_DELETE_RESPONSE); + public RawResponse previewResubmission(String sessionId) { + return client.execute(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); } /** - * Asynchronous {@link #batchDelete(SessionsBatchDeleteParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters, with the client's options. * + * @param sessionId the {@code sessionId} * @return a future completed with the result */ - public CompletableFuture> batchDeleteAsync() { - return client.executeAsync(batchDeleteRequest(SessionsBatchDeleteParams.builder().build()), RequestOptions.none(), BATCH_DELETE_RESPONSE); + public CompletableFuture> previewResubmissionAsync(String sessionId) { + return client.executeAsync(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); } /** - * {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response. + * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response. * - * @param jobId the {@code job_id} + * @param sessionId the {@code sessionId} + * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse retrieveDeletionJob(String jobId, RequestOptions options) { - return client.execute(retrieveDeletionJobRequest(jobId), options, RETRIEVE_DELETION_JOB_RESPONSE); + public RawResponse updateDocumentAiData(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params, RequestOptions options) { + return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, params), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * Asynchronous {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response. + * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response. * - * @param jobId the {@code job_id} + * @param sessionId the {@code sessionId} + * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> retrieveDeletionJobAsync(String jobId, RequestOptions options) { - return client.executeAsync(retrieveDeletionJobRequest(jobId), options, RETRIEVE_DELETION_JOB_RESPONSE); + public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params, RequestOptions options) { + return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, params), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response, with the client's options. + * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, with the client's options. * - * @param jobId the {@code job_id} + * @param sessionId the {@code sessionId} + * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @return the result */ - public RawResponse retrieveDeletionJob(String jobId) { - return client.execute(retrieveDeletionJobRequest(jobId), RequestOptions.none(), RETRIEVE_DELETION_JOB_RESPONSE); + public RawResponse updateDocumentAiData(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params) { + return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, params), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * Asynchronous {@link #retrieveDeletionJob(String, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, with the client's options. * - * @param jobId the {@code job_id} + * @param sessionId the {@code sessionId} + * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> retrieveDeletionJobAsync(String jobId) { - return client.executeAsync(retrieveDeletionJobRequest(jobId), RequestOptions.none(), RETRIEVE_DELETION_JOB_RESPONSE); + public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params) { + return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, params), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response. + * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param documentUuid the {@code documentUuid} * @param options per-request options * @return the result */ - public RawResponse updateData(String sessionId, SessionsUpdateDataParams params, RequestOptions options) { - return client.execute(updateDataRequest(sessionId, params), options, UPDATE_DATA_RESPONSE); + public RawResponse updateDocumentAiData(String sessionId, String documentUuid, RequestOptions options) { + return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param documentUuid the {@code documentUuid} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateDataAsync(String sessionId, SessionsUpdateDataParams params, RequestOptions options) { - return client.executeAsync(updateDataRequest(sessionId, params), options, UPDATE_DATA_RESPONSE); + public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid, RequestOptions options) { + return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param documentUuid the {@code documentUuid} * @return the result */ - public RawResponse updateData(String sessionId, SessionsUpdateDataParams params) { - return client.execute(updateDataRequest(sessionId, params), RequestOptions.none(), UPDATE_DATA_RESPONSE); + public RawResponse updateDocumentAiData(String sessionId, String documentUuid) { + return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param documentUuid the {@code documentUuid} * @return a future completed with the result */ - public CompletableFuture> updateDataAsync(String sessionId, SessionsUpdateDataParams params) { - return client.executeAsync(updateDataRequest(sessionId, params), RequestOptions.none(), UPDATE_DATA_RESPONSE); + public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid) { + return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); } /** - * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters. + * {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @param options per-request options * @return the result */ - public RawResponse updateData(String sessionId, RequestOptions options) { - return client.execute(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), options, UPDATE_DATA_RESPONSE); + public RawResponse regenerateKybParty(String sessionId, String partyUuid, RequestOptions options) { + return client.execute(regenerateKybPartyRequest(sessionId, partyUuid), options, REGENERATE_KYB_PARTY_RESPONSE); } /** - * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateDataAsync(String sessionId, RequestOptions options) { - return client.executeAsync(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), options, UPDATE_DATA_RESPONSE); + public CompletableFuture> regenerateKybPartyAsync(String sessionId, String partyUuid, RequestOptions options) { + return client.executeAsync(regenerateKybPartyRequest(sessionId, partyUuid), options, REGENERATE_KYB_PARTY_RESPONSE); } /** - * {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @return the result */ - public RawResponse updateData(String sessionId) { - return client.execute(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), RequestOptions.none(), UPDATE_DATA_RESPONSE); + public RawResponse regenerateKybParty(String sessionId, String partyUuid) { + return client.execute(regenerateKybPartyRequest(sessionId, partyUuid), RequestOptions.none(), REGENERATE_KYB_PARTY_RESPONSE); } /** - * Asynchronous {@link #updateData(String, SessionsUpdateDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param partyUuid the {@code partyUuid} * @return a future completed with the result */ - public CompletableFuture> updateDataAsync(String sessionId) { - return client.executeAsync(updateDataRequest(sessionId, SessionsUpdateDataParams.builder().build()), RequestOptions.none(), UPDATE_DATA_RESPONSE); + public CompletableFuture> regenerateKybPartyAsync(String sessionId, String partyUuid) { + return client.executeAsync(regenerateKybPartyRequest(sessionId, partyUuid), RequestOptions.none(), REGENERATE_KYB_PARTY_RESPONSE); } /** - * {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response. + * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param nodeId the {@code nodeId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateFeatureStatus(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params, RequestOptions options) { - return client.execute(updateFeatureStatusRequest(sessionId, nodeId, params), options, UPDATE_FEATURE_STATUS_RESPONSE); + public RawResponse> listEvents(String sessionId, SessionsListEventsParams params, RequestOptions options) { + return client.execute(listEventsRequest(sessionId, params), options, LIST_EVENTS_RESPONSE); } /** - * Asynchronous {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param nodeId the {@code nodeId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateFeatureStatusAsync(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params, RequestOptions options) { - return client.executeAsync(updateFeatureStatusRequest(sessionId, nodeId, params), options, UPDATE_FEATURE_STATUS_RESPONSE); + public CompletableFuture>> listEventsAsync(String sessionId, SessionsListEventsParams params, RequestOptions options) { + return client.executeAsync(listEventsRequest(sessionId, params), options, LIST_EVENTS_RESPONSE); } /** - * {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param nodeId the {@code nodeId} * @param params the request parameters * @return the result */ - public RawResponse updateFeatureStatus(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params) { - return client.execute(updateFeatureStatusRequest(sessionId, nodeId, params), RequestOptions.none(), UPDATE_FEATURE_STATUS_RESPONSE); + public RawResponse> listEvents(String sessionId, SessionsListEventsParams params) { + return client.execute(listEventsRequest(sessionId, params), RequestOptions.none(), LIST_EVENTS_RESPONSE); } /** - * Asynchronous {@link #updateFeatureStatus(String, String, SessionsUpdateFeatureStatusParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param nodeId the {@code nodeId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateFeatureStatusAsync(String sessionId, String nodeId, SessionsUpdateFeatureStatusParams params) { - return client.executeAsync(updateFeatureStatusRequest(sessionId, nodeId, params), RequestOptions.none(), UPDATE_FEATURE_STATUS_RESPONSE); + public CompletableFuture>> listEventsAsync(String sessionId, SessionsListEventsParams params) { + return client.executeAsync(listEventsRequest(sessionId, params), RequestOptions.none(), LIST_EVENTS_RESPONSE); } /** - * {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response. + * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateAmlHitStatus(String sessionId, SessionsUpdateAmlHitStatusParams params, RequestOptions options) { - return client.execute(updateAmlHitStatusRequest(sessionId, params), options, UPDATE_AML_HIT_STATUS_RESPONSE); + public RawResponse> listEvents(String sessionId, RequestOptions options) { + return client.execute(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), options, LIST_EVENTS_RESPONSE); } /** - * Asynchronous {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateAmlHitStatusAsync(String sessionId, SessionsUpdateAmlHitStatusParams params, RequestOptions options) { - return client.executeAsync(updateAmlHitStatusRequest(sessionId, params), options, UPDATE_AML_HIT_STATUS_RESPONSE); + public CompletableFuture>> listEventsAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), options, LIST_EVENTS_RESPONSE); } /** - * {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse updateAmlHitStatus(String sessionId, SessionsUpdateAmlHitStatusParams params) { - return client.execute(updateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_HIT_STATUS_RESPONSE); + public RawResponse> listEvents(String sessionId) { + return client.execute(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), RequestOptions.none(), LIST_EVENTS_RESPONSE); } /** - * Asynchronous {@link #updateAmlHitStatus(String, SessionsUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateAmlHitStatusAsync(String sessionId, SessionsUpdateAmlHitStatusParams params) { - return client.executeAsync(updateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_HIT_STATUS_RESPONSE); + public CompletableFuture>> listEventsAsync(String sessionId) { + return client.executeAsync(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), RequestOptions.none(), LIST_EVENTS_RESPONSE); } /** - * {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response. + * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse bulkUpdateAmlHitStatus(String sessionId, SessionsBulkUpdateAmlHitStatusParams params, RequestOptions options) { - return client.execute(bulkUpdateAmlHitStatusRequest(sessionId, params), options, BULK_UPDATE_AML_HIT_STATUS_RESPONSE); + public RawResponse> listAmlScreeningHistory(String sessionId, SessionsListAmlScreeningHistoryParams params, RequestOptions options) { + return client.execute(listAmlScreeningHistoryRequest(sessionId, params), options, LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> bulkUpdateAmlHitStatusAsync(String sessionId, SessionsBulkUpdateAmlHitStatusParams params, RequestOptions options) { - return client.executeAsync(bulkUpdateAmlHitStatusRequest(sessionId, params), options, BULK_UPDATE_AML_HIT_STATUS_RESPONSE); + public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId, SessionsListAmlScreeningHistoryParams params, RequestOptions options) { + return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, params), options, LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} * @param params the request parameters * @return the result */ - public RawResponse bulkUpdateAmlHitStatus(String sessionId, SessionsBulkUpdateAmlHitStatusParams params) { - return client.execute(bulkUpdateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), BULK_UPDATE_AML_HIT_STATUS_RESPONSE); + public RawResponse> listAmlScreeningHistory(String sessionId, SessionsListAmlScreeningHistoryParams params) { + return client.execute(listAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #bulkUpdateAmlHitStatus(String, SessionsBulkUpdateAmlHitStatusParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> bulkUpdateAmlHitStatusAsync(String sessionId, SessionsBulkUpdateAmlHitStatusParams params) { - return client.executeAsync(bulkUpdateAmlHitStatusRequest(sessionId, params), RequestOptions.none(), BULK_UPDATE_AML_HIT_STATUS_RESPONSE); + public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId, SessionsListAmlScreeningHistoryParams params) { + return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response. + * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updatePoaData(String sessionId, SessionsUpdatePoaDataParams params, RequestOptions options) { - return client.execute(updatePoaDataRequest(sessionId, params), options, UPDATE_POA_DATA_RESPONSE); + public RawResponse> listAmlScreeningHistory(String sessionId, RequestOptions options) { + return client.execute(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), options, LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updatePoaDataAsync(String sessionId, SessionsUpdatePoaDataParams params, RequestOptions options) { - return client.executeAsync(updatePoaDataRequest(sessionId, params), options, UPDATE_POA_DATA_RESPONSE); + public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), options, LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse updatePoaData(String sessionId, SessionsUpdatePoaDataParams params) { - return client.execute(updatePoaDataRequest(sessionId, params), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); + public RawResponse> listAmlScreeningHistory(String sessionId) { + return client.execute(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updatePoaDataAsync(String sessionId, SessionsUpdatePoaDataParams params) { - return client.executeAsync(updatePoaDataRequest(sessionId, params), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); + public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId) { + return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters. + * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updatePoaData(String sessionId, RequestOptions options) { - return client.execute(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), options, UPDATE_POA_DATA_RESPONSE); + public RawResponse exportAmlScreeningHistory(String sessionId, SessionsExportAmlScreeningHistoryParams params, RequestOptions options) { + return client.execute(exportAmlScreeningHistoryRequest(sessionId, params), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updatePoaDataAsync(String sessionId, RequestOptions options) { - return client.executeAsync(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), options, UPDATE_POA_DATA_RESPONSE); + public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId, SessionsExportAmlScreeningHistoryParams params, RequestOptions options) { + return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, params), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return the result */ - public RawResponse updatePoaData(String sessionId) { - return client.execute(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); + public RawResponse exportAmlScreeningHistory(String sessionId, SessionsExportAmlScreeningHistoryParams params) { + return client.execute(exportAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #updatePoaData(String, SessionsUpdatePoaDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updatePoaDataAsync(String sessionId) { - return client.executeAsync(updatePoaDataRequest(sessionId, SessionsUpdatePoaDataParams.builder().build()), RequestOptions.none(), UPDATE_POA_DATA_RESPONSE); + public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId, SessionsExportAmlScreeningHistoryParams params) { + return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response. + * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateKybCompanyData(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params, RequestOptions options) { - return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, params), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); + public RawResponse exportAmlScreeningHistory(String sessionId, RequestOptions options) { + return client.execute(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response. + * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params, RequestOptions options) { - return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, params), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); + public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId, RequestOptions options) { + return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, with the client's options. + * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} - * @param params the request parameters * @return the result */ - public RawResponse updateKybCompanyData(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params) { - return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, params), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); + public RawResponse exportAmlScreeningHistory(String sessionId) { + return client.execute(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid, SessionsUpdateKybCompanyDataParams params) { - return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, params), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); + public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId) { + return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); } /** - * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters. + * {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateKybCompanyData(String sessionId, String companyUuid, RequestOptions options) { - return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); + public RawResponse addImages(String sessionId, SessionsAddImagesParams params, RequestOptions options) { + return client.execute(addImagesRequest(sessionId, params), options, ADD_IMAGES_RESPONSE); } /** - * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid, RequestOptions options) { - return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), options, UPDATE_KYB_COMPANY_DATA_RESPONSE); + public CompletableFuture> addImagesAsync(String sessionId, SessionsAddImagesParams params, RequestOptions options) { + return client.executeAsync(addImagesRequest(sessionId, params), options, ADD_IMAGES_RESPONSE); } /** - * {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} + * @param params the request parameters * @return the result */ - public RawResponse updateKybCompanyData(String sessionId, String companyUuid) { - return client.execute(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); + public RawResponse addImages(String sessionId, SessionsAddImagesParams params) { + return client.execute(addImagesRequest(sessionId, params), RequestOptions.none(), ADD_IMAGES_RESPONSE); } /** - * Asynchronous {@link #updateKybCompanyData(String, String, SessionsUpdateKybCompanyDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param companyUuid the {@code companyUuid} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateKybCompanyDataAsync(String sessionId, String companyUuid) { - return client.executeAsync(updateKybCompanyDataRequest(sessionId, companyUuid, SessionsUpdateKybCompanyDataParams.builder().build()), RequestOptions.none(), UPDATE_KYB_COMPANY_DATA_RESPONSE); + public CompletableFuture> addImagesAsync(String sessionId, SessionsAddImagesParams params) { + return client.executeAsync(addImagesRequest(sessionId, params), RequestOptions.none(), ADD_IMAGES_RESPONSE); } /** - * {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response. + * {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateKybParty(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params, RequestOptions options) { - return client.execute(updateKybPartyRequest(sessionId, partyUuid, params), options, UPDATE_KYB_PARTY_RESPONSE); + public RawResponse updateAmlStatus(String sessionId, SessionsUpdateAmlStatusParams params, RequestOptions options) { + return client.execute(updateAmlStatusRequest(sessionId, params), options, UPDATE_AML_STATUS_RESPONSE); } /** - * Asynchronous {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateKybPartyAsync(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params, RequestOptions options) { - return client.executeAsync(updateKybPartyRequest(sessionId, partyUuid, params), options, UPDATE_KYB_PARTY_RESPONSE); + public CompletableFuture> updateAmlStatusAsync(String sessionId, SessionsUpdateAmlStatusParams params, RequestOptions options) { + return client.executeAsync(updateAmlStatusRequest(sessionId, params), options, UPDATE_AML_STATUS_RESPONSE); } /** - * {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} * @param params the request parameters * @return the result */ - public RawResponse updateKybParty(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params) { - return client.execute(updateKybPartyRequest(sessionId, partyUuid, params), RequestOptions.none(), UPDATE_KYB_PARTY_RESPONSE); + public RawResponse updateAmlStatus(String sessionId, SessionsUpdateAmlStatusParams params) { + return client.execute(updateAmlStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_STATUS_RESPONSE); } /** - * Asynchronous {@link #updateKybParty(String, String, SessionsUpdateKybPartyParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateKybPartyAsync(String sessionId, String partyUuid, SessionsUpdateKybPartyParams params) { - return client.executeAsync(updateKybPartyRequest(sessionId, partyUuid, params), RequestOptions.none(), UPDATE_KYB_PARTY_RESPONSE); + public CompletableFuture> updateAmlStatusAsync(String sessionId, SessionsUpdateAmlStatusParams params) { + return client.executeAsync(updateAmlStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_STATUS_RESPONSE); } /** - * {@link #listNetworks(String, RequestOptions)} with the raw response. + * {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response. * - * @param sessionId the {@code session_id} + * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse listNetworks(String sessionId, RequestOptions options) { - return client.execute(listNetworksRequest(sessionId), options, LIST_NETWORKS_RESPONSE); + public RawResponse simulate(String sessionId, SandboxSimulateRequest params, RequestOptions options) { + return client.execute(simulateRequest(sessionId, params), options, SIMULATE_RESPONSE); } /** - * Asynchronous {@link #listNetworks(String, RequestOptions)} with the raw response. + * Asynchronous {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response. * - * @param sessionId the {@code session_id} + * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> listNetworksAsync(String sessionId, RequestOptions options) { - return client.executeAsync(listNetworksRequest(sessionId), options, LIST_NETWORKS_RESPONSE); + public CompletableFuture> simulateAsync(String sessionId, SandboxSimulateRequest params, RequestOptions options) { + return client.executeAsync(simulateRequest(sessionId, params), options, SIMULATE_RESPONSE); } /** - * {@link #listNetworks(String, RequestOptions)} with the raw response, with the client's options. + * {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response, with the client's options. * - * @param sessionId the {@code session_id} + * @param sessionId the {@code sessionId} + * @param params the request parameters * @return the result */ - public RawResponse listNetworks(String sessionId) { - return client.execute(listNetworksRequest(sessionId), RequestOptions.none(), LIST_NETWORKS_RESPONSE); + public RawResponse simulate(String sessionId, SandboxSimulateRequest params) { + return client.execute(simulateRequest(sessionId, params), RequestOptions.none(), SIMULATE_RESPONSE); } /** - * Asynchronous {@link #listNetworks(String, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response, with the client's options. * - * @param sessionId the {@code session_id} + * @param sessionId the {@code sessionId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> listNetworksAsync(String sessionId) { - return client.executeAsync(listNetworksRequest(sessionId), RequestOptions.none(), LIST_NETWORKS_RESPONSE); + public CompletableFuture> simulateAsync(String sessionId, SandboxSimulateRequest params) { + return client.executeAsync(simulateRequest(sessionId, params), RequestOptions.none(), SIMULATE_RESPONSE); } /** - * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response. + * {@link #listFeatureOverrides(String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse previewResubmission(String sessionId, SessionsPreviewResubmissionParams params, RequestOptions options) { - return client.execute(previewResubmissionRequest(sessionId, params), options, PREVIEW_RESUBMISSION_RESPONSE); + public RawResponse listFeatureOverrides(String sessionId, RequestOptions options) { + return client.execute(listFeatureOverridesRequest(sessionId), options, LIST_FEATURE_OVERRIDES_RESPONSE); } /** - * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listFeatureOverrides(String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> previewResubmissionAsync(String sessionId, SessionsPreviewResubmissionParams params, RequestOptions options) { - return client.executeAsync(previewResubmissionRequest(sessionId, params), options, PREVIEW_RESUBMISSION_RESPONSE); + public CompletableFuture> listFeatureOverridesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listFeatureOverridesRequest(sessionId), options, LIST_FEATURE_OVERRIDES_RESPONSE); } /** - * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listFeatureOverrides(String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse previewResubmission(String sessionId, SessionsPreviewResubmissionParams params) { - return client.execute(previewResubmissionRequest(sessionId, params), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); + public RawResponse listFeatureOverrides(String sessionId) { + return client.execute(listFeatureOverridesRequest(sessionId), RequestOptions.none(), LIST_FEATURE_OVERRIDES_RESPONSE); } /** - * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listFeatureOverrides(String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> previewResubmissionAsync(String sessionId, SessionsPreviewResubmissionParams params) { - return client.executeAsync(previewResubmissionRequest(sessionId, params), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); + public CompletableFuture> listFeatureOverridesAsync(String sessionId) { + return client.executeAsync(listFeatureOverridesRequest(sessionId), RequestOptions.none(), LIST_FEATURE_OVERRIDES_RESPONSE); } /** - * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters. + * {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param overrideId the {@code overrideId} * @param options per-request options * @return the result */ - public RawResponse previewResubmission(String sessionId, RequestOptions options) { - return client.execute(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), options, PREVIEW_RESUBMISSION_RESPONSE); + public RawResponse cancelFeatureOverride(String sessionId, String overrideId, RequestOptions options) { + return client.execute(cancelFeatureOverrideRequest(sessionId, overrideId), options, CANCEL_FEATURE_OVERRIDE_RESPONSE); } /** - * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param overrideId the {@code overrideId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> previewResubmissionAsync(String sessionId, RequestOptions options) { - return client.executeAsync(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), options, PREVIEW_RESUBMISSION_RESPONSE); + public CompletableFuture> cancelFeatureOverrideAsync(String sessionId, String overrideId, RequestOptions options) { + return client.executeAsync(cancelFeatureOverrideRequest(sessionId, overrideId), options, CANCEL_FEATURE_OVERRIDE_RESPONSE); } /** - * {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param overrideId the {@code overrideId} * @return the result */ - public RawResponse previewResubmission(String sessionId) { - return client.execute(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); + public RawResponse cancelFeatureOverride(String sessionId, String overrideId) { + return client.execute(cancelFeatureOverrideRequest(sessionId, overrideId), RequestOptions.none(), CANCEL_FEATURE_OVERRIDE_RESPONSE); } /** - * Asynchronous {@link #previewResubmission(String, SessionsPreviewResubmissionParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param overrideId the {@code overrideId} * @return a future completed with the result */ - public CompletableFuture> previewResubmissionAsync(String sessionId) { - return client.executeAsync(previewResubmissionRequest(sessionId, SessionsPreviewResubmissionParams.builder().build()), RequestOptions.none(), PREVIEW_RESUBMISSION_RESPONSE); + public CompletableFuture> cancelFeatureOverrideAsync(String sessionId, String overrideId) { + return client.executeAsync(cancelFeatureOverrideRequest(sessionId, overrideId), RequestOptions.none(), CANCEL_FEATURE_OVERRIDE_RESPONSE); } /** - * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response. + * {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateDocumentAiData(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params, RequestOptions options) { - return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, params), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public RawResponse previewDecisionEmail(String sessionId, SessionsPreviewDecisionEmailParams params, RequestOptions options) { + return client.execute(previewDecisionEmailRequest(sessionId, params), options, PREVIEW_DECISION_EMAIL_RESPONSE); } /** - * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response. + * Asynchronous {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params, RequestOptions options) { - return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, params), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public CompletableFuture> previewDecisionEmailAsync(String sessionId, SessionsPreviewDecisionEmailParams params, RequestOptions options) { + return client.executeAsync(previewDecisionEmailRequest(sessionId, params), options, PREVIEW_DECISION_EMAIL_RESPONSE); } /** - * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, with the client's options. + * {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} * @param params the request parameters * @return the result */ - public RawResponse updateDocumentAiData(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params) { - return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, params), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public RawResponse previewDecisionEmail(String sessionId, SessionsPreviewDecisionEmailParams params) { + return client.execute(previewDecisionEmailRequest(sessionId, params), RequestOptions.none(), PREVIEW_DECISION_EMAIL_RESPONSE); } /** - * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid, SessionsUpdateDocumentAiDataParams params) { - return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, params), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public CompletableFuture> previewDecisionEmailAsync(String sessionId, SessionsPreviewDecisionEmailParams params) { + return client.executeAsync(previewDecisionEmailRequest(sessionId, params), RequestOptions.none(), PREVIEW_DECISION_EMAIL_RESPONSE); } /** - * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters. + * {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse updateDocumentAiData(String sessionId, String documentUuid, RequestOptions options) { - return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public RawResponse uploadKybDocuments(String sessionId, SessionsUploadKybDocumentsParams params, RequestOptions options) { + return client.execute(uploadKybDocumentsRequest(sessionId, params), options, UPLOAD_KYB_DOCUMENTS_RESPONSE); } /** - * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid, RequestOptions options) { - return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), options, UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public CompletableFuture> uploadKybDocumentsAsync(String sessionId, SessionsUploadKybDocumentsParams params, RequestOptions options) { + return client.executeAsync(uploadKybDocumentsRequest(sessionId, params), options, UPLOAD_KYB_DOCUMENTS_RESPONSE); } /** - * {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @return the result */ - public RawResponse updateDocumentAiData(String sessionId, String documentUuid) { - return client.execute(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public RawResponse uploadKybDocuments(String sessionId, SessionsUploadKybDocumentsParams params) { + return client.execute(uploadKybDocumentsRequest(sessionId, params), RequestOptions.none(), UPLOAD_KYB_DOCUMENTS_RESPONSE); } /** - * Asynchronous {@link #updateDocumentAiData(String, String, SessionsUpdateDocumentAiDataParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #uploadKybDocuments(String, SessionsUploadKybDocumentsParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param documentUuid the {@code documentUuid} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> updateDocumentAiDataAsync(String sessionId, String documentUuid) { - return client.executeAsync(updateDocumentAiDataRequest(sessionId, documentUuid, SessionsUpdateDocumentAiDataParams.builder().build()), RequestOptions.none(), UPDATE_DOCUMENT_AI_DATA_RESPONSE); + public CompletableFuture> uploadKybDocumentsAsync(String sessionId, SessionsUploadKybDocumentsParams params) { + return client.executeAsync(uploadKybDocumentsRequest(sessionId, params), RequestOptions.none(), UPLOAD_KYB_DOCUMENTS_RESPONSE); } /** - * {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response. + * {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse regenerateKybParty(String sessionId, String partyUuid, RequestOptions options) { - return client.execute(regenerateKybPartyRequest(sessionId, partyUuid), options, REGENERATE_KYB_PARTY_RESPONSE); + public RawResponse listKybExtractedParties(String sessionId, SessionsListKybExtractedPartiesParams params, RequestOptions options) { + return client.execute(listKybExtractedPartiesRequest(sessionId, params), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * Asynchronous {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response. + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> regenerateKybPartyAsync(String sessionId, String partyUuid, RequestOptions options) { - return client.executeAsync(regenerateKybPartyRequest(sessionId, partyUuid), options, REGENERATE_KYB_PARTY_RESPONSE); + public CompletableFuture> listKybExtractedPartiesAsync(String sessionId, SessionsListKybExtractedPartiesParams params, RequestOptions options) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, params), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response, with the client's options. + * {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} + * @param params the request parameters * @return the result */ - public RawResponse regenerateKybParty(String sessionId, String partyUuid) { - return client.execute(regenerateKybPartyRequest(sessionId, partyUuid), RequestOptions.none(), REGENERATE_KYB_PARTY_RESPONSE); + public RawResponse listKybExtractedParties(String sessionId, SessionsListKybExtractedPartiesParams params) { + return client.execute(listKybExtractedPartiesRequest(sessionId, params), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * Asynchronous {@link #regenerateKybParty(String, String, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param partyUuid the {@code partyUuid} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> regenerateKybPartyAsync(String sessionId, String partyUuid) { - return client.executeAsync(regenerateKybPartyRequest(sessionId, partyUuid), RequestOptions.none(), REGENERATE_KYB_PARTY_RESPONSE); + public CompletableFuture> listKybExtractedPartiesAsync(String sessionId, SessionsListKybExtractedPartiesParams params) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, params), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response. + * {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse> listEvents(String sessionId, SessionsListEventsParams params, RequestOptions options) { - return client.execute(listEventsRequest(sessionId, params), options, LIST_EVENTS_RESPONSE); + public RawResponse listKybExtractedParties(String sessionId, RequestOptions options) { + return client.execute(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture>> listEventsAsync(String sessionId, SessionsListEventsParams params, RequestOptions options) { - return client.executeAsync(listEventsRequest(sessionId, params), options, LIST_EVENTS_RESPONSE); + public CompletableFuture> listKybExtractedPartiesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), options, LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse> listEvents(String sessionId, SessionsListEventsParams params) { - return client.execute(listEventsRequest(sessionId, params), RequestOptions.none(), LIST_EVENTS_RESPONSE); + public RawResponse listKybExtractedParties(String sessionId) { + return client.execute(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listKybExtractedParties(String, SessionsListKybExtractedPartiesParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture>> listEventsAsync(String sessionId, SessionsListEventsParams params) { - return client.executeAsync(listEventsRequest(sessionId, params), RequestOptions.none(), LIST_EVENTS_RESPONSE); + public CompletableFuture> listKybExtractedPartiesAsync(String sessionId) { + return client.executeAsync(listKybExtractedPartiesRequest(sessionId, SessionsListKybExtractedPartiesParams.builder().build()), RequestOptions.none(), LIST_KYB_EXTRACTED_PARTIES_RESPONSE); } /** - * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters. + * {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse> listEvents(String sessionId, RequestOptions options) { - return client.execute(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), options, LIST_EVENTS_RESPONSE); + public RawResponse listKybPartyDrafts(String sessionId, SessionsListKybPartyDraftsParams params, RequestOptions options) { + return client.execute(listKybPartyDraftsRequest(sessionId, params), options, LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture>> listEventsAsync(String sessionId, RequestOptions options) { - return client.executeAsync(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), options, LIST_EVENTS_RESPONSE); + public CompletableFuture> listKybPartyDraftsAsync(String sessionId, SessionsListKybPartyDraftsParams params, RequestOptions options) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, params), options, LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return the result */ - public RawResponse> listEvents(String sessionId) { - return client.execute(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), RequestOptions.none(), LIST_EVENTS_RESPONSE); + public RawResponse listKybPartyDrafts(String sessionId, SessionsListKybPartyDraftsParams params) { + return client.execute(listKybPartyDraftsRequest(sessionId, params), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * Asynchronous {@link #listEvents(String, SessionsListEventsParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture>> listEventsAsync(String sessionId) { - return client.executeAsync(listEventsRequest(sessionId, SessionsListEventsParams.builder().build()), RequestOptions.none(), LIST_EVENTS_RESPONSE); + public CompletableFuture> listKybPartyDraftsAsync(String sessionId, SessionsListKybPartyDraftsParams params) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, params), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response. + * {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse> listAmlScreeningHistory(String sessionId, SessionsListAmlScreeningHistoryParams params, RequestOptions options) { - return client.execute(listAmlScreeningHistoryRequest(sessionId, params), options, LIST_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse listKybPartyDrafts(String sessionId, RequestOptions options) { + return client.execute(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), options, LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response. + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId, SessionsListAmlScreeningHistoryParams params, RequestOptions options) { - return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, params), options, LIST_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> listKybPartyDraftsAsync(String sessionId, RequestOptions options) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), options, LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. + * {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return the result */ - public RawResponse> listAmlScreeningHistory(String sessionId, SessionsListAmlScreeningHistoryParams params) { - return client.execute(listAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse listKybPartyDrafts(String sessionId) { + return client.execute(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #listKybPartyDrafts(String, SessionsListKybPartyDraftsParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId, SessionsListAmlScreeningHistoryParams params) { - return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> listKybPartyDraftsAsync(String sessionId) { + return client.executeAsync(listKybPartyDraftsRequest(sessionId, SessionsListKybPartyDraftsParams.builder().build()), RequestOptions.none(), LIST_KYB_PARTY_DRAFTS_RESPONSE); } /** - * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. + * {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse> listAmlScreeningHistory(String sessionId, RequestOptions options) { - return client.execute(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), options, LIST_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse createKybPartyDraft(String sessionId, SessionsCreateKybPartyDraftParams params, RequestOptions options) { + return client.execute(createKybPartyDraftRequest(sessionId, params), options, CREATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId, RequestOptions options) { - return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), options, LIST_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> createKybPartyDraftAsync(String sessionId, SessionsCreateKybPartyDraftParams params, RequestOptions options) { + return client.executeAsync(createKybPartyDraftRequest(sessionId, params), options, CREATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return the result */ - public RawResponse> listAmlScreeningHistory(String sessionId) { - return client.execute(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse createKybPartyDraft(String sessionId, SessionsCreateKybPartyDraftParams params) { + return client.execute(createKybPartyDraftRequest(sessionId, params), RequestOptions.none(), CREATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #listAmlScreeningHistory(String, SessionsListAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #createKybPartyDraft(String, SessionsCreateKybPartyDraftParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture>> listAmlScreeningHistoryAsync(String sessionId) { - return client.executeAsync(listAmlScreeningHistoryRequest(sessionId, SessionsListAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), LIST_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> createKybPartyDraftAsync(String sessionId, SessionsCreateKybPartyDraftParams params) { + return client.executeAsync(createKybPartyDraftRequest(sessionId, params), RequestOptions.none(), CREATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response. + * {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse exportAmlScreeningHistory(String sessionId, SessionsExportAmlScreeningHistoryParams params, RequestOptions options) { - return client.execute(exportAmlScreeningHistoryRequest(sessionId, params), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse updateKybPartyDraft(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params, RequestOptions options) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, params), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response. + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId, SessionsExportAmlScreeningHistoryParams params, RequestOptions options) { - return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, params), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> updateKybPartyDraftAsync(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params, RequestOptions options) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, params), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. + * {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @return the result */ - public RawResponse exportAmlScreeningHistory(String sessionId, SessionsExportAmlScreeningHistoryParams params) { - return client.execute(exportAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse updateKybPartyDraft(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId, SessionsExportAmlScreeningHistoryParams params) { - return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, params), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> updateKybPartyDraftAsync(String sessionId, String draftId, SessionsUpdateKybPartyDraftParams params) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. + * {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param options per-request options * @return the result */ - public RawResponse exportAmlScreeningHistory(String sessionId, RequestOptions options) { - return client.execute(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse updateKybPartyDraft(String sessionId, String draftId, RequestOptions options) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters. + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId, RequestOptions options) { - return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), options, EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> updateKybPartyDraftAsync(String sessionId, String draftId, RequestOptions options) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), options, UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @return the result */ - public RawResponse exportAmlScreeningHistory(String sessionId) { - return client.execute(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public RawResponse updateKybPartyDraft(String sessionId, String draftId) { + return client.execute(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #exportAmlScreeningHistory(String, SessionsExportAmlScreeningHistoryParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * Asynchronous {@link #updateKybPartyDraft(String, String, SessionsUpdateKybPartyDraftParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @return a future completed with the result */ - public CompletableFuture> exportAmlScreeningHistoryAsync(String sessionId) { - return client.executeAsync(exportAmlScreeningHistoryRequest(sessionId, SessionsExportAmlScreeningHistoryParams.builder().build()), RequestOptions.none(), EXPORT_AML_SCREENING_HISTORY_RESPONSE); + public CompletableFuture> updateKybPartyDraftAsync(String sessionId, String draftId) { + return client.executeAsync(updateKybPartyDraftRequest(sessionId, draftId, SessionsUpdateKybPartyDraftParams.builder().build()), RequestOptions.none(), UPDATE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response. + * {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse addImages(String sessionId, SessionsAddImagesParams params, RequestOptions options) { - return client.execute(addImagesRequest(sessionId, params), options, ADD_IMAGES_RESPONSE); + public RawResponse<@Nullable Void> deleteKybPartyDraft(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params, RequestOptions options) { + return client.execute(deleteKybPartyDraftRequest(sessionId, draftId, params), options, DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response. + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> addImagesAsync(String sessionId, SessionsAddImagesParams params, RequestOptions options) { - return client.executeAsync(addImagesRequest(sessionId, params), options, ADD_IMAGES_RESPONSE); + public CompletableFuture> deleteKybPartyDraftAsync(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params, RequestOptions options) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, params), options, DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response, with the client's options. + * {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @return the result */ - public RawResponse addImages(String sessionId, SessionsAddImagesParams params) { - return client.execute(addImagesRequest(sessionId, params), RequestOptions.none(), ADD_IMAGES_RESPONSE); + public RawResponse<@Nullable Void> deleteKybPartyDraft(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params) { + return client.execute(deleteKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #addImages(String, SessionsAddImagesParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} + * @param draftId the {@code draftId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> addImagesAsync(String sessionId, SessionsAddImagesParams params) { - return client.executeAsync(addImagesRequest(sessionId, params), RequestOptions.none(), ADD_IMAGES_RESPONSE); + public CompletableFuture> deleteKybPartyDraftAsync(String sessionId, String draftId, SessionsDeleteKybPartyDraftParams params) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, params), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response. + * {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param draftId the {@code draftId} * @param options per-request options * @return the result */ - public RawResponse updateAmlStatus(String sessionId, SessionsUpdateAmlStatusParams params, RequestOptions options) { - return client.execute(updateAmlStatusRequest(sessionId, params), options, UPDATE_AML_STATUS_RESPONSE); + public RawResponse<@Nullable Void> deleteKybPartyDraft(String sessionId, String draftId, RequestOptions options) { + return client.execute(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), options, DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response. + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param draftId the {@code draftId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> updateAmlStatusAsync(String sessionId, SessionsUpdateAmlStatusParams params, RequestOptions options) { - return client.executeAsync(updateAmlStatusRequest(sessionId, params), options, UPDATE_AML_STATUS_RESPONSE); + public CompletableFuture> deleteKybPartyDraftAsync(String sessionId, String draftId, RequestOptions options) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), options, DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response, with the client's options. + * {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param draftId the {@code draftId} * @return the result */ - public RawResponse updateAmlStatus(String sessionId, SessionsUpdateAmlStatusParams params) { - return client.execute(updateAmlStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_STATUS_RESPONSE); + public RawResponse<@Nullable Void> deleteKybPartyDraft(String sessionId, String draftId) { + return client.execute(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * Asynchronous {@link #updateAmlStatus(String, SessionsUpdateAmlStatusParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #deleteKybPartyDraft(String, String, SessionsDeleteKybPartyDraftParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param draftId the {@code draftId} * @return a future completed with the result */ - public CompletableFuture> updateAmlStatusAsync(String sessionId, SessionsUpdateAmlStatusParams params) { - return client.executeAsync(updateAmlStatusRequest(sessionId, params), RequestOptions.none(), UPDATE_AML_STATUS_RESPONSE); + public CompletableFuture> deleteKybPartyDraftAsync(String sessionId, String draftId) { + return client.executeAsync(deleteKybPartyDraftRequest(sessionId, draftId, SessionsDeleteKybPartyDraftParams.builder().build()), RequestOptions.none(), DELETE_KYB_PARTY_DRAFT_RESPONSE); } /** - * {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response. + * {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return the result */ - public RawResponse simulate(String sessionId, SandboxSimulateRequest params, RequestOptions options) { - return client.execute(simulateRequest(sessionId, params), options, SIMULATE_RESPONSE); + public RawResponse submitKybParties(String sessionId, SessionsSubmitKybPartiesParams params, RequestOptions options) { + return client.execute(submitKybPartiesRequest(sessionId, params), options, SUBMIT_KYB_PARTIES_RESPONSE); } /** - * Asynchronous {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response. + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} * @param params the request parameters * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> simulateAsync(String sessionId, SandboxSimulateRequest params, RequestOptions options) { - return client.executeAsync(simulateRequest(sessionId, params), options, SIMULATE_RESPONSE); + public CompletableFuture> submitKybPartiesAsync(String sessionId, SessionsSubmitKybPartiesParams params, RequestOptions options) { + return client.executeAsync(submitKybPartiesRequest(sessionId, params), options, SUBMIT_KYB_PARTIES_RESPONSE); } /** - * {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response, with the client's options. + * {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} * @param params the request parameters * @return the result */ - public RawResponse simulate(String sessionId, SandboxSimulateRequest params) { - return client.execute(simulateRequest(sessionId, params), RequestOptions.none(), SIMULATE_RESPONSE); + public RawResponse submitKybParties(String sessionId, SessionsSubmitKybPartiesParams params) { + return client.execute(submitKybPartiesRequest(sessionId, params), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE); } /** - * Asynchronous {@link #simulate(String, SandboxSimulateRequest, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} * @param params the request parameters * @return a future completed with the result */ - public CompletableFuture> simulateAsync(String sessionId, SandboxSimulateRequest params) { - return client.executeAsync(simulateRequest(sessionId, params), RequestOptions.none(), SIMULATE_RESPONSE); + public CompletableFuture> submitKybPartiesAsync(String sessionId, SessionsSubmitKybPartiesParams params) { + return client.executeAsync(submitKybPartiesRequest(sessionId, params), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE); } /** - * {@link #listFeatureOverrides(String, RequestOptions)} with the raw response. + * {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} * @param options per-request options * @return the result */ - public RawResponse listFeatureOverrides(String sessionId, RequestOptions options) { - return client.execute(listFeatureOverridesRequest(sessionId), options, LIST_FEATURE_OVERRIDES_RESPONSE); + public RawResponse submitKybParties(String sessionId, RequestOptions options) { + return client.execute(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), options, SUBMIT_KYB_PARTIES_RESPONSE); } /** - * Asynchronous {@link #listFeatureOverrides(String, RequestOptions)} with the raw response. + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response, without parameters. * * @param sessionId the {@code sessionId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> listFeatureOverridesAsync(String sessionId, RequestOptions options) { - return client.executeAsync(listFeatureOverridesRequest(sessionId), options, LIST_FEATURE_OVERRIDES_RESPONSE); + public CompletableFuture> submitKybPartiesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), options, SUBMIT_KYB_PARTIES_RESPONSE); } /** - * {@link #listFeatureOverrides(String, RequestOptions)} with the raw response, with the client's options. + * {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} * @return the result */ - public RawResponse listFeatureOverrides(String sessionId) { - return client.execute(listFeatureOverridesRequest(sessionId), RequestOptions.none(), LIST_FEATURE_OVERRIDES_RESPONSE); + public RawResponse submitKybParties(String sessionId) { + return client.execute(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE); } /** - * Asynchronous {@link #listFeatureOverrides(String, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #submitKybParties(String, SessionsSubmitKybPartiesParams, RequestOptions)} with the raw response, without parameters, with the client's options. * * @param sessionId the {@code sessionId} * @return a future completed with the result */ - public CompletableFuture> listFeatureOverridesAsync(String sessionId) { - return client.executeAsync(listFeatureOverridesRequest(sessionId), RequestOptions.none(), LIST_FEATURE_OVERRIDES_RESPONSE); + public CompletableFuture> submitKybPartiesAsync(String sessionId) { + return client.executeAsync(submitKybPartiesRequest(sessionId, SessionsSubmitKybPartiesParams.builder().build()), RequestOptions.none(), SUBMIT_KYB_PARTIES_RESPONSE); } /** - * {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response. + * {@link #exportFiles(String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param overrideId the {@code overrideId} * @param options per-request options * @return the result */ - public RawResponse cancelFeatureOverride(String sessionId, String overrideId, RequestOptions options) { - return client.execute(cancelFeatureOverrideRequest(sessionId, overrideId), options, CANCEL_FEATURE_OVERRIDE_RESPONSE); + public RawResponse exportFiles(String sessionId, RequestOptions options) { + return client.execute(exportFilesRequest(sessionId), options, EXPORT_FILES_RESPONSE); } /** - * Asynchronous {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response. + * Asynchronous {@link #exportFiles(String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param overrideId the {@code overrideId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> cancelFeatureOverrideAsync(String sessionId, String overrideId, RequestOptions options) { - return client.executeAsync(cancelFeatureOverrideRequest(sessionId, overrideId), options, CANCEL_FEATURE_OVERRIDE_RESPONSE); + public CompletableFuture> exportFilesAsync(String sessionId, RequestOptions options) { + return client.executeAsync(exportFilesRequest(sessionId), options, EXPORT_FILES_RESPONSE); } /** - * {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response, with the client's options. + * {@link #exportFiles(String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param overrideId the {@code overrideId} * @return the result */ - public RawResponse cancelFeatureOverride(String sessionId, String overrideId) { - return client.execute(cancelFeatureOverrideRequest(sessionId, overrideId), RequestOptions.none(), CANCEL_FEATURE_OVERRIDE_RESPONSE); + public RawResponse exportFiles(String sessionId) { + return client.execute(exportFilesRequest(sessionId), RequestOptions.none(), EXPORT_FILES_RESPONSE); } /** - * Asynchronous {@link #cancelFeatureOverride(String, String, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #exportFiles(String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param overrideId the {@code overrideId} * @return a future completed with the result */ - public CompletableFuture> cancelFeatureOverrideAsync(String sessionId, String overrideId) { - return client.executeAsync(cancelFeatureOverrideRequest(sessionId, overrideId), RequestOptions.none(), CANCEL_FEATURE_OVERRIDE_RESPONSE); + public CompletableFuture> exportFilesAsync(String sessionId) { + return client.executeAsync(exportFilesRequest(sessionId), RequestOptions.none(), EXPORT_FILES_RESPONSE); } /** - * {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response. + * {@link #getFilesExport(String, String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param exportId the {@code exportId} * @param options per-request options * @return the result */ - public RawResponse previewDecisionEmail(String sessionId, SessionsPreviewDecisionEmailParams params, RequestOptions options) { - return client.execute(previewDecisionEmailRequest(sessionId, params), options, PREVIEW_DECISION_EMAIL_RESPONSE); + public RawResponse getFilesExport(String sessionId, String exportId, RequestOptions options) { + return client.execute(getFilesExportRequest(sessionId, exportId), options, GET_FILES_EXPORT_RESPONSE); } /** - * Asynchronous {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response. + * Asynchronous {@link #getFilesExport(String, String, RequestOptions)} with the raw response. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param exportId the {@code exportId} * @param options per-request options * @return a future completed with the result */ - public CompletableFuture> previewDecisionEmailAsync(String sessionId, SessionsPreviewDecisionEmailParams params, RequestOptions options) { - return client.executeAsync(previewDecisionEmailRequest(sessionId, params), options, PREVIEW_DECISION_EMAIL_RESPONSE); + public CompletableFuture> getFilesExportAsync(String sessionId, String exportId, RequestOptions options) { + return client.executeAsync(getFilesExportRequest(sessionId, exportId), options, GET_FILES_EXPORT_RESPONSE); } /** - * {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response, with the client's options. + * {@link #getFilesExport(String, String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param exportId the {@code exportId} * @return the result */ - public RawResponse previewDecisionEmail(String sessionId, SessionsPreviewDecisionEmailParams params) { - return client.execute(previewDecisionEmailRequest(sessionId, params), RequestOptions.none(), PREVIEW_DECISION_EMAIL_RESPONSE); + public RawResponse getFilesExport(String sessionId, String exportId) { + return client.execute(getFilesExportRequest(sessionId, exportId), RequestOptions.none(), GET_FILES_EXPORT_RESPONSE); } /** - * Asynchronous {@link #previewDecisionEmail(String, SessionsPreviewDecisionEmailParams, RequestOptions)} with the raw response, with the client's options. + * Asynchronous {@link #getFilesExport(String, String, RequestOptions)} with the raw response, with the client's options. * * @param sessionId the {@code sessionId} - * @param params the request parameters + * @param exportId the {@code exportId} * @return a future completed with the result */ - public CompletableFuture> previewDecisionEmailAsync(String sessionId, SessionsPreviewDecisionEmailParams params) { - return client.executeAsync(previewDecisionEmailRequest(sessionId, params), RequestOptions.none(), PREVIEW_DECISION_EMAIL_RESPONSE); + public CompletableFuture> getFilesExportAsync(String sessionId, String exportId) { + return client.executeAsync(getFilesExportRequest(sessionId, exportId), RequestOptions.none(), GET_FILES_EXPORT_RESPONSE); } } } diff --git a/src/main/java/me/didit/resources/SessionsSignaturesResource.java b/src/main/java/me/didit/resources/SessionsSignaturesResource.java index 1920331..c28af6f 100644 --- a/src/main/java/me/didit/resources/SessionsSignaturesResource.java +++ b/src/main/java/me/didit/resources/SessionsSignaturesResource.java @@ -36,15 +36,15 @@ public WithRawResponse withRawResponse() { /** * Download a signed document * - *

Download the signed PDF of one document of an Electronic Signature step. Use the signed_file path of signatures[].documents[] in the decision. The PDF holds the document the signer was shown with their field values stamped, the evidence page (unless signature_evidence_page is off) and the PAdES signature with its timestamp. Didit checks the file against sha256_signed before returning it. + *

Download the signed PDF of one document of an E-signature step. Use the signed_file path of signatures[].documents[] in the decision. The PDF holds the document the signer was shown with their field values stamped and the evidence page (unless signature_evidence_page is off). An Advanced (AES) PDF also carries the PAdES signature with its timestamp; a Simple PDF has no digital signature, seal or timestamp. Didit checks the file against sha256_signed before returning it. * - *

Works for User Verification (KYC) and Business Verification (KYB) sessions. Needs read:sessions; your API key works. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature#download-the-signed-documents). + *

Works for User Verification (KYC) and Business Verification (KYB) sessions. Needs read:sessions; your API key works. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature#download-the-signed-documents). * *

{@code GET /v3/session/{sessionId}/signatures/{nodeId}/documents/{documentId}/file/} *

Returns the file; close the {@link me.didit.core.BinaryResponse} when you stream it. * * @param sessionId The User Verification (KYC) or Business Verification (KYB) session. - * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`. + * @param nodeId The E-signature step: `node_id` of the item in `signatures[]`. * @param documentId `id` of the document in `signatures[].documents[]`. * @param options per-request options that override the client options * @return the response body @@ -93,7 +93,7 @@ public CompletableFuture downloadDocumentAsync(String sessionId, /** * Download the signature evidence * - *

Download a signer's evidence PDF: the level and format, the signer and their verified identity session, the code confirmation, the IP address, each document with its original SHA-256 and field values, the certificate, the timestamp and the SHA-256 of every signed file. Use the evidence_file path of the signer's item in signatures[]. + *

Download a signer's evidence PDF: the level and format, the signer, the IP address, each document with its original SHA-256 and field values and the SHA-256 of every signed file, plus, for an Advanced (AES) signature, the verified identity session, the code confirmation, the certificate and the timestamp. Use the evidence_file path of the signer's item in signatures[]. * *

Always pass signature_id when a Business Verification step has several signers: without it, the route picks one of the step's signers. Needs read:sessions; your API key works. * @@ -101,7 +101,7 @@ public CompletableFuture downloadDocumentAsync(String sessionId, *

Returns the file; close the {@link me.didit.core.BinaryResponse} when you stream it. * * @param sessionId The User Verification (KYC) or Business Verification (KYB) session. - * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`. + * @param nodeId The E-signature step: `node_id` of the item in `signatures[]`. * @param params the request parameters * @param options per-request options that override the client options * @return the response body @@ -202,7 +202,7 @@ public CompletableFuture downloadEvidenceAsync(String sessionId, *

Returns the file; close the {@link me.didit.core.BinaryResponse} when you stream it. * * @param sessionId The User Verification (KYC) or Business Verification (KYB) session. - * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`. + * @param nodeId The E-signature step: `node_id` of the item in `signatures[]`. * @param fieldId The field on this signer's copy, as in the field's `image_url`. * @param options per-request options that override the client options * @return the response body @@ -251,14 +251,14 @@ public CompletableFuture downloadFieldImageAsync(String sessionI /** * Validate signatures again * - *

Re-check the signed documents of an Electronic Signature step. Didit re-reads every signed PDF, checks its SHA-256 and validates the PAdES signature, the certificate, the revocation data and the timestamp, then saves the result in each signer's validation and returns the updated items. Nothing is signed again. Send signature_id to check one signer; without it, every signer of the step is checked, and the call fails if any of them hasn't signed. + *

Re-check the signed documents of an E-signature step. Didit re-reads every signed PDF, checks its SHA-256 and, for an Advanced (AES) signature, validates the PAdES signature, the certificate, the revocation data and the timestamp (a Simple signature has no digital signature, so only the file integrity is checked), then saves the result in each signer's validation and returns the updated items. Nothing is signed again. Send signature_id to check one signer; without it, every signer of the step is checked, and the call fails if any of them hasn't signed. * *

Needs write:sessions; your API key works. In the console it's the Validate again button. * *

{@code POST /v3/session/{sessionId}/signatures/{nodeId}/validate/} * * @param sessionId The User Verification (KYC) or Business Verification (KYB) session. - * @param nodeId The Electronic Signature step: `node_id` of the item in `signatures[]`. + * @param nodeId The E-signature step: `node_id` of the item in `signatures[]`. * @param params the request parameters * @param options per-request options that override the client options * @return the response body diff --git a/src/main/java/me/didit/resources/TransactionsResource.java b/src/main/java/me/didit/resources/TransactionsResource.java index 52de27d..28ba8dc 100644 --- a/src/main/java/me/didit/resources/TransactionsResource.java +++ b/src/main/java/me/didit/resources/TransactionsResource.java @@ -634,7 +634,7 @@ public CompletableFuture batchDeleteAsync() { private static ApiRequest listRequest(TransactionsListParams params) { return ApiRequest.builder("GET", "/v3/transactions/") .params(params) - .queryFields("limit", "offset", "travel_rule_status") + .queryFields("limit", "offset", "travel_rule_status", "assignee") .build(); } diff --git a/src/main/java/me/didit/resources/TravelRuleResource.java b/src/main/java/me/didit/resources/TravelRuleResource.java index cd288ff..b1b7bac 100644 --- a/src/main/java/me/didit/resources/TravelRuleResource.java +++ b/src/main/java/me/didit/resources/TravelRuleResource.java @@ -35,6 +35,7 @@ public final class TravelRuleResource { private final TravelRuleCounterpartyContactsResource counterpartyContacts; private final TravelRuleNetworksResource networks; private final TravelRuleTransfersResource transfers; + private final TravelRuleUnmatchedDepositsResource unmatchedDeposits; private final TravelRuleWalletAddressesResource walletAddresses; private final TravelRuleWalletProofsResource walletProofs; private final TravelRuleWorkspaceResource workspace; @@ -45,6 +46,7 @@ public final class TravelRuleResource { this.counterpartyContacts = new TravelRuleCounterpartyContactsResource(client); this.networks = new TravelRuleNetworksResource(client); this.transfers = new TravelRuleTransfersResource(client); + this.unmatchedDeposits = new TravelRuleUnmatchedDepositsResource(client); this.walletAddresses = new TravelRuleWalletAddressesResource(client); this.walletProofs = new TravelRuleWalletProofsResource(client); this.workspace = new TravelRuleWorkspaceResource(client); @@ -77,6 +79,15 @@ public TravelRuleTransfersResource transfers() { return transfers; } + /** + * The {@code travel_rule.unmatched_deposits} resource. + * + * @return the resource + */ + public TravelRuleUnmatchedDepositsResource unmatchedDeposits() { + return unmatchedDeposits; + } + /** * The {@code travel_rule.wallet_addresses} resource. * diff --git a/src/main/java/me/didit/resources/TravelRuleUnmatchedDepositsResource.java b/src/main/java/me/didit/resources/TravelRuleUnmatchedDepositsResource.java new file mode 100644 index 0000000..aa9356f --- /dev/null +++ b/src/main/java/me/didit/resources/TravelRuleUnmatchedDepositsResource.java @@ -0,0 +1,325 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.resources; + +import java.util.concurrent.CompletableFuture; +import me.didit.core.ApiClient; +import me.didit.core.ApiRequest; +import me.didit.core.Conv; +import me.didit.core.Page; +import me.didit.core.RawResponse; +import me.didit.core.RequestOptions; +import me.didit.core.ResponseHandler; +import me.didit.core.Responses; +import me.didit.types.TravelRuleManualMatchRequest; +import me.didit.types.TravelRuleManualMatchResponse; +import me.didit.types.TravelRuleTransferRow; +import me.didit.types.TravelRuleUnmatchedDepositsListParams; + +/** The {@code travel_rule.unmatched_deposits} resource: {@code client.travelRule().unmatchedDeposits()}. */ +public final class TravelRuleUnmatchedDepositsResource { + private final ApiClient client; + private final WithRawResponse withRawResponse; + + TravelRuleUnmatchedDepositsResource(ApiClient client) { + this.client = client; + this.withRawResponse = new WithRawResponse(client); + } + + /** + * The same operations, returning the HTTP status, headers and request id with the parsed body. + * + * @return the raw response view + */ + public WithRawResponse withRawResponse() { + return withRawResponse; + } + + /** + * List unmatched Travel Rule deposits + * + *

Inbound deposits that are still waiting for the originating VASP's Travel Rule data: their transfer is AWAITING_COUNTERPARTY, NOT_ENOUGH_COUNTERPARTY_DATA or COUNTERPARTY_VASP_NOT_FOUND, no received message is paired with them, and nobody matched them by hand. The rows and the filters are the same as in GET /v3/travel-rule/transfers/, newest first, paginated with limit (default 50) and offset. Pair a deposit with the message the originating VASP sent with POST /v3/travel-rule/unmatched/{transaction_uuid}/match/. + * + *

{@code GET /v3/travel-rule/unmatched/} + *

Returns one page; iterate it to fetch every following page automatically. + * + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public Page list(TravelRuleUnmatchedDepositsListParams params, RequestOptions options) { + return client.execute(listRequest(params), options, LIST_RESPONSE).data(); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> listAsync(TravelRuleUnmatchedDepositsListParams params, RequestOptions options) { + return client.executeAsync(listRequest(params), options, LIST_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public Page list(TravelRuleUnmatchedDepositsListParams params) { + return client.execute(listRequest(params), RequestOptions.none(), LIST_RESPONSE).data(); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> listAsync(TravelRuleUnmatchedDepositsListParams params) { + return client.executeAsync(listRequest(params), RequestOptions.none(), LIST_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}, without parameters. + * + * @param options per-request options + * @return the result + */ + public Page list(RequestOptions options) { + return client.execute(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), options, LIST_RESPONSE).data(); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}, without parameters. + * + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> listAsync(RequestOptions options) { + return client.executeAsync(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), options, LIST_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}, without parameters, with the client's options. + * + * @return the result + */ + public Page list() { + return client.execute(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE).data(); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)}, without parameters, with the client's options. + * + * @return a future completed with the result + */ + public CompletableFuture> listAsync() { + return client.executeAsync(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Match a Travel Rule deposit to a received message + * + *

Pair an inbound deposit that is still waiting for originator data with the Travel Rule message the originating VASP sent for it. The deposit takes the message's originator data, counterparty VASP and rail, and both transfers record the match on their timelines. transaction_uuid is the deposit's transaction_id from GET /v3/travel-rule/unmatched/. transaction_id in the body is the received message's transaction_id, from a row of GET /v3/travel-rule/transfers/?kind=message; the transfer's own id is not found. The message must be for the same asset as the deposit. A deposit or message deleted from the Console answers 404; one that has already moved on (matched, or no longer waiting) answers 409. + * + *

{@code POST /v3/travel-rule/unmatched/{transaction_uuid}/match/} + * + * @param transactionUuid The `transaction_id` of the unmatched deposit. + * @param params the request parameters + * @param options per-request options that override the client options + * @return the response body + */ + public TravelRuleManualMatchResponse match(String transactionUuid, TravelRuleManualMatchRequest params, RequestOptions options) { + return client.execute(matchRequest(transactionUuid, params), options, MATCH_RESPONSE).data(); + } + + /** + * Asynchronous {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)}. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture matchAsync(String transactionUuid, TravelRuleManualMatchRequest params, RequestOptions options) { + return client.executeAsync(matchRequest(transactionUuid, params), options, MATCH_RESPONSE).thenApply(RawResponse::data); + } + + /** + * Same as {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)}, with the client's options. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @return the result + */ + public TravelRuleManualMatchResponse match(String transactionUuid, TravelRuleManualMatchRequest params) { + return client.execute(matchRequest(transactionUuid, params), RequestOptions.none(), MATCH_RESPONSE).data(); + } + + /** + * Asynchronous {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)}, with the client's options. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture matchAsync(String transactionUuid, TravelRuleManualMatchRequest params) { + return client.executeAsync(matchRequest(transactionUuid, params), RequestOptions.none(), MATCH_RESPONSE).thenApply(RawResponse::data); + } + + private static final ResponseHandler> LIST_RESPONSE = Responses.page(Conv.model(TravelRuleTransferRow::fromJson)); + + private static ApiRequest listRequest(TravelRuleUnmatchedDepositsListParams params) { + return ApiRequest.builder("GET", "/v3/travel-rule/unmatched/") + .params(params) + .queryFields("direction", "status", "rail", "kind", "currency", "start_date", "end_date", "counterparty", "limit", "offset") + .build(); + } + + private static final ResponseHandler MATCH_RESPONSE = Responses.json(Conv.model(TravelRuleManualMatchResponse::fromJson)); + + private static ApiRequest matchRequest(String transactionUuid, TravelRuleManualMatchRequest params) { + return ApiRequest.builder("POST", "/v3/travel-rule/unmatched/{transaction_uuid}/match/") + .pathParam("transaction_uuid", transactionUuid) + .params(params) + .body(ApiRequest.BodyEncoding.JSON) + .build(); + } + + /** The {@code travel_rule.unmatched_deposits} operations returning {@link RawResponse}. */ + public static final class WithRawResponse { + private final ApiClient client; + + WithRawResponse(ApiClient client) { + this.client = client; + } + + /** + * {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse> list(TravelRuleUnmatchedDepositsListParams params, RequestOptions options) { + return client.execute(listRequest(params), options, LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response. + * + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture>> listAsync(TravelRuleUnmatchedDepositsListParams params, RequestOptions options) { + return client.executeAsync(listRequest(params), options, LIST_RESPONSE); + } + + /** + * {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return the result + */ + public RawResponse> list(TravelRuleUnmatchedDepositsListParams params) { + return client.execute(listRequest(params), RequestOptions.none(), LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response, with the client's options. + * + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture>> listAsync(TravelRuleUnmatchedDepositsListParams params) { + return client.executeAsync(listRequest(params), RequestOptions.none(), LIST_RESPONSE); + } + + /** + * {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return the result + */ + public RawResponse> list(RequestOptions options) { + return client.execute(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), options, LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response, without parameters. + * + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture>> listAsync(RequestOptions options) { + return client.executeAsync(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), options, LIST_RESPONSE); + } + + /** + * {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return the result + */ + public RawResponse> list() { + return client.execute(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE); + } + + /** + * Asynchronous {@link #list(TravelRuleUnmatchedDepositsListParams, RequestOptions)} with the raw response, without parameters, with the client's options. + * + * @return a future completed with the result + */ + public CompletableFuture>> listAsync() { + return client.executeAsync(listRequest(TravelRuleUnmatchedDepositsListParams.builder().build()), RequestOptions.none(), LIST_RESPONSE); + } + + /** + * {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)} with the raw response. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @param options per-request options + * @return the result + */ + public RawResponse match(String transactionUuid, TravelRuleManualMatchRequest params, RequestOptions options) { + return client.execute(matchRequest(transactionUuid, params), options, MATCH_RESPONSE); + } + + /** + * Asynchronous {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)} with the raw response. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @param options per-request options + * @return a future completed with the result + */ + public CompletableFuture> matchAsync(String transactionUuid, TravelRuleManualMatchRequest params, RequestOptions options) { + return client.executeAsync(matchRequest(transactionUuid, params), options, MATCH_RESPONSE); + } + + /** + * {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)} with the raw response, with the client's options. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @return the result + */ + public RawResponse match(String transactionUuid, TravelRuleManualMatchRequest params) { + return client.execute(matchRequest(transactionUuid, params), RequestOptions.none(), MATCH_RESPONSE); + } + + /** + * Asynchronous {@link #match(String, TravelRuleManualMatchRequest, RequestOptions)} with the raw response, with the client's options. + * + * @param transactionUuid the {@code transaction_uuid} + * @param params the request parameters + * @return a future completed with the result + */ + public CompletableFuture> matchAsync(String transactionUuid, TravelRuleManualMatchRequest params) { + return client.executeAsync(matchRequest(transactionUuid, params), RequestOptions.none(), MATCH_RESPONSE); + } + } +} diff --git a/src/main/java/me/didit/resources/UsersResource.java b/src/main/java/me/didit/resources/UsersResource.java index 3eda0dc..ed1843b 100644 --- a/src/main/java/me/didit/resources/UsersResource.java +++ b/src/main/java/me/didit/resources/UsersResource.java @@ -339,7 +339,7 @@ public CompletableFuture generatePdfAsync(String vendorData) { * *

Permanently delete users: the user records are removed permanently. For everyday blocking prefer [Update User Status](#patch-/v3/users/-vendor_data-/update-status/) with BLOCKED. Select users with vendor_data_list, with didit_internal_id_list, or with both at once; or pass delete_all: true. This endpoint never narrows delete_all with filters. The Console's People filters are refused with a 400 (see the 400 response), so a narrowed intent does not turn into a full wipe. Two exceptions: filter_has_approved_sessions and filter_has_declined_sessions are not refused and not applied, so with delete_all: true they still delete every user; do not send them. * - *

Biometric templates: every image-free biometric template retained for these users after session deletion (see /v3/biometric-templates/) is purged before the user is deleted, so the person stops matching in duplicate detection and Face Search. If a template cannot be purged because a biometric store is unavailable, the call returns 503, no user in the request is deleted, and repeating the request finishes the job. + *

Biometric templates: unless you set retain_face_embeddings to true, every image-free biometric template retained for these users after session deletion (see /v3/biometric-templates/) is purged before the user is deleted, so the person stops matching in duplicate detection and Face Search. With retain_face_embeddings: true and face_retention_days, you choose to keep one image-free biometric template per person for that many days, and nothing else about the person is kept. If a template cannot be purged because a biometric store is unavailable, the call returns 503, no user in the request is deleted, and repeating the request finishes the job. * *

Filed regulatory reports: if the selected data is in a finalized regulatory report, the whole request is refused with 409 and nothing is deleted. The body uses code: in_filed_report and names each report with uuid, report_number, report_type and case_uuid. Delete the reports, then repeat the request. * diff --git a/src/main/java/me/didit/types/AMLScreening.java b/src/main/java/me/didit/types/AMLScreening.java index 259bcef..d7a1222 100644 --- a/src/main/java/me/didit/types/AMLScreening.java +++ b/src/main/java/me/didit/types/AMLScreening.java @@ -409,7 +409,7 @@ public Builder toBuilder() { } /** - * Unique identifier of the match + * Didit's stable identifier for the hit: hit_ followed by 24 hexadecimal characters. The same matched entity keeps the same id when the subject is screened again. Pass it as hit_id to the AML hit review endpoints. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -472,7 +472,7 @@ public Optional caption() { } /** - * List of dataset categories where the match was found. Indicates whether the entity appeared in PEP lists (with level), sanctions databases, adverse media, warnings/regulatory enforcement, or other compliance datasets. + * List of dataset categories where the match was found. Indicates whether the entity appeared in PEP lists (with level), sanctions databases, adverse media, warnings/regulatory enforcement, or other compliance datasets. Other Lists when the entity's source states none of these categories. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -665,7 +665,7 @@ private Builder(Hits from) { } /** - * Unique identifier of the match + * Didit's stable identifier for the hit: hit_ followed by 24 hexadecimal characters. The same matched entity keeps the same id when the subject is screened again. Pass it as hit_id to the AML hit review endpoints. * * @param id the value * @return this builder @@ -728,7 +728,7 @@ public Builder caption(String caption) { } /** - * List of dataset categories where the match was found. Indicates whether the entity appeared in PEP lists (with level), sanctions databases, adverse media, warnings/regulatory enforcement, or other compliance datasets. + * List of dataset categories where the match was found. Indicates whether the entity appeared in PEP lists (with level), sanctions databases, adverse media, warnings/regulatory enforcement, or other compliance datasets. Other Lists when the entity's source states none of these categories. * * @param datasets the value * @return this builder @@ -963,7 +963,10 @@ public static final class Datasets extends StringEnum { /** The value {@code "Insolvency"}. */ public static final Datasets INSOLVENCY = new Datasets("Insolvency"); - private static final List KNOWN_VALUES = List.of(PEP, PEP_LEVEL_1, PEP_LEVEL_2, PEP_LEVEL_3, PEP_LEVEL_4, SANCTIONS, ADVERSE_MEDIA, WARNINGS_AND_REGULATORY_ENFORCEMENT, FITNESS_AND_PROBITY, SIP, SIE, INSOLVENCY); + /** The value {@code "Other Lists"}. */ + public static final Datasets OTHER_LISTS = new Datasets("Other Lists"); + + private static final List KNOWN_VALUES = List.of(PEP, PEP_LEVEL_1, PEP_LEVEL_2, PEP_LEVEL_3, PEP_LEVEL_4, SANCTIONS, ADVERSE_MEDIA, WARNINGS_AND_REGULATORY_ENFORCEMENT, FITNESS_AND_PROBITY, SIP, SIE, INSOLVENCY, OTHER_LISTS); private Datasets(String value) { super(value); @@ -4862,7 +4865,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); diff --git a/src/main/java/me/didit/types/AMLScreeningRun.java b/src/main/java/me/didit/types/AMLScreeningRun.java index ad5b06a..4cd9aff 100644 --- a/src/main/java/me/didit/types/AMLScreeningRun.java +++ b/src/main/java/me/didit/types/AMLScreeningRun.java @@ -17,7 +17,7 @@ /** One completed ongoing-monitoring re-screen of an AML check. */ public final class AMLScreeningRun extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("uuid", "completed_at", "started_at", "outcome", "trigger", "provider", "status", "score", "total_hits", "dataset_freshness"); + private static final Set KNOWN_FIELDS = Set.of("uuid", "run_id", "completed_at", "started_at", "outcome", "trigger", "provider", "status", "score", "total_hits", "new_hits", "entities_screened", "dataset_freshness"); private AMLScreeningRun(ObjectNode json, Map> files) { super(json, files); @@ -62,6 +62,16 @@ public String uuid() { return Json.required(json, "uuid", Conv.STRING); } + /** + * The monitoring run this screening belongs to. Every verification screened in the same run shares it. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String runId() { + return Json.required(json, "run_id", Conv.STRING); + } + /** * When this subject's re-screen finished. Results are ordered by it, newest first. * @@ -142,6 +152,26 @@ public Optional totalHits() { return Json.optional(json, "total_hits", Conv.LONG); } + /** + * Number of hits this run found that the check did not have before it. 0 when nothing new was found; null when the run failed or was recorded before this count existed. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional newHits() { + return Json.optional(json, "new_hits", Conv.LONG); + } + + /** + * Number of entities this run screened for the verification: 1 when the subject was screened, 0 when the run failed. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long entitiesScreened() { + return Json.required(json, "entities_screened", Conv.LONG); + } + /** * Dataset freshness behind this run, or null when no dates were available. * @@ -175,6 +205,16 @@ public Builder uuid(String uuid) { return set("uuid", Conv.STRING, uuid); } + /** + * The monitoring run this screening belongs to. Every verification screened in the same run shares it. + * + * @param runId the value + * @return this builder + */ + public Builder runId(String runId) { + return set("run_id", Conv.STRING, runId); + } + /** * When this subject's re-screen finished. Results are ordered by it, newest first. * @@ -255,6 +295,26 @@ public Builder totalHits(@Nullable Long totalHits) { return setNullable("total_hits", Conv.LONG, totalHits); } + /** + * Number of hits this run found that the check did not have before it. 0 when nothing new was found; null when the run failed or was recorded before this count existed. + * + * @param newHits the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder newHits(@Nullable Long newHits) { + return setNullable("new_hits", Conv.LONG, newHits); + } + + /** + * Number of entities this run screened for the verification: 1 when the subject was screened, 0 when the run failed. + * + * @param entitiesScreened the value + * @return this builder + */ + public Builder entitiesScreened(long entitiesScreened) { + return set("entities_screened", Conv.LONG, entitiesScreened); + } + /** * Dataset freshness behind this run, or null when no dates were available. * @@ -273,6 +333,7 @@ public Builder datasetFreshness(@Nullable AMLDatasetFreshness datasetFreshness) */ public AMLScreeningRun build() { require("uuid", false); + require("run_id", false); require("completed_at", false); require("started_at", false); require("outcome", false); @@ -281,6 +342,8 @@ public AMLScreeningRun build() { require("status", true); require("score", true); require("total_hits", true); + require("new_hits", true); + require("entities_screened", false); require("dataset_freshness", true); return new AMLScreeningRun(buildJson(), buildFiles()); } diff --git a/src/main/java/me/didit/types/AmlScreenResponse.java b/src/main/java/me/didit/types/AmlScreenResponse.java index 2b3ca6d..55aedb5 100644 --- a/src/main/java/me/didit/types/AmlScreenResponse.java +++ b/src/main/java/me/didit/types/AmlScreenResponse.java @@ -512,7 +512,7 @@ public Builder toBuilder() { } /** - * Stable identifier of the matched entity in the screening datasets. + * Didit's stable identifier for the hit: hit_ followed by 24 hexadecimal characters. The same matched entity keeps the same id when the subject is screened again. Pass it as hit_id to the AML hit review endpoints. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -592,13 +592,13 @@ public Optional caption() { } /** - * Datasets the entity appears in (e.g. PEP, PEP Level 1, sanctions list names). + * Risk categories the entity is listed under: PEP (with its level, PEP Level 1 to PEP Level 4), Sanctions, Adverse Media, Warnings and Regulatory Enforcement, Fitness and Probity, SIP, SIE or Insolvency. Other Lists when the entity's source states none of these categories. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> datasets() { - return Json.optional(json, "datasets", Conv.list(Conv.STRING)); + public Optional> datasets() { + return Json.optional(json, "datasets", Conv.list(Conv.enumeration(AmlScreenResponse.Aml.Hits.Datasets::of))); } /** @@ -765,7 +765,7 @@ private Builder(Hits from) { } /** - * Stable identifier of the matched entity in the screening datasets. + * Didit's stable identifier for the hit: hit_ followed by 24 hexadecimal characters. The same matched entity keeps the same id when the subject is screened again. Pass it as hit_id to the AML hit review endpoints. * * @param id the value, or {@code null} to send JSON null * @return this builder @@ -845,13 +845,13 @@ public Builder caption(@Nullable String caption) { } /** - * Datasets the entity appears in (e.g. PEP, PEP Level 1, sanctions list names). + * Risk categories the entity is listed under: PEP (with its level, PEP Level 1 to PEP Level 4), Sanctions, Adverse Media, Warnings and Regulatory Enforcement, Fitness and Probity, SIP, SIE or Insolvency. Other Lists when the entity's source states none of these categories. * * @param datasets the value, or {@code null} to send JSON null * @return this builder */ - public Builder datasets(@Nullable List datasets) { - return setNullable("datasets", Conv.list(Conv.STRING), datasets); + public Builder datasets(@Nullable List datasets) { + return setNullable("datasets", Conv.list(Conv.enumeration(AmlScreenResponse.Aml.Hits.Datasets::of)), datasets); } /** @@ -1019,6 +1019,81 @@ protected Builder self() { } } + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Datasets extends StringEnum { + /** The value {@code "PEP"}. */ + public static final Datasets PEP = new Datasets("PEP"); + + /** The value {@code "PEP Level 1"}. */ + public static final Datasets PEP_LEVEL_1 = new Datasets("PEP Level 1"); + + /** The value {@code "PEP Level 2"}. */ + public static final Datasets PEP_LEVEL_2 = new Datasets("PEP Level 2"); + + /** The value {@code "PEP Level 3"}. */ + public static final Datasets PEP_LEVEL_3 = new Datasets("PEP Level 3"); + + /** The value {@code "PEP Level 4"}. */ + public static final Datasets PEP_LEVEL_4 = new Datasets("PEP Level 4"); + + /** The value {@code "Sanctions"}. */ + public static final Datasets SANCTIONS = new Datasets("Sanctions"); + + /** The value {@code "Adverse Media"}. */ + public static final Datasets ADVERSE_MEDIA = new Datasets("Adverse Media"); + + /** The value {@code "Warnings and Regulatory Enforcement"}. */ + public static final Datasets WARNINGS_AND_REGULATORY_ENFORCEMENT = new Datasets("Warnings and Regulatory Enforcement"); + + /** The value {@code "Fitness and Probity"}. */ + public static final Datasets FITNESS_AND_PROBITY = new Datasets("Fitness and Probity"); + + /** The value {@code "SIP"}. */ + public static final Datasets SIP = new Datasets("SIP"); + + /** The value {@code "SIE"}. */ + public static final Datasets SIE = new Datasets("SIE"); + + /** The value {@code "Insolvency"}. */ + public static final Datasets INSOLVENCY = new Datasets("Insolvency"); + + /** The value {@code "Other Lists"}. */ + public static final Datasets OTHER_LISTS = new Datasets("Other Lists"); + + private static final List KNOWN_VALUES = List.of(PEP, PEP_LEVEL_1, PEP_LEVEL_2, PEP_LEVEL_3, PEP_LEVEL_4, SANCTIONS, ADVERSE_MEDIA, WARNINGS_AND_REGULATORY_ENFORCEMENT, FITNESS_AND_PROBITY, SIP, SIE, INSOLVENCY, OTHER_LISTS); + + private Datasets(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Datasets of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Datasets::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + public static final class PepMatches extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("list_name", "publisher", "source_url", "description", "matched_name", "pep_position", "date_of_birth", "place_of_birth", "aliases", "education", "other_sources"); diff --git a/src/main/java/me/didit/types/AnalyticsRetrieveTodayParams.java b/src/main/java/me/didit/types/AnalyticsRetrieveTodayParams.java new file mode 100644 index 0000000..3c68b8a --- /dev/null +++ b/src/main/java/me/didit/types/AnalyticsRetrieveTodayParams.java @@ -0,0 +1,99 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Parameters for {@code analytics.retrieve_today}. */ +public final class AnalyticsRetrieveTodayParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("tz"); + + private AnalyticsRetrieveTodayParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code AnalyticsRetrieveTodayParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static AnalyticsRetrieveTodayParams fromJson(JsonNode json) { + return new AnalyticsRetrieveTodayParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * IANA time zone whose midnight starts today, for example Europe/Madrid or America/Mexico_City. Omit it for UTC. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional tz() { + return Json.optional(json, "tz", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link AnalyticsRetrieveTodayParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(AnalyticsRetrieveTodayParams from) { + super(from); + } + + /** + * IANA time zone whose midnight starts today, for example Europe/Madrid or America/Mexico_City. Omit it for UTC. + * + * @param tz the value + * @return this builder + */ + public Builder tz(String tz) { + return set("tz", Conv.STRING, tz); + } + + /** + * Builds the value. + * + * @return a new immutable {@code AnalyticsRetrieveTodayParams} + */ + public AnalyticsRetrieveTodayParams build() { + return new AnalyticsRetrieveTodayParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/ApplicationAnalyticsToday.java b/src/main/java/me/didit/types/ApplicationAnalyticsToday.java new file mode 100644 index 0000000..c93e7a0 --- /dev/null +++ b/src/main/java/me/didit/types/ApplicationAnalyticsToday.java @@ -0,0 +1,401 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Today's verifications by local hour against the same weekday last week. */ +public final class ApplicationAnalyticsToday extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("time_zone", "date", "current_hour", "previous_date", "hours", "previous_hours", "total", "previous_total_so_far", "outcomes"); + + private ApplicationAnalyticsToday(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code ApplicationAnalyticsToday} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static ApplicationAnalyticsToday fromJson(JsonNode json) { + return new ApplicationAnalyticsToday(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The IANA time zone the day and its hours are in. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String timeZone() { + return Json.required(json, "time_zone", Conv.STRING); + } + + /** + * Today in that time zone. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public LocalDate date() { + return Json.required(json, "date", Conv.DATE); + } + + /** + * The local hour it is now. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long currentHour() { + return Json.required(json, "current_hour", Conv.LONG); + } + + /** + * The comparison day: the same weekday one week before. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public LocalDate previousDate() { + return Json.required(json, "previous_date", Conv.DATE); + } + + /** + * Verifications created today, per local hour from 00:00. The hours still to come are 0. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List hours() { + return Json.required(json, "hours", Conv.list(Conv.LONG)); + } + + /** + * Verifications created on the comparison day, per local hour from 00:00. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List previousHours() { + return Json.required(json, "previous_hours", Conv.list(Conv.LONG)); + } + + /** + * Verifications created today so far. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long total() { + return Json.required(json, "total", Conv.LONG); + } + + /** + * Verifications created on the comparison day up to the same local time. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long previousTotalSoFar() { + return Json.required(json, "previous_total_so_far", Conv.LONG); + } + + /** + * Of today's verifications, how many are approved, waiting in review and declined now. The rest are not finished yet. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public ApplicationAnalyticsToday.Outcomes outcomes() { + return Json.required(json, "outcomes", Conv.model(ApplicationAnalyticsToday.Outcomes::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link ApplicationAnalyticsToday}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(ApplicationAnalyticsToday from) { + super(from); + } + + /** + * The IANA time zone the day and its hours are in. + * + * @param timeZone the value + * @return this builder + */ + public Builder timeZone(String timeZone) { + return set("time_zone", Conv.STRING, timeZone); + } + + /** + * Today in that time zone. + * + * @param date the value + * @return this builder + */ + public Builder date(LocalDate date) { + return set("date", Conv.DATE, date); + } + + /** + * The local hour it is now. + * + * @param currentHour the value + * @return this builder + */ + public Builder currentHour(long currentHour) { + return set("current_hour", Conv.LONG, currentHour); + } + + /** + * The comparison day: the same weekday one week before. + * + * @param previousDate the value + * @return this builder + */ + public Builder previousDate(LocalDate previousDate) { + return set("previous_date", Conv.DATE, previousDate); + } + + /** + * Verifications created today, per local hour from 00:00. The hours still to come are 0. + * + * @param hours the value + * @return this builder + */ + public Builder hours(List hours) { + return set("hours", Conv.list(Conv.LONG), hours); + } + + /** + * Verifications created on the comparison day, per local hour from 00:00. + * + * @param previousHours the value + * @return this builder + */ + public Builder previousHours(List previousHours) { + return set("previous_hours", Conv.list(Conv.LONG), previousHours); + } + + /** + * Verifications created today so far. + * + * @param total the value + * @return this builder + */ + public Builder total(long total) { + return set("total", Conv.LONG, total); + } + + /** + * Verifications created on the comparison day up to the same local time. + * + * @param previousTotalSoFar the value + * @return this builder + */ + public Builder previousTotalSoFar(long previousTotalSoFar) { + return set("previous_total_so_far", Conv.LONG, previousTotalSoFar); + } + + /** + * Of today's verifications, how many are approved, waiting in review and declined now. The rest are not finished yet. + * + * @param outcomes the value + * @return this builder + */ + public Builder outcomes(ApplicationAnalyticsToday.Outcomes outcomes) { + return set("outcomes", Conv.model(ApplicationAnalyticsToday.Outcomes::fromJson), outcomes); + } + + /** + * Builds the value. + * + * @return a new immutable {@code ApplicationAnalyticsToday} + * @throws IllegalStateException when a required field is missing + */ + public ApplicationAnalyticsToday build() { + require("time_zone", false); + require("date", false); + require("current_hour", false); + require("previous_date", false); + require("hours", false); + require("previous_hours", false); + require("total", false); + require("previous_total_so_far", false); + require("outcomes", false); + return new ApplicationAnalyticsToday(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Of today's verifications, how many are approved, waiting in review and declined now. The rest are not finished yet. + */ + public static final class Outcomes extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("approved", "in_review", "declined"); + + private Outcomes(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Outcomes} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Outcomes fromJson(JsonNode json) { + return new Outcomes(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The approved field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long approved() { + return Json.required(json, "approved", Conv.LONG); + } + + /** + * The in_review field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long inReview() { + return Json.required(json, "in_review", Conv.LONG); + } + + /** + * The declined field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long declined() { + return Json.required(json, "declined", Conv.LONG); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Outcomes}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Outcomes from) { + super(from); + } + + /** + * The approved field. + * + * @param approved the value + * @return this builder + */ + public Builder approved(long approved) { + return set("approved", Conv.LONG, approved); + } + + /** + * The in_review field. + * + * @param inReview the value + * @return this builder + */ + public Builder inReview(long inReview) { + return set("in_review", Conv.LONG, inReview); + } + + /** + * The declined field. + * + * @param declined the value + * @return this builder + */ + public Builder declined(long declined) { + return set("declined", Conv.LONG, declined); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Outcomes} + * @throws IllegalStateException when a required field is missing + */ + public Outcomes build() { + require("approved", false); + require("in_review", false); + require("declined", false); + return new Outcomes(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } +} diff --git a/src/main/java/me/didit/types/BiometricRetention.java b/src/main/java/me/didit/types/BiometricRetention.java new file mode 100644 index 0000000..b71cf31 --- /dev/null +++ b/src/main/java/me/didit/types/BiometricRetention.java @@ -0,0 +1,124 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +/** When the live biometric data of this session is deleted. */ +public final class BiometricRetention extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("jurisdictions", "deletes_at"); + + private BiometricRetention(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code BiometricRetention} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static BiometricRetention fromJson(JsonNode json) { + return new BiometricRetention(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Codes of the US states whose biometric rules set a deletion limit for this person (US when the state is unknown). Empty when none applies. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List jurisdictions() { + return Json.required(json, "jurisdictions", Conv.list(Conv.STRING)); + } + + /** + * The date the live biometric data (face images and templates) of this session is deleted, from your application's retention setting and, where one applies, the legal limit for the person's jurisdiction. null when no date applies yet. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional deletesAt() { + return Json.optional(json, "deletes_at", Conv.DATE_TIME); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link BiometricRetention}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(BiometricRetention from) { + super(from); + } + + /** + * Codes of the US states whose biometric rules set a deletion limit for this person (US when the state is unknown). Empty when none applies. + * + * @param jurisdictions the value + * @return this builder + */ + public Builder jurisdictions(List jurisdictions) { + return set("jurisdictions", Conv.list(Conv.STRING), jurisdictions); + } + + /** + * The date the live biometric data (face images and templates) of this session is deleted, from your application's retention setting and, where one applies, the legal limit for the person's jurisdiction. null when no date applies yet. + * + * @param deletesAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder deletesAt(@Nullable OffsetDateTime deletesAt) { + return setNullable("deletes_at", Conv.DATE_TIME, deletesAt); + } + + /** + * Builds the value. + * + * @return a new immutable {@code BiometricRetention} + * @throws IllegalStateException when a required field is missing + */ + public BiometricRetention build() { + require("jurisdictions", false); + require("deletes_at", true); + return new BiometricRetention(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/DatabaseValidationValidateParams.java b/src/main/java/me/didit/types/DatabaseValidationValidateParams.java index 937fa66..6d76c1c 100644 --- a/src/main/java/me/didit/types/DatabaseValidationValidateParams.java +++ b/src/main/java/me/didit/types/DatabaseValidationValidateParams.java @@ -19,7 +19,7 @@ /** Parameters for {@code database_validation.validate}. */ public final class DatabaseValidationValidateParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("issuing_state", "services", "validation_type", "consent", "identification_number", "first_name", "last_name", "middle_name", "full_name", "date_of_birth", "personal_number", "tax_number", "document_number", "document_type", "expiration_date", "date_of_issue", "nationality", "gender", "address", "address_element_1", "address_element_2", "address_element_3", "address_element_4", "address_element_5", "postal_code", "driver_license_number", "driver_license_card_number", "driver_license_state", "driver_license_version", "passport_number", "passport_expiration_date", "passport_file_number", "passport_issue_country", "medicare_card_number", "immi_card_number", "immi_card_expiry_date", "citizenship_certificate_number", "birth_registration_number", "birth_registration_date", "birth_registration_state", "marriage_certificate_number", "change_of_name_certificate_number", "first_partner_name", "last_partner_name", "voter_id", "epic_card", "pan", "national_id", "cic", "identificador_ciudadano", "ocr", "voter_number", "emission_number", "bvn", "bank_card_number", "ssn", "phone", "landline", "email", "country_of_residence", "partial_match_action", "no_match_action", "save_api_request", "vendor_data", "metadata", "selfie"); + private static final Set KNOWN_FIELDS = Set.of("issuing_state", "services", "validation_type", "consent", "identification_number", "first_name", "last_name", "middle_name", "full_name", "date_of_birth", "personal_number", "tax_number", "document_number", "document_type", "expiration_date", "date_of_issue", "nationality", "gender", "address", "address_element_1", "address_element_2", "address_element_3", "address_element_4", "address_element_5", "postal_code", "driver_license_number", "driver_license_card_number", "driver_license_state", "driver_license_version", "passport_number", "passport_expiration_date", "passport_file_number", "passport_issue_country", "medicare_card_number", "immi_card_number", "immi_card_expiry_date", "citizenship_certificate_number", "birth_registration_number", "birth_registration_date", "birth_registration_state", "marriage_certificate_number", "change_of_name_certificate_number", "first_partner_name", "last_partner_name", "voter_id", "epic_card", "pan", "national_id", "cic", "identificador_ciudadano", "ocr", "voter_number", "emission_number", "bvn", "bank_card_number", "company_registration_number", "company_name", "initials", "licence_number", "refugee_file_number", "bank_name", "bank_account_number", "account_type", "phone_number", "right_thumb", "left_thumb", "score_level", "max_matches", "vehicle_register_number", "vehicle_licence_plate", "vin", "ssn", "phone", "landline", "email", "country_of_residence", "partial_match_action", "no_match_action", "save_api_request", "vendor_data", "metadata", "selfie"); private DatabaseValidationValidateParams(ObjectNode json, Map> files) { super(json, files); @@ -607,6 +607,166 @@ public Optional bankCardNumber() { return Json.optional(json, "bank_card_number", Conv.STRING); } + /** + * Company registration number as issued by the companies register: the CNPJ in Brazil (e.g. 11222333000181), the registration number in South Africa (e.g. 1936/007721/06). Required by the company registry and company directors services (bra_company_registry, bra_company_directors, zaf_company_registry, zaf_company_directors). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyRegistrationNumber() { + return Json.optional(json, "company_registration_number", Conv.STRING); + } + + /** + * Registered company name, cross-checked against the register entry. Optional for zaf_company_registry. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * The person's initials as printed on the document. Required by zaf_drivers_license; accepted by zaf_bank_account_holder. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional initials() { + return Json.optional(json, "initials", Conv.STRING); + } + + /** + * Driving licence number as printed on the card, for zaf_drivers_license. When omitted, document_number is used. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional licenceNumber() { + return Json.optional(json, "licence_number", Conv.STRING); + } + + /** + * Refugee file number issued by South Africa's Department of Home Affairs. Required by zaf_refugee. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional refugeeFileNumber() { + return Json.optional(json, "refugee_file_number", Conv.STRING); + } + + /** + * Name of the bank that holds the account. Required by zaf_bank_account_holder. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional bankName() { + return Json.optional(json, "bank_name", Conv.STRING); + } + + /** + * Bank account number. Required by zaf_bank_account_holder; accepted by zaf_fraud_prevention. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional bankAccountNumber() { + return Json.optional(json, "bank_account_number", Conv.STRING); + } + + /** + * Bank account type for zaf_bank_account_holder: current, savings, transmission, subscriptionShare or notKnown, case-insensitive. Any other value returns 400. Omit it when you do not know the type: the account-type cross-check is then reported as not confirmed. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional accountType() { + return Json.optional(json, "account_type", Conv.STRING); + } + + /** + * Contact mobile number, for the services that cross-check contactability (zaf_bank_account_holder, zaf_fraud_prevention, zaf_refugee). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneNumber() { + return Json.optional(json, "phone_number", Conv.STRING); + } + + /** + * Base64-encoded right thumb fingerprint for zaf_dha_fingerprint_match, with left_thumb or on its own. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional rightThumb() { + return Json.optional(json, "right_thumb", Conv.STRING); + } + + /** + * Base64-encoded left thumb fingerprint for zaf_dha_fingerprint_match, with right_thumb or on its own. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional leftThumb() { + return Json.optional(json, "left_thumb", Conv.STRING); + } + + /** + * Minimum biometric score level for zaf_criminal_face_screening. Defaults to 3. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional scoreLevel() { + return Json.optional(json, "score_level", Conv.LONG); + } + + /** + * Maximum number of candidate matches zaf_criminal_face_screening returns. Defaults to 1. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional maxMatches() { + return Json.optional(json, "max_matches", Conv.LONG); + } + + /** + * Vehicle register number. Required, with vehicle_licence_plate and vin, by zaf_vehicle_ownership. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vehicleRegisterNumber() { + return Json.optional(json, "vehicle_register_number", Conv.STRING); + } + + /** + * Vehicle licence plate number. Required, with vehicle_register_number and vin, by zaf_vehicle_ownership. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vehicleLicencePlate() { + return Json.optional(json, "vehicle_licence_plate", Conv.STRING); + } + + /** + * Vehicle Identification Number (VIN or chassis number). Required, with vehicle_register_number and vehicle_licence_plate, by zaf_vehicle_ownership. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vin() { + return Json.optional(json, "vin", Conv.STRING); + } + /** * Social Security Number (USA). * @@ -1282,6 +1442,166 @@ public Builder bankCardNumber(String bankCardNumber) { return set("bank_card_number", Conv.STRING, bankCardNumber); } + /** + * Company registration number as issued by the companies register: the CNPJ in Brazil (e.g. 11222333000181), the registration number in South Africa (e.g. 1936/007721/06). Required by the company registry and company directors services (bra_company_registry, bra_company_directors, zaf_company_registry, zaf_company_directors). + * + * @param companyRegistrationNumber the value + * @return this builder + */ + public Builder companyRegistrationNumber(String companyRegistrationNumber) { + return set("company_registration_number", Conv.STRING, companyRegistrationNumber); + } + + /** + * Registered company name, cross-checked against the register entry. Optional for zaf_company_registry. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * The person's initials as printed on the document. Required by zaf_drivers_license; accepted by zaf_bank_account_holder. + * + * @param initials the value + * @return this builder + */ + public Builder initials(String initials) { + return set("initials", Conv.STRING, initials); + } + + /** + * Driving licence number as printed on the card, for zaf_drivers_license. When omitted, document_number is used. + * + * @param licenceNumber the value + * @return this builder + */ + public Builder licenceNumber(String licenceNumber) { + return set("licence_number", Conv.STRING, licenceNumber); + } + + /** + * Refugee file number issued by South Africa's Department of Home Affairs. Required by zaf_refugee. + * + * @param refugeeFileNumber the value + * @return this builder + */ + public Builder refugeeFileNumber(String refugeeFileNumber) { + return set("refugee_file_number", Conv.STRING, refugeeFileNumber); + } + + /** + * Name of the bank that holds the account. Required by zaf_bank_account_holder. + * + * @param bankName the value + * @return this builder + */ + public Builder bankName(String bankName) { + return set("bank_name", Conv.STRING, bankName); + } + + /** + * Bank account number. Required by zaf_bank_account_holder; accepted by zaf_fraud_prevention. + * + * @param bankAccountNumber the value + * @return this builder + */ + public Builder bankAccountNumber(String bankAccountNumber) { + return set("bank_account_number", Conv.STRING, bankAccountNumber); + } + + /** + * Bank account type for zaf_bank_account_holder: current, savings, transmission, subscriptionShare or notKnown, case-insensitive. Any other value returns 400. Omit it when you do not know the type: the account-type cross-check is then reported as not confirmed. + * + * @param accountType the value + * @return this builder + */ + public Builder accountType(String accountType) { + return set("account_type", Conv.STRING, accountType); + } + + /** + * Contact mobile number, for the services that cross-check contactability (zaf_bank_account_holder, zaf_fraud_prevention, zaf_refugee). + * + * @param phoneNumber the value + * @return this builder + */ + public Builder phoneNumber(String phoneNumber) { + return set("phone_number", Conv.STRING, phoneNumber); + } + + /** + * Base64-encoded right thumb fingerprint for zaf_dha_fingerprint_match, with left_thumb or on its own. + * + * @param rightThumb the value + * @return this builder + */ + public Builder rightThumb(String rightThumb) { + return set("right_thumb", Conv.STRING, rightThumb); + } + + /** + * Base64-encoded left thumb fingerprint for zaf_dha_fingerprint_match, with right_thumb or on its own. + * + * @param leftThumb the value + * @return this builder + */ + public Builder leftThumb(String leftThumb) { + return set("left_thumb", Conv.STRING, leftThumb); + } + + /** + * Minimum biometric score level for zaf_criminal_face_screening. Defaults to 3. + * + * @param scoreLevel the value + * @return this builder + */ + public Builder scoreLevel(long scoreLevel) { + return set("score_level", Conv.LONG, scoreLevel); + } + + /** + * Maximum number of candidate matches zaf_criminal_face_screening returns. Defaults to 1. + * + * @param maxMatches the value + * @return this builder + */ + public Builder maxMatches(long maxMatches) { + return set("max_matches", Conv.LONG, maxMatches); + } + + /** + * Vehicle register number. Required, with vehicle_licence_plate and vin, by zaf_vehicle_ownership. + * + * @param vehicleRegisterNumber the value + * @return this builder + */ + public Builder vehicleRegisterNumber(String vehicleRegisterNumber) { + return set("vehicle_register_number", Conv.STRING, vehicleRegisterNumber); + } + + /** + * Vehicle licence plate number. Required, with vehicle_register_number and vin, by zaf_vehicle_ownership. + * + * @param vehicleLicencePlate the value + * @return this builder + */ + public Builder vehicleLicencePlate(String vehicleLicencePlate) { + return set("vehicle_licence_plate", Conv.STRING, vehicleLicencePlate); + } + + /** + * Vehicle Identification Number (VIN or chassis number). Required, with vehicle_register_number and vehicle_licence_plate, by zaf_vehicle_ownership. + * + * @param vin the value + * @return this builder + */ + public Builder vin(String vin) { + return set("vin", Conv.STRING, vin); + } + /** * Social Security Number (USA). * diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum.java b/src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum.java new file mode 100644 index 0000000..c15f7a1 --- /dev/null +++ b/src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum.java @@ -0,0 +1,61 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import java.util.List; +import me.didit.core.StringEnum; + +/** + * - USA - USA + * - GBR - GBR + * - BRA - BRA + * - SGP - SGP + * - TWN - TWN + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ +public final class DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum extends StringEnum { + /** The value {@code "USA"}. */ + public static final DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum USA = new DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum("USA"); + + /** The value {@code "GBR"}. */ + public static final DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum GBR = new DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum("GBR"); + + /** The value {@code "BRA"}. */ + public static final DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum BRA = new DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum("BRA"); + + /** The value {@code "SGP"}. */ + public static final DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum SGP = new DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum("SGP"); + + /** The value {@code "TWN"}. */ + public static final DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum TWN = new DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum("TWN"); + + private static final List KNOWN_VALUES = List.of(USA, GBR, BRA, SGP, TWN); + + private DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } +} diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest.java b/src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest.java new file mode 100644 index 0000000..f678743 --- /dev/null +++ b/src/main/java/me/didit/types/DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest.java @@ -0,0 +1,195 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +/** Start a Google Wallet verification (USA, GBR, BRA, SGP, TWN). */ +public final class DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("vendor_data", "metadata", "sandbox_scenario", "country", "origin"); + + private DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest fromJson(JsonNode json) { + return new DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Your own reference for this verification (e.g. your user id). Returned in results and webhooks. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vendorData() { + return Json.optional(json, "vendor_data", Conv.STRING); + } + + /** + * Optional JSON object stored with the verification and returned in results and webhooks. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> metadata() { + return Json.optional(json, "metadata", Conv.OBJECT); + } + + /** + * Sandbox applications only: the simulated outcome - 'wallet_cancelled', 'wallet_timeout' or 'wallet_provider_error'; any other scenario (or none) verifies. Rejected on live applications. The full catalog is available at GET /v1/sandbox/scenarios/. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sandboxScenario() { + return Json.optional(json, "sandbox_scenario", Conv.STRING); + } + + /** + * ISO 3166-1 alpha-3 country of the Google Wallet identity. + * + *

- USA - USA + * - GBR - GBR + * - BRA - BRA + * - SGP - SGP + * - TWN - TWN + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum country() { + return Json.required(json, "country", Conv.enumeration(DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum::of)); + } + + /** + * Where your page or app will ask the wallet: the https origin of your page (its host must be in the application's allowed_return_hosts, or be its white-label domain), e.g. https://app.example.com, or android:apk-key-hash:<base64 SHA-256 of your app's signing certificate, no padding>. The wallet refuses the request anywhere else. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String origin() { + return Json.required(json, "origin", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest from) { + super(from); + } + + /** + * Your own reference for this verification (e.g. your user id). Returned in results and webhooks. + * + * @param vendorData the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder vendorData(@Nullable String vendorData) { + return setNullable("vendor_data", Conv.STRING, vendorData); + } + + /** + * Optional JSON object stored with the verification and returned in results and webhooks. + * + * @param metadata the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder metadata(@Nullable Map metadata) { + return setAny("metadata", metadata); + } + + /** + * Sandbox applications only: the simulated outcome - 'wallet_cancelled', 'wallet_timeout' or 'wallet_provider_error'; any other scenario (or none) verifies. Rejected on live applications. The full catalog is available at GET /v1/sandbox/scenarios/. + * + * @param sandboxScenario the value + * @return this builder + */ + public Builder sandboxScenario(String sandboxScenario) { + return set("sandbox_scenario", Conv.STRING, sandboxScenario); + } + + /** + * ISO 3166-1 alpha-3 country of the Google Wallet identity. + * + *

- USA - USA + * - GBR - GBR + * - BRA - BRA + * - SGP - SGP + * - TWN - TWN + * + * @param country the value + * @return this builder + */ + public Builder country(DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum country) { + return set("country", Conv.enumeration(DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum::of), country); + } + + /** + * Where your page or app will ask the wallet: the https origin of your page (its host must be in the application's allowed_return_hosts, or be its white-label domain), e.g. https://app.example.com, or android:apk-key-hash:<base64 SHA-256 of your app's signing certificate, no padding>. The wallet refuses the request anywhere else. + * + * @param origin the value + * @return this builder + */ + public Builder origin(String origin) { + return set("origin", Conv.STRING, origin); + } + + /** + * Builds the value. + * + * @return a new immutable {@code DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest} + * @throws IllegalStateException when a required field is missing + */ + public DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest build() { + require("country", false); + require("origin", false); + return new DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiInteractionEnum.java b/src/main/java/me/didit/types/DigitalIdWalletApiInteractionEnum.java index 88ae900..cb12995 100644 --- a/src/main/java/me/didit/types/DigitalIdWalletApiInteractionEnum.java +++ b/src/main/java/me/didit/types/DigitalIdWalletApiInteractionEnum.java @@ -7,6 +7,7 @@ /** * - redirect - redirect * - in_app - in_app + * - digital_credentials - digital_credentials * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ @@ -17,7 +18,10 @@ public final class DigitalIdWalletApiInteractionEnum extends StringEnum { /** The value {@code "in_app"}. */ public static final DigitalIdWalletApiInteractionEnum IN_APP = new DigitalIdWalletApiInteractionEnum("in_app"); - private static final List KNOWN_VALUES = List.of(REDIRECT, IN_APP); + /** The value {@code "digital_credentials"}. */ + public static final DigitalIdWalletApiInteractionEnum DIGITAL_CREDENTIALS = new DigitalIdWalletApiInteractionEnum("digital_credentials"); + + private static final List KNOWN_VALUES = List.of(REDIRECT, IN_APP, DIGITAL_CREDENTIALS); private DigitalIdWalletApiInteractionEnum(String value) { super(value); diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiWalletCatalogEntry.java b/src/main/java/me/didit/types/DigitalIdWalletApiWalletCatalogEntry.java index 2834341..8c67a45 100644 --- a/src/main/java/me/didit/types/DigitalIdWalletApiWalletCatalogEntry.java +++ b/src/main/java/me/didit/types/DigitalIdWalletApiWalletCatalogEntry.java @@ -112,6 +112,7 @@ public Optional levelOfAssurance() { /** * - redirect - redirect * - in_app - in_app + * - digital_credentials - digital_credentials * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -216,6 +217,7 @@ public Builder levelOfAssurance(@Nullable String levelOfAssurance) { /** * - redirect - redirect * - in_app - in_app + * - digital_credentials - digital_credentials * * @param interaction the value * @return this builder diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialResponseRequest.java b/src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialResponseRequest.java new file mode 100644 index 0000000..26e0ee0 --- /dev/null +++ b/src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialResponseRequest.java @@ -0,0 +1,102 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** + * What the wallet answered your page or app, for a `request_digital_credential` verification. + */ +public final class DigitalIdWalletApiWalletDigitalCredentialResponseRequest extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("response"); + + private DigitalIdWalletApiWalletDigitalCredentialResponseRequest(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code DigitalIdWalletApiWalletDigitalCredentialResponseRequest} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static DigitalIdWalletApiWalletDigitalCredentialResponseRequest fromJson(JsonNode json) { + return new DigitalIdWalletApiWalletDigitalCredentialResponseRequest(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Exactly what the wallet returned: {protocol, data} of the DigitalCredential from navigator.credentials.get, or the parsed credentialJson of Android's DigitalCredential. Encrypted to Didit; do not alter it. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public Map response() { + return Json.required(json, "response", Conv.OBJECT); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link DigitalIdWalletApiWalletDigitalCredentialResponseRequest}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(DigitalIdWalletApiWalletDigitalCredentialResponseRequest from) { + super(from); + } + + /** + * Exactly what the wallet returned: {protocol, data} of the DigitalCredential from navigator.credentials.get, or the parsed credentialJson of Android's DigitalCredential. Encrypted to Didit; do not alter it. + * + * @param response the value + * @return this builder + */ + public Builder response(Map response) { + return setAny("response", response); + } + + /** + * Builds the value. + * + * @return a new immutable {@code DigitalIdWalletApiWalletDigitalCredentialResponseRequest} + * @throws IllegalStateException when a required field is missing + */ + public DigitalIdWalletApiWalletDigitalCredentialResponseRequest build() { + require("response", false); + return new DigitalIdWalletApiWalletDigitalCredentialResponseRequest(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialsRequest.java b/src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialsRequest.java new file mode 100644 index 0000000..80569e8 --- /dev/null +++ b/src/main/java/me/didit/types/DigitalIdWalletApiWalletDigitalCredentialsRequest.java @@ -0,0 +1,120 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +public final class DigitalIdWalletApiWalletDigitalCredentialsRequest extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("protocol", "request"); + + private DigitalIdWalletApiWalletDigitalCredentialsRequest(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code DigitalIdWalletApiWalletDigitalCredentialsRequest} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static DigitalIdWalletApiWalletDigitalCredentialsRequest fromJson(JsonNode json) { + return new DigitalIdWalletApiWalletDigitalCredentialsRequest(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * openid4vp-v1-signed. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String protocol() { + return Json.required(json, "protocol", Conv.STRING); + } + + /** + * Pass as is: navigator.credentials.get({digital: request}) in the browser, or JSON.stringify(request) as GetDigitalCredentialOption's requestJson on Android. Signed by Didit for your application. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public Map request() { + return Json.required(json, "request", Conv.OBJECT); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link DigitalIdWalletApiWalletDigitalCredentialsRequest}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(DigitalIdWalletApiWalletDigitalCredentialsRequest from) { + super(from); + } + + /** + * openid4vp-v1-signed. + * + * @param protocol the value + * @return this builder + */ + public Builder protocol(String protocol) { + return set("protocol", Conv.STRING, protocol); + } + + /** + * Pass as is: navigator.credentials.get({digital: request}) in the browser, or JSON.stringify(request) as GetDigitalCredentialOption's requestJson on Android. Signed by Didit for your application. + * + * @param request the value + * @return this builder + */ + public Builder request(Map request) { + return setAny("request", request); + } + + /** + * Builds the value. + * + * @return a new immutable {@code DigitalIdWalletApiWalletDigitalCredentialsRequest} + * @throws IllegalStateException when a required field is missing + */ + public DigitalIdWalletApiWalletDigitalCredentialsRequest build() { + require("protocol", false); + require("request", false); + return new DigitalIdWalletApiWalletDigitalCredentialsRequest(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextAction.java b/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextAction.java index 63435e5..8ef3b8a 100644 --- a/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextAction.java +++ b/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextAction.java @@ -13,7 +13,7 @@ import me.didit.core.JsonModel; public final class DigitalIdWalletApiWalletNextAction extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("type", "url", "verification_code", "poll_interval_seconds"); + private static final Set KNOWN_FIELDS = Set.of("type", "url", "digital_credentials", "verification_code", "poll_interval_seconds"); private DigitalIdWalletApiWalletNextAction(ObjectNode json, Map> files) { super(json, files); @@ -49,10 +49,11 @@ public Builder toBuilder() { } /** - * redirect: send the user's browser to url. confirm_in_app: show verification_code to the user, who checks it matches the code in their wallet app and confirms there; then poll. + * redirect: send the user's browser to url. confirm_in_app: show verification_code to the user, who checks it matches the code in their wallet app and confirms there; then poll. request_digital_credential: in a user gesture on the origin you started with, ask the wallet with digital_credentials.request, then send what it returns to POST .../verifications/{request_id}/response/. * *

- redirect - redirect * - confirm_in_app - confirm_in_app + * - request_digital_credential - request_digital_credential * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -71,6 +72,16 @@ public Optional url() { return Json.optional(json, "url", Conv.STRING); } + /** + * request_digital_credential only: the request to hand to the wallet. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional digitalCredentials() { + return Json.optional(json, "digital_credentials", Conv.model(DigitalIdWalletApiWalletDigitalCredentialsRequest::fromJson)); + } + /** * confirm_in_app only: the 4-digit comparison code the wallet app shows too. * @@ -105,10 +116,11 @@ private Builder(DigitalIdWalletApiWalletNextAction from) { } /** - * redirect: send the user's browser to url. confirm_in_app: show verification_code to the user, who checks it matches the code in their wallet app and confirms there; then poll. + * redirect: send the user's browser to url. confirm_in_app: show verification_code to the user, who checks it matches the code in their wallet app and confirms there; then poll. request_digital_credential: in a user gesture on the origin you started with, ask the wallet with digital_credentials.request, then send what it returns to POST .../verifications/{request_id}/response/. * *

- redirect - redirect * - confirm_in_app - confirm_in_app + * - request_digital_credential - request_digital_credential * * @param type the value * @return this builder @@ -127,6 +139,16 @@ public Builder url(String url) { return set("url", Conv.STRING, url); } + /** + * request_digital_credential only: the request to hand to the wallet. + * + * @param digitalCredentials the value + * @return this builder + */ + public Builder digitalCredentials(DigitalIdWalletApiWalletDigitalCredentialsRequest digitalCredentials) { + return set("digital_credentials", Conv.model(DigitalIdWalletApiWalletDigitalCredentialsRequest::fromJson), digitalCredentials); + } + /** * confirm_in_app only: the 4-digit comparison code the wallet app shows too. * diff --git a/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextActionTypeEnum.java b/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextActionTypeEnum.java index aff488f..1119811 100644 --- a/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextActionTypeEnum.java +++ b/src/main/java/me/didit/types/DigitalIdWalletApiWalletNextActionTypeEnum.java @@ -7,6 +7,7 @@ /** * - redirect - redirect * - confirm_in_app - confirm_in_app + * - request_digital_credential - request_digital_credential * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ @@ -17,7 +18,10 @@ public final class DigitalIdWalletApiWalletNextActionTypeEnum extends StringEnum /** The value {@code "confirm_in_app"}. */ public static final DigitalIdWalletApiWalletNextActionTypeEnum CONFIRM_IN_APP = new DigitalIdWalletApiWalletNextActionTypeEnum("confirm_in_app"); - private static final List KNOWN_VALUES = List.of(REDIRECT, CONFIRM_IN_APP); + /** The value {@code "request_digital_credential"}. */ + public static final DigitalIdWalletApiWalletNextActionTypeEnum REQUEST_DIGITAL_CREDENTIAL = new DigitalIdWalletApiWalletNextActionTypeEnum("request_digital_credential"); + + private static final List KNOWN_VALUES = List.of(REDIRECT, CONFIRM_IN_APP, REQUEST_DIGITAL_CREDENTIAL); private DigitalIdWalletApiWalletNextActionTypeEnum(String value) { super(value); diff --git a/src/main/java/me/didit/types/EmailCheckCodeParams.java b/src/main/java/me/didit/types/EmailCheckCodeParams.java index d5f8173..cbc0a59 100644 --- a/src/main/java/me/didit/types/EmailCheckCodeParams.java +++ b/src/main/java/me/didit/types/EmailCheckCodeParams.java @@ -15,7 +15,7 @@ /** Parameters for {@code email.check_code}. */ public final class EmailCheckCodeParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("email", "code", "duplicated_email_action", "breached_email_action", "disposable_email_action", "enable_social", "email_no_social_presence_action"); + private static final Set KNOWN_FIELDS = Set.of("email", "code", "duplicated_email_action", "breached_email_action", "disposable_email_action", "enable_enrichment", "email_intelligence_score_action", "recent_email_breach_action", "frequent_email_breach_action", "enable_social", "email_no_social_presence_action"); private EmailCheckCodeParams(ObjectNode json, Map> files) { super(json, files); @@ -100,6 +100,46 @@ public Optional disposableEmailActio return Json.optional(json, "disposable_email_action", Conv.enumeration(EmailCheckCodeParams.DisposableEmailAction::of)); } + /** + * When true, also run email intelligence on the address: a risk score and its breach history. Billed as one email_intelligence_api unit per request ($0.05 at list price) in addition to this endpoint's own price. The request returns 403 when your balance cannot cover it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enableEnrichment() { + return Json.optional(json, "enable_enrichment", Conv.BOOLEAN); + } + + /** + * Action when the email intelligence risk score is above the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emailIntelligenceScoreAction() { + return Json.optional(json, "email_intelligence_score_action", Conv.enumeration(EmailCheckCodeParams.EmailIntelligenceScoreAction::of)); + } + + /** + * Action when the address appears in a recent known data breach. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional recentEmailBreachAction() { + return Json.optional(json, "recent_email_breach_action", Conv.enumeration(EmailCheckCodeParams.RecentEmailBreachAction::of)); + } + + /** + * Action when the address appears in many known data breaches. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional frequentEmailBreachAction() { + return Json.optional(json, "frequent_email_breach_action", Conv.enumeration(EmailCheckCodeParams.FrequentEmailBreachAction::of)); + } + /** * When true, also look up the social footprint of the address - the email, social, professional, e-commerce and entertainment platforms it is registered on. Billed as one email_social unit per request in addition to this endpoint's own price. * @@ -183,6 +223,46 @@ public Builder disposableEmailAction(EmailCheckCodeParams.DisposableEmailAction return set("disposable_email_action", Conv.enumeration(EmailCheckCodeParams.DisposableEmailAction::of), disposableEmailAction); } + /** + * When true, also run email intelligence on the address: a risk score and its breach history. Billed as one email_intelligence_api unit per request ($0.05 at list price) in addition to this endpoint's own price. The request returns 403 when your balance cannot cover it. + * + * @param enableEnrichment the value + * @return this builder + */ + public Builder enableEnrichment(boolean enableEnrichment) { + return set("enable_enrichment", Conv.BOOLEAN, enableEnrichment); + } + + /** + * Action when the email intelligence risk score is above the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param emailIntelligenceScoreAction the value + * @return this builder + */ + public Builder emailIntelligenceScoreAction(EmailCheckCodeParams.EmailIntelligenceScoreAction emailIntelligenceScoreAction) { + return set("email_intelligence_score_action", Conv.enumeration(EmailCheckCodeParams.EmailIntelligenceScoreAction::of), emailIntelligenceScoreAction); + } + + /** + * Action when the address appears in a recent known data breach. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param recentEmailBreachAction the value + * @return this builder + */ + public Builder recentEmailBreachAction(EmailCheckCodeParams.RecentEmailBreachAction recentEmailBreachAction) { + return set("recent_email_breach_action", Conv.enumeration(EmailCheckCodeParams.RecentEmailBreachAction::of), recentEmailBreachAction); + } + + /** + * Action when the address appears in many known data breaches. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param frequentEmailBreachAction the value + * @return this builder + */ + public Builder frequentEmailBreachAction(EmailCheckCodeParams.FrequentEmailBreachAction frequentEmailBreachAction) { + return set("frequent_email_breach_action", Conv.enumeration(EmailCheckCodeParams.FrequentEmailBreachAction::of), frequentEmailBreachAction); + } + /** * When true, also look up the social footprint of the address - the email, social, professional, e-commerce and entertainment platforms it is registered on. Billed as one email_social unit per request in addition to this endpoint's own price. * @@ -350,6 +430,135 @@ public boolean isKnown() { } } + /** + * Action when the email intelligence risk score is above the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EmailIntelligenceScoreAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final EmailIntelligenceScoreAction NO_ACTION = new EmailIntelligenceScoreAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final EmailIntelligenceScoreAction DECLINE = new EmailIntelligenceScoreAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private EmailIntelligenceScoreAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EmailIntelligenceScoreAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EmailIntelligenceScoreAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Action when the address appears in a recent known data breach. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class RecentEmailBreachAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final RecentEmailBreachAction NO_ACTION = new RecentEmailBreachAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final RecentEmailBreachAction DECLINE = new RecentEmailBreachAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private RecentEmailBreachAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static RecentEmailBreachAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, RecentEmailBreachAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Action when the address appears in many known data breaches. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class FrequentEmailBreachAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final FrequentEmailBreachAction NO_ACTION = new FrequentEmailBreachAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final FrequentEmailBreachAction DECLINE = new FrequentEmailBreachAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private FrequentEmailBreachAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static FrequentEmailBreachAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, FrequentEmailBreachAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + /** * Action when the social footprint check finds the address registered on none of the platforms it covers. Only NO_ACTION and DECLINE are accepted on this endpoint; REVIEW is available on the workflow configuration key of the same name. * diff --git a/src/main/java/me/didit/types/EmailIntelligence.java b/src/main/java/me/didit/types/EmailIntelligence.java index 9e32784..102babc 100644 --- a/src/main/java/me/didit/types/EmailIntelligence.java +++ b/src/main/java/me/didit/types/EmailIntelligence.java @@ -11,6 +11,7 @@ import me.didit.core.FileUpload; import me.didit.core.Json; import me.didit.core.JsonModel; +import me.didit.core.StringEnum; import org.jspecify.annotations.Nullable; /** @@ -153,13 +154,13 @@ public Optional noOfBreaches() { } /** - * Machine-readable codes explaining the score. Values can grow over time, so do not reject unknown codes. + * Signals that explain the score, each with a stable Didit code, a direction, a message and an impact level. New codes can appear over time, so do not reject unknown codes. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> reasonCodes() { - return Json.optional(json, "reason_codes", Conv.list(Conv.STRING)); + public Optional> reasonCodes() { + return Json.optional(json, "reason_codes", Conv.list(Conv.model(EmailIntelligence.ReasonCodes::fromJson))); } @Override @@ -276,13 +277,13 @@ public Builder noOfBreaches(@Nullable Double noOfBreaches) { } /** - * Machine-readable codes explaining the score. Values can grow over time, so do not reject unknown codes. + * Signals that explain the score, each with a stable Didit code, a direction, a message and an impact level. New codes can appear over time, so do not reject unknown codes. * * @param reasonCodes the value * @return this builder */ - public Builder reasonCodes(List reasonCodes) { - return set("reason_codes", Conv.list(Conv.STRING), reasonCodes); + public Builder reasonCodes(List reasonCodes) { + return set("reason_codes", Conv.list(Conv.model(EmailIntelligence.ReasonCodes::fromJson)), reasonCodes); } /** @@ -299,4 +300,212 @@ protected Builder self() { return this; } } + + public static final class ReasonCodes extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("code", "value", "direction", "message", "impact_level"); + + private ReasonCodes(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code ReasonCodes} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static ReasonCodes fromJson(JsonNode json) { + return new ReasonCodes(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Stable Didit identifier of the signal, for example IR-5AC67A32. Opaque: group and filter on it, do not parse it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional code() { + return Json.optional(json, "code", Conv.STRING); + } + + /** + * For a risk flag (for example voip, leaked, disposable, spam_trap), its value: a boolean, a level or a date. Null for a scored reason code. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional value() { + return Json.optional(json, "value", Conv.ANY); + } + + /** + * Whether the signal raised the risk or added trust. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional direction() { + return Json.optional(json, "direction", Conv.enumeration(EmailIntelligence.ReasonCodes.Direction::of)); + } + + /** + * Human-readable explanation of the signal, in English. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional message() { + return Json.optional(json, "message", Conv.STRING); + } + + /** + * How strongly the signal moved the score, for example low, medium or high. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional impactLevel() { + return Json.optional(json, "impact_level", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link ReasonCodes}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(ReasonCodes from) { + super(from); + } + + /** + * Stable Didit identifier of the signal, for example IR-5AC67A32. Opaque: group and filter on it, do not parse it. + * + * @param code the value + * @return this builder + */ + public Builder code(String code) { + return set("code", Conv.STRING, code); + } + + /** + * For a risk flag (for example voip, leaked, disposable, spam_trap), its value: a boolean, a level or a date. Null for a scored reason code. + * + * @param value the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder value(@Nullable Object value) { + return setAny("value", value); + } + + /** + * Whether the signal raised the risk or added trust. + * + * @param direction the value + * @return this builder + */ + public Builder direction(EmailIntelligence.ReasonCodes.Direction direction) { + return set("direction", Conv.enumeration(EmailIntelligence.ReasonCodes.Direction::of), direction); + } + + /** + * Human-readable explanation of the signal, in English. + * + * @param message the value + * @return this builder + */ + public Builder message(String message) { + return set("message", Conv.STRING, message); + } + + /** + * How strongly the signal moved the score, for example low, medium or high. + * + * @param impactLevel the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder impactLevel(@Nullable String impactLevel) { + return setNullable("impact_level", Conv.STRING, impactLevel); + } + + /** + * Builds the value. + * + * @return a new immutable {@code ReasonCodes} + */ + public ReasonCodes build() { + return new ReasonCodes(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the signal raised the risk or added trust. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Direction extends StringEnum { + /** The value {@code "risk"}. */ + public static final Direction RISK = new Direction("risk"); + + /** The value {@code "trust"}. */ + public static final Direction TRUST = new Direction("trust"); + + private static final List KNOWN_VALUES = List.of(RISK, TRUST); + + private Direction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Direction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Direction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } } diff --git a/src/main/java/me/didit/types/EmailVerificationCheckResponse.java b/src/main/java/me/didit/types/EmailVerificationCheckResponse.java index a7556b0..1736807 100644 --- a/src/main/java/me/didit/types/EmailVerificationCheckResponse.java +++ b/src/main/java/me/didit/types/EmailVerificationCheckResponse.java @@ -273,7 +273,7 @@ public boolean isKnown() { * Full email report. Present (non-null) only on finalized outcomes (Approved/Declined); null on Failed and absent on Expired or Not Found. */ public static final class Email extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("status", "email", "is_breached", "breaches", "is_disposable", "is_undeliverable", "verification_attempts", "verified_at", "warnings", "lifecycle", "matches", "email_social"); + private static final Set KNOWN_FIELDS = Set.of("status", "email", "is_breached", "breaches", "is_disposable", "is_undeliverable", "verification_attempts", "verified_at", "warnings", "lifecycle", "matches", "email_social", "email_intelligence"); private Email(ObjectNode json, Map> files) { super(json, files); @@ -428,6 +428,16 @@ public Optional emailSocial() { return Json.optional(json, "email_social", Conv.model(EmailSocialFootprint::fromJson)); } + /** + * Email intelligence signals. Present only when enable_enrichment was true on the check. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emailIntelligence() { + return Json.optional(json, "email_intelligence", Conv.model(EmailIntelligence::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -561,6 +571,16 @@ public Builder emailSocial(@Nullable EmailSocialFootprint emailSocial) { return setNullable("email_social", Conv.model(EmailSocialFootprint::fromJson), emailSocial); } + /** + * Email intelligence signals. Present only when enable_enrichment was true on the check. + * + * @param emailIntelligence the value + * @return this builder + */ + public Builder emailIntelligence(EmailIntelligence emailIntelligence) { + return set("email_intelligence", Conv.model(EmailIntelligence::fromJson), emailIntelligence); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/GeolocationAttempt.java b/src/main/java/me/didit/types/GeolocationAttempt.java new file mode 100644 index 0000000..f924b0b --- /dev/null +++ b/src/main/java/me/didit/types/GeolocationAttempt.java @@ -0,0 +1,1750 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** + * One attempt of a Location verification step: the same keys as geolocation_checks[] except warnings, plus when Didit received it. + */ +public final class GeolocationAttempt extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "outcome", "permission", "latitude", "longitude", "accuracy_m", "accuracy_confidence", "measured_at", "age_seconds", "source", "platform", "sdk_version", "is_mock", "produced_by_accessory", "integrity", "country_code", "region_code", "city", "geofence", "inside_geofence", "geofence_basis", "inside_areas", "blocked_areas", "position_source", "anonymizers", "ip_distance_km", "ip_distance_uncertainty_km", "ip_consistent", "document_distance_km", "travel_excused", "consecutive_mismatches", "attempts", "consent", "received_at", "created_at"); + + private GeolocationAttempt(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code GeolocationAttempt} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static GeolocationAttempt fromJson(JsonNode json) { + return new GeolocationAttempt(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node that produced this result, so a workflow with two Location verification steps stays readable. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * Feature-level status of this Location verification step, resolved from its warnings. Independent of the session status. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.enumeration(GeolocationAttempt.Status::of)); + } + + /** + * What happened on this attempt. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional outcome() { + return Json.optional(json, "outcome", Conv.enumeration(GeolocationAttempt.Outcome::of)); + } + + /** + * What the operating system or browser granted. not_requested means the step uses the connection's IP location only, so the person is never asked for a permission. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional permission() { + return Json.optional(json, "permission", Conv.enumeration(GeolocationAttempt.Permission::of)); + } + + /** + * WGS84 latitude of the fix. null when there is no fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional latitude() { + return Json.optional(json, "latitude", Conv.DOUBLE); + } + + /** + * WGS84 longitude of the fix. null when there is no fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional longitude() { + return Json.optional(json, "longitude", Conv.DOUBLE); + } + + /** + * Radius of uncertainty in metres, at the confidence level in accuracy_confidence. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional accuracyM() { + return Json.optional(json, "accuracy_m", Conv.DOUBLE); + } + + /** + * Confidence level the platform attaches to accuracy_m: p95 (browsers), p68 (Android) or unspecified (iOS). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional accuracyConfidence() { + return Json.optional(json, "accuracy_confidence", Conv.enumeration(GeolocationAttempt.AccuracyConfidence::of)); + } + + /** + * When the device took the fix, by its own clock. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional measuredAt() { + return Json.optional(json, "measured_at", Conv.DATE_TIME); + } + + /** + * Seconds between the device taking the fix and Didit receiving it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ageSeconds() { + return Json.optional(json, "age_seconds", Conv.LONG); + } + + /** + * Where the fix came from, when the platform says. ip means the position is the connection's IP location. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional source() { + return Json.optional(json, "source", Conv.enumeration(GeolocationAttempt.Source::of)); + } + + /** + * The client that produced the fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional platform() { + return Json.optional(json, "platform", Conv.enumeration(GeolocationAttempt.Platform::of)); + } + + /** + * Version of the SDK that produced the fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sdkVersion() { + return Json.optional(json, "sdk_version", Conv.STRING); + } + + /** + * true when the device says the fix came from a mock location provider or simulation software. null when the platform does not report it (browsers cannot tell); null is not false. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional isMock() { + return Json.optional(json, "is_mock", Conv.BOOLEAN); + } + + /** + * iOS only: true when the fix came from an external accessory. null elsewhere. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional producedByAccessory() { + return Json.optional(json, "produced_by_accessory", Conv.BOOLEAN); + } + + /** + * Whether device attestation backs the fix. unsupported is what browsers report, because the web has no attestation mechanism; it is not a failure. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional integrity() { + return Json.optional(json, "integrity", Conv.enumeration(GeolocationAttempt.Integrity::of)); + } + + /** + * ISO 3166-1 alpha-2 country the fix is in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional countryCode() { + return Json.optional(json, "country_code", Conv.STRING); + } + + /** + * ISO 3166-2 subdivision the fix is in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional regionCode() { + return Json.optional(json, "region_code", Conv.STRING); + } + + /** + * Nearest populated place, a label for reviewers. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional city() { + return Json.optional(json, "city", Conv.STRING); + } + + /** + * Result of the country and area rules of the step. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional geofence() { + return Json.optional(json, "geofence", Conv.model(GeolocationAttempt.Geofence::fromJson)); + } + + /** + * true when geofence.result is inside, false when outside, null otherwise. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional insideGeofence() { + return Json.optional(json, "inside_geofence", Conv.BOOLEAN); + } + + /** + * Which position the area result was judged from: the device fix, or the connection's ip location. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional geofenceBasis() { + return Json.optional(json, "geofence_basis", Conv.enumeration(GeolocationAttempt.GeofenceBasis::of)); + } + + /** + * Ids of the configured allowed areas the position is inside. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> insideAreas() { + return Json.optional(json, "inside_areas", Conv.list(Conv.STRING)); + } + + /** + * Ids of the configured blocked areas the position is in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> blockedAreas() { + return Json.optional(json, "blocked_areas", Conv.list(Conv.STRING)); + } + + /** + * Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional positionSource() { + return Json.optional(json, "position_source", Conv.enumeration(GeolocationAttempt.PositionSource::of)); + } + + /** + * What the connection and device look like, each true, false or null when the source cannot tell. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional anonymizers() { + return Json.optional(json, "anonymizers", Conv.model(GeolocationAttempt.Anonymizers::fromJson)); + } + + /** + * Distance to the session's IP location after both uncertainty radii are subtracted; 0 when they overlap. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipDistanceKm() { + return Json.optional(json, "ip_distance_km", Conv.DOUBLE); + } + + /** + * Combined radius that was subtracted: the IP location's radius plus this fix's accuracy. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipDistanceUncertaintyKm() { + return Json.optional(json, "ip_distance_uncertainty_km", Conv.DOUBLE); + } + + /** + * Whether ip_distance_km is within the distance configured on the step. null when either side is unknown. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipConsistent() { + return Json.optional(json, "ip_consistent", Conv.BOOLEAN); + } + + /** + * Distance to the geocoded address on the ID document or proof of address. null when no address is on file. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentDistanceKm() { + return Json.optional(json, "document_distance_km", Conv.DOUBLE); + } + + /** + * Whether the step's travel tolerance excused the distance from the address. null when tolerance is off. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional travelExcused() { + return Json.optional(json, "travel_excused", Conv.BOOLEAN); + } + + /** + * On the final attempt: this check plus the same person's earlier mismatches in a row. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional consecutiveMismatches() { + return Json.optional(json, "consecutive_mismatches", Conv.LONG); + } + + /** + * Number of this attempt within the node, starting at 1. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional attempts() { + return Json.optional(json, "attempts", Conv.LONG); + } + + /** + * The consent the person gave before the system prompt, recorded with the wording version and language they saw. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional consent() { + return Json.optional(json, "consent", Conv.model(GeolocationAttempt.Consent::fromJson)); + } + + /** + * When Didit received the attempt. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional receivedAt() { + return Json.optional(json, "received_at", Conv.DATE_TIME); + } + + /** + * The created_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional createdAt() { + return Json.optional(json, "created_at", Conv.DATE_TIME); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link GeolocationAttempt}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(GeolocationAttempt from) { + super(from); + } + + /** + * Workflow node that produced this result, so a workflow with two Location verification steps stays readable. + * + * @param nodeId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nodeId(@Nullable String nodeId) { + return setNullable("node_id", Conv.STRING, nodeId); + } + + /** + * Feature-level status of this Location verification step, resolved from its warnings. Independent of the session status. + * + * @param status the value + * @return this builder + */ + public Builder status(GeolocationAttempt.Status status) { + return set("status", Conv.enumeration(GeolocationAttempt.Status::of), status); + } + + /** + * What happened on this attempt. + * + * @param outcome the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder outcome(GeolocationAttempt.@Nullable Outcome outcome) { + return setNullable("outcome", Conv.enumeration(GeolocationAttempt.Outcome::of), outcome); + } + + /** + * What the operating system or browser granted. not_requested means the step uses the connection's IP location only, so the person is never asked for a permission. + * + * @param permission the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder permission(GeolocationAttempt.@Nullable Permission permission) { + return setNullable("permission", Conv.enumeration(GeolocationAttempt.Permission::of), permission); + } + + /** + * WGS84 latitude of the fix. null when there is no fix. + * + * @param latitude the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder latitude(@Nullable Double latitude) { + return setNullable("latitude", Conv.DOUBLE, latitude); + } + + /** + * WGS84 longitude of the fix. null when there is no fix. + * + * @param longitude the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder longitude(@Nullable Double longitude) { + return setNullable("longitude", Conv.DOUBLE, longitude); + } + + /** + * Radius of uncertainty in metres, at the confidence level in accuracy_confidence. + * + * @param accuracyM the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder accuracyM(@Nullable Double accuracyM) { + return setNullable("accuracy_m", Conv.DOUBLE, accuracyM); + } + + /** + * Confidence level the platform attaches to accuracy_m: p95 (browsers), p68 (Android) or unspecified (iOS). + * + * @param accuracyConfidence the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder accuracyConfidence(GeolocationAttempt.@Nullable AccuracyConfidence accuracyConfidence) { + return setNullable("accuracy_confidence", Conv.enumeration(GeolocationAttempt.AccuracyConfidence::of), accuracyConfidence); + } + + /** + * When the device took the fix, by its own clock. + * + * @param measuredAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder measuredAt(@Nullable OffsetDateTime measuredAt) { + return setNullable("measured_at", Conv.DATE_TIME, measuredAt); + } + + /** + * Seconds between the device taking the fix and Didit receiving it. + * + * @param ageSeconds the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ageSeconds(@Nullable Long ageSeconds) { + return setNullable("age_seconds", Conv.LONG, ageSeconds); + } + + /** + * Where the fix came from, when the platform says. ip means the position is the connection's IP location. + * + * @param source the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder source(GeolocationAttempt.@Nullable Source source) { + return setNullable("source", Conv.enumeration(GeolocationAttempt.Source::of), source); + } + + /** + * The client that produced the fix. + * + * @param platform the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder platform(GeolocationAttempt.@Nullable Platform platform) { + return setNullable("platform", Conv.enumeration(GeolocationAttempt.Platform::of), platform); + } + + /** + * Version of the SDK that produced the fix. + * + * @param sdkVersion the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sdkVersion(@Nullable String sdkVersion) { + return setNullable("sdk_version", Conv.STRING, sdkVersion); + } + + /** + * true when the device says the fix came from a mock location provider or simulation software. null when the platform does not report it (browsers cannot tell); null is not false. + * + * @param isMock the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder isMock(@Nullable Boolean isMock) { + return setNullable("is_mock", Conv.BOOLEAN, isMock); + } + + /** + * iOS only: true when the fix came from an external accessory. null elsewhere. + * + * @param producedByAccessory the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder producedByAccessory(@Nullable Boolean producedByAccessory) { + return setNullable("produced_by_accessory", Conv.BOOLEAN, producedByAccessory); + } + + /** + * Whether device attestation backs the fix. unsupported is what browsers report, because the web has no attestation mechanism; it is not a failure. + * + * @param integrity the value + * @return this builder + */ + public Builder integrity(GeolocationAttempt.Integrity integrity) { + return set("integrity", Conv.enumeration(GeolocationAttempt.Integrity::of), integrity); + } + + /** + * ISO 3166-1 alpha-2 country the fix is in. + * + * @param countryCode the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder countryCode(@Nullable String countryCode) { + return setNullable("country_code", Conv.STRING, countryCode); + } + + /** + * ISO 3166-2 subdivision the fix is in. + * + * @param regionCode the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder regionCode(@Nullable String regionCode) { + return setNullable("region_code", Conv.STRING, regionCode); + } + + /** + * Nearest populated place, a label for reviewers. + * + * @param city the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder city(@Nullable String city) { + return setNullable("city", Conv.STRING, city); + } + + /** + * Result of the country and area rules of the step. + * + * @param geofence the value + * @return this builder + */ + public Builder geofence(GeolocationAttempt.Geofence geofence) { + return set("geofence", Conv.model(GeolocationAttempt.Geofence::fromJson), geofence); + } + + /** + * true when geofence.result is inside, false when outside, null otherwise. + * + * @param insideGeofence the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder insideGeofence(@Nullable Boolean insideGeofence) { + return setNullable("inside_geofence", Conv.BOOLEAN, insideGeofence); + } + + /** + * Which position the area result was judged from: the device fix, or the connection's ip location. + * + * @param geofenceBasis the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder geofenceBasis(GeolocationAttempt.@Nullable GeofenceBasis geofenceBasis) { + return setNullable("geofence_basis", Conv.enumeration(GeolocationAttempt.GeofenceBasis::of), geofenceBasis); + } + + /** + * Ids of the configured allowed areas the position is inside. + * + * @param insideAreas the value + * @return this builder + */ + public Builder insideAreas(List insideAreas) { + return set("inside_areas", Conv.list(Conv.STRING), insideAreas); + } + + /** + * Ids of the configured blocked areas the position is in. + * + * @param blockedAreas the value + * @return this builder + */ + public Builder blockedAreas(List blockedAreas) { + return set("blocked_areas", Conv.list(Conv.STRING), blockedAreas); + } + + /** + * Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only. + * + * @param positionSource the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder positionSource(GeolocationAttempt.@Nullable PositionSource positionSource) { + return setNullable("position_source", Conv.enumeration(GeolocationAttempt.PositionSource::of), positionSource); + } + + /** + * What the connection and device look like, each true, false or null when the source cannot tell. + * + * @param anonymizers the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder anonymizers(GeolocationAttempt.@Nullable Anonymizers anonymizers) { + return setNullable("anonymizers", Conv.model(GeolocationAttempt.Anonymizers::fromJson), anonymizers); + } + + /** + * Distance to the session's IP location after both uncertainty radii are subtracted; 0 when they overlap. + * + * @param ipDistanceKm the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ipDistanceKm(@Nullable Double ipDistanceKm) { + return setNullable("ip_distance_km", Conv.DOUBLE, ipDistanceKm); + } + + /** + * Combined radius that was subtracted: the IP location's radius plus this fix's accuracy. + * + * @param ipDistanceUncertaintyKm the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ipDistanceUncertaintyKm(@Nullable Double ipDistanceUncertaintyKm) { + return setNullable("ip_distance_uncertainty_km", Conv.DOUBLE, ipDistanceUncertaintyKm); + } + + /** + * Whether ip_distance_km is within the distance configured on the step. null when either side is unknown. + * + * @param ipConsistent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ipConsistent(@Nullable Boolean ipConsistent) { + return setNullable("ip_consistent", Conv.BOOLEAN, ipConsistent); + } + + /** + * Distance to the geocoded address on the ID document or proof of address. null when no address is on file. + * + * @param documentDistanceKm the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder documentDistanceKm(@Nullable Double documentDistanceKm) { + return setNullable("document_distance_km", Conv.DOUBLE, documentDistanceKm); + } + + /** + * Whether the step's travel tolerance excused the distance from the address. null when tolerance is off. + * + * @param travelExcused the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder travelExcused(@Nullable Boolean travelExcused) { + return setNullable("travel_excused", Conv.BOOLEAN, travelExcused); + } + + /** + * On the final attempt: this check plus the same person's earlier mismatches in a row. + * + * @param consecutiveMismatches the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder consecutiveMismatches(@Nullable Long consecutiveMismatches) { + return setNullable("consecutive_mismatches", Conv.LONG, consecutiveMismatches); + } + + /** + * Number of this attempt within the node, starting at 1. + * + * @param attempts the value + * @return this builder + */ + public Builder attempts(long attempts) { + return set("attempts", Conv.LONG, attempts); + } + + /** + * The consent the person gave before the system prompt, recorded with the wording version and language they saw. + * + * @param consent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder consent(GeolocationAttempt.@Nullable Consent consent) { + return setNullable("consent", Conv.model(GeolocationAttempt.Consent::fromJson), consent); + } + + /** + * When Didit received the attempt. + * + * @param receivedAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder receivedAt(@Nullable OffsetDateTime receivedAt) { + return setNullable("received_at", Conv.DATE_TIME, receivedAt); + } + + /** + * The created_at field. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(OffsetDateTime createdAt) { + return set("created_at", Conv.DATE_TIME, createdAt); + } + + /** + * Builds the value. + * + * @return a new immutable {@code GeolocationAttempt} + */ + public GeolocationAttempt build() { + return new GeolocationAttempt(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Feature-level status of this Location verification step, resolved from its warnings. Independent of the session status. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Status extends StringEnum { + /** The value {@code "Not Finished"}. */ + public static final Status NOT_FINISHED = new Status("Not Finished"); + + /** The value {@code "Approved"}. */ + public static final Status APPROVED = new Status("Approved"); + + /** The value {@code "Declined"}. */ + public static final Status DECLINED = new Status("Declined"); + + /** The value {@code "In Review"}. */ + public static final Status IN_REVIEW = new Status("In Review"); + + /** The value {@code "Resub Requested"}. */ + public static final Status RESUB_REQUESTED = new Status("Resub Requested"); + + private static final List KNOWN_VALUES = List.of(NOT_FINISHED, APPROVED, DECLINED, IN_REVIEW, RESUB_REQUESTED); + + private Status(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Status of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Status::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * What happened on this attempt. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Outcome extends StringEnum { + /** The value {@code "verified"}. */ + public static final Outcome VERIFIED = new Outcome("verified"); + + /** The value {@code "low_accuracy"}. */ + public static final Outcome LOW_ACCURACY = new Outcome("low_accuracy"); + + /** The value {@code "accuracy_undetermined"}. */ + public static final Outcome ACCURACY_UNDETERMINED = new Outcome("accuracy_undetermined"); + + /** The value {@code "stale"}. */ + public static final Outcome STALE = new Outcome("stale"); + + /** The value {@code "approximate"}. */ + public static final Outcome APPROXIMATE = new Outcome("approximate"); + + /** The value {@code "denied"}. */ + public static final Outcome DENIED = new Outcome("denied"); + + /** The value {@code "restricted"}. */ + public static final Outcome RESTRICTED = new Outcome("restricted"); + + /** The value {@code "unavailable"}. */ + public static final Outcome UNAVAILABLE = new Outcome("unavailable"); + + /** The value {@code "timeout"}. */ + public static final Outcome TIMEOUT = new Outcome("timeout"); + + /** The value {@code "mock_detected"}. */ + public static final Outcome MOCK_DETECTED = new Outcome("mock_detected"); + + /** The value {@code "outside_geofence"}. */ + public static final Outcome OUTSIDE_GEOFENCE = new Outcome("outside_geofence"); + + /** The value {@code "in_blocked_area"}. */ + public static final Outcome IN_BLOCKED_AREA = new Outcome("in_blocked_area"); + + /** The value {@code "anonymizer_detected"}. */ + public static final Outcome ANONYMIZER_DETECTED = new Outcome("anonymizer_detected"); + + /** The value {@code "skipped"}. */ + public static final Outcome SKIPPED = new Outcome("skipped"); + + /** The value {@code "replay_rejected"}. */ + public static final Outcome REPLAY_REJECTED = new Outcome("replay_rejected"); + + /** The value {@code "unsupported_client"}. */ + public static final Outcome UNSUPPORTED_CLIENT = new Outcome("unsupported_client"); + + private static final List KNOWN_VALUES = List.of(VERIFIED, LOW_ACCURACY, ACCURACY_UNDETERMINED, STALE, APPROXIMATE, DENIED, RESTRICTED, UNAVAILABLE, TIMEOUT, MOCK_DETECTED, OUTSIDE_GEOFENCE, IN_BLOCKED_AREA, ANONYMIZER_DETECTED, SKIPPED, REPLAY_REJECTED, UNSUPPORTED_CLIENT); + + private Outcome(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Outcome of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Outcome::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * What the operating system or browser granted. not_requested means the step uses the connection's IP location only, so the person is never asked for a permission. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Permission extends StringEnum { + /** The value {@code "granted_precise"}. */ + public static final Permission GRANTED_PRECISE = new Permission("granted_precise"); + + /** The value {@code "granted_approximate"}. */ + public static final Permission GRANTED_APPROXIMATE = new Permission("granted_approximate"); + + /** The value {@code "denied"}. */ + public static final Permission DENIED = new Permission("denied"); + + /** The value {@code "restricted"}. */ + public static final Permission RESTRICTED = new Permission("restricted"); + + /** The value {@code "unavailable"}. */ + public static final Permission UNAVAILABLE = new Permission("unavailable"); + + /** The value {@code "timeout"}. */ + public static final Permission TIMEOUT = new Permission("timeout"); + + /** The value {@code "dismissed"}. */ + public static final Permission DISMISSED = new Permission("dismissed"); + + /** The value {@code "not_requested"}. */ + public static final Permission NOT_REQUESTED = new Permission("not_requested"); + + private static final List KNOWN_VALUES = List.of(GRANTED_PRECISE, GRANTED_APPROXIMATE, DENIED, RESTRICTED, UNAVAILABLE, TIMEOUT, DISMISSED, NOT_REQUESTED); + + private Permission(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Permission of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Permission::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Confidence level the platform attaches to accuracy_m: p95 (browsers), p68 (Android) or unspecified (iOS). + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class AccuracyConfidence extends StringEnum { + /** The value {@code "p95"}. */ + public static final AccuracyConfidence P_95 = new AccuracyConfidence("p95"); + + /** The value {@code "p68"}. */ + public static final AccuracyConfidence P_68 = new AccuracyConfidence("p68"); + + /** The value {@code "unspecified"}. */ + public static final AccuracyConfidence UNSPECIFIED = new AccuracyConfidence("unspecified"); + + private static final List KNOWN_VALUES = List.of(P_95, P_68, UNSPECIFIED); + + private AccuracyConfidence(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static AccuracyConfidence of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, AccuracyConfidence::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Where the fix came from, when the platform says. ip means the position is the connection's IP location. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Source extends StringEnum { + /** The value {@code "gps"}. */ + public static final Source GPS = new Source("gps"); + + /** The value {@code "fused"}. */ + public static final Source FUSED = new Source("fused"); + + /** The value {@code "network"}. */ + public static final Source NETWORK = new Source("network"); + + /** The value {@code "wifi"}. */ + public static final Source WIFI = new Source("wifi"); + + /** The value {@code "cell"}. */ + public static final Source CELL = new Source("cell"); + + /** The value {@code "browser"}. */ + public static final Source BROWSER = new Source("browser"); + + /** The value {@code "unknown"}. */ + public static final Source UNKNOWN = new Source("unknown"); + + /** The value {@code "ip"}. */ + public static final Source IP = new Source("ip"); + + private static final List KNOWN_VALUES = List.of(GPS, FUSED, NETWORK, WIFI, CELL, BROWSER, UNKNOWN, IP); + + private Source(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Source of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Source::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * The client that produced the fix. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Platform extends StringEnum { + /** The value {@code "web"}. */ + public static final Platform WEB = new Platform("web"); + + /** The value {@code "ios"}. */ + public static final Platform IOS = new Platform("ios"); + + /** The value {@code "android"}. */ + public static final Platform ANDROID = new Platform("android"); + + /** The value {@code "react_native"}. */ + public static final Platform REACT_NATIVE = new Platform("react_native"); + + /** The value {@code "flutter"}. */ + public static final Platform FLUTTER = new Platform("flutter"); + + private static final List KNOWN_VALUES = List.of(WEB, IOS, ANDROID, REACT_NATIVE, FLUTTER); + + private Platform(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Platform of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Platform::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Whether device attestation backs the fix. unsupported is what browsers report, because the web has no attestation mechanism; it is not a failure. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Integrity extends StringEnum { + /** The value {@code "attested"}. */ + public static final Integrity ATTESTED = new Integrity("attested"); + + /** The value {@code "not_attested"}. */ + public static final Integrity NOT_ATTESTED = new Integrity("not_attested"); + + /** The value {@code "failed"}. */ + public static final Integrity FAILED = new Integrity("failed"); + + /** The value {@code "unsupported"}. */ + public static final Integrity UNSUPPORTED = new Integrity("unsupported"); + + /** The value {@code "not_determined"}. */ + public static final Integrity NOT_DETERMINED = new Integrity("not_determined"); + + private static final List KNOWN_VALUES = List.of(ATTESTED, NOT_ATTESTED, FAILED, UNSUPPORTED, NOT_DETERMINED); + + private Integrity(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Integrity of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Integrity::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** Result of the country and area rules of the step. */ + public static final class Geofence extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("enabled", "result"); + + private Geofence(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Geofence} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Geofence fromJson(JsonNode json) { + return new Geofence(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Whether the step applies any country or area rule. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enabled() { + return Json.optional(json, "enabled", Conv.BOOLEAN); + } + + /** + * Where the position sits relative to the rules. undetermined means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional result() { + return Json.optional(json, "result", Conv.enumeration(GeolocationAttempt.Geofence.Result::of)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Geofence}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Geofence from) { + super(from); + } + + /** + * Whether the step applies any country or area rule. + * + * @param enabled the value + * @return this builder + */ + public Builder enabled(boolean enabled) { + return set("enabled", Conv.BOOLEAN, enabled); + } + + /** + * Where the position sits relative to the rules. undetermined means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside. + * + * @param result the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder result(GeolocationAttempt.Geofence.@Nullable Result result) { + return setNullable("result", Conv.enumeration(GeolocationAttempt.Geofence.Result::of), result); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Geofence} + */ + public Geofence build() { + return new Geofence(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Where the position sits relative to the rules. undetermined means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Result extends StringEnum { + /** The value {@code "inside"}. */ + public static final Result INSIDE = new Result("inside"); + + /** The value {@code "outside"}. */ + public static final Result OUTSIDE = new Result("outside"); + + /** The value {@code "undetermined"}. */ + public static final Result UNDETERMINED = new Result("undetermined"); + + private static final List KNOWN_VALUES = List.of(INSIDE, OUTSIDE, UNDETERMINED); + + private Result(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Result of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Result::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } + + /** + * Which position the area result was judged from: the device fix, or the connection's ip location. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class GeofenceBasis extends StringEnum { + /** The value {@code "device"}. */ + public static final GeofenceBasis DEVICE = new GeofenceBasis("device"); + + /** The value {@code "ip"}. */ + public static final GeofenceBasis IP = new GeofenceBasis("ip"); + + private static final List KNOWN_VALUES = List.of(DEVICE, IP); + + private GeofenceBasis(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static GeofenceBasis of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, GeofenceBasis::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class PositionSource extends StringEnum { + /** The value {@code "device_and_ip"}. */ + public static final PositionSource DEVICE_AND_IP = new PositionSource("device_and_ip"); + + /** The value {@code "device_only"}. */ + public static final PositionSource DEVICE_ONLY = new PositionSource("device_only"); + + /** The value {@code "ip_only"}. */ + public static final PositionSource IP_ONLY = new PositionSource("ip_only"); + + private static final List KNOWN_VALUES = List.of(DEVICE_AND_IP, DEVICE_ONLY, IP_ONLY); + + private PositionSource(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static PositionSource of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, PositionSource::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * What the connection and device look like, each true, false or null when the source cannot tell. + */ + public static final class Anonymizers extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("vpn", "proxy", "tor", "spoofing", "emulator"); + + private Anonymizers(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Anonymizers} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Anonymizers fromJson(JsonNode json) { + return new Anonymizers(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The vpn field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vpn() { + return Json.optional(json, "vpn", Conv.BOOLEAN); + } + + /** + * The proxy field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional proxy() { + return Json.optional(json, "proxy", Conv.BOOLEAN); + } + + /** + * The tor field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional tor() { + return Json.optional(json, "tor", Conv.BOOLEAN); + } + + /** + * The spoofing field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional spoofing() { + return Json.optional(json, "spoofing", Conv.BOOLEAN); + } + + /** + * The emulator field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emulator() { + return Json.optional(json, "emulator", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Anonymizers}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Anonymizers from) { + super(from); + } + + /** + * The vpn field. + * + * @param vpn the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder vpn(@Nullable Boolean vpn) { + return setNullable("vpn", Conv.BOOLEAN, vpn); + } + + /** + * The proxy field. + * + * @param proxy the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder proxy(@Nullable Boolean proxy) { + return setNullable("proxy", Conv.BOOLEAN, proxy); + } + + /** + * The tor field. + * + * @param tor the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder tor(@Nullable Boolean tor) { + return setNullable("tor", Conv.BOOLEAN, tor); + } + + /** + * The spoofing field. + * + * @param spoofing the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder spoofing(@Nullable Boolean spoofing) { + return setNullable("spoofing", Conv.BOOLEAN, spoofing); + } + + /** + * The emulator field. + * + * @param emulator the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder emulator(@Nullable Boolean emulator) { + return setNullable("emulator", Conv.BOOLEAN, emulator); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Anonymizers} + */ + public Anonymizers build() { + return new Anonymizers(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + /** + * The consent the person gave before the system prompt, recorded with the wording version and language they saw. + */ + public static final class Consent extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("accepted_at", "version", "locale"); + + private Consent(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Consent} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Consent fromJson(JsonNode json) { + return new Consent(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The accepted_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional acceptedAt() { + return Json.optional(json, "accepted_at", Conv.DATE_TIME); + } + + /** + * The version field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional version() { + return Json.optional(json, "version", Conv.STRING); + } + + /** + * The locale field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional locale() { + return Json.optional(json, "locale", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Consent}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Consent from) { + super(from); + } + + /** + * The accepted_at field. + * + * @param acceptedAt the value + * @return this builder + */ + public Builder acceptedAt(OffsetDateTime acceptedAt) { + return set("accepted_at", Conv.DATE_TIME, acceptedAt); + } + + /** + * The version field. + * + * @param version the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder version(@Nullable String version) { + return setNullable("version", Conv.STRING, version); + } + + /** + * The locale field. + * + * @param locale the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder locale(@Nullable String locale) { + return setNullable("locale", Conv.STRING, locale); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Consent} + */ + public Consent build() { + return new Consent(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } +} diff --git a/src/main/java/me/didit/types/GeolocationCheck.java b/src/main/java/me/didit/types/GeolocationCheck.java new file mode 100644 index 0000000..8661dcb --- /dev/null +++ b/src/main/java/me/didit/types/GeolocationCheck.java @@ -0,0 +1,2023 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** + * One Location verification result, the accepted attempt of one workflow node. Measurement, uncertainty and authenticity are separate keys, so a precise unattested fix reads differently from an imprecise attested one. + */ +public final class GeolocationCheck extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "outcome", "permission", "latitude", "longitude", "accuracy_m", "accuracy_confidence", "measured_at", "age_seconds", "source", "platform", "sdk_version", "is_mock", "produced_by_accessory", "integrity", "country_code", "region_code", "city", "geofence", "inside_geofence", "geofence_basis", "inside_areas", "blocked_areas", "position_source", "anonymizers", "ip_distance_km", "ip_distance_uncertainty_km", "ip_consistent", "document_distance_km", "travel_excused", "consecutive_mismatches", "attempts", "consent", "warnings"); + + private GeolocationCheck(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code GeolocationCheck} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static GeolocationCheck fromJson(JsonNode json) { + return new GeolocationCheck(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node that produced this result, so a workflow with two Location verification steps stays readable. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * Feature-level status of this Location verification step, resolved from its warnings. Independent of the session status. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.enumeration(GeolocationCheck.Status::of)); + } + + /** + * What happened on this attempt. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional outcome() { + return Json.optional(json, "outcome", Conv.enumeration(GeolocationCheck.Outcome::of)); + } + + /** + * What the operating system or browser granted. not_requested means the step uses the connection's IP location only, so the person is never asked for a permission. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional permission() { + return Json.optional(json, "permission", Conv.enumeration(GeolocationCheck.Permission::of)); + } + + /** + * WGS84 latitude of the fix. null when there is no fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional latitude() { + return Json.optional(json, "latitude", Conv.DOUBLE); + } + + /** + * WGS84 longitude of the fix. null when there is no fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional longitude() { + return Json.optional(json, "longitude", Conv.DOUBLE); + } + + /** + * Radius of uncertainty in metres, at the confidence level in accuracy_confidence. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional accuracyM() { + return Json.optional(json, "accuracy_m", Conv.DOUBLE); + } + + /** + * Confidence level the platform attaches to accuracy_m: p95 (browsers), p68 (Android) or unspecified (iOS). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional accuracyConfidence() { + return Json.optional(json, "accuracy_confidence", Conv.enumeration(GeolocationCheck.AccuracyConfidence::of)); + } + + /** + * When the device took the fix, by its own clock. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional measuredAt() { + return Json.optional(json, "measured_at", Conv.DATE_TIME); + } + + /** + * Seconds between the device taking the fix and Didit receiving it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ageSeconds() { + return Json.optional(json, "age_seconds", Conv.LONG); + } + + /** + * Where the fix came from, when the platform says. ip means the position is the connection's IP location. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional source() { + return Json.optional(json, "source", Conv.enumeration(GeolocationCheck.Source::of)); + } + + /** + * The client that produced the fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional platform() { + return Json.optional(json, "platform", Conv.enumeration(GeolocationCheck.Platform::of)); + } + + /** + * Version of the SDK that produced the fix. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sdkVersion() { + return Json.optional(json, "sdk_version", Conv.STRING); + } + + /** + * true when the device says the fix came from a mock location provider or simulation software. null when the platform does not report it (browsers cannot tell); null is not false. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional isMock() { + return Json.optional(json, "is_mock", Conv.BOOLEAN); + } + + /** + * iOS only: true when the fix came from an external accessory. null elsewhere. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional producedByAccessory() { + return Json.optional(json, "produced_by_accessory", Conv.BOOLEAN); + } + + /** + * Whether device attestation backs the fix. unsupported is what browsers report, because the web has no attestation mechanism; it is not a failure. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional integrity() { + return Json.optional(json, "integrity", Conv.enumeration(GeolocationCheck.Integrity::of)); + } + + /** + * ISO 3166-1 alpha-2 country the fix is in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional countryCode() { + return Json.optional(json, "country_code", Conv.STRING); + } + + /** + * ISO 3166-2 subdivision the fix is in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional regionCode() { + return Json.optional(json, "region_code", Conv.STRING); + } + + /** + * Nearest populated place, a label for reviewers. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional city() { + return Json.optional(json, "city", Conv.STRING); + } + + /** + * Result of the country and area rules of the step. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional geofence() { + return Json.optional(json, "geofence", Conv.model(GeolocationCheck.Geofence::fromJson)); + } + + /** + * true when geofence.result is inside, false when outside, null otherwise. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional insideGeofence() { + return Json.optional(json, "inside_geofence", Conv.BOOLEAN); + } + + /** + * Which position the area result was judged from: the device fix, or the connection's ip location. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional geofenceBasis() { + return Json.optional(json, "geofence_basis", Conv.enumeration(GeolocationCheck.GeofenceBasis::of)); + } + + /** + * Ids of the configured allowed areas the position is inside. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> insideAreas() { + return Json.optional(json, "inside_areas", Conv.list(Conv.STRING)); + } + + /** + * Ids of the configured blocked areas the position is in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> blockedAreas() { + return Json.optional(json, "blocked_areas", Conv.list(Conv.STRING)); + } + + /** + * Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional positionSource() { + return Json.optional(json, "position_source", Conv.enumeration(GeolocationCheck.PositionSource::of)); + } + + /** + * What the connection and device look like, each true, false or null when the source cannot tell. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional anonymizers() { + return Json.optional(json, "anonymizers", Conv.model(GeolocationCheck.Anonymizers::fromJson)); + } + + /** + * Distance to the session's IP location after both uncertainty radii are subtracted; 0 when they overlap. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipDistanceKm() { + return Json.optional(json, "ip_distance_km", Conv.DOUBLE); + } + + /** + * Combined radius that was subtracted: the IP location's radius plus this fix's accuracy. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipDistanceUncertaintyKm() { + return Json.optional(json, "ip_distance_uncertainty_km", Conv.DOUBLE); + } + + /** + * Whether ip_distance_km is within the distance configured on the step. null when either side is unknown. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipConsistent() { + return Json.optional(json, "ip_consistent", Conv.BOOLEAN); + } + + /** + * Distance to the geocoded address on the ID document or proof of address. null when no address is on file. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentDistanceKm() { + return Json.optional(json, "document_distance_km", Conv.DOUBLE); + } + + /** + * Whether the step's travel tolerance excused the distance from the address. null when tolerance is off. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional travelExcused() { + return Json.optional(json, "travel_excused", Conv.BOOLEAN); + } + + /** + * On the final attempt: this check plus the same person's earlier mismatches in a row. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional consecutiveMismatches() { + return Json.optional(json, "consecutive_mismatches", Conv.LONG); + } + + /** + * Number of this attempt within the node, starting at 1. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional attempts() { + return Json.optional(json, "attempts", Conv.LONG); + } + + /** + * The consent the person gave before the system prompt, recorded with the wording version and language they saw. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional consent() { + return Json.optional(json, "consent", Conv.model(GeolocationCheck.Consent::fromJson)); + } + + /** + * Warnings this Location verification step raised, with feature set to GEOLOCATION. Warning codes start with LOCATION_. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> warnings() { + return Json.optional(json, "warnings", Conv.list(Conv.model(GeolocationCheck.Warnings::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link GeolocationCheck}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(GeolocationCheck from) { + super(from); + } + + /** + * Workflow node that produced this result, so a workflow with two Location verification steps stays readable. + * + * @param nodeId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nodeId(@Nullable String nodeId) { + return setNullable("node_id", Conv.STRING, nodeId); + } + + /** + * Feature-level status of this Location verification step, resolved from its warnings. Independent of the session status. + * + * @param status the value + * @return this builder + */ + public Builder status(GeolocationCheck.Status status) { + return set("status", Conv.enumeration(GeolocationCheck.Status::of), status); + } + + /** + * What happened on this attempt. + * + * @param outcome the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder outcome(GeolocationCheck.@Nullable Outcome outcome) { + return setNullable("outcome", Conv.enumeration(GeolocationCheck.Outcome::of), outcome); + } + + /** + * What the operating system or browser granted. not_requested means the step uses the connection's IP location only, so the person is never asked for a permission. + * + * @param permission the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder permission(GeolocationCheck.@Nullable Permission permission) { + return setNullable("permission", Conv.enumeration(GeolocationCheck.Permission::of), permission); + } + + /** + * WGS84 latitude of the fix. null when there is no fix. + * + * @param latitude the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder latitude(@Nullable Double latitude) { + return setNullable("latitude", Conv.DOUBLE, latitude); + } + + /** + * WGS84 longitude of the fix. null when there is no fix. + * + * @param longitude the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder longitude(@Nullable Double longitude) { + return setNullable("longitude", Conv.DOUBLE, longitude); + } + + /** + * Radius of uncertainty in metres, at the confidence level in accuracy_confidence. + * + * @param accuracyM the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder accuracyM(@Nullable Double accuracyM) { + return setNullable("accuracy_m", Conv.DOUBLE, accuracyM); + } + + /** + * Confidence level the platform attaches to accuracy_m: p95 (browsers), p68 (Android) or unspecified (iOS). + * + * @param accuracyConfidence the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder accuracyConfidence(GeolocationCheck.@Nullable AccuracyConfidence accuracyConfidence) { + return setNullable("accuracy_confidence", Conv.enumeration(GeolocationCheck.AccuracyConfidence::of), accuracyConfidence); + } + + /** + * When the device took the fix, by its own clock. + * + * @param measuredAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder measuredAt(@Nullable OffsetDateTime measuredAt) { + return setNullable("measured_at", Conv.DATE_TIME, measuredAt); + } + + /** + * Seconds between the device taking the fix and Didit receiving it. + * + * @param ageSeconds the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ageSeconds(@Nullable Long ageSeconds) { + return setNullable("age_seconds", Conv.LONG, ageSeconds); + } + + /** + * Where the fix came from, when the platform says. ip means the position is the connection's IP location. + * + * @param source the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder source(GeolocationCheck.@Nullable Source source) { + return setNullable("source", Conv.enumeration(GeolocationCheck.Source::of), source); + } + + /** + * The client that produced the fix. + * + * @param platform the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder platform(GeolocationCheck.@Nullable Platform platform) { + return setNullable("platform", Conv.enumeration(GeolocationCheck.Platform::of), platform); + } + + /** + * Version of the SDK that produced the fix. + * + * @param sdkVersion the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sdkVersion(@Nullable String sdkVersion) { + return setNullable("sdk_version", Conv.STRING, sdkVersion); + } + + /** + * true when the device says the fix came from a mock location provider or simulation software. null when the platform does not report it (browsers cannot tell); null is not false. + * + * @param isMock the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder isMock(@Nullable Boolean isMock) { + return setNullable("is_mock", Conv.BOOLEAN, isMock); + } + + /** + * iOS only: true when the fix came from an external accessory. null elsewhere. + * + * @param producedByAccessory the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder producedByAccessory(@Nullable Boolean producedByAccessory) { + return setNullable("produced_by_accessory", Conv.BOOLEAN, producedByAccessory); + } + + /** + * Whether device attestation backs the fix. unsupported is what browsers report, because the web has no attestation mechanism; it is not a failure. + * + * @param integrity the value + * @return this builder + */ + public Builder integrity(GeolocationCheck.Integrity integrity) { + return set("integrity", Conv.enumeration(GeolocationCheck.Integrity::of), integrity); + } + + /** + * ISO 3166-1 alpha-2 country the fix is in. + * + * @param countryCode the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder countryCode(@Nullable String countryCode) { + return setNullable("country_code", Conv.STRING, countryCode); + } + + /** + * ISO 3166-2 subdivision the fix is in. + * + * @param regionCode the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder regionCode(@Nullable String regionCode) { + return setNullable("region_code", Conv.STRING, regionCode); + } + + /** + * Nearest populated place, a label for reviewers. + * + * @param city the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder city(@Nullable String city) { + return setNullable("city", Conv.STRING, city); + } + + /** + * Result of the country and area rules of the step. + * + * @param geofence the value + * @return this builder + */ + public Builder geofence(GeolocationCheck.Geofence geofence) { + return set("geofence", Conv.model(GeolocationCheck.Geofence::fromJson), geofence); + } + + /** + * true when geofence.result is inside, false when outside, null otherwise. + * + * @param insideGeofence the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder insideGeofence(@Nullable Boolean insideGeofence) { + return setNullable("inside_geofence", Conv.BOOLEAN, insideGeofence); + } + + /** + * Which position the area result was judged from: the device fix, or the connection's ip location. + * + * @param geofenceBasis the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder geofenceBasis(GeolocationCheck.@Nullable GeofenceBasis geofenceBasis) { + return setNullable("geofence_basis", Conv.enumeration(GeolocationCheck.GeofenceBasis::of), geofenceBasis); + } + + /** + * Ids of the configured allowed areas the position is inside. + * + * @param insideAreas the value + * @return this builder + */ + public Builder insideAreas(List insideAreas) { + return set("inside_areas", Conv.list(Conv.STRING), insideAreas); + } + + /** + * Ids of the configured blocked areas the position is in. + * + * @param blockedAreas the value + * @return this builder + */ + public Builder blockedAreas(List blockedAreas) { + return set("blocked_areas", Conv.list(Conv.STRING), blockedAreas); + } + + /** + * Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only. + * + * @param positionSource the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder positionSource(GeolocationCheck.@Nullable PositionSource positionSource) { + return setNullable("position_source", Conv.enumeration(GeolocationCheck.PositionSource::of), positionSource); + } + + /** + * What the connection and device look like, each true, false or null when the source cannot tell. + * + * @param anonymizers the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder anonymizers(GeolocationCheck.@Nullable Anonymizers anonymizers) { + return setNullable("anonymizers", Conv.model(GeolocationCheck.Anonymizers::fromJson), anonymizers); + } + + /** + * Distance to the session's IP location after both uncertainty radii are subtracted; 0 when they overlap. + * + * @param ipDistanceKm the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ipDistanceKm(@Nullable Double ipDistanceKm) { + return setNullable("ip_distance_km", Conv.DOUBLE, ipDistanceKm); + } + + /** + * Combined radius that was subtracted: the IP location's radius plus this fix's accuracy. + * + * @param ipDistanceUncertaintyKm the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ipDistanceUncertaintyKm(@Nullable Double ipDistanceUncertaintyKm) { + return setNullable("ip_distance_uncertainty_km", Conv.DOUBLE, ipDistanceUncertaintyKm); + } + + /** + * Whether ip_distance_km is within the distance configured on the step. null when either side is unknown. + * + * @param ipConsistent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ipConsistent(@Nullable Boolean ipConsistent) { + return setNullable("ip_consistent", Conv.BOOLEAN, ipConsistent); + } + + /** + * Distance to the geocoded address on the ID document or proof of address. null when no address is on file. + * + * @param documentDistanceKm the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder documentDistanceKm(@Nullable Double documentDistanceKm) { + return setNullable("document_distance_km", Conv.DOUBLE, documentDistanceKm); + } + + /** + * Whether the step's travel tolerance excused the distance from the address. null when tolerance is off. + * + * @param travelExcused the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder travelExcused(@Nullable Boolean travelExcused) { + return setNullable("travel_excused", Conv.BOOLEAN, travelExcused); + } + + /** + * On the final attempt: this check plus the same person's earlier mismatches in a row. + * + * @param consecutiveMismatches the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder consecutiveMismatches(@Nullable Long consecutiveMismatches) { + return setNullable("consecutive_mismatches", Conv.LONG, consecutiveMismatches); + } + + /** + * Number of this attempt within the node, starting at 1. + * + * @param attempts the value + * @return this builder + */ + public Builder attempts(long attempts) { + return set("attempts", Conv.LONG, attempts); + } + + /** + * The consent the person gave before the system prompt, recorded with the wording version and language they saw. + * + * @param consent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder consent(GeolocationCheck.@Nullable Consent consent) { + return setNullable("consent", Conv.model(GeolocationCheck.Consent::fromJson), consent); + } + + /** + * Warnings this Location verification step raised, with feature set to GEOLOCATION. Warning codes start with LOCATION_. + * + * @param warnings the value + * @return this builder + */ + public Builder warnings(List warnings) { + return set("warnings", Conv.list(Conv.model(GeolocationCheck.Warnings::fromJson)), warnings); + } + + /** + * Builds the value. + * + * @return a new immutable {@code GeolocationCheck} + */ + public GeolocationCheck build() { + return new GeolocationCheck(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Feature-level status of this Location verification step, resolved from its warnings. Independent of the session status. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Status extends StringEnum { + /** The value {@code "Not Finished"}. */ + public static final Status NOT_FINISHED = new Status("Not Finished"); + + /** The value {@code "Approved"}. */ + public static final Status APPROVED = new Status("Approved"); + + /** The value {@code "Declined"}. */ + public static final Status DECLINED = new Status("Declined"); + + /** The value {@code "In Review"}. */ + public static final Status IN_REVIEW = new Status("In Review"); + + /** The value {@code "Resub Requested"}. */ + public static final Status RESUB_REQUESTED = new Status("Resub Requested"); + + private static final List KNOWN_VALUES = List.of(NOT_FINISHED, APPROVED, DECLINED, IN_REVIEW, RESUB_REQUESTED); + + private Status(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Status of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Status::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * What happened on this attempt. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Outcome extends StringEnum { + /** The value {@code "verified"}. */ + public static final Outcome VERIFIED = new Outcome("verified"); + + /** The value {@code "low_accuracy"}. */ + public static final Outcome LOW_ACCURACY = new Outcome("low_accuracy"); + + /** The value {@code "accuracy_undetermined"}. */ + public static final Outcome ACCURACY_UNDETERMINED = new Outcome("accuracy_undetermined"); + + /** The value {@code "stale"}. */ + public static final Outcome STALE = new Outcome("stale"); + + /** The value {@code "approximate"}. */ + public static final Outcome APPROXIMATE = new Outcome("approximate"); + + /** The value {@code "denied"}. */ + public static final Outcome DENIED = new Outcome("denied"); + + /** The value {@code "restricted"}. */ + public static final Outcome RESTRICTED = new Outcome("restricted"); + + /** The value {@code "unavailable"}. */ + public static final Outcome UNAVAILABLE = new Outcome("unavailable"); + + /** The value {@code "timeout"}. */ + public static final Outcome TIMEOUT = new Outcome("timeout"); + + /** The value {@code "mock_detected"}. */ + public static final Outcome MOCK_DETECTED = new Outcome("mock_detected"); + + /** The value {@code "outside_geofence"}. */ + public static final Outcome OUTSIDE_GEOFENCE = new Outcome("outside_geofence"); + + /** The value {@code "in_blocked_area"}. */ + public static final Outcome IN_BLOCKED_AREA = new Outcome("in_blocked_area"); + + /** The value {@code "anonymizer_detected"}. */ + public static final Outcome ANONYMIZER_DETECTED = new Outcome("anonymizer_detected"); + + /** The value {@code "skipped"}. */ + public static final Outcome SKIPPED = new Outcome("skipped"); + + /** The value {@code "replay_rejected"}. */ + public static final Outcome REPLAY_REJECTED = new Outcome("replay_rejected"); + + /** The value {@code "unsupported_client"}. */ + public static final Outcome UNSUPPORTED_CLIENT = new Outcome("unsupported_client"); + + private static final List KNOWN_VALUES = List.of(VERIFIED, LOW_ACCURACY, ACCURACY_UNDETERMINED, STALE, APPROXIMATE, DENIED, RESTRICTED, UNAVAILABLE, TIMEOUT, MOCK_DETECTED, OUTSIDE_GEOFENCE, IN_BLOCKED_AREA, ANONYMIZER_DETECTED, SKIPPED, REPLAY_REJECTED, UNSUPPORTED_CLIENT); + + private Outcome(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Outcome of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Outcome::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * What the operating system or browser granted. not_requested means the step uses the connection's IP location only, so the person is never asked for a permission. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Permission extends StringEnum { + /** The value {@code "granted_precise"}. */ + public static final Permission GRANTED_PRECISE = new Permission("granted_precise"); + + /** The value {@code "granted_approximate"}. */ + public static final Permission GRANTED_APPROXIMATE = new Permission("granted_approximate"); + + /** The value {@code "denied"}. */ + public static final Permission DENIED = new Permission("denied"); + + /** The value {@code "restricted"}. */ + public static final Permission RESTRICTED = new Permission("restricted"); + + /** The value {@code "unavailable"}. */ + public static final Permission UNAVAILABLE = new Permission("unavailable"); + + /** The value {@code "timeout"}. */ + public static final Permission TIMEOUT = new Permission("timeout"); + + /** The value {@code "dismissed"}. */ + public static final Permission DISMISSED = new Permission("dismissed"); + + /** The value {@code "not_requested"}. */ + public static final Permission NOT_REQUESTED = new Permission("not_requested"); + + private static final List KNOWN_VALUES = List.of(GRANTED_PRECISE, GRANTED_APPROXIMATE, DENIED, RESTRICTED, UNAVAILABLE, TIMEOUT, DISMISSED, NOT_REQUESTED); + + private Permission(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Permission of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Permission::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Confidence level the platform attaches to accuracy_m: p95 (browsers), p68 (Android) or unspecified (iOS). + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class AccuracyConfidence extends StringEnum { + /** The value {@code "p95"}. */ + public static final AccuracyConfidence P_95 = new AccuracyConfidence("p95"); + + /** The value {@code "p68"}. */ + public static final AccuracyConfidence P_68 = new AccuracyConfidence("p68"); + + /** The value {@code "unspecified"}. */ + public static final AccuracyConfidence UNSPECIFIED = new AccuracyConfidence("unspecified"); + + private static final List KNOWN_VALUES = List.of(P_95, P_68, UNSPECIFIED); + + private AccuracyConfidence(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static AccuracyConfidence of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, AccuracyConfidence::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Where the fix came from, when the platform says. ip means the position is the connection's IP location. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Source extends StringEnum { + /** The value {@code "gps"}. */ + public static final Source GPS = new Source("gps"); + + /** The value {@code "fused"}. */ + public static final Source FUSED = new Source("fused"); + + /** The value {@code "network"}. */ + public static final Source NETWORK = new Source("network"); + + /** The value {@code "wifi"}. */ + public static final Source WIFI = new Source("wifi"); + + /** The value {@code "cell"}. */ + public static final Source CELL = new Source("cell"); + + /** The value {@code "browser"}. */ + public static final Source BROWSER = new Source("browser"); + + /** The value {@code "unknown"}. */ + public static final Source UNKNOWN = new Source("unknown"); + + /** The value {@code "ip"}. */ + public static final Source IP = new Source("ip"); + + private static final List KNOWN_VALUES = List.of(GPS, FUSED, NETWORK, WIFI, CELL, BROWSER, UNKNOWN, IP); + + private Source(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Source of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Source::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * The client that produced the fix. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Platform extends StringEnum { + /** The value {@code "web"}. */ + public static final Platform WEB = new Platform("web"); + + /** The value {@code "ios"}. */ + public static final Platform IOS = new Platform("ios"); + + /** The value {@code "android"}. */ + public static final Platform ANDROID = new Platform("android"); + + /** The value {@code "react_native"}. */ + public static final Platform REACT_NATIVE = new Platform("react_native"); + + /** The value {@code "flutter"}. */ + public static final Platform FLUTTER = new Platform("flutter"); + + private static final List KNOWN_VALUES = List.of(WEB, IOS, ANDROID, REACT_NATIVE, FLUTTER); + + private Platform(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Platform of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Platform::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Whether device attestation backs the fix. unsupported is what browsers report, because the web has no attestation mechanism; it is not a failure. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Integrity extends StringEnum { + /** The value {@code "attested"}. */ + public static final Integrity ATTESTED = new Integrity("attested"); + + /** The value {@code "not_attested"}. */ + public static final Integrity NOT_ATTESTED = new Integrity("not_attested"); + + /** The value {@code "failed"}. */ + public static final Integrity FAILED = new Integrity("failed"); + + /** The value {@code "unsupported"}. */ + public static final Integrity UNSUPPORTED = new Integrity("unsupported"); + + /** The value {@code "not_determined"}. */ + public static final Integrity NOT_DETERMINED = new Integrity("not_determined"); + + private static final List KNOWN_VALUES = List.of(ATTESTED, NOT_ATTESTED, FAILED, UNSUPPORTED, NOT_DETERMINED); + + private Integrity(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Integrity of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Integrity::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** Result of the country and area rules of the step. */ + public static final class Geofence extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("enabled", "result"); + + private Geofence(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Geofence} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Geofence fromJson(JsonNode json) { + return new Geofence(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Whether the step applies any country or area rule. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enabled() { + return Json.optional(json, "enabled", Conv.BOOLEAN); + } + + /** + * Where the position sits relative to the rules. undetermined means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional result() { + return Json.optional(json, "result", Conv.enumeration(GeolocationCheck.Geofence.Result::of)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Geofence}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Geofence from) { + super(from); + } + + /** + * Whether the step applies any country or area rule. + * + * @param enabled the value + * @return this builder + */ + public Builder enabled(boolean enabled) { + return set("enabled", Conv.BOOLEAN, enabled); + } + + /** + * Where the position sits relative to the rules. undetermined means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside. + * + * @param result the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder result(GeolocationCheck.Geofence.@Nullable Result result) { + return setNullable("result", Conv.enumeration(GeolocationCheck.Geofence.Result::of), result); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Geofence} + */ + public Geofence build() { + return new Geofence(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Where the position sits relative to the rules. undetermined means the accuracy circle straddles the border or the position resolved to no country; it is not evidence of being outside. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Result extends StringEnum { + /** The value {@code "inside"}. */ + public static final Result INSIDE = new Result("inside"); + + /** The value {@code "outside"}. */ + public static final Result OUTSIDE = new Result("outside"); + + /** The value {@code "undetermined"}. */ + public static final Result UNDETERMINED = new Result("undetermined"); + + private static final List KNOWN_VALUES = List.of(INSIDE, OUTSIDE, UNDETERMINED); + + private Result(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Result of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Result::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } + + /** + * Which position the area result was judged from: the device fix, or the connection's ip location. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class GeofenceBasis extends StringEnum { + /** The value {@code "device"}. */ + public static final GeofenceBasis DEVICE = new GeofenceBasis("device"); + + /** The value {@code "ip"}. */ + public static final GeofenceBasis IP = new GeofenceBasis("ip"); + + private static final List KNOWN_VALUES = List.of(DEVICE, IP); + + private GeofenceBasis(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static GeofenceBasis of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, GeofenceBasis::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Where the step takes the position from, as configured: the device checked against the IP location, the device only, or the IP location only. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class PositionSource extends StringEnum { + /** The value {@code "device_and_ip"}. */ + public static final PositionSource DEVICE_AND_IP = new PositionSource("device_and_ip"); + + /** The value {@code "device_only"}. */ + public static final PositionSource DEVICE_ONLY = new PositionSource("device_only"); + + /** The value {@code "ip_only"}. */ + public static final PositionSource IP_ONLY = new PositionSource("ip_only"); + + private static final List KNOWN_VALUES = List.of(DEVICE_AND_IP, DEVICE_ONLY, IP_ONLY); + + private PositionSource(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static PositionSource of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, PositionSource::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * What the connection and device look like, each true, false or null when the source cannot tell. + */ + public static final class Anonymizers extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("vpn", "proxy", "tor", "spoofing", "emulator"); + + private Anonymizers(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Anonymizers} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Anonymizers fromJson(JsonNode json) { + return new Anonymizers(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The vpn field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vpn() { + return Json.optional(json, "vpn", Conv.BOOLEAN); + } + + /** + * The proxy field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional proxy() { + return Json.optional(json, "proxy", Conv.BOOLEAN); + } + + /** + * The tor field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional tor() { + return Json.optional(json, "tor", Conv.BOOLEAN); + } + + /** + * The spoofing field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional spoofing() { + return Json.optional(json, "spoofing", Conv.BOOLEAN); + } + + /** + * The emulator field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emulator() { + return Json.optional(json, "emulator", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Anonymizers}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Anonymizers from) { + super(from); + } + + /** + * The vpn field. + * + * @param vpn the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder vpn(@Nullable Boolean vpn) { + return setNullable("vpn", Conv.BOOLEAN, vpn); + } + + /** + * The proxy field. + * + * @param proxy the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder proxy(@Nullable Boolean proxy) { + return setNullable("proxy", Conv.BOOLEAN, proxy); + } + + /** + * The tor field. + * + * @param tor the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder tor(@Nullable Boolean tor) { + return setNullable("tor", Conv.BOOLEAN, tor); + } + + /** + * The spoofing field. + * + * @param spoofing the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder spoofing(@Nullable Boolean spoofing) { + return setNullable("spoofing", Conv.BOOLEAN, spoofing); + } + + /** + * The emulator field. + * + * @param emulator the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder emulator(@Nullable Boolean emulator) { + return setNullable("emulator", Conv.BOOLEAN, emulator); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Anonymizers} + */ + public Anonymizers build() { + return new Anonymizers(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + /** + * The consent the person gave before the system prompt, recorded with the wording version and language they saw. + */ + public static final class Consent extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("accepted_at", "version", "locale"); + + private Consent(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Consent} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Consent fromJson(JsonNode json) { + return new Consent(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The accepted_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional acceptedAt() { + return Json.optional(json, "accepted_at", Conv.DATE_TIME); + } + + /** + * The version field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional version() { + return Json.optional(json, "version", Conv.STRING); + } + + /** + * The locale field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional locale() { + return Json.optional(json, "locale", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Consent}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Consent from) { + super(from); + } + + /** + * The accepted_at field. + * + * @param acceptedAt the value + * @return this builder + */ + public Builder acceptedAt(OffsetDateTime acceptedAt) { + return set("accepted_at", Conv.DATE_TIME, acceptedAt); + } + + /** + * The version field. + * + * @param version the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder version(@Nullable String version) { + return setNullable("version", Conv.STRING, version); + } + + /** + * The locale field. + * + * @param locale the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder locale(@Nullable String locale) { + return setNullable("locale", Conv.STRING, locale); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Consent} + */ + public Consent build() { + return new Consent(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + public static final class Warnings extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("feature", "risk", "additional_data", "log_type", "short_description", "long_description", "node_id"); + + private Warnings(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Warnings} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Warnings fromJson(JsonNode json) { + return new Warnings(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional feature() { + return Json.optional(json, "feature", Conv.enumeration(GeolocationCheck.Warnings.Feature::of)); + } + + /** + * The risk field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional risk() { + return Json.optional(json, "risk", Conv.STRING); + } + + /** + * The additional_data field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> additionalData() { + return Json.optional(json, "additional_data", Conv.OBJECT); + } + + /** + * The log_type field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional logType() { + return Json.optional(json, "log_type", Conv.STRING); + } + + /** + * The short_description field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional shortDescription() { + return Json.optional(json, "short_description", Conv.STRING); + } + + /** + * The long_description field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional longDescription() { + return Json.optional(json, "long_description", Conv.STRING); + } + + /** + * The workflow graph node ID that generated this warning + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Warnings}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Warnings from) { + super(from); + } + + /** + * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. + * + * @param feature the value + * @return this builder + */ + public Builder feature(GeolocationCheck.Warnings.Feature feature) { + return set("feature", Conv.enumeration(GeolocationCheck.Warnings.Feature::of), feature); + } + + /** + * The risk field. + * + * @param risk the value + * @return this builder + */ + public Builder risk(String risk) { + return set("risk", Conv.STRING, risk); + } + + /** + * The additional_data field. + * + * @param additionalData the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder additionalData(@Nullable Map additionalData) { + return setAny("additional_data", additionalData); + } + + /** + * The log_type field. + * + * @param logType the value + * @return this builder + */ + public Builder logType(String logType) { + return set("log_type", Conv.STRING, logType); + } + + /** + * The short_description field. + * + * @param shortDescription the value + * @return this builder + */ + public Builder shortDescription(String shortDescription) { + return set("short_description", Conv.STRING, shortDescription); + } + + /** + * The long_description field. + * + * @param longDescription the value + * @return this builder + */ + public Builder longDescription(String longDescription) { + return set("long_description", Conv.STRING, longDescription); + } + + /** + * The workflow graph node ID that generated this warning + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Warnings} + */ + public Warnings build() { + return new Warnings(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Feature extends StringEnum { + /** The value {@code "ID_VERIFICATION"}. */ + public static final Feature ID_VERIFICATION = new Feature("ID_VERIFICATION"); + + /** The value {@code "NFC"}. */ + public static final Feature NFC = new Feature("NFC"); + + /** The value {@code "LIVENESS"}. */ + public static final Feature LIVENESS = new Feature("LIVENESS"); + + /** The value {@code "FACEMATCH"}. */ + public static final Feature FACEMATCH = new Feature("FACEMATCH"); + + /** The value {@code "PROOF_OF_ADDRESS"}. */ + public static final Feature PROOF_OF_ADDRESS = new Feature("PROOF_OF_ADDRESS"); + + /** The value {@code "PHONE"}. */ + public static final Feature PHONE = new Feature("PHONE"); + + /** The value {@code "EMAIL"}. */ + public static final Feature EMAIL = new Feature("EMAIL"); + + /** The value {@code "AML"}. */ + public static final Feature AML = new Feature("AML"); + + /** The value {@code "LOCATION"}. */ + public static final Feature LOCATION = new Feature("LOCATION"); + + /** The value {@code "DATABASE_VALIDATION"}. */ + public static final Feature DATABASE_VALIDATION = new Feature("DATABASE_VALIDATION"); + + /** The value {@code "QUESTIONNAIRE"}. */ + public static final Feature QUESTIONNAIRE = new Feature("QUESTIONNAIRE"); + + /** The value {@code "DOCUMENT_AI"}. */ + public static final Feature DOCUMENT_AI = new Feature("DOCUMENT_AI"); + + /** The value {@code "KYB_REGISTRY"}. */ + public static final Feature KYB_REGISTRY = new Feature("KYB_REGISTRY"); + + /** The value {@code "KYB_DOCUMENTS"}. */ + public static final Feature KYB_DOCUMENTS = new Feature("KYB_DOCUMENTS"); + + /** The value {@code "KYB_KEY_PEOPLE"}. */ + public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); + + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); + + private Feature(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Feature of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Feature::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } +} diff --git a/src/main/java/me/didit/types/IdVerificationVerifyResponse.java b/src/main/java/me/didit/types/IdVerificationVerifyResponse.java index faa84d3..fd4ce8b 100644 --- a/src/main/java/me/didit/types/IdVerificationVerifyResponse.java +++ b/src/main/java/me/didit/types/IdVerificationVerifyResponse.java @@ -2305,7 +2305,7 @@ public Builder toBuilder() { } /** - * Machine-readable risk code. Always-decline risks: DOCUMENT_EXPIRED, MINIMUM_AGE_NOT_MET, PORTRAIT_IMAGE_NOT_DETECTED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, INVALID_DATE, COULD_NOT_RECOGNIZE_DOCUMENT (400-only, never a warning), DOCUMENT_NUMBER_NOT_DETECTED, COULD_NOT_DETECT_DOCUMENT_TYPE, NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED. Governed by request options: MRZ_NOT_DETECTED / MRZ_VALIDATION_FAILED (invalid_mrz_action), DATA_INCONSISTENT / MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME / DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS (inconsistent_data_action), EXPIRATION_DATE_NOT_DETECTED (expiration_date_not_detected_action). Other risks (e.g. POSSIBLE_DUPLICATED_USER) are informational. DOCUMENT_LIVENESS_NOT_COMPUTED is raised when perform_document_liveness=true but the forgery check returned no usable score; it sets status to In Review. + * Machine-readable risk code. Always-decline risks: DOCUMENT_EXPIRED, MINIMUM_AGE_NOT_MET, PORTRAIT_IMAGE_NOT_DETECTED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, INVALID_DATE, COULD_NOT_RECOGNIZE_DOCUMENT (400-only, never a warning), DOCUMENT_NUMBER_NOT_DETECTED, COULD_NOT_DETECT_DOCUMENT_TYPE, NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED. Governed by request options: MRZ_NOT_DETECTED / MRZ_VALIDATION_FAILED (invalid_mrz_action), DATA_INCONSISTENT / MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME / DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS (inconsistent_data_action), EXPIRATION_DATE_NOT_DETECTED (expiration_date_not_detected_action). Other risks (e.g. POSSIBLE_DUPLICATED_USER) are informational. DOCUMENT_LIVENESS_NOT_COMPUTED is raised when perform_document_liveness=true but the forgery check returned no usable score; it sets status to In Review. COULD_NOT_DETECT_DOCUMENT_TYPE is also returned when the front of the document does not match a known official document design with high confidence, for example an edited or computer-generated document, or a design that is not supported yet. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -2378,7 +2378,7 @@ private Builder(Warnings from) { } /** - * Machine-readable risk code. Always-decline risks: DOCUMENT_EXPIRED, MINIMUM_AGE_NOT_MET, PORTRAIT_IMAGE_NOT_DETECTED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, INVALID_DATE, COULD_NOT_RECOGNIZE_DOCUMENT (400-only, never a warning), DOCUMENT_NUMBER_NOT_DETECTED, COULD_NOT_DETECT_DOCUMENT_TYPE, NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED. Governed by request options: MRZ_NOT_DETECTED / MRZ_VALIDATION_FAILED (invalid_mrz_action), DATA_INCONSISTENT / MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME / DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS (inconsistent_data_action), EXPIRATION_DATE_NOT_DETECTED (expiration_date_not_detected_action). Other risks (e.g. POSSIBLE_DUPLICATED_USER) are informational. DOCUMENT_LIVENESS_NOT_COMPUTED is raised when perform_document_liveness=true but the forgery check returned no usable score; it sets status to In Review. + * Machine-readable risk code. Always-decline risks: DOCUMENT_EXPIRED, MINIMUM_AGE_NOT_MET, PORTRAIT_IMAGE_NOT_DETECTED, SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED, INVALID_DATE, COULD_NOT_RECOGNIZE_DOCUMENT (400-only, never a warning), DOCUMENT_NUMBER_NOT_DETECTED, COULD_NOT_DETECT_DOCUMENT_TYPE, NAME_NOT_DETECTED, DATE_OF_BIRTH_NOT_DETECTED. Governed by request options: MRZ_NOT_DETECTED / MRZ_VALIDATION_FAILED (invalid_mrz_action), DATA_INCONSISTENT / MRZ_AND_DATA_EXTRACTED_FROM_OCR_NOT_SAME / DOCUMENT_NAME_DIFFERENT_FROM_OTHER_APPROVED_DOCUMENTS (inconsistent_data_action), EXPIRATION_DATE_NOT_DETECTED (expiration_date_not_detected_action). Other risks (e.g. POSSIBLE_DUPLICATED_USER) are informational. DOCUMENT_LIVENESS_NOT_COMPUTED is raised when perform_document_liveness=true but the forgery check returned no usable score; it sets status to In Review. COULD_NOT_DETECT_DOCUMENT_TYPE is also returned when the front of the document does not match a known official document design with high confidence, for example an edited or computer-generated document, or a design that is not supported yet. * * @param risk the value * @return this builder diff --git a/src/main/java/me/didit/types/KYBOwnershipStructure.java b/src/main/java/me/didit/types/KYBOwnershipStructure.java new file mode 100644 index 0000000..6a61d18 --- /dev/null +++ b/src/main/java/me/didit/types/KYBOwnershipStructure.java @@ -0,0 +1,123 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** + * The cap table the registry proved, as it stood when the ownership tier was delivered: direct shareholders and beneficial_owners. Null when the registry proved no ownership. It never carries the registry source's own rows; read company.beneficial_owners and company.ownership for the current record. + */ +public final class KYBOwnershipStructure extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("shareholders", "beneficial_owners"); + + private KYBOwnershipStructure(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBOwnershipStructure} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBOwnershipStructure fromJson(JsonNode json) { + return new KYBOwnershipStructure(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The shareholders field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List shareholders() { + return Json.required(json, "shareholders", Conv.list(Conv.model(KYBOwnershipStructureOwner::fromJson))); + } + + /** + * The beneficial_owners field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List beneficialOwners() { + return Json.required(json, "beneficial_owners", Conv.list(Conv.model(KYBOwnershipStructureOwner::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBOwnershipStructure}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBOwnershipStructure from) { + super(from); + } + + /** + * The shareholders field. + * + * @param shareholders the value + * @return this builder + */ + public Builder shareholders(List shareholders) { + return set("shareholders", Conv.list(Conv.model(KYBOwnershipStructureOwner::fromJson)), shareholders); + } + + /** + * The beneficial_owners field. + * + * @param beneficialOwners the value + * @return this builder + */ + public Builder beneficialOwners(List beneficialOwners) { + return set("beneficial_owners", Conv.list(Conv.model(KYBOwnershipStructureOwner::fromJson)), beneficialOwners); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBOwnershipStructure} + * @throws IllegalStateException when a required field is missing + */ + public KYBOwnershipStructure build() { + require("shareholders", false); + require("beneficial_owners", false); + return new KYBOwnershipStructure(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/KYBOwnershipStructureOwner.java b/src/main/java/me/didit/types/KYBOwnershipStructureOwner.java new file mode 100644 index 0000000..6454842 --- /dev/null +++ b/src/main/java/me/didit/types/KYBOwnershipStructureOwner.java @@ -0,0 +1,505 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** + * One owner of the ownership snapshot: the same registry identity and stake as company.beneficial_owners[], and its canonical shareholding. + */ +public final class KYBOwnershipStructureOwner extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("name", "first_name", "last_name", "date_of_birth", "country_of_birth", "company_name", "registration_number", "entity_type", "nationality", "designation", "roles", "ownership_min_shares", "ownership_max_shares", "voting_min_shares", "voting_max_shares", "appointment_date", "is_active", "shareholding"); + + private KYBOwnershipStructureOwner(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBOwnershipStructureOwner} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBOwnershipStructureOwner fromJson(JsonNode json) { + return new KYBOwnershipStructureOwner(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Owner name as the registry states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional name() { + return Json.optional(json, "name", Conv.STRING); + } + + /** + * Given name, for a natural person, when the registry states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * Family name, for a natural person, when the registry states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * Date of birth (ISO 8601) when the registry publishes it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.STRING); + } + + /** + * Country of birth when the registry publishes it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional countryOfBirth() { + return Json.optional(json, "country_of_birth", Conv.STRING); + } + + /** + * Company name, for a corporate owner. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number, for a corporate owner. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Whether the owner is a natural person or a company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional entityType() { + return Json.optional(json, "entity_type", Conv.enumeration(KYBOwnershipStructureOwner.EntityType::of)); + } + + /** + * Nationality when the registry states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nationality() { + return Json.optional(json, "nationality", Conv.STRING); + } + + /** + * The owner's title or role as the registry prints it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional designation() { + return Json.optional(json, "designation", Conv.STRING); + } + + /** + * shareholder for a direct holder, ubo for a beneficial owner. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List roles() { + return Json.required(json, "roles", Conv.list(Conv.STRING)); + } + + /** + * Lower bound of the stake, in percent (equal to the upper bound for an exact stake). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipMinShares() { + return Json.optional(json, "ownership_min_shares", Conv.STRING); + } + + /** + * Upper bound of the stake, in percent. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipMaxShares() { + return Json.optional(json, "ownership_max_shares", Conv.STRING); + } + + /** + * Lower bound of the voting rights, in percent. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional votingMinShares() { + return Json.optional(json, "voting_min_shares", Conv.STRING); + } + + /** + * Upper bound of the voting rights, in percent. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional votingMaxShares() { + return Json.optional(json, "voting_max_shares", Conv.STRING); + } + + /** + * Date the holding or appointment started (ISO 8601). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional appointmentDate() { + return Json.optional(json, "appointment_date", Conv.STRING); + } + + /** + * False for a former owner. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional isActive() { + return Json.optional(json, "is_active", Conv.BOOLEAN); + } + + /** + * What an owner holds, in the same shape for every country and registry source. Null when the registry states no holding. A band (for example a UK PSC's 25-50%) is not a stake: percentage is null and the band stays in ownership_min_shares / ownership_max_shares. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional shareholding() { + return Json.optional(json, "shareholding", Conv.model(KYBRegistryShareholding::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBOwnershipStructureOwner}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBOwnershipStructureOwner from) { + super(from); + } + + /** + * Owner name as the registry states it. + * + * @param name the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder name(@Nullable String name) { + return setNullable("name", Conv.STRING, name); + } + + /** + * Given name, for a natural person, when the registry states it. + * + * @param firstName the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder firstName(@Nullable String firstName) { + return setNullable("first_name", Conv.STRING, firstName); + } + + /** + * Family name, for a natural person, when the registry states it. + * + * @param lastName the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastName(@Nullable String lastName) { + return setNullable("last_name", Conv.STRING, lastName); + } + + /** + * Date of birth (ISO 8601) when the registry publishes it. + * + * @param dateOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder dateOfBirth(@Nullable String dateOfBirth) { + return setNullable("date_of_birth", Conv.STRING, dateOfBirth); + } + + /** + * Country of birth when the registry publishes it. + * + * @param countryOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder countryOfBirth(@Nullable String countryOfBirth) { + return setNullable("country_of_birth", Conv.STRING, countryOfBirth); + } + + /** + * Company name, for a corporate owner. + * + * @param companyName the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder companyName(@Nullable String companyName) { + return setNullable("company_name", Conv.STRING, companyName); + } + + /** + * Registration number, for a corporate owner. + * + * @param registrationNumber the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder registrationNumber(@Nullable String registrationNumber) { + return setNullable("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Whether the owner is a natural person or a company. + * + * @param entityType the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder entityType(KYBOwnershipStructureOwner.@Nullable EntityType entityType) { + return setNullable("entity_type", Conv.enumeration(KYBOwnershipStructureOwner.EntityType::of), entityType); + } + + /** + * Nationality when the registry states it. + * + * @param nationality the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nationality(@Nullable String nationality) { + return setNullable("nationality", Conv.STRING, nationality); + } + + /** + * The owner's title or role as the registry prints it. + * + * @param designation the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder designation(@Nullable String designation) { + return setNullable("designation", Conv.STRING, designation); + } + + /** + * shareholder for a direct holder, ubo for a beneficial owner. + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.STRING), roles); + } + + /** + * Lower bound of the stake, in percent (equal to the upper bound for an exact stake). + * + * @param ownershipMinShares the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipMinShares(@Nullable String ownershipMinShares) { + return setNullable("ownership_min_shares", Conv.STRING, ownershipMinShares); + } + + /** + * Upper bound of the stake, in percent. + * + * @param ownershipMaxShares the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipMaxShares(@Nullable String ownershipMaxShares) { + return setNullable("ownership_max_shares", Conv.STRING, ownershipMaxShares); + } + + /** + * Lower bound of the voting rights, in percent. + * + * @param votingMinShares the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder votingMinShares(@Nullable String votingMinShares) { + return setNullable("voting_min_shares", Conv.STRING, votingMinShares); + } + + /** + * Upper bound of the voting rights, in percent. + * + * @param votingMaxShares the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder votingMaxShares(@Nullable String votingMaxShares) { + return setNullable("voting_max_shares", Conv.STRING, votingMaxShares); + } + + /** + * Date the holding or appointment started (ISO 8601). + * + * @param appointmentDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder appointmentDate(@Nullable String appointmentDate) { + return setNullable("appointment_date", Conv.STRING, appointmentDate); + } + + /** + * False for a former owner. + * + * @param isActive the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder isActive(@Nullable Boolean isActive) { + return setNullable("is_active", Conv.BOOLEAN, isActive); + } + + /** + * What an owner holds, in the same shape for every country and registry source. Null when the registry states no holding. A band (for example a UK PSC's 25-50%) is not a stake: percentage is null and the band stays in ownership_min_shares / ownership_max_shares. + * + * @param shareholding the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder shareholding(@Nullable KYBRegistryShareholding shareholding) { + return setNullable("shareholding", Conv.model(KYBRegistryShareholding::fromJson), shareholding); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBOwnershipStructureOwner} + * @throws IllegalStateException when a required field is missing + */ + public KYBOwnershipStructureOwner build() { + require("name", true); + require("first_name", true); + require("last_name", true); + require("date_of_birth", true); + require("country_of_birth", true); + require("company_name", true); + require("registration_number", true); + require("entity_type", true); + require("nationality", true); + require("designation", true); + require("roles", false); + require("ownership_min_shares", true); + require("ownership_max_shares", true); + require("voting_min_shares", true); + require("voting_max_shares", true); + require("appointment_date", true); + require("is_active", true); + require("shareholding", true); + return new KYBOwnershipStructureOwner(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the owner is a natural person or a company. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } +} diff --git a/src/main/java/me/didit/types/KYBRegistryCandidateRequest.java b/src/main/java/me/didit/types/KYBRegistryCandidateRequest.java index 0c37b8e..9b67f59 100644 --- a/src/main/java/me/didit/types/KYBRegistryCandidateRequest.java +++ b/src/main/java/me/didit/types/KYBRegistryCandidateRequest.java @@ -50,7 +50,7 @@ public Builder toBuilder() { } /** - * Candidate handle from POST /v3/kyb/search/ (kyb_registry.companies[].kyb_response_id). Ephemeral — use it shortly after the search that produced it. + * Candidate handle from POST /v3/kyb/search/ (kyb_registry.companies[].kyb_response_id). Ephemeral: use it shortly after the search that produced it. Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -103,7 +103,7 @@ private Builder(KYBRegistryCandidateRequest from) { } /** - * Candidate handle from POST /v3/kyb/search/ (kyb_registry.companies[].kyb_response_id). Ephemeral — use it shortly after the search that produced it. + * Candidate handle from POST /v3/kyb/search/ (kyb_registry.companies[].kyb_response_id). Ephemeral: use it shortly after the search that produced it. Handles can be long, so store and send the value exactly as returned, without trimming or assuming a length. * * @param kybResponseId the value * @return this builder diff --git a/src/main/java/me/didit/types/KYBRegistryData.java b/src/main/java/me/didit/types/KYBRegistryData.java new file mode 100644 index 0000000..cc9372a --- /dev/null +++ b/src/main/java/me/didit/types/KYBRegistryData.java @@ -0,0 +1,932 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.JsonUnion; +import me.didit.core.StringEnum; + +/** + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. + */ +public final class KYBRegistryData extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("company_name", "registration_number", "country_code", "region", "incorporation_date", "registration_date", "dissolution_date", "tax_number", "vat_number", "legal_address", "registered_address", "company_type", "registry_status", "verification_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "control_scheme", "ownership_error", "section_errors", "ubo_resolution", "lite_enrichment", "registry_metadata", "registry_sources", "previous_names", "parent_companies", "documents_available"); + + private KYBRegistryData(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBRegistryData} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBRegistryData fromJson(JsonNode json) { + return new KYBRegistryData(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Company name as corrected in the console. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number as the registry or a console correction states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Country of the registration as the registry or a console correction states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional countryCode() { + return Json.optional(json, "country_code", Conv.STRING); + } + + /** + * Region or state of the registration. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional region() { + return Json.optional(json, "region", Conv.STRING); + } + + /** + * Incorporation date (ISO 8601). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional incorporationDate() { + return Json.optional(json, "incorporation_date", Conv.STRING); + } + + /** + * Registration date (ISO 8601) when the registry states one apart from the incorporation date. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationDate() { + return Json.optional(json, "registration_date", Conv.STRING); + } + + /** + * Dissolution date (ISO 8601) when the registry states one. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dissolutionDate() { + return Json.optional(json, "dissolution_date", Conv.STRING); + } + + /** + * Tax identification number. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional taxNumber() { + return Json.optional(json, "tax_number", Conv.STRING); + } + + /** + * VAT number. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vatNumber() { + return Json.optional(json, "vat_number", Conv.STRING); + } + + /** + * Legal address as corrected in the console. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional legalAddress() { + return Json.optional(json, "legal_address", Conv.STRING); + } + + /** + * Registered address as the registry states it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registeredAddress() { + return Json.optional(json, "registered_address", Conv.STRING); + } + + /** + * Legal form. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyType() { + return Json.optional(json, "company_type", Conv.STRING); + } + + /** + * Company status at the registry. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registryStatus() { + return Json.optional(json, "registry_status", Conv.STRING); + } + + /** + * Verification status. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional verificationStatus() { + return Json.optional(json, "verification_status", Conv.STRING); + } + + /** + * Other names the company trades or traded under. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional alternativeNames() { + return Json.optional(json, "alternative_names", Conv.STRING); + } + + /** + * Activity description. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional natureOfBusiness() { + return Json.optional(json, "nature_of_business", Conv.STRING); + } + + /** + * Registered capital as printed. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registeredCapital() { + return Json.optional(json, "registered_capital", Conv.STRING); + } + + /** + * Registered capital amount, as a decimal string. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registeredCapitalAmount() { + return Json.optional(json, "registered_capital_amount", Conv.STRING); + } + + /** + * Registered capital currency (ISO 4217). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registeredCapitalCurrency() { + return Json.optional(json, "registered_capital_currency", Conv.STRING); + } + + /** + * Website. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional website() { + return Json.optional(json, "website", Conv.STRING); + } + + /** + * Contact email. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Contact phone. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phone() { + return Json.optional(json, "phone", Conv.STRING); + } + + /** + * Legal Entity Identifier (LEI). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional legalEntityIdentifier() { + return Json.optional(json, "legal_entity_identifier", Conv.STRING); + } + + /** + * Place of registration. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional locationOfRegistration() { + return Json.optional(json, "location_of_registration", Conv.STRING); + } + + /** + * Governance scheme when the registry exposes it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional controlScheme() { + return Json.optional(json, "control_scheme", Conv.STRING); + } + + /** + * Why a requested ownership tier was not delivered, in the same codes as ownership.unavailable_reason. no_owners_on_record (the registry answered and names no owner) and ownership_section_unavailable (the registry did not return the ownership section) are different findings. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipError() { + return Json.optional(json, "ownership_error", Conv.enumeration(KYBRegistryData.OwnershipError::of)); + } + + /** + * Sections the registry did not return, keyed by section (officers, shareholders, group_structure). A section listed here was never delivered: an empty list next to it says nothing about the company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> sectionErrors() { + return Json.optional(json, "section_errors", Conv.map(Conv.model(KYBRegistrySectionError::fromJson))); + } + + /** + * How the UBO tier walked the ownership chain above the company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional uboResolution() { + return Json.optional(json, "ubo_resolution", Conv.model(KYBRegistryUboResolution::fromJson)); + } + + /** + * Blank Lite profile fields another of the country's registry sources filled. The source is not named. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional liteEnrichment() { + return Json.optional(json, "lite_enrichment", Conv.model(KYBRegistryLiteEnrichment::fromJson)); + } + + /** + * The register's own fields for the company, keyed as the register names them, as plain values (legacy records). Only fields reviewed as registry facts are included. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> registryMetadata() { + return Json.optional(json, "registry_metadata", Conv.map(Conv.union(KYBRegistryData.RegistryMetadataValue::fromJson))); + } + + /** + * The official registers the record was read from (legacy records). Other sources are not named. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> registrySources() { + return Json.optional(json, "registry_sources", Conv.list(Conv.model(KYBRegistrySource::fromJson))); + } + + /** + * Names the company was registered under before (legacy records). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> previousNames() { + return Json.optional(json, "previous_names", Conv.list(Conv.STRING)); + } + + /** + * Parent companies the registry names (legacy records). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> parentCompanies() { + return Json.optional(json, "parent_companies", Conv.list(Conv.STRING)); + } + + /** + * How many filings the registry offers for the company (legacy records). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentsAvailable() { + return Json.optional(json, "documents_available", Conv.LONG); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBRegistryData}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBRegistryData from) { + super(from); + } + + /** + * Company name as corrected in the console. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Registration number as the registry or a console correction states it. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Country of the registration as the registry or a console correction states it. + * + * @param countryCode the value + * @return this builder + */ + public Builder countryCode(String countryCode) { + return set("country_code", Conv.STRING, countryCode); + } + + /** + * Region or state of the registration. + * + * @param region the value + * @return this builder + */ + public Builder region(String region) { + return set("region", Conv.STRING, region); + } + + /** + * Incorporation date (ISO 8601). + * + * @param incorporationDate the value + * @return this builder + */ + public Builder incorporationDate(String incorporationDate) { + return set("incorporation_date", Conv.STRING, incorporationDate); + } + + /** + * Registration date (ISO 8601) when the registry states one apart from the incorporation date. + * + * @param registrationDate the value + * @return this builder + */ + public Builder registrationDate(String registrationDate) { + return set("registration_date", Conv.STRING, registrationDate); + } + + /** + * Dissolution date (ISO 8601) when the registry states one. + * + * @param dissolutionDate the value + * @return this builder + */ + public Builder dissolutionDate(String dissolutionDate) { + return set("dissolution_date", Conv.STRING, dissolutionDate); + } + + /** + * Tax identification number. + * + * @param taxNumber the value + * @return this builder + */ + public Builder taxNumber(String taxNumber) { + return set("tax_number", Conv.STRING, taxNumber); + } + + /** + * VAT number. + * + * @param vatNumber the value + * @return this builder + */ + public Builder vatNumber(String vatNumber) { + return set("vat_number", Conv.STRING, vatNumber); + } + + /** + * Legal address as corrected in the console. + * + * @param legalAddress the value + * @return this builder + */ + public Builder legalAddress(String legalAddress) { + return set("legal_address", Conv.STRING, legalAddress); + } + + /** + * Registered address as the registry states it. + * + * @param registeredAddress the value + * @return this builder + */ + public Builder registeredAddress(String registeredAddress) { + return set("registered_address", Conv.STRING, registeredAddress); + } + + /** + * Legal form. + * + * @param companyType the value + * @return this builder + */ + public Builder companyType(String companyType) { + return set("company_type", Conv.STRING, companyType); + } + + /** + * Company status at the registry. + * + * @param registryStatus the value + * @return this builder + */ + public Builder registryStatus(String registryStatus) { + return set("registry_status", Conv.STRING, registryStatus); + } + + /** + * Verification status. + * + * @param verificationStatus the value + * @return this builder + */ + public Builder verificationStatus(String verificationStatus) { + return set("verification_status", Conv.STRING, verificationStatus); + } + + /** + * Other names the company trades or traded under. + * + * @param alternativeNames the value + * @return this builder + */ + public Builder alternativeNames(String alternativeNames) { + return set("alternative_names", Conv.STRING, alternativeNames); + } + + /** + * Activity description. + * + * @param natureOfBusiness the value + * @return this builder + */ + public Builder natureOfBusiness(String natureOfBusiness) { + return set("nature_of_business", Conv.STRING, natureOfBusiness); + } + + /** + * Registered capital as printed. + * + * @param registeredCapital the value + * @return this builder + */ + public Builder registeredCapital(String registeredCapital) { + return set("registered_capital", Conv.STRING, registeredCapital); + } + + /** + * Registered capital amount, as a decimal string. + * + * @param registeredCapitalAmount the value + * @return this builder + */ + public Builder registeredCapitalAmount(String registeredCapitalAmount) { + return set("registered_capital_amount", Conv.STRING, registeredCapitalAmount); + } + + /** + * Registered capital currency (ISO 4217). + * + * @param registeredCapitalCurrency the value + * @return this builder + */ + public Builder registeredCapitalCurrency(String registeredCapitalCurrency) { + return set("registered_capital_currency", Conv.STRING, registeredCapitalCurrency); + } + + /** + * Website. + * + * @param website the value + * @return this builder + */ + public Builder website(String website) { + return set("website", Conv.STRING, website); + } + + /** + * Contact email. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Contact phone. + * + * @param phone the value + * @return this builder + */ + public Builder phone(String phone) { + return set("phone", Conv.STRING, phone); + } + + /** + * Legal Entity Identifier (LEI). + * + * @param legalEntityIdentifier the value + * @return this builder + */ + public Builder legalEntityIdentifier(String legalEntityIdentifier) { + return set("legal_entity_identifier", Conv.STRING, legalEntityIdentifier); + } + + /** + * Place of registration. + * + * @param locationOfRegistration the value + * @return this builder + */ + public Builder locationOfRegistration(String locationOfRegistration) { + return set("location_of_registration", Conv.STRING, locationOfRegistration); + } + + /** + * Governance scheme when the registry exposes it. + * + * @param controlScheme the value + * @return this builder + */ + public Builder controlScheme(String controlScheme) { + return set("control_scheme", Conv.STRING, controlScheme); + } + + /** + * Why a requested ownership tier was not delivered, in the same codes as ownership.unavailable_reason. no_owners_on_record (the registry answered and names no owner) and ownership_section_unavailable (the registry did not return the ownership section) are different findings. + * + * @param ownershipError the value + * @return this builder + */ + public Builder ownershipError(KYBRegistryData.OwnershipError ownershipError) { + return set("ownership_error", Conv.enumeration(KYBRegistryData.OwnershipError::of), ownershipError); + } + + /** + * Sections the registry did not return, keyed by section (officers, shareholders, group_structure). A section listed here was never delivered: an empty list next to it says nothing about the company. + * + * @param sectionErrors the value + * @return this builder + */ + public Builder sectionErrors(Map sectionErrors) { + return set("section_errors", Conv.map(Conv.model(KYBRegistrySectionError::fromJson)), sectionErrors); + } + + /** + * How the UBO tier walked the ownership chain above the company. + * + * @param uboResolution the value + * @return this builder + */ + public Builder uboResolution(KYBRegistryUboResolution uboResolution) { + return set("ubo_resolution", Conv.model(KYBRegistryUboResolution::fromJson), uboResolution); + } + + /** + * Blank Lite profile fields another of the country's registry sources filled. The source is not named. + * + * @param liteEnrichment the value + * @return this builder + */ + public Builder liteEnrichment(KYBRegistryLiteEnrichment liteEnrichment) { + return set("lite_enrichment", Conv.model(KYBRegistryLiteEnrichment::fromJson), liteEnrichment); + } + + /** + * The register's own fields for the company, keyed as the register names them, as plain values (legacy records). Only fields reviewed as registry facts are included. + * + * @param registryMetadata the value + * @return this builder + */ + public Builder registryMetadata(Map registryMetadata) { + return set("registry_metadata", Conv.map(Conv.union(KYBRegistryData.RegistryMetadataValue::fromJson)), registryMetadata); + } + + /** + * The official registers the record was read from (legacy records). Other sources are not named. + * + * @param registrySources the value + * @return this builder + */ + public Builder registrySources(List registrySources) { + return set("registry_sources", Conv.list(Conv.model(KYBRegistrySource::fromJson)), registrySources); + } + + /** + * Names the company was registered under before (legacy records). + * + * @param previousNames the value + * @return this builder + */ + public Builder previousNames(List previousNames) { + return set("previous_names", Conv.list(Conv.STRING), previousNames); + } + + /** + * Parent companies the registry names (legacy records). + * + * @param parentCompanies the value + * @return this builder + */ + public Builder parentCompanies(List parentCompanies) { + return set("parent_companies", Conv.list(Conv.STRING), parentCompanies); + } + + /** + * How many filings the registry offers for the company (legacy records). + * + * @param documentsAvailable the value + * @return this builder + */ + public Builder documentsAvailable(long documentsAvailable) { + return set("documents_available", Conv.LONG, documentsAvailable); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBRegistryData} + */ + public KYBRegistryData build() { + return new KYBRegistryData(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Why a requested ownership tier was not delivered, in the same codes as ownership.unavailable_reason. no_owners_on_record (the registry answered and names no owner) and ownership_section_unavailable (the registry did not return the ownership section) are different findings. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class OwnershipError extends StringEnum { + /** The value {@code "no_owners_on_record"}. */ + public static final OwnershipError NO_OWNERS_ON_RECORD = new OwnershipError("no_owners_on_record"); + + /** The value {@code "no_natural_person_owner"}. */ + public static final OwnershipError NO_NATURAL_PERSON_OWNER = new OwnershipError("no_natural_person_owner"); + + /** The value {@code "ownership_section_unavailable"}. */ + public static final OwnershipError OWNERSHIP_SECTION_UNAVAILABLE = new OwnershipError("ownership_section_unavailable"); + + /** The value {@code "company_not_found"}. */ + public static final OwnershipError COMPANY_NOT_FOUND = new OwnershipError("company_not_found"); + + /** The value {@code "ambiguous_company_match"}. */ + public static final OwnershipError AMBIGUOUS_COMPANY_MATCH = new OwnershipError("ambiguous_company_match"); + + /** The value {@code "missing_registration_number"}. */ + public static final OwnershipError MISSING_REGISTRATION_NUMBER = new OwnershipError("missing_registration_number"); + + /** The value {@code "entity_type_not_covered"}. */ + public static final OwnershipError ENTITY_TYPE_NOT_COVERED = new OwnershipError("entity_type_not_covered"); + + /** The value {@code "provider_unavailable"}. */ + public static final OwnershipError PROVIDER_UNAVAILABLE = new OwnershipError("provider_unavailable"); + + /** The value {@code "other"}. */ + public static final OwnershipError OTHER = new OwnershipError("other"); + + private static final List KNOWN_VALUES = List.of(NO_OWNERS_ON_RECORD, NO_NATURAL_PERSON_OWNER, OWNERSHIP_SECTION_UNAVAILABLE, COMPANY_NOT_FOUND, AMBIGUOUS_COMPANY_MATCH, MISSING_REGISTRATION_NUMBER, ENTITY_TYPE_NOT_COVERED, PROVIDER_UNAVAILABLE, OTHER); + + private OwnershipError(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static OwnershipError of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, OwnershipError::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

One of: {@code String}, {@code Double}, {@code Boolean}. Check with the {@code is...} + * methods and read with the {@code as...} methods. + */ + public static final class RegistryMetadataValue extends JsonUnion { + private RegistryMetadataValue(JsonNode json) { + super(json); + } + + /** + * Reads a {@code RegistryMetadataValue} from JSON. + * + * @param json any JSON value + * @return the union + */ + public static RegistryMetadataValue fromJson(JsonNode json) { + return new RegistryMetadataValue(json.deepCopy()); + } + + /** + * Wraps a {@code String} value. + * + * @param value the value + * @return the union + */ + public static RegistryMetadataValue ofString(String value) { + return new RegistryMetadataValue(Conv.STRING.write(value)); + } + + /** + * Whether this value is a {@code String}. + * + * @return true when it matches + */ + public boolean isString() { + return json.isTextual(); + } + + /** + * Reads this value as a {@code String}. + * + * @return the value, or empty when {@link #isString()} is false + */ + public Optional asString() { + return isString() ? Optional.of(Conv.STRING.read(json)) : Optional.empty(); + } + + /** + * Wraps a {@code Double} value. + * + * @param value the value + * @return the union + */ + public static RegistryMetadataValue ofDouble(Double value) { + return new RegistryMetadataValue(Conv.DOUBLE.write(value)); + } + + /** + * Whether this value is a {@code Double}. + * + * @return true when it matches + */ + public boolean isDouble() { + return json.isNumber(); + } + + /** + * Reads this value as a {@code Double}. + * + * @return the value, or empty when {@link #isDouble()} is false + */ + public Optional asDouble() { + return isDouble() ? Optional.of(Conv.DOUBLE.read(json)) : Optional.empty(); + } + + /** + * Wraps a {@code Boolean} value. + * + * @param value the value + * @return the union + */ + public static RegistryMetadataValue ofBoolean(Boolean value) { + return new RegistryMetadataValue(Conv.BOOLEAN.write(value)); + } + + /** + * Whether this value is a {@code Boolean}. + * + * @return true when it matches + */ + public boolean isBoolean() { + return json.isBoolean(); + } + + /** + * Reads this value as a {@code Boolean}. + * + * @return the value, or empty when {@link #isBoolean()} is false + */ + public Optional asBoolean() { + return isBoolean() ? Optional.of(Conv.BOOLEAN.read(json)) : Optional.empty(); + } + } +} diff --git a/src/main/java/me/didit/types/KYBRegistryGroupCompany.java b/src/main/java/me/didit/types/KYBRegistryGroupCompany.java new file mode 100644 index 0000000..443e614 --- /dev/null +++ b/src/main/java/me/didit/types/KYBRegistryGroupCompany.java @@ -0,0 +1,144 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +/** A company of the corporate group, by its registry identity. */ +public final class KYBRegistryGroupCompany extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("name", "country_code", "registration_number"); + + private KYBRegistryGroupCompany(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBRegistryGroupCompany} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBRegistryGroupCompany fromJson(JsonNode json) { + return new KYBRegistryGroupCompany(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Company name. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional name() { + return Json.optional(json, "name", Conv.STRING); + } + + /** + * Country of registration. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional countryCode() { + return Json.optional(json, "country_code", Conv.STRING); + } + + /** + * Registration number. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBRegistryGroupCompany}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBRegistryGroupCompany from) { + super(from); + } + + /** + * Company name. + * + * @param name the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder name(@Nullable String name) { + return setNullable("name", Conv.STRING, name); + } + + /** + * Country of registration. + * + * @param countryCode the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder countryCode(@Nullable String countryCode) { + return setNullable("country_code", Conv.STRING, countryCode); + } + + /** + * Registration number. + * + * @param registrationNumber the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder registrationNumber(@Nullable String registrationNumber) { + return setNullable("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBRegistryGroupCompany} + * @throws IllegalStateException when a required field is missing + */ + public KYBRegistryGroupCompany build() { + require("name", true); + require("country_code", true); + require("registration_number", true); + return new KYBRegistryGroupCompany(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/KYBRegistryLiteEnrichment.java b/src/main/java/me/didit/types/KYBRegistryLiteEnrichment.java new file mode 100644 index 0000000..4e1b1b9 --- /dev/null +++ b/src/main/java/me/didit/types/KYBRegistryLiteEnrichment.java @@ -0,0 +1,123 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** + * Blank Lite profile fields another of the country's registry sources filled. The source is not named. + */ +public final class KYBRegistryLiteEnrichment extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("fields", "people_added"); + + private KYBRegistryLiteEnrichment(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBRegistryLiteEnrichment} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBRegistryLiteEnrichment fromJson(JsonNode json) { + return new KYBRegistryLiteEnrichment(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The company fields that were filled. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List fields() { + return Json.required(json, "fields", Conv.list(Conv.STRING)); + } + + /** + * How many officers or owners were added. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long peopleAdded() { + return Json.required(json, "people_added", Conv.LONG); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBRegistryLiteEnrichment}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBRegistryLiteEnrichment from) { + super(from); + } + + /** + * The company fields that were filled. + * + * @param fields the value + * @return this builder + */ + public Builder fields(List fields) { + return set("fields", Conv.list(Conv.STRING), fields); + } + + /** + * How many officers or owners were added. + * + * @param peopleAdded the value + * @return this builder + */ + public Builder peopleAdded(long peopleAdded) { + return set("people_added", Conv.LONG, peopleAdded); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBRegistryLiteEnrichment} + * @throws IllegalStateException when a required field is missing + */ + public KYBRegistryLiteEnrichment build() { + require("fields", false); + require("people_added", false); + return new KYBRegistryLiteEnrichment(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/KYBRegistrySectionError.java b/src/main/java/me/didit/types/KYBRegistrySectionError.java new file mode 100644 index 0000000..3971905 --- /dev/null +++ b/src/main/java/me/didit/types/KYBRegistrySectionError.java @@ -0,0 +1,102 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +/** A section the registry did not return. */ +public final class KYBRegistrySectionError extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("status_code"); + + private KYBRegistrySectionError(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBRegistrySectionError} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBRegistrySectionError fromJson(JsonNode json) { + return new KYBRegistrySectionError(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The status the registry answered for the section. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional statusCode() { + return Json.optional(json, "status_code", Conv.LONG); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBRegistrySectionError}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBRegistrySectionError from) { + super(from); + } + + /** + * The status the registry answered for the section. + * + * @param statusCode the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder statusCode(@Nullable Long statusCode) { + return setNullable("status_code", Conv.LONG, statusCode); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBRegistrySectionError} + * @throws IllegalStateException when a required field is missing + */ + public KYBRegistrySectionError build() { + require("status_code", true); + return new KYBRegistrySectionError(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/KYBRegistrySource.java b/src/main/java/me/didit/types/KYBRegistrySource.java new file mode 100644 index 0000000..1c4b475 --- /dev/null +++ b/src/main/java/me/didit/types/KYBRegistrySource.java @@ -0,0 +1,164 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; + +/** + * An official register the record was read from. Only official government registers, regulators and the official identifier system are named; any other source is left out. + */ +public final class KYBRegistrySource extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("name", "source_type"); + + private KYBRegistrySource(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBRegistrySource} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBRegistrySource fromJson(JsonNode json) { + return new KYBRegistrySource(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Register name, for example UK Companies House. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String name() { + return Json.required(json, "name", Conv.STRING); + } + + /** + * Always official. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public KYBRegistrySource.SourceType sourceType() { + return Json.required(json, "source_type", Conv.enumeration(KYBRegistrySource.SourceType::of)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBRegistrySource}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBRegistrySource from) { + super(from); + } + + /** + * Register name, for example UK Companies House. + * + * @param name the value + * @return this builder + */ + public Builder name(String name) { + return set("name", Conv.STRING, name); + } + + /** + * Always official. + * + * @param sourceType the value + * @return this builder + */ + public Builder sourceType(KYBRegistrySource.SourceType sourceType) { + return set("source_type", Conv.enumeration(KYBRegistrySource.SourceType::of), sourceType); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBRegistrySource} + * @throws IllegalStateException when a required field is missing + */ + public KYBRegistrySource build() { + require("name", false); + require("source_type", false); + return new KYBRegistrySource(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Always official. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class SourceType extends StringEnum { + /** The value {@code "official"}. */ + public static final SourceType OFFICIAL = new SourceType("official"); + + private static final List KNOWN_VALUES = List.of(OFFICIAL); + + private SourceType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static SourceType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, SourceType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } +} diff --git a/src/main/java/me/didit/types/KYBRegistryUboResolution.java b/src/main/java/me/didit/types/KYBRegistryUboResolution.java new file mode 100644 index 0000000..aaa91df --- /dev/null +++ b/src/main/java/me/didit/types/KYBRegistryUboResolution.java @@ -0,0 +1,252 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +/** How the UBO tier walked the ownership chain above the company. */ +public final class KYBRegistryUboResolution extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("parent_chain", "subsidiaries", "unresolved"); + + private KYBRegistryUboResolution(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code KYBRegistryUboResolution} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static KYBRegistryUboResolution fromJson(JsonNode json) { + return new KYBRegistryUboResolution(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Corporate parents from the ultimate parent down to the company. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List parentChain() { + return Json.required(json, "parent_chain", Conv.list(Conv.model(KYBRegistryGroupCompany::fromJson))); + } + + /** + * Companies directly below the company in its corporate group. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List subsidiaries() { + return Json.required(json, "subsidiaries", Conv.list(Conv.model(KYBRegistryGroupCompany::fromJson))); + } + + /** + * Parts of the chain the registry could not resolve (the same entries as ownership.unresolved). + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List unresolved() { + return Json.required(json, "unresolved", Conv.list(Conv.model(KYBRegistryUboResolution.Unresolved::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link KYBRegistryUboResolution}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(KYBRegistryUboResolution from) { + super(from); + } + + /** + * Corporate parents from the ultimate parent down to the company. + * + * @param parentChain the value + * @return this builder + */ + public Builder parentChain(List parentChain) { + return set("parent_chain", Conv.list(Conv.model(KYBRegistryGroupCompany::fromJson)), parentChain); + } + + /** + * Companies directly below the company in its corporate group. + * + * @param subsidiaries the value + * @return this builder + */ + public Builder subsidiaries(List subsidiaries) { + return set("subsidiaries", Conv.list(Conv.model(KYBRegistryGroupCompany::fromJson)), subsidiaries); + } + + /** + * Parts of the chain the registry could not resolve (the same entries as ownership.unresolved). + * + * @param unresolved the value + * @return this builder + */ + public Builder unresolved(List unresolved) { + return set("unresolved", Conv.list(Conv.model(KYBRegistryUboResolution.Unresolved::fromJson)), unresolved); + } + + /** + * Builds the value. + * + * @return a new immutable {@code KYBRegistryUboResolution} + * @throws IllegalStateException when a required field is missing + */ + public KYBRegistryUboResolution build() { + require("parent_chain", false); + require("subsidiaries", false); + require("unresolved", false); + return new KYBRegistryUboResolution(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Unresolved extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("reason", "section"); + + private Unresolved(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Unresolved} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Unresolved fromJson(JsonNode json) { + return new Unresolved(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Why, for example no_group_structure_on_record, selected_company_not_in_group_structure or section_error. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String reason() { + return Json.required(json, "reason", Conv.STRING); + } + + /** + * The section concerned, for example group_structure. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional section() { + return Json.optional(json, "section", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Unresolved}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Unresolved from) { + super(from); + } + + /** + * Why, for example no_group_structure_on_record, selected_company_not_in_group_structure or section_error. + * + * @param reason the value + * @return this builder + */ + public Builder reason(String reason) { + return set("reason", Conv.STRING, reason); + } + + /** + * The section concerned, for example group_structure. + * + * @param section the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder section(@Nullable String section) { + return setNullable("section", Conv.STRING, section); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Unresolved} + * @throws IllegalStateException when a required field is missing + */ + public Unresolved build() { + require("reason", false); + require("section", true); + return new Unresolved(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } +} diff --git a/src/main/java/me/didit/types/KybListShareholdersResponse.java b/src/main/java/me/didit/types/KybListShareholdersResponse.java index 811b1ab..c211035 100644 --- a/src/main/java/me/didit/types/KybListShareholdersResponse.java +++ b/src/main/java/me/didit/types/KybListShareholdersResponse.java @@ -314,7 +314,7 @@ public boolean isKnown() { /** Full registry company profile. */ public static final class KybRegistry extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "registry_tier_delivered", "registry_ownership_status", "ownership", "registry_tier"); + private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "registry_tier_delivered", "registry_ownership_status", "ownership", "registry_tier", "registry_monitoring"); private KybRegistry(ObjectNode json, Map> files) { super(json, files); @@ -750,13 +750,13 @@ public Optional> accounts() { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> registryData() { - return Json.optional(json, "registry_data", Conv.OBJECT); + public Optional registryData() { + return Json.optional(json, "registry_data", Conv.model(KYBRegistryData::fromJson)); } /** @@ -839,6 +839,16 @@ public Optional registryTier() { return Json.optional(json, "registry_tier", Conv.STRING); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registryMonitoring() { + return Json.optional(json, "registry_monitoring", Conv.model(KybListShareholdersResponse.KybRegistry.RegistryMonitoring::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -1253,13 +1263,13 @@ public Builder accounts(@Nullable Map accounts) { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * - * @param registryData the value + * @param registryData the value, or {@code null} to send JSON null * @return this builder */ - public Builder registryData(Map registryData) { - return setAny("registry_data", registryData); + public Builder registryData(@Nullable KYBRegistryData registryData) { + return setNullable("registry_data", Conv.model(KYBRegistryData::fromJson), registryData); } /** @@ -1342,6 +1352,16 @@ public Builder registryTier(@Nullable String registryTier) { return setNullable("registry_tier", Conv.STRING, registryTier); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @param registryMonitoring the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder registryMonitoring(KybListShareholdersResponse.KybRegistry.@Nullable RegistryMonitoring registryMonitoring) { + return setNullable("registry_monitoring", Conv.model(KybListShareholdersResponse.KybRegistry.RegistryMonitoring::fromJson), registryMonitoring); + } + /** * Builds the value. * @@ -2870,5 +2890,271 @@ public boolean isKnown() { return KNOWN_VALUES.contains(this); } } + + /** The latest registry monitor for the company, or null when none exists. */ + public static final class RegistryMonitoring extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("uuid", "status", "unavailable_reason", "enrolled_at", "cancelled_at", "last_bill_date", "next_bill_date", "last_event_at", "events_count", "watched_fields"); + + private RegistryMonitoring(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code RegistryMonitoring} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static RegistryMonitoring fromJson(JsonNode json) { + return new RegistryMonitoring(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The uuid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional uuid() { + return Json.optional(json, "uuid", Conv.STRING); + } + + /** + * The status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * The unavailable_reason field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional unavailableReason() { + return Json.optional(json, "unavailable_reason", Conv.STRING); + } + + /** + * The enrolled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enrolledAt() { + return Json.optional(json, "enrolled_at", Conv.DATE_TIME); + } + + /** + * The cancelled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional cancelledAt() { + return Json.optional(json, "cancelled_at", Conv.DATE_TIME); + } + + /** + * The last_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastBillDate() { + return Json.optional(json, "last_bill_date", Conv.DATE); + } + + /** + * The next_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nextBillDate() { + return Json.optional(json, "next_bill_date", Conv.DATE); + } + + /** + * The last_event_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastEventAt() { + return Json.optional(json, "last_event_at", Conv.DATE_TIME); + } + + /** + * The events_count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional eventsCount() { + return Json.optional(json, "events_count", Conv.LONG); + } + + /** + * The company fields the monitor watches. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional watchedFields() { + return Json.optional(json, "watched_fields", Conv.ANY); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link RegistryMonitoring}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(RegistryMonitoring from) { + super(from); + } + + /** + * The uuid field. + * + * @param uuid the value + * @return this builder + */ + public Builder uuid(String uuid) { + return set("uuid", Conv.STRING, uuid); + } + + /** + * The status field. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * The unavailable_reason field. + * + * @param unavailableReason the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder unavailableReason(@Nullable String unavailableReason) { + return setNullable("unavailable_reason", Conv.STRING, unavailableReason); + } + + /** + * The enrolled_at field. + * + * @param enrolledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder enrolledAt(@Nullable OffsetDateTime enrolledAt) { + return setNullable("enrolled_at", Conv.DATE_TIME, enrolledAt); + } + + /** + * The cancelled_at field. + * + * @param cancelledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder cancelledAt(@Nullable OffsetDateTime cancelledAt) { + return setNullable("cancelled_at", Conv.DATE_TIME, cancelledAt); + } + + /** + * The last_bill_date field. + * + * @param lastBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastBillDate(@Nullable LocalDate lastBillDate) { + return setNullable("last_bill_date", Conv.DATE, lastBillDate); + } + + /** + * The next_bill_date field. + * + * @param nextBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nextBillDate(@Nullable LocalDate nextBillDate) { + return setNullable("next_bill_date", Conv.DATE, nextBillDate); + } + + /** + * The last_event_at field. + * + * @param lastEventAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastEventAt(@Nullable OffsetDateTime lastEventAt) { + return setNullable("last_event_at", Conv.DATE_TIME, lastEventAt); + } + + /** + * The events_count field. + * + * @param eventsCount the value + * @return this builder + */ + public Builder eventsCount(long eventsCount) { + return set("events_count", Conv.LONG, eventsCount); + } + + /** + * The company fields the monitor watches. + * + * @param watchedFields the value + * @return this builder + */ + public Builder watchedFields(@Nullable Object watchedFields) { + return setAny("watched_fields", watchedFields); + } + + /** + * Builds the value. + * + * @return a new immutable {@code RegistryMonitoring} + */ + public RegistryMonitoring build() { + return new RegistryMonitoring(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } } } diff --git a/src/main/java/me/didit/types/KybListUbosResponse.java b/src/main/java/me/didit/types/KybListUbosResponse.java index 93119b7..747ec0a 100644 --- a/src/main/java/me/didit/types/KybListUbosResponse.java +++ b/src/main/java/me/didit/types/KybListUbosResponse.java @@ -314,7 +314,7 @@ public boolean isKnown() { /** Full registry company profile. */ public static final class KybRegistry extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "registry_tier_delivered", "registry_ownership_status", "ownership", "registry_tier"); + private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "registry_tier_delivered", "registry_ownership_status", "ownership", "registry_tier", "registry_monitoring"); private KybRegistry(ObjectNode json, Map> files) { super(json, files); @@ -750,13 +750,13 @@ public Optional> accounts() { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> registryData() { - return Json.optional(json, "registry_data", Conv.OBJECT); + public Optional registryData() { + return Json.optional(json, "registry_data", Conv.model(KYBRegistryData::fromJson)); } /** @@ -839,6 +839,16 @@ public Optional registryTier() { return Json.optional(json, "registry_tier", Conv.STRING); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registryMonitoring() { + return Json.optional(json, "registry_monitoring", Conv.model(KybListUbosResponse.KybRegistry.RegistryMonitoring::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -1253,13 +1263,13 @@ public Builder accounts(@Nullable Map accounts) { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * - * @param registryData the value + * @param registryData the value, or {@code null} to send JSON null * @return this builder */ - public Builder registryData(Map registryData) { - return setAny("registry_data", registryData); + public Builder registryData(@Nullable KYBRegistryData registryData) { + return setNullable("registry_data", Conv.model(KYBRegistryData::fromJson), registryData); } /** @@ -1342,6 +1352,16 @@ public Builder registryTier(@Nullable String registryTier) { return setNullable("registry_tier", Conv.STRING, registryTier); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @param registryMonitoring the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder registryMonitoring(KybListUbosResponse.KybRegistry.@Nullable RegistryMonitoring registryMonitoring) { + return setNullable("registry_monitoring", Conv.model(KybListUbosResponse.KybRegistry.RegistryMonitoring::fromJson), registryMonitoring); + } + /** * Builds the value. * @@ -2870,5 +2890,271 @@ public boolean isKnown() { return KNOWN_VALUES.contains(this); } } + + /** The latest registry monitor for the company, or null when none exists. */ + public static final class RegistryMonitoring extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("uuid", "status", "unavailable_reason", "enrolled_at", "cancelled_at", "last_bill_date", "next_bill_date", "last_event_at", "events_count", "watched_fields"); + + private RegistryMonitoring(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code RegistryMonitoring} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static RegistryMonitoring fromJson(JsonNode json) { + return new RegistryMonitoring(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The uuid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional uuid() { + return Json.optional(json, "uuid", Conv.STRING); + } + + /** + * The status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * The unavailable_reason field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional unavailableReason() { + return Json.optional(json, "unavailable_reason", Conv.STRING); + } + + /** + * The enrolled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enrolledAt() { + return Json.optional(json, "enrolled_at", Conv.DATE_TIME); + } + + /** + * The cancelled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional cancelledAt() { + return Json.optional(json, "cancelled_at", Conv.DATE_TIME); + } + + /** + * The last_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastBillDate() { + return Json.optional(json, "last_bill_date", Conv.DATE); + } + + /** + * The next_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nextBillDate() { + return Json.optional(json, "next_bill_date", Conv.DATE); + } + + /** + * The last_event_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastEventAt() { + return Json.optional(json, "last_event_at", Conv.DATE_TIME); + } + + /** + * The events_count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional eventsCount() { + return Json.optional(json, "events_count", Conv.LONG); + } + + /** + * The company fields the monitor watches. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional watchedFields() { + return Json.optional(json, "watched_fields", Conv.ANY); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link RegistryMonitoring}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(RegistryMonitoring from) { + super(from); + } + + /** + * The uuid field. + * + * @param uuid the value + * @return this builder + */ + public Builder uuid(String uuid) { + return set("uuid", Conv.STRING, uuid); + } + + /** + * The status field. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * The unavailable_reason field. + * + * @param unavailableReason the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder unavailableReason(@Nullable String unavailableReason) { + return setNullable("unavailable_reason", Conv.STRING, unavailableReason); + } + + /** + * The enrolled_at field. + * + * @param enrolledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder enrolledAt(@Nullable OffsetDateTime enrolledAt) { + return setNullable("enrolled_at", Conv.DATE_TIME, enrolledAt); + } + + /** + * The cancelled_at field. + * + * @param cancelledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder cancelledAt(@Nullable OffsetDateTime cancelledAt) { + return setNullable("cancelled_at", Conv.DATE_TIME, cancelledAt); + } + + /** + * The last_bill_date field. + * + * @param lastBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastBillDate(@Nullable LocalDate lastBillDate) { + return setNullable("last_bill_date", Conv.DATE, lastBillDate); + } + + /** + * The next_bill_date field. + * + * @param nextBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nextBillDate(@Nullable LocalDate nextBillDate) { + return setNullable("next_bill_date", Conv.DATE, nextBillDate); + } + + /** + * The last_event_at field. + * + * @param lastEventAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastEventAt(@Nullable OffsetDateTime lastEventAt) { + return setNullable("last_event_at", Conv.DATE_TIME, lastEventAt); + } + + /** + * The events_count field. + * + * @param eventsCount the value + * @return this builder + */ + public Builder eventsCount(long eventsCount) { + return set("events_count", Conv.LONG, eventsCount); + } + + /** + * The company fields the monitor watches. + * + * @param watchedFields the value + * @return this builder + */ + public Builder watchedFields(@Nullable Object watchedFields) { + return setAny("watched_fields", watchedFields); + } + + /** + * Builds the value. + * + * @return a new immutable {@code RegistryMonitoring} + */ + public RegistryMonitoring build() { + return new RegistryMonitoring(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } } } diff --git a/src/main/java/me/didit/types/KybSelectResponse.java b/src/main/java/me/didit/types/KybSelectResponse.java index 2760964..8bbae46 100644 --- a/src/main/java/me/didit/types/KybSelectResponse.java +++ b/src/main/java/me/didit/types/KybSelectResponse.java @@ -314,7 +314,7 @@ public boolean isKnown() { /** Full registry company profile. */ public static final class KybRegistry extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "registry_tier_delivered", "registry_ownership_status", "ownership", "registry_tier"); + private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "registry_tier_delivered", "registry_ownership_status", "ownership", "registry_tier", "registry_monitoring"); private KybRegistry(ObjectNode json, Map> files) { super(json, files); @@ -750,13 +750,13 @@ public Optional> accounts() { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> registryData() { - return Json.optional(json, "registry_data", Conv.OBJECT); + public Optional registryData() { + return Json.optional(json, "registry_data", Conv.model(KYBRegistryData::fromJson)); } /** @@ -839,6 +839,16 @@ public Optional registryTier() { return Json.optional(json, "registry_tier", Conv.STRING); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registryMonitoring() { + return Json.optional(json, "registry_monitoring", Conv.model(KybSelectResponse.KybRegistry.RegistryMonitoring::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -1253,13 +1263,13 @@ public Builder accounts(@Nullable Map accounts) { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * - * @param registryData the value + * @param registryData the value, or {@code null} to send JSON null * @return this builder */ - public Builder registryData(Map registryData) { - return setAny("registry_data", registryData); + public Builder registryData(@Nullable KYBRegistryData registryData) { + return setNullable("registry_data", Conv.model(KYBRegistryData::fromJson), registryData); } /** @@ -1342,6 +1352,16 @@ public Builder registryTier(@Nullable String registryTier) { return setNullable("registry_tier", Conv.STRING, registryTier); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @param registryMonitoring the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder registryMonitoring(KybSelectResponse.KybRegistry.@Nullable RegistryMonitoring registryMonitoring) { + return setNullable("registry_monitoring", Conv.model(KybSelectResponse.KybRegistry.RegistryMonitoring::fromJson), registryMonitoring); + } + /** * Builds the value. * @@ -2867,5 +2887,271 @@ public boolean isKnown() { return KNOWN_VALUES.contains(this); } } + + /** The latest registry monitor for the company, or null when none exists. */ + public static final class RegistryMonitoring extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("uuid", "status", "unavailable_reason", "enrolled_at", "cancelled_at", "last_bill_date", "next_bill_date", "last_event_at", "events_count", "watched_fields"); + + private RegistryMonitoring(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code RegistryMonitoring} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static RegistryMonitoring fromJson(JsonNode json) { + return new RegistryMonitoring(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The uuid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional uuid() { + return Json.optional(json, "uuid", Conv.STRING); + } + + /** + * The status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * The unavailable_reason field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional unavailableReason() { + return Json.optional(json, "unavailable_reason", Conv.STRING); + } + + /** + * The enrolled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enrolledAt() { + return Json.optional(json, "enrolled_at", Conv.DATE_TIME); + } + + /** + * The cancelled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional cancelledAt() { + return Json.optional(json, "cancelled_at", Conv.DATE_TIME); + } + + /** + * The last_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastBillDate() { + return Json.optional(json, "last_bill_date", Conv.DATE); + } + + /** + * The next_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nextBillDate() { + return Json.optional(json, "next_bill_date", Conv.DATE); + } + + /** + * The last_event_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastEventAt() { + return Json.optional(json, "last_event_at", Conv.DATE_TIME); + } + + /** + * The events_count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional eventsCount() { + return Json.optional(json, "events_count", Conv.LONG); + } + + /** + * The company fields the monitor watches. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional watchedFields() { + return Json.optional(json, "watched_fields", Conv.ANY); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link RegistryMonitoring}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(RegistryMonitoring from) { + super(from); + } + + /** + * The uuid field. + * + * @param uuid the value + * @return this builder + */ + public Builder uuid(String uuid) { + return set("uuid", Conv.STRING, uuid); + } + + /** + * The status field. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * The unavailable_reason field. + * + * @param unavailableReason the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder unavailableReason(@Nullable String unavailableReason) { + return setNullable("unavailable_reason", Conv.STRING, unavailableReason); + } + + /** + * The enrolled_at field. + * + * @param enrolledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder enrolledAt(@Nullable OffsetDateTime enrolledAt) { + return setNullable("enrolled_at", Conv.DATE_TIME, enrolledAt); + } + + /** + * The cancelled_at field. + * + * @param cancelledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder cancelledAt(@Nullable OffsetDateTime cancelledAt) { + return setNullable("cancelled_at", Conv.DATE_TIME, cancelledAt); + } + + /** + * The last_bill_date field. + * + * @param lastBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastBillDate(@Nullable LocalDate lastBillDate) { + return setNullable("last_bill_date", Conv.DATE, lastBillDate); + } + + /** + * The next_bill_date field. + * + * @param nextBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nextBillDate(@Nullable LocalDate nextBillDate) { + return setNullable("next_bill_date", Conv.DATE, nextBillDate); + } + + /** + * The last_event_at field. + * + * @param lastEventAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastEventAt(@Nullable OffsetDateTime lastEventAt) { + return setNullable("last_event_at", Conv.DATE_TIME, lastEventAt); + } + + /** + * The events_count field. + * + * @param eventsCount the value + * @return this builder + */ + public Builder eventsCount(long eventsCount) { + return set("events_count", Conv.LONG, eventsCount); + } + + /** + * The company fields the monitor watches. + * + * @param watchedFields the value + * @return this builder + */ + public Builder watchedFields(@Nullable Object watchedFields) { + return setAny("watched_fields", watchedFields); + } + + /** + * Builds the value. + * + * @return a new immutable {@code RegistryMonitoring} + */ + public RegistryMonitoring build() { + return new RegistryMonitoring(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } } } diff --git a/src/main/java/me/didit/types/PhoneCheckCodeParams.java b/src/main/java/me/didit/types/PhoneCheckCodeParams.java index c4b9ae6..9e4f471 100644 --- a/src/main/java/me/didit/types/PhoneCheckCodeParams.java +++ b/src/main/java/me/didit/types/PhoneCheckCodeParams.java @@ -15,7 +15,7 @@ /** Parameters for {@code phone.check_code}. */ public final class PhoneCheckCodeParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("phone_number", "code", "duplicated_phone_number_action", "disposable_number_action", "voip_number_action", "enable_social", "phone_no_social_presence_action"); + private static final Set KNOWN_FIELDS = Set.of("phone_number", "code", "duplicated_phone_number_action", "disposable_number_action", "voip_number_action", "enable_enrichment", "phone_intelligence_score_action", "phone_type_risk_action", "recent_port_action", "low_phone_trust_action", "enable_social", "phone_no_social_presence_action"); private PhoneCheckCodeParams(ObjectNode json, Map> files) { super(json, files); @@ -100,6 +100,56 @@ public Optional voipNumberAction() { return Json.optional(json, "voip_number_action", Conv.enumeration(PhoneCheckCodeParams.VoipNumberAction::of)); } + /** + * When true, also run phone intelligence on the number: a risk score, the line type, whether it was recently ported and a trust index. Billed as one phone_intelligence_api unit per request ($0.05 at list price) in addition to this endpoint's own price. The request returns 403 when your balance cannot cover it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enableEnrichment() { + return Json.optional(json, "enable_enrichment", Conv.BOOLEAN); + } + + /** + * Action when the phone intelligence risk score is above the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneIntelligenceScoreAction() { + return Json.optional(json, "phone_intelligence_score_action", Conv.enumeration(PhoneCheckCodeParams.PhoneIntelligenceScoreAction::of)); + } + + /** + * Action when the number is a high-risk line type. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneTypeRiskAction() { + return Json.optional(json, "phone_type_risk_action", Conv.enumeration(PhoneCheckCodeParams.PhoneTypeRiskAction::of)); + } + + /** + * Action when the number was ported to another carrier recently. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional recentPortAction() { + return Json.optional(json, "recent_port_action", Conv.enumeration(PhoneCheckCodeParams.RecentPortAction::of)); + } + + /** + * Action when the phone intelligence trust index is at or below the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lowPhoneTrustAction() { + return Json.optional(json, "low_phone_trust_action", Conv.enumeration(PhoneCheckCodeParams.LowPhoneTrustAction::of)); + } + /** * When true, also look up the social footprint of the number - the messaging, social, e-commerce and professional platforms it is registered on. Billed as one phone_social unit per request in addition to this endpoint's own price. * @@ -183,6 +233,56 @@ public Builder voipNumberAction(PhoneCheckCodeParams.VoipNumberAction voipNumber return set("voip_number_action", Conv.enumeration(PhoneCheckCodeParams.VoipNumberAction::of), voipNumberAction); } + /** + * When true, also run phone intelligence on the number: a risk score, the line type, whether it was recently ported and a trust index. Billed as one phone_intelligence_api unit per request ($0.05 at list price) in addition to this endpoint's own price. The request returns 403 when your balance cannot cover it. + * + * @param enableEnrichment the value + * @return this builder + */ + public Builder enableEnrichment(boolean enableEnrichment) { + return set("enable_enrichment", Conv.BOOLEAN, enableEnrichment); + } + + /** + * Action when the phone intelligence risk score is above the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param phoneIntelligenceScoreAction the value + * @return this builder + */ + public Builder phoneIntelligenceScoreAction(PhoneCheckCodeParams.PhoneIntelligenceScoreAction phoneIntelligenceScoreAction) { + return set("phone_intelligence_score_action", Conv.enumeration(PhoneCheckCodeParams.PhoneIntelligenceScoreAction::of), phoneIntelligenceScoreAction); + } + + /** + * Action when the number is a high-risk line type. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param phoneTypeRiskAction the value + * @return this builder + */ + public Builder phoneTypeRiskAction(PhoneCheckCodeParams.PhoneTypeRiskAction phoneTypeRiskAction) { + return set("phone_type_risk_action", Conv.enumeration(PhoneCheckCodeParams.PhoneTypeRiskAction::of), phoneTypeRiskAction); + } + + /** + * Action when the number was ported to another carrier recently. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param recentPortAction the value + * @return this builder + */ + public Builder recentPortAction(PhoneCheckCodeParams.RecentPortAction recentPortAction) { + return set("recent_port_action", Conv.enumeration(PhoneCheckCodeParams.RecentPortAction::of), recentPortAction); + } + + /** + * Action when the phone intelligence trust index is at or below the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + * @param lowPhoneTrustAction the value + * @return this builder + */ + public Builder lowPhoneTrustAction(PhoneCheckCodeParams.LowPhoneTrustAction lowPhoneTrustAction) { + return set("low_phone_trust_action", Conv.enumeration(PhoneCheckCodeParams.LowPhoneTrustAction::of), lowPhoneTrustAction); + } + /** * When true, also look up the social footprint of the number - the messaging, social, e-commerce and professional platforms it is registered on. Billed as one phone_social unit per request in addition to this endpoint's own price. * @@ -350,6 +450,178 @@ public boolean isKnown() { } } + /** + * Action when the phone intelligence risk score is above the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class PhoneIntelligenceScoreAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final PhoneIntelligenceScoreAction NO_ACTION = new PhoneIntelligenceScoreAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final PhoneIntelligenceScoreAction DECLINE = new PhoneIntelligenceScoreAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private PhoneIntelligenceScoreAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static PhoneIntelligenceScoreAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, PhoneIntelligenceScoreAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Action when the number is a high-risk line type. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class PhoneTypeRiskAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final PhoneTypeRiskAction NO_ACTION = new PhoneTypeRiskAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final PhoneTypeRiskAction DECLINE = new PhoneTypeRiskAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private PhoneTypeRiskAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static PhoneTypeRiskAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, PhoneTypeRiskAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Action when the number was ported to another carrier recently. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class RecentPortAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final RecentPortAction NO_ACTION = new RecentPortAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final RecentPortAction DECLINE = new RecentPortAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private RecentPortAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static RecentPortAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, RecentPortAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Action when the phone intelligence trust index is at or below the threshold. DECLINE flips the final status to Declined; NO_ACTION records the signal without declining. Only takes effect when enable_enrichment is true. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class LowPhoneTrustAction extends StringEnum { + /** The value {@code "NO_ACTION"}. */ + public static final LowPhoneTrustAction NO_ACTION = new LowPhoneTrustAction("NO_ACTION"); + + /** The value {@code "DECLINE"}. */ + public static final LowPhoneTrustAction DECLINE = new LowPhoneTrustAction("DECLINE"); + + private static final List KNOWN_VALUES = List.of(NO_ACTION, DECLINE); + + private LowPhoneTrustAction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static LowPhoneTrustAction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, LowPhoneTrustAction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + /** * Action when the social footprint check finds the number registered on none of the platforms it covers. Only NO_ACTION and DECLINE are accepted on this endpoint; REVIEW is available on the workflow configuration key of the same name. * diff --git a/src/main/java/me/didit/types/PhoneIntelligence.java b/src/main/java/me/didit/types/PhoneIntelligence.java index 334d49c..6be5d4b 100644 --- a/src/main/java/me/didit/types/PhoneIntelligence.java +++ b/src/main/java/me/didit/types/PhoneIntelligence.java @@ -11,6 +11,7 @@ import me.didit.core.FileUpload; import me.didit.core.Json; import me.didit.core.JsonModel; +import me.didit.core.StringEnum; import org.jspecify.annotations.Nullable; /** @@ -133,13 +134,13 @@ public Optional carrierType() { } /** - * Machine-readable codes explaining the score. Values can grow over time, so do not reject unknown codes. + * Signals that explain the score, each with a stable Didit code, a direction, a message and an impact level. New codes can appear over time, so do not reject unknown codes. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> reasonCodes() { - return Json.optional(json, "reason_codes", Conv.list(Conv.STRING)); + public Optional> reasonCodes() { + return Json.optional(json, "reason_codes", Conv.list(Conv.model(PhoneIntelligence.ReasonCodes::fromJson))); } @Override @@ -236,13 +237,13 @@ public Builder carrierType(@Nullable String carrierType) { } /** - * Machine-readable codes explaining the score. Values can grow over time, so do not reject unknown codes. + * Signals that explain the score, each with a stable Didit code, a direction, a message and an impact level. New codes can appear over time, so do not reject unknown codes. * * @param reasonCodes the value * @return this builder */ - public Builder reasonCodes(List reasonCodes) { - return set("reason_codes", Conv.list(Conv.STRING), reasonCodes); + public Builder reasonCodes(List reasonCodes) { + return set("reason_codes", Conv.list(Conv.model(PhoneIntelligence.ReasonCodes::fromJson)), reasonCodes); } /** @@ -259,4 +260,212 @@ protected Builder self() { return this; } } + + public static final class ReasonCodes extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("code", "value", "direction", "message", "impact_level"); + + private ReasonCodes(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code ReasonCodes} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static ReasonCodes fromJson(JsonNode json) { + return new ReasonCodes(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Stable Didit identifier of the signal, for example IR-5AC67A32. Opaque: group and filter on it, do not parse it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional code() { + return Json.optional(json, "code", Conv.STRING); + } + + /** + * For a risk flag (for example voip, leaked, disposable, spam_trap), its value: a boolean, a level or a date. Null for a scored reason code. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional value() { + return Json.optional(json, "value", Conv.ANY); + } + + /** + * Whether the signal raised the risk or added trust. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional direction() { + return Json.optional(json, "direction", Conv.enumeration(PhoneIntelligence.ReasonCodes.Direction::of)); + } + + /** + * Human-readable explanation of the signal, in English. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional message() { + return Json.optional(json, "message", Conv.STRING); + } + + /** + * How strongly the signal moved the score, for example low, medium or high. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional impactLevel() { + return Json.optional(json, "impact_level", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link ReasonCodes}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(ReasonCodes from) { + super(from); + } + + /** + * Stable Didit identifier of the signal, for example IR-5AC67A32. Opaque: group and filter on it, do not parse it. + * + * @param code the value + * @return this builder + */ + public Builder code(String code) { + return set("code", Conv.STRING, code); + } + + /** + * For a risk flag (for example voip, leaked, disposable, spam_trap), its value: a boolean, a level or a date. Null for a scored reason code. + * + * @param value the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder value(@Nullable Object value) { + return setAny("value", value); + } + + /** + * Whether the signal raised the risk or added trust. + * + * @param direction the value + * @return this builder + */ + public Builder direction(PhoneIntelligence.ReasonCodes.Direction direction) { + return set("direction", Conv.enumeration(PhoneIntelligence.ReasonCodes.Direction::of), direction); + } + + /** + * Human-readable explanation of the signal, in English. + * + * @param message the value + * @return this builder + */ + public Builder message(String message) { + return set("message", Conv.STRING, message); + } + + /** + * How strongly the signal moved the score, for example low, medium or high. + * + * @param impactLevel the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder impactLevel(@Nullable String impactLevel) { + return setNullable("impact_level", Conv.STRING, impactLevel); + } + + /** + * Builds the value. + * + * @return a new immutable {@code ReasonCodes} + */ + public ReasonCodes build() { + return new ReasonCodes(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the signal raised the risk or added trust. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Direction extends StringEnum { + /** The value {@code "risk"}. */ + public static final Direction RISK = new Direction("risk"); + + /** The value {@code "trust"}. */ + public static final Direction TRUST = new Direction("trust"); + + private static final List KNOWN_VALUES = List.of(RISK, TRUST); + + private Direction(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Direction of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Direction::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } } diff --git a/src/main/java/me/didit/types/PhoneVerificationCheckResponse.java b/src/main/java/me/didit/types/PhoneVerificationCheckResponse.java index ebc3753..9b54ae3 100644 --- a/src/main/java/me/didit/types/PhoneVerificationCheckResponse.java +++ b/src/main/java/me/didit/types/PhoneVerificationCheckResponse.java @@ -272,7 +272,7 @@ public boolean isKnown() { * Full phone report. Present (non-null) only on finalized outcomes (Approved/Declined); null on Failed and absent on Expired or Not Found. */ public static final class Phone extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("status", "phone_number_prefix", "phone_number", "full_number", "country_code", "country_name", "carrier", "is_disposable", "is_virtual", "verification_method", "verification_attempts", "verified_at", "warnings", "lifecycle", "matches", "phone_social"); + private static final Set KNOWN_FIELDS = Set.of("status", "phone_number_prefix", "phone_number", "full_number", "country_code", "country_name", "carrier", "is_disposable", "is_virtual", "verification_method", "verification_attempts", "verified_at", "warnings", "lifecycle", "matches", "phone_social", "phone_intelligence"); private Phone(ObjectNode json, Map> files) { super(json, files); @@ -467,6 +467,16 @@ public Optional phoneSocial() { return Json.optional(json, "phone_social", Conv.model(PhoneSocialFootprint::fromJson)); } + /** + * Phone intelligence signals. Present only when enable_enrichment was true on the check. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneIntelligence() { + return Json.optional(json, "phone_intelligence", Conv.model(PhoneIntelligence::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -640,6 +650,16 @@ public Builder phoneSocial(@Nullable PhoneSocialFootprint phoneSocial) { return setNullable("phone_social", Conv.model(PhoneSocialFootprint::fromJson), phoneSocial); } + /** + * Phone intelligence signals. Present only when enable_enrichment was true on the check. + * + * @param phoneIntelligence the value + * @return this builder + */ + public Builder phoneIntelligence(PhoneIntelligence phoneIntelligence) { + return set("phone_intelligence", Conv.model(PhoneIntelligence::fromJson), phoneIntelligence); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/SessionDataUpdatedEvent.java b/src/main/java/me/didit/types/SessionDataUpdatedEvent.java index 99d6aa4..83a928c 100644 --- a/src/main/java/me/didit/types/SessionDataUpdatedEvent.java +++ b/src/main/java/me/didit/types/SessionDataUpdatedEvent.java @@ -144,7 +144,7 @@ public SessionWebhookEventData.Status status() { } /** - * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation, manual_webhook_recovery, kyb_registry_change or a console_* edit. + * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation (a status.updated resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on session_id and status), manual_webhook_recovery, kyb_registry_change, biometric_retention (a data.updated sent when the session's live biometric data is deleted on schedule) or a console_* edit such as console_registry_edit, console_key_people_skip or console_key_people_regenerate. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -347,7 +347,7 @@ public Builder status(SessionWebhookEventData.Status status) { } /** - * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation, manual_webhook_recovery, kyb_registry_change or a console_* edit. + * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation (a status.updated resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on session_id and status), manual_webhook_recovery, kyb_registry_change, biometric_retention (a data.updated sent when the session's live biometric data is deleted on schedule) or a console_* edit such as console_registry_edit, console_key_people_skip or console_key_people_regenerate. * * @param trigger the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionDecision.java b/src/main/java/me/didit/types/SessionDecision.java index 153e914..289caeb 100644 --- a/src/main/java/me/didit/types/SessionDecision.java +++ b/src/main/java/me/didit/types/SessionDecision.java @@ -17,7 +17,7 @@ import org.jspecify.annotations.Nullable; public final class SessionDecision extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("session_id", "session_kind", "shared_from_session", "session_number", "session_url", "status", "workflow_id", "features", "vendor_data", "metadata", "expected_details", "contact_details", "callback", "id_verifications", "nfc_skip_reason", "nfc_verifications", "liveness_checks", "face_matches", "phone_verifications", "email_verifications", "poa_verifications", "document_ai_documents", "questionnaire_responses", "bank_verifications", "signatures", "aml_screenings", "ip_analyses", "database_validations", "reviews", "created_at", "expires_at", "registry_checks", "key_people_checks", "document_verifications", "environment", "resubmissions", "biometric_consent", "investigator"); + private static final Set KNOWN_FIELDS = Set.of("session_id", "session_kind", "shared_from_session", "shared_from_session_number", "session_number", "session_url", "status", "status_override", "decision_trace", "linked_records", "workflow_id", "features", "vendor_data", "metadata", "expected_details", "contact_details", "callback", "id_verifications", "nfc_skip_reason", "nfc_verifications", "liveness_checks", "face_matches", "phone_verifications", "email_verifications", "poa_verifications", "document_ai_documents", "questionnaire_responses", "bank_verifications", "signatures", "aml_screenings", "ip_analyses", "geolocation_checks", "geolocation_attempts", "database_validations", "database_validation_not_performed_reason", "reviews", "assignee", "waiting_since", "sla_due_at", "created_at", "expires_at", "registry_checks", "key_people_checks", "document_verifications", "environment", "sandbox_scenario", "resubmissions", "biometric_consent", "investigator", "biometric_retention", "fraud_check", "full_session_video", "full_session_video_recorded_at"); private SessionDecision(ObjectNode json, Map> files) { super(json, files); @@ -82,6 +82,16 @@ public Optional sharedFromSession() { return Json.optional(json, "shared_from_session", Conv.STRING); } + /** + * session_number of the source session when this session was imported from another application of your organization. null otherwise. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sharedFromSessionNumber() { + return Json.optional(json, "shared_from_session_number", Conv.LONG); + } + /** * The number of the session. * @@ -112,6 +122,36 @@ public Optional status() { return Json.optional(json, "status", Conv.enumeration(SessionDecision.Status::of)); } + /** + * Present when a reviewer set status by hand. null when the status is the automatic one. Use it to tell a manual approval from an automatic one. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional statusOverride() { + return Json.optional(json, "status_override", Conv.model(SessionDecision.StatusOverride::fromJson)); + } + + /** + * How the status was reached: who set it and which warnings did. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional decisionTrace() { + return Json.optional(json, "decision_trace", Conv.model(SessionDecision.DecisionTrace::fromJson)); + } + + /** + * A summary of other records linked to the session. null when there is nothing to show, and for workflows that declare an age assurance standard. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional linkedRecords() { + return Json.optional(json, "linked_records", Conv.model(SessionDecision.LinkedRecords::fromJson)); + } + /** * Stable identifier of the workflow group that produced this session. Workflows are versioned — this value identifies the workflow itself, not the specific version. * @@ -123,7 +163,7 @@ public Optional workflowId() { } /** - * List of verification features configured for this session, as display names: ID_VERIFICATION, NFC, LIVENESS, FACE_MATCH, POA, PHONE, EMAIL_VERIFICATION, AML, IP_ANALYSIS, DATABASE_VALIDATION, QUESTIONNAIRE, AGE_ESTIMATION, FACE_SEARCH (Business Verification sessions use the KYB feature set: KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, AML, PHONE, EMAIL_VERIFICATION, IP_ANALYSIS, QUESTIONNAIRE). With include=events each entry becomes an object {feature, node_id} instead of a plain string, and the email feature is renamed: it appears as EMAIL in events mode instead of the EMAIL_VERIFICATION used here. + * List of verification features configured for this session, as display names: ID_VERIFICATION, NFC, LIVENESS, FACE_MATCH, POA, PHONE, EMAIL_VERIFICATION, AML, IP_ANALYSIS, DATABASE_VALIDATION, QUESTIONNAIRE, AGE_ESTIMATION, FACE_SEARCH, GEOLOCATION (Location verification) (Business Verification sessions use the KYB feature set: KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, AML, PHONE, EMAIL_VERIFICATION, IP_ANALYSIS, QUESTIONNAIRE). With include=events each entry becomes an object {feature, node_id} instead of a plain string, and the email feature is renamed: it appears as EMAIL in events mode instead of the EMAIL_VERIFICATION used here. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -283,7 +323,7 @@ public Optional> questionnaireRespo } /** - * Bank Verification results, one item per Bank Verification step, for User and Business Verification. null until a step produces one. Each item's method says how the account was verified: open_banking (bank sign-in) or account_lookup (account check), or a statement or microdeposits fallback, and none when the person continued without a bank before any attempt was evaluated (continued_without_bank). See [Bank verification methods](/core-technology/bank-verification/verification-methods). + * Bank Verification results, one item per Bank Verification step, for User and Business Verification. null until a step produces one. Each item's method says how the account was verified: open_banking (bank sign-in) or account_lookup (account check), or a statement or microdeposits fallback, and none when the person continued without a bank before any attempt was evaluated (continued_without_bank). See [Bank verification methods](/core-technology/bank-verification/verification-methods). Bank Verification is not enabled in production yet, so this stays null on production sessions until it is. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -293,7 +333,7 @@ public Optional> bankVerifications() { } /** - * Electronic Signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an Electronic Signature step; an empty array until a signer reaches it. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature). + * E-signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an E-signature step; an empty array until a signer reaches it. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature). * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -322,6 +362,26 @@ public Optional> ipAnalyses() { return Json.optional(json, "ip_analyses", Conv.list(Conv.model(SessionDecision.IpAnalyses::fromJson))); } + /** + * Array of Location verification results, one per Location verification step: that step's accepted attempt. null until a Location verification step has produced data. Earlier attempts of the same step are in geolocation_attempts. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> geolocationChecks() { + return Json.optional(json, "geolocation_checks", Conv.list(Conv.model(GeolocationCheck::fromJson))); + } + + /** + * Every attempt of every Location verification step of this session, oldest first. Attempts that a resubmission replaced are left out. A workflow that withholds geolocation_checks through its response attributes withholds this list too. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> geolocationAttempts() { + return Json.optional(json, "geolocation_attempts", Conv.list(Conv.model(GeolocationAttempt::fromJson))); + } + /** * Array of Database Validation reports — always a JSON array, never a singular database_validation object. null until at least one DB validation step has produced data. Each item is the full report, including node_id, feature-level status, screened_data, the per-service validations[] (each with its registry source_data), and warnings[]. The screened_data and source_data fields vary by country: * @@ -368,6 +428,16 @@ public Optional> databaseValidations() return Json.optional(json, "database_validations", Conv.list(Conv.model(SessionDecision.DatabaseValidations::fromJson))); } + /** + * Why a configured database validation produced no result, as {code, message} plus context fields. Present only when database_validations is null for a workflow that has the step, so you can tell "the registry agreed" from "nothing ran". null otherwise. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional databaseValidationNotPerformedReason() { + return Json.optional(json, "database_validation_not_performed_reason", Conv.model(SessionDecision.DatabaseValidationNotPerformedReason::fromJson)); + } + /** * The reviews field. * @@ -378,6 +448,36 @@ public Optional> reviews() { return Json.optional(json, "reviews", Conv.list(Conv.model(SessionDecision.Reviews::fromJson))); } + /** + * The Console reviewer the session is assigned to, or null when nobody holds it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional assignee() { + return Json.optional(json, "assignee", Conv.model(SessionDecision.Assignee::fromJson)); + } + + /** + * When the session started waiting for review. null unless the session is In Review and your application sets a review deadline. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional waitingSince() { + return Json.optional(json, "waiting_since", Conv.DATE_TIME); + } + + /** + * When the review is due. null unless the session is In Review and your application sets a review deadline. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional slaDueAt() { + return Json.optional(json, "sla_due_at", Conv.DATE_TIME); + } + /** * Timestamp at which the session was created (ISO 8601, UTC). * @@ -438,6 +538,16 @@ public Optional environment() { return Json.optional(json, "environment", Conv.enumeration(SessionDecision.Environment::of)); } + /** + * The sandbox scenario the session was created with. null for live sessions and for sandbox sessions created without one. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sandboxScenario() { + return Json.optional(json, "sandbox_scenario", Conv.STRING); + } + /** * Returned only with include=resubmissions, for user and business sessions. One entry per resubmission request, oldest first. Each entry carries the results the resubmitted steps returned before the request, so earlier submissions stay readable. Deleting the session deletes every submission. * @@ -468,6 +578,46 @@ public Optional investigator() { return Json.optional(json, "investigator", Conv.model(InvestigatorBlock::fromJson)); } + /** + * When the live biometric data of this session is deleted. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional biometricRetention() { + return Json.optional(json, "biometric_retention", Conv.model(BiometricRetention::fromJson)); + } + + /** + * The result of a Fraud Check API call. null for every other session. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> fraudCheck() { + return Json.optional(json, "fraud_check", Conv.OBJECT); + } + + /** + * Expiring URL of the full-session recording. Returned only when your organization records full-session video. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullSessionVideo() { + return Json.optional(json, "full_session_video", Conv.STRING); + } + + /** + * When the full-session recording was made. Returned only when your organization records full-session video. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullSessionVideoRecordedAt() { + return Json.optional(json, "full_session_video_recorded_at", Conv.DATE_TIME); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -511,6 +661,16 @@ public Builder sharedFromSession(@Nullable String sharedFromSession) { return setNullable("shared_from_session", Conv.STRING, sharedFromSession); } + /** + * session_number of the source session when this session was imported from another application of your organization. null otherwise. + * + * @param sharedFromSessionNumber the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sharedFromSessionNumber(@Nullable Long sharedFromSessionNumber) { + return setNullable("shared_from_session_number", Conv.LONG, sharedFromSessionNumber); + } + /** * The number of the session. * @@ -541,6 +701,36 @@ public Builder status(SessionDecision.Status status) { return set("status", Conv.enumeration(SessionDecision.Status::of), status); } + /** + * Present when a reviewer set status by hand. null when the status is the automatic one. Use it to tell a manual approval from an automatic one. + * + * @param statusOverride the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder statusOverride(SessionDecision.@Nullable StatusOverride statusOverride) { + return setNullable("status_override", Conv.model(SessionDecision.StatusOverride::fromJson), statusOverride); + } + + /** + * How the status was reached: who set it and which warnings did. + * + * @param decisionTrace the value + * @return this builder + */ + public Builder decisionTrace(SessionDecision.DecisionTrace decisionTrace) { + return set("decision_trace", Conv.model(SessionDecision.DecisionTrace::fromJson), decisionTrace); + } + + /** + * A summary of other records linked to the session. null when there is nothing to show, and for workflows that declare an age assurance standard. + * + * @param linkedRecords the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder linkedRecords(SessionDecision.@Nullable LinkedRecords linkedRecords) { + return setNullable("linked_records", Conv.model(SessionDecision.LinkedRecords::fromJson), linkedRecords); + } + /** * Stable identifier of the workflow group that produced this session. Workflows are versioned — this value identifies the workflow itself, not the specific version. * @@ -552,7 +742,7 @@ public Builder workflowId(@Nullable String workflowId) { } /** - * List of verification features configured for this session, as display names: ID_VERIFICATION, NFC, LIVENESS, FACE_MATCH, POA, PHONE, EMAIL_VERIFICATION, AML, IP_ANALYSIS, DATABASE_VALIDATION, QUESTIONNAIRE, AGE_ESTIMATION, FACE_SEARCH (Business Verification sessions use the KYB feature set: KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, AML, PHONE, EMAIL_VERIFICATION, IP_ANALYSIS, QUESTIONNAIRE). With include=events each entry becomes an object {feature, node_id} instead of a plain string, and the email feature is renamed: it appears as EMAIL in events mode instead of the EMAIL_VERIFICATION used here. + * List of verification features configured for this session, as display names: ID_VERIFICATION, NFC, LIVENESS, FACE_MATCH, POA, PHONE, EMAIL_VERIFICATION, AML, IP_ANALYSIS, DATABASE_VALIDATION, QUESTIONNAIRE, AGE_ESTIMATION, FACE_SEARCH, GEOLOCATION (Location verification) (Business Verification sessions use the KYB feature set: KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, AML, PHONE, EMAIL_VERIFICATION, IP_ANALYSIS, QUESTIONNAIRE). With include=events each entry becomes an object {feature, node_id} instead of a plain string, and the email feature is renamed: it appears as EMAIL in events mode instead of the EMAIL_VERIFICATION used here. * * @param features the value * @return this builder @@ -712,7 +902,7 @@ public Builder questionnaireResponses(@Nullable Listnull until a step produces one. Each item's method says how the account was verified: open_banking (bank sign-in) or account_lookup (account check), or a statement or microdeposits fallback, and none when the person continued without a bank before any attempt was evaluated (continued_without_bank). See [Bank verification methods](/core-technology/bank-verification/verification-methods). + * Bank Verification results, one item per Bank Verification step, for User and Business Verification. null until a step produces one. Each item's method says how the account was verified: open_banking (bank sign-in) or account_lookup (account check), or a statement or microdeposits fallback, and none when the person continued without a bank before any attempt was evaluated (continued_without_bank). See [Bank verification methods](/core-technology/bank-verification/verification-methods). Bank Verification is not enabled in production yet, so this stays null on production sessions until it is. * * @param bankVerifications the value, or {@code null} to send JSON null * @return this builder @@ -722,7 +912,7 @@ public Builder bankVerifications(@Nullable List bankVeri } /** - * Electronic Signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an Electronic Signature step; an empty array until a signer reaches it. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature). + * E-signature results, one item per signer and signature step, for User and Business Verification. Present only when the workflow has an E-signature step; an empty array until a signer reaches it. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature). * * @param signatures the value * @return this builder @@ -751,6 +941,26 @@ public Builder ipAnalyses(@Nullable List ipAnalyses) return setNullable("ip_analyses", Conv.list(Conv.model(SessionDecision.IpAnalyses::fromJson)), ipAnalyses); } + /** + * Array of Location verification results, one per Location verification step: that step's accepted attempt. null until a Location verification step has produced data. Earlier attempts of the same step are in geolocation_attempts. + * + * @param geolocationChecks the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder geolocationChecks(@Nullable List geolocationChecks) { + return setNullable("geolocation_checks", Conv.list(Conv.model(GeolocationCheck::fromJson)), geolocationChecks); + } + + /** + * Every attempt of every Location verification step of this session, oldest first. Attempts that a resubmission replaced are left out. A workflow that withholds geolocation_checks through its response attributes withholds this list too. + * + * @param geolocationAttempts the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder geolocationAttempts(@Nullable List geolocationAttempts) { + return setNullable("geolocation_attempts", Conv.list(Conv.model(GeolocationAttempt::fromJson)), geolocationAttempts); + } + /** * Array of Database Validation reports — always a JSON array, never a singular database_validation object. null until at least one DB validation step has produced data. Each item is the full report, including node_id, feature-level status, screened_data, the per-service validations[] (each with its registry source_data), and warnings[]. The screened_data and source_data fields vary by country: * @@ -797,6 +1007,16 @@ public Builder databaseValidations(@Nullable List{code, message} plus context fields. Present only when database_validations is null for a workflow that has the step, so you can tell "the registry agreed" from "nothing ran". null otherwise. + * + * @param databaseValidationNotPerformedReason the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder databaseValidationNotPerformedReason(SessionDecision.@Nullable DatabaseValidationNotPerformedReason databaseValidationNotPerformedReason) { + return setNullable("database_validation_not_performed_reason", Conv.model(SessionDecision.DatabaseValidationNotPerformedReason::fromJson), databaseValidationNotPerformedReason); + } + /** * The reviews field. * @@ -807,6 +1027,36 @@ public Builder reviews(List reviews) { return set("reviews", Conv.list(Conv.model(SessionDecision.Reviews::fromJson)), reviews); } + /** + * The Console reviewer the session is assigned to, or null when nobody holds it. + * + * @param assignee the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder assignee(SessionDecision.@Nullable Assignee assignee) { + return setNullable("assignee", Conv.model(SessionDecision.Assignee::fromJson), assignee); + } + + /** + * When the session started waiting for review. null unless the session is In Review and your application sets a review deadline. + * + * @param waitingSince the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder waitingSince(@Nullable OffsetDateTime waitingSince) { + return setNullable("waiting_since", Conv.DATE_TIME, waitingSince); + } + + /** + * When the review is due. null unless the session is In Review and your application sets a review deadline. + * + * @param slaDueAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder slaDueAt(@Nullable OffsetDateTime slaDueAt) { + return setNullable("sla_due_at", Conv.DATE_TIME, slaDueAt); + } + /** * Timestamp at which the session was created (ISO 8601, UTC). * @@ -867,6 +1117,16 @@ public Builder environment(SessionDecision.Environment environment) { return set("environment", Conv.enumeration(SessionDecision.Environment::of), environment); } + /** + * The sandbox scenario the session was created with. null for live sessions and for sandbox sessions created without one. + * + * @param sandboxScenario the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sandboxScenario(@Nullable String sandboxScenario) { + return setNullable("sandbox_scenario", Conv.STRING, sandboxScenario); + } + /** * Returned only with include=resubmissions, for user and business sessions. One entry per resubmission request, oldest first. Each entry carries the results the resubmitted steps returned before the request, so earlier submissions stay readable. Deleting the session deletes every submission. * @@ -897,6 +1157,46 @@ public Builder investigator(@Nullable InvestigatorBlock investigator) { return setNullable("investigator", Conv.model(InvestigatorBlock::fromJson), investigator); } + /** + * When the live biometric data of this session is deleted. + * + * @param biometricRetention the value + * @return this builder + */ + public Builder biometricRetention(BiometricRetention biometricRetention) { + return set("biometric_retention", Conv.model(BiometricRetention::fromJson), biometricRetention); + } + + /** + * The result of a Fraud Check API call. null for every other session. + * + * @param fraudCheck the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder fraudCheck(@Nullable Map fraudCheck) { + return setAny("fraud_check", fraudCheck); + } + + /** + * Expiring URL of the full-session recording. Returned only when your organization records full-session video. + * + * @param fullSessionVideo the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder fullSessionVideo(@Nullable String fullSessionVideo) { + return setNullable("full_session_video", Conv.STRING, fullSessionVideo); + } + + /** + * When the full-session recording was made. Returned only when your organization records full-session video. + * + * @param fullSessionVideoRecordedAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder fullSessionVideoRecordedAt(@Nullable OffsetDateTime fullSessionVideoRecordedAt) { + return setNullable("full_session_video_recorded_at", Conv.DATE_TIME, fullSessionVideoRecordedAt); + } + /** * Builds the value. * @@ -1023,24 +1323,24 @@ public boolean isKnown() { } /** - * Expected details supplied at session creation — used for cross-validation against extracted data (KYC) or to pre-fill the company registry search (KYB). Echoes back exactly the keys that were provided; null when none were supplied. KYC sessions carry the person fields; Business (KYB) sessions carry company_name, registry_country and registration_number. + * Present when a reviewer set status by hand. null when the status is the automatic one. Use it to tell a manual approval from an automatic one. */ - public static final class ExpectedDetails extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("first_name", "last_name", "date_of_birth", "gender", "nationality", "country", "address", "identification_number", "ip_address", "expected_document_types", "id_country", "poa_country", "company_name", "registry_country", "registration_number"); + public static final class StatusOverride extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("overridden_at", "automatic_status"); - private ExpectedDetails(ObjectNode json, Map> files) { + private StatusOverride(ObjectNode json, Map> files) { super(json, files); } /** - * Reads a {@code ExpectedDetails} from JSON. Unknown fields are kept and readable + * Reads a {@code StatusOverride} from JSON. Unknown fields are kept and readable * through {@link #_additionalProperties()}. * * @param json a JSON object * @return the parsed value */ - public static ExpectedDetails fromJson(JsonNode json) { - return new ExpectedDetails(Json.copyObject(json), Map.of()); + public static StatusOverride fromJson(JsonNode json) { + return new StatusOverride(Json.copyObject(json), Map.of()); } /** @@ -1062,153 +1362,189 @@ public Builder toBuilder() { } /** - * User's first name. For example, John. + * The overridden_at field. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional firstName() { - return Json.optional(json, "first_name", Conv.STRING); + public Optional overriddenAt() { + return Json.optional(json, "overridden_at", Conv.DATE_TIME); } /** - * User's last name. For example, Doe. + * The status the platform's own checks conclude. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional lastName() { - return Json.optional(json, "last_name", Conv.STRING); + public Optional automaticStatus() { + return Json.optional(json, "automatic_status", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link StatusOverride}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(StatusOverride from) { + super(from); + } + + /** + * The overridden_at field. + * + * @param overriddenAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder overriddenAt(@Nullable OffsetDateTime overriddenAt) { + return setNullable("overridden_at", Conv.DATE_TIME, overriddenAt); + } + + /** + * The status the platform's own checks conclude. + * + * @param automaticStatus the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder automaticStatus(@Nullable String automaticStatus) { + return setNullable("automatic_status", Conv.STRING, automaticStatus); + } + + /** + * Builds the value. + * + * @return a new immutable {@code StatusOverride} + */ + public StatusOverride build() { + return new StatusOverride(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + /** How the status was reached: who set it and which warnings did. */ + public static final class DecisionTrace extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("status", "decided_by", "decided_at", "automatic_status", "terminal_node_id", "actor", "warning_counts", "status_warnings"); + + private DecisionTrace(ObjectNode json, Map> files) { + super(json, files); } /** - * User's date of birth with format: YYYY-MM-DD. For example, 1990-05-15. + * Reads a {@code DecisionTrace} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. * - * @return the value, or empty when the field is absent or null - * @throws me.didit.errors.UnexpectedResponseException when the field has another type + * @param json a JSON object + * @return the parsed value */ - public Optional dateOfBirth() { - return Json.optional(json, "date_of_birth", Conv.DATE); + public static DecisionTrace fromJson(JsonNode json) { + return new DecisionTrace(Json.copyObject(json), Map.of()); } /** - * User's gender. Must be either 'M', 'F', or null. - * - * @return the value, or empty when the field is absent or null - * @throws me.didit.errors.UnexpectedResponseException when the field has another type - */ - public Optional gender() { - return Json.optional(json, "gender", Conv.enumeration(SessionDecision.ExpectedDetails.Gender::of)); - } - - /** - * ISO 3166-1 alpha-3 country code representing the applicant's country of origin. For example, USA. - * - * @return the value, or empty when the field is absent or null - * @throws me.didit.errors.UnexpectedResponseException when the field has another type - */ - public Optional nationality() { - return Json.optional(json, "nationality", Conv.STRING); - } - - /** - * ISO 3166-1 alpha-3 country code representing the country of the Proof of Address document, or the country of the applicant's ID document, which may differ from nationality. For example, GBR. + * Returns an empty builder. * - * @return the value, or empty when the field is absent or null - * @throws me.didit.errors.UnexpectedResponseException when the field has another type + * @return a new builder */ - public Optional country() { - return Json.optional(json, "country", Conv.STRING); + public static Builder builder() { + return new Builder(); } /** - * The address in a human readable format, including as much information as possible. For example, 123 Main St, San Francisco, CA 94105, USA. + * Returns a builder holding a copy of every field of this value. * - * @return the value, or empty when the field is absent or null - * @throws me.didit.errors.UnexpectedResponseException when the field has another type + * @return a new builder */ - public Optional address() { - return Json.optional(json, "address", Conv.STRING); + public Builder toBuilder() { + return new Builder(this); } /** - * The user's document number, personal number, or tax number. For example, 123456789. + * The session status. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional identificationNumber() { - return Json.optional(json, "identification_number", Conv.STRING); + public Optional status() { + return Json.optional(json, "status", Conv.STRING); } /** - * Expected IP address for the session. If the actual IP address differs from this value, a warning will be logged. For example, 192.168.1.100. + * Who set the status. null while the session is not decided. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional ipAddress() { - return Json.optional(json, "ip_address", Conv.STRING); + public Optional decidedBy() { + return Json.optional(json, "decided_by", Conv.enumeration(SessionDecision.DecisionTrace.DecidedBy::of)); } /** - * Document types the ID verification step was restricted to at session creation. Empty/unset means no restriction. Codes: P (passport), ID (national ID), DL (driver's license), RP (residence permit), HIC (health insurance card), TC (tax card), SSC (social security card). + * The decided_at field. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> expectedDocumentTypes() { - return Json.optional(json, "expected_document_types", Conv.list(Conv.enumeration(SessionDecision.ExpectedDetails.ExpectedDocumentTypes::of))); + public Optional decidedAt() { + return Json.optional(json, "decided_at", Conv.DATE_TIME); } /** - * Expected ID-document issuing country (ISO 3166-1 alpha-3), when restricted at creation time. + * What the platform's own checks conclude, which differs from status after a manual decision. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional idCountry() { - return Json.optional(json, "id_country", Conv.STRING); + public Optional automaticStatus() { + return Json.optional(json, "automatic_status", Conv.STRING); } /** - * Expected Proof of Address document country (ISO 3166-1 alpha-3), when restricted at creation time. + * The workflow status node that ended the session, when one did. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional poaCountry() { - return Json.optional(json, "poa_country", Conv.STRING); + public Optional terminalNodeId() { + return Json.optional(json, "terminal_node_id", Conv.STRING); } /** - * Expected legal name of the business. Business (KYB) sessions only. + * The reviewer behind a manual decision. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional companyName() { - return Json.optional(json, "company_name", Conv.STRING); + public Optional actor() { + return Json.optional(json, "actor", Conv.model(SessionDecision.DecisionTrace.Actor::fromJson)); } /** - * Expected registry country as XX or XX-YY (ISO 3166-1 alpha-2, optionally with an ISO 3166-2 subdivision for state-level registries, e.g. US-CA). Business (KYB) sessions only. + * Warnings per log_type (error, warning, information) and total. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional registryCountry() { - return Json.optional(json, "registry_country", Conv.STRING); + public Optional> warningCounts() { + return Json.optional(json, "warning_counts", Conv.map(Conv.LONG)); } /** - * Expected company registration number. Business (KYB) sessions only. + * The warnings that set a Declined or In Review status. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional registrationNumber() { - return Json.optional(json, "registration_number", Conv.STRING); + public Optional> statusWarnings() { + return Json.optional(json, "status_warnings", Conv.list(Conv.model(SessionDecision.DecisionTrace.StatusWarnings::fromJson))); } @Override @@ -1216,171 +1552,101 @@ protected Set knownFields() { return KNOWN_FIELDS; } - /** Builds a {@link ExpectedDetails}. */ + /** Builds a {@link DecisionTrace}. */ public static final class Builder extends JsonModel.BaseBuilder { private Builder() {} - private Builder(ExpectedDetails from) { + private Builder(DecisionTrace from) { super(from); } /** - * User's first name. For example, John. - * - * @param firstName the value - * @return this builder - */ - public Builder firstName(String firstName) { - return set("first_name", Conv.STRING, firstName); - } - - /** - * User's last name. For example, Doe. - * - * @param lastName the value - * @return this builder - */ - public Builder lastName(String lastName) { - return set("last_name", Conv.STRING, lastName); - } - - /** - * User's date of birth with format: YYYY-MM-DD. For example, 1990-05-15. - * - * @param dateOfBirth the value - * @return this builder - */ - public Builder dateOfBirth(LocalDate dateOfBirth) { - return set("date_of_birth", Conv.DATE, dateOfBirth); - } - - /** - * User's gender. Must be either 'M', 'F', or null. - * - * @param gender the value, or {@code null} to send JSON null - * @return this builder - */ - public Builder gender(SessionDecision.ExpectedDetails.@Nullable Gender gender) { - return setNullable("gender", Conv.enumeration(SessionDecision.ExpectedDetails.Gender::of), gender); - } - - /** - * ISO 3166-1 alpha-3 country code representing the applicant's country of origin. For example, USA. - * - * @param nationality the value - * @return this builder - */ - public Builder nationality(String nationality) { - return set("nationality", Conv.STRING, nationality); - } - - /** - * ISO 3166-1 alpha-3 country code representing the country of the Proof of Address document, or the country of the applicant's ID document, which may differ from nationality. For example, GBR. - * - * @param country the value - * @return this builder - */ - public Builder country(String country) { - return set("country", Conv.STRING, country); - } - - /** - * The address in a human readable format, including as much information as possible. For example, 123 Main St, San Francisco, CA 94105, USA. - * - * @param address the value - * @return this builder - */ - public Builder address(String address) { - return set("address", Conv.STRING, address); - } - - /** - * The user's document number, personal number, or tax number. For example, 123456789. + * The session status. * - * @param identificationNumber the value + * @param status the value * @return this builder */ - public Builder identificationNumber(String identificationNumber) { - return set("identification_number", Conv.STRING, identificationNumber); + public Builder status(String status) { + return set("status", Conv.STRING, status); } /** - * Expected IP address for the session. If the actual IP address differs from this value, a warning will be logged. For example, 192.168.1.100. + * Who set the status. null while the session is not decided. * - * @param ipAddress the value + * @param decidedBy the value, or {@code null} to send JSON null * @return this builder */ - public Builder ipAddress(String ipAddress) { - return set("ip_address", Conv.STRING, ipAddress); + public Builder decidedBy(SessionDecision.DecisionTrace.@Nullable DecidedBy decidedBy) { + return setNullable("decided_by", Conv.enumeration(SessionDecision.DecisionTrace.DecidedBy::of), decidedBy); } /** - * Document types the ID verification step was restricted to at session creation. Empty/unset means no restriction. Codes: P (passport), ID (national ID), DL (driver's license), RP (residence permit), HIC (health insurance card), TC (tax card), SSC (social security card). + * The decided_at field. * - * @param expectedDocumentTypes the value + * @param decidedAt the value, or {@code null} to send JSON null * @return this builder */ - public Builder expectedDocumentTypes(List expectedDocumentTypes) { - return set("expected_document_types", Conv.list(Conv.enumeration(SessionDecision.ExpectedDetails.ExpectedDocumentTypes::of)), expectedDocumentTypes); + public Builder decidedAt(@Nullable OffsetDateTime decidedAt) { + return setNullable("decided_at", Conv.DATE_TIME, decidedAt); } /** - * Expected ID-document issuing country (ISO 3166-1 alpha-3), when restricted at creation time. + * What the platform's own checks conclude, which differs from status after a manual decision. * - * @param idCountry the value, or {@code null} to send JSON null + * @param automaticStatus the value, or {@code null} to send JSON null * @return this builder */ - public Builder idCountry(@Nullable String idCountry) { - return setNullable("id_country", Conv.STRING, idCountry); + public Builder automaticStatus(@Nullable String automaticStatus) { + return setNullable("automatic_status", Conv.STRING, automaticStatus); } /** - * Expected Proof of Address document country (ISO 3166-1 alpha-3), when restricted at creation time. + * The workflow status node that ended the session, when one did. * - * @param poaCountry the value, or {@code null} to send JSON null + * @param terminalNodeId the value, or {@code null} to send JSON null * @return this builder */ - public Builder poaCountry(@Nullable String poaCountry) { - return setNullable("poa_country", Conv.STRING, poaCountry); + public Builder terminalNodeId(@Nullable String terminalNodeId) { + return setNullable("terminal_node_id", Conv.STRING, terminalNodeId); } /** - * Expected legal name of the business. Business (KYB) sessions only. + * The reviewer behind a manual decision. * - * @param companyName the value + * @param actor the value, or {@code null} to send JSON null * @return this builder */ - public Builder companyName(String companyName) { - return set("company_name", Conv.STRING, companyName); + public Builder actor(SessionDecision.DecisionTrace.@Nullable Actor actor) { + return setNullable("actor", Conv.model(SessionDecision.DecisionTrace.Actor::fromJson), actor); } /** - * Expected registry country as XX or XX-YY (ISO 3166-1 alpha-2, optionally with an ISO 3166-2 subdivision for state-level registries, e.g. US-CA). Business (KYB) sessions only. + * Warnings per log_type (error, warning, information) and total. * - * @param registryCountry the value + * @param warningCounts the value * @return this builder */ - public Builder registryCountry(String registryCountry) { - return set("registry_country", Conv.STRING, registryCountry); + public Builder warningCounts(Map warningCounts) { + return set("warning_counts", Conv.map(Conv.LONG), warningCounts); } /** - * Expected company registration number. Business (KYB) sessions only. + * The warnings that set a Declined or In Review status. * - * @param registrationNumber the value + * @param statusWarnings the value * @return this builder */ - public Builder registrationNumber(String registrationNumber) { - return set("registration_number", Conv.STRING, registrationNumber); + public Builder statusWarnings(List statusWarnings) { + return set("status_warnings", Conv.list(Conv.model(SessionDecision.DecisionTrace.StatusWarnings::fromJson)), statusWarnings); } /** * Builds the value. * - * @return a new immutable {@code ExpectedDetails} + * @return a new immutable {@code DecisionTrace} */ - public ExpectedDetails build() { - return new ExpectedDetails(buildJson(), buildFiles()); + public DecisionTrace build() { + return new DecisionTrace(buildJson(), buildFiles()); } @Override @@ -1390,20 +1656,23 @@ protected Builder self() { } /** - * User's gender. Must be either 'M', 'F', or null. + * Who set the status. null while the session is not decided. * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ - public static final class Gender extends StringEnum { - /** The value {@code "M"}. */ - public static final Gender M = new Gender("M"); + public static final class DecidedBy extends StringEnum { + /** The value {@code "manual"}. */ + public static final DecidedBy MANUAL = new DecidedBy("manual"); - /** The value {@code "F"}. */ - public static final Gender F = new Gender("F"); + /** The value {@code "automatic"}. */ + public static final DecidedBy AUTOMATIC = new DecidedBy("automatic"); - private static final List KNOWN_VALUES = List.of(M, F); + /** The value {@code "investigator"}. */ + public static final DecidedBy INVESTIGATOR = new DecidedBy("investigator"); - private Gender(String value) { + private static final List KNOWN_VALUES = List.of(MANUAL, AUTOMATIC, INVESTIGATOR); + + private DecidedBy(String value) { super(value); } @@ -1413,8 +1682,8 @@ private Gender(String value) { * @param value the string value * @return the enum value */ - public static Gender of(String value) { - return StringEnum.lookup(KNOWN_VALUES, value, Gender::new); + public static DecidedBy of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, DecidedBy::new); } /** @@ -1422,7 +1691,7 @@ public static Gender of(String value) { * * @return the known values */ - public static List knownValues() { + public static List knownValues() { return KNOWN_VALUES; } @@ -1432,83 +1701,337 @@ public boolean isKnown() { } } - /** - * - *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. - */ - public static final class ExpectedDocumentTypes extends StringEnum { - /** The value {@code "P"}. */ - public static final ExpectedDocumentTypes P = new ExpectedDocumentTypes("P"); - - /** The value {@code "ID"}. */ - public static final ExpectedDocumentTypes ID = new ExpectedDocumentTypes("ID"); - - /** The value {@code "DL"}. */ - public static final ExpectedDocumentTypes DL = new ExpectedDocumentTypes("DL"); - - /** The value {@code "RP"}. */ - public static final ExpectedDocumentTypes RP = new ExpectedDocumentTypes("RP"); - - /** The value {@code "HIC"}. */ - public static final ExpectedDocumentTypes HIC = new ExpectedDocumentTypes("HIC"); + /** The reviewer behind a manual decision. */ + public static final class Actor extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("user", "actor_type"); - /** The value {@code "TC"}. */ - public static final ExpectedDocumentTypes TC = new ExpectedDocumentTypes("TC"); + private Actor(ObjectNode json, Map> files) { + super(json, files); + } - /** The value {@code "SSC"}. */ - public static final ExpectedDocumentTypes SSC = new ExpectedDocumentTypes("SSC"); + /** + * Reads a {@code Actor} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Actor fromJson(JsonNode json) { + return new Actor(Json.copyObject(json), Map.of()); + } - private static final List KNOWN_VALUES = List.of(P, ID, DL, RP, HIC, TC, SSC); + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } - private ExpectedDocumentTypes(String value) { - super(value); + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); } /** - * Returns the constant for a known value, or a new instance for any other value. + * The user field. * - * @param value the string value - * @return the enum value + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public static ExpectedDocumentTypes of(String value) { - return StringEnum.lookup(KNOWN_VALUES, value, ExpectedDocumentTypes::new); + public Optional user() { + return Json.optional(json, "user", Conv.STRING); } /** - * Returns the values known to this SDK version. + * The actor_type field. * - * @return the known values + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public static List knownValues() { - return KNOWN_VALUES; + public Optional actorType() { + return Json.optional(json, "actor_type", Conv.STRING); } @Override - public boolean isKnown() { - return KNOWN_VALUES.contains(this); + protected Set knownFields() { + return KNOWN_FIELDS; } - } - } - /** - * Contact details supplied when the session was created (used for notification emails, prefilled phone/email verification, and communication language). null when neither an email nor a phone number was provided. + /** Builds a {@link Actor}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Actor from) { + super(from); + } + + /** + * The user field. + * + * @param user the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder user(@Nullable String user) { + return setNullable("user", Conv.STRING, user); + } + + /** + * The actor_type field. + * + * @param actorType the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder actorType(@Nullable String actorType) { + return setNullable("actor_type", Conv.STRING, actorType); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Actor} + */ + public Actor build() { + return new Actor(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + public static final class StatusWarnings extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("risk", "feature", "node_id", "log_type", "check_status", "source", "short_description"); + + private StatusWarnings(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code StatusWarnings} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static StatusWarnings fromJson(JsonNode json) { + return new StatusWarnings(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The risk field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional risk() { + return Json.optional(json, "risk", Conv.STRING); + } + + /** + * The feature field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional feature() { + return Json.optional(json, "feature", Conv.STRING); + } + + /** + * The node_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * The log_type field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional logType() { + return Json.optional(json, "log_type", Conv.STRING); + } + + /** + * The check_status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional checkStatus() { + return Json.optional(json, "check_status", Conv.STRING); + } + + /** + * The payload list the warning came from, for example id_verifications. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional source() { + return Json.optional(json, "source", Conv.STRING); + } + + /** + * The short_description field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional shortDescription() { + return Json.optional(json, "short_description", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link StatusWarnings}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(StatusWarnings from) { + super(from); + } + + /** + * The risk field. + * + * @param risk the value + * @return this builder + */ + public Builder risk(String risk) { + return set("risk", Conv.STRING, risk); + } + + /** + * The feature field. + * + * @param feature the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder feature(@Nullable String feature) { + return setNullable("feature", Conv.STRING, feature); + } + + /** + * The node_id field. + * + * @param nodeId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nodeId(@Nullable String nodeId) { + return setNullable("node_id", Conv.STRING, nodeId); + } + + /** + * The log_type field. + * + * @param logType the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder logType(@Nullable String logType) { + return setNullable("log_type", Conv.STRING, logType); + } + + /** + * The check_status field. + * + * @param checkStatus the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder checkStatus(@Nullable String checkStatus) { + return setNullable("check_status", Conv.STRING, checkStatus); + } + + /** + * The payload list the warning came from, for example id_verifications. + * + * @param source the value + * @return this builder + */ + public Builder source(String source) { + return set("source", Conv.STRING, source); + } + + /** + * The short_description field. + * + * @param shortDescription the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder shortDescription(@Nullable String shortDescription) { + return setNullable("short_description", Conv.STRING, shortDescription); + } + + /** + * Builds the value. + * + * @return a new immutable {@code StatusWarnings} + */ + public StatusWarnings build() { + return new StatusWarnings(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + } + + /** + * A summary of other records linked to the session. null when there is nothing to show, and for workflows that declare an age assurance standard. */ - public static final class ContactDetails extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("email", "email_lang", "send_notification_emails", "phone"); + public static final class LinkedRecords extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("same_face", "earlier_verifications", "networks"); - private ContactDetails(ObjectNode json, Map> files) { + private LinkedRecords(ObjectNode json, Map> files) { super(json, files); } /** - * Reads a {@code ContactDetails} from JSON. Unknown fields are kept and readable + * Reads a {@code LinkedRecords} from JSON. Unknown fields are kept and readable * through {@link #_additionalProperties()}. * * @param json a JSON object * @return the parsed value */ - public static ContactDetails fromJson(JsonNode json) { - return new ContactDetails(Json.copyObject(json), Map.of()); + public static LinkedRecords fromJson(JsonNode json) { + return new LinkedRecords(Json.copyObject(json), Map.of()); } /** @@ -1530,43 +2053,33 @@ public Builder toBuilder() { } /** - * Email address of the user (e.g., "john.doe@example.com") that will be used during the Email Verification step. If not provided, the user must provide it during the verification flow. - * - * @return the value, or empty when the field is absent or null - * @throws me.didit.errors.UnexpectedResponseException when the field has another type - */ - public Optional email() { - return Json.optional(json, "email", Conv.STRING); - } - - /** - * Language code (ISO 639-1) for email notifications. Controls the language of all email communications (e.g., "en", "es", "fr"). + * Other people whose face matched one of this session's face searches. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional emailLang() { - return Json.optional(json, "email_lang", Conv.STRING); + public Optional sameFace() { + return Json.optional(json, "same_face", Conv.model(SessionDecision.LinkedRecords.SameFace::fromJson)); } /** - * If true and an email is provided, Didit sends the initial "Verify your identity" email asynchronously when the User Verification (KYC) or Business Verification (KYB) session is created. Didit also sends verification status notifications for sessions requiring manual review to the provided email address. + * The earlier_verifications field. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional sendNotificationEmails() { - return Json.optional(json, "send_notification_emails", Conv.BOOLEAN); + public Optional earlierVerifications() { + return Json.optional(json, "earlier_verifications", Conv.model(SessionDecision.LinkedRecords.EarlierVerifications::fromJson)); } /** - * Phone number of the user in E.164 format if available (e.g., +14155552671). null when only an email was supplied at session creation. Note: This field returns the original phone number provided during session creation. If the number was invalid, it may not be in E.164 format. + * The networks field. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional phone() { - return Json.optional(json, "phone", Conv.STRING); + public Optional networks() { + return Json.optional(json, "networks", Conv.model(SessionDecision.LinkedRecords.Networks::fromJson)); } @Override @@ -1574,55 +2087,1327 @@ protected Set knownFields() { return KNOWN_FIELDS; } - /** Builds a {@link ContactDetails}. */ + /** Builds a {@link LinkedRecords}. */ public static final class Builder extends JsonModel.BaseBuilder { private Builder() {} - private Builder(ContactDetails from) { + private Builder(LinkedRecords from) { super(from); } /** - * Email address of the user (e.g., "john.doe@example.com") that will be used during the Email Verification step. If not provided, the user must provide it during the verification flow. + * Other people whose face matched one of this session's face searches. * - * @param email the value + * @param sameFace the value, or {@code null} to send JSON null * @return this builder */ - public Builder email(String email) { - return set("email", Conv.STRING, email); + public Builder sameFace(SessionDecision.LinkedRecords.@Nullable SameFace sameFace) { + return setNullable("same_face", Conv.model(SessionDecision.LinkedRecords.SameFace::fromJson), sameFace); } /** - * Language code (ISO 639-1) for email notifications. Controls the language of all email communications (e.g., "en", "es", "fr"). + * The earlier_verifications field. * - * @param emailLang the value + * @param earlierVerifications the value, or {@code null} to send JSON null * @return this builder */ - public Builder emailLang(String emailLang) { - return set("email_lang", Conv.STRING, emailLang); + public Builder earlierVerifications(SessionDecision.LinkedRecords.@Nullable EarlierVerifications earlierVerifications) { + return setNullable("earlier_verifications", Conv.model(SessionDecision.LinkedRecords.EarlierVerifications::fromJson), earlierVerifications); } /** - * If true and an email is provided, Didit sends the initial "Verify your identity" email asynchronously when the User Verification (KYC) or Business Verification (KYB) session is created. Didit also sends verification status notifications for sessions requiring manual review to the provided email address. + * The networks field. * - * @param sendNotificationEmails the value + * @param networks the value, or {@code null} to send JSON null * @return this builder */ - public Builder sendNotificationEmails(boolean sendNotificationEmails) { - return set("send_notification_emails", Conv.BOOLEAN, sendNotificationEmails); + public Builder networks(SessionDecision.LinkedRecords.@Nullable Networks networks) { + return setNullable("networks", Conv.model(SessionDecision.LinkedRecords.Networks::fromJson), networks); } /** - * Phone number of the user in E.164 format if available (e.g., +14155552671). null when only an email was supplied at session creation. Note: This field returns the original phone number provided during session creation. If the number was invalid, it may not be in E.164 format. + * Builds the value. * - * @param phone the value, or {@code null} to send JSON null - * @return this builder + * @return a new immutable {@code LinkedRecords} */ - public Builder phone(@Nullable String phone) { - return setNullable("phone", Conv.STRING, phone); + public LinkedRecords build() { + return new LinkedRecords(buildJson(), buildFiles()); } - /** + @Override + protected Builder self() { + return this; + } + } + + /** Other people whose face matched one of this session's face searches. */ + public static final class SameFace extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("count", "best_match"); + + private SameFace(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SameFace} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SameFace fromJson(JsonNode json) { + return new SameFace(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional count() { + return Json.optional(json, "count", Conv.LONG); + } + + /** + * The best_match field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional bestMatch() { + return Json.optional(json, "best_match", Conv.model(SessionDecision.LinkedRecords.SameFace.BestMatch::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SameFace}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SameFace from) { + super(from); + } + + /** + * The count field. + * + * @param count the value + * @return this builder + */ + public Builder count(long count) { + return set("count", Conv.LONG, count); + } + + /** + * The best_match field. + * + * @param bestMatch the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder bestMatch(SessionDecision.LinkedRecords.SameFace.@Nullable BestMatch bestMatch) { + return setNullable("best_match", Conv.model(SessionDecision.LinkedRecords.SameFace.BestMatch::fromJson), bestMatch); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SameFace} + */ + public SameFace build() { + return new SameFace(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class BestMatch extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("session_id", "session_number", "vendor_user_id", "similarity_percentage"); + + private BestMatch(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code BestMatch} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static BestMatch fromJson(JsonNode json) { + return new BestMatch(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The session_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sessionId() { + return Json.optional(json, "session_id", Conv.STRING); + } + + /** + * The session_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sessionNumber() { + return Json.optional(json, "session_number", Conv.LONG); + } + + /** + * The vendor_user_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vendorUserId() { + return Json.optional(json, "vendor_user_id", Conv.STRING); + } + + /** + * The similarity_percentage field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional similarityPercentage() { + return Json.optional(json, "similarity_percentage", Conv.DOUBLE); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link BestMatch}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(BestMatch from) { + super(from); + } + + /** + * The session_id field. + * + * @param sessionId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sessionId(@Nullable String sessionId) { + return setNullable("session_id", Conv.STRING, sessionId); + } + + /** + * The session_number field. + * + * @param sessionNumber the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sessionNumber(@Nullable Long sessionNumber) { + return setNullable("session_number", Conv.LONG, sessionNumber); + } + + /** + * The vendor_user_id field. + * + * @param vendorUserId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder vendorUserId(@Nullable String vendorUserId) { + return setNullable("vendor_user_id", Conv.STRING, vendorUserId); + } + + /** + * The similarity_percentage field. + * + * @param similarityPercentage the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder similarityPercentage(@Nullable Double similarityPercentage) { + return setNullable("similarity_percentage", Conv.DOUBLE, similarityPercentage); + } + + /** + * Builds the value. + * + * @return a new immutable {@code BestMatch} + */ + public BestMatch build() { + return new BestMatch(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + } + + public static final class EarlierVerifications extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("count", "vendor_user_id"); + + private EarlierVerifications(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code EarlierVerifications} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static EarlierVerifications fromJson(JsonNode json) { + return new EarlierVerifications(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional count() { + return Json.optional(json, "count", Conv.LONG); + } + + /** + * The vendor_user_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional vendorUserId() { + return Json.optional(json, "vendor_user_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link EarlierVerifications}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(EarlierVerifications from) { + super(from); + } + + /** + * The count field. + * + * @param count the value + * @return this builder + */ + public Builder count(long count) { + return set("count", Conv.LONG, count); + } + + /** + * The vendor_user_id field. + * + * @param vendorUserId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder vendorUserId(@Nullable String vendorUserId) { + return setNullable("vendor_user_id", Conv.STRING, vendorUserId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code EarlierVerifications} + */ + public EarlierVerifications build() { + return new EarlierVerifications(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + public static final class Networks extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("count", "open", "dismissed", "items"); + + private Networks(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Networks} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Networks fromJson(JsonNode json) { + return new Networks(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional count() { + return Json.optional(json, "count", Conv.LONG); + } + + /** + * The open field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional open() { + return Json.optional(json, "open", Conv.LONG); + } + + /** + * The dismissed field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dismissed() { + return Json.optional(json, "dismissed", Conv.LONG); + } + + /** + * The items field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> items() { + return Json.optional(json, "items", Conv.list(Conv.model(SessionDecision.LinkedRecords.Networks.Items::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Networks}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Networks from) { + super(from); + } + + /** + * The count field. + * + * @param count the value + * @return this builder + */ + public Builder count(long count) { + return set("count", Conv.LONG, count); + } + + /** + * The open field. + * + * @param open the value + * @return this builder + */ + public Builder open(long open) { + return set("open", Conv.LONG, open); + } + + /** + * The dismissed field. + * + * @param dismissed the value + * @return this builder + */ + public Builder dismissed(long dismissed) { + return set("dismissed", Conv.LONG, dismissed); + } + + /** + * The items field. + * + * @param items the value + * @return this builder + */ + public Builder items(List items) { + return set("items", Conv.list(Conv.model(SessionDecision.LinkedRecords.Networks.Items::fromJson)), items); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Networks} + */ + public Networks build() { + return new Networks(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Items extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("network_id", "display_number", "name", "status", "risk_score"); + + private Items(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Items} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Items fromJson(JsonNode json) { + return new Items(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The network_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional networkId() { + return Json.optional(json, "network_id", Conv.STRING); + } + + /** + * The display_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional displayNumber() { + return Json.optional(json, "display_number", Conv.LONG); + } + + /** + * The name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional name() { + return Json.optional(json, "name", Conv.STRING); + } + + /** + * The status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * The risk_score field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional riskScore() { + return Json.optional(json, "risk_score", Conv.DOUBLE); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Items}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Items from) { + super(from); + } + + /** + * The network_id field. + * + * @param networkId the value + * @return this builder + */ + public Builder networkId(String networkId) { + return set("network_id", Conv.STRING, networkId); + } + + /** + * The display_number field. + * + * @param displayNumber the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder displayNumber(@Nullable Long displayNumber) { + return setNullable("display_number", Conv.LONG, displayNumber); + } + + /** + * The name field. + * + * @param name the value + * @return this builder + */ + public Builder name(String name) { + return set("name", Conv.STRING, name); + } + + /** + * The status field. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * The risk_score field. + * + * @param riskScore the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder riskScore(@Nullable Double riskScore) { + return setNullable("risk_score", Conv.DOUBLE, riskScore); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Items} + */ + public Items build() { + return new Items(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + } + } + + /** + * Expected details supplied at session creation — used for cross-validation against extracted data (KYC) or to pre-fill the company registry search (KYB). Echoes back exactly the keys that were provided; null when none were supplied. KYC sessions carry the person fields; Business (KYB) sessions carry company_name, registry_country and registration_number. + */ + public static final class ExpectedDetails extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("first_name", "last_name", "date_of_birth", "gender", "nationality", "country", "address", "identification_number", "ip_address", "expected_document_types", "id_country", "poa_country", "company_name", "registry_country", "registration_number"); + + private ExpectedDetails(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code ExpectedDetails} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static ExpectedDetails fromJson(JsonNode json) { + return new ExpectedDetails(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * User's first name. For example, John. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * User's last name. For example, Doe. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * User's date of birth with format: YYYY-MM-DD. For example, 1990-05-15. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.DATE); + } + + /** + * User's gender. Must be either 'M', 'F', or null. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional gender() { + return Json.optional(json, "gender", Conv.enumeration(SessionDecision.ExpectedDetails.Gender::of)); + } + + /** + * ISO 3166-1 alpha-3 country code representing the applicant's country of origin. For example, USA. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nationality() { + return Json.optional(json, "nationality", Conv.STRING); + } + + /** + * ISO 3166-1 alpha-3 country code representing the country of the Proof of Address document, or the country of the applicant's ID document, which may differ from nationality. For example, GBR. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional country() { + return Json.optional(json, "country", Conv.STRING); + } + + /** + * The address in a human readable format, including as much information as possible. For example, 123 Main St, San Francisco, CA 94105, USA. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional address() { + return Json.optional(json, "address", Conv.STRING); + } + + /** + * The user's document number, personal number, or tax number. For example, 123456789. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional identificationNumber() { + return Json.optional(json, "identification_number", Conv.STRING); + } + + /** + * Expected IP address for the session. If the actual IP address differs from this value, a warning will be logged. For example, 192.168.1.100. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ipAddress() { + return Json.optional(json, "ip_address", Conv.STRING); + } + + /** + * Document types the ID verification step was restricted to at session creation. Empty/unset means no restriction. Codes: P (passport), ID (national ID), DL (driver's license), RP (residence permit), HIC (health insurance card), TC (tax card), SSC (social security card). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> expectedDocumentTypes() { + return Json.optional(json, "expected_document_types", Conv.list(Conv.enumeration(SessionDecision.ExpectedDetails.ExpectedDocumentTypes::of))); + } + + /** + * Expected ID-document issuing country (ISO 3166-1 alpha-3), when restricted at creation time. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional idCountry() { + return Json.optional(json, "id_country", Conv.STRING); + } + + /** + * Expected Proof of Address document country (ISO 3166-1 alpha-3), when restricted at creation time. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional poaCountry() { + return Json.optional(json, "poa_country", Conv.STRING); + } + + /** + * Expected legal name of the business. Business (KYB) sessions only. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Expected registry country as XX or XX-YY (ISO 3166-1 alpha-2, optionally with an ISO 3166-2 subdivision for state-level registries, e.g. US-CA). Business (KYB) sessions only. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registryCountry() { + return Json.optional(json, "registry_country", Conv.STRING); + } + + /** + * Expected company registration number. Business (KYB) sessions only. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link ExpectedDetails}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(ExpectedDetails from) { + super(from); + } + + /** + * User's first name. For example, John. + * + * @param firstName the value + * @return this builder + */ + public Builder firstName(String firstName) { + return set("first_name", Conv.STRING, firstName); + } + + /** + * User's last name. For example, Doe. + * + * @param lastName the value + * @return this builder + */ + public Builder lastName(String lastName) { + return set("last_name", Conv.STRING, lastName); + } + + /** + * User's date of birth with format: YYYY-MM-DD. For example, 1990-05-15. + * + * @param dateOfBirth the value + * @return this builder + */ + public Builder dateOfBirth(LocalDate dateOfBirth) { + return set("date_of_birth", Conv.DATE, dateOfBirth); + } + + /** + * User's gender. Must be either 'M', 'F', or null. + * + * @param gender the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder gender(SessionDecision.ExpectedDetails.@Nullable Gender gender) { + return setNullable("gender", Conv.enumeration(SessionDecision.ExpectedDetails.Gender::of), gender); + } + + /** + * ISO 3166-1 alpha-3 country code representing the applicant's country of origin. For example, USA. + * + * @param nationality the value + * @return this builder + */ + public Builder nationality(String nationality) { + return set("nationality", Conv.STRING, nationality); + } + + /** + * ISO 3166-1 alpha-3 country code representing the country of the Proof of Address document, or the country of the applicant's ID document, which may differ from nationality. For example, GBR. + * + * @param country the value + * @return this builder + */ + public Builder country(String country) { + return set("country", Conv.STRING, country); + } + + /** + * The address in a human readable format, including as much information as possible. For example, 123 Main St, San Francisco, CA 94105, USA. + * + * @param address the value + * @return this builder + */ + public Builder address(String address) { + return set("address", Conv.STRING, address); + } + + /** + * The user's document number, personal number, or tax number. For example, 123456789. + * + * @param identificationNumber the value + * @return this builder + */ + public Builder identificationNumber(String identificationNumber) { + return set("identification_number", Conv.STRING, identificationNumber); + } + + /** + * Expected IP address for the session. If the actual IP address differs from this value, a warning will be logged. For example, 192.168.1.100. + * + * @param ipAddress the value + * @return this builder + */ + public Builder ipAddress(String ipAddress) { + return set("ip_address", Conv.STRING, ipAddress); + } + + /** + * Document types the ID verification step was restricted to at session creation. Empty/unset means no restriction. Codes: P (passport), ID (national ID), DL (driver's license), RP (residence permit), HIC (health insurance card), TC (tax card), SSC (social security card). + * + * @param expectedDocumentTypes the value + * @return this builder + */ + public Builder expectedDocumentTypes(List expectedDocumentTypes) { + return set("expected_document_types", Conv.list(Conv.enumeration(SessionDecision.ExpectedDetails.ExpectedDocumentTypes::of)), expectedDocumentTypes); + } + + /** + * Expected ID-document issuing country (ISO 3166-1 alpha-3), when restricted at creation time. + * + * @param idCountry the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder idCountry(@Nullable String idCountry) { + return setNullable("id_country", Conv.STRING, idCountry); + } + + /** + * Expected Proof of Address document country (ISO 3166-1 alpha-3), when restricted at creation time. + * + * @param poaCountry the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder poaCountry(@Nullable String poaCountry) { + return setNullable("poa_country", Conv.STRING, poaCountry); + } + + /** + * Expected legal name of the business. Business (KYB) sessions only. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Expected registry country as XX or XX-YY (ISO 3166-1 alpha-2, optionally with an ISO 3166-2 subdivision for state-level registries, e.g. US-CA). Business (KYB) sessions only. + * + * @param registryCountry the value + * @return this builder + */ + public Builder registryCountry(String registryCountry) { + return set("registry_country", Conv.STRING, registryCountry); + } + + /** + * Expected company registration number. Business (KYB) sessions only. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Builds the value. + * + * @return a new immutable {@code ExpectedDetails} + */ + public ExpectedDetails build() { + return new ExpectedDetails(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * User's gender. Must be either 'M', 'F', or null. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Gender extends StringEnum { + /** The value {@code "M"}. */ + public static final Gender M = new Gender("M"); + + /** The value {@code "F"}. */ + public static final Gender F = new Gender("F"); + + private static final List KNOWN_VALUES = List.of(M, F); + + private Gender(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Gender of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Gender::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class ExpectedDocumentTypes extends StringEnum { + /** The value {@code "P"}. */ + public static final ExpectedDocumentTypes P = new ExpectedDocumentTypes("P"); + + /** The value {@code "ID"}. */ + public static final ExpectedDocumentTypes ID = new ExpectedDocumentTypes("ID"); + + /** The value {@code "DL"}. */ + public static final ExpectedDocumentTypes DL = new ExpectedDocumentTypes("DL"); + + /** The value {@code "RP"}. */ + public static final ExpectedDocumentTypes RP = new ExpectedDocumentTypes("RP"); + + /** The value {@code "HIC"}. */ + public static final ExpectedDocumentTypes HIC = new ExpectedDocumentTypes("HIC"); + + /** The value {@code "TC"}. */ + public static final ExpectedDocumentTypes TC = new ExpectedDocumentTypes("TC"); + + /** The value {@code "SSC"}. */ + public static final ExpectedDocumentTypes SSC = new ExpectedDocumentTypes("SSC"); + + private static final List KNOWN_VALUES = List.of(P, ID, DL, RP, HIC, TC, SSC); + + private ExpectedDocumentTypes(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static ExpectedDocumentTypes of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, ExpectedDocumentTypes::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } + + /** + * Contact details supplied when the session was created (used for notification emails, prefilled phone/email verification, and communication language). null when neither an email nor a phone number was provided. + */ + public static final class ContactDetails extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("email", "email_lang", "send_notification_emails", "phone"); + + private ContactDetails(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code ContactDetails} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static ContactDetails fromJson(JsonNode json) { + return new ContactDetails(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Email address of the user (e.g., "john.doe@example.com") that will be used during the Email Verification step. If not provided, the user must provide it during the verification flow. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Language code (ISO 639-1) for email notifications. Controls the language of all email communications (e.g., "en", "es", "fr"). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emailLang() { + return Json.optional(json, "email_lang", Conv.STRING); + } + + /** + * If true and an email is provided, Didit sends the initial "Verify your identity" email asynchronously when the User Verification (KYC) or Business Verification (KYB) session is created. Didit also sends verification status notifications for sessions requiring manual review to the provided email address. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sendNotificationEmails() { + return Json.optional(json, "send_notification_emails", Conv.BOOLEAN); + } + + /** + * Phone number of the user in E.164 format if available (e.g., +14155552671). null when only an email was supplied at session creation. Note: This field returns the original phone number provided during session creation. If the number was invalid, it may not be in E.164 format. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phone() { + return Json.optional(json, "phone", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link ContactDetails}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(ContactDetails from) { + super(from); + } + + /** + * Email address of the user (e.g., "john.doe@example.com") that will be used during the Email Verification step. If not provided, the user must provide it during the verification flow. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Language code (ISO 639-1) for email notifications. Controls the language of all email communications (e.g., "en", "es", "fr"). + * + * @param emailLang the value + * @return this builder + */ + public Builder emailLang(String emailLang) { + return set("email_lang", Conv.STRING, emailLang); + } + + /** + * If true and an email is provided, Didit sends the initial "Verify your identity" email asynchronously when the User Verification (KYC) or Business Verification (KYB) session is created. Didit also sends verification status notifications for sessions requiring manual review to the provided email address. + * + * @param sendNotificationEmails the value + * @return this builder + */ + public Builder sendNotificationEmails(boolean sendNotificationEmails) { + return set("send_notification_emails", Conv.BOOLEAN, sendNotificationEmails); + } + + /** + * Phone number of the user in E.164 format if available (e.g., +14155552671). null when only an email was supplied at session creation. Note: This field returns the original phone number provided during session creation. If the number was invalid, it may not be in E.164 format. + * + * @param phone the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder phone(@Nullable String phone) { + return setNullable("phone", Conv.STRING, phone); + } + + /** * Builds the value. * * @return a new immutable {@code ContactDetails} @@ -1642,7 +3427,7 @@ protected Builder self() { * One ID verification report - the full report for a single ID Verification step. verification_method says which of the three methods produced it (document capture, non-doc lookup or wallet sign-in) and the method-specific evidence block is populated accordingly. */ public static final class IdVerifications extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id", "verification_method", "assurance", "wallet_provider", "fallback_from", "id_lookup", "wallet_verification", "status", "document_type", "document_subtype", "document_number", "personal_number", "portrait_image", "front_image", "front_video", "back_image", "back_video", "full_front_image", "full_back_image", "front_image_camera_front", "back_image_camera_front", "date_of_birth", "age", "expiration_date", "date_of_issue", "issuing_state", "issuing_state_name", "first_name", "last_name", "full_name", "gender", "address", "formatted_address", "place_of_birth", "marital_status", "nationality", "extra_fields", "mrz", "parsed_address", "extra_files", "front_image_camera_front_face_match_score", "back_image_camera_front_face_match_score", "document_selfie_face_matches", "front_image_quality_score", "back_image_quality_score", "warnings", "matches", "document_liveness", "address_validation"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "verification_method", "assurance", "wallet_provider", "fallback_from", "id_lookup", "wallet_verification", "status", "document_type", "document_subtype", "document_number", "personal_number", "portrait_image", "front_image", "front_video", "back_image", "back_video", "full_front_image", "full_back_image", "front_image_camera_front", "back_image_camera_front", "date_of_birth", "age", "expiration_date", "date_of_issue", "issuing_state", "issuing_state_name", "first_name", "last_name", "full_name", "gender", "address", "formatted_address", "place_of_birth", "marital_status", "nationality", "extra_fields", "mrz", "parsed_address", "extra_files", "front_image_camera_front_face_match_score", "back_image_camera_front_face_match_score", "document_selfie_face_matches", "front_image_quality_score", "back_image_quality_score", "warnings", "matches", "document_liveness", "address_validation", "region", "extracted_data", "barcodes"); private IdVerifications(ObjectNode json, Map> files) { super(json, files); @@ -2167,6 +3952,36 @@ public Optional addressValidation() { return Json.optional(json, "address_validation", Conv.model(AddressValidationResult::fromJson)); } + /** + * Region or state of the document's issuing country where the document identifies one. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional region() { + return Json.optional(json, "region", Conv.STRING); + } + + /** + * Snapshot of the data extracted from the document that the person was shown to review, kept next to the confirmed values so you can compare what was read with what the person confirmed. null when the person was not asked to review. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> extractedData() { + return Json.optional(json, "extracted_data", Conv.OBJECT); + } + + /** + * Data read from the document's barcodes. Empty when the document has none or none was read. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional>> barcodes() { + return Json.optional(json, "barcodes", Conv.list(Conv.OBJECT)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -2670,6 +4485,36 @@ public Builder addressValidation(@Nullable AddressValidationResult addressValida return setNullable("address_validation", Conv.model(AddressValidationResult::fromJson), addressValidation); } + /** + * Region or state of the document's issuing country where the document identifies one. + * + * @param region the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder region(@Nullable String region) { + return setNullable("region", Conv.STRING, region); + } + + /** + * Snapshot of the data extracted from the document that the person was shown to review, kept next to the confirmed values so you can compare what was read with what the person confirmed. null when the person was not asked to review. + * + * @param extractedData the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder extractedData(@Nullable Map extractedData) { + return setAny("extracted_data", extractedData); + } + + /** + * Data read from the document's barcodes. Empty when the document has none or none was read. + * + * @param barcodes the value + * @return this builder + */ + public Builder barcodes(List> barcodes) { + return setAny("barcodes", barcodes); + } + /** * Builds the value. * @@ -7439,7 +9284,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -10941,7 +12792,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -12088,7 +13945,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -12123,7 +13986,7 @@ public boolean isKnown() { /** One face-match report — the full report. */ public static final class FaceMatches extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "score", "source_image_session_id", "source_image", "target_image", "warnings"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "score", "source_image_session_id", "source_image", "target_image", "warnings", "face_coverage"); private FaceMatches(ObjectNode json, Map> files) { super(json, files); @@ -12228,6 +14091,16 @@ public Optional> warnings() { return Json.optional(json, "warnings", Conv.list(Conv.model(SessionDecision.FaceMatches.Warnings::fromJson))); } + /** + * Whether the eyes, mouth and face are covered in the captured image. Returned by GET /v3/session/{sessionId}/decision/ only; it is not part of webhook payloads. null when no coverage reading exists. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional faceCoverage() { + return Json.optional(json, "face_coverage", Conv.model(SessionDecision.FaceMatches.FaceCoverage::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -12311,6 +14184,16 @@ public Builder warnings(List warnings) { return set("warnings", Conv.list(Conv.model(SessionDecision.FaceMatches.Warnings::fromJson)), warnings); } + /** + * Whether the eyes, mouth and face are covered in the captured image. Returned by GET /v3/session/{sessionId}/decision/ only; it is not part of webhook payloads. null when no coverage reading exists. + * + * @param faceCoverage the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder faceCoverage(SessionDecision.FaceMatches.@Nullable FaceCoverage faceCoverage) { + return setNullable("face_coverage", Conv.model(SessionDecision.FaceMatches.FaceCoverage::fromJson), faceCoverage); + } + /** * Builds the value. * @@ -12498,176 +14381,685 @@ private Builder(Warnings from) { } /** - * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. + * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. + * + * @param feature the value + * @return this builder + */ + public Builder feature(SessionDecision.FaceMatches.Warnings.Feature feature) { + return set("feature", Conv.enumeration(SessionDecision.FaceMatches.Warnings.Feature::of), feature); + } + + /** + * The risk field. + * + * @param risk the value + * @return this builder + */ + public Builder risk(String risk) { + return set("risk", Conv.STRING, risk); + } + + /** + * The additional_data field. + * + * @param additionalData the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder additionalData(@Nullable Map additionalData) { + return setAny("additional_data", additionalData); + } + + /** + * The log_type field. + * + * @param logType the value + * @return this builder + */ + public Builder logType(String logType) { + return set("log_type", Conv.STRING, logType); + } + + /** + * The short_description field. + * + * @param shortDescription the value + * @return this builder + */ + public Builder shortDescription(String shortDescription) { + return set("short_description", Conv.STRING, shortDescription); + } + + /** + * The long_description field. + * + * @param longDescription the value + * @return this builder + */ + public Builder longDescription(String longDescription) { + return set("long_description", Conv.STRING, longDescription); + } + + /** + * The workflow graph node ID that generated this warning + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Warnings} + */ + public Warnings build() { + return new Warnings(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Feature extends StringEnum { + /** The value {@code "ID_VERIFICATION"}. */ + public static final Feature ID_VERIFICATION = new Feature("ID_VERIFICATION"); + + /** The value {@code "NFC"}. */ + public static final Feature NFC = new Feature("NFC"); + + /** The value {@code "LIVENESS"}. */ + public static final Feature LIVENESS = new Feature("LIVENESS"); + + /** The value {@code "FACEMATCH"}. */ + public static final Feature FACEMATCH = new Feature("FACEMATCH"); + + /** The value {@code "PROOF_OF_ADDRESS"}. */ + public static final Feature PROOF_OF_ADDRESS = new Feature("PROOF_OF_ADDRESS"); + + /** The value {@code "PHONE"}. */ + public static final Feature PHONE = new Feature("PHONE"); + + /** The value {@code "EMAIL"}. */ + public static final Feature EMAIL = new Feature("EMAIL"); + + /** The value {@code "AML"}. */ + public static final Feature AML = new Feature("AML"); + + /** The value {@code "LOCATION"}. */ + public static final Feature LOCATION = new Feature("LOCATION"); + + /** The value {@code "DATABASE_VALIDATION"}. */ + public static final Feature DATABASE_VALIDATION = new Feature("DATABASE_VALIDATION"); + + /** The value {@code "QUESTIONNAIRE"}. */ + public static final Feature QUESTIONNAIRE = new Feature("QUESTIONNAIRE"); + + /** The value {@code "DOCUMENT_AI"}. */ + public static final Feature DOCUMENT_AI = new Feature("DOCUMENT_AI"); + + /** The value {@code "KYB_REGISTRY"}. */ + public static final Feature KYB_REGISTRY = new Feature("KYB_REGISTRY"); + + /** The value {@code "KYB_DOCUMENTS"}. */ + public static final Feature KYB_DOCUMENTS = new Feature("KYB_DOCUMENTS"); + + /** The value {@code "KYB_KEY_PEOPLE"}. */ + public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); + + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); + + private Feature(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Feature of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Feature::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } + + /** + * Whether the eyes, mouth and face are covered in the captured image. Returned by GET /v3/session/{sessionId}/decision/ only; it is not part of webhook payloads. null when no coverage reading exists. + */ + public static final class FaceCoverage extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("eyes", "mouth", "face"); + + private FaceCoverage(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code FaceCoverage} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static FaceCoverage fromJson(JsonNode json) { + return new FaceCoverage(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The eyes field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional eyes() { + return Json.optional(json, "eyes", Conv.model(SessionDecision.FaceMatches.FaceCoverage.Eyes::fromJson)); + } + + /** + * The mouth field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional mouth() { + return Json.optional(json, "mouth", Conv.model(SessionDecision.FaceMatches.FaceCoverage.Mouth::fromJson)); + } + + /** + * The face field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional face() { + return Json.optional(json, "face", Conv.model(SessionDecision.FaceMatches.FaceCoverage.Face::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link FaceCoverage}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(FaceCoverage from) { + super(from); + } + + /** + * The eyes field. + * + * @param eyes the value + * @return this builder + */ + public Builder eyes(SessionDecision.FaceMatches.FaceCoverage.Eyes eyes) { + return set("eyes", Conv.model(SessionDecision.FaceMatches.FaceCoverage.Eyes::fromJson), eyes); + } + + /** + * The mouth field. * - * @param feature the value + * @param mouth the value * @return this builder */ - public Builder feature(SessionDecision.FaceMatches.Warnings.Feature feature) { - return set("feature", Conv.enumeration(SessionDecision.FaceMatches.Warnings.Feature::of), feature); + public Builder mouth(SessionDecision.FaceMatches.FaceCoverage.Mouth mouth) { + return set("mouth", Conv.model(SessionDecision.FaceMatches.FaceCoverage.Mouth::fromJson), mouth); } /** - * The risk field. + * The face field. * - * @param risk the value + * @param face the value * @return this builder */ - public Builder risk(String risk) { - return set("risk", Conv.STRING, risk); + public Builder face(SessionDecision.FaceMatches.FaceCoverage.Face face) { + return set("face", Conv.model(SessionDecision.FaceMatches.FaceCoverage.Face::fromJson), face); } /** - * The additional_data field. + * Builds the value. * - * @param additionalData the value, or {@code null} to send JSON null - * @return this builder + * @return a new immutable {@code FaceCoverage} */ - public Builder additionalData(@Nullable Map additionalData) { - return setAny("additional_data", additionalData); + public FaceCoverage build() { + return new FaceCoverage(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Eyes extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("covered", "calibrated", "visibility_score"); + + private Eyes(ObjectNode json, Map> files) { + super(json, files); } /** - * The log_type field. + * Reads a {@code Eyes} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. * - * @param logType the value - * @return this builder + * @param json a JSON object + * @return the parsed value */ - public Builder logType(String logType) { - return set("log_type", Conv.STRING, logType); + public static Eyes fromJson(JsonNode json) { + return new Eyes(Json.copyObject(json), Map.of()); } /** - * The short_description field. + * Returns an empty builder. * - * @param shortDescription the value - * @return this builder + * @return a new builder */ - public Builder shortDescription(String shortDescription) { - return set("short_description", Conv.STRING, shortDescription); + public static Builder builder() { + return new Builder(); } /** - * The long_description field. + * Returns a builder holding a copy of every field of this value. * - * @param longDescription the value - * @return this builder + * @return a new builder */ - public Builder longDescription(String longDescription) { - return set("long_description", Conv.STRING, longDescription); + public Builder toBuilder() { + return new Builder(this); } /** - * The workflow graph node ID that generated this warning + * The covered field. * - * @param nodeId the value - * @return this builder + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Builder nodeId(String nodeId) { - return set("node_id", Conv.STRING, nodeId); + public Optional covered() { + return Json.optional(json, "covered", Conv.BOOLEAN); } /** - * Builds the value. + * false means the reading is shadow evidence only and no warning acts on it. * - * @return a new immutable {@code Warnings} + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Warnings build() { - return new Warnings(buildJson(), buildFiles()); + public Optional calibrated() { + return Json.optional(json, "calibrated", Conv.BOOLEAN); + } + + /** + * The visibility_score field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional visibilityScore() { + return Json.optional(json, "visibility_score", Conv.DOUBLE); } @Override - protected Builder self() { - return this; + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Eyes}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Eyes from) { + super(from); + } + + /** + * The covered field. + * + * @param covered the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder covered(@Nullable Boolean covered) { + return setNullable("covered", Conv.BOOLEAN, covered); + } + + /** + * false means the reading is shadow evidence only and no warning acts on it. + * + * @param calibrated the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder calibrated(@Nullable Boolean calibrated) { + return setNullable("calibrated", Conv.BOOLEAN, calibrated); + } + + /** + * The visibility_score field. + * + * @param visibilityScore the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder visibilityScore(@Nullable Double visibilityScore) { + return setNullable("visibility_score", Conv.DOUBLE, visibilityScore); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Eyes} + */ + public Eyes build() { + return new Eyes(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } } } - /** - * The feature that generated this warning. The value identifies the feature block the warning belongs to. Each module's warnings array typically uses the value matching its module (e.g. PHONE inside phone_verifications[].warnings), but the enum above is authoritative across all feature warnings on the decision payload. - * - *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. - */ - public static final class Feature extends StringEnum { - /** The value {@code "ID_VERIFICATION"}. */ - public static final Feature ID_VERIFICATION = new Feature("ID_VERIFICATION"); + public static final class Mouth extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("covered", "calibrated", "visibility_score"); - /** The value {@code "NFC"}. */ - public static final Feature NFC = new Feature("NFC"); + private Mouth(ObjectNode json, Map> files) { + super(json, files); + } - /** The value {@code "LIVENESS"}. */ - public static final Feature LIVENESS = new Feature("LIVENESS"); + /** + * Reads a {@code Mouth} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Mouth fromJson(JsonNode json) { + return new Mouth(Json.copyObject(json), Map.of()); + } - /** The value {@code "FACEMATCH"}. */ - public static final Feature FACEMATCH = new Feature("FACEMATCH"); + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } - /** The value {@code "PROOF_OF_ADDRESS"}. */ - public static final Feature PROOF_OF_ADDRESS = new Feature("PROOF_OF_ADDRESS"); + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } - /** The value {@code "PHONE"}. */ - public static final Feature PHONE = new Feature("PHONE"); + /** + * The covered field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional covered() { + return Json.optional(json, "covered", Conv.BOOLEAN); + } - /** The value {@code "EMAIL"}. */ - public static final Feature EMAIL = new Feature("EMAIL"); + /** + * false means the reading is shadow evidence only and no warning acts on it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional calibrated() { + return Json.optional(json, "calibrated", Conv.BOOLEAN); + } - /** The value {@code "AML"}. */ - public static final Feature AML = new Feature("AML"); + /** + * The visibility_score field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional visibilityScore() { + return Json.optional(json, "visibility_score", Conv.DOUBLE); + } - /** The value {@code "LOCATION"}. */ - public static final Feature LOCATION = new Feature("LOCATION"); + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } - /** The value {@code "DATABASE_VALIDATION"}. */ - public static final Feature DATABASE_VALIDATION = new Feature("DATABASE_VALIDATION"); + /** Builds a {@link Mouth}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} - /** The value {@code "QUESTIONNAIRE"}. */ - public static final Feature QUESTIONNAIRE = new Feature("QUESTIONNAIRE"); + private Builder(Mouth from) { + super(from); + } - /** The value {@code "DOCUMENT_AI"}. */ - public static final Feature DOCUMENT_AI = new Feature("DOCUMENT_AI"); + /** + * The covered field. + * + * @param covered the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder covered(@Nullable Boolean covered) { + return setNullable("covered", Conv.BOOLEAN, covered); + } - /** The value {@code "KYB_REGISTRY"}. */ - public static final Feature KYB_REGISTRY = new Feature("KYB_REGISTRY"); + /** + * false means the reading is shadow evidence only and no warning acts on it. + * + * @param calibrated the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder calibrated(@Nullable Boolean calibrated) { + return setNullable("calibrated", Conv.BOOLEAN, calibrated); + } - /** The value {@code "KYB_DOCUMENTS"}. */ - public static final Feature KYB_DOCUMENTS = new Feature("KYB_DOCUMENTS"); + /** + * The visibility_score field. + * + * @param visibilityScore the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder visibilityScore(@Nullable Double visibilityScore) { + return setNullable("visibility_score", Conv.DOUBLE, visibilityScore); + } - /** The value {@code "KYB_KEY_PEOPLE"}. */ - public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); + /** + * Builds the value. + * + * @return a new immutable {@code Mouth} + */ + public Mouth build() { + return new Mouth(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + public static final class Face extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("covered", "calibrated", "visibility_score"); + + private Face(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Face} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Face fromJson(JsonNode json) { + return new Face(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } - private Feature(String value) { - super(value); + /** + * The covered field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional covered() { + return Json.optional(json, "covered", Conv.BOOLEAN); } /** - * Returns the constant for a known value, or a new instance for any other value. + * false means the reading is shadow evidence only and no warning acts on it. * - * @param value the string value - * @return the enum value + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public static Feature of(String value) { - return StringEnum.lookup(KNOWN_VALUES, value, Feature::new); + public Optional calibrated() { + return Json.optional(json, "calibrated", Conv.BOOLEAN); } /** - * Returns the values known to this SDK version. + * The visibility_score field. * - * @return the known values + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public static List knownValues() { - return KNOWN_VALUES; + public Optional visibilityScore() { + return Json.optional(json, "visibility_score", Conv.DOUBLE); } @Override - public boolean isKnown() { - return KNOWN_VALUES.contains(this); + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Face}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Face from) { + super(from); + } + + /** + * The covered field. + * + * @param covered the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder covered(@Nullable Boolean covered) { + return setNullable("covered", Conv.BOOLEAN, covered); + } + + /** + * false means the reading is shadow evidence only and no warning acts on it. + * + * @param calibrated the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder calibrated(@Nullable Boolean calibrated) { + return setNullable("calibrated", Conv.BOOLEAN, calibrated); + } + + /** + * The visibility_score field. + * + * @param visibilityScore the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder visibilityScore(@Nullable Double visibilityScore) { + return setNullable("visibility_score", Conv.DOUBLE, visibilityScore); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Face} + */ + public Face build() { + return new Face(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } } } } } public static final class PhoneVerifications extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "phone_number_prefix", "phone_number", "full_number", "country_code", "country_name", "carrier", "is_disposable", "is_virtual", "verification_method", "verification_attempts", "verified_at", "lifecycle", "warnings", "matches"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "phone_number_prefix", "phone_number", "full_number", "country_code", "country_name", "carrier", "is_disposable", "is_virtual", "verification_method", "verification_attempts", "verified_at", "lifecycle", "warnings", "matches", "phone_intelligence", "phone_social"); private PhoneVerifications(ObjectNode json, Map> files) { super(json, files); @@ -12862,6 +15254,26 @@ public Optional> matches() { return Json.optional(json, "matches", Conv.list(Conv.model(SessionDecision.PhoneVerifications.Matches::fromJson))); } + /** + * Phone intelligence signals. Present only when the phone intelligence add-on ran for this number. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneIntelligence() { + return Json.optional(json, "phone_intelligence", Conv.model(PhoneIntelligence::fromJson)); + } + + /** + * Social footprint of the number. Present only when the social footprint add-on ran for this number. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneSocial() { + return Json.optional(json, "phone_social", Conv.model(PhoneSocialFootprint::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -13035,6 +15447,26 @@ public Builder matches(List matches) return set("matches", Conv.list(Conv.model(SessionDecision.PhoneVerifications.Matches::fromJson)), matches); } + /** + * Phone intelligence signals. Present only when the phone intelligence add-on ran for this number. + * + * @param phoneIntelligence the value + * @return this builder + */ + public Builder phoneIntelligence(PhoneIntelligence phoneIntelligence) { + return set("phone_intelligence", Conv.model(PhoneIntelligence::fromJson), phoneIntelligence); + } + + /** + * Social footprint of the number. Present only when the social footprint add-on ran for this number. + * + * @param phoneSocial the value + * @return this builder + */ + public Builder phoneSocial(PhoneSocialFootprint phoneSocial) { + return set("phone_social", Conv.model(PhoneSocialFootprint::fromJson), phoneSocial); + } + /** * Builds the value. * @@ -13775,7 +16207,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -14097,7 +16535,7 @@ public boolean isKnown() { } public static final class EmailVerifications extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "email", "is_breached", "breaches", "is_disposable", "is_undeliverable", "verification_attempts", "verified_at", "warnings", "lifecycle", "matches"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "email", "is_breached", "breaches", "is_disposable", "is_undeliverable", "verification_attempts", "verified_at", "warnings", "lifecycle", "matches", "email_intelligence", "email_social"); private EmailVerifications(ObjectNode json, Map> files) { super(json, files); @@ -14252,6 +16690,26 @@ public Optional> matches() { return Json.optional(json, "matches", Conv.list(Conv.model(SessionDecision.EmailVerifications.Matches::fromJson))); } + /** + * Email intelligence signals. Present only when the email intelligence add-on ran for this address. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emailIntelligence() { + return Json.optional(json, "email_intelligence", Conv.model(EmailIntelligence::fromJson)); + } + + /** + * Social footprint of the address. Present only when the social footprint add-on ran for this address. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional emailSocial() { + return Json.optional(json, "email_social", Conv.model(EmailSocialFootprint::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -14385,6 +16843,26 @@ public Builder matches(List matches) return set("matches", Conv.list(Conv.model(SessionDecision.EmailVerifications.Matches::fromJson)), matches); } + /** + * Email intelligence signals. Present only when the email intelligence add-on ran for this address. + * + * @param emailIntelligence the value + * @return this builder + */ + public Builder emailIntelligence(EmailIntelligence emailIntelligence) { + return set("email_intelligence", Conv.model(EmailIntelligence::fromJson), emailIntelligence); + } + + /** + * Social footprint of the address. Present only when the social footprint add-on ran for this address. + * + * @param emailSocial the value + * @return this builder + */ + public Builder emailSocial(EmailSocialFootprint emailSocial) { + return set("email_social", Conv.model(EmailSocialFootprint::fromJson), emailSocial); + } + /** * Builds the value. * @@ -14932,7 +17410,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -17714,7 +20198,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -19543,7 +22033,7 @@ protected Builder self() { } public static final class IpAnalyses extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "device_brand", "device_model", "browser_family", "os_family", "platform", "device_fingerprint", "ip_country", "ip_country_code", "ip_state", "ip_city", "latitude", "longitude", "ip_address", "isp", "organization", "is_vpn_or_tor", "is_data_center", "time_zone", "time_zone_offset", "ip", "id_document", "poa_document", "warnings", "matches"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "status", "device_brand", "device_model", "browser_family", "os_family", "platform", "device_fingerprint", "ip_country", "ip_country_code", "ip_state", "ip_city", "latitude", "longitude", "ip_address", "isp", "organization", "is_vpn_or_tor", "is_data_center", "time_zone", "time_zone_offset", "ip", "id_document", "poa_document", "warnings", "matches", "browser_version", "os_version", "user_agent", "accept_language", "session_identifier", "session_age_ms", "coords_accuracy", "raw_device_data"); private IpAnalyses(ObjectNode json, Map> files) { super(json, files); @@ -19838,6 +22328,86 @@ public Optional> matches() { return Json.optional(json, "matches", Conv.list(Conv.model(SessionDecision.IpAnalyses.Matches::fromJson))); } + /** + * The browser_version field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional browserVersion() { + return Json.optional(json, "browser_version", Conv.STRING); + } + + /** + * The os_version field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional osVersion() { + return Json.optional(json, "os_version", Conv.STRING); + } + + /** + * The browser's user agent string. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional userAgent() { + return Json.optional(json, "user_agent", Conv.STRING); + } + + /** + * The Accept-Language header the browser sent. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional acceptLanguage() { + return Json.optional(json, "accept_language", Conv.STRING); + } + + /** + * Identifier of the browsing session the verification ran in. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sessionIdentifier() { + return Json.optional(json, "session_identifier", Conv.STRING); + } + + /** + * Age of that browsing session in milliseconds when the step ran. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sessionAgeMs() { + return Json.optional(json, "session_age_ms", Conv.LONG); + } + + /** + * Accuracy radius, in metres, of the coordinates the device reported. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional coordsAccuracy() { + return Json.optional(json, "coords_accuracy", Conv.DOUBLE); + } + + /** + * Raw device signals collected for the step. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> rawDeviceData() { + return Json.optional(json, "raw_device_data", Conv.OBJECT); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -20014,101 +22584,181 @@ public Builder isp(@Nullable String isp) { /** * Organization associated with IP * - * @param organization the value, or {@code null} to send JSON null + * @param organization the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder organization(@Nullable String organization) { + return setNullable("organization", Conv.STRING, organization); + } + + /** + * Whether IP is from VPN or Tor network + * + * @param isVpnOrTor the value + * @return this builder + */ + public Builder isVpnOrTor(boolean isVpnOrTor) { + return set("is_vpn_or_tor", Conv.BOOLEAN, isVpnOrTor); + } + + /** + * Whether IP is from a data center + * + * @param isDataCenter the value + * @return this builder + */ + public Builder isDataCenter(boolean isDataCenter) { + return set("is_data_center", Conv.BOOLEAN, isDataCenter); + } + + /** + * Time zone detected from IP + * + * @param timeZone the value + * @return this builder + */ + public Builder timeZone(String timeZone) { + return set("time_zone", Conv.STRING, timeZone); + } + + /** + * Time zone offset + * + * @param timeZoneOffset the value + * @return this builder + */ + public Builder timeZoneOffset(String timeZoneOffset) { + return set("time_zone_offset", Conv.STRING, timeZoneOffset); + } + + /** + * IP geolocation of this entry plus great-circle distances (km) to the ID document address and the POA document address. Distances are null when either side has no resolvable location. + * + * @param ip the value + * @return this builder + */ + public Builder ip(SessionDecision.IpAnalyses.Ip ip) { + return set("ip", Conv.model(SessionDecision.IpAnalyses.Ip::fromJson), ip); + } + + /** + * Location extracted from the ID document address plus distances (km) to the IP geolocation and the POA document address. location is null when no document address could be geocoded. + * + * @param idDocument the value + * @return this builder + */ + public Builder idDocument(SessionDecision.IpAnalyses.IdDocument idDocument) { + return set("id_document", Conv.model(SessionDecision.IpAnalyses.IdDocument::fromJson), idDocument); + } + + /** + * Location extracted from the Proof of Address document plus distances (km) to the IP geolocation and the ID document address. location is null when the session has no POA step or the address could not be geocoded. + * + * @param poaDocument the value + * @return this builder + */ + public Builder poaDocument(SessionDecision.IpAnalyses.PoaDocument poaDocument) { + return set("poa_document", Conv.model(SessionDecision.IpAnalyses.PoaDocument::fromJson), poaDocument); + } + + /** + * The warnings field. + * + * @param warnings the value * @return this builder */ - public Builder organization(@Nullable String organization) { - return setNullable("organization", Conv.STRING, organization); + public Builder warnings(List warnings) { + return set("warnings", Conv.list(Conv.model(SessionDecision.IpAnalyses.Warnings::fromJson)), warnings); } /** - * Whether IP is from VPN or Tor network + * Cross-session matches found for this entry's IP address or device identity. Every match is another verification session in your application (source is always session) that shares the same value, always belonging to a different vendor user / vendor_data than the current session, capped at 5 per collector (device_fingerprint sums two independently capped collectors, so up to 10 entries are possible). Every item carries match_source, confidence, match_mode, device_info and location_info; the keys recovery_similarity, tls_ja4_corroborated and recovery_gate_reason are present only when match_source is recovered_high. * - * @param isVpnOrTor the value + * @param matches the value * @return this builder */ - public Builder isVpnOrTor(boolean isVpnOrTor) { - return set("is_vpn_or_tor", Conv.BOOLEAN, isVpnOrTor); + public Builder matches(List matches) { + return set("matches", Conv.list(Conv.model(SessionDecision.IpAnalyses.Matches::fromJson)), matches); } /** - * Whether IP is from a data center + * The browser_version field. * - * @param isDataCenter the value + * @param browserVersion the value, or {@code null} to send JSON null * @return this builder */ - public Builder isDataCenter(boolean isDataCenter) { - return set("is_data_center", Conv.BOOLEAN, isDataCenter); + public Builder browserVersion(@Nullable String browserVersion) { + return setNullable("browser_version", Conv.STRING, browserVersion); } /** - * Time zone detected from IP + * The os_version field. * - * @param timeZone the value + * @param osVersion the value, or {@code null} to send JSON null * @return this builder */ - public Builder timeZone(String timeZone) { - return set("time_zone", Conv.STRING, timeZone); + public Builder osVersion(@Nullable String osVersion) { + return setNullable("os_version", Conv.STRING, osVersion); } /** - * Time zone offset + * The browser's user agent string. * - * @param timeZoneOffset the value + * @param userAgent the value, or {@code null} to send JSON null * @return this builder */ - public Builder timeZoneOffset(String timeZoneOffset) { - return set("time_zone_offset", Conv.STRING, timeZoneOffset); + public Builder userAgent(@Nullable String userAgent) { + return setNullable("user_agent", Conv.STRING, userAgent); } /** - * IP geolocation of this entry plus great-circle distances (km) to the ID document address and the POA document address. Distances are null when either side has no resolvable location. + * The Accept-Language header the browser sent. * - * @param ip the value + * @param acceptLanguage the value, or {@code null} to send JSON null * @return this builder */ - public Builder ip(SessionDecision.IpAnalyses.Ip ip) { - return set("ip", Conv.model(SessionDecision.IpAnalyses.Ip::fromJson), ip); + public Builder acceptLanguage(@Nullable String acceptLanguage) { + return setNullable("accept_language", Conv.STRING, acceptLanguage); } /** - * Location extracted from the ID document address plus distances (km) to the IP geolocation and the POA document address. location is null when no document address could be geocoded. + * Identifier of the browsing session the verification ran in. * - * @param idDocument the value + * @param sessionIdentifier the value, or {@code null} to send JSON null * @return this builder */ - public Builder idDocument(SessionDecision.IpAnalyses.IdDocument idDocument) { - return set("id_document", Conv.model(SessionDecision.IpAnalyses.IdDocument::fromJson), idDocument); + public Builder sessionIdentifier(@Nullable String sessionIdentifier) { + return setNullable("session_identifier", Conv.STRING, sessionIdentifier); } /** - * Location extracted from the Proof of Address document plus distances (km) to the IP geolocation and the ID document address. location is null when the session has no POA step or the address could not be geocoded. + * Age of that browsing session in milliseconds when the step ran. * - * @param poaDocument the value + * @param sessionAgeMs the value, or {@code null} to send JSON null * @return this builder */ - public Builder poaDocument(SessionDecision.IpAnalyses.PoaDocument poaDocument) { - return set("poa_document", Conv.model(SessionDecision.IpAnalyses.PoaDocument::fromJson), poaDocument); + public Builder sessionAgeMs(@Nullable Long sessionAgeMs) { + return setNullable("session_age_ms", Conv.LONG, sessionAgeMs); } /** - * The warnings field. + * Accuracy radius, in metres, of the coordinates the device reported. * - * @param warnings the value + * @param coordsAccuracy the value, or {@code null} to send JSON null * @return this builder */ - public Builder warnings(List warnings) { - return set("warnings", Conv.list(Conv.model(SessionDecision.IpAnalyses.Warnings::fromJson)), warnings); + public Builder coordsAccuracy(@Nullable Double coordsAccuracy) { + return setNullable("coords_accuracy", Conv.DOUBLE, coordsAccuracy); } /** - * Cross-session matches found for this entry's IP address or device identity. Every match is another verification session in your application (source is always session) that shares the same value, always belonging to a different vendor user / vendor_data than the current session, capped at 5 per collector (device_fingerprint sums two independently capped collectors, so up to 10 entries are possible). Every item carries match_source, confidence, match_mode, device_info and location_info; the keys recovery_similarity, tls_ja4_corroborated and recovery_gate_reason are present only when match_source is recovered_high. + * Raw device signals collected for the step. * - * @param matches the value + * @param rawDeviceData the value, or {@code null} to send JSON null * @return this builder */ - public Builder matches(List matches) { - return set("matches", Conv.list(Conv.model(SessionDecision.IpAnalyses.Matches::fromJson)), matches); + public Builder rawDeviceData(@Nullable Map rawDeviceData) { + return setAny("raw_device_data", rawDeviceData); } /** @@ -21135,7 +23785,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -23433,7 +26089,13 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB_KEY_PEOPLE"}. */ public static final Feature KYB_KEY_PEOPLE = new Feature("KYB_KEY_PEOPLE"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + /** The value {@code "SIGNATURE"}. */ + public static final Feature SIGNATURE = new Feature("SIGNATURE"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACEMATCH, PROOF_OF_ADDRESS, PHONE, EMAIL, AML, LOCATION, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_REGISTRY, KYB_DOCUMENTS, KYB_KEY_PEOPLE, GEOLOCATION, SIGNATURE); private Feature(String value) { super(value); @@ -23466,6 +26128,114 @@ public boolean isKnown() { } } + /** + * Why a configured database validation produced no result, as {code, message} plus context fields. Present only when database_validations is null for a workflow that has the step, so you can tell "the registry agreed" from "nothing ran". null otherwise. + */ + public static final class DatabaseValidationNotPerformedReason extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("code", "message"); + + private DatabaseValidationNotPerformedReason(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code DatabaseValidationNotPerformedReason} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static DatabaseValidationNotPerformedReason fromJson(JsonNode json) { + return new DatabaseValidationNotPerformedReason(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Stable machine-readable reason. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional code() { + return Json.optional(json, "code", Conv.STRING); + } + + /** + * Human-readable explanation. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional message() { + return Json.optional(json, "message", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link DatabaseValidationNotPerformedReason}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(DatabaseValidationNotPerformedReason from) { + super(from); + } + + /** + * Stable machine-readable reason. + * + * @param code the value + * @return this builder + */ + public Builder code(String code) { + return set("code", Conv.STRING, code); + } + + /** + * Human-readable explanation. + * + * @param message the value + * @return this builder + */ + public Builder message(String message) { + return set("message", Conv.STRING, message); + } + + /** + * Builds the value. + * + * @return a new immutable {@code DatabaseValidationNotPerformedReason} + */ + public DatabaseValidationNotPerformedReason build() { + return new DatabaseValidationNotPerformedReason(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + public static final class Reviews extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("user", "new_status", "comment", "created_at"); @@ -23523,23 +26293,151 @@ public Optional newStatus() { } /** - * The comment field. + * The comment field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional comment() { + return Json.optional(json, "comment", Conv.STRING); + } + + /** + * The created_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional createdAt() { + return Json.optional(json, "created_at", Conv.DATE_TIME); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Reviews}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Reviews from) { + super(from); + } + + /** + * Who performed the review. Usually the console reviewer's identifier (their email), but the value is "API Client" for status updates made with an API key and "Unknown" when no actor could be resolved — so do not parse this field as an email address. + * + * @param user the value + * @return this builder + */ + public Builder user(String user) { + return set("user", Conv.STRING, user); + } + + /** + * The new_status field. + * + * @param newStatus the value + * @return this builder + */ + public Builder newStatus(String newStatus) { + return set("new_status", Conv.STRING, newStatus); + } + + /** + * The comment field. + * + * @param comment the value + * @return this builder + */ + public Builder comment(String comment) { + return set("comment", Conv.STRING, comment); + } + + /** + * The created_at field. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(OffsetDateTime createdAt) { + return set("created_at", Conv.DATE_TIME, createdAt); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Reviews} + */ + public Reviews build() { + return new Reviews(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + /** + * The Console reviewer the session is assigned to, or null when nobody holds it. + */ + public static final class Assignee extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("email", "assigned_at"); + + private Assignee(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Assignee} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Assignee fromJson(JsonNode json) { + return new Assignee(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The email field. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional comment() { - return Json.optional(json, "comment", Conv.STRING); + public Optional email() { + return Json.optional(json, "email", Conv.STRING); } /** - * The created_at field. + * The assigned_at field. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional createdAt() { - return Json.optional(json, "created_at", Conv.DATE_TIME); + public Optional assignedAt() { + return Json.optional(json, "assigned_at", Conv.DATE_TIME); } @Override @@ -23547,61 +26445,41 @@ protected Set knownFields() { return KNOWN_FIELDS; } - /** Builds a {@link Reviews}. */ + /** Builds a {@link Assignee}. */ public static final class Builder extends JsonModel.BaseBuilder { private Builder() {} - private Builder(Reviews from) { + private Builder(Assignee from) { super(from); } /** - * Who performed the review. Usually the console reviewer's identifier (their email), but the value is "API Client" for status updates made with an API key and "Unknown" when no actor could be resolved — so do not parse this field as an email address. - * - * @param user the value - * @return this builder - */ - public Builder user(String user) { - return set("user", Conv.STRING, user); - } - - /** - * The new_status field. - * - * @param newStatus the value - * @return this builder - */ - public Builder newStatus(String newStatus) { - return set("new_status", Conv.STRING, newStatus); - } - - /** - * The comment field. + * The email field. * - * @param comment the value + * @param email the value * @return this builder */ - public Builder comment(String comment) { - return set("comment", Conv.STRING, comment); + public Builder email(String email) { + return set("email", Conv.STRING, email); } /** - * The created_at field. + * The assigned_at field. * - * @param createdAt the value + * @param assignedAt the value, or {@code null} to send JSON null * @return this builder */ - public Builder createdAt(OffsetDateTime createdAt) { - return set("created_at", Conv.DATE_TIME, createdAt); + public Builder assignedAt(@Nullable OffsetDateTime assignedAt) { + return setNullable("assigned_at", Conv.DATE_TIME, assignedAt); } /** * Builds the value. * - * @return a new immutable {@code Reviews} + * @return a new immutable {@code Assignee} */ - public Reviews build() { - return new Reviews(buildJson(), buildFiles()); + public Assignee build() { + return new Assignee(buildJson(), buildFiles()); } @Override @@ -23691,13 +26569,13 @@ public Optional company() { } /** - * Raw ownership snapshot kept for reviewers; its shape differs by registry source and is not a stable contract. Read company.beneficial_owners and company.ownership instead. + * The cap table the registry proved, as it stood when the ownership tier was delivered: direct shareholders and beneficial_owners. Null when the registry proved no ownership. It never carries the registry source's own rows; read company.beneficial_owners and company.ownership for the current record. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> ownershipStructure() { - return Json.optional(json, "ownership_structure", Conv.OBJECT); + public Optional ownershipStructure() { + return Json.optional(json, "ownership_structure", Conv.model(KYBOwnershipStructure::fromJson)); } /** @@ -23764,13 +26642,13 @@ public Builder company(SessionDecision.RegistryChecks.Company company) { } /** - * Raw ownership snapshot kept for reviewers; its shape differs by registry source and is not a stable contract. Read company.beneficial_owners and company.ownership instead. + * The cap table the registry proved, as it stood when the ownership tier was delivered: direct shareholders and beneficial_owners. Null when the registry proved no ownership. It never carries the registry source's own rows; read company.beneficial_owners and company.ownership for the current record. * - * @param ownershipStructure the value + * @param ownershipStructure the value, or {@code null} to send JSON null * @return this builder */ - public Builder ownershipStructure(Map ownershipStructure) { - return setAny("ownership_structure", ownershipStructure); + public Builder ownershipStructure(@Nullable KYBOwnershipStructure ownershipStructure) { + return setNullable("ownership_structure", Conv.model(KYBOwnershipStructure::fromJson), ownershipStructure); } /** @@ -23802,7 +26680,7 @@ protected Builder self() { * Full registry payload for the company (registry record merged with any user-provided or console-edited data). */ public static final class Company extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "ownership", "registry_tier", "registry_tier_delivered", "registry_ownership_status"); + private static final Set KNOWN_FIELDS = Set.of("uuid", "node_id", "status", "registry_status", "data_resolved", "company_name", "registration_number", "country_code", "region", "company_type", "incorporation_date", "registered_address", "tax_number", "risk_level", "verification_status", "is_from_registry", "fetch_status", "alternative_names", "nature_of_business", "registered_capital", "registered_capital_amount", "registered_capital_currency", "website", "email", "phone", "legal_entity_identifier", "location_of_registration", "vat_number", "vat_validation_status", "vat_validated_number", "vat_validation_source", "vat_validated_name", "vat_validated_address", "vat_checked_at", "financial_summary", "officers", "beneficial_owners", "addresses", "industries", "accounts", "registry_data", "user_provided_data", "confirmed_by_user_at", "last_console_edit_at", "is_editable", "ownership", "registry_tier", "registry_tier_delivered", "registry_ownership_status", "registry_monitoring"); private Company(ObjectNode json, Map> files) { super(json, files); @@ -24238,13 +27116,13 @@ public Optional> accounts() { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> registryData() { - return Json.optional(json, "registry_data", Conv.OBJECT); + public Optional registryData() { + return Json.optional(json, "registry_data", Conv.model(KYBRegistryData::fromJson)); } /** @@ -24327,6 +27205,16 @@ public Optional registryOwnershipStatus() { return Json.optional(json, "registry_ownership_status", Conv.STRING); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registryMonitoring() { + return Json.optional(json, "registry_monitoring", Conv.model(SessionDecision.RegistryChecks.Company.RegistryMonitoring::fromJson)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -24741,13 +27629,13 @@ public Builder accounts(@Nullable Map accounts) { } /** - * Raw record returned by the registry source, kept for reviewers. Its shape differs by country and source and is not a stable contract: read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) instead. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * - * @param registryData the value + * @param registryData the value, or {@code null} to send JSON null * @return this builder */ - public Builder registryData(Map registryData) { - return setAny("registry_data", registryData); + public Builder registryData(@Nullable KYBRegistryData registryData) { + return setNullable("registry_data", Conv.model(KYBRegistryData::fromJson), registryData); } /** @@ -24830,6 +27718,16 @@ public Builder registryOwnershipStatus(@Nullable String registryOwnershipStatus) return setNullable("registry_ownership_status", Conv.STRING, registryOwnershipStatus); } + /** + * The latest registry monitor for the company, or null when none exists. + * + * @param registryMonitoring the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder registryMonitoring(SessionDecision.RegistryChecks.Company.@Nullable RegistryMonitoring registryMonitoring) { + return setNullable("registry_monitoring", Conv.model(SessionDecision.RegistryChecks.Company.RegistryMonitoring::fromJson), registryMonitoring); + } + /** * Builds the value. * @@ -26053,6 +28951,272 @@ public boolean isKnown() { } } } + + /** The latest registry monitor for the company, or null when none exists. */ + public static final class RegistryMonitoring extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("uuid", "status", "unavailable_reason", "enrolled_at", "cancelled_at", "last_bill_date", "next_bill_date", "last_event_at", "events_count", "watched_fields"); + + private RegistryMonitoring(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code RegistryMonitoring} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static RegistryMonitoring fromJson(JsonNode json) { + return new RegistryMonitoring(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The uuid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional uuid() { + return Json.optional(json, "uuid", Conv.STRING); + } + + /** + * The status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * The unavailable_reason field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional unavailableReason() { + return Json.optional(json, "unavailable_reason", Conv.STRING); + } + + /** + * The enrolled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional enrolledAt() { + return Json.optional(json, "enrolled_at", Conv.DATE_TIME); + } + + /** + * The cancelled_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional cancelledAt() { + return Json.optional(json, "cancelled_at", Conv.DATE_TIME); + } + + /** + * The last_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastBillDate() { + return Json.optional(json, "last_bill_date", Conv.DATE); + } + + /** + * The next_bill_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nextBillDate() { + return Json.optional(json, "next_bill_date", Conv.DATE); + } + + /** + * The last_event_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastEventAt() { + return Json.optional(json, "last_event_at", Conv.DATE_TIME); + } + + /** + * The events_count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional eventsCount() { + return Json.optional(json, "events_count", Conv.LONG); + } + + /** + * The company fields the monitor watches. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional watchedFields() { + return Json.optional(json, "watched_fields", Conv.ANY); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link RegistryMonitoring}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(RegistryMonitoring from) { + super(from); + } + + /** + * The uuid field. + * + * @param uuid the value + * @return this builder + */ + public Builder uuid(String uuid) { + return set("uuid", Conv.STRING, uuid); + } + + /** + * The status field. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * The unavailable_reason field. + * + * @param unavailableReason the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder unavailableReason(@Nullable String unavailableReason) { + return setNullable("unavailable_reason", Conv.STRING, unavailableReason); + } + + /** + * The enrolled_at field. + * + * @param enrolledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder enrolledAt(@Nullable OffsetDateTime enrolledAt) { + return setNullable("enrolled_at", Conv.DATE_TIME, enrolledAt); + } + + /** + * The cancelled_at field. + * + * @param cancelledAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder cancelledAt(@Nullable OffsetDateTime cancelledAt) { + return setNullable("cancelled_at", Conv.DATE_TIME, cancelledAt); + } + + /** + * The last_bill_date field. + * + * @param lastBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastBillDate(@Nullable LocalDate lastBillDate) { + return setNullable("last_bill_date", Conv.DATE, lastBillDate); + } + + /** + * The next_bill_date field. + * + * @param nextBillDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nextBillDate(@Nullable LocalDate nextBillDate) { + return setNullable("next_bill_date", Conv.DATE, nextBillDate); + } + + /** + * The last_event_at field. + * + * @param lastEventAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastEventAt(@Nullable OffsetDateTime lastEventAt) { + return setNullable("last_event_at", Conv.DATE_TIME, lastEventAt); + } + + /** + * The events_count field. + * + * @param eventsCount the value + * @return this builder + */ + public Builder eventsCount(long eventsCount) { + return set("events_count", Conv.LONG, eventsCount); + } + + /** + * The company fields the monitor watches. + * + * @param watchedFields the value + * @return this builder + */ + public Builder watchedFields(@Nullable Object watchedFields) { + return setAny("watched_fields", watchedFields); + } + + /** + * Builds the value. + * + * @return a new immutable {@code RegistryMonitoring} + */ + public RegistryMonitoring build() { + return new RegistryMonitoring(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } } } diff --git a/src/main/java/me/didit/types/SessionFilesExport.java b/src/main/java/me/didit/types/SessionFilesExport.java new file mode 100644 index 0000000..494d115 --- /dev/null +++ b/src/main/java/me/didit/types/SessionFilesExport.java @@ -0,0 +1,345 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** One ZIP with every file of a session, in original quality. */ +public final class SessionFilesExport extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("export_id", "session_id", "status", "file_count", "size_bytes", "download_url", "expires_at", "error", "created_at", "completed_at"); + + private SessionFilesExport(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionFilesExport} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionFilesExport fromJson(JsonNode json) { + return new SessionFilesExport(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * ID of the export. Pass it to GET /v3/session/{sessionId}/files-export/{exportId}/. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String exportId() { + return Json.required(json, "export_id", Conv.STRING); + } + + /** + * The session the files are from. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String sessionId() { + return Json.required(json, "session_id", Conv.STRING); + } + + /** + * PENDING and PROCESSING while the ZIP is prepared, READY once it can be downloaded, FAILED when it could not be prepared (request a new export), EXPIRED once the ZIP was deleted. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionFilesExport.Status status() { + return Json.required(json, "status", Conv.enumeration(SessionFilesExport.Status::of)); + } + + /** + * Files in the ZIP. Set only while status is READY. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fileCount() { + return Json.optional(json, "file_count", Conv.LONG); + } + + /** + * Size of the ZIP in bytes. Set only while status is READY. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional sizeBytes() { + return Json.optional(json, "size_bytes", Conv.LONG); + } + + /** + * Signed URL of the ZIP, valid for a short time. Set only while status is READY; read the export again for a new one. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional downloadUrl() { + return Json.optional(json, "download_url", Conv.STRING); + } + + /** + * When the ZIP is deleted, 24 hours after it was ready. Set only while status is READY. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional expiresAt() { + return Json.optional(json, "expires_at", Conv.DATE_TIME); + } + + /** + * Why the export failed, when status is FAILED. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional error() { + return Json.optional(json, "error", Conv.STRING); + } + + /** + * When the export was requested. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime createdAt() { + return Json.required(json, "created_at", Conv.DATE_TIME); + } + + /** + * When the ZIP was ready or the export failed. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional completedAt() { + return Json.optional(json, "completed_at", Conv.DATE_TIME); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionFilesExport}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionFilesExport from) { + super(from); + } + + /** + * ID of the export. Pass it to GET /v3/session/{sessionId}/files-export/{exportId}/. + * + * @param exportId the value + * @return this builder + */ + public Builder exportId(String exportId) { + return set("export_id", Conv.STRING, exportId); + } + + /** + * The session the files are from. + * + * @param sessionId the value + * @return this builder + */ + public Builder sessionId(String sessionId) { + return set("session_id", Conv.STRING, sessionId); + } + + /** + * PENDING and PROCESSING while the ZIP is prepared, READY once it can be downloaded, FAILED when it could not be prepared (request a new export), EXPIRED once the ZIP was deleted. + * + * @param status the value + * @return this builder + */ + public Builder status(SessionFilesExport.Status status) { + return set("status", Conv.enumeration(SessionFilesExport.Status::of), status); + } + + /** + * Files in the ZIP. Set only while status is READY. + * + * @param fileCount the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder fileCount(@Nullable Long fileCount) { + return setNullable("file_count", Conv.LONG, fileCount); + } + + /** + * Size of the ZIP in bytes. Set only while status is READY. + * + * @param sizeBytes the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder sizeBytes(@Nullable Long sizeBytes) { + return setNullable("size_bytes", Conv.LONG, sizeBytes); + } + + /** + * Signed URL of the ZIP, valid for a short time. Set only while status is READY; read the export again for a new one. + * + * @param downloadUrl the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder downloadUrl(@Nullable String downloadUrl) { + return setNullable("download_url", Conv.STRING, downloadUrl); + } + + /** + * When the ZIP is deleted, 24 hours after it was ready. Set only while status is READY. + * + * @param expiresAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder expiresAt(@Nullable OffsetDateTime expiresAt) { + return setNullable("expires_at", Conv.DATE_TIME, expiresAt); + } + + /** + * Why the export failed, when status is FAILED. + * + * @param error the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder error(@Nullable String error) { + return setNullable("error", Conv.STRING, error); + } + + /** + * When the export was requested. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(OffsetDateTime createdAt) { + return set("created_at", Conv.DATE_TIME, createdAt); + } + + /** + * When the ZIP was ready or the export failed. + * + * @param completedAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder completedAt(@Nullable OffsetDateTime completedAt) { + return setNullable("completed_at", Conv.DATE_TIME, completedAt); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionFilesExport} + * @throws IllegalStateException when a required field is missing + */ + public SessionFilesExport build() { + require("export_id", false); + require("session_id", false); + require("status", false); + require("file_count", true); + require("size_bytes", true); + require("download_url", true); + require("expires_at", true); + require("error", true); + require("created_at", false); + require("completed_at", true); + return new SessionFilesExport(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * PENDING and PROCESSING while the ZIP is prepared, READY once it can be downloaded, FAILED when it could not be prepared (request a new export), EXPIRED once the ZIP was deleted. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Status extends StringEnum { + /** The value {@code "PENDING"}. */ + public static final Status PENDING = new Status("PENDING"); + + /** The value {@code "PROCESSING"}. */ + public static final Status PROCESSING = new Status("PROCESSING"); + + /** The value {@code "READY"}. */ + public static final Status READY = new Status("READY"); + + /** The value {@code "FAILED"}. */ + public static final Status FAILED = new Status("FAILED"); + + /** The value {@code "EXPIRED"}. */ + public static final Status EXPIRED = new Status("EXPIRED"); + + private static final List KNOWN_VALUES = List.of(PENDING, PROCESSING, READY, FAILED, EXPIRED); + + private Status(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Status of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Status::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } +} diff --git a/src/main/java/me/didit/types/SessionStatusUpdatedEvent.java b/src/main/java/me/didit/types/SessionStatusUpdatedEvent.java index 80f423a..2ac7f68 100644 --- a/src/main/java/me/didit/types/SessionStatusUpdatedEvent.java +++ b/src/main/java/me/didit/types/SessionStatusUpdatedEvent.java @@ -144,7 +144,7 @@ public SessionWebhookEventData.Status status() { } /** - * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation, manual_webhook_recovery, kyb_registry_change or a console_* edit. + * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation (a status.updated resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on session_id and status), manual_webhook_recovery, kyb_registry_change, biometric_retention (a data.updated sent when the session's live biometric data is deleted on schedule) or a console_* edit such as console_registry_edit, console_key_people_skip or console_key_people_regenerate. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -347,7 +347,7 @@ public Builder status(SessionWebhookEventData.Status status) { } /** - * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation, manual_webhook_recovery, kyb_registry_change or a console_* edit. + * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation (a status.updated resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on session_id and status), manual_webhook_recovery, kyb_registry_change, biometric_retention (a data.updated sent when the session's live biometric data is deleted on schedule) or a console_* edit such as console_registry_edit, console_key_people_skip or console_key_people_regenerate. * * @param trigger the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionWebhookEventData.java b/src/main/java/me/didit/types/SessionWebhookEventData.java index 7a4f8d9..5b2deca 100644 --- a/src/main/java/me/didit/types/SessionWebhookEventData.java +++ b/src/main/java/me/didit/types/SessionWebhookEventData.java @@ -94,7 +94,7 @@ public SessionWebhookEventData.Status status() { } /** - * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation, manual_webhook_recovery, kyb_registry_change or a console_* edit. + * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation (a status.updated resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on session_id and status), manual_webhook_recovery, kyb_registry_change, biometric_retention (a data.updated sent when the session's live biometric data is deleted on schedule) or a console_* edit such as console_registry_edit, console_key_people_skip or console_key_people_regenerate. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -237,7 +237,7 @@ public Builder status(SessionWebhookEventData.Status status) { } /** - * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation, manual_webhook_recovery, kyb_registry_change or a console_* edit. + * Present when the event was not produced by the verification flow itself, for example manual_review, manual_step_update, ongoing_monitoring, webhook_reconciliation (a status.updated resent because the first terminal webhook was never created, so you may receive a second event for a decision you already got: deduplicate on session_id and status), manual_webhook_recovery, kyb_registry_change, biometric_retention (a data.updated sent when the session's live biometric data is deleted on schedule) or a console_* edit such as console_registry_edit, console_key_people_skip or console_key_people_regenerate. * * @param trigger the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusParams.java b/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusParams.java index de268a6..f69c9ac 100644 --- a/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusParams.java +++ b/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusParams.java @@ -177,7 +177,7 @@ public Builder toBuilder() { } /** - * The hit_id field. + * The id of the hit in the AML check's hits array (hit_...). A hit id returned in the earlier format is still accepted. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -210,7 +210,7 @@ private Builder(HitUpdates from) { } /** - * The hit_id field. + * The id of the hit in the AML check's hits array (hit_...). A hit id returned in the earlier format is still accepted. * * @param hitId the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusResponse.java b/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusResponse.java index 3345e20..0d06cdc 100644 --- a/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusResponse.java +++ b/src/main/java/me/didit/types/SessionsBulkUpdateAmlHitStatusResponse.java @@ -58,7 +58,7 @@ public String message() { } /** - * The hit_id of every entry in hit_updates, in request order, including hits whose status did not change. + * The id of the hit each entry in hit_updates names, as the session decision returns it, in request order, including hits whose status did not change. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -91,7 +91,7 @@ public Builder message(String message) { } /** - * The hit_id of every entry in hit_updates, in request order, including hits whose status did not change. + * The id of the hit each entry in hit_updates names, as the session decision returns it, in request order, including hits whose status did not change. * * @param updatedHits the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionsCreateKybPartyDraftParams.java b/src/main/java/me/didit/types/SessionsCreateKybPartyDraftParams.java new file mode 100644 index 0000000..7a43edf --- /dev/null +++ b/src/main/java/me/didit/types/SessionsCreateKybPartyDraftParams.java @@ -0,0 +1,643 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** Parameters for {@code sessions.create_kyb_party_draft}. */ +public final class SessionsCreateKybPartyDraftParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id", "entity_type", "full_name", "first_name", "last_name", "role", "roles", "position", "date_of_birth", "company_name", "registration_number", "email", "ownership_percent", "nationality", "phone_number", "custom_fields", "skip_verification"); + + private SessionsCreateKybPartyDraftParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsCreateKybPartyDraftParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsCreateKybPartyDraftParams fromJson(JsonNode json) { + return new SessionsCreateKybPartyDraftParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * Whether the party is an individual or a company. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsCreateKybPartyDraftParams.EntityType entityType() { + return Json.required(json, "entity_type", Conv.enumeration(SessionsCreateKybPartyDraftParams.EntityType::of)); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullName() { + return Json.optional(json, "full_name", Conv.STRING); + } + + /** + * The first_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * The last_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional role() { + return Json.optional(json, "role", Conv.enumeration(SessionsCreateKybPartyDraftParams.Role::of)); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> roles() { + return Json.optional(json, "roles", Conv.list(Conv.enumeration(SessionsCreateKybPartyDraftParams.Roles::of))); + } + + /** + * Job title of a person. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional position() { + return Json.optional(json, "position", Conv.STRING); + } + + /** + * The date_of_birth field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.DATE); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number of a company party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Share of the company the party owns. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipPercent() { + return Json.optional(json, "ownership_percent", Conv.DOUBLE); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String nationality() { + return Json.required(json, "nationality", Conv.STRING); + } + + /** + * The phone_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneNumber() { + return Json.optional(json, "phone_number", Conv.STRING); + } + + /** + * Workflow-defined extra fields. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> customFields() { + return Json.optional(json, "custom_fields", Conv.OBJECT); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional skipVerification() { + return Json.optional(json, "skip_verification", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsCreateKybPartyDraftParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsCreateKybPartyDraftParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Whether the party is an individual or a company. + * + * @param entityType the value + * @return this builder + */ + public Builder entityType(SessionsCreateKybPartyDraftParams.EntityType entityType) { + return set("entity_type", Conv.enumeration(SessionsCreateKybPartyDraftParams.EntityType::of), entityType); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @param fullName the value + * @return this builder + */ + public Builder fullName(String fullName) { + return set("full_name", Conv.STRING, fullName); + } + + /** + * The first_name field. + * + * @param firstName the value + * @return this builder + */ + public Builder firstName(String firstName) { + return set("first_name", Conv.STRING, firstName); + } + + /** + * The last_name field. + * + * @param lastName the value + * @return this builder + */ + public Builder lastName(String lastName) { + return set("last_name", Conv.STRING, lastName); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @param role the value + * @return this builder + */ + public Builder role(SessionsCreateKybPartyDraftParams.Role role) { + return set("role", Conv.enumeration(SessionsCreateKybPartyDraftParams.Role::of), role); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.enumeration(SessionsCreateKybPartyDraftParams.Roles::of)), roles); + } + + /** + * Job title of a person. + * + * @param position the value + * @return this builder + */ + public Builder position(String position) { + return set("position", Conv.STRING, position); + } + + /** + * The date_of_birth field. + * + * @param dateOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder dateOfBirth(@Nullable LocalDate dateOfBirth) { + return setNullable("date_of_birth", Conv.DATE, dateOfBirth); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Registration number of a company party. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Share of the company the party owns. + * + * @param ownershipPercent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipPercent(@Nullable Double ownershipPercent) { + return setNullable("ownership_percent", Conv.DOUBLE, ownershipPercent); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @param nationality the value + * @return this builder + */ + public Builder nationality(String nationality) { + return set("nationality", Conv.STRING, nationality); + } + + /** + * The phone_number field. + * + * @param phoneNumber the value + * @return this builder + */ + public Builder phoneNumber(String phoneNumber) { + return set("phone_number", Conv.STRING, phoneNumber); + } + + /** + * Workflow-defined extra fields. + * + * @param customFields the value + * @return this builder + */ + public Builder customFields(Map customFields) { + return setAny("custom_fields", customFields); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @param skipVerification the value + * @return this builder + */ + public Builder skipVerification(boolean skipVerification) { + return set("skip_verification", Conv.BOOLEAN, skipVerification); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsCreateKybPartyDraftParams} + * @throws IllegalStateException when a required field is missing + */ + public SessionsCreateKybPartyDraftParams build() { + require("entity_type", false); + require("nationality", false); + return new SessionsCreateKybPartyDraftParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the party is an individual or a company. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Role extends StringEnum { + /** The value {@code "director"}. */ + public static final Role DIRECTOR = new Role("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Role NON_EXECUTIVE_DIRECTOR = new Role("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Role SECRETARY = new Role("secretary"); + + /** The value {@code "chairman"}. */ + public static final Role CHAIRMAN = new Role("chairman"); + + /** The value {@code "ubo"}. */ + public static final Role UBO = new Role("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Role SHAREHOLDER = new Role("shareholder"); + + /** The value {@code "representative"}. */ + public static final Role REPRESENTATIVE = new Role("representative"); + + /** The value {@code "founder"}. */ + public static final Role FOUNDER = new Role("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Role LEGAL_ADVISOR = new Role("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Role AUTHORIZED_SIGNATORY = new Role("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Role TRUSTEE = new Role("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Role BENEFICIARY = new Role("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Role SETTLOR = new Role("settlor"); + + /** The value {@code "protector"}. */ + public static final Role PROTECTOR = new Role("protector"); + + /** The value {@code "company_officer"}. */ + public static final Role COMPANY_OFFICER = new Role("company_officer"); + + /** The value {@code "investor"}. */ + public static final Role INVESTOR = new Role("investor"); + + /** The value {@code "other"}. */ + public static final Role OTHER = new Role("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Role(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Role of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Role::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Roles extends StringEnum { + /** The value {@code "director"}. */ + public static final Roles DIRECTOR = new Roles("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Roles NON_EXECUTIVE_DIRECTOR = new Roles("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Roles SECRETARY = new Roles("secretary"); + + /** The value {@code "chairman"}. */ + public static final Roles CHAIRMAN = new Roles("chairman"); + + /** The value {@code "ubo"}. */ + public static final Roles UBO = new Roles("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Roles SHAREHOLDER = new Roles("shareholder"); + + /** The value {@code "representative"}. */ + public static final Roles REPRESENTATIVE = new Roles("representative"); + + /** The value {@code "founder"}. */ + public static final Roles FOUNDER = new Roles("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Roles LEGAL_ADVISOR = new Roles("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Roles AUTHORIZED_SIGNATORY = new Roles("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Roles TRUSTEE = new Roles("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Roles BENEFICIARY = new Roles("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Roles SETTLOR = new Roles("settlor"); + + /** The value {@code "protector"}. */ + public static final Roles PROTECTOR = new Roles("protector"); + + /** The value {@code "company_officer"}. */ + public static final Roles COMPANY_OFFICER = new Roles("company_officer"); + + /** The value {@code "investor"}. */ + public static final Roles INVESTOR = new Roles("investor"); + + /** The value {@code "other"}. */ + public static final Roles OTHER = new Roles("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Roles(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Roles of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Roles::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } +} diff --git a/src/main/java/me/didit/types/SessionsCreateKybPartyDraftResponse.java b/src/main/java/me/didit/types/SessionsCreateKybPartyDraftResponse.java new file mode 100644 index 0000000..f0ca731 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsCreateKybPartyDraftResponse.java @@ -0,0 +1,773 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +public final class SessionsCreateKybPartyDraftResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("draft_id", "created_at", "updated_at", "party"); + + private SessionsCreateKybPartyDraftResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsCreateKybPartyDraftResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsCreateKybPartyDraftResponse fromJson(JsonNode json) { + return new SessionsCreateKybPartyDraftResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The draft_id field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String draftId() { + return Json.required(json, "draft_id", Conv.STRING); + } + + /** + * The created_at field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime createdAt() { + return Json.required(json, "created_at", Conv.DATE_TIME); + } + + /** + * The updated_at field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime updatedAt() { + return Json.required(json, "updated_at", Conv.DATE_TIME); + } + + /** + * The party field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsCreateKybPartyDraftResponse.Party party() { + return Json.required(json, "party", Conv.model(SessionsCreateKybPartyDraftResponse.Party::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsCreateKybPartyDraftResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsCreateKybPartyDraftResponse from) { + super(from); + } + + /** + * The draft_id field. + * + * @param draftId the value + * @return this builder + */ + public Builder draftId(String draftId) { + return set("draft_id", Conv.STRING, draftId); + } + + /** + * The created_at field. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(OffsetDateTime createdAt) { + return set("created_at", Conv.DATE_TIME, createdAt); + } + + /** + * The updated_at field. + * + * @param updatedAt the value + * @return this builder + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + return set("updated_at", Conv.DATE_TIME, updatedAt); + } + + /** + * The party field. + * + * @param party the value + * @return this builder + */ + public Builder party(SessionsCreateKybPartyDraftResponse.Party party) { + return set("party", Conv.model(SessionsCreateKybPartyDraftResponse.Party::fromJson), party); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsCreateKybPartyDraftResponse} + * @throws IllegalStateException when a required field is missing + */ + public SessionsCreateKybPartyDraftResponse build() { + require("draft_id", false); + require("created_at", false); + require("updated_at", false); + require("party", false); + return new SessionsCreateKybPartyDraftResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Party extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("entity_type", "full_name", "first_name", "last_name", "role", "roles", "position", "date_of_birth", "company_name", "registration_number", "email", "ownership_percent", "nationality", "phone_number", "custom_fields", "skip_verification"); + + private Party(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Party} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Party fromJson(JsonNode json) { + return new Party(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Whether the party is an individual or a company. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsCreateKybPartyDraftResponse.Party.EntityType entityType() { + return Json.required(json, "entity_type", Conv.enumeration(SessionsCreateKybPartyDraftResponse.Party.EntityType::of)); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullName() { + return Json.optional(json, "full_name", Conv.STRING); + } + + /** + * The first_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * The last_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional role() { + return Json.optional(json, "role", Conv.enumeration(SessionsCreateKybPartyDraftResponse.Party.Role::of)); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> roles() { + return Json.optional(json, "roles", Conv.list(Conv.enumeration(SessionsCreateKybPartyDraftResponse.Party.Roles::of))); + } + + /** + * Job title of a person. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional position() { + return Json.optional(json, "position", Conv.STRING); + } + + /** + * The date_of_birth field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.DATE); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number of a company party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Share of the company the party owns. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipPercent() { + return Json.optional(json, "ownership_percent", Conv.DOUBLE); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String nationality() { + return Json.required(json, "nationality", Conv.STRING); + } + + /** + * The phone_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneNumber() { + return Json.optional(json, "phone_number", Conv.STRING); + } + + /** + * Workflow-defined extra fields. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> customFields() { + return Json.optional(json, "custom_fields", Conv.OBJECT); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional skipVerification() { + return Json.optional(json, "skip_verification", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Party}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Party from) { + super(from); + } + + /** + * Whether the party is an individual or a company. + * + * @param entityType the value + * @return this builder + */ + public Builder entityType(SessionsCreateKybPartyDraftResponse.Party.EntityType entityType) { + return set("entity_type", Conv.enumeration(SessionsCreateKybPartyDraftResponse.Party.EntityType::of), entityType); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @param fullName the value + * @return this builder + */ + public Builder fullName(String fullName) { + return set("full_name", Conv.STRING, fullName); + } + + /** + * The first_name field. + * + * @param firstName the value + * @return this builder + */ + public Builder firstName(String firstName) { + return set("first_name", Conv.STRING, firstName); + } + + /** + * The last_name field. + * + * @param lastName the value + * @return this builder + */ + public Builder lastName(String lastName) { + return set("last_name", Conv.STRING, lastName); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @param role the value + * @return this builder + */ + public Builder role(SessionsCreateKybPartyDraftResponse.Party.Role role) { + return set("role", Conv.enumeration(SessionsCreateKybPartyDraftResponse.Party.Role::of), role); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.enumeration(SessionsCreateKybPartyDraftResponse.Party.Roles::of)), roles); + } + + /** + * Job title of a person. + * + * @param position the value + * @return this builder + */ + public Builder position(String position) { + return set("position", Conv.STRING, position); + } + + /** + * The date_of_birth field. + * + * @param dateOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder dateOfBirth(@Nullable LocalDate dateOfBirth) { + return setNullable("date_of_birth", Conv.DATE, dateOfBirth); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Registration number of a company party. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Share of the company the party owns. + * + * @param ownershipPercent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipPercent(@Nullable Double ownershipPercent) { + return setNullable("ownership_percent", Conv.DOUBLE, ownershipPercent); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @param nationality the value + * @return this builder + */ + public Builder nationality(String nationality) { + return set("nationality", Conv.STRING, nationality); + } + + /** + * The phone_number field. + * + * @param phoneNumber the value + * @return this builder + */ + public Builder phoneNumber(String phoneNumber) { + return set("phone_number", Conv.STRING, phoneNumber); + } + + /** + * Workflow-defined extra fields. + * + * @param customFields the value + * @return this builder + */ + public Builder customFields(Map customFields) { + return setAny("custom_fields", customFields); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @param skipVerification the value + * @return this builder + */ + public Builder skipVerification(boolean skipVerification) { + return set("skip_verification", Conv.BOOLEAN, skipVerification); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Party} + * @throws IllegalStateException when a required field is missing + */ + public Party build() { + require("entity_type", false); + require("nationality", false); + return new Party(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the party is an individual or a company. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Role extends StringEnum { + /** The value {@code "director"}. */ + public static final Role DIRECTOR = new Role("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Role NON_EXECUTIVE_DIRECTOR = new Role("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Role SECRETARY = new Role("secretary"); + + /** The value {@code "chairman"}. */ + public static final Role CHAIRMAN = new Role("chairman"); + + /** The value {@code "ubo"}. */ + public static final Role UBO = new Role("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Role SHAREHOLDER = new Role("shareholder"); + + /** The value {@code "representative"}. */ + public static final Role REPRESENTATIVE = new Role("representative"); + + /** The value {@code "founder"}. */ + public static final Role FOUNDER = new Role("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Role LEGAL_ADVISOR = new Role("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Role AUTHORIZED_SIGNATORY = new Role("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Role TRUSTEE = new Role("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Role BENEFICIARY = new Role("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Role SETTLOR = new Role("settlor"); + + /** The value {@code "protector"}. */ + public static final Role PROTECTOR = new Role("protector"); + + /** The value {@code "company_officer"}. */ + public static final Role COMPANY_OFFICER = new Role("company_officer"); + + /** The value {@code "investor"}. */ + public static final Role INVESTOR = new Role("investor"); + + /** The value {@code "other"}. */ + public static final Role OTHER = new Role("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Role(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Role of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Role::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Roles extends StringEnum { + /** The value {@code "director"}. */ + public static final Roles DIRECTOR = new Roles("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Roles NON_EXECUTIVE_DIRECTOR = new Roles("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Roles SECRETARY = new Roles("secretary"); + + /** The value {@code "chairman"}. */ + public static final Roles CHAIRMAN = new Roles("chairman"); + + /** The value {@code "ubo"}. */ + public static final Roles UBO = new Roles("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Roles SHAREHOLDER = new Roles("shareholder"); + + /** The value {@code "representative"}. */ + public static final Roles REPRESENTATIVE = new Roles("representative"); + + /** The value {@code "founder"}. */ + public static final Roles FOUNDER = new Roles("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Roles LEGAL_ADVISOR = new Roles("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Roles AUTHORIZED_SIGNATORY = new Roles("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Roles TRUSTEE = new Roles("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Roles BENEFICIARY = new Roles("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Roles SETTLOR = new Roles("settlor"); + + /** The value {@code "protector"}. */ + public static final Roles PROTECTOR = new Roles("protector"); + + /** The value {@code "company_officer"}. */ + public static final Roles COMPANY_OFFICER = new Roles("company_officer"); + + /** The value {@code "investor"}. */ + public static final Roles INVESTOR = new Roles("investor"); + + /** The value {@code "other"}. */ + public static final Roles OTHER = new Roles("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Roles(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Roles of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Roles::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } +} diff --git a/src/main/java/me/didit/types/SessionsCreateParams.java b/src/main/java/me/didit/types/SessionsCreateParams.java index cf639d0..a72a63d 100644 --- a/src/main/java/me/didit/types/SessionsCreateParams.java +++ b/src/main/java/me/didit/types/SessionsCreateParams.java @@ -19,7 +19,7 @@ /** Parameters for {@code sessions.create}. */ public final class SessionsCreateParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("workflow_id", "vendor_data", "callback", "callback_method", "metadata", "tags", "language", "contact_details", "expected_details", "portrait_image", "sandbox_scenario", "sign", "user_state", "biometric_consent"); + private static final Set KNOWN_FIELDS = Set.of("workflow_id", "vendor_data", "multi_account_segment", "callback", "callback_method", "metadata", "tags", "language", "contact_details", "expected_details", "portrait_image", "sandbox_scenario", "sign", "user_state", "biometric_consent"); private SessionsCreateParams(ObjectNode json, Map> files) { super(json, files); @@ -74,6 +74,16 @@ public Optional vendorData() { return Json.optional(json, "vendor_data", Conv.STRING); } + /** + * Optional duplicate-detection realm inside your organization. Duplicate face checks compare this session only with other sessions that carry the same segment, so separate account bases (personal and business accounts, or one per B2B sub-client) do not flag a person who legitimately holds one account in each. Omit it to use the single default realm, which is what every session uses today. Blocklist and allowlist matching ignore this field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional multiAccountSegment() { + return Json.optional(json, "multi_account_segment", Conv.STRING); + } + /** * URL to redirect the user to after verification completes. Didit automatically appends verificationSessionId and status (Approved, Declined, In Review) as query parameters. Custom URL schemes (e.g. myapp://) are supported for mobile callbacks. If omitted, the workflow's default callback_url is used. When the application has allowed domains (allowed_domains on PATCH /v3/webhook/), an http or https callback must be on one of those origins (same scheme, host and port), otherwise the request fails with 400 on callback: callback must be on one of the application's allowed domains: https://app.example.com. Custom URL schemes are always accepted. * @@ -165,7 +175,7 @@ public Optional sandboxScenario() { } /** - * Electronic Signature input for this session. documents are the documents to sign, for a workflow whose Electronic Signature step takes documents from the session (signature_documents_source session or both): up to 20 documents and 50 MB in total. field_values fills the fields whose prefill is api.<key>, on workflow and session documents alike. Creating a session again for the same workflow_id and vendor_data returns the pending session; if that call sends sign, its documents, fields and values must be identical to the first ones, and anything different returns 400 with {"sign": "signature_document_changed"}. See [Electronic signature documents](/sessions-api/create-session#electronic-signature-documents). + * E-signature input for this session. documents are the documents to sign, for a workflow whose E-signature step takes documents from the session (signature_documents_source session or both): up to 20 documents and 50 MB in total. field_values fills the fields whose prefill is api.<key>, on workflow and session documents alike. Creating a session again for the same workflow_id and vendor_data returns the pending session; if that call sends sign, its documents, fields and values must be identical to the first ones, and anything different returns 400 with {"sign": "signature_document_changed"}. See [E-signature documents](/sessions-api/create-session#e-signature-documents). * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -227,6 +237,16 @@ public Builder vendorData(String vendorData) { return set("vendor_data", Conv.STRING, vendorData); } + /** + * Optional duplicate-detection realm inside your organization. Duplicate face checks compare this session only with other sessions that carry the same segment, so separate account bases (personal and business accounts, or one per B2B sub-client) do not flag a person who legitimately holds one account in each. Omit it to use the single default realm, which is what every session uses today. Blocklist and allowlist matching ignore this field. + * + * @param multiAccountSegment the value + * @return this builder + */ + public Builder multiAccountSegment(String multiAccountSegment) { + return set("multi_account_segment", Conv.STRING, multiAccountSegment); + } + /** * URL to redirect the user to after verification completes. Didit automatically appends verificationSessionId and status (Approved, Declined, In Review) as query parameters. Custom URL schemes (e.g. myapp://) are supported for mobile callbacks. If omitted, the workflow's default callback_url is used. When the application has allowed domains (allowed_domains on PATCH /v3/webhook/), an http or https callback must be on one of those origins (same scheme, host and port), otherwise the request fails with 400 on callback: callback must be on one of the application's allowed domains: https://app.example.com. Custom URL schemes are always accepted. * @@ -318,7 +338,7 @@ public Builder sandboxScenario(String sandboxScenario) { } /** - * Electronic Signature input for this session. documents are the documents to sign, for a workflow whose Electronic Signature step takes documents from the session (signature_documents_source session or both): up to 20 documents and 50 MB in total. field_values fills the fields whose prefill is api.<key>, on workflow and session documents alike. Creating a session again for the same workflow_id and vendor_data returns the pending session; if that call sends sign, its documents, fields and values must be identical to the first ones, and anything different returns 400 with {"sign": "signature_document_changed"}. See [Electronic signature documents](/sessions-api/create-session#electronic-signature-documents). + * E-signature input for this session. documents are the documents to sign, for a workflow whose E-signature step takes documents from the session (signature_documents_source session or both): up to 20 documents and 50 MB in total. field_values fills the fields whose prefill is api.<key>, on workflow and session documents alike. Creating a session again for the same workflow_id and vendor_data returns the pending session; if that call sends sign, its documents, fields and values must be identical to the first ones, and anything different returns 400 with {"sign": "signature_document_changed"}. See [E-signature documents](/sessions-api/create-session#e-signature-documents). * * @param sign the value * @return this builder @@ -1425,7 +1445,7 @@ public boolean isKnown() { } /** - * Electronic Signature input for this session. documents are the documents to sign, for a workflow whose Electronic Signature step takes documents from the session (signature_documents_source session or both): up to 20 documents and 50 MB in total. field_values fills the fields whose prefill is api.<key>, on workflow and session documents alike. Creating a session again for the same workflow_id and vendor_data returns the pending session; if that call sends sign, its documents, fields and values must be identical to the first ones, and anything different returns 400 with {"sign": "signature_document_changed"}. See [Electronic signature documents](/sessions-api/create-session#electronic-signature-documents). + * E-signature input for this session. documents are the documents to sign, for a workflow whose E-signature step takes documents from the session (signature_documents_source session or both): up to 20 documents and 50 MB in total. field_values fills the fields whose prefill is api.<key>, on workflow and session documents alike. Creating a session again for the same workflow_id and vendor_data returns the pending session; if that call sends sign, its documents, fields and values must be identical to the first ones, and anything different returns 400 with {"sign": "signature_document_changed"}. See [E-signature documents](/sessions-api/create-session#e-signature-documents). */ public static final class Sign extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("documents", "field_values"); diff --git a/src/main/java/me/didit/types/SessionsDeleteKybPartyDraftParams.java b/src/main/java/me/didit/types/SessionsDeleteKybPartyDraftParams.java new file mode 100644 index 0000000..cd7dd01 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsDeleteKybPartyDraftParams.java @@ -0,0 +1,99 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Parameters for {@code sessions.delete_kyb_party_draft}. */ +public final class SessionsDeleteKybPartyDraftParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id"); + + private SessionsDeleteKybPartyDraftParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsDeleteKybPartyDraftParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsDeleteKybPartyDraftParams fromJson(JsonNode json) { + return new SessionsDeleteKybPartyDraftParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsDeleteKybPartyDraftParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsDeleteKybPartyDraftParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsDeleteKybPartyDraftParams} + */ + public SessionsDeleteKybPartyDraftParams build() { + return new SessionsDeleteKybPartyDraftParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/SessionsExportAmlScreeningHistoryParams.java b/src/main/java/me/didit/types/SessionsExportAmlScreeningHistoryParams.java index 2f97117..9cfe6be 100644 --- a/src/main/java/me/didit/types/SessionsExportAmlScreeningHistoryParams.java +++ b/src/main/java/me/didit/types/SessionsExportAmlScreeningHistoryParams.java @@ -14,7 +14,7 @@ /** Parameters for {@code sessions.export_aml_screening_history}. */ public final class SessionsExportAmlScreeningHistoryParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "month"); private SessionsExportAmlScreeningHistoryParams(ObjectNode json, Map> files) { super(json, files); @@ -59,6 +59,16 @@ public Optional nodeId() { return Json.optional(json, "node_id", Conv.STRING); } + /** + * A UTC calendar month as YYYY-MM. Only screenings completed in that month are returned; without it every month is returned. A malformed month returns 400. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional month() { + return Json.optional(json, "month", Conv.STRING); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -82,6 +92,16 @@ public Builder nodeId(String nodeId) { return set("node_id", Conv.STRING, nodeId); } + /** + * A UTC calendar month as YYYY-MM. Only screenings completed in that month are returned; without it every month is returned. A malformed month returns 400. + * + * @param month the value + * @return this builder + */ + public Builder month(String month) { + return set("month", Conv.STRING, month); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/SessionsListAmlScreeningHistoryParams.java b/src/main/java/me/didit/types/SessionsListAmlScreeningHistoryParams.java index 7f3a320..0ef2173 100644 --- a/src/main/java/me/didit/types/SessionsListAmlScreeningHistoryParams.java +++ b/src/main/java/me/didit/types/SessionsListAmlScreeningHistoryParams.java @@ -14,7 +14,7 @@ /** Parameters for {@code sessions.list_aml_screening_history}. */ public final class SessionsListAmlScreeningHistoryParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("node_id", "limit", "offset", "ordering"); + private static final Set KNOWN_FIELDS = Set.of("node_id", "month", "limit", "offset", "ordering"); private SessionsListAmlScreeningHistoryParams(ObjectNode json, Map> files) { super(json, files); @@ -59,6 +59,16 @@ public Optional nodeId() { return Json.optional(json, "node_id", Conv.STRING); } + /** + * A UTC calendar month as YYYY-MM. Only screenings completed in that month are returned; without it every month is returned. A malformed month returns 400. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional month() { + return Json.optional(json, "month", Conv.STRING); + } + /** * Maximum number of screening runs per page. Defaults to 50. A value below 1 or a non-numeric value falls back to 50; a value above 1,000,000 returns 400. * @@ -112,6 +122,16 @@ public Builder nodeId(String nodeId) { return set("node_id", Conv.STRING, nodeId); } + /** + * A UTC calendar month as YYYY-MM. Only screenings completed in that month are returned; without it every month is returned. A malformed month returns 400. + * + * @param month the value + * @return this builder + */ + public Builder month(String month) { + return set("month", Conv.STRING, month); + } + /** * Maximum number of screening runs per page. Defaults to 50. A value below 1 or a non-numeric value falls back to 50; a value above 1,000,000 returns 400. * diff --git a/src/main/java/me/didit/types/SessionsListKybExtractedPartiesParams.java b/src/main/java/me/didit/types/SessionsListKybExtractedPartiesParams.java new file mode 100644 index 0000000..c315f62 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsListKybExtractedPartiesParams.java @@ -0,0 +1,99 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Parameters for {@code sessions.list_kyb_extracted_parties}. */ +public final class SessionsListKybExtractedPartiesParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id"); + + private SessionsListKybExtractedPartiesParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsListKybExtractedPartiesParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsListKybExtractedPartiesParams fromJson(JsonNode json) { + return new SessionsListKybExtractedPartiesParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsListKybExtractedPartiesParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsListKybExtractedPartiesParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsListKybExtractedPartiesParams} + */ + public SessionsListKybExtractedPartiesParams build() { + return new SessionsListKybExtractedPartiesParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/SessionsListKybExtractedPartiesResponse.java b/src/main/java/me/didit/types/SessionsListKybExtractedPartiesResponse.java new file mode 100644 index 0000000..8085103 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsListKybExtractedPartiesResponse.java @@ -0,0 +1,892 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +public final class SessionsListKybExtractedPartiesResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("parties", "document_count", "node_id"); + + private SessionsListKybExtractedPartiesResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsListKybExtractedPartiesResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsListKybExtractedPartiesResponse fromJson(JsonNode json) { + return new SessionsListKybExtractedPartiesResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The shareholders and directors the uploaded documents name, merged per person. Nobody is labelled a UBO here: that is decided when the parties are submitted. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List parties() { + return Json.required(json, "parties", Conv.list(Conv.model(SessionsListKybExtractedPartiesResponse.Parties::fromJson))); + } + + /** + * Number of uploaded documents the list was read from. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long documentCount() { + return Json.required(json, "document_count", Conv.LONG); + } + + /** + * The node_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsListKybExtractedPartiesResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsListKybExtractedPartiesResponse from) { + super(from); + } + + /** + * The shareholders and directors the uploaded documents name, merged per person. Nobody is labelled a UBO here: that is decided when the parties are submitted. + * + * @param parties the value + * @return this builder + */ + public Builder parties(List parties) { + return set("parties", Conv.list(Conv.model(SessionsListKybExtractedPartiesResponse.Parties::fromJson)), parties); + } + + /** + * Number of uploaded documents the list was read from. + * + * @param documentCount the value + * @return this builder + */ + public Builder documentCount(long documentCount) { + return set("document_count", Conv.LONG, documentCount); + } + + /** + * The node_id field. + * + * @param nodeId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nodeId(@Nullable String nodeId) { + return setNullable("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsListKybExtractedPartiesResponse} + * @throws IllegalStateException when a required field is missing + */ + public SessionsListKybExtractedPartiesResponse build() { + require("parties", false); + require("document_count", false); + return new SessionsListKybExtractedPartiesResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Parties extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("name", "entity_type", "first_name", "last_name", "appointment_date", "designation", "roles", "documents"); + + private Parties(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Parties} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Parties fromJson(JsonNode json) { + return new Parties(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional name() { + return Json.optional(json, "name", Conv.STRING); + } + + /** + * The entity_type field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional entityType() { + return Json.optional(json, "entity_type", Conv.enumeration(SessionsListKybExtractedPartiesResponse.Parties.EntityType::of)); + } + + /** + * The first_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * The last_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * The appointment_date field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional appointmentDate() { + return Json.optional(json, "appointment_date", Conv.STRING); + } + + /** + * The designation field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional designation() { + return Json.optional(json, "designation", Conv.STRING); + } + + /** + * The roles field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> roles() { + return Json.optional(json, "roles", Conv.list(Conv.model(SessionsListKybExtractedPartiesResponse.Parties.Roles::fromJson))); + } + + /** + * The uploaded documents that named this party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> documents() { + return Json.optional(json, "documents", Conv.list(Conv.model(SessionsListKybExtractedPartiesResponse.Parties.Documents::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Parties}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Parties from) { + super(from); + } + + /** + * The name field. + * + * @param name the value + * @return this builder + */ + public Builder name(String name) { + return set("name", Conv.STRING, name); + } + + /** + * The entity_type field. + * + * @param entityType the value + * @return this builder + */ + public Builder entityType(SessionsListKybExtractedPartiesResponse.Parties.EntityType entityType) { + return set("entity_type", Conv.enumeration(SessionsListKybExtractedPartiesResponse.Parties.EntityType::of), entityType); + } + + /** + * The first_name field. + * + * @param firstName the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder firstName(@Nullable String firstName) { + return setNullable("first_name", Conv.STRING, firstName); + } + + /** + * The last_name field. + * + * @param lastName the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder lastName(@Nullable String lastName) { + return setNullable("last_name", Conv.STRING, lastName); + } + + /** + * The appointment_date field. + * + * @param appointmentDate the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder appointmentDate(@Nullable String appointmentDate) { + return setNullable("appointment_date", Conv.STRING, appointmentDate); + } + + /** + * The designation field. + * + * @param designation the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder designation(@Nullable String designation) { + return setNullable("designation", Conv.STRING, designation); + } + + /** + * The roles field. + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.model(SessionsListKybExtractedPartiesResponse.Parties.Roles::fromJson)), roles); + } + + /** + * The uploaded documents that named this party. + * + * @param documents the value + * @return this builder + */ + public Builder documents(List documents) { + return set("documents", Conv.list(Conv.model(SessionsListKybExtractedPartiesResponse.Parties.Documents::fromJson)), documents); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Parties} + */ + public Parties build() { + return new Parties(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + public static final class Roles extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("role", "ownership_percent"); + + private Roles(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Roles} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Roles fromJson(JsonNode json) { + return new Roles(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The role field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional role() { + return Json.optional(json, "role", Conv.enumeration(SessionsListKybExtractedPartiesResponse.Parties.Roles.Role::of)); + } + + /** + * The ownership_percent field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipPercent() { + return Json.optional(json, "ownership_percent", Conv.model(SessionsListKybExtractedPartiesResponse.Parties.Roles.OwnershipPercent::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Roles}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Roles from) { + super(from); + } + + /** + * The role field. + * + * @param role the value + * @return this builder + */ + public Builder role(SessionsListKybExtractedPartiesResponse.Parties.Roles.Role role) { + return set("role", Conv.enumeration(SessionsListKybExtractedPartiesResponse.Parties.Roles.Role::of), role); + } + + /** + * The ownership_percent field. + * + * @param ownershipPercent the value + * @return this builder + */ + public Builder ownershipPercent(SessionsListKybExtractedPartiesResponse.Parties.Roles.OwnershipPercent ownershipPercent) { + return set("ownership_percent", Conv.model(SessionsListKybExtractedPartiesResponse.Parties.Roles.OwnershipPercent::fromJson), ownershipPercent); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Roles} + */ + public Roles build() { + return new Roles(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Role extends StringEnum { + /** The value {@code "director"}. */ + public static final Role DIRECTOR = new Role("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Role NON_EXECUTIVE_DIRECTOR = new Role("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Role SECRETARY = new Role("secretary"); + + /** The value {@code "chairman"}. */ + public static final Role CHAIRMAN = new Role("chairman"); + + /** The value {@code "ubo"}. */ + public static final Role UBO = new Role("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Role SHAREHOLDER = new Role("shareholder"); + + /** The value {@code "representative"}. */ + public static final Role REPRESENTATIVE = new Role("representative"); + + /** The value {@code "founder"}. */ + public static final Role FOUNDER = new Role("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Role LEGAL_ADVISOR = new Role("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Role AUTHORIZED_SIGNATORY = new Role("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Role TRUSTEE = new Role("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Role BENEFICIARY = new Role("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Role SETTLOR = new Role("settlor"); + + /** The value {@code "protector"}. */ + public static final Role PROTECTOR = new Role("protector"); + + /** The value {@code "company_officer"}. */ + public static final Role COMPANY_OFFICER = new Role("company_officer"); + + /** The value {@code "investor"}. */ + public static final Role INVESTOR = new Role("investor"); + + /** The value {@code "other"}. */ + public static final Role OTHER = new Role("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Role(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Role of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Role::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + public static final class OwnershipPercent extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("text", "min", "max"); + + private OwnershipPercent(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code OwnershipPercent} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static OwnershipPercent fromJson(JsonNode json) { + return new OwnershipPercent(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The ownership figure exactly as the document states it, such as 25-50%, >50% or NO EXHIBE. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional text() { + return Json.optional(json, "text", Conv.STRING); + } + + /** + * Lower number read out of text; null when it states none. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional min() { + return Json.optional(json, "min", Conv.DOUBLE); + } + + /** + * Upper number read out of text; null when it states none. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional max() { + return Json.optional(json, "max", Conv.DOUBLE); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link OwnershipPercent}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(OwnershipPercent from) { + super(from); + } + + /** + * The ownership figure exactly as the document states it, such as 25-50%, >50% or NO EXHIBE. + * + * @param text the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder text(@Nullable String text) { + return setNullable("text", Conv.STRING, text); + } + + /** + * Lower number read out of text; null when it states none. + * + * @param min the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder min(@Nullable Double min) { + return setNullable("min", Conv.DOUBLE, min); + } + + /** + * Upper number read out of text; null when it states none. + * + * @param max the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder max(@Nullable Double max) { + return setNullable("max", Conv.DOUBLE, max); + } + + /** + * Builds the value. + * + * @return a new immutable {@code OwnershipPercent} + */ + public OwnershipPercent build() { + return new OwnershipPercent(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + } + + public static final class Documents extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("document_uuid", "document_type", "document_subtype", "original_filename", "status"); + + private Documents(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Documents} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Documents fromJson(JsonNode json) { + return new Documents(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The document_uuid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentUuid() { + return Json.optional(json, "document_uuid", Conv.STRING); + } + + /** + * The document_type field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentType() { + return Json.optional(json, "document_type", Conv.STRING); + } + + /** + * The document_subtype field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentSubtype() { + return Json.optional(json, "document_subtype", Conv.STRING); + } + + /** + * The original_filename field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional originalFilename() { + return Json.optional(json, "original_filename", Conv.STRING); + } + + /** + * The status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Documents}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Documents from) { + super(from); + } + + /** + * The document_uuid field. + * + * @param documentUuid the value + * @return this builder + */ + public Builder documentUuid(String documentUuid) { + return set("document_uuid", Conv.STRING, documentUuid); + } + + /** + * The document_type field. + * + * @param documentType the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder documentType(@Nullable String documentType) { + return setNullable("document_type", Conv.STRING, documentType); + } + + /** + * The document_subtype field. + * + * @param documentSubtype the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder documentSubtype(@Nullable String documentSubtype) { + return setNullable("document_subtype", Conv.STRING, documentSubtype); + } + + /** + * The original_filename field. + * + * @param originalFilename the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder originalFilename(@Nullable String originalFilename) { + return setNullable("original_filename", Conv.STRING, originalFilename); + } + + /** + * The status field. + * + * @param status the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder status(@Nullable String status) { + return setNullable("status", Conv.STRING, status); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Documents} + */ + public Documents build() { + return new Documents(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + } +} diff --git a/src/main/java/me/didit/types/SessionsListKybPartyDraftsParams.java b/src/main/java/me/didit/types/SessionsListKybPartyDraftsParams.java new file mode 100644 index 0000000..a025789 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsListKybPartyDraftsParams.java @@ -0,0 +1,99 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Parameters for {@code sessions.list_kyb_party_drafts}. */ +public final class SessionsListKybPartyDraftsParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id"); + + private SessionsListKybPartyDraftsParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsListKybPartyDraftsParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsListKybPartyDraftsParams fromJson(JsonNode json) { + return new SessionsListKybPartyDraftsParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsListKybPartyDraftsParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsListKybPartyDraftsParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsListKybPartyDraftsParams} + */ + public SessionsListKybPartyDraftsParams build() { + return new SessionsListKybPartyDraftsParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/SessionsListKybPartyDraftsResponse.java b/src/main/java/me/didit/types/SessionsListKybPartyDraftsResponse.java new file mode 100644 index 0000000..d8f0013 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsListKybPartyDraftsResponse.java @@ -0,0 +1,878 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +public final class SessionsListKybPartyDraftsResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("parties", "node_id"); + + private SessionsListKybPartyDraftsResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsListKybPartyDraftsResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsListKybPartyDraftsResponse fromJson(JsonNode json) { + return new SessionsListKybPartyDraftsResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The parties field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> parties() { + return Json.optional(json, "parties", Conv.list(Conv.model(SessionsListKybPartyDraftsResponse.Parties::fromJson))); + } + + /** + * The node_id field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsListKybPartyDraftsResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsListKybPartyDraftsResponse from) { + super(from); + } + + /** + * The parties field. + * + * @param parties the value + * @return this builder + */ + public Builder parties(List parties) { + return set("parties", Conv.list(Conv.model(SessionsListKybPartyDraftsResponse.Parties::fromJson)), parties); + } + + /** + * The node_id field. + * + * @param nodeId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nodeId(@Nullable String nodeId) { + return setNullable("node_id", Conv.STRING, nodeId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsListKybPartyDraftsResponse} + */ + public SessionsListKybPartyDraftsResponse build() { + return new SessionsListKybPartyDraftsResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Parties extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("draft_id", "created_at", "updated_at", "party"); + + private Parties(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Parties} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Parties fromJson(JsonNode json) { + return new Parties(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The draft_id field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String draftId() { + return Json.required(json, "draft_id", Conv.STRING); + } + + /** + * The created_at field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime createdAt() { + return Json.required(json, "created_at", Conv.DATE_TIME); + } + + /** + * The updated_at field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime updatedAt() { + return Json.required(json, "updated_at", Conv.DATE_TIME); + } + + /** + * The party field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsListKybPartyDraftsResponse.Parties.Party party() { + return Json.required(json, "party", Conv.model(SessionsListKybPartyDraftsResponse.Parties.Party::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Parties}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Parties from) { + super(from); + } + + /** + * The draft_id field. + * + * @param draftId the value + * @return this builder + */ + public Builder draftId(String draftId) { + return set("draft_id", Conv.STRING, draftId); + } + + /** + * The created_at field. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(OffsetDateTime createdAt) { + return set("created_at", Conv.DATE_TIME, createdAt); + } + + /** + * The updated_at field. + * + * @param updatedAt the value + * @return this builder + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + return set("updated_at", Conv.DATE_TIME, updatedAt); + } + + /** + * The party field. + * + * @param party the value + * @return this builder + */ + public Builder party(SessionsListKybPartyDraftsResponse.Parties.Party party) { + return set("party", Conv.model(SessionsListKybPartyDraftsResponse.Parties.Party::fromJson), party); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Parties} + * @throws IllegalStateException when a required field is missing + */ + public Parties build() { + require("draft_id", false); + require("created_at", false); + require("updated_at", false); + require("party", false); + return new Parties(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Party extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("entity_type", "full_name", "first_name", "last_name", "role", "roles", "position", "date_of_birth", "company_name", "registration_number", "email", "ownership_percent", "nationality", "phone_number", "custom_fields", "skip_verification"); + + private Party(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Party} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Party fromJson(JsonNode json) { + return new Party(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Whether the party is an individual or a company. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsListKybPartyDraftsResponse.Parties.Party.EntityType entityType() { + return Json.required(json, "entity_type", Conv.enumeration(SessionsListKybPartyDraftsResponse.Parties.Party.EntityType::of)); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullName() { + return Json.optional(json, "full_name", Conv.STRING); + } + + /** + * The first_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * The last_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional role() { + return Json.optional(json, "role", Conv.enumeration(SessionsListKybPartyDraftsResponse.Parties.Party.Role::of)); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> roles() { + return Json.optional(json, "roles", Conv.list(Conv.enumeration(SessionsListKybPartyDraftsResponse.Parties.Party.Roles::of))); + } + + /** + * Job title of a person. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional position() { + return Json.optional(json, "position", Conv.STRING); + } + + /** + * The date_of_birth field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.DATE); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number of a company party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Share of the company the party owns. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipPercent() { + return Json.optional(json, "ownership_percent", Conv.DOUBLE); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String nationality() { + return Json.required(json, "nationality", Conv.STRING); + } + + /** + * The phone_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneNumber() { + return Json.optional(json, "phone_number", Conv.STRING); + } + + /** + * Workflow-defined extra fields. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> customFields() { + return Json.optional(json, "custom_fields", Conv.OBJECT); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional skipVerification() { + return Json.optional(json, "skip_verification", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Party}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Party from) { + super(from); + } + + /** + * Whether the party is an individual or a company. + * + * @param entityType the value + * @return this builder + */ + public Builder entityType(SessionsListKybPartyDraftsResponse.Parties.Party.EntityType entityType) { + return set("entity_type", Conv.enumeration(SessionsListKybPartyDraftsResponse.Parties.Party.EntityType::of), entityType); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @param fullName the value + * @return this builder + */ + public Builder fullName(String fullName) { + return set("full_name", Conv.STRING, fullName); + } + + /** + * The first_name field. + * + * @param firstName the value + * @return this builder + */ + public Builder firstName(String firstName) { + return set("first_name", Conv.STRING, firstName); + } + + /** + * The last_name field. + * + * @param lastName the value + * @return this builder + */ + public Builder lastName(String lastName) { + return set("last_name", Conv.STRING, lastName); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @param role the value + * @return this builder + */ + public Builder role(SessionsListKybPartyDraftsResponse.Parties.Party.Role role) { + return set("role", Conv.enumeration(SessionsListKybPartyDraftsResponse.Parties.Party.Role::of), role); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.enumeration(SessionsListKybPartyDraftsResponse.Parties.Party.Roles::of)), roles); + } + + /** + * Job title of a person. + * + * @param position the value + * @return this builder + */ + public Builder position(String position) { + return set("position", Conv.STRING, position); + } + + /** + * The date_of_birth field. + * + * @param dateOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder dateOfBirth(@Nullable LocalDate dateOfBirth) { + return setNullable("date_of_birth", Conv.DATE, dateOfBirth); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Registration number of a company party. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Share of the company the party owns. + * + * @param ownershipPercent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipPercent(@Nullable Double ownershipPercent) { + return setNullable("ownership_percent", Conv.DOUBLE, ownershipPercent); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @param nationality the value + * @return this builder + */ + public Builder nationality(String nationality) { + return set("nationality", Conv.STRING, nationality); + } + + /** + * The phone_number field. + * + * @param phoneNumber the value + * @return this builder + */ + public Builder phoneNumber(String phoneNumber) { + return set("phone_number", Conv.STRING, phoneNumber); + } + + /** + * Workflow-defined extra fields. + * + * @param customFields the value + * @return this builder + */ + public Builder customFields(Map customFields) { + return setAny("custom_fields", customFields); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @param skipVerification the value + * @return this builder + */ + public Builder skipVerification(boolean skipVerification) { + return set("skip_verification", Conv.BOOLEAN, skipVerification); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Party} + * @throws IllegalStateException when a required field is missing + */ + public Party build() { + require("entity_type", false); + require("nationality", false); + return new Party(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the party is an individual or a company. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Role extends StringEnum { + /** The value {@code "director"}. */ + public static final Role DIRECTOR = new Role("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Role NON_EXECUTIVE_DIRECTOR = new Role("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Role SECRETARY = new Role("secretary"); + + /** The value {@code "chairman"}. */ + public static final Role CHAIRMAN = new Role("chairman"); + + /** The value {@code "ubo"}. */ + public static final Role UBO = new Role("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Role SHAREHOLDER = new Role("shareholder"); + + /** The value {@code "representative"}. */ + public static final Role REPRESENTATIVE = new Role("representative"); + + /** The value {@code "founder"}. */ + public static final Role FOUNDER = new Role("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Role LEGAL_ADVISOR = new Role("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Role AUTHORIZED_SIGNATORY = new Role("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Role TRUSTEE = new Role("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Role BENEFICIARY = new Role("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Role SETTLOR = new Role("settlor"); + + /** The value {@code "protector"}. */ + public static final Role PROTECTOR = new Role("protector"); + + /** The value {@code "company_officer"}. */ + public static final Role COMPANY_OFFICER = new Role("company_officer"); + + /** The value {@code "investor"}. */ + public static final Role INVESTOR = new Role("investor"); + + /** The value {@code "other"}. */ + public static final Role OTHER = new Role("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Role(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Role of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Role::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Roles extends StringEnum { + /** The value {@code "director"}. */ + public static final Roles DIRECTOR = new Roles("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Roles NON_EXECUTIVE_DIRECTOR = new Roles("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Roles SECRETARY = new Roles("secretary"); + + /** The value {@code "chairman"}. */ + public static final Roles CHAIRMAN = new Roles("chairman"); + + /** The value {@code "ubo"}. */ + public static final Roles UBO = new Roles("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Roles SHAREHOLDER = new Roles("shareholder"); + + /** The value {@code "representative"}. */ + public static final Roles REPRESENTATIVE = new Roles("representative"); + + /** The value {@code "founder"}. */ + public static final Roles FOUNDER = new Roles("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Roles LEGAL_ADVISOR = new Roles("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Roles AUTHORIZED_SIGNATORY = new Roles("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Roles TRUSTEE = new Roles("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Roles BENEFICIARY = new Roles("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Roles SETTLOR = new Roles("settlor"); + + /** The value {@code "protector"}. */ + public static final Roles PROTECTOR = new Roles("protector"); + + /** The value {@code "company_officer"}. */ + public static final Roles COMPANY_OFFICER = new Roles("company_officer"); + + /** The value {@code "investor"}. */ + public static final Roles INVESTOR = new Roles("investor"); + + /** The value {@code "other"}. */ + public static final Roles OTHER = new Roles("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Roles(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Roles of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Roles::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } + } +} diff --git a/src/main/java/me/didit/types/SessionsListParams.java b/src/main/java/me/didit/types/SessionsListParams.java index 5c82ed1..fc5c2e1 100644 --- a/src/main/java/me/didit/types/SessionsListParams.java +++ b/src/main/java/me/didit/types/SessionsListParams.java @@ -4,6 +4,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import java.time.LocalDate; +import java.time.OffsetDateTime; import java.util.List; import java.util.Map; import java.util.Optional; @@ -16,7 +17,7 @@ /** Parameters for {@code sessions.list}. */ public final class SessionsListParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("session_kind", "limit", "offset", "status", "vendor_data", "search", "workflow_id", "date_from", "date_to", "country", "document_type", "document_name", "region", "didit_internal_id", "session_type", "api_service", "screened_full_name", "warning", "status_initialized_as_in_review", "is_kyc_to_be_reviewed", "euuid", "organization_name"); + private static final Set KNOWN_FIELDS = Set.of("session_kind", "limit", "offset", "status", "vendor_data", "search", "workflow_id", "date_from", "date_to", "tags", "decided_from", "decided_to", "country", "document_type", "document_name", "region", "didit_internal_id", "session_type", "api_service", "screened_full_name", "warning", "status_initialized_as_in_review", "is_kyc_to_be_reviewed", "euuid", "organization_name"); private SessionsListParams(ObjectNode json, Map> files) { super(json, files); @@ -141,6 +142,36 @@ public Optional dateTo() { return Json.optional(json, "date_to", Conv.DATE); } + /** + * Comma-separated tag ids (tags of your application). Returns the sessions that carry any of them. Ids that are not valid UUIDs are ignored, and when none is valid the list is empty. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional tags() { + return Json.optional(json, "tags", Conv.STRING); + } + + /** + * ISO 8601 datetime. Returns the sessions whose status last changed at or after it. It filters on the time of the last status change, not on creation time. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional decidedFrom() { + return Json.optional(json, "decided_from", Conv.DATE_TIME); + } + + /** + * ISO 8601 datetime. Returns the sessions whose status last changed before it. Combine with decided_from for a half-open window. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional decidedTo() { + return Json.optional(json, "decided_to", Conv.DATE_TIME); + } + /** * Comma-separated country filter. For KYC rows: ISO 3166-1 alpha-3 codes of the ID document's issuing state (e.g. ESP,USA), which may differ from nationality. For KYB rows: the registry company's country code. * @@ -374,6 +405,36 @@ public Builder dateTo(LocalDate dateTo) { return set("date_to", Conv.DATE, dateTo); } + /** + * Comma-separated tag ids (tags of your application). Returns the sessions that carry any of them. Ids that are not valid UUIDs are ignored, and when none is valid the list is empty. + * + * @param tags the value + * @return this builder + */ + public Builder tags(String tags) { + return set("tags", Conv.STRING, tags); + } + + /** + * ISO 8601 datetime. Returns the sessions whose status last changed at or after it. It filters on the time of the last status change, not on creation time. + * + * @param decidedFrom the value + * @return this builder + */ + public Builder decidedFrom(OffsetDateTime decidedFrom) { + return set("decided_from", Conv.DATE_TIME, decidedFrom); + } + + /** + * ISO 8601 datetime. Returns the sessions whose status last changed before it. Combine with decided_from for a half-open window. + * + * @param decidedTo the value + * @return this builder + */ + public Builder decidedTo(OffsetDateTime decidedTo) { + return set("decided_to", Conv.DATE_TIME, decidedTo); + } + /** * Comma-separated country filter. For KYC rows: ISO 3166-1 alpha-3 codes of the ID document's issuing state (e.g. ESP,USA), which may differ from nationality. For KYB rows: the registry company's country code. * diff --git a/src/main/java/me/didit/types/SessionsListResponse.java b/src/main/java/me/didit/types/SessionsListResponse.java index d079edc..0b43b95 100644 --- a/src/main/java/me/didit/types/SessionsListResponse.java +++ b/src/main/java/me/didit/types/SessionsListResponse.java @@ -52,7 +52,7 @@ public Builder toBuilder() { } /** - * Number of sessions matching the filters. Exact for KYC rows; for KYB rows it is capped at 100 (use next to know whether more pages exist). For session_kind=all it is the sum of both kinds. + * Number of sessions matching the filters: exact up to 100 and capped at 100 beyond that, so do not use it as a total. Use next to know whether more pages exist. For session_kind=all it is the sum of both kinds, each capped at 100. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -105,7 +105,7 @@ private Builder(SessionsListResponse from) { } /** - * Number of sessions matching the filters. Exact for KYC rows; for KYB rows it is capped at 100 (use next to know whether more pages exist). For session_kind=all it is the sum of both kinds. + * Number of sessions matching the filters: exact up to 100 and capped at 100 beyond that, so do not use it as a total. Use next to know whether more pages exist. For session_kind=all it is the sum of both kinds, each capped at 100. * * @param count the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionsPreviewDecisionEmailResponse.java b/src/main/java/me/didit/types/SessionsPreviewDecisionEmailResponse.java index d1d27a4..4f5e8da 100644 --- a/src/main/java/me/didit/types/SessionsPreviewDecisionEmailResponse.java +++ b/src/main/java/me/didit/types/SessionsPreviewDecisionEmailResponse.java @@ -15,7 +15,7 @@ import org.jspecify.annotations.Nullable; public final class SessionsPreviewDecisionEmailResponse extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("recipient", "recipient_source", "sender", "sender_name", "sender_email", "sender_kind", "subject", "html", "language", "will_be_sent", "not_sent_reason", "preview_token"); + private static final Set KNOWN_FIELDS = Set.of("recipient", "recipient_source", "sender", "sender_name", "sender_email", "sender_kind", "subject", "html", "text", "language", "will_be_sent", "not_sent_reason", "preview_token"); private SessionsPreviewDecisionEmailResponse(ObjectNode json, Map> files) { super(json, files); @@ -130,6 +130,16 @@ public String html() { return Json.required(json, "html", Conv.STRING); } + /** + * The email's words as plain text, as the person's Messages thread keeps them, for a compact preview (the HTML stays the email the person receives). + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String text() { + return Json.required(json, "text", Conv.STRING); + } + /** * The language the email is written in. English (en) when the email_language you asked for is not offered. * @@ -263,6 +273,16 @@ public Builder html(String html) { return set("html", Conv.STRING, html); } + /** + * The email's words as plain text, as the person's Messages thread keeps them, for a compact preview (the HTML stays the email the person receives). + * + * @param text the value + * @return this builder + */ + public Builder text(String text) { + return set("text", Conv.STRING, text); + } + /** * The language the email is written in. English (en) when the email_language you asked for is not offered. * @@ -318,6 +338,7 @@ public SessionsPreviewDecisionEmailResponse build() { require("sender_kind", false); require("subject", false); require("html", false); + require("text", false); require("language", false); require("will_be_sent", false); require("not_sent_reason", true); diff --git a/src/main/java/me/didit/types/SessionsPreviewResubmissionParams.java b/src/main/java/me/didit/types/SessionsPreviewResubmissionParams.java index d5485df..01a22f3 100644 --- a/src/main/java/me/didit/types/SessionsPreviewResubmissionParams.java +++ b/src/main/java/me/didit/types/SessionsPreviewResubmissionParams.java @@ -323,7 +323,10 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB"}. */ public static final Feature KYB = new Feature("KYB"); - private static final List KNOWN_VALUES = List.of(OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_DOCUMENTS, ID_VERIFICATION, POA, PHONE, EMAIL, KYB_REGISTRY, KYB_KEY_PEOPLE, KYB); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + private static final List KNOWN_VALUES = List.of(OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_DOCUMENTS, ID_VERIFICATION, POA, PHONE, EMAIL, KYB_REGISTRY, KYB_KEY_PEOPLE, KYB, GEOLOCATION); private Feature(String value) { super(value); diff --git a/src/main/java/me/didit/types/SessionsPreviewResubmissionResponse.java b/src/main/java/me/didit/types/SessionsPreviewResubmissionResponse.java index 39d7c08..4f32381 100644 --- a/src/main/java/me/didit/types/SessionsPreviewResubmissionResponse.java +++ b/src/main/java/me/didit/types/SessionsPreviewResubmissionResponse.java @@ -15,7 +15,7 @@ import org.jspecify.annotations.Nullable; public final class SessionsPreviewResubmissionResponse extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("recipient", "recipient_source", "sender", "sender_name", "sender_email", "sender_kind", "subject", "html", "language", "will_be_sent", "not_sent_reason", "nodes_to_resubmit", "requires_user_action", "preview_token"); + private static final Set KNOWN_FIELDS = Set.of("recipient", "recipient_source", "sender", "sender_name", "sender_email", "sender_kind", "subject", "html", "text", "language", "will_be_sent", "not_sent_reason", "nodes_to_resubmit", "requires_user_action", "preview_token"); private SessionsPreviewResubmissionResponse(ObjectNode json, Map> files) { super(json, files); @@ -130,6 +130,16 @@ public String html() { return Json.required(json, "html", Conv.STRING); } + /** + * The email's words as plain text, as the person's Messages thread keeps them, for a compact preview (the HTML stays the email the person receives). + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String text() { + return Json.required(json, "text", Conv.STRING); + } + /** * The language the email is written in. English (en) when the email_language you asked for is not offered. * @@ -283,6 +293,16 @@ public Builder html(String html) { return set("html", Conv.STRING, html); } + /** + * The email's words as plain text, as the person's Messages thread keeps them, for a compact preview (the HTML stays the email the person receives). + * + * @param text the value + * @return this builder + */ + public Builder text(String text) { + return set("text", Conv.STRING, text); + } + /** * The language the email is written in. English (en) when the email_language you asked for is not offered. * @@ -358,6 +378,7 @@ public SessionsPreviewResubmissionResponse build() { require("sender_kind", false); require("subject", false); require("html", false); + require("text", false); require("language", false); require("will_be_sent", false); require("not_sent_reason", true); @@ -696,7 +717,10 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB"}. */ public static final Feature KYB = new Feature("KYB"); - private static final List KNOWN_VALUES = List.of(OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_DOCUMENTS, ID_VERIFICATION, POA, PHONE, EMAIL, KYB_REGISTRY, KYB_KEY_PEOPLE, KYB); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + private static final List KNOWN_VALUES = List.of(OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_DOCUMENTS, ID_VERIFICATION, POA, PHONE, EMAIL, KYB_REGISTRY, KYB_KEY_PEOPLE, KYB, GEOLOCATION); private Feature(String value) { super(value); diff --git a/src/main/java/me/didit/types/SessionsSubmitKybPartiesParams.java b/src/main/java/me/didit/types/SessionsSubmitKybPartiesParams.java new file mode 100644 index 0000000..26f9967 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsSubmitKybPartiesParams.java @@ -0,0 +1,119 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Parameters for {@code sessions.submit_kyb_parties}. */ +public final class SessionsSubmitKybPartiesParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id", "locale"); + + private SessionsSubmitKybPartiesParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsSubmitKybPartiesParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsSubmitKybPartiesParams fromJson(JsonNode json) { + return new SessionsSubmitKybPartiesParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * Locale used to translate the response of the step the session advances to. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional locale() { + return Json.optional(json, "locale", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsSubmitKybPartiesParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsSubmitKybPartiesParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Locale used to translate the response of the step the session advances to. + * + * @param locale the value + * @return this builder + */ + public Builder locale(String locale) { + return set("locale", Conv.STRING, locale); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsSubmitKybPartiesParams} + */ + public SessionsSubmitKybPartiesParams build() { + return new SessionsSubmitKybPartiesParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/SessionsSubmitKybPartiesResponse.java b/src/main/java/me/didit/types/SessionsSubmitKybPartiesResponse.java new file mode 100644 index 0000000..00903a8 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsSubmitKybPartiesResponse.java @@ -0,0 +1,219 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +public final class SessionsSubmitKybPartiesResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("valid", "next_step", "status", "advanced", "already_submitted", "kyb_key_people_status", "parties"); + + private SessionsSubmitKybPartiesResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsSubmitKybPartiesResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsSubmitKybPartiesResponse fromJson(JsonNode json) { + return new SessionsSubmitKybPartiesResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The valid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional valid() { + return Json.optional(json, "valid", Conv.BOOLEAN); + } + + /** + * Step the session is on. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nextStep() { + return Json.optional(json, "next_step", Conv.STRING); + } + + /** + * Status of the business session. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * true when this call declared the parties and advanced the session. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional advanced() { + return Json.optional(json, "advanced", Conv.BOOLEAN); + } + + /** + * true when the parties had been declared by an earlier call. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional alreadySubmitted() { + return Json.optional(json, "already_submitted", Conv.BOOLEAN); + } + + /** + * The kyb_key_people_status field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional kybKeyPeopleStatus() { + return Json.optional(json, "kyb_key_people_status", Conv.STRING); + } + + /** + * The parties field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> parties() { + return Json.optional(json, "parties", Conv.list(Conv.model(KYBKeyPeopleParty::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsSubmitKybPartiesResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsSubmitKybPartiesResponse from) { + super(from); + } + + /** + * The valid field. + * + * @param valid the value + * @return this builder + */ + public Builder valid(boolean valid) { + return set("valid", Conv.BOOLEAN, valid); + } + + /** + * Step the session is on. + * + * @param nextStep the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nextStep(@Nullable String nextStep) { + return setNullable("next_step", Conv.STRING, nextStep); + } + + /** + * Status of the business session. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * true when this call declared the parties and advanced the session. + * + * @param advanced the value + * @return this builder + */ + public Builder advanced(boolean advanced) { + return set("advanced", Conv.BOOLEAN, advanced); + } + + /** + * true when the parties had been declared by an earlier call. + * + * @param alreadySubmitted the value + * @return this builder + */ + public Builder alreadySubmitted(boolean alreadySubmitted) { + return set("already_submitted", Conv.BOOLEAN, alreadySubmitted); + } + + /** + * The kyb_key_people_status field. + * + * @param kybKeyPeopleStatus the value + * @return this builder + */ + public Builder kybKeyPeopleStatus(String kybKeyPeopleStatus) { + return set("kyb_key_people_status", Conv.STRING, kybKeyPeopleStatus); + } + + /** + * The parties field. + * + * @param parties the value + * @return this builder + */ + public Builder parties(List parties) { + return set("parties", Conv.list(Conv.model(KYBKeyPeopleParty::fromJson)), parties); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsSubmitKybPartiesResponse} + */ + public SessionsSubmitKybPartiesResponse build() { + return new SessionsSubmitKybPartiesResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusParams.java b/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusParams.java index ee877ab..fd852f9 100644 --- a/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusParams.java +++ b/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusParams.java @@ -61,7 +61,7 @@ public Optional nodeIdQuery() { } /** - * The id of the hit in the AML check's hits array. + * The id of the hit in the AML check's hits array (hit_...). A hit id returned in the earlier format is still accepted. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -114,7 +114,7 @@ public Builder nodeIdQuery(String nodeIdQuery) { } /** - * The id of the hit in the AML check's hits array. + * The id of the hit in the AML check's hits array (hit_...). A hit id returned in the earlier format is still accepted. * * @param hitId the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusResponse.java b/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusResponse.java index 2184fb3..a2e13e4 100644 --- a/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusResponse.java +++ b/src/main/java/me/didit/types/SessionsUpdateAmlHitStatusResponse.java @@ -59,7 +59,7 @@ public String message() { } /** - * The updated hit, with surrounding whitespace removed. + * The id of the updated hit, as the session decision returns it, also when the request named the hit by an id in the earlier format. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -102,7 +102,7 @@ public Builder message(String message) { } /** - * The updated hit, with surrounding whitespace removed. + * The id of the updated hit, as the session decision returns it, also when the request named the hit by an id in the earlier format. * * @param hitId the value * @return this builder diff --git a/src/main/java/me/didit/types/SessionsUpdateKybCompanyDataResponse.java b/src/main/java/me/didit/types/SessionsUpdateKybCompanyDataResponse.java index c86bb1e..005b161 100644 --- a/src/main/java/me/didit/types/SessionsUpdateKybCompanyDataResponse.java +++ b/src/main/java/me/didit/types/SessionsUpdateKybCompanyDataResponse.java @@ -456,13 +456,13 @@ public Optional> accounts() { } /** - * Raw registry payload snapshot. Every key you PATCH is merged into this map (dates serialized as ISO strings), so the "extracted from registry" view reflects operator corrections. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public Optional> registryData() { - return Json.optional(json, "registry_data", Conv.OBJECT); + public Optional registryData() { + return Json.optional(json, "registry_data", Conv.model(KYBRegistryData::fromJson)); } /** @@ -919,13 +919,13 @@ public Builder accounts(@Nullable Map accounts) { } /** - * Raw registry payload snapshot. Every key you PATCH is merged into this map (dates serialized as ISO strings), so the "extracted from registry" view reflects operator corrections. + * Didit's normalized registry detail for the company: the ownership outcome (ownership_error, section_errors, ubo_resolution, lite_enrichment), the corrections made with update-data, and registry facts that have no field of their own. It never carries the registry source's own record. Every key is optional and present only when the company has a value for it; new keys may be added. Read the canonical fields (addresses, industries, ownership, beneficial_owners[].shareholding) for anything they cover. * * @param registryData the value, or {@code null} to send JSON null * @return this builder */ - public Builder registryData(@Nullable Map registryData) { - return setAny("registry_data", registryData); + public Builder registryData(@Nullable KYBRegistryData registryData) { + return setNullable("registry_data", Conv.model(KYBRegistryData::fromJson), registryData); } /** diff --git a/src/main/java/me/didit/types/SessionsUpdateKybPartyDraftParams.java b/src/main/java/me/didit/types/SessionsUpdateKybPartyDraftParams.java new file mode 100644 index 0000000..bf3a5c6 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsUpdateKybPartyDraftParams.java @@ -0,0 +1,640 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** Parameters for {@code sessions.update_kyb_party_draft}. */ +public final class SessionsUpdateKybPartyDraftParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id", "entity_type", "full_name", "first_name", "last_name", "role", "roles", "position", "date_of_birth", "company_name", "registration_number", "email", "ownership_percent", "nationality", "phone_number", "custom_fields", "skip_verification"); + + private SessionsUpdateKybPartyDraftParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsUpdateKybPartyDraftParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsUpdateKybPartyDraftParams fromJson(JsonNode json) { + return new SessionsUpdateKybPartyDraftParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * Whether the party is an individual or a company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional entityType() { + return Json.optional(json, "entity_type", Conv.enumeration(SessionsUpdateKybPartyDraftParams.EntityType::of)); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullName() { + return Json.optional(json, "full_name", Conv.STRING); + } + + /** + * The first_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * The last_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional role() { + return Json.optional(json, "role", Conv.enumeration(SessionsUpdateKybPartyDraftParams.Role::of)); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> roles() { + return Json.optional(json, "roles", Conv.list(Conv.enumeration(SessionsUpdateKybPartyDraftParams.Roles::of))); + } + + /** + * Job title of a person. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional position() { + return Json.optional(json, "position", Conv.STRING); + } + + /** + * The date_of_birth field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.DATE); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number of a company party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Share of the company the party owns. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipPercent() { + return Json.optional(json, "ownership_percent", Conv.DOUBLE); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nationality() { + return Json.optional(json, "nationality", Conv.STRING); + } + + /** + * The phone_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneNumber() { + return Json.optional(json, "phone_number", Conv.STRING); + } + + /** + * Workflow-defined extra fields. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> customFields() { + return Json.optional(json, "custom_fields", Conv.OBJECT); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional skipVerification() { + return Json.optional(json, "skip_verification", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsUpdateKybPartyDraftParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsUpdateKybPartyDraftParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Whether the party is an individual or a company. + * + * @param entityType the value + * @return this builder + */ + public Builder entityType(SessionsUpdateKybPartyDraftParams.EntityType entityType) { + return set("entity_type", Conv.enumeration(SessionsUpdateKybPartyDraftParams.EntityType::of), entityType); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @param fullName the value + * @return this builder + */ + public Builder fullName(String fullName) { + return set("full_name", Conv.STRING, fullName); + } + + /** + * The first_name field. + * + * @param firstName the value + * @return this builder + */ + public Builder firstName(String firstName) { + return set("first_name", Conv.STRING, firstName); + } + + /** + * The last_name field. + * + * @param lastName the value + * @return this builder + */ + public Builder lastName(String lastName) { + return set("last_name", Conv.STRING, lastName); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @param role the value + * @return this builder + */ + public Builder role(SessionsUpdateKybPartyDraftParams.Role role) { + return set("role", Conv.enumeration(SessionsUpdateKybPartyDraftParams.Role::of), role); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.enumeration(SessionsUpdateKybPartyDraftParams.Roles::of)), roles); + } + + /** + * Job title of a person. + * + * @param position the value + * @return this builder + */ + public Builder position(String position) { + return set("position", Conv.STRING, position); + } + + /** + * The date_of_birth field. + * + * @param dateOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder dateOfBirth(@Nullable LocalDate dateOfBirth) { + return setNullable("date_of_birth", Conv.DATE, dateOfBirth); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Registration number of a company party. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Share of the company the party owns. + * + * @param ownershipPercent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipPercent(@Nullable Double ownershipPercent) { + return setNullable("ownership_percent", Conv.DOUBLE, ownershipPercent); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @param nationality the value + * @return this builder + */ + public Builder nationality(String nationality) { + return set("nationality", Conv.STRING, nationality); + } + + /** + * The phone_number field. + * + * @param phoneNumber the value + * @return this builder + */ + public Builder phoneNumber(String phoneNumber) { + return set("phone_number", Conv.STRING, phoneNumber); + } + + /** + * Workflow-defined extra fields. + * + * @param customFields the value + * @return this builder + */ + public Builder customFields(Map customFields) { + return setAny("custom_fields", customFields); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @param skipVerification the value + * @return this builder + */ + public Builder skipVerification(boolean skipVerification) { + return set("skip_verification", Conv.BOOLEAN, skipVerification); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsUpdateKybPartyDraftParams} + */ + public SessionsUpdateKybPartyDraftParams build() { + return new SessionsUpdateKybPartyDraftParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the party is an individual or a company. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Role extends StringEnum { + /** The value {@code "director"}. */ + public static final Role DIRECTOR = new Role("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Role NON_EXECUTIVE_DIRECTOR = new Role("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Role SECRETARY = new Role("secretary"); + + /** The value {@code "chairman"}. */ + public static final Role CHAIRMAN = new Role("chairman"); + + /** The value {@code "ubo"}. */ + public static final Role UBO = new Role("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Role SHAREHOLDER = new Role("shareholder"); + + /** The value {@code "representative"}. */ + public static final Role REPRESENTATIVE = new Role("representative"); + + /** The value {@code "founder"}. */ + public static final Role FOUNDER = new Role("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Role LEGAL_ADVISOR = new Role("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Role AUTHORIZED_SIGNATORY = new Role("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Role TRUSTEE = new Role("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Role BENEFICIARY = new Role("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Role SETTLOR = new Role("settlor"); + + /** The value {@code "protector"}. */ + public static final Role PROTECTOR = new Role("protector"); + + /** The value {@code "company_officer"}. */ + public static final Role COMPANY_OFFICER = new Role("company_officer"); + + /** The value {@code "investor"}. */ + public static final Role INVESTOR = new Role("investor"); + + /** The value {@code "other"}. */ + public static final Role OTHER = new Role("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Role(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Role of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Role::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Roles extends StringEnum { + /** The value {@code "director"}. */ + public static final Roles DIRECTOR = new Roles("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Roles NON_EXECUTIVE_DIRECTOR = new Roles("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Roles SECRETARY = new Roles("secretary"); + + /** The value {@code "chairman"}. */ + public static final Roles CHAIRMAN = new Roles("chairman"); + + /** The value {@code "ubo"}. */ + public static final Roles UBO = new Roles("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Roles SHAREHOLDER = new Roles("shareholder"); + + /** The value {@code "representative"}. */ + public static final Roles REPRESENTATIVE = new Roles("representative"); + + /** The value {@code "founder"}. */ + public static final Roles FOUNDER = new Roles("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Roles LEGAL_ADVISOR = new Roles("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Roles AUTHORIZED_SIGNATORY = new Roles("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Roles TRUSTEE = new Roles("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Roles BENEFICIARY = new Roles("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Roles SETTLOR = new Roles("settlor"); + + /** The value {@code "protector"}. */ + public static final Roles PROTECTOR = new Roles("protector"); + + /** The value {@code "company_officer"}. */ + public static final Roles COMPANY_OFFICER = new Roles("company_officer"); + + /** The value {@code "investor"}. */ + public static final Roles INVESTOR = new Roles("investor"); + + /** The value {@code "other"}. */ + public static final Roles OTHER = new Roles("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Roles(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Roles of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Roles::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } +} diff --git a/src/main/java/me/didit/types/SessionsUpdateKybPartyDraftResponse.java b/src/main/java/me/didit/types/SessionsUpdateKybPartyDraftResponse.java new file mode 100644 index 0000000..586e15c --- /dev/null +++ b/src/main/java/me/didit/types/SessionsUpdateKybPartyDraftResponse.java @@ -0,0 +1,773 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +public final class SessionsUpdateKybPartyDraftResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("draft_id", "created_at", "updated_at", "party"); + + private SessionsUpdateKybPartyDraftResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsUpdateKybPartyDraftResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsUpdateKybPartyDraftResponse fromJson(JsonNode json) { + return new SessionsUpdateKybPartyDraftResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The draft_id field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String draftId() { + return Json.required(json, "draft_id", Conv.STRING); + } + + /** + * The created_at field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime createdAt() { + return Json.required(json, "created_at", Conv.DATE_TIME); + } + + /** + * The updated_at field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public OffsetDateTime updatedAt() { + return Json.required(json, "updated_at", Conv.DATE_TIME); + } + + /** + * The party field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsUpdateKybPartyDraftResponse.Party party() { + return Json.required(json, "party", Conv.model(SessionsUpdateKybPartyDraftResponse.Party::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsUpdateKybPartyDraftResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsUpdateKybPartyDraftResponse from) { + super(from); + } + + /** + * The draft_id field. + * + * @param draftId the value + * @return this builder + */ + public Builder draftId(String draftId) { + return set("draft_id", Conv.STRING, draftId); + } + + /** + * The created_at field. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(OffsetDateTime createdAt) { + return set("created_at", Conv.DATE_TIME, createdAt); + } + + /** + * The updated_at field. + * + * @param updatedAt the value + * @return this builder + */ + public Builder updatedAt(OffsetDateTime updatedAt) { + return set("updated_at", Conv.DATE_TIME, updatedAt); + } + + /** + * The party field. + * + * @param party the value + * @return this builder + */ + public Builder party(SessionsUpdateKybPartyDraftResponse.Party party) { + return set("party", Conv.model(SessionsUpdateKybPartyDraftResponse.Party::fromJson), party); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsUpdateKybPartyDraftResponse} + * @throws IllegalStateException when a required field is missing + */ + public SessionsUpdateKybPartyDraftResponse build() { + require("draft_id", false); + require("created_at", false); + require("updated_at", false); + require("party", false); + return new SessionsUpdateKybPartyDraftResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + public static final class Party extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("entity_type", "full_name", "first_name", "last_name", "role", "roles", "position", "date_of_birth", "company_name", "registration_number", "email", "ownership_percent", "nationality", "phone_number", "custom_fields", "skip_verification"); + + private Party(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Party} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Party fromJson(JsonNode json) { + return new Party(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Whether the party is an individual or a company. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public SessionsUpdateKybPartyDraftResponse.Party.EntityType entityType() { + return Json.required(json, "entity_type", Conv.enumeration(SessionsUpdateKybPartyDraftResponse.Party.EntityType::of)); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional fullName() { + return Json.optional(json, "full_name", Conv.STRING); + } + + /** + * The first_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional firstName() { + return Json.optional(json, "first_name", Conv.STRING); + } + + /** + * The last_name field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional lastName() { + return Json.optional(json, "last_name", Conv.STRING); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional role() { + return Json.optional(json, "role", Conv.enumeration(SessionsUpdateKybPartyDraftResponse.Party.Role::of)); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> roles() { + return Json.optional(json, "roles", Conv.list(Conv.enumeration(SessionsUpdateKybPartyDraftResponse.Party.Roles::of))); + } + + /** + * Job title of a person. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional position() { + return Json.optional(json, "position", Conv.STRING); + } + + /** + * The date_of_birth field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional dateOfBirth() { + return Json.optional(json, "date_of_birth", Conv.DATE); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional companyName() { + return Json.optional(json, "company_name", Conv.STRING); + } + + /** + * Registration number of a company party. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional registrationNumber() { + return Json.optional(json, "registration_number", Conv.STRING); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * Share of the company the party owns. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ownershipPercent() { + return Json.optional(json, "ownership_percent", Conv.DOUBLE); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String nationality() { + return Json.required(json, "nationality", Conv.STRING); + } + + /** + * The phone_number field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional phoneNumber() { + return Json.optional(json, "phone_number", Conv.STRING); + } + + /** + * Workflow-defined extra fields. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> customFields() { + return Json.optional(json, "custom_fields", Conv.OBJECT); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional skipVerification() { + return Json.optional(json, "skip_verification", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Party}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Party from) { + super(from); + } + + /** + * Whether the party is an individual or a company. + * + * @param entityType the value + * @return this builder + */ + public Builder entityType(SessionsUpdateKybPartyDraftResponse.Party.EntityType entityType) { + return set("entity_type", Conv.enumeration(SessionsUpdateKybPartyDraftResponse.Party.EntityType::of), entityType); + } + + /** + * Full name of a person. Send it, or first_name and last_name. + * + * @param fullName the value + * @return this builder + */ + public Builder fullName(String fullName) { + return set("full_name", Conv.STRING, fullName); + } + + /** + * The first_name field. + * + * @param firstName the value + * @return this builder + */ + public Builder firstName(String firstName) { + return set("first_name", Conv.STRING, firstName); + } + + /** + * The last_name field. + * + * @param lastName the value + * @return this builder + */ + public Builder lastName(String lastName) { + return set("last_name", Conv.STRING, lastName); + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + * @param role the value + * @return this builder + */ + public Builder role(SessionsUpdateKybPartyDraftResponse.Party.Role role) { + return set("role", Conv.enumeration(SessionsUpdateKybPartyDraftResponse.Party.Role::of), role); + } + + /** + * Every role the party holds. A person needs at least one role (here or in role). + * + * @param roles the value + * @return this builder + */ + public Builder roles(List roles) { + return set("roles", Conv.list(Conv.enumeration(SessionsUpdateKybPartyDraftResponse.Party.Roles::of)), roles); + } + + /** + * Job title of a person. + * + * @param position the value + * @return this builder + */ + public Builder position(String position) { + return set("position", Conv.STRING, position); + } + + /** + * The date_of_birth field. + * + * @param dateOfBirth the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder dateOfBirth(@Nullable LocalDate dateOfBirth) { + return setNullable("date_of_birth", Conv.DATE, dateOfBirth); + } + + /** + * Name of a company party. Required when entity_type is company. + * + * @param companyName the value + * @return this builder + */ + public Builder companyName(String companyName) { + return set("company_name", Conv.STRING, companyName); + } + + /** + * Registration number of a company party. + * + * @param registrationNumber the value + * @return this builder + */ + public Builder registrationNumber(String registrationNumber) { + return set("registration_number", Conv.STRING, registrationNumber); + } + + /** + * Where the verification link is sent. Required when the party has to complete verification, which depends on the role settings and ownership thresholds of the workflow. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * Share of the company the party owns. + * + * @param ownershipPercent the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ownershipPercent(@Nullable Double ownershipPercent) { + return setNullable("ownership_percent", Conv.DOUBLE, ownershipPercent); + } + + /** + * Nationality of a person, or country of incorporation of a company. Required for every party. + * + * @param nationality the value + * @return this builder + */ + public Builder nationality(String nationality) { + return set("nationality", Conv.STRING, nationality); + } + + /** + * The phone_number field. + * + * @param phoneNumber the value + * @return this builder + */ + public Builder phoneNumber(String phoneNumber) { + return set("phone_number", Conv.STRING, phoneNumber); + } + + /** + * Workflow-defined extra fields. + * + * @param customFields the value + * @return this builder + */ + public Builder customFields(Map customFields) { + return setAny("custom_fields", customFields); + } + + /** + * Ask to skip this party's verification. Honoured only when the party's role allows skipping in the workflow's Key People settings. + * + * @param skipVerification the value + * @return this builder + */ + public Builder skipVerification(boolean skipVerification) { + return set("skip_verification", Conv.BOOLEAN, skipVerification); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Party} + * @throws IllegalStateException when a required field is missing + */ + public Party build() { + require("entity_type", false); + require("nationality", false); + return new Party(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Whether the party is an individual or a company. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class EntityType extends StringEnum { + /** The value {@code "person"}. */ + public static final EntityType PERSON = new EntityType("person"); + + /** The value {@code "company"}. */ + public static final EntityType COMPANY = new EntityType("company"); + + private static final List KNOWN_VALUES = List.of(PERSON, COMPANY); + + private EntityType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static EntityType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, EntityType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * Role the party holds. Interchangeable with roles; when both are sent they are merged. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Role extends StringEnum { + /** The value {@code "director"}. */ + public static final Role DIRECTOR = new Role("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Role NON_EXECUTIVE_DIRECTOR = new Role("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Role SECRETARY = new Role("secretary"); + + /** The value {@code "chairman"}. */ + public static final Role CHAIRMAN = new Role("chairman"); + + /** The value {@code "ubo"}. */ + public static final Role UBO = new Role("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Role SHAREHOLDER = new Role("shareholder"); + + /** The value {@code "representative"}. */ + public static final Role REPRESENTATIVE = new Role("representative"); + + /** The value {@code "founder"}. */ + public static final Role FOUNDER = new Role("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Role LEGAL_ADVISOR = new Role("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Role AUTHORIZED_SIGNATORY = new Role("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Role TRUSTEE = new Role("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Role BENEFICIARY = new Role("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Role SETTLOR = new Role("settlor"); + + /** The value {@code "protector"}. */ + public static final Role PROTECTOR = new Role("protector"); + + /** The value {@code "company_officer"}. */ + public static final Role COMPANY_OFFICER = new Role("company_officer"); + + /** The value {@code "investor"}. */ + public static final Role INVESTOR = new Role("investor"); + + /** The value {@code "other"}. */ + public static final Role OTHER = new Role("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Role(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Role of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Role::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + /** + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Roles extends StringEnum { + /** The value {@code "director"}. */ + public static final Roles DIRECTOR = new Roles("director"); + + /** The value {@code "non_executive_director"}. */ + public static final Roles NON_EXECUTIVE_DIRECTOR = new Roles("non_executive_director"); + + /** The value {@code "secretary"}. */ + public static final Roles SECRETARY = new Roles("secretary"); + + /** The value {@code "chairman"}. */ + public static final Roles CHAIRMAN = new Roles("chairman"); + + /** The value {@code "ubo"}. */ + public static final Roles UBO = new Roles("ubo"); + + /** The value {@code "shareholder"}. */ + public static final Roles SHAREHOLDER = new Roles("shareholder"); + + /** The value {@code "representative"}. */ + public static final Roles REPRESENTATIVE = new Roles("representative"); + + /** The value {@code "founder"}. */ + public static final Roles FOUNDER = new Roles("founder"); + + /** The value {@code "legal_advisor"}. */ + public static final Roles LEGAL_ADVISOR = new Roles("legal_advisor"); + + /** The value {@code "authorized_signatory"}. */ + public static final Roles AUTHORIZED_SIGNATORY = new Roles("authorized_signatory"); + + /** The value {@code "trustee"}. */ + public static final Roles TRUSTEE = new Roles("trustee"); + + /** The value {@code "beneficiary"}. */ + public static final Roles BENEFICIARY = new Roles("beneficiary"); + + /** The value {@code "settlor"}. */ + public static final Roles SETTLOR = new Roles("settlor"); + + /** The value {@code "protector"}. */ + public static final Roles PROTECTOR = new Roles("protector"); + + /** The value {@code "company_officer"}. */ + public static final Roles COMPANY_OFFICER = new Roles("company_officer"); + + /** The value {@code "investor"}. */ + public static final Roles INVESTOR = new Roles("investor"); + + /** The value {@code "other"}. */ + public static final Roles OTHER = new Roles("other"); + + private static final List KNOWN_VALUES = List.of(DIRECTOR, NON_EXECUTIVE_DIRECTOR, SECRETARY, CHAIRMAN, UBO, SHAREHOLDER, REPRESENTATIVE, FOUNDER, LEGAL_ADVISOR, AUTHORIZED_SIGNATORY, TRUSTEE, BENEFICIARY, SETTLOR, PROTECTOR, COMPANY_OFFICER, INVESTOR, OTHER); + + private Roles(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Roles of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Roles::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } +} diff --git a/src/main/java/me/didit/types/SessionsUpdateStatusParams.java b/src/main/java/me/didit/types/SessionsUpdateStatusParams.java index 4b73727..ba3d47f 100644 --- a/src/main/java/me/didit/types/SessionsUpdateStatusParams.java +++ b/src/main/java/me/didit/types/SessionsUpdateStatusParams.java @@ -451,7 +451,10 @@ public static final class Feature extends StringEnum { /** The value {@code "KYB"}. */ public static final Feature KYB = new Feature("KYB"); - private static final List KNOWN_VALUES = List.of(OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_DOCUMENTS, ID_VERIFICATION, POA, PHONE, EMAIL, KYB_REGISTRY, KYB_KEY_PEOPLE, KYB); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + private static final List KNOWN_VALUES = List.of(OCR, OCR_BACK, NFC, AML, FACE, LIVENESS, FACE_MATCH, IP_ANALYSIS, AGE_ESTIMATION, PROOF_OF_ADDRESS, PHONE_VERIFICATION, EMAIL_VERIFICATION, FACE_SEARCH, DATABASE_VALIDATION, QUESTIONNAIRE, DOCUMENT_AI, KYB_DOCUMENTS, ID_VERIFICATION, POA, PHONE, EMAIL, KYB_REGISTRY, KYB_KEY_PEOPLE, KYB, GEOLOCATION); private Feature(String value) { super(value); diff --git a/src/main/java/me/didit/types/SessionsUploadKybDocumentsParams.java b/src/main/java/me/didit/types/SessionsUploadKybDocumentsParams.java new file mode 100644 index 0000000..2d37d17 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsUploadKybDocumentsParams.java @@ -0,0 +1,230 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; + +/** Parameters for {@code sessions.upload_kyb_documents}. */ +public final class SessionsUploadKybDocumentsParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("node_id", "documents", "document_passwords", "document_group", "locale"); + + private SessionsUploadKybDocumentsParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsUploadKybDocumentsParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsUploadKybDocumentsParams fromJson(JsonNode json) { + return new SessionsUploadKybDocumentsParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nodeId() { + return Json.optional(json, "node_id", Conv.STRING); + } + + /** + * Files to upload: JPG, JPEG, PNG, TIFF, WEBP, PDF or ZIP archives of them. PDFs up to 50 MB, photos up to 6 MB before compression. + * + * @return the file to upload, if set + */ + public Optional> documents() { + return fileList("documents"); + } + + /** + * One entry per file in documents, in the same order: the password of a protected PDF, empty for any other file. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> documentPasswords() { + return Json.optional(json, "document_passwords", Conv.list(Conv.STRING)); + } + + /** + * Required document group this upload answers. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional documentGroup() { + return Json.optional(json, "document_group", Conv.enumeration(SessionsUploadKybDocumentsParams.DocumentGroup::of)); + } + + /** + * Locale used to translate the response of the next step. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional locale() { + return Json.optional(json, "locale", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsUploadKybDocumentsParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsUploadKybDocumentsParams from) { + super(from); + } + + /** + * Workflow node of the KYB step. Only needed when the workflow has more than one KYB node; by default Didit uses the session's own node. + * + * @param nodeId the value + * @return this builder + */ + public Builder nodeId(String nodeId) { + return set("node_id", Conv.STRING, nodeId); + } + + /** + * Files to upload: JPG, JPEG, PNG, TIFF, WEBP, PDF or ZIP archives of them. PDFs up to 50 MB, photos up to 6 MB before compression. + * + * @param documents the value + * @return this builder + */ + public Builder documents(List documents) { + return setFiles("documents", documents); + } + + /** + * One entry per file in documents, in the same order: the password of a protected PDF, empty for any other file. + * + * @param documentPasswords the value + * @return this builder + */ + public Builder documentPasswords(List documentPasswords) { + return set("document_passwords", Conv.list(Conv.STRING), documentPasswords); + } + + /** + * Required document group this upload answers. + * + * @param documentGroup the value + * @return this builder + */ + public Builder documentGroup(SessionsUploadKybDocumentsParams.DocumentGroup documentGroup) { + return set("document_group", Conv.enumeration(SessionsUploadKybDocumentsParams.DocumentGroup::of), documentGroup); + } + + /** + * Locale used to translate the response of the next step. + * + * @param locale the value + * @return this builder + */ + public Builder locale(String locale) { + return set("locale", Conv.STRING, locale); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsUploadKybDocumentsParams} + * @throws IllegalStateException when a required field is missing + */ + public SessionsUploadKybDocumentsParams build() { + requireFile("documents"); + return new SessionsUploadKybDocumentsParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Required document group this upload answers. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class DocumentGroup extends StringEnum { + /** The value {@code "LEGAL_PRESENCE"}. */ + public static final DocumentGroup LEGAL_PRESENCE = new DocumentGroup("LEGAL_PRESENCE"); + + /** The value {@code "COMPANY_DETAILS"}. */ + public static final DocumentGroup COMPANY_DETAILS = new DocumentGroup("COMPANY_DETAILS"); + + /** The value {@code "OWNERSHIP_STRUCTURE"}. */ + public static final DocumentGroup OWNERSHIP_STRUCTURE = new DocumentGroup("OWNERSHIP_STRUCTURE"); + + /** The value {@code "REPRESENTATIVES_AUTHORIZATION"}. */ + public static final DocumentGroup REPRESENTATIVES_AUTHORIZATION = new DocumentGroup("REPRESENTATIVES_AUTHORIZATION"); + + private static final List KNOWN_VALUES = List.of(LEGAL_PRESENCE, COMPANY_DETAILS, OWNERSHIP_STRUCTURE, REPRESENTATIVES_AUTHORIZATION); + + private DocumentGroup(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static DocumentGroup of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, DocumentGroup::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } +} diff --git a/src/main/java/me/didit/types/SessionsUploadKybDocumentsResponse.java b/src/main/java/me/didit/types/SessionsUploadKybDocumentsResponse.java new file mode 100644 index 0000000..305f704 --- /dev/null +++ b/src/main/java/me/didit/types/SessionsUploadKybDocumentsResponse.java @@ -0,0 +1,159 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +public final class SessionsUploadKybDocumentsResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("valid", "next_step", "kyb_status", "document_answer"); + + private SessionsUploadKybDocumentsResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SessionsUploadKybDocumentsResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SessionsUploadKybDocumentsResponse fromJson(JsonNode json) { + return new SessionsUploadKybDocumentsResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The valid field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional valid() { + return Json.optional(json, "valid", Conv.BOOLEAN); + } + + /** + * Step the session is on after the upload. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional nextStep() { + return Json.optional(json, "next_step", Conv.STRING); + } + + /** + * Status of the company check. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional kybStatus() { + return Json.optional(json, "kyb_status", Conv.STRING); + } + + /** + * Result per uploaded document and the uploads left. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> documentAnswer() { + return Json.optional(json, "document_answer", Conv.OBJECT); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SessionsUploadKybDocumentsResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SessionsUploadKybDocumentsResponse from) { + super(from); + } + + /** + * The valid field. + * + * @param valid the value + * @return this builder + */ + public Builder valid(boolean valid) { + return set("valid", Conv.BOOLEAN, valid); + } + + /** + * Step the session is on after the upload. + * + * @param nextStep the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder nextStep(@Nullable String nextStep) { + return setNullable("next_step", Conv.STRING, nextStep); + } + + /** + * Status of the company check. + * + * @param kybStatus the value + * @return this builder + */ + public Builder kybStatus(String kybStatus) { + return set("kyb_status", Conv.STRING, kybStatus); + } + + /** + * Result per uploaded document and the uploads left. + * + * @param documentAnswer the value + * @return this builder + */ + public Builder documentAnswer(Map documentAnswer) { + return setAny("document_answer", documentAnswer); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SessionsUploadKybDocumentsResponse} + */ + public SessionsUploadKybDocumentsResponse build() { + return new SessionsUploadKybDocumentsResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/SignatureResult.java b/src/main/java/me/didit/types/SignatureResult.java index 2e56149..27d337d 100644 --- a/src/main/java/me/didit/types/SignatureResult.java +++ b/src/main/java/me/didit/types/SignatureResult.java @@ -16,7 +16,7 @@ import org.jspecify.annotations.Nullable; /** - * One signer's result for one Electronic Signature step. See the [Electronic Signature report](/core-technology/electronic-signature/report-electronic-signature). + * One signer's result for one E-signature step. See the [E-signature report](/core-technology/electronic-signature/report-electronic-signature). */ public final class SignatureResult extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("id", "node_id", "status", "verdict", "level", "format", "profile", "signer", "identity_used", "certificate", "confirmation", "timestamp", "documents", "adopted_signature", "electronic_signature_consent_at", "evidence_file", "warnings", "validation", "declined_at", "declined_action", "signed_at", "expires_at", "email_sent_at", "email_unavailable_reason", "ip_address", "place", "place_unavailable_reason"); @@ -95,7 +95,7 @@ public Optional verdict() { } /** - * aes. qes (Qualified Electronic Signature, QES) is coming soon. + * simple (default) or aes. qes (Qualified Electronic Signature, QES) is an add-on that is not available yet. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -105,7 +105,7 @@ public Optional level() { } /** - * The format field. + * pdf for a Simple signature, pades for Advanced (AES). * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -115,7 +115,7 @@ public Optional format() { } /** - * PAdES-B-LT once signed. + * PAdES-B-LT once an Advanced (AES) signature is signed, otherwise null. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -135,7 +135,7 @@ public Optional signer() { } /** - * The identity_used field. + * The verified identity the signature relies on. Empty for a Simple signature with no verified identity. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -145,7 +145,7 @@ public Optional identityUsed() { } /** - * The certificate the documents were signed with. null until signed. + * The certificate the documents were signed with. null until signed, and always null for a Simple signature. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -165,7 +165,7 @@ public Optional confirmation() { } /** - * The trusted timestamp in the signature. null until signed. + * The RFC 3161 timestamp in the signature, issued by Didit. null until signed, and always null for a Simple signature. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -215,7 +215,7 @@ public Optional evidenceFile() { } /** - * Warnings raised for this signer. See [Electronic Signature warnings](/core-technology/electronic-signature/warnings-electronic-signature). + * Warnings raised for this signer. See [E-signature warnings](/core-technology/electronic-signature/warnings-electronic-signature). * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -378,7 +378,7 @@ public Builder verdict(SignatureResult.Verdict verdict) { } /** - * aes. qes (Qualified Electronic Signature, QES) is coming soon. + * simple (default) or aes. qes (Qualified Electronic Signature, QES) is an add-on that is not available yet. * * @param level the value * @return this builder @@ -388,7 +388,7 @@ public Builder level(SignatureResult.Level level) { } /** - * The format field. + * pdf for a Simple signature, pades for Advanced (AES). * * @param format the value * @return this builder @@ -398,7 +398,7 @@ public Builder format(SignatureResult.Format format) { } /** - * PAdES-B-LT once signed. + * PAdES-B-LT once an Advanced (AES) signature is signed, otherwise null. * * @param profile the value, or {@code null} to send JSON null * @return this builder @@ -418,7 +418,7 @@ public Builder signer(SignatureResult.Signer signer) { } /** - * The identity_used field. + * The verified identity the signature relies on. Empty for a Simple signature with no verified identity. * * @param identityUsed the value * @return this builder @@ -428,7 +428,7 @@ public Builder identityUsed(SignatureResult.IdentityUsed identityUsed) { } /** - * The certificate the documents were signed with. null until signed. + * The certificate the documents were signed with. null until signed, and always null for a Simple signature. * * @param certificate the value, or {@code null} to send JSON null * @return this builder @@ -448,7 +448,7 @@ public Builder confirmation(SignatureResult.Confirmation confirmation) { } /** - * The trusted timestamp in the signature. null until signed. + * The RFC 3161 timestamp in the signature, issued by Didit. null until signed, and always null for a Simple signature. * * @param timestamp the value, or {@code null} to send JSON null * @return this builder @@ -498,7 +498,7 @@ public Builder evidenceFile(@Nullable String evidenceFile) { } /** - * Warnings raised for this signer. See [Electronic Signature warnings](/core-technology/electronic-signature/warnings-electronic-signature). + * Warnings raised for this signer. See [E-signature warnings](/core-technology/electronic-signature/warnings-electronic-signature). * * @param warnings the value * @return this builder @@ -727,18 +727,21 @@ public boolean isKnown() { } /** - * aes. qes (Qualified Electronic Signature, QES) is coming soon. + * simple (default) or aes. qes (Qualified Electronic Signature, QES) is an add-on that is not available yet. * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ public static final class Level extends StringEnum { + /** The value {@code "simple"}. */ + public static final Level SIMPLE = new Level("simple"); + /** The value {@code "aes"}. */ public static final Level AES = new Level("aes"); /** The value {@code "qes"}. */ public static final Level QES = new Level("qes"); - private static final List KNOWN_VALUES = List.of(AES, QES); + private static final List KNOWN_VALUES = List.of(SIMPLE, AES, QES); private Level(String value) { super(value); @@ -770,14 +773,18 @@ public boolean isKnown() { } /** + * pdf for a Simple signature, pades for Advanced (AES). * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ public static final class Format extends StringEnum { + /** The value {@code "pdf"}. */ + public static final Format PDF = new Format("pdf"); + /** The value {@code "pades"}. */ public static final Format PADES = new Format("pades"); - private static final List KNOWN_VALUES = List.of(PADES); + private static final List KNOWN_VALUES = List.of(PDF, PADES); private Format(String value) { super(value); @@ -845,7 +852,7 @@ public Builder toBuilder() { } /** - * Verified name. + * The signer's name. Verified (from the approved ID verification or the session) except at the Simple level without a verified session name, where it is the name the signer typed and is not verified. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -918,7 +925,7 @@ private Builder(Signer from) { } /** - * Verified name. + * The signer's name. Verified (from the approved ID verification or the session) except at the Simple level without a verified session name, where it is the name the signer typed and is not verified. * * @param name the value, or {@code null} to send JSON null * @return this builder @@ -1035,6 +1042,9 @@ public boolean isKnown() { } } + /** + * The verified identity the signature relies on. Empty for a Simple signature with no verified identity. + */ public static final class IdentityUsed extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("session_id", "kyc_id", "verified", "expected_name"); @@ -1180,7 +1190,9 @@ protected Builder self() { } } - /** The certificate the documents were signed with. null until signed. */ + /** + * The certificate the documents were signed with. null until signed, and always null for a Simple signature. + */ public static final class Certificate extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("issuer", "issued_to", "serial", "valid_from", "valid_until"); @@ -1383,7 +1395,7 @@ public Builder toBuilder() { } /** - * The channel field. + * null for a Simple signature, which has no code. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -1436,13 +1448,13 @@ private Builder(Confirmation from) { } /** - * The channel field. + * null for a Simple signature, which has no code. * - * @param channel the value + * @param channel the value, or {@code null} to send JSON null * @return this builder */ - public Builder channel(SignatureResult.Confirmation.Channel channel) { - return set("channel", Conv.enumeration(SignatureResult.Confirmation.Channel::of), channel); + public Builder channel(SignatureResult.Confirmation.@Nullable Channel channel) { + return setNullable("channel", Conv.enumeration(SignatureResult.Confirmation.Channel::of), channel); } /** @@ -1491,6 +1503,7 @@ protected Builder self() { } /** + * null for a Simple signature, which has no code. * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ @@ -1533,7 +1546,9 @@ public boolean isKnown() { } } - /** The trusted timestamp in the signature. null until signed. */ + /** + * The RFC 3161 timestamp in the signature, issued by Didit. null until signed, and always null for a Simple signature. + */ public static final class Timestamp extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("time", "qualified", "valid"); @@ -3028,7 +3043,7 @@ public Optional trustedList() } /** - * The certificate the documents were signed with. null until signed. + * The certificate the documents were signed with. null until signed, and always null for a Simple signature. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -3038,7 +3053,7 @@ public Optional certificate() } /** - * The trusted timestamp in the signature. null until signed. + * The RFC 3161 timestamp in the signature, issued by Didit. null until signed, and always null for a Simple signature. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -3131,7 +3146,7 @@ public Builder trustedList(SignatureResult.Validation.Documents.TrustedList trus } /** - * The certificate the documents were signed with. null until signed. + * The certificate the documents were signed with. null until signed, and always null for a Simple signature. * * @param certificate the value, or {@code null} to send JSON null * @return this builder @@ -3141,7 +3156,7 @@ public Builder certificate(SignatureResult.Validation.Documents.@Nullable Certif } /** - * The trusted timestamp in the signature. null until signed. + * The RFC 3161 timestamp in the signature, issued by Didit. null until signed, and always null for a Simple signature. * * @param timestamp the value, or {@code null} to send JSON null * @return this builder @@ -3273,7 +3288,9 @@ protected Builder self() { } } - /** The certificate the documents were signed with. null until signed. */ + /** + * The certificate the documents were signed with. null until signed, and always null for a Simple signature. + */ public static final class Certificate extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("issuer", "issued_to", "serial", "valid_from", "valid_until"); @@ -3439,7 +3456,9 @@ protected Builder self() { } } - /** The trusted timestamp in the signature. null until signed. */ + /** + * The RFC 3161 timestamp in the signature, issued by Didit. null until signed, and always null for a Simple signature. + */ public static final class Timestamp extends JsonModel { private static final Set KNOWN_FIELDS = Set.of("time", "qualified", "valid"); diff --git a/src/main/java/me/didit/types/SimpleWorkflowFeature.java b/src/main/java/me/didit/types/SimpleWorkflowFeature.java index 88132bc..1d93c36 100644 --- a/src/main/java/me/didit/types/SimpleWorkflowFeature.java +++ b/src/main/java/me/didit/types/SimpleWorkflowFeature.java @@ -60,7 +60,7 @@ public SimpleWorkflowFeature.Feature feature() { } /** - * Feature-specific settings. For QUESTIONNAIRE, include questionnaire_uuid with the questionnaire_id returned by the questionnaire create endpoint. For OCR, methods selects which ID Verification methods each country may use (document capture, non-doc lookup against a government or other authoritative source, and digital identity wallets); omit it and every country is document capture only. For SIGNATURE, see [Electronic Signature settings](/management-api/workflows/feature-configs#electronic-signature): signature_level accepts aes only for now, and workflow documents and their fields are managed in the console, so through the API send documents and fields per session with signature_documents_source: "session". + * Feature-specific settings. For QUESTIONNAIRE, include questionnaire_uuid with the questionnaire_id returned by the questionnaire create endpoint. For SIGNATURE, a workflow that goes live needs a document to sign: set signature_documents_source to session or both so each session can bring its own, or send status: "draft" and add the documents before you publish. signature_level: "aes" is refused with aes_not_available while signature_availability.aes is false on the workflow. For OCR, methods selects which ID Verification methods each country may use (document capture, non-doc lookup against a government or other authoritative source, and digital identity wallets); omit it and every country is document capture only. For SIGNATURE, see [E-signature settings](/management-api/workflows/feature-configs#e-signature): signature_level accepts simple (the default, no ID verification, email or phone needed) and aes for now, and workflow documents and their fields are managed in the console, so through the API send documents and fields per session with signature_documents_source: "session". * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -103,7 +103,7 @@ public Builder feature(SimpleWorkflowFeature.Feature feature) { } /** - * Feature-specific settings. For QUESTIONNAIRE, include questionnaire_uuid with the questionnaire_id returned by the questionnaire create endpoint. For OCR, methods selects which ID Verification methods each country may use (document capture, non-doc lookup against a government or other authoritative source, and digital identity wallets); omit it and every country is document capture only. For SIGNATURE, see [Electronic Signature settings](/management-api/workflows/feature-configs#electronic-signature): signature_level accepts aes only for now, and workflow documents and their fields are managed in the console, so through the API send documents and fields per session with signature_documents_source: "session". + * Feature-specific settings. For QUESTIONNAIRE, include questionnaire_uuid with the questionnaire_id returned by the questionnaire create endpoint. For SIGNATURE, a workflow that goes live needs a document to sign: set signature_documents_source to session or both so each session can bring its own, or send status: "draft" and add the documents before you publish. signature_level: "aes" is refused with aes_not_available while signature_availability.aes is false on the workflow. For OCR, methods selects which ID Verification methods each country may use (document capture, non-doc lookup against a government or other authoritative source, and digital identity wallets); omit it and every country is document capture only. For SIGNATURE, see [E-signature settings](/management-api/workflows/feature-configs#e-signature): signature_level accepts simple (the default, no ID verification, email or phone needed) and aes for now, and workflow documents and their fields are managed in the console, so through the API send documents and fields per session with signature_documents_source: "session". * * @param config the value * @return this builder diff --git a/src/main/java/me/didit/types/TransactionDetail.java b/src/main/java/me/didit/types/TransactionDetail.java index 73b28e1..7731406 100644 --- a/src/main/java/me/didit/types/TransactionDetail.java +++ b/src/main/java/me/didit/types/TransactionDetail.java @@ -377,7 +377,7 @@ public Optional> activities() { } /** - * Alerts raised by rules and providers. + * Always empty today. An open alert is a transaction with status IN_REVIEW or AWAITING_USER. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -790,7 +790,7 @@ public Builder activities(List activities) { } /** - * Alerts raised by rules and providers. + * Always empty today. An open alert is a transaction with status IN_REVIEW or AWAITING_USER. * * @param alerts the value * @return this builder diff --git a/src/main/java/me/didit/types/TransactionRuleCondition.java b/src/main/java/me/didit/types/TransactionRuleCondition.java index edb6a30..3c1aa50 100644 --- a/src/main/java/me/didit/types/TransactionRuleCondition.java +++ b/src/main/java/me/didit/types/TransactionRuleCondition.java @@ -74,7 +74,7 @@ public TransactionRuleCondition.Operator operator() { } /** - * Comparison value. Its shape depends on the operator and value_type; omit for the presence-check operators. + * Comparison value. Its shape depends on the operator and value_type; omit it for the presence-check operators. Every other operator needs a value that is not null or an empty list, otherwise the rule is refused with 400. contains_any needs a list of strings, and contains, not_contains and regex need a single string. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -167,7 +167,7 @@ public Builder operator(TransactionRuleCondition.Operator operator) { } /** - * Comparison value. Its shape depends on the operator and value_type; omit for the presence-check operators. + * Comparison value. Its shape depends on the operator and value_type; omit it for the presence-check operators. Every other operator needs a value that is not null or an empty list, otherwise the rule is refused with 400. contains_any needs a list of strings, and contains, not_contains and regex need a single string. * * @param value the value * @return this builder diff --git a/src/main/java/me/didit/types/TransactionRuleSuggestionsCreatedEvent.java b/src/main/java/me/didit/types/TransactionRuleSuggestionsCreatedEvent.java new file mode 100644 index 0000000..6eff581 --- /dev/null +++ b/src/main/java/me/didit/types/TransactionRuleSuggestionsCreatedEvent.java @@ -0,0 +1,530 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import me.didit.core.StringEnum; +import org.jspecify.annotations.Nullable; + +/** + * A transaction rule suggestion run proposed new rule changes for your application. Sent when the rule-suggestion settings have webhook notifications on. There is no top-level status. + */ +public final class TransactionRuleSuggestionsCreatedEvent extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("event_id", "timestamp", "created_at", "application_id", "environment", "webhook_type", "run_id", "open_count", "suggestions"); + + private TransactionRuleSuggestionsCreatedEvent(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code TransactionRuleSuggestionsCreatedEvent} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static TransactionRuleSuggestionsCreatedEvent fromJson(JsonNode json) { + return new TransactionRuleSuggestionsCreatedEvent(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Identifier of the event. Every destination receives the same value and a redelivery keeps it, so use it to deduplicate. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String eventId() { + return Json.required(json, "event_id", Conv.STRING); + } + + /** + * Unix time in seconds at which this delivery was signed. Equal to the X-Timestamp header; a redelivery carries a new value. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long timestamp() { + return Json.required(json, "timestamp", Conv.LONG); + } + + /** + * Unix time in seconds of the change that produced the event. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long createdAt() { + return Json.required(json, "created_at", Conv.LONG); + } + + /** + * The application the event belongs to. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String applicationId() { + return Json.required(json, "application_id", Conv.STRING); + } + + /** + * sandbox for sandbox sessions and sandbox applications, otherwise live. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public WebhookEventEnvelope.Environment environment() { + return Json.required(json, "environment", Conv.enumeration(WebhookEventEnvelope.Environment::of)); + } + + /** + * Always transaction_rule_suggestions.created. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public TransactionRuleSuggestionsCreatedEvent.WebhookType webhookType() { + return Json.required(json, "webhook_type", Conv.enumeration(TransactionRuleSuggestionsCreatedEvent.WebhookType::of)); + } + + /** + * The suggestion run that produced the new suggestions. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String runId() { + return Json.required(json, "run_id", Conv.STRING); + } + + /** + * Number of suggestions that are still open after this run, new ones included. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public long openCount() { + return Json.required(json, "open_count", Conv.LONG); + } + + /** + * The suggestions this run created. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public List suggestions() { + return Json.required(json, "suggestions", Conv.list(Conv.model(TransactionRuleSuggestionsCreatedEvent.Suggestions::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link TransactionRuleSuggestionsCreatedEvent}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(TransactionRuleSuggestionsCreatedEvent from) { + super(from); + } + + /** + * Identifier of the event. Every destination receives the same value and a redelivery keeps it, so use it to deduplicate. + * + * @param eventId the value + * @return this builder + */ + public Builder eventId(String eventId) { + return set("event_id", Conv.STRING, eventId); + } + + /** + * Unix time in seconds at which this delivery was signed. Equal to the X-Timestamp header; a redelivery carries a new value. + * + * @param timestamp the value + * @return this builder + */ + public Builder timestamp(long timestamp) { + return set("timestamp", Conv.LONG, timestamp); + } + + /** + * Unix time in seconds of the change that produced the event. + * + * @param createdAt the value + * @return this builder + */ + public Builder createdAt(long createdAt) { + return set("created_at", Conv.LONG, createdAt); + } + + /** + * The application the event belongs to. + * + * @param applicationId the value + * @return this builder + */ + public Builder applicationId(String applicationId) { + return set("application_id", Conv.STRING, applicationId); + } + + /** + * sandbox for sandbox sessions and sandbox applications, otherwise live. + * + * @param environment the value + * @return this builder + */ + public Builder environment(WebhookEventEnvelope.Environment environment) { + return set("environment", Conv.enumeration(WebhookEventEnvelope.Environment::of), environment); + } + + /** + * Always transaction_rule_suggestions.created. + * + * @param webhookType the value + * @return this builder + */ + public Builder webhookType(TransactionRuleSuggestionsCreatedEvent.WebhookType webhookType) { + return set("webhook_type", Conv.enumeration(TransactionRuleSuggestionsCreatedEvent.WebhookType::of), webhookType); + } + + /** + * The suggestion run that produced the new suggestions. + * + * @param runId the value + * @return this builder + */ + public Builder runId(String runId) { + return set("run_id", Conv.STRING, runId); + } + + /** + * Number of suggestions that are still open after this run, new ones included. + * + * @param openCount the value + * @return this builder + */ + public Builder openCount(long openCount) { + return set("open_count", Conv.LONG, openCount); + } + + /** + * The suggestions this run created. + * + * @param suggestions the value + * @return this builder + */ + public Builder suggestions(List suggestions) { + return set("suggestions", Conv.list(Conv.model(TransactionRuleSuggestionsCreatedEvent.Suggestions::fromJson)), suggestions); + } + + /** + * Builds the value. + * + * @return a new immutable {@code TransactionRuleSuggestionsCreatedEvent} + * @throws IllegalStateException when a required field is missing + */ + public TransactionRuleSuggestionsCreatedEvent build() { + require("event_id", false); + require("timestamp", false); + require("created_at", false); + require("application_id", false); + require("environment", false); + require("webhook_type", false); + require("run_id", false); + require("open_count", false); + require("suggestions", false); + return new TransactionRuleSuggestionsCreatedEvent(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * Always transaction_rule_suggestions.created. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class WebhookType extends StringEnum { + /** The value {@code "transaction_rule_suggestions.created"}. */ + public static final WebhookType TRANSACTION_RULE_SUGGESTIONS_CREATED = new WebhookType("transaction_rule_suggestions.created"); + + private static final List KNOWN_VALUES = List.of(TRANSACTION_RULE_SUGGESTIONS_CREATED); + + private WebhookType(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static WebhookType of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, WebhookType::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + + public static final class Suggestions extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("suggestion_id", "kind", "title", "rule_id", "expected_impact"); + + private Suggestions(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Suggestions} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Suggestions fromJson(JsonNode json) { + return new Suggestions(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The suggestion_id field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String suggestionId() { + return Json.required(json, "suggestion_id", Conv.STRING); + } + + /** + * ADD proposes a new rule, TWEAK changes an existing one, DISABLE turns one off. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public TransactionRuleSuggestionsCreatedEvent.Suggestions.Kind kind() { + return Json.required(json, "kind", Conv.enumeration(TransactionRuleSuggestionsCreatedEvent.Suggestions.Kind::of)); + } + + /** + * The title field. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String title() { + return Json.required(json, "title", Conv.STRING); + } + + /** + * The rule a TWEAK or DISABLE suggestion applies to; null for ADD. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional ruleId() { + return Json.optional(json, "rule_id", Conv.STRING); + } + + /** + * What the change would do, as the suggestion shows it in the Console. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public Map expectedImpact() { + return Json.required(json, "expected_impact", Conv.OBJECT); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Suggestions}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Suggestions from) { + super(from); + } + + /** + * The suggestion_id field. + * + * @param suggestionId the value + * @return this builder + */ + public Builder suggestionId(String suggestionId) { + return set("suggestion_id", Conv.STRING, suggestionId); + } + + /** + * ADD proposes a new rule, TWEAK changes an existing one, DISABLE turns one off. + * + * @param kind the value + * @return this builder + */ + public Builder kind(TransactionRuleSuggestionsCreatedEvent.Suggestions.Kind kind) { + return set("kind", Conv.enumeration(TransactionRuleSuggestionsCreatedEvent.Suggestions.Kind::of), kind); + } + + /** + * The title field. + * + * @param title the value + * @return this builder + */ + public Builder title(String title) { + return set("title", Conv.STRING, title); + } + + /** + * The rule a TWEAK or DISABLE suggestion applies to; null for ADD. + * + * @param ruleId the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder ruleId(@Nullable String ruleId) { + return setNullable("rule_id", Conv.STRING, ruleId); + } + + /** + * What the change would do, as the suggestion shows it in the Console. + * + * @param expectedImpact the value + * @return this builder + */ + public Builder expectedImpact(Map expectedImpact) { + return setAny("expected_impact", expectedImpact); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Suggestions} + * @throws IllegalStateException when a required field is missing + */ + public Suggestions build() { + require("suggestion_id", false); + require("kind", false); + require("title", false); + require("rule_id", true); + require("expected_impact", false); + return new Suggestions(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + + /** + * ADD proposes a new rule, TWEAK changes an existing one, DISABLE turns one off. + * + *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. + */ + public static final class Kind extends StringEnum { + /** The value {@code "ADD"}. */ + public static final Kind ADD = new Kind("ADD"); + + /** The value {@code "TWEAK"}. */ + public static final Kind TWEAK = new Kind("TWEAK"); + + /** The value {@code "DISABLE"}. */ + public static final Kind DISABLE = new Kind("DISABLE"); + + private static final List KNOWN_VALUES = List.of(ADD, TWEAK, DISABLE); + + private Kind(String value) { + super(value); + } + + /** + * Returns the constant for a known value, or a new instance for any other value. + * + * @param value the string value + * @return the enum value + */ + public static Kind of(String value) { + return StringEnum.lookup(KNOWN_VALUES, value, Kind::new); + } + + /** + * Returns the values known to this SDK version. + * + * @return the known values + */ + public static List knownValues() { + return KNOWN_VALUES; + } + + @Override + public boolean isKnown() { + return KNOWN_VALUES.contains(this); + } + } + } +} diff --git a/src/main/java/me/didit/types/TransactionsCreateParams.java b/src/main/java/me/didit/types/TransactionsCreateParams.java index 84174ed..cf6a742 100644 --- a/src/main/java/me/didit/types/TransactionsCreateParams.java +++ b/src/main/java/me/didit/types/TransactionsCreateParams.java @@ -418,7 +418,7 @@ public TransactionsCreateParams.TransactionDetails.Direction direction() { } /** - * Transaction amount (up to 18 decimal places). Send it as a decimal string (e.g. "0.123456789012345678") when exact precision matters: a JSON number is parsed as a binary float first, so digits beyond about 15 significant digits are rounded before the amount is stored. + * Transaction amount (up to 18 decimal places). Send it as a decimal string (e.g. "0.123456789012345678") when exact precision matters: a JSON number is parsed as a binary float first, so digits beyond about 15 significant digits are rounded before the amount is stored. Must be zero or greater: the direction carries the sign, and a negative amount returns 400. * * @return the value * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type @@ -448,7 +448,7 @@ public Optional currencyKind() { } /** - * Pre-converted amount in the default currency. If omitted, automatic FX conversion is attempted. + * Pre-converted amount in the default currency. If omitted, automatic FX conversion is attempted. Must be zero or greater. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -531,7 +531,7 @@ public Builder direction(TransactionsCreateParams.TransactionDetails.Direction d } /** - * Transaction amount (up to 18 decimal places). Send it as a decimal string (e.g. "0.123456789012345678") when exact precision matters: a JSON number is parsed as a binary float first, so digits beyond about 15 significant digits are rounded before the amount is stored. + * Transaction amount (up to 18 decimal places). Send it as a decimal string (e.g. "0.123456789012345678") when exact precision matters: a JSON number is parsed as a binary float first, so digits beyond about 15 significant digits are rounded before the amount is stored. Must be zero or greater: the direction carries the sign, and a negative amount returns 400. * * @param amount the value * @return this builder @@ -561,7 +561,7 @@ public Builder currencyKind(String currencyKind) { } /** - * Pre-converted amount in the default currency. If omitted, automatic FX conversion is attempted. + * Pre-converted amount in the default currency. If omitted, automatic FX conversion is attempted. Must be zero or greater. * * @param amountInDefaultCurrency the value, or {@code null} to send JSON null * @return this builder @@ -728,7 +728,7 @@ public Builder toBuilder() { } /** - * Actual network used for screening. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism) and ARB (Arbitrum One). Always specify this for multi-network tokens. When it is missing for USDT, USDC or ETH sent with a 0x transaction hash, Didit looks the hash up on Ethereum, BNB Chain, Polygon, Base, Arbitrum and Optimism and screens it on the network where it is found; if no network has it, the transaction is not screened and custom_values.aml_screening_status is FAILED with the reason in custom_values.aml_screening_error. When it is missing for USDT or USDC screened by wallet (no transaction hash), a Tron address is screened on Tron, a Solana address on Solana, and a 0x address on the first of those six networks where it has sent a transaction or holds the token, or on Ethereum when it is active on none of them. Connected-provider coverage varies; LIGHTNING requires a supported connected provider. + * Actual network used for screening. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). Common network names are accepted too, for example POLYGON or POL for MATIC, BSC for BNB and TRON for TRX. Always specify this for multi-network tokens. When it is missing for USDT, USDC or ETH sent with a 0x transaction hash, Didit looks the hash up on Ethereum, BNB Chain, Polygon, Base, Arbitrum and Optimism and screens it on the network where it is found; if no network has it, the transaction is not screened and custom_values.aml_screening_status is FAILED with the reason in custom_values.aml_screening_error. When it is missing for USDT or USDC screened by wallet (no transaction hash), a Tron address is screened on Tron, a Solana address on Solana, and a 0x address on the first of those six networks where it has sent a transaction or holds the token, or on Ethereum when it is active on none of them. Connected-provider coverage varies; LIGHTNING requires a supported connected provider. * * @return the value, or empty when the field is absent or null * @throws me.didit.errors.UnexpectedResponseException when the field has another type @@ -751,7 +751,7 @@ private Builder(CryptoParams from) { } /** - * Actual network used for screening. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism) and ARB (Arbitrum One). Always specify this for multi-network tokens. When it is missing for USDT, USDC or ETH sent with a 0x transaction hash, Didit looks the hash up on Ethereum, BNB Chain, Polygon, Base, Arbitrum and Optimism and screens it on the network where it is found; if no network has it, the transaction is not screened and custom_values.aml_screening_status is FAILED with the reason in custom_values.aml_screening_error. When it is missing for USDT or USDC screened by wallet (no transaction hash), a Tron address is screened on Tron, a Solana address on Solana, and a 0x address on the first of those six networks where it has sent a transaction or holds the token, or on Ethereum when it is active on none of them. Connected-provider coverage varies; LIGHTNING requires a supported connected provider. + * Actual network used for screening. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). Common network names are accepted too, for example POLYGON or POL for MATIC, BSC for BNB and TRON for TRX. Always specify this for multi-network tokens. When it is missing for USDT, USDC or ETH sent with a 0x transaction hash, Didit looks the hash up on Ethereum, BNB Chain, Polygon, Base, Arbitrum and Optimism and screens it on the network where it is found; if no network has it, the transaction is not screened and custom_values.aml_screening_status is FAILED with the reason in custom_values.aml_screening_error. When it is missing for USDT or USDC screened by wallet (no transaction hash), a Tron address is screened on Tron, a Solana address on Solana, and a 0x address on the first of those six networks where it has sent a transaction or holds the token, or on Ethereum when it is active on none of them. Connected-provider coverage varies; LIGHTNING requires a supported connected provider. * * @param cryptoChain the value * @return this builder diff --git a/src/main/java/me/didit/types/TransactionsListParams.java b/src/main/java/me/didit/types/TransactionsListParams.java index 63cf683..e0f773b 100644 --- a/src/main/java/me/didit/types/TransactionsListParams.java +++ b/src/main/java/me/didit/types/TransactionsListParams.java @@ -14,7 +14,7 @@ /** Parameters for {@code transactions.list}. */ public final class TransactionsListParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("limit", "offset", "travel_rule_status"); + private static final Set KNOWN_FIELDS = Set.of("limit", "offset", "travel_rule_status", "assignee"); private TransactionsListParams(ObjectNode json, Map> files) { super(json, files); @@ -79,6 +79,16 @@ public Optional travelRuleStatus() { return Json.optional(json, "travel_rule_status", Conv.STRING); } + /** + * Comma-separated; a transaction matches when it meets any value. unassigned is what nobody holds yet, rules is what the rules decided on their own without a reviewer, and a member email matches the reviewer assigned to it. me is the signed-in Console reviewer, so an API key sending me gets 400. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional assignee() { + return Json.optional(json, "assignee", Conv.STRING); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -122,6 +132,16 @@ public Builder travelRuleStatus(String travelRuleStatus) { return set("travel_rule_status", Conv.STRING, travelRuleStatus); } + /** + * Comma-separated; a transaction matches when it meets any value. unassigned is what nobody holds yet, rules is what the rules decided on their own without a reviewer, and a member email matches the reviewer assigned to it. me is the signed-in Console reviewer, so an API key sending me gets 400. + * + * @param assignee the value + * @return this builder + */ + public Builder assignee(String assignee) { + return set("assignee", Conv.STRING, assignee); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/TravelRuleManualMatchRequest.java b/src/main/java/me/didit/types/TravelRuleManualMatchRequest.java new file mode 100644 index 0000000..f875ec3 --- /dev/null +++ b/src/main/java/me/didit/types/TravelRuleManualMatchRequest.java @@ -0,0 +1,99 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +public final class TravelRuleManualMatchRequest extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("transaction_id"); + + private TravelRuleManualMatchRequest(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code TravelRuleManualMatchRequest} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static TravelRuleManualMatchRequest fromJson(JsonNode json) { + return new TravelRuleManualMatchRequest(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The transaction_id of the received Travel Rule message (a row with kind: message). + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public String transactionId() { + return Json.required(json, "transaction_id", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link TravelRuleManualMatchRequest}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(TravelRuleManualMatchRequest from) { + super(from); + } + + /** + * The transaction_id of the received Travel Rule message (a row with kind: message). + * + * @param transactionId the value + * @return this builder + */ + public Builder transactionId(String transactionId) { + return set("transaction_id", Conv.STRING, transactionId); + } + + /** + * Builds the value. + * + * @return a new immutable {@code TravelRuleManualMatchRequest} + * @throws IllegalStateException when a required field is missing + */ + public TravelRuleManualMatchRequest build() { + require("transaction_id", false); + return new TravelRuleManualMatchRequest(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/TravelRuleManualMatchResponse.java b/src/main/java/me/didit/types/TravelRuleManualMatchResponse.java new file mode 100644 index 0000000..d624095 --- /dev/null +++ b/src/main/java/me/didit/types/TravelRuleManualMatchResponse.java @@ -0,0 +1,120 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +public final class TravelRuleManualMatchResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("deposit", "message"); + + private TravelRuleManualMatchResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code TravelRuleManualMatchResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static TravelRuleManualMatchResponse fromJson(JsonNode json) { + return new TravelRuleManualMatchResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * One Travel Rule transfer as the transfers list shows it: VASP names, wallets and memos only, never the originator or beneficiary person data. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public TravelRuleTransferRow deposit() { + return Json.required(json, "deposit", Conv.model(TravelRuleTransferRow::fromJson)); + } + + /** + * One Travel Rule transfer as the transfers list shows it: VASP names, wallets and memos only, never the originator or beneficiary person data. + * + * @return the value + * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + */ + public TravelRuleTransferRow message() { + return Json.required(json, "message", Conv.model(TravelRuleTransferRow::fromJson)); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link TravelRuleManualMatchResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(TravelRuleManualMatchResponse from) { + super(from); + } + + /** + * One Travel Rule transfer as the transfers list shows it: VASP names, wallets and memos only, never the originator or beneficiary person data. + * + * @param deposit the value + * @return this builder + */ + public Builder deposit(TravelRuleTransferRow deposit) { + return set("deposit", Conv.model(TravelRuleTransferRow::fromJson), deposit); + } + + /** + * One Travel Rule transfer as the transfers list shows it: VASP names, wallets and memos only, never the originator or beneficiary person data. + * + * @param message the value + * @return this builder + */ + public Builder message(TravelRuleTransferRow message) { + return set("message", Conv.model(TravelRuleTransferRow::fromJson), message); + } + + /** + * Builds the value. + * + * @return a new immutable {@code TravelRuleManualMatchResponse} + * @throws IllegalStateException when a required field is missing + */ + public TravelRuleManualMatchResponse build() { + require("deposit", false); + require("message", false); + return new TravelRuleManualMatchResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListParams.java b/src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListParams.java new file mode 100644 index 0000000..4baa2f0 --- /dev/null +++ b/src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListParams.java @@ -0,0 +1,280 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; + +/** Parameters for {@code travel_rule.unmatched_deposits.list}. */ +public final class TravelRuleUnmatchedDepositsListParams extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("direction", "status", "rail", "kind", "currency", "start_date", "end_date", "counterparty", "limit", "offset"); + + private TravelRuleUnmatchedDepositsListParams(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code TravelRuleUnmatchedDepositsListParams} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static TravelRuleUnmatchedDepositsListParams fromJson(JsonNode json) { + return new TravelRuleUnmatchedDepositsListParams(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * INBOUND, OUTBOUND, or both comma-separated. Case-sensitive. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional direction() { + return Json.optional(json, "direction", Conv.STRING); + } + + /** + * One or more transfer statuses, comma-separated. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional status() { + return Json.optional(json, "status", Conv.STRING); + } + + /** + * One or more of INTERNAL, TRP, GTR, TRUST, VERIFYVASP, SYGNA, EMAIL, TEST_VASP, comma-separated. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional rail() { + return Json.optional(json, "rail", Conv.STRING); + } + + /** + * withdrawal, deposit or message, comma-separated. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional kind() { + return Json.optional(json, "kind", Conv.STRING); + } + + /** + * The transaction's currency, case-insensitive. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional currency() { + return Json.optional(json, "currency", Conv.STRING); + } + + /** + * Transfers created on or after this day (UTC), YYYY-MM-DD. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional startDate() { + return Json.optional(json, "start_date", Conv.DATE); + } + + /** + * Transfers created on or before this day (UTC), YYYY-MM-DD. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional endDate() { + return Json.optional(json, "end_date", Conv.DATE); + } + + /** + * The id of a directory entry or Didit network member from GET /v3/travel-rule/vasps/: your transfers with that counterparty. A value that is not a valid id answers 400. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional counterparty() { + return Json.optional(json, "counterparty", Conv.STRING); + } + + /** + * Page size, default 50. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional limit() { + return Json.optional(json, "limit", Conv.LONG); + } + + /** + * Rows to skip. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional offset() { + return Json.optional(json, "offset", Conv.LONG); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link TravelRuleUnmatchedDepositsListParams}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(TravelRuleUnmatchedDepositsListParams from) { + super(from); + } + + /** + * INBOUND, OUTBOUND, or both comma-separated. Case-sensitive. + * + * @param direction the value + * @return this builder + */ + public Builder direction(String direction) { + return set("direction", Conv.STRING, direction); + } + + /** + * One or more transfer statuses, comma-separated. + * + * @param status the value + * @return this builder + */ + public Builder status(String status) { + return set("status", Conv.STRING, status); + } + + /** + * One or more of INTERNAL, TRP, GTR, TRUST, VERIFYVASP, SYGNA, EMAIL, TEST_VASP, comma-separated. + * + * @param rail the value + * @return this builder + */ + public Builder rail(String rail) { + return set("rail", Conv.STRING, rail); + } + + /** + * withdrawal, deposit or message, comma-separated. + * + * @param kind the value + * @return this builder + */ + public Builder kind(String kind) { + return set("kind", Conv.STRING, kind); + } + + /** + * The transaction's currency, case-insensitive. + * + * @param currency the value + * @return this builder + */ + public Builder currency(String currency) { + return set("currency", Conv.STRING, currency); + } + + /** + * Transfers created on or after this day (UTC), YYYY-MM-DD. + * + * @param startDate the value + * @return this builder + */ + public Builder startDate(LocalDate startDate) { + return set("start_date", Conv.DATE, startDate); + } + + /** + * Transfers created on or before this day (UTC), YYYY-MM-DD. + * + * @param endDate the value + * @return this builder + */ + public Builder endDate(LocalDate endDate) { + return set("end_date", Conv.DATE, endDate); + } + + /** + * The id of a directory entry or Didit network member from GET /v3/travel-rule/vasps/: your transfers with that counterparty. A value that is not a valid id answers 400. + * + * @param counterparty the value + * @return this builder + */ + public Builder counterparty(String counterparty) { + return set("counterparty", Conv.STRING, counterparty); + } + + /** + * Page size, default 50. + * + * @param limit the value + * @return this builder + */ + public Builder limit(long limit) { + return set("limit", Conv.LONG, limit); + } + + /** + * Rows to skip. + * + * @param offset the value + * @return this builder + */ + public Builder offset(long offset) { + return set("offset", Conv.LONG, offset); + } + + /** + * Builds the value. + * + * @return a new immutable {@code TravelRuleUnmatchedDepositsListParams} + */ + public TravelRuleUnmatchedDepositsListParams build() { + return new TravelRuleUnmatchedDepositsListParams(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListResponse.java b/src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListResponse.java new file mode 100644 index 0000000..7653ee6 --- /dev/null +++ b/src/main/java/me/didit/types/TravelRuleUnmatchedDepositsListResponse.java @@ -0,0 +1,159 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.types; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.ObjectNode; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import me.didit.core.Conv; +import me.didit.core.FileUpload; +import me.didit.core.Json; +import me.didit.core.JsonModel; +import org.jspecify.annotations.Nullable; + +public final class TravelRuleUnmatchedDepositsListResponse extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("count", "next", "previous", "results"); + + private TravelRuleUnmatchedDepositsListResponse(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code TravelRuleUnmatchedDepositsListResponse} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static TravelRuleUnmatchedDepositsListResponse fromJson(JsonNode json) { + return new TravelRuleUnmatchedDepositsListResponse(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The count field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional count() { + return Json.optional(json, "count", Conv.LONG); + } + + /** + * The next field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional next() { + return Json.optional(json, "next", Conv.STRING); + } + + /** + * The previous field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional previous() { + return Json.optional(json, "previous", Conv.STRING); + } + + /** + * The results field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> results() { + return Json.optional(json, "results", Conv.list(Conv.model(TravelRuleTransferRow::fromJson))); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link TravelRuleUnmatchedDepositsListResponse}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(TravelRuleUnmatchedDepositsListResponse from) { + super(from); + } + + /** + * The count field. + * + * @param count the value + * @return this builder + */ + public Builder count(long count) { + return set("count", Conv.LONG, count); + } + + /** + * The next field. + * + * @param next the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder next(@Nullable String next) { + return setNullable("next", Conv.STRING, next); + } + + /** + * The previous field. + * + * @param previous the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder previous(@Nullable String previous) { + return setNullable("previous", Conv.STRING, previous); + } + + /** + * The results field. + * + * @param results the value + * @return this builder + */ + public Builder results(List results) { + return set("results", Conv.list(Conv.model(TravelRuleTransferRow::fromJson)), results); + } + + /** + * Builds the value. + * + * @return a new immutable {@code TravelRuleUnmatchedDepositsListResponse} + */ + public TravelRuleUnmatchedDepositsListResponse build() { + return new TravelRuleUnmatchedDepositsListResponse(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } +} diff --git a/src/main/java/me/didit/types/UserSessionListItem.java b/src/main/java/me/didit/types/UserSessionListItem.java index 250e5f3..f845252 100644 --- a/src/main/java/me/didit/types/UserSessionListItem.java +++ b/src/main/java/me/didit/types/UserSessionListItem.java @@ -19,7 +19,7 @@ * Summary row for a User Verification (KYC) session. Identity fields (full_name, country, document_type, portrait_image, contact fields) are populated progressively as the user completes verification steps, and are null until the relevant step finishes. Fields restricted by the workflow's response-attributes configuration are also returned as null. */ public final class UserSessionListItem extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("session_id", "session_kind", "session_number", "session_url", "portrait_image", "document_type", "full_name", "country", "status", "vendor_data", "didit_internal_id", "created_at", "features", "phone_number", "email_address", "additional_details"); + private static final Set KNOWN_FIELDS = Set.of("session_id", "session_kind", "session_number", "session_url", "portrait_image", "document_type", "full_name", "country", "status", "vendor_data", "didit_internal_id", "created_at", "features", "phone_number", "email_address", "additional_details", "assignee", "waiting_since", "sla_due_at", "top_warnings", "warnings_count"); private UserSessionListItem(ObjectNode json, Map> files) { super(json, files); @@ -214,6 +214,56 @@ public Optional additionalDetails() { return Json.optional(json, "additional_details", Conv.model(UserSessionListItem.AdditionalDetails::fromJson)); } + /** + * The Console reviewer the session is assigned to, or null when nobody holds it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional assignee() { + return Json.optional(json, "assignee", Conv.model(UserSessionListItem.Assignee::fromJson)); + } + + /** + * When the session started waiting for review. null unless the session is In Review. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional waitingSince() { + return Json.optional(json, "waiting_since", Conv.DATE_TIME); + } + + /** + * When the review is due, from the review deadline set for your application in the Console. null unless the session is In Review and a deadline is set. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional slaDueAt() { + return Json.optional(json, "sla_due_at", Conv.DATE_TIME); + } + + /** + * Up to a few of the session's most important warnings, for a quick triage view. The full list is in the decision. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> topWarnings() { + return Json.optional(json, "top_warnings", Conv.list(Conv.model(UserSessionListItem.TopWarnings::fromJson))); + } + + /** + * Number of warnings on the session. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional warningsCount() { + return Json.optional(json, "warnings_count", Conv.LONG); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -387,6 +437,56 @@ public Builder additionalDetails(UserSessionListItem.@Nullable AdditionalDetails return setNullable("additional_details", Conv.model(UserSessionListItem.AdditionalDetails::fromJson), additionalDetails); } + /** + * The Console reviewer the session is assigned to, or null when nobody holds it. + * + * @param assignee the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder assignee(UserSessionListItem.@Nullable Assignee assignee) { + return setNullable("assignee", Conv.model(UserSessionListItem.Assignee::fromJson), assignee); + } + + /** + * When the session started waiting for review. null unless the session is In Review. + * + * @param waitingSince the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder waitingSince(@Nullable OffsetDateTime waitingSince) { + return setNullable("waiting_since", Conv.DATE_TIME, waitingSince); + } + + /** + * When the review is due, from the review deadline set for your application in the Console. null unless the session is In Review and a deadline is set. + * + * @param slaDueAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder slaDueAt(@Nullable OffsetDateTime slaDueAt) { + return setNullable("sla_due_at", Conv.DATE_TIME, slaDueAt); + } + + /** + * Up to a few of the session's most important warnings, for a quick triage view. The full list is in the decision. + * + * @param topWarnings the value + * @return this builder + */ + public Builder topWarnings(List topWarnings) { + return set("top_warnings", Conv.list(Conv.model(UserSessionListItem.TopWarnings::fromJson)), topWarnings); + } + + /** + * Number of warnings on the session. + * + * @param warningsCount the value + * @return this builder + */ + public Builder warningsCount(long warningsCount) { + return set("warnings_count", Conv.LONG, warningsCount); + } + /** * Builds the value. * @@ -730,7 +830,10 @@ public static final class Feature extends StringEnum { /** The value {@code "DATABASE_VALIDATION"}. */ public static final Feature DATABASE_VALIDATION = new Feature("DATABASE_VALIDATION"); - private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACE_MATCH, POA, QUESTIONNAIRE, EMAIL_VERIFICATION, PHONE, AML, IP_ANALYSIS, AGE_ESTIMATION, DATABASE_VALIDATION); + /** The value {@code "GEOLOCATION"}. */ + public static final Feature GEOLOCATION = new Feature("GEOLOCATION"); + + private static final List KNOWN_VALUES = List.of(ID_VERIFICATION, NFC, LIVENESS, FACE_MATCH, POA, QUESTIONNAIRE, EMAIL_VERIFICATION, PHONE, AML, IP_ANALYSIS, AGE_ESTIMATION, DATABASE_VALIDATION, GEOLOCATION); private Feature(String value) { super(value); @@ -2311,4 +2414,257 @@ protected Builder self() { } } } + + /** + * The Console reviewer the session is assigned to, or null when nobody holds it. + */ + public static final class Assignee extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("email", "assigned_at"); + + private Assignee(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code Assignee} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static Assignee fromJson(JsonNode json) { + return new Assignee(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * The email field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional email() { + return Json.optional(json, "email", Conv.STRING); + } + + /** + * The assigned_at field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional assignedAt() { + return Json.optional(json, "assigned_at", Conv.DATE_TIME); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link Assignee}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(Assignee from) { + super(from); + } + + /** + * The email field. + * + * @param email the value + * @return this builder + */ + public Builder email(String email) { + return set("email", Conv.STRING, email); + } + + /** + * The assigned_at field. + * + * @param assignedAt the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder assignedAt(@Nullable OffsetDateTime assignedAt) { + return setNullable("assigned_at", Conv.DATE_TIME, assignedAt); + } + + /** + * Builds the value. + * + * @return a new immutable {@code Assignee} + */ + public Assignee build() { + return new Assignee(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } + + public static final class TopWarnings extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("risk", "feature", "log_type", "short_description"); + + private TopWarnings(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code TopWarnings} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static TopWarnings fromJson(JsonNode json) { + return new TopWarnings(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Warning code, for example FACE_MATCH_LOW_SIMILARITY. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional risk() { + return Json.optional(json, "risk", Conv.STRING); + } + + /** + * The feature that raised it. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional feature() { + return Json.optional(json, "feature", Conv.STRING); + } + + /** + * error or warning; null for a legacy entry. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional logType() { + return Json.optional(json, "log_type", Conv.STRING); + } + + /** + * The short_description field. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional shortDescription() { + return Json.optional(json, "short_description", Conv.STRING); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link TopWarnings}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(TopWarnings from) { + super(from); + } + + /** + * Warning code, for example FACE_MATCH_LOW_SIMILARITY. + * + * @param risk the value + * @return this builder + */ + public Builder risk(String risk) { + return set("risk", Conv.STRING, risk); + } + + /** + * The feature that raised it. + * + * @param feature the value + * @return this builder + */ + public Builder feature(String feature) { + return set("feature", Conv.STRING, feature); + } + + /** + * error or warning; null for a legacy entry. + * + * @param logType the value, or {@code null} to send JSON null + * @return this builder + */ + public Builder logType(@Nullable String logType) { + return setNullable("log_type", Conv.STRING, logType); + } + + /** + * The short_description field. + * + * @param shortDescription the value + * @return this builder + */ + public Builder shortDescription(String shortDescription) { + return set("short_description", Conv.STRING, shortDescription); + } + + /** + * Builds the value. + * + * @return a new immutable {@code TopWarnings} + */ + public TopWarnings build() { + return new TopWarnings(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } } diff --git a/src/main/java/me/didit/types/UsersBatchDeleteParams.java b/src/main/java/me/didit/types/UsersBatchDeleteParams.java index f015acf..d4b8f62 100644 --- a/src/main/java/me/didit/types/UsersBatchDeleteParams.java +++ b/src/main/java/me/didit/types/UsersBatchDeleteParams.java @@ -14,7 +14,7 @@ /** Parameters for {@code users.batch_delete}. */ public final class UsersBatchDeleteParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("vendor_data_list", "didit_internal_id_list", "delete_all"); + private static final Set KNOWN_FIELDS = Set.of("vendor_data_list", "didit_internal_id_list", "delete_all", "retain_face_embeddings", "face_retention_days"); private UsersBatchDeleteParams(ObjectNode json, Map> files) { super(json, files); @@ -79,6 +79,26 @@ public Optional deleteAll() { return Json.optional(json, "delete_all", Conv.BOOLEAN); } + /** + * Your explicit choice to keep one image-free biometric template of each deleted person for duplicate detection, for face_retention_days. Everything else about the person is deleted. Omit it, or send false, to delete the templates with the users. When true, face_retention_days is required. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional retainFaceEmbeddings() { + return Json.optional(json, "retain_face_embeddings", Conv.BOOLEAN); + } + + /** + * Number of days the image-free biometric template is kept when retain_face_embeddings is true. Required with it, and rejected without it with a 400 on face_retention_days. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional faceRetentionDays() { + return Json.optional(json, "face_retention_days", Conv.LONG); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -122,6 +142,26 @@ public Builder deleteAll(boolean deleteAll) { return set("delete_all", Conv.BOOLEAN, deleteAll); } + /** + * Your explicit choice to keep one image-free biometric template of each deleted person for duplicate detection, for face_retention_days. Everything else about the person is deleted. Omit it, or send false, to delete the templates with the users. When true, face_retention_days is required. + * + * @param retainFaceEmbeddings the value + * @return this builder + */ + public Builder retainFaceEmbeddings(boolean retainFaceEmbeddings) { + return set("retain_face_embeddings", Conv.BOOLEAN, retainFaceEmbeddings); + } + + /** + * Number of days the image-free biometric template is kept when retain_face_embeddings is true. Required with it, and rejected without it with a 400 on face_retention_days. + * + * @param faceRetentionDays the value + * @return this builder + */ + public Builder faceRetentionDays(long faceRetentionDays) { + return set("face_retention_days", Conv.LONG, faceRetentionDays); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/WalletScreeningScreenParams.java b/src/main/java/me/didit/types/WalletScreeningScreenParams.java index 9bd3f88..affca29 100644 --- a/src/main/java/me/didit/types/WalletScreeningScreenParams.java +++ b/src/main/java/me/didit/types/WalletScreeningScreenParams.java @@ -61,13 +61,13 @@ public String walletAddress() { } /** - * Network identifier. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), and ARB (Arbitrum One). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: currency. + * Optional network identifier. When omitted, the network is read from the address format: bc1, 1 and 3 addresses are Bitcoin (BTC), T addresses are Tron (TRX) and base58 public keys are Solana (SOL). A 0x address is valid on every EVM network, so omitting blockchain for it answers 422 with the candidate networks in candidate_chains. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: currency. * - * @return the value - * @throws me.didit.errors.UnexpectedResponseException when the field is absent or has another type + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type */ - public WalletScreeningScreenParams.Blockchain blockchain() { - return Json.required(json, "blockchain", Conv.enumeration(WalletScreeningScreenParams.Blockchain::of)); + public Optional blockchain() { + return Json.optional(json, "blockchain", Conv.enumeration(WalletScreeningScreenParams.Blockchain::of)); } /** @@ -104,7 +104,7 @@ public Builder walletAddress(String walletAddress) { } /** - * Network identifier. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), and ARB (Arbitrum One). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: currency. + * Optional network identifier. When omitted, the network is read from the address format: bc1, 1 and 3 addresses are Bitcoin (BTC), T addresses are Tron (TRX) and base58 public keys are Solana (SOL). A 0x address is valid on every EVM network, so omitting blockchain for it answers 422 with the candidate networks in candidate_chains. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: currency. * * @param blockchain the value * @return this builder @@ -131,7 +131,6 @@ public Builder direction(WalletScreeningScreenParams.Direction direction) { */ public WalletScreeningScreenParams build() { require("wallet_address", false); - require("blockchain", false); return new WalletScreeningScreenParams(buildJson(), buildFiles()); } @@ -142,7 +141,7 @@ protected Builder self() { } /** - * Network identifier. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), and ARB (Arbitrum One). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: currency. + * Optional network identifier. When omitted, the network is read from the address format: bc1, 1 and 3 addresses are Bitcoin (BTC), T addresses are Tron (TRX) and base58 public keys are Solana (SOL). A 0x address is valid on every EVM network, so omitting blockchain for it answers 422 with the candidate networks in candidate_chains. Managed screening supports BTC, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, BASE (Base), OP (Optimism), ARB (Arbitrum One), AVAX (Avalanche C-Chain), ADA (Cardano), XLM (Stellar) and HBAR (Hedera). USDT and USDC are legacy Ethereum aliases, not multi-network searches. Connected-provider coverage varies. LIGHTNING requires a supported connected provider. CELO (Celo), MODE (Mode) and PLUME (Plume) are screened through a connected TRM Labs account; managed screening answers 400 for them. Alias: currency. * *

An open enum: {@link #of(String)} accepts values this SDK version does not know yet. */ @@ -195,6 +194,18 @@ public static final class Blockchain extends StringEnum { /** The value {@code "ARB"}. */ public static final Blockchain ARB = new Blockchain("ARB"); + /** The value {@code "AVAX"}. */ + public static final Blockchain AVAX = new Blockchain("AVAX"); + + /** The value {@code "ADA"}. */ + public static final Blockchain ADA = new Blockchain("ADA"); + + /** The value {@code "XLM"}. */ + public static final Blockchain XLM = new Blockchain("XLM"); + + /** The value {@code "HBAR"}. */ + public static final Blockchain HBAR = new Blockchain("HBAR"); + /** The value {@code "CELO"}. */ public static final Blockchain CELO = new Blockchain("CELO"); @@ -204,7 +215,7 @@ public static final class Blockchain extends StringEnum { /** The value {@code "PLUME"}. */ public static final Blockchain PLUME = new Blockchain("PLUME"); - private static final List KNOWN_VALUES = List.of(BTC, LIGHTNING, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, USDT, USDC, BASE, OP, ARB, CELO, MODE, PLUME); + private static final List KNOWN_VALUES = List.of(BTC, LIGHTNING, ETH, LTC, XRP, BCH, DOGE, TRX, SOL, MATIC, BNB, USDT, USDC, BASE, OP, ARB, AVAX, ADA, XLM, HBAR, CELO, MODE, PLUME); private Blockchain(String value) { super(value); diff --git a/src/main/java/me/didit/types/WebhookConfig.java b/src/main/java/me/didit/types/WebhookConfig.java index 10da598..043de25 100644 --- a/src/main/java/me/didit/types/WebhookConfig.java +++ b/src/main/java/me/didit/types/WebhookConfig.java @@ -18,7 +18,7 @@ * Application-level webhook configuration, retention policy and Digital ID wallet return hosts, with every webhook destination. */ public final class WebhookConfig extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("webhook_url", "webhook_version", "secret_shared_key", "capture_method", "data_retention_months", "face_retention_policy", "face_retention_days", "biometric_consent_mode", "available_events", "allowed_return_hosts", "endpoints"); + private static final Set KNOWN_FIELDS = Set.of("webhook_url", "webhook_version", "secret_shared_key", "capture_method", "data_retention_months", "face_retention_policy", "face_retention_days", "biometric_consent_mode", "available_events", "allowed_return_hosts", "endpoints", "allowed_domains"); private WebhookConfig(ObjectNode json, Map> files) { super(json, files); @@ -163,6 +163,16 @@ public List endpoints() { return Json.required(json, "endpoints", Conv.list(Conv.model(WebhookConfigDestination::fromJson))); } + /** + * Origins (for example https://app.example.com; http only for localhost) the hosted verification flow may be embedded in and may send the user back to with a session callback. Server-to-server calls are not affected. An empty list means no restriction. Didit stores each origin in lower case without a default port. An invalid entry fails with 400 on allowed_domains. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> allowedDomains() { + return Json.optional(json, "allowed_domains", Conv.list(Conv.STRING)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -286,6 +296,16 @@ public Builder endpoints(List endpoints) { return set("endpoints", Conv.list(Conv.model(WebhookConfigDestination::fromJson)), endpoints); } + /** + * Origins (for example https://app.example.com; http only for localhost) the hosted verification flow may be embedded in and may send the user back to with a session callback. Server-to-server calls are not affected. An empty list means no restriction. Didit stores each origin in lower case without a default port. An invalid entry fails with 400 on allowed_domains. + * + * @param allowedDomains the value + * @return this builder + */ + public Builder allowedDomains(List allowedDomains) { + return set("allowed_domains", Conv.list(Conv.STRING), allowedDomains); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/WebhookEvent.java b/src/main/java/me/didit/types/WebhookEvent.java index 4dc9ed9..d397b76 100644 --- a/src/main/java/me/didit/types/WebhookEvent.java +++ b/src/main/java/me/didit/types/WebhookEvent.java @@ -43,6 +43,9 @@ public final class WebhookEvent extends StringEnum { /** The value {@code "workflow.compliance_changed"}. */ public static final WebhookEvent WORKFLOW_COMPLIANCE_CHANGED = new WebhookEvent("workflow.compliance_changed"); + /** The value {@code "transaction_rule_suggestions.created"}. */ + public static final WebhookEvent TRANSACTION_RULE_SUGGESTIONS_CREATED = new WebhookEvent("transaction_rule_suggestions.created"); + /** The value {@code "auth.signup"}. */ public static final WebhookEvent AUTH_SIGNUP = new WebhookEvent("auth.signup"); @@ -103,7 +106,7 @@ public final class WebhookEvent extends StringEnum { /** The value {@code "investigator.external.report.ready"}. */ public static final WebhookEvent INVESTIGATOR_EXTERNAL_REPORT_READY = new WebhookEvent("investigator.external.report.ready"); - private static final List KNOWN_VALUES = List.of(STATUS_UPDATED, DATA_UPDATED, USER_STATUS_UPDATED, USER_DATA_UPDATED, BUSINESS_STATUS_UPDATED, BUSINESS_DATA_UPDATED, ACTIVITY_CREATED, TRANSACTION_CREATED, TRANSACTION_STATUS_UPDATED, TRAVEL_RULE_STATUS_UPDATED, WORKFLOW_COMPLIANCE_CHANGED, AUTH_SIGNUP, AUTH_LOGIN, AUTH_LOGIN_FAILED, AUTH_PASSWORD_RESET_REQUESTED, AUTH_PASSWORD_RESET_COMPLETED, AUTH_MFA_CHANGED, AUTH_NEW_DEVICE, AUTH_ACCOUNT_LOCKED, INVESTIGATOR_REPORT_READY, INVESTIGATOR_DECISION_AUTOMATED, INVESTIGATOR_DECISION_OVERRIDDEN, INVESTIGATOR_DECISION_CONTESTED, INVESTIGATOR_QUESTION_RAISED, INVESTIGATOR_AUTOMATION_PAUSED, INVESTIGATOR_RFI_ANSWERED, INVESTIGATOR_RFI_OVERDUE, INVESTIGATOR_DRIFT_DETECTED, INVESTIGATOR_SLA_BREACHED, INVESTIGATOR_QA_FAILED, INVESTIGATOR_EXTERNAL_REPORT_READY); + private static final List KNOWN_VALUES = List.of(STATUS_UPDATED, DATA_UPDATED, USER_STATUS_UPDATED, USER_DATA_UPDATED, BUSINESS_STATUS_UPDATED, BUSINESS_DATA_UPDATED, ACTIVITY_CREATED, TRANSACTION_CREATED, TRANSACTION_STATUS_UPDATED, TRAVEL_RULE_STATUS_UPDATED, WORKFLOW_COMPLIANCE_CHANGED, TRANSACTION_RULE_SUGGESTIONS_CREATED, AUTH_SIGNUP, AUTH_LOGIN, AUTH_LOGIN_FAILED, AUTH_PASSWORD_RESET_REQUESTED, AUTH_PASSWORD_RESET_COMPLETED, AUTH_MFA_CHANGED, AUTH_NEW_DEVICE, AUTH_ACCOUNT_LOCKED, INVESTIGATOR_REPORT_READY, INVESTIGATOR_DECISION_AUTOMATED, INVESTIGATOR_DECISION_OVERRIDDEN, INVESTIGATOR_DECISION_CONTESTED, INVESTIGATOR_QUESTION_RAISED, INVESTIGATOR_AUTOMATION_PAUSED, INVESTIGATOR_RFI_ANSWERED, INVESTIGATOR_RFI_OVERDUE, INVESTIGATOR_DRIFT_DETECTED, INVESTIGATOR_SLA_BREACHED, INVESTIGATOR_QA_FAILED, INVESTIGATOR_EXTERNAL_REPORT_READY); private WebhookEvent(String value) { super(value); diff --git a/src/main/java/me/didit/types/WebhookEventPayload.java b/src/main/java/me/didit/types/WebhookEventPayload.java index 28804bc..5bbfdbf 100644 --- a/src/main/java/me/didit/types/WebhookEventPayload.java +++ b/src/main/java/me/didit/types/WebhookEventPayload.java @@ -10,7 +10,7 @@ /** * Body of a signed webhook delivery, discriminated by webhook_type. activity.created can be subscribed to but is not sent today. Treat any other webhook_type as a new event type and keep the raw body. * - *

One of: {@code SessionStatusUpdatedEvent}, {@code SessionDataUpdatedEvent}, {@code UserStatusUpdatedEvent}, {@code UserDataUpdatedEvent}, {@code BusinessStatusUpdatedEvent}, {@code BusinessDataUpdatedEvent}, {@code TransactionCreatedEvent}, {@code TransactionStatusUpdatedEvent}, {@code TravelRuleStatusUpdatedEvent}, {@code WorkflowComplianceChangedEvent}. Check with the {@code is...} + *

One of: {@code SessionStatusUpdatedEvent}, {@code SessionDataUpdatedEvent}, {@code UserStatusUpdatedEvent}, {@code UserDataUpdatedEvent}, {@code BusinessStatusUpdatedEvent}, {@code BusinessDataUpdatedEvent}, {@code TransactionCreatedEvent}, {@code TransactionStatusUpdatedEvent}, {@code TravelRuleStatusUpdatedEvent}, {@code WorkflowComplianceChangedEvent}, {@code TransactionRuleSuggestionsCreatedEvent}. Check with the {@code is...} * methods and read with the {@code as...} methods; the fields every variant has are readable directly. */ public final class WebhookEventPayload extends JsonUnion { @@ -377,4 +377,34 @@ public boolean isWorkflowComplianceChangedEvent() { public Optional asWorkflowComplianceChangedEvent() { return isWorkflowComplianceChangedEvent() ? Optional.of(Conv.model(WorkflowComplianceChangedEvent::fromJson).read(json)) : Optional.empty(); } + + /** + * Wraps a {@code TransactionRuleSuggestionsCreatedEvent} value. + * + * @param value the value + * @return the union + */ + public static WebhookEventPayload ofTransactionRuleSuggestionsCreatedEvent(TransactionRuleSuggestionsCreatedEvent value) { + return new WebhookEventPayload(Conv.model(TransactionRuleSuggestionsCreatedEvent::fromJson).write(value)); + } + + /** + * Whether this value is a {@code TransactionRuleSuggestionsCreatedEvent}. + * + * A transaction rule suggestion run proposed new rule changes for your application. Sent when the rule-suggestion settings have webhook notifications on. There is no top-level status. + * + * @return true when it matches + */ + public boolean isTransactionRuleSuggestionsCreatedEvent() { + return json.isObject(); + } + + /** + * Reads this value as a {@code TransactionRuleSuggestionsCreatedEvent}. + * + * @return the value, or empty when {@link #isTransactionRuleSuggestionsCreatedEvent()} is false + */ + public Optional asTransactionRuleSuggestionsCreatedEvent() { + return isTransactionRuleSuggestionsCreatedEvent() ? Optional.of(Conv.model(TransactionRuleSuggestionsCreatedEvent::fromJson).read(json)) : Optional.empty(); + } } diff --git a/src/main/java/me/didit/types/WebhooksUpdateConfigParams.java b/src/main/java/me/didit/types/WebhooksUpdateConfigParams.java index c948e1b..e936a1a 100644 --- a/src/main/java/me/didit/types/WebhooksUpdateConfigParams.java +++ b/src/main/java/me/didit/types/WebhooksUpdateConfigParams.java @@ -16,7 +16,7 @@ /** Parameters for {@code webhooks.update_config}. */ public final class WebhooksUpdateConfigParams extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("webhook_url", "webhook_version", "rotate_secret_key", "capture_method", "data_retention_months", "face_retention_policy", "face_retention_days", "biometric_consent_mode", "allowed_return_hosts"); + private static final Set KNOWN_FIELDS = Set.of("webhook_url", "webhook_version", "rotate_secret_key", "capture_method", "data_retention_months", "face_retention_policy", "face_retention_days", "biometric_consent_mode", "allowed_return_hosts", "allowed_domains"); private WebhooksUpdateConfigParams(ObjectNode json, Map> files) { super(json, files); @@ -141,6 +141,16 @@ public Optional> allowedReturnHosts() { return Json.optional(json, "allowed_return_hosts", Conv.list(Conv.STRING)); } + /** + * Replaces the whole list of allowed origins. Origins (for example https://app.example.com; http only for localhost) the hosted verification flow may be embedded in and may send the user back to with a session callback. Server-to-server calls are not affected. An empty list means no restriction. Didit stores each origin in lower case without a default port. An invalid entry fails with 400 on allowed_domains. Send [] to remove the restriction. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional> allowedDomains() { + return Json.optional(json, "allowed_domains", Conv.list(Conv.STRING)); + } + @Override protected Set knownFields() { return KNOWN_FIELDS; @@ -244,6 +254,16 @@ public Builder allowedReturnHosts(List allowedReturnHosts) { return set("allowed_return_hosts", Conv.list(Conv.STRING), allowedReturnHosts); } + /** + * Replaces the whole list of allowed origins. Origins (for example https://app.example.com; http only for localhost) the hosted verification flow may be embedded in and may send the user back to with a session callback. Server-to-server calls are not affected. An empty list means no restriction. Didit stores each origin in lower case without a default port. An invalid entry fails with 400 on allowed_domains. Send [] to remove the restriction. + * + * @param allowedDomains the value + * @return this builder + */ + public Builder allowedDomains(List allowedDomains) { + return set("allowed_domains", Conv.list(Conv.STRING), allowedDomains); + } + /** * Builds the value. * diff --git a/src/main/java/me/didit/types/WorkflowDetail.java b/src/main/java/me/didit/types/WorkflowDetail.java index 27a5662..e0c4126 100644 --- a/src/main/java/me/didit/types/WorkflowDetail.java +++ b/src/main/java/me/didit/types/WorkflowDetail.java @@ -19,7 +19,7 @@ * The fields below are typed; the object also carries every other column of the workflow configuration (feature toggles, thresholds, warning actions, allowed documents, callbacks) as additional properties. Fields that do not apply to the workflow_type are null. */ public final class WorkflowDetail extends JsonModel { - private static final Set KNOWN_FIELDS = Set.of("uuid", "workflow_id", "workflow_label", "workflow_type", "is_default", "is_archived", "version", "status", "published_at", "is_simple_workflow", "is_editable", "workflow_url", "workflow_graph", "features", "total_price", "min_price", "max_price", "special_add_on_prices", "max_retry_attempts", "retry_window_days", "session_expiration_time", "questionnaire", "kyb_role_settings", "created_at", "updated_at", "is_bank_verification_enabled", "bank_verification_config", "is_geolocation_enabled", "geolocation_config"); + private static final Set KNOWN_FIELDS = Set.of("uuid", "workflow_id", "workflow_label", "workflow_type", "is_default", "is_archived", "version", "status", "published_at", "is_simple_workflow", "is_editable", "workflow_url", "workflow_graph", "features", "total_price", "min_price", "max_price", "special_add_on_prices", "max_retry_attempts", "retry_window_days", "session_expiration_time", "questionnaire", "kyb_role_settings", "created_at", "updated_at", "signature_availability", "is_bank_verification_enabled", "bank_verification_config", "is_geolocation_enabled", "geolocation_config"); private WorkflowDetail(ObjectNode json, Map> files) { super(json, files); @@ -304,6 +304,16 @@ public Optional updatedAt() { return Json.optional(json, "updated_at", Conv.DATE_TIME); } + /** + * Which E-signature levels can sign right now. Check it before you set signature_level. Returned on kyc, kyb and graph workflows. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional signatureAvailability() { + return Json.optional(json, "signature_availability", Conv.model(WorkflowDetail.SignatureAvailability::fromJson)); + } + /** * Whether a simple KYC or KYB workflow runs Bank verification. It runs after the contact steps (and Location verification) and before database validation, AML and IP analysis. Bank verification is not generally available yet: turning it on is refused wherever it is not enabled. * @@ -607,6 +617,16 @@ public Builder updatedAt(OffsetDateTime updatedAt) { return set("updated_at", Conv.DATE_TIME, updatedAt); } + /** + * Which E-signature levels can sign right now. Check it before you set signature_level. Returned on kyc, kyb and graph workflows. + * + * @param signatureAvailability the value + * @return this builder + */ + public Builder signatureAvailability(WorkflowDetail.SignatureAvailability signatureAvailability) { + return set("signature_availability", Conv.model(WorkflowDetail.SignatureAvailability::fromJson), signatureAvailability); + } + /** * Whether a simple KYC or KYB workflow runs Bank verification. It runs after the contact steps (and Location verification) and before database validation, AML and IP analysis. Bank verification is not generally available yet: turning it on is refused wherever it is not enabled. * @@ -765,4 +785,132 @@ public boolean isKnown() { return KNOWN_VALUES.contains(this); } } + + /** + * Which E-signature levels can sign right now. Check it before you set signature_level. Returned on kyc, kyb and graph workflows. + */ + public static final class SignatureAvailability extends JsonModel { + private static final Set KNOWN_FIELDS = Set.of("simple", "aes", "qes"); + + private SignatureAvailability(ObjectNode json, Map> files) { + super(json, files); + } + + /** + * Reads a {@code SignatureAvailability} from JSON. Unknown fields are kept and readable + * through {@link #_additionalProperties()}. + * + * @param json a JSON object + * @return the parsed value + */ + public static SignatureAvailability fromJson(JsonNode json) { + return new SignatureAvailability(Json.copyObject(json), Map.of()); + } + + /** + * Returns an empty builder. + * + * @return a new builder + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Returns a builder holding a copy of every field of this value. + * + * @return a new builder + */ + public Builder toBuilder() { + return new Builder(this); + } + + /** + * Simple is always available. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional simple() { + return Json.optional(json, "simple", Conv.BOOLEAN); + } + + /** + * Whether Advanced (AES) can sign now. While it is false, saving a new step at signature_level: "aes" is refused with aes_not_available. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional aes() { + return Json.optional(json, "aes", Conv.BOOLEAN); + } + + /** + * Whether Qualified (QES) can sign now. It is false until a qualified provider is connected. + * + * @return the value, or empty when the field is absent or null + * @throws me.didit.errors.UnexpectedResponseException when the field has another type + */ + public Optional qes() { + return Json.optional(json, "qes", Conv.BOOLEAN); + } + + @Override + protected Set knownFields() { + return KNOWN_FIELDS; + } + + /** Builds a {@link SignatureAvailability}. */ + public static final class Builder extends JsonModel.BaseBuilder { + private Builder() {} + + private Builder(SignatureAvailability from) { + super(from); + } + + /** + * Simple is always available. + * + * @param simple the value + * @return this builder + */ + public Builder simple(boolean simple) { + return set("simple", Conv.BOOLEAN, simple); + } + + /** + * Whether Advanced (AES) can sign now. While it is false, saving a new step at signature_level: "aes" is refused with aes_not_available. + * + * @param aes the value + * @return this builder + */ + public Builder aes(boolean aes) { + return set("aes", Conv.BOOLEAN, aes); + } + + /** + * Whether Qualified (QES) can sign now. It is false until a qualified provider is connected. + * + * @param qes the value + * @return this builder + */ + public Builder qes(boolean qes) { + return set("qes", Conv.BOOLEAN, qes); + } + + /** + * Builds the value. + * + * @return a new immutable {@code SignatureAvailability} + */ + public SignatureAvailability build() { + return new SignatureAvailability(buildJson(), buildFiles()); + } + + @Override + protected Builder self() { + return this; + } + } + } } diff --git a/src/test/java/me/didit/resources/AnalyticsResourceTest.java b/src/test/java/me/didit/resources/AnalyticsResourceTest.java index 78b406f..4131f79 100644 --- a/src/test/java/me/didit/resources/AnalyticsResourceTest.java +++ b/src/test/java/me/didit/resources/AnalyticsResourceTest.java @@ -16,6 +16,7 @@ import me.didit.testing.TestJson; import me.didit.testing.TestModels; import me.didit.types.AnalyticsRetrieveParams; +import me.didit.types.AnalyticsRetrieveTodayParams; import org.junit.jupiter.api.Test; /** One test per operation of {@code analytics}, against a stubbed HTTP layer. */ @@ -40,4 +41,21 @@ void retrieve() { TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } + + @Test + void retrieveToday() { + AnalyticsRetrieveTodayParams params = AnalyticsRetrieveTodayParams.builder().tz("value-tz").build(); + JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/organization/{organization_id}/application/{application_id}/analytics/today/", "200"); + transport.respondJson(200, example); + var result = client.analytics().retrieveToday(params); + RecordedRequest request = transport.only(); + assertEquals("GET", request.method()); + assertEquals("/v3/organization/00000000-0000-4000-8000-0000000000a1/application/00000000-0000-4000-8000-0000000000a2/analytics/today/", request.path()); + assertEquals(Map.ofEntries(Map.entry("tz", List.of("value-tz"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } } diff --git a/src/test/java/me/didit/resources/DatabaseValidationResourceTest.java b/src/test/java/me/didit/resources/DatabaseValidationResourceTest.java index 7069a28..fe82013 100644 --- a/src/test/java/me/didit/resources/DatabaseValidationResourceTest.java +++ b/src/test/java/me/didit/resources/DatabaseValidationResourceTest.java @@ -27,7 +27,7 @@ final class DatabaseValidationResourceTest { @Test void validate() { - DatabaseValidationValidateParams params = DatabaseValidationValidateParams.builder().issuingState("value-issuing-state").services(List.of("value-services")).validationType("value-validation-type").consent(true).identificationNumber("value-identification-number").firstName("value-first-name").lastName("value-last-name").middleName("value-middle-name").fullName("value-full-name").dateOfBirth(LocalDate.parse("2026-11-01")).personalNumber("value-personal-number").taxNumber("value-tax-number").documentNumber("value-document-number").documentType(DatabaseValidationValidateParams.DocumentType.P).expirationDate(LocalDate.parse("2026-11-01")).dateOfIssue(LocalDate.parse("2026-11-01")).nationality("value-nationality").gender(DatabaseValidationValidateParams.Gender.M).address(DatabaseValidationValidateParams.Address.ofVariant1(DatabaseValidationValidateParams.Address.Variant1.builder().street1("value-street-1").street2("value-street-2").build())).addressElement1("value-address-element-1").addressElement2("value-address-element-2").addressElement3("value-address-element-3").addressElement4("value-address-element-4").addressElement5("value-address-element-5").postalCode("value-postal-code").driverLicenseNumber("value-driver-license-number").driverLicenseCardNumber("value-driver-license-card-number").driverLicenseState("value-driver-license-state").driverLicenseVersion("value-driver-license-version").passportNumber("value-passport-number").passportExpirationDate(LocalDate.parse("2026-11-01")).passportFileNumber("value-passport-file-number").passportIssueCountry("value-passport-issue-country").medicareCardNumber("value-medicare-card-number").immiCardNumber("value-immi-card-number").immiCardExpiryDate(LocalDate.parse("2026-11-01")).citizenshipCertificateNumber("value-citizenship-certificate-number").birthRegistrationNumber("value-birth-registration-number").birthRegistrationDate(LocalDate.parse("2026-11-01")).birthRegistrationState("value-birth-registration-state").marriageCertificateNumber("value-marriage-certificate-number").changeOfNameCertificateNumber("value-change-of-name-certificate-number").firstPartnerName("value-first-partner-name").lastPartnerName("value-last-partner-name").voterId("value-voter-id").epicCard("value-epic-card").pan("value-pan").nationalId("value-national-id").cic("value-cic").identificadorCiudadano("value-identificador-ciudadano").ocr("value-ocr").voterNumber("value-voter-number").emissionNumber("value-emission-number").bvn("value-bvn").bankCardNumber("value-bank-card-number").ssn("value-ssn").phone("value-phone").landline("value-landline").email("user@example.com").countryOfResidence("value-country-of-residence").partialMatchAction(DatabaseValidationValidateParams.PartialMatchAction.DECLINE).noMatchAction(DatabaseValidationValidateParams.NoMatchAction.DECLINE).saveApiRequest(true).vendorData("value-vendor-data").metadata(Map.of("key", "value")).selfie(FileUpload.of(new byte[] {37, 80, 68, 70}, "selfie.pdf", "application/pdf")).build(); + DatabaseValidationValidateParams params = DatabaseValidationValidateParams.builder().issuingState("value-issuing-state").services(List.of("value-services")).validationType("value-validation-type").consent(true).identificationNumber("value-identification-number").firstName("value-first-name").lastName("value-last-name").middleName("value-middle-name").fullName("value-full-name").dateOfBirth(LocalDate.parse("2026-11-01")).personalNumber("value-personal-number").taxNumber("value-tax-number").documentNumber("value-document-number").documentType(DatabaseValidationValidateParams.DocumentType.P).expirationDate(LocalDate.parse("2026-11-01")).dateOfIssue(LocalDate.parse("2026-11-01")).nationality("value-nationality").gender(DatabaseValidationValidateParams.Gender.M).address(DatabaseValidationValidateParams.Address.ofVariant1(DatabaseValidationValidateParams.Address.Variant1.builder().street1("value-street-1").street2("value-street-2").build())).addressElement1("value-address-element-1").addressElement2("value-address-element-2").addressElement3("value-address-element-3").addressElement4("value-address-element-4").addressElement5("value-address-element-5").postalCode("value-postal-code").driverLicenseNumber("value-driver-license-number").driverLicenseCardNumber("value-driver-license-card-number").driverLicenseState("value-driver-license-state").driverLicenseVersion("value-driver-license-version").passportNumber("value-passport-number").passportExpirationDate(LocalDate.parse("2026-11-01")).passportFileNumber("value-passport-file-number").passportIssueCountry("value-passport-issue-country").medicareCardNumber("value-medicare-card-number").immiCardNumber("value-immi-card-number").immiCardExpiryDate(LocalDate.parse("2026-11-01")).citizenshipCertificateNumber("value-citizenship-certificate-number").birthRegistrationNumber("value-birth-registration-number").birthRegistrationDate(LocalDate.parse("2026-11-01")).birthRegistrationState("value-birth-registration-state").marriageCertificateNumber("value-marriage-certificate-number").changeOfNameCertificateNumber("value-change-of-name-certificate-number").firstPartnerName("value-first-partner-name").lastPartnerName("value-last-partner-name").voterId("value-voter-id").epicCard("value-epic-card").pan("value-pan").nationalId("value-national-id").cic("value-cic").identificadorCiudadano("value-identificador-ciudadano").ocr("value-ocr").voterNumber("value-voter-number").emissionNumber("value-emission-number").bvn("value-bvn").bankCardNumber("value-bank-card-number").companyRegistrationNumber("value-company-registration-number").companyName("value-company-name").initials("value-initials").licenceNumber("value-licence-number").refugeeFileNumber("value-refugee-file-number").bankName("value-bank-name").bankAccountNumber("value-bank-account-number").accountType("value-account-type").phoneNumber("value-phone-number").rightThumb("value-right-thumb").leftThumb("value-left-thumb").scoreLevel(1L).maxMatches(1L).vehicleRegisterNumber("value-vehicle-register-number").vehicleLicencePlate("value-vehicle-licence-plate").vin("value-vin").ssn("value-ssn").phone("value-phone").landline("value-landline").email("user@example.com").countryOfResidence("value-country-of-residence").partialMatchAction(DatabaseValidationValidateParams.PartialMatchAction.DECLINE).noMatchAction(DatabaseValidationValidateParams.NoMatchAction.DECLINE).saveApiRequest(true).vendorData("value-vendor-data").metadata(Map.of("key", "value")).selfie(FileUpload.of(new byte[] {37, 80, 68, 70}, "selfie.pdf", "application/pdf")).build(); JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/database-validation/", "200"); transport.respondJson(200, example); var result = client.databaseValidation().validate(params); @@ -37,7 +37,7 @@ void validate() { assertEquals(Map.of(), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); - assertEquals(Map.ofEntries(Map.entry("issuing_state", List.of("value-issuing-state")), Map.entry("services", List.of("value-services")), Map.entry("validation_type", List.of("value-validation-type")), Map.entry("consent", List.of("true")), Map.entry("identification_number", List.of("value-identification-number")), Map.entry("first_name", List.of("value-first-name")), Map.entry("last_name", List.of("value-last-name")), Map.entry("middle_name", List.of("value-middle-name")), Map.entry("full_name", List.of("value-full-name")), Map.entry("date_of_birth", List.of("2026-11-01")), Map.entry("personal_number", List.of("value-personal-number")), Map.entry("tax_number", List.of("value-tax-number")), Map.entry("document_number", List.of("value-document-number")), Map.entry("document_type", List.of("P")), Map.entry("expiration_date", List.of("2026-11-01")), Map.entry("date_of_issue", List.of("2026-11-01")), Map.entry("nationality", List.of("value-nationality")), Map.entry("gender", List.of("M")), Map.entry("address", List.of("{\"street_1\":\"value-street-1\",\"street_2\":\"value-street-2\"}")), Map.entry("address_element_1", List.of("value-address-element-1")), Map.entry("address_element_2", List.of("value-address-element-2")), Map.entry("address_element_3", List.of("value-address-element-3")), Map.entry("address_element_4", List.of("value-address-element-4")), Map.entry("address_element_5", List.of("value-address-element-5")), Map.entry("postal_code", List.of("value-postal-code")), Map.entry("driver_license_number", List.of("value-driver-license-number")), Map.entry("driver_license_card_number", List.of("value-driver-license-card-number")), Map.entry("driver_license_state", List.of("value-driver-license-state")), Map.entry("driver_license_version", List.of("value-driver-license-version")), Map.entry("passport_number", List.of("value-passport-number")), Map.entry("passport_expiration_date", List.of("2026-11-01")), Map.entry("passport_file_number", List.of("value-passport-file-number")), Map.entry("passport_issue_country", List.of("value-passport-issue-country")), Map.entry("medicare_card_number", List.of("value-medicare-card-number")), Map.entry("immi_card_number", List.of("value-immi-card-number")), Map.entry("immi_card_expiry_date", List.of("2026-11-01")), Map.entry("citizenship_certificate_number", List.of("value-citizenship-certificate-number")), Map.entry("birth_registration_number", List.of("value-birth-registration-number")), Map.entry("birth_registration_date", List.of("2026-11-01")), Map.entry("birth_registration_state", List.of("value-birth-registration-state")), Map.entry("marriage_certificate_number", List.of("value-marriage-certificate-number")), Map.entry("change_of_name_certificate_number", List.of("value-change-of-name-certificate-number")), Map.entry("first_partner_name", List.of("value-first-partner-name")), Map.entry("last_partner_name", List.of("value-last-partner-name")), Map.entry("voter_id", List.of("value-voter-id")), Map.entry("epic_card", List.of("value-epic-card")), Map.entry("pan", List.of("value-pan")), Map.entry("national_id", List.of("value-national-id")), Map.entry("cic", List.of("value-cic")), Map.entry("identificador_ciudadano", List.of("value-identificador-ciudadano")), Map.entry("ocr", List.of("value-ocr")), Map.entry("voter_number", List.of("value-voter-number")), Map.entry("emission_number", List.of("value-emission-number")), Map.entry("bvn", List.of("value-bvn")), Map.entry("bank_card_number", List.of("value-bank-card-number")), Map.entry("ssn", List.of("value-ssn")), Map.entry("phone", List.of("value-phone")), Map.entry("landline", List.of("value-landline")), Map.entry("email", List.of("user@example.com")), Map.entry("country_of_residence", List.of("value-country-of-residence")), Map.entry("partial_match_action", List.of("DECLINE")), Map.entry("no_match_action", List.of("DECLINE")), Map.entry("save_api_request", List.of("true")), Map.entry("vendor_data", List.of("value-vendor-data")), Map.entry("metadata", List.of("{\"key\":\"value\"}"))), request.multipartFields()); + assertEquals(Map.ofEntries(Map.entry("issuing_state", List.of("value-issuing-state")), Map.entry("services", List.of("value-services")), Map.entry("validation_type", List.of("value-validation-type")), Map.entry("consent", List.of("true")), Map.entry("identification_number", List.of("value-identification-number")), Map.entry("first_name", List.of("value-first-name")), Map.entry("last_name", List.of("value-last-name")), Map.entry("middle_name", List.of("value-middle-name")), Map.entry("full_name", List.of("value-full-name")), Map.entry("date_of_birth", List.of("2026-11-01")), Map.entry("personal_number", List.of("value-personal-number")), Map.entry("tax_number", List.of("value-tax-number")), Map.entry("document_number", List.of("value-document-number")), Map.entry("document_type", List.of("P")), Map.entry("expiration_date", List.of("2026-11-01")), Map.entry("date_of_issue", List.of("2026-11-01")), Map.entry("nationality", List.of("value-nationality")), Map.entry("gender", List.of("M")), Map.entry("address", List.of("{\"street_1\":\"value-street-1\",\"street_2\":\"value-street-2\"}")), Map.entry("address_element_1", List.of("value-address-element-1")), Map.entry("address_element_2", List.of("value-address-element-2")), Map.entry("address_element_3", List.of("value-address-element-3")), Map.entry("address_element_4", List.of("value-address-element-4")), Map.entry("address_element_5", List.of("value-address-element-5")), Map.entry("postal_code", List.of("value-postal-code")), Map.entry("driver_license_number", List.of("value-driver-license-number")), Map.entry("driver_license_card_number", List.of("value-driver-license-card-number")), Map.entry("driver_license_state", List.of("value-driver-license-state")), Map.entry("driver_license_version", List.of("value-driver-license-version")), Map.entry("passport_number", List.of("value-passport-number")), Map.entry("passport_expiration_date", List.of("2026-11-01")), Map.entry("passport_file_number", List.of("value-passport-file-number")), Map.entry("passport_issue_country", List.of("value-passport-issue-country")), Map.entry("medicare_card_number", List.of("value-medicare-card-number")), Map.entry("immi_card_number", List.of("value-immi-card-number")), Map.entry("immi_card_expiry_date", List.of("2026-11-01")), Map.entry("citizenship_certificate_number", List.of("value-citizenship-certificate-number")), Map.entry("birth_registration_number", List.of("value-birth-registration-number")), Map.entry("birth_registration_date", List.of("2026-11-01")), Map.entry("birth_registration_state", List.of("value-birth-registration-state")), Map.entry("marriage_certificate_number", List.of("value-marriage-certificate-number")), Map.entry("change_of_name_certificate_number", List.of("value-change-of-name-certificate-number")), Map.entry("first_partner_name", List.of("value-first-partner-name")), Map.entry("last_partner_name", List.of("value-last-partner-name")), Map.entry("voter_id", List.of("value-voter-id")), Map.entry("epic_card", List.of("value-epic-card")), Map.entry("pan", List.of("value-pan")), Map.entry("national_id", List.of("value-national-id")), Map.entry("cic", List.of("value-cic")), Map.entry("identificador_ciudadano", List.of("value-identificador-ciudadano")), Map.entry("ocr", List.of("value-ocr")), Map.entry("voter_number", List.of("value-voter-number")), Map.entry("emission_number", List.of("value-emission-number")), Map.entry("bvn", List.of("value-bvn")), Map.entry("bank_card_number", List.of("value-bank-card-number")), Map.entry("company_registration_number", List.of("value-company-registration-number")), Map.entry("company_name", List.of("value-company-name")), Map.entry("initials", List.of("value-initials")), Map.entry("licence_number", List.of("value-licence-number")), Map.entry("refugee_file_number", List.of("value-refugee-file-number")), Map.entry("bank_name", List.of("value-bank-name")), Map.entry("bank_account_number", List.of("value-bank-account-number")), Map.entry("account_type", List.of("value-account-type")), Map.entry("phone_number", List.of("value-phone-number")), Map.entry("right_thumb", List.of("value-right-thumb")), Map.entry("left_thumb", List.of("value-left-thumb")), Map.entry("score_level", List.of("1")), Map.entry("max_matches", List.of("1")), Map.entry("vehicle_register_number", List.of("value-vehicle-register-number")), Map.entry("vehicle_licence_plate", List.of("value-vehicle-licence-plate")), Map.entry("vin", List.of("value-vin")), Map.entry("ssn", List.of("value-ssn")), Map.entry("phone", List.of("value-phone")), Map.entry("landline", List.of("value-landline")), Map.entry("email", List.of("user@example.com")), Map.entry("country_of_residence", List.of("value-country-of-residence")), Map.entry("partial_match_action", List.of("DECLINE")), Map.entry("no_match_action", List.of("DECLINE")), Map.entry("save_api_request", List.of("true")), Map.entry("vendor_data", List.of("value-vendor-data")), Map.entry("metadata", List.of("{\"key\":\"value\"}"))), request.multipartFields()); assertEquals(Map.ofEntries(Map.entry("selfie", List.of("selfie.pdf"))), request.multipartFiles()); TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); diff --git a/src/test/java/me/didit/resources/EmailResourceTest.java b/src/test/java/me/didit/resources/EmailResourceTest.java index 022e590..a62e185 100644 --- a/src/test/java/me/didit/resources/EmailResourceTest.java +++ b/src/test/java/me/didit/resources/EmailResourceTest.java @@ -62,7 +62,7 @@ void sendCode() { @Test void checkCode() { - EmailCheckCodeParams params = EmailCheckCodeParams.builder().email("user@example.com").code("value-code").duplicatedEmailAction(EmailCheckCodeParams.DuplicatedEmailAction.NO_ACTION).breachedEmailAction(EmailCheckCodeParams.BreachedEmailAction.NO_ACTION).disposableEmailAction(EmailCheckCodeParams.DisposableEmailAction.NO_ACTION).enableSocial(true).emailNoSocialPresenceAction(EmailCheckCodeParams.EmailNoSocialPresenceAction.NO_ACTION).build(); + EmailCheckCodeParams params = EmailCheckCodeParams.builder().email("user@example.com").code("value-code").duplicatedEmailAction(EmailCheckCodeParams.DuplicatedEmailAction.NO_ACTION).breachedEmailAction(EmailCheckCodeParams.BreachedEmailAction.NO_ACTION).disposableEmailAction(EmailCheckCodeParams.DisposableEmailAction.NO_ACTION).enableEnrichment(true).emailIntelligenceScoreAction(EmailCheckCodeParams.EmailIntelligenceScoreAction.NO_ACTION).recentEmailBreachAction(EmailCheckCodeParams.RecentEmailBreachAction.NO_ACTION).frequentEmailBreachAction(EmailCheckCodeParams.FrequentEmailBreachAction.NO_ACTION).enableSocial(true).emailNoSocialPresenceAction(EmailCheckCodeParams.EmailNoSocialPresenceAction.NO_ACTION).build(); JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/email/check/", "200"); transport.respondJson(200, example); var result = client.email().checkCode(params); @@ -72,7 +72,7 @@ void checkCode() { assertEquals(Map.of(), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); - TestJson.assertJsonEquals("{\"email\":\"user@example.com\",\"code\":\"value-code\",\"duplicated_email_action\":\"NO_ACTION\",\"breached_email_action\":\"NO_ACTION\",\"disposable_email_action\":\"NO_ACTION\",\"enable_social\":true,\"email_no_social_presence_action\":\"NO_ACTION\"}", request.body()); + TestJson.assertJsonEquals("{\"email\":\"user@example.com\",\"code\":\"value-code\",\"duplicated_email_action\":\"NO_ACTION\",\"breached_email_action\":\"NO_ACTION\",\"disposable_email_action\":\"NO_ACTION\",\"enable_enrichment\":true,\"email_intelligence_score_action\":\"NO_ACTION\",\"recent_email_breach_action\":\"NO_ACTION\",\"frequent_email_breach_action\":\"NO_ACTION\",\"enable_social\":true,\"email_no_social_presence_action\":\"NO_ACTION\"}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } diff --git a/src/test/java/me/didit/resources/IdWalletsResourceTest.java b/src/test/java/me/didit/resources/IdWalletsResourceTest.java index a25a8b0..288a08f 100644 --- a/src/test/java/me/didit/resources/IdWalletsResourceTest.java +++ b/src/test/java/me/didit/resources/IdWalletsResourceTest.java @@ -39,6 +39,8 @@ import me.didit.types.DigitalIdWalletApiFrejaidWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartCountryEnum; import me.didit.types.DigitalIdWalletApiFtnWalletVerificationStartRequest; +import me.didit.types.DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum; +import me.didit.types.DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartCountryEnum; import me.didit.types.DigitalIdWalletApiGovbrWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiGovukWalletWalletVerificationStartRequest; @@ -61,6 +63,7 @@ import me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartCountryEnum; import me.didit.types.DigitalIdWalletApiUaePassWalletVerificationStartRequest; import me.didit.types.DigitalIdWalletApiVippsWalletVerificationStartRequest; +import me.didit.types.DigitalIdWalletApiWalletDigitalCredentialResponseRequest; import org.junit.jupiter.api.Test; /** One test per operation of {@code id_wallets}, against a stubbed HTTP layer. */ @@ -607,4 +610,40 @@ void startEudi() { TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } + + @Test + void submitVerificationResponse() { + DigitalIdWalletApiWalletDigitalCredentialResponseRequest params = DigitalIdWalletApiWalletDigitalCredentialResponseRequest.builder().response(Map.of("key", "value")).build(); + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/id-verification/wallets/verifications/{request_id}/response/", "200"); + transport.respondJson(200, example); + var result = client.idWallets().submitVerificationResponse("00000000-0000-4000-8000-000000020032", params); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/id-verification/wallets/verifications/00000000-0000-4000-8000-000000020032/response/", request.path()); + assertEquals(Map.of(), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + TestJson.assertJsonEquals("{\"response\":{\"key\":\"value\"}}", request.body()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void startGoogleWallet() { + DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest params = DigitalIdWalletApiGoogleWalletWalletVerificationStartRequest.builder().vendorData("value-vendor-data").metadata(Map.of("key", "value")).sandboxScenario("value-sandbox-scenario").country(DigitalIdWalletApiGoogleWalletWalletVerificationStartCountryEnum.USA).origin("value-origin").build(); + RequestOptions options = RequestOptions.builder().idempotencyKey("idem-1").build(); + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/id-verification/wallets/google-wallet/", "201"); + transport.respondJson(201, example); + var result = client.idWallets().startGoogleWallet(params, options); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/id-verification/wallets/google-wallet/", request.path()); + assertEquals(Map.of(), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals("idem-1", request.header("Idempotency-Key")); + TestJson.assertJsonEquals("{\"vendor_data\":\"value-vendor-data\",\"metadata\":{\"key\":\"value\"},\"sandbox_scenario\":\"value-sandbox-scenario\",\"country\":\"USA\",\"origin\":\"value-origin\"}", request.body()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } } diff --git a/src/test/java/me/didit/resources/PhoneResourceTest.java b/src/test/java/me/didit/resources/PhoneResourceTest.java index 809f0c7..4ca9840 100644 --- a/src/test/java/me/didit/resources/PhoneResourceTest.java +++ b/src/test/java/me/didit/resources/PhoneResourceTest.java @@ -62,7 +62,7 @@ void sendCode() { @Test void checkCode() { - PhoneCheckCodeParams params = PhoneCheckCodeParams.builder().phoneNumber("value-phone-number").code("value-code").duplicatedPhoneNumberAction(PhoneCheckCodeParams.DuplicatedPhoneNumberAction.NO_ACTION).disposableNumberAction(PhoneCheckCodeParams.DisposableNumberAction.NO_ACTION).voipNumberAction(PhoneCheckCodeParams.VoipNumberAction.NO_ACTION).enableSocial(true).phoneNoSocialPresenceAction(PhoneCheckCodeParams.PhoneNoSocialPresenceAction.NO_ACTION).build(); + PhoneCheckCodeParams params = PhoneCheckCodeParams.builder().phoneNumber("value-phone-number").code("value-code").duplicatedPhoneNumberAction(PhoneCheckCodeParams.DuplicatedPhoneNumberAction.NO_ACTION).disposableNumberAction(PhoneCheckCodeParams.DisposableNumberAction.NO_ACTION).voipNumberAction(PhoneCheckCodeParams.VoipNumberAction.NO_ACTION).enableEnrichment(true).phoneIntelligenceScoreAction(PhoneCheckCodeParams.PhoneIntelligenceScoreAction.NO_ACTION).phoneTypeRiskAction(PhoneCheckCodeParams.PhoneTypeRiskAction.NO_ACTION).recentPortAction(PhoneCheckCodeParams.RecentPortAction.NO_ACTION).lowPhoneTrustAction(PhoneCheckCodeParams.LowPhoneTrustAction.NO_ACTION).enableSocial(true).phoneNoSocialPresenceAction(PhoneCheckCodeParams.PhoneNoSocialPresenceAction.NO_ACTION).build(); JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/phone/check/", "200"); transport.respondJson(200, example); var result = client.phone().checkCode(params); @@ -72,7 +72,7 @@ void checkCode() { assertEquals(Map.of(), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); - TestJson.assertJsonEquals("{\"phone_number\":\"value-phone-number\",\"code\":\"value-code\",\"duplicated_phone_number_action\":\"NO_ACTION\",\"disposable_number_action\":\"NO_ACTION\",\"voip_number_action\":\"NO_ACTION\",\"enable_social\":true,\"phone_no_social_presence_action\":\"NO_ACTION\"}", request.body()); + TestJson.assertJsonEquals("{\"phone_number\":\"value-phone-number\",\"code\":\"value-code\",\"duplicated_phone_number_action\":\"NO_ACTION\",\"disposable_number_action\":\"NO_ACTION\",\"voip_number_action\":\"NO_ACTION\",\"enable_enrichment\":true,\"phone_intelligence_score_action\":\"NO_ACTION\",\"phone_type_risk_action\":\"NO_ACTION\",\"recent_port_action\":\"NO_ACTION\",\"low_phone_trust_action\":\"NO_ACTION\",\"enable_social\":true,\"phone_no_social_presence_action\":\"NO_ACTION\"}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } diff --git a/src/test/java/me/didit/resources/SessionsResourceTest.java b/src/test/java/me/didit/resources/SessionsResourceTest.java index 9196855..32da800 100644 --- a/src/test/java/me/didit/resources/SessionsResourceTest.java +++ b/src/test/java/me/didit/resources/SessionsResourceTest.java @@ -22,26 +22,33 @@ import me.didit.types.SessionsAddImagesParams; import me.didit.types.SessionsBatchDeleteParams; import me.didit.types.SessionsBulkUpdateAmlHitStatusParams; +import me.didit.types.SessionsCreateKybPartyDraftParams; import me.didit.types.SessionsCreateParams; +import me.didit.types.SessionsDeleteKybPartyDraftParams; import me.didit.types.SessionsDeleteParams; import me.didit.types.SessionsExportAmlScreeningHistoryParams; import me.didit.types.SessionsImportSharedParams; import me.didit.types.SessionsListAmlScreeningHistoryParams; import me.didit.types.SessionsListEventsParams; +import me.didit.types.SessionsListKybExtractedPartiesParams; +import me.didit.types.SessionsListKybPartyDraftsParams; import me.didit.types.SessionsListParams; import me.didit.types.SessionsPreviewDecisionEmailParams; import me.didit.types.SessionsPreviewResubmissionParams; import me.didit.types.SessionsRetrieveDecisionParams; import me.didit.types.SessionsShareParams; +import me.didit.types.SessionsSubmitKybPartiesParams; import me.didit.types.SessionsUpdateAmlHitStatusParams; import me.didit.types.SessionsUpdateAmlStatusParams; import me.didit.types.SessionsUpdateDataParams; import me.didit.types.SessionsUpdateDocumentAiDataParams; import me.didit.types.SessionsUpdateFeatureStatusParams; import me.didit.types.SessionsUpdateKybCompanyDataParams; +import me.didit.types.SessionsUpdateKybPartyDraftParams; import me.didit.types.SessionsUpdateKybPartyParams; import me.didit.types.SessionsUpdatePoaDataParams; import me.didit.types.SessionsUpdateStatusParams; +import me.didit.types.SessionsUploadKybDocumentsParams; import me.didit.types.SignatureField; import org.junit.jupiter.api.Test; @@ -53,7 +60,7 @@ final class SessionsResourceTest { @Test void create() { - SessionsCreateParams params = SessionsCreateParams.builder().workflowId("00000000-0000-4000-8000-000000001b5b").vendorData("value-vendor-data").callback("value-callback").callbackMethod(SessionsCreateParams.CallbackMethod.INITIATOR).metadata("value").tags(List.of("value-tags")).language(SessionsCreateParams.Language.EN).contactDetails(SessionsCreateParams.ContactDetails.builder().email("user@example.com").sendNotificationEmails(true).build()).expectedDetails(SessionsCreateParams.ExpectedDetails.builder().firstName("value-first-name").lastName("value-last-name").build()).portraitImage("value-portrait-image").sandboxScenario("value-sandbox-scenario").sign(SessionsCreateParams.Sign.builder().documents(List.of(SessionSignDocument.builder().title("value-title").fileName("value-file-name").contentBase64("value-content-base64").fields(List.of(SignatureField.builder().key("value-key").type(SignatureField.Type.SIGNATURE).role(SignatureField.Role.VERIFIED_PERSON).page(1L).build())).build())).fieldValues(Map.of("key", SessionsCreateParams.Sign.FieldValuesValue.ofString("value-field-values"))).build()).userState("value-user-state").biometricConsent(SessionsCreateParams.BiometricConsent.builder().givenAt(OffsetDateTime.parse("2026-11-01T10:15:30Z")).textVersion("value-text-version").build()).build(); + SessionsCreateParams params = SessionsCreateParams.builder().workflowId("00000000-0000-4000-8000-000000001b5b").vendorData("value-vendor-data").multiAccountSegment("value-multi-account-segment").callback("value-callback").callbackMethod(SessionsCreateParams.CallbackMethod.INITIATOR).metadata("value").tags(List.of("value-tags")).language(SessionsCreateParams.Language.EN).contactDetails(SessionsCreateParams.ContactDetails.builder().email("user@example.com").sendNotificationEmails(true).build()).expectedDetails(SessionsCreateParams.ExpectedDetails.builder().firstName("value-first-name").lastName("value-last-name").build()).portraitImage("value-portrait-image").sandboxScenario("value-sandbox-scenario").sign(SessionsCreateParams.Sign.builder().documents(List.of(SessionSignDocument.builder().title("value-title").fileName("value-file-name").contentBase64("value-content-base64").fields(List.of(SignatureField.builder().key("value-key").type(SignatureField.Type.SIGNATURE).role(SignatureField.Role.VERIFIED_PERSON).page(1L).build())).build())).fieldValues(Map.of("key", SessionsCreateParams.Sign.FieldValuesValue.ofString("value-field-values"))).build()).userState("value-user-state").biometricConsent(SessionsCreateParams.BiometricConsent.builder().givenAt(OffsetDateTime.parse("2026-11-01T10:15:30Z")).textVersion("value-text-version").build()).build(); JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/session/", "201"); transport.respondJson(201, example); var result = client.sessions().create(params); @@ -63,7 +70,7 @@ void create() { assertEquals(Map.of(), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); - TestJson.assertJsonEquals("{\"workflow_id\":\"00000000-0000-4000-8000-000000001b5b\",\"vendor_data\":\"value-vendor-data\",\"callback\":\"value-callback\",\"callback_method\":\"initiator\",\"metadata\":\"value\",\"tags\":[\"value-tags\"],\"language\":\"en\",\"contact_details\":{\"email\":\"user@example.com\",\"send_notification_emails\":true},\"expected_details\":{\"first_name\":\"value-first-name\",\"last_name\":\"value-last-name\"},\"portrait_image\":\"value-portrait-image\",\"sandbox_scenario\":\"value-sandbox-scenario\",\"sign\":{\"documents\":[{\"title\":\"value-title\",\"file_name\":\"value-file-name\",\"content_base64\":\"value-content-base64\",\"fields\":[{\"key\":\"value-key\",\"type\":\"signature\",\"role\":\"verified_person\",\"page\":1}]}],\"field_values\":{\"key\":\"value-field-values\"}},\"user_state\":\"value-user-state\",\"biometric_consent\":{\"given_at\":\"2026-11-01T10:15:30Z\",\"text_version\":\"value-text-version\"}}", request.body()); + TestJson.assertJsonEquals("{\"workflow_id\":\"00000000-0000-4000-8000-000000001b5b\",\"vendor_data\":\"value-vendor-data\",\"multi_account_segment\":\"value-multi-account-segment\",\"callback\":\"value-callback\",\"callback_method\":\"initiator\",\"metadata\":\"value\",\"tags\":[\"value-tags\"],\"language\":\"en\",\"contact_details\":{\"email\":\"user@example.com\",\"send_notification_emails\":true},\"expected_details\":{\"first_name\":\"value-first-name\",\"last_name\":\"value-last-name\"},\"portrait_image\":\"value-portrait-image\",\"sandbox_scenario\":\"value-sandbox-scenario\",\"sign\":{\"documents\":[{\"title\":\"value-title\",\"file_name\":\"value-file-name\",\"content_base64\":\"value-content-base64\",\"fields\":[{\"key\":\"value-key\",\"type\":\"signature\",\"role\":\"verified_person\",\"page\":1}]}],\"field_values\":{\"key\":\"value-field-values\"}},\"user_state\":\"value-user-state\",\"biometric_consent\":{\"given_at\":\"2026-11-01T10:15:30Z\",\"text_version\":\"value-text-version\"}}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } @@ -136,14 +143,14 @@ void updateStatus() { @Test void list() { - SessionsListParams params = SessionsListParams.builder().sessionKind(SessionsListParams.SessionKind.USER).limit(1L).offset(1L).status("value-status").vendorData("value-vendor-data").search("value-search").workflowId("value-workflow-id").dateFrom(LocalDate.parse("2026-11-01")).dateTo(LocalDate.parse("2026-11-01")).country("value-country").documentType("value-document-type").documentName("value-document-name").region("value-region").diditInternalId("00000000-0000-4000-8000-000000003e81").sessionType("value-session-type").apiService(SessionsListParams.ApiService.ID_VERIFICATION).screenedFullName("value-screened-full-name").warning("value-warning").statusInitializedAsInReview(true).isKycToBeReviewed(true).euuid("00000000-0000-4000-8000-000000000646").organizationName("value-organization-name").build(); + SessionsListParams params = SessionsListParams.builder().sessionKind(SessionsListParams.SessionKind.USER).limit(1L).offset(1L).status("value-status").vendorData("value-vendor-data").search("value-search").workflowId("value-workflow-id").dateFrom(LocalDate.parse("2026-11-01")).dateTo(LocalDate.parse("2026-11-01")).tags("value-tags").decidedFrom(OffsetDateTime.parse("2026-11-01T10:15:30Z")).decidedTo(OffsetDateTime.parse("2026-11-01T10:15:30Z")).country("value-country").documentType("value-document-type").documentName("value-document-name").region("value-region").diditInternalId("00000000-0000-4000-8000-000000003e81").sessionType("value-session-type").apiService(SessionsListParams.ApiService.ID_VERIFICATION).screenedFullName("value-screened-full-name").warning("value-warning").statusInitializedAsInReview(true).isKycToBeReviewed(true).euuid("00000000-0000-4000-8000-000000000646").organizationName("value-organization-name").build(); JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/sessions/", "200"); transport.respondJson(200, example); var result = client.sessions().list(params); RecordedRequest request = transport.only(); assertEquals("GET", request.method()); assertEquals("/v3/sessions/", request.path()); - assertEquals(Map.ofEntries(Map.entry("session_kind", List.of("user")), Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1")), Map.entry("status", List.of("value-status")), Map.entry("vendor_data", List.of("value-vendor-data")), Map.entry("search", List.of("value-search")), Map.entry("workflow_id", List.of("value-workflow-id")), Map.entry("date_from", List.of("2026-11-01")), Map.entry("date_to", List.of("2026-11-01")), Map.entry("country", List.of("value-country")), Map.entry("document_type", List.of("value-document-type")), Map.entry("document_name", List.of("value-document-name")), Map.entry("region", List.of("value-region")), Map.entry("didit_internal_id", List.of("00000000-0000-4000-8000-000000003e81")), Map.entry("session_type", List.of("value-session-type")), Map.entry("api_service", List.of("ID_VERIFICATION")), Map.entry("screened_full_name", List.of("value-screened-full-name")), Map.entry("warning", List.of("value-warning")), Map.entry("status_initialized_as_in_review", List.of("true")), Map.entry("is_kyc_to_be_reviewed", List.of("true")), Map.entry("euuid", List.of("00000000-0000-4000-8000-000000000646")), Map.entry("organization_name", List.of("value-organization-name"))), request.query()); + assertEquals(Map.ofEntries(Map.entry("session_kind", List.of("user")), Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1")), Map.entry("status", List.of("value-status")), Map.entry("vendor_data", List.of("value-vendor-data")), Map.entry("search", List.of("value-search")), Map.entry("workflow_id", List.of("value-workflow-id")), Map.entry("date_from", List.of("2026-11-01")), Map.entry("date_to", List.of("2026-11-01")), Map.entry("tags", List.of("value-tags")), Map.entry("decided_from", List.of("2026-11-01T10:15:30Z")), Map.entry("decided_to", List.of("2026-11-01T10:15:30Z")), Map.entry("country", List.of("value-country")), Map.entry("document_type", List.of("value-document-type")), Map.entry("document_name", List.of("value-document-name")), Map.entry("region", List.of("value-region")), Map.entry("didit_internal_id", List.of("00000000-0000-4000-8000-000000003e81")), Map.entry("session_type", List.of("value-session-type")), Map.entry("api_service", List.of("ID_VERIFICATION")), Map.entry("screened_full_name", List.of("value-screened-full-name")), Map.entry("warning", List.of("value-warning")), Map.entry("status_initialized_as_in_review", List.of("true")), Map.entry("is_kyc_to_be_reviewed", List.of("true")), Map.entry("euuid", List.of("00000000-0000-4000-8000-000000000646")), Map.entry("organization_name", List.of("value-organization-name"))), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); assertEquals(0, request.body().length); @@ -369,7 +376,6 @@ void previewResubmission() { assertEquals("https://verification.didit.me", request.origin()); TestJson.assertJsonEquals("{\"nodes_to_resubmit\":[{\"node_id\":\"value-node-id\",\"feature\":\"OCR\"}],\"email_address\":\"user@example.com\",\"email_language\":\"value-email-language\"}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); - TestModels.readAll(result); } @Test @@ -425,14 +431,14 @@ void listEvents() { @Test void listAmlScreeningHistory() { - SessionsListAmlScreeningHistoryParams params = SessionsListAmlScreeningHistoryParams.builder().nodeId("value-node-id").limit(1L).offset(1L).ordering("value-ordering").build(); + SessionsListAmlScreeningHistoryParams params = SessionsListAmlScreeningHistoryParams.builder().nodeId("value-node-id").month("value-month").limit(1L).offset(1L).ordering("value-ordering").build(); JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/session/{sessionId}/aml-screening-history/", "200"); transport.respondJson(200, example); var result = client.sessions().listAmlScreeningHistory("00000000-0000-4000-8000-000000019ab8", params); RecordedRequest request = transport.only(); assertEquals("GET", request.method()); assertEquals("/v3/session/00000000-0000-4000-8000-000000019ab8/aml-screening-history/", request.path()); - assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id")), Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1")), Map.entry("ordering", List.of("value-ordering"))), request.query()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id")), Map.entry("month", List.of("value-month")), Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1")), Map.entry("ordering", List.of("value-ordering"))), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); assertEquals(0, request.body().length); @@ -443,13 +449,13 @@ void listAmlScreeningHistory() { @Test void exportAmlScreeningHistory() { - SessionsExportAmlScreeningHistoryParams params = SessionsExportAmlScreeningHistoryParams.builder().nodeId("value-node-id").build(); + SessionsExportAmlScreeningHistoryParams params = SessionsExportAmlScreeningHistoryParams.builder().nodeId("value-node-id").month("value-month").build(); transport.respondBinary(200, "text/csv", new byte[] {37, 80, 68, 70}); var result = client.sessions().exportAmlScreeningHistory("00000000-0000-4000-8000-00000001c16a", params); RecordedRequest request = transport.only(); assertEquals("GET", request.method()); assertEquals("/v3/session/00000000-0000-4000-8000-00000001c16a/aml-screening-history/export/", request.path()); - assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id")), Map.entry("month", List.of("value-month"))), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); assertEquals("text/csv, application/json", request.header("Accept")); @@ -555,6 +561,154 @@ void previewDecisionEmail() { assertEquals("https://verification.didit.me", request.origin()); TestJson.assertJsonEquals("{\"new_status\":\"Approved\",\"email_language\":\"value-email-language\"}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); + } + + @Test + void uploadKybDocuments() { + SessionsUploadKybDocumentsParams params = SessionsUploadKybDocumentsParams.builder().nodeId("value-node-id").documents(List.of(FileUpload.of(new byte[] {37, 80, 68, 70}, "documents.pdf", "application/pdf"))).documentPasswords(List.of("value-document-passwords")).documentGroup(SessionsUploadKybDocumentsParams.DocumentGroup.LEGAL_PRESENCE).locale("value-locale").build(); + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/session/{sessionId}/kyb/documents/", "200"); + transport.respondJson(200, example); + var result = client.sessions().uploadKybDocuments("00000000-0000-4000-8000-000000013176", params); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-000000013176/kyb/documents/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(Map.ofEntries(Map.entry("document_passwords", List.of("value-document-passwords")), Map.entry("document_group", List.of("LEGAL_PRESENCE")), Map.entry("locale", List.of("value-locale"))), request.multipartFields()); + assertEquals(Map.ofEntries(Map.entry("documents", List.of("documents.pdf"))), request.multipartFiles()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void listKybExtractedParties() { + SessionsListKybExtractedPartiesParams params = SessionsListKybExtractedPartiesParams.builder().nodeId("value-node-id").build(); + JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/session/{sessionId}/kyb/extracted-parties/", "200"); + transport.respondJson(200, example); + var result = client.sessions().listKybExtractedParties("00000000-0000-4000-8000-000000019841", params); + RecordedRequest request = transport.only(); + assertEquals("GET", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-000000019841/kyb/extracted-parties/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void listKybPartyDrafts() { + SessionsListKybPartyDraftsParams params = SessionsListKybPartyDraftsParams.builder().nodeId("value-node-id").build(); + JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/session/{sessionId}/kyb/parties/drafts/", "200"); + transport.respondJson(200, example); + var result = client.sessions().listKybPartyDrafts("00000000-0000-4000-8000-000000014266", params); + RecordedRequest request = transport.only(); + assertEquals("GET", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-000000014266/kyb/parties/drafts/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void createKybPartyDraft() { + SessionsCreateKybPartyDraftParams params = SessionsCreateKybPartyDraftParams.builder().nodeId("value-node-id").entityType(SessionsCreateKybPartyDraftParams.EntityType.PERSON).fullName("value-full-name").firstName("value-first-name").lastName("value-last-name").role(SessionsCreateKybPartyDraftParams.Role.DIRECTOR).roles(List.of(SessionsCreateKybPartyDraftParams.Roles.DIRECTOR)).position("value-position").dateOfBirth(LocalDate.parse("2026-11-01")).companyName("value-company-name").registrationNumber("value-registration-number").email("user@example.com").ownershipPercent(1.5).nationality("value-nationality").phoneNumber("value-phone-number").customFields(Map.of("key", "value")).skipVerification(true).build(); + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/session/{sessionId}/kyb/parties/drafts/", "201"); + transport.respondJson(201, example); + var result = client.sessions().createKybPartyDraft("00000000-0000-4000-8000-000000015092", params); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-000000015092/kyb/parties/drafts/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + TestJson.assertJsonEquals("{\"entity_type\":\"person\",\"full_name\":\"value-full-name\",\"first_name\":\"value-first-name\",\"last_name\":\"value-last-name\",\"role\":\"director\",\"roles\":[\"director\"],\"position\":\"value-position\",\"date_of_birth\":\"2026-11-01\",\"company_name\":\"value-company-name\",\"registration_number\":\"value-registration-number\",\"email\":\"user@example.com\",\"ownership_percent\":1.5,\"nationality\":\"value-nationality\",\"phone_number\":\"value-phone-number\",\"custom_fields\":{\"key\":\"value\"},\"skip_verification\":true}", request.body()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void updateKybPartyDraft() { + SessionsUpdateKybPartyDraftParams params = SessionsUpdateKybPartyDraftParams.builder().nodeId("value-node-id").entityType(SessionsUpdateKybPartyDraftParams.EntityType.PERSON).fullName("value-full-name").firstName("value-first-name").lastName("value-last-name").role(SessionsUpdateKybPartyDraftParams.Role.DIRECTOR).roles(List.of(SessionsUpdateKybPartyDraftParams.Roles.DIRECTOR)).position("value-position").dateOfBirth(LocalDate.parse("2026-11-01")).companyName("value-company-name").registrationNumber("value-registration-number").email("user@example.com").ownershipPercent(1.5).nationality("value-nationality").phoneNumber("value-phone-number").customFields(Map.of("key", "value")).skipVerification(true).build(); + JsonNode example = SpecExamples.response("verification.json", "PATCH", "/v3/session/{sessionId}/kyb/parties/drafts/{draftId}/", "200"); + transport.respondJson(200, example); + var result = client.sessions().updateKybPartyDraft("00000000-0000-4000-8000-000000015124", "00000000-0000-4000-8000-000000012c99", params); + RecordedRequest request = transport.only(); + assertEquals("PATCH", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-000000015124/kyb/parties/drafts/00000000-0000-4000-8000-000000012c99/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + TestJson.assertJsonEquals("{\"entity_type\":\"person\",\"full_name\":\"value-full-name\",\"first_name\":\"value-first-name\",\"last_name\":\"value-last-name\",\"role\":\"director\",\"roles\":[\"director\"],\"position\":\"value-position\",\"date_of_birth\":\"2026-11-01\",\"company_name\":\"value-company-name\",\"registration_number\":\"value-registration-number\",\"email\":\"user@example.com\",\"ownership_percent\":1.5,\"nationality\":\"value-nationality\",\"phone_number\":\"value-phone-number\",\"custom_fields\":{\"key\":\"value\"},\"skip_verification\":true}", request.body()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void deleteKybPartyDraft() { + SessionsDeleteKybPartyDraftParams params = SessionsDeleteKybPartyDraftParams.builder().nodeId("value-node-id").build(); + transport.respond(204, ""); + client.sessions().deleteKybPartyDraft("00000000-0000-4000-8000-000000015095", "00000000-0000-4000-8000-000000012c0a", params); + RecordedRequest request = transport.only(); + assertEquals("DELETE", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-000000015095/kyb/parties/drafts/00000000-0000-4000-8000-000000012c0a/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + } + + @Test + void submitKybParties() { + SessionsSubmitKybPartiesParams params = SessionsSubmitKybPartiesParams.builder().nodeId("value-node-id").locale("value-locale").build(); + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/session/{sessionId}/kyb/parties/submit/", "200"); + transport.respondJson(200, example); + var result = client.sessions().submitKybParties("00000000-0000-4000-8000-00000001127a", params); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-00000001127a/kyb/parties/submit/", request.path()); + assertEquals(Map.ofEntries(Map.entry("node_id", List.of("value-node-id"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + TestJson.assertJsonEquals("{\"locale\":\"value-locale\"}", request.body()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void exportFiles() { + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/session/{sessionId}/files-export/", "202"); + transport.respondJson(202, example); + var result = client.sessions().exportFiles("00000000-0000-4000-8000-00000000bf11"); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-00000000bf11/files-export/", request.path()); + assertEquals(Map.of(), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } + + @Test + void getFilesExport() { + JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/session/{sessionId}/files-export/{exportId}/", "200"); + transport.respondJson(200, example); + var result = client.sessions().getFilesExport("00000000-0000-4000-8000-00000000f5ad", "00000000-0000-4000-8000-00000000e8b6"); + RecordedRequest request = transport.only(); + assertEquals("GET", request.method()); + assertEquals("/v3/session/00000000-0000-4000-8000-00000000f5ad/files-export/00000000-0000-4000-8000-00000000e8b6/", request.path()); + assertEquals(Map.of(), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } } diff --git a/src/test/java/me/didit/resources/TransactionsResourceTest.java b/src/test/java/me/didit/resources/TransactionsResourceTest.java index dcfeb0d..8b87ab8 100644 --- a/src/test/java/me/didit/resources/TransactionsResourceTest.java +++ b/src/test/java/me/didit/resources/TransactionsResourceTest.java @@ -30,14 +30,14 @@ final class TransactionsResourceTest { @Test void list() { - TransactionsListParams params = TransactionsListParams.builder().limit(1L).offset(1L).travelRuleStatus("value-travel-rule-status").build(); + TransactionsListParams params = TransactionsListParams.builder().limit(1L).offset(1L).travelRuleStatus("value-travel-rule-status").assignee("value-assignee").build(); JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/transactions/", "200"); transport.respondJson(200, example); var result = client.transactions().list(params); RecordedRequest request = transport.only(); assertEquals("GET", request.method()); assertEquals("/v3/transactions/", request.path()); - assertEquals(Map.ofEntries(Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1")), Map.entry("travel_rule_status", List.of("value-travel-rule-status"))), request.query()); + assertEquals(Map.ofEntries(Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1")), Map.entry("travel_rule_status", List.of("value-travel-rule-status")), Map.entry("assignee", List.of("value-assignee"))), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); assertEquals(0, request.body().length); diff --git a/src/test/java/me/didit/resources/TravelRuleUnmatchedDepositsResourceTest.java b/src/test/java/me/didit/resources/TravelRuleUnmatchedDepositsResourceTest.java new file mode 100644 index 0000000..6825dfa --- /dev/null +++ b/src/test/java/me/didit/resources/TravelRuleUnmatchedDepositsResourceTest.java @@ -0,0 +1,62 @@ +// Code generated by codegen from openapi/*.json. DO NOT EDIT. +package me.didit.resources; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.fasterxml.jackson.databind.JsonNode; +import java.time.LocalDate; +import java.util.List; +import java.util.Map; +import me.didit.Didit; +import me.didit.core.Json; +import me.didit.testing.MockTransport; +import me.didit.testing.RecordedRequest; +import me.didit.testing.SpecExamples; +import me.didit.testing.TestJson; +import me.didit.testing.TestModels; +import me.didit.types.TravelRuleManualMatchRequest; +import me.didit.types.TravelRuleUnmatchedDepositsListParams; +import org.junit.jupiter.api.Test; + +/** One test per operation of {@code travel_rule.unmatched_deposits}, against a stubbed HTTP layer. */ +@SuppressWarnings({"deprecation", "unused"}) +final class TravelRuleUnmatchedDepositsResourceTest { + private final MockTransport transport = new MockTransport(); + private final Didit client = transport.client(); + + @Test + void list() { + TravelRuleUnmatchedDepositsListParams params = TravelRuleUnmatchedDepositsListParams.builder().direction("value-direction").status("value-status").rail("value-rail").kind("value-kind").currency("value-currency").startDate(LocalDate.parse("2026-11-01")).endDate(LocalDate.parse("2026-11-01")).counterparty("00000000-0000-4000-8000-00000000221d").limit(1L).offset(1L).build(); + JsonNode example = SpecExamples.response("verification.json", "GET", "/v3/travel-rule/unmatched/", "200"); + transport.respondJson(200, example); + var result = client.travelRule().unmatchedDeposits().list(params); + RecordedRequest request = transport.only(); + assertEquals("GET", request.method()); + assertEquals("/v3/travel-rule/unmatched/", request.path()); + assertEquals(Map.ofEntries(Map.entry("direction", List.of("value-direction")), Map.entry("status", List.of("value-status")), Map.entry("rail", List.of("value-rail")), Map.entry("kind", List.of("value-kind")), Map.entry("currency", List.of("value-currency")), Map.entry("start_date", List.of("2026-11-01")), Map.entry("end_date", List.of("2026-11-01")), Map.entry("counterparty", List.of("00000000-0000-4000-8000-00000000221d")), Map.entry("limit", List.of("1")), Map.entry("offset", List.of("1"))), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + assertEquals(0, request.body().length); + TestJson.assertJsonEquals(example, result._json()); + assertEquals(example.path("results").size(), result.results().size()); + TestModels.readAll(result.results()); + } + + @Test + void match() { + TravelRuleManualMatchRequest params = TravelRuleManualMatchRequest.builder().transactionId("00000000-0000-4000-8000-000000002b0f").build(); + JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/travel-rule/unmatched/{transaction_uuid}/match/", "200"); + transport.respondJson(200, example); + var result = client.travelRule().unmatchedDeposits().match("00000000-0000-4000-8000-000000023676", params); + RecordedRequest request = transport.only(); + assertEquals("POST", request.method()); + assertEquals("/v3/travel-rule/unmatched/00000000-0000-4000-8000-000000023676/match/", request.path()); + assertEquals(Map.of(), request.query()); + assertEquals("test-api-key", request.header("x-api-key")); + assertEquals("https://verification.didit.me", request.origin()); + TestJson.assertJsonEquals("{\"transaction_id\":\"00000000-0000-4000-8000-000000002b0f\"}", request.body()); + TestJson.assertJsonEquals(example, Json.toNode(result)); + TestModels.readAll(result); + } +} diff --git a/src/test/java/me/didit/resources/UsersResourceTest.java b/src/test/java/me/didit/resources/UsersResourceTest.java index bd11bbc..cfdeb52 100644 --- a/src/test/java/me/didit/resources/UsersResourceTest.java +++ b/src/test/java/me/didit/resources/UsersResourceTest.java @@ -100,7 +100,7 @@ void generatePdf() { @Test void batchDelete() { - UsersBatchDeleteParams params = UsersBatchDeleteParams.builder().vendorDataList(List.of("value-vendor-data-list")).diditInternalIdList(List.of("00000000-0000-4000-8000-0000000068ce")).deleteAll(true).build(); + UsersBatchDeleteParams params = UsersBatchDeleteParams.builder().vendorDataList(List.of("value-vendor-data-list")).diditInternalIdList(List.of("00000000-0000-4000-8000-0000000068ce")).deleteAll(true).retainFaceEmbeddings(true).faceRetentionDays(1L).build(); JsonNode example = SpecExamples.response("verification.json", "POST", "/v3/users/delete/", "200"); transport.respondJson(200, example); var result = client.users().batchDelete(params); @@ -110,7 +110,7 @@ void batchDelete() { assertEquals(Map.of(), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); - TestJson.assertJsonEquals("{\"vendor_data_list\":[\"value-vendor-data-list\"],\"didit_internal_id_list\":[\"00000000-0000-4000-8000-0000000068ce\"],\"delete_all\":true}", request.body()); + TestJson.assertJsonEquals("{\"vendor_data_list\":[\"value-vendor-data-list\"],\"didit_internal_id_list\":[\"00000000-0000-4000-8000-0000000068ce\"],\"delete_all\":true,\"retain_face_embeddings\":true,\"face_retention_days\":1}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); } diff --git a/src/test/java/me/didit/resources/WebhooksResourceTest.java b/src/test/java/me/didit/resources/WebhooksResourceTest.java index c59c9e4..51e1b2e 100644 --- a/src/test/java/me/didit/resources/WebhooksResourceTest.java +++ b/src/test/java/me/didit/resources/WebhooksResourceTest.java @@ -41,7 +41,7 @@ void retrieveConfig() { @Test void updateConfig() { - WebhooksUpdateConfigParams params = WebhooksUpdateConfigParams.builder().webhookUrl("https://example.com/callback").webhookVersion(WebhooksUpdateConfigParams.WebhookVersion.V_1).rotateSecretKey(true).captureMethod(WebhooksUpdateConfigParams.CaptureMethod.MOBILE).dataRetentionMonths(1L).faceRetentionPolicy(WebhooksUpdateConfigParams.FaceRetentionPolicy.DELETE_WITH_SESSION).faceRetentionDays(1L).biometricConsentMode(WebhooksUpdateConfigParams.BiometricConsentMode.AUTO).allowedReturnHosts(List.of("value-allowed-return-hosts")).build(); + WebhooksUpdateConfigParams params = WebhooksUpdateConfigParams.builder().webhookUrl("https://example.com/callback").webhookVersion(WebhooksUpdateConfigParams.WebhookVersion.V_1).rotateSecretKey(true).captureMethod(WebhooksUpdateConfigParams.CaptureMethod.MOBILE).dataRetentionMonths(1L).faceRetentionPolicy(WebhooksUpdateConfigParams.FaceRetentionPolicy.DELETE_WITH_SESSION).faceRetentionDays(1L).biometricConsentMode(WebhooksUpdateConfigParams.BiometricConsentMode.AUTO).allowedReturnHosts(List.of("value-allowed-return-hosts")).allowedDomains(List.of("value-allowed-domains")).build(); JsonNode example = SpecExamples.response("verification.json", "PATCH", "/v3/webhook/", "200"); transport.respondJson(200, example); var result = client.webhooks().updateConfig(params); @@ -51,7 +51,7 @@ void updateConfig() { assertEquals(Map.of(), request.query()); assertEquals("test-api-key", request.header("x-api-key")); assertEquals("https://verification.didit.me", request.origin()); - TestJson.assertJsonEquals("{\"webhook_url\":\"https://example.com/callback\",\"webhook_version\":\"v1\",\"rotate_secret_key\":true,\"capture_method\":\"MOBILE\",\"data_retention_months\":1,\"face_retention_policy\":\"delete_with_session\",\"face_retention_days\":1,\"biometric_consent_mode\":\"auto\",\"allowed_return_hosts\":[\"value-allowed-return-hosts\"]}", request.body()); + TestJson.assertJsonEquals("{\"webhook_url\":\"https://example.com/callback\",\"webhook_version\":\"v1\",\"rotate_secret_key\":true,\"capture_method\":\"MOBILE\",\"data_retention_months\":1,\"face_retention_policy\":\"delete_with_session\",\"face_retention_days\":1,\"biometric_consent_mode\":\"auto\",\"allowed_return_hosts\":[\"value-allowed-return-hosts\"],\"allowed_domains\":[\"value-allowed-domains\"]}", request.body()); TestJson.assertJsonEquals(example, Json.toNode(result)); TestModels.readAll(result); }