Loading...
Loading...
Compare original and translation side by side
documentsByCountriesdocumentsByCountries| Method | Path | When |
|---|---|---|
| | Read the built-in supported-documents catalogue (defaults for every country). |
| | Read the client's CURRENT settings, incl. their |
| | Read Sumsub's built-in expiry-extension rules (read-only reference; backs the "officially extended documents" expiry modes). |
| | Replace-all — the only write path. Always send the FULL map built by the scripts (read-modify-write for edits, minus-one-entry for removals). |
manageClientSettings{ "countryMappings": { "<ISO3>": { "<DOC_TYPE>": { supported, doubleSided, doubleSidedCanBeChanged, shouldBeSigned, acceptDigitalDoc, acceptScreenshots, expirationCheckMode, sidesSelectionMode, defaultFields[], availableFields[] } } } }⚠️ Two different shapes — mind the path. The catalogue GET putsat the top level. GET globalSettings nests it one level deeper, undercountryMappings(the root also hasidDocSettings.countryMappings,minAge,poaCheckSettings— the key-wide expiry mode — etc.). When readingpoiCheckSettings(globalSettings) in an inline/tmp/current.json, usepython3 -c— the top-level path raises['idDocSettings']['countryMappings'].KeyError: 'countryMappings'
Fields are serialised: a flag that is absent from the JSON is at its default (not set). For acceptance flags, absent ⇒NON_NULL(e.g. nofalsekey ⇒ screenshots are not accepted). Never report a flag as enabled just because it's missing; report the default and say it's the default.acceptScreenshots
PUT is replace-all: the backend swaps the wholemap for whatever you send — anything omitted is wiped (reverts to catalogue defaults). That's why every write goes through the scripts:countryMappingsmerges your changes into a FRESH copy of the current map, andbuild_country_mappings.pybuilds the map minus one entry. Never hand-craft a partial payload, and never reuse a staleremove_country_mapping.py— re-fetch it right before building or a concurrent dashboard edit gets silently reverted./tmp/current.json
| 方法 | 路径 | 适用场景 |
|---|---|---|
| | 读取内置支持文档目录(所有国家的默认配置)。 |
| | 读取客户端当前设置,包括其 |
| | 读取Sumsub内置的有效期延长规则(只读参考,为“官方延长文档”有效期模式提供支持)。 |
| | 全量替换——唯一写入路径。始终发送脚本生成的完整映射(编辑时采用读取-修改-写入流程,删除时移除对应条目)。 |
manageClientSettings{ "countryMappings": { "<ISO3>": { "<DOC_TYPE>": { supported, doubleSided, doubleSidedCanBeChanged, shouldBeSigned, acceptDigitalDoc, acceptScreenshots, expirationCheckMode, sidesSelectionMode, defaultFields[], availableFields[] } } } }⚠️ 两种不同结构——注意路径区别。目录GET接口的位于顶层。而GET globalSettings接口中,countryMappings嵌套在**countryMappings**下(根节点还包含idDocSettings.countryMappings、minAge、poaCheckSettings——全局有效期模式等)。在嵌入式poiCheckSettings中读取python3 -c(globalSettings)时,需使用/tmp/current.json——使用顶层路径会触发['idDocSettings']['countryMappings']。KeyError: 'countryMappings'
字段采用序列化:JSON中缺失的标志位即为默认值(未设置)。对于接受类标志,缺失⇒NON_NULL(例如无false键⇒不接受截图)。切勿因标志位缺失就报告其已启用;需说明默认值并标注为默认配置。acceptScreenshots
PUT为全量替换:后端会将整个映射替换为你发送的内容——任何被省略的条目都会被清除(恢复为目录默认值)。这就是所有写入操作都需通过脚本完成的原因:countryMappings会将你的更改合并到当前映射的全新副本中,build_country_mappings.py会生成移除指定条目后的映射。切勿手动编写部分负载,也切勿复用过期的remove_country_mapping.py——在生成负载前务必重新获取,否则并发的仪表盘编辑会被静默覆盖。/tmp/current.json
idDocSettings.countryMappings| Root path | What it holds | When it changes the answer |
|---|---|---|
| key-wide expiry mode | fallback in the expiry cascade (C) |
| doc must stay valid ≥ N more months; | part of any validity answer (C) |
| expiry monitoring AFTER approval (licence-gated) | "what happens when the doc expires" |
| key-wide age limits (checked against DOB); dashboard auto-fills on save (min 16 — 18 for RUS-licensed keys — max 110), so usually present | "why was the doc/applicant rejected by age" |
| eKYC sources per country — sibling of | eKYC questions; don't confuse with countryMappings |
| OCR auto-completes 2-digit years in dates (dashboard: "Birth date" checkbox) | recognised date values |
| upload size limits (dashboard: General → Applicant settings) | "why was the file not accepted" |
| POA acceptance ( | POA questions — report as read-only context |
| doc-vs-profile comparison ( | mismatch/cross-check rejections |
watchListCheckSettingscryptoCheckSettingsbankCardCheckSettingskybIntegrationSettingsuiSettingsduplicateSettingssourceKeysSettingsapplicantTagssupportEmaildisableSumsubIdidDocServiceSettingsidDocSettings.countryMappings| 根路径 | 包含内容 | 影响答案的场景 |
|---|---|---|
| 全局有效期模式 | 有效期规则级联的 fallback(C) |
| 文档剩余有效期需≥N个月; | 任何与有效期相关的答案(C) |
| 审批后的有效期监控(需授权) | “文档过期后会发生什么” |
| 全局年龄限制(根据出生日期检查);仪表盘保存时自动填充(最小16岁——俄罗斯授权密钥为18岁——最大110岁),通常已配置 | “为何文档/申请人因年龄被拒绝” |
| 各国eKYC数据源——与 | eKYC相关问题;请勿与countryMappings混淆 |
| OCR自动补全日期中的两位年份(仪表盘:“出生日期”复选框) | 识别日期值的规则 |
| 上传文件大小限制(仪表盘:通用→申请人设置) | “为何文件未被接受” |
| POA接受规则( | POA相关问题——作为只读上下文报告 |
| 文档与资料对比规则( | 不匹配/交叉检查拒绝原因 |
watchListCheckSettingscryptoCheckSettingsbankCardCheckSettingskybIntegrationSettingsuiSettingsduplicateSettingssourceKeysSettingsapplicantTagssupportEmaildisableSumsubIdidDocServiceSettingssumsub-api-auth| Var | Example |
|---|---|
| |
| The paired secret shown once at token creation. |
| Optional. Defaults to |
expirationCheckMode(country, docType)⚠️ Always go through these scripts — never read the Paler source. If you happen to have therepo open, do NOT answer from its files (paler, Java sources, etc.). Those contain only the built-in catalogue defaults — the client's effective state (documents-by-countries.jsonoverrides +countryMappings) is not in the code at all, only behind the API. Reading source can only give defaults and will silently answer the wrong question. The data must come fromADVANCED_OCR/get_global_settings.sh/get_supported_docs.sh.get_entitlements.sh
sumsub-api-auth| 变量 | 示例 |
|---|---|
| |
| 创建Token时显示的配对密钥(仅显示一次)。 |
| 可选。默认值为 |
expirationCheckMode(country, docType)⚠️ 务必通过这些脚本获取数据——切勿读取Paler源码。若你恰好打开了仓库,请勿从其文件(paler、Java源码等)中获取答案。这些文件仅包含内置目录默认值——客户端的有效状态(documents-by-countries.json覆盖配置 +countryMappings)完全不在代码中,仅可通过API获取。读取源码只能得到默认值,会静默给出错误答案。数据必须来自ADVANCED_OCR/get_global_settings.sh/get_supported_docs.sh。get_entitlements.sh
S=${CLAUDE_SKILL_DIR}/scripts
$S/get_supported_docs.sh > /tmp/catalogue.json
$S/get_global_settings.sh > /tmp/current.json
ADV=$($S/get_entitlements.sh ADVANCED_OCR >/dev/null 2>&1 && echo true || echo false)
$S/recognition_status.py BRA PASSPORT \
--current-file /tmp/current.json \
--catalog-file /tmp/catalogue.json \
--advanced-ocr "$ADV"S=${CLAUDE_SKILL_DIR}/scripts
$S/get_supported_docs.sh > /tmp/catalogue.json
$S/get_global_settings.sh > /tmp/current.json
ADV=$($S/get_entitlements.sh ADVANCED_OCR >/dev/null 2>&1 && echo true || echo false)
$S/recognition_status.py BRA PASSPORT \
--current-file /tmp/current.json \
--catalog-file /tmp/catalogue.json \
--advanced-ocr "$ADV"Reports each field as ✅ recognised (free / PAID) or ⬜ not recognised (with the
reason: default turned off / extra not enabled / ADVANCED_OCR off). Present this
to the user — it's the honest "what's actually recognised" answer.将每个字段标记为✅已识别(免费/付费)或⬜未识别(原因:默认关闭/额外字段未启用/ADVANCED_OCR未开启)。将此结果展示给用户——这是“实际可识别内容”的准确答案。get_supported_docs.sh > /tmp/catalogue.json--data-fileecho '{"countries": ["DEU"]}' \
| ${CLAUDE_SKILL_DIR}/scripts/query_supported_docs.py --data-file /tmp/catalogue.jsonsummaryget_supported_docs.sh > /tmp/catalogue.json--data-fileecho '{"countries": ["DEU"]}' \
| ${CLAUDE_SKILL_DIR}/scripts/query_supported_docs.py --data-file /tmp/catalogue.jsonsummaryidDocSettings.countryMappings.<country>.<docType>.expirationCheckModepoiCheckSettings.expirationCheckModeget_global_settings.sh(country, docType)poiCheckSettings.expirationCheckModegenerallyAcceptedRegulationslocalRegulations$S/get_extension_rules.sh > /tmp/ext.json
# then filter to the country/doc type, e.g.:
python3 -c "import json;[print(r['docType']['idDocType'],'—',r.get('defaultDescription'))
for r in json.load(open('/tmp/ext.json'))['rules']
if r['docType']['country']=='BRA' and r['docType']['idDocType']=='ID_CARD']"poiCheckSettings.minimumResidualValidityInMonths0ongoingMonitoringSettings.idDocExpireInDaysenabledONGOING_MONITORING_EXPIRED_DOCSget_global_settings.shstrictgenerallyAcceptedRegulationslocalRegulationsallowExpiredidDocSettings.countryMappings.<country>.<docType>.expirationCheckModepoiCheckSettings.expirationCheckModeget_global_settings.sh(country, docType)poiCheckSettings.expirationCheckModegenerallyAcceptedRegulationslocalRegulations$S/get_extension_rules.sh > /tmp/ext.json
# 然后筛选到对应国家/文档类型,例如:
python3 -c "import json;[print(r['docType']['idDocType'],'—',r.get('defaultDescription'))
for r in json.load(open('/tmp/ext.json'))['rules']
if r['docType']['country']=='BRA' and r['docType']['idDocType']=='ID_CARD']"poiCheckSettings.minimumResidualValidityInMonths0ongoingMonitoringSettings.idDocExpireInDaysenabledONGOING_MONITORING_EXPIRED_DOCSget_global_settings.shstrictgenerallyAcceptedRegulationslocalRegulationsallowExpired(country, docType)$S/get_global_settings.sh > /tmp/current.json # client's effective settings
$S/get_supported_docs.sh > /tmp/catalogue.json # catalogue, for the default baseline(country, docType)$S/get_global_settings.sh > /tmp/current.json # 客户端有效设置
$S/get_supported_docs.sh > /tmp/catalogue.json # 目录,用于默认基准
Then present every key on that entry as a setting — `supported`,
`sidesSelectionMode` / `doubleSided`, `shouldBeSigned`, `acceptDigitalDoc`,
`acceptScreenshots`, `expirationCheckMode`, `ocrSettings`, sub-type flags,
`defaultFields` / `availableFields`, and anything else present — translating each to
its UI meaning via [references/fields-glossary.md](references/fields-glossary.md).
Rules for an honest dump:
- **Don't curate.** Walk the keys that are actually on the entry; don't decide some
are "not relevant". A setting you skip reads as "not configured".
- **Defaults are absent (`NON_NULL`).** A missing key is at its default, not off-
screen. If the client has no override for the pair at all, the whole entry is
absent — fall back to the catalogue entry (`/tmp/catalogue.json`) for the baseline
and say these are Sumsub defaults, not client settings.
- **Report independent flags independently.** In particular `acceptDigitalDoc`
(uploaded files/scans/PDFs) and `acceptScreenshots` (screenshots) are separate
checks — state each on its own; never merge them or say "only live camera photos".
- **Expiry:** `expirationCheckMode` missing on the entry does NOT mean catalogue
default — check the key-wide `poiCheckSettings.expirationCheckMode` at the
globalSettings root first (cascade in **C**). When the effective mode accepts
extended docs, also surface the concrete extension rule (see **C**) — the mode
alone is incomplete.
然后将条目上的每个键作为设置展示——`supported`、`sidesSelectionMode`/`doubleSided`、`shouldBeSigned`、`acceptDigitalDoc`、`acceptScreenshots`、`expirationCheckMode`、`ocrSettings`、子类型标志、`defaultFields`/`availableFields`以及其他所有存在的键——通过[references/fields-glossary.md](references/fields-glossary.md)将每个键转换为对应的UI含义。
准确导出规则:
- **不要筛选**。遍历条目上实际存在的键;不要自行判断某些键“无关”。被跳过的设置会被解读为“未配置”。
- **默认值缺失(`NON_NULL`)**。缺失的键即为默认值,并非未显示。若客户端对该组合无任何覆盖配置,则整个条目缺失——需回退到目录条目(`/tmp/catalogue.json`)作为基准,并说明这些是Sumsub默认配置,而非客户端设置。
- **独立标志独立报告**。尤其是`acceptDigitalDoc`(上传文件/扫描件/PDF)和`acceptScreenshots`(截图)是独立检查——分别说明每个标志的状态;切勿合并或表述为“仅接受实时相机照片”。
- **有效期**:条目上缺失`expirationCheckMode`并不意味着使用目录默认值——需先检查全局Settings根节点的全局`poiCheckSettings.expirationCheckMode`(见**C**中的级联规则)。当有效模式接受延长文档时,还需展示具体的延长规则(见**C**)——仅模式是不完整的。current.json${CLAUDE_SKILL_DIR}/scripts/get_supported_docs.sh > /tmp/catalogue.json
${CLAUDE_SKILL_DIR}/scripts/get_global_settings.sh > /tmp/current.json(country, docType)echo '<change spec>' | ${CLAUDE_SKILL_DIR}/scripts/build_country_mappings.py \
--current-file /tmp/current.json --catalog-file /tmp/catalogue.json > /tmp/payload.jsonField changes:(country, docType)supporteddoubleSideddoubleSidedCanBeChangedshouldBeSigneddoubleSidedsidesSelectionModesupporteddoubleSidedsidesSelectionModeextraFields${CLAUDE_SKILL_DIR}/scripts/get_entitlements.sh ADVANCED_OCRacceptScreenshots: trueacceptDigitalDoc: truewarning:current.jsonpython3 -c${CLAUDE_SKILL_DIR}/scripts/diff_country_mappings.py \
--current-file /tmp/current.json --payload-file /tmp/payload.json${CLAUDE_SKILL_DIR}/scripts/put_country_mappings.sh /tmp/payload.jsonextraFieldsChanging one field in a column without losing the others: a column list in the spec replaces that column wholesale. To turn ON one more extra field while keeping the existing ones, first read the current enabled set () and pass the FULL intendedrecognition_status.pylist.extraFields
current.json${CLAUDE_SKILL_DIR}/scripts/get_supported_docs.sh > /tmp/catalogue.json
${CLAUDE_SKILL_DIR}/scripts/get_global_settings.sh > /tmp/current.json(country, docType)echo '<change spec>' | ${CLAUDE_SKILL_DIR}/scripts/build_country_mappings.py \
--current-file /tmp/current.json --catalog-file /tmp/catalogue.json > /tmp/payload.jsonField changes:(country, docType)supporteddoubleSideddoubleSidedCanBeChangedshouldBeSigneddoubleSidedsidesSelectionModesupporteddoubleSidedsidesSelectionModeextraFields${CLAUDE_SKILL_DIR}/scripts/get_entitlements.sh ADVANCED_OCRacceptScreenshots: trueacceptDigitalDoc: truewarning:current.jsonpython3 -c${CLAUDE_SKILL_DIR}/scripts/diff_country_mappings.py \
--current-file /tmp/current.json --payload-file /tmp/payload.json${CLAUDE_SKILL_DIR}/scripts/put_country_mappings.sh /tmp/payload.jsonextraFields更改某列中的一个字段而不丢失其他字段:规则中的列列表会完全替换该列。若要在保留现有字段的基础上启用一个额外字段,需先读取当前启用的字段集(),并传入完整的预期recognition_status.py列表。extraFields
(country, docType)${CLAUDE_SKILL_DIR}/scripts/get_global_settings.sh > /tmp/current.json
${CLAUDE_SKILL_DIR}/scripts/remove_country_mapping.py \
--current-file /tmp/current.json BRA:ID_CARD > /tmp/payload.json # full map MINUS the entry(country, docType)${CLAUDE_SKILL_DIR}/scripts/get_global_settings.sh > /tmp/current.json
${CLAUDE_SKILL_DIR}/scripts/remove_country_mapping.py \
--current-file /tmp/current.json BRA:ID_CARD > /tmp/payload.json # 完整映射移除指定条目undefinedundefined(country, docType)changes:
- country: DEU # ISO-3
docType: ID_CARD # IdDocType
expirationCheckMode: strict # scalar settings — merged locally, others preserved
ocrSettings: {ocrRuleMode: MRZ_DOC}
- country: BRA
docType: PASSPORT
extraFields: [placeOfBirth, gender] # REPLACES the Extra Fields column (PAID)sidesSelectionModeoneSidetwoSidessmartModedisabledremove_country_mapping.pyremoveADVANCED_OCR{country, docType}Field recognition result:extraFieldsavailableFields| User asks | Spec key | Value |
|---|---|---|
| accept docs sent as images/files (scans, PDFs) — not just live camera photos | | |
| accept screenshots specifically | | |
| MRZ mode | | |
| prefer non-latin recognition | | |
| expiry policy | | |
| accept only/reject some subtypes | | subtype id list |
| hide subtypes in WebSDK | | |
| accept this doc type at all | | a positive mode to accept; |
| how many sides required | | |
expirationCheckModeocrRuleModeshouldBeMaskedSettingsdocumentReferencessupporteddoubleSideddoubleSidedCanBeChangedacceptedAsPoaacceptSameDocAsPoabuild_country_mappings.pysidesSelectionModeGET /supportedDocs/documentsByCountriesshouldBeSignedshowRejectByMissingSignatureSettingshouldBeMaskedbuild_country_mappings.pydefaultFieldsavailableFieldsfield{country, docType}(country, docType)changes:
- country: DEU # ISO-3代码
docType: ID_CARD # IdDocType
expirationCheckMode: strict # 标量设置——本地合并,其他配置保留
ocrSettings: {ocrRuleMode: MRZ_DOC}
- country: BRA
docType: PASSPORT
extraFields: [placeOfBirth, gender] # 替换额外字段列(付费)sidesSelectionModeoneSidetwoSidessmartModedisabledremove_country_mapping.pyremoveADVANCED_OCR{country, docType}Field recognition result:extraFieldsavailableFields| 用户需求 | 规则键 | 值 |
|---|---|---|
| 接受以图像/文件形式发送的文档(扫描件、PDF)——而非仅实时相机照片 | | |
| 专门接受截图 | | |
| MRZ模式 | | |
| 优先识别非拉丁文字 | | |
| 有效期策略 | | |
| 仅接受/拒绝某些子类型 | | 子类型ID列表 |
| 在WebSDK中隐藏子类型 | | |
| 是否接受该文档类型 | | 正值模式表示接受; |
| 需要的面数 | | |
expirationCheckModeocrRuleModeshouldBeMaskedSettingsdocumentReferencessupporteddoubleSideddoubleSidedCanBeChangedacceptedAsPoaacceptSameDocAsPoabuild_country_mappings.pysidesSelectionModeGET /supportedDocs/documentsByCountriesshouldBeSignedshowRejectByMissingSignatureSettingshouldBeMaskedbuild_country_mappings.pydefaultFieldsavailableFields{country, docType}countries: [DEU, FRA] # ISO-3 codes
docTypes: [ID_CARD, DRIVERS] # document types
field: placeOfBirth # find where this OCR field exists (inverse query)
fieldKind: available | default | any # which list to search field in (default: any)
flags: # match per-doc boolean flags
supported: true # IMPLICIT DEFAULT — unsupported docs are excluded
doubleSided: false # unless you set supported:false explicitly
output: auto | list | summary # default: auto
limit: 100 # max items in a list before truncationcountries: [DEU, FRA] # ISO-3代码
docTypes: [ID_CARD, DRIVERS] # 文档类型
field: placeOfBirth # 查询该OCR字段存在的位置(反向查询)
fieldKind: available | default | any # 搜索字段所在的列表(默认:any)
flags: # 匹配文档级布尔标志
supported: true # 隐式默认——不支持的文档会被排除
doubleSided: false # 除非显式设置supported:false
output: auto | list | summary # 默认:auto
limit: 100 # 列表截断前的最大条目数| Question | Spec |
|---|---|
| What can I collect for a German ID card? | |
Which countries/types expose the | |
Where is | |
| Which docs are double-sided in France? | |
| Include unsupported docs too | |
| 问题 | 规则 |
|---|---|
| 德国身份证可收集哪些信息? | |
哪些国家/类型支持 | |
哪些地方可收集 | |
| 法国哪些文档是双面的? | |
| 同时包含不支持的文档 | |
mode: "list"mode: "summary"dobfirstNamebyDocTypeabsentInbyDocTypetopCountriesoutput: listlimitmode: "list"mode: "summary"dobfirstNamebyDocTypeabsentInbyDocTypetopCountriesoutput: listlimitsupported: falseflags.supported: falseidDocSettings.countryMappingsPROFILE_SCREENSHOTOTHERVISAUTILITY_BILLdocTypesuseCustomIdDocSettings: trueidDocSettings.countryMappingsuseCustomIdDocSettingsidDocSettingssumsub-create-levelidDocSettingssupported: falseflags.supported: falseidDocSettings.countryMappingsPROFILE_SCREENSHOTOTHERVISAUTILITY_BILLdocTypesuseCustomIdDocSettings: trueidDocSettings.countryMappingsuseCustomIdDocSettingsidDocSettingssumsub-create-levelidDocSettings