b2c-scapi-custom
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseB2C SCAPI Custom APIs Skill
B2C SCAPI 自定义API技能
Use the CLI plugin to manage SCAPI Custom API endpoints and check their registration status.
b2cTip: Ifis not installed globally, useb2cinstead (e.g.,npx @salesforce/b2c-cli).npx @salesforce/b2c-cli scapi custom status
使用 CLI插件来管理SCAPI自定义API端点,以及检查它们的注册状态。
b2c提示: 如果没有全局安装,请改用b2c(例如npx @salesforce/b2c-cli)。npx @salesforce/b2c-cli scapi custom status
Required: Tenant ID
必填项:Tenant ID
The flag is required for all commands. The tenant ID identifies your B2C Commerce instance.
--tenant-idImportant: The tenant ID is NOT the same as the organization ID:
- Tenant ID: (used with commands that require
zzxy_prd)--tenant-id - Organization ID: (used in SCAPI URLs, has
f_ecom_zzxy_prdprefix)f_ecom_
--tenant-id重要提示: Tenant ID与组织ID(Organization ID)并不相同:
- Tenant ID:(用于需要
zzxy_prd参数的命令)--tenant-id - Organization ID:(用于SCAPI URL中,带有
f_ecom_zzxy_prd前缀)f_ecom_
Deriving Tenant ID from Hostname
从主机名推导Tenant ID
For sandbox instances, you can derive the tenant ID from the hostname by replacing hyphens with underscores:
| Hostname | Tenant ID |
|---|---|
| |
| |
| |
For production instances, use your realm and instance identifier (e.g., ).
zzxy_prd对于沙箱实例,你可以将主机名中的连字符替换为下划线,从而得到Tenant ID:
| 主机名 | Tenant ID |
|---|---|
| |
| |
| |
对于生产实例,请使用你的领域和实例标识符(例如)。
zzxy_prdExamples
示例
Get Custom API Endpoint Status
获取自定义API端点状态
bash
undefinedbash
undefinedlist all Custom API endpoints for an organization
list all Custom API endpoints for an organization
b2c scapi custom status --tenant-id zzxy_prd
b2c scapi custom status --tenant-id zzxy_prd
list with JSON output
list with JSON output
b2c scapi custom status --tenant-id zzxy_prd --json
undefinedb2c scapi custom status --tenant-id zzxy_prd --json
undefinedFilter by Status
按状态过滤
bash
undefinedbash
undefinedlist only active endpoints
list only active endpoints
b2c scapi custom status --tenant-id zzxy_prd --status active
b2c scapi custom status --tenant-id zzxy_prd --status active
list only endpoints that failed to register
list only endpoints that failed to register
b2c scapi custom status --tenant-id zzxy_prd --status not_registered
undefinedb2c scapi custom status --tenant-id zzxy_prd --status not_registered
undefinedGroup by Type or Site
按类型或站点分组
bash
undefinedbash
undefinedgroup endpoints by API type (Admin vs Shopper)
group endpoints by API type (Admin vs Shopper)
b2c scapi custom status --tenant-id zzxy_prd --group-by type
b2c scapi custom status --tenant-id zzxy_prd --group-by type
group endpoints by site
group endpoints by site
b2c scapi custom status --tenant-id zzxy_prd --group-by site
undefinedb2c scapi custom status --tenant-id zzxy_prd --group-by site
undefinedCustomize Output Columns
自定义输出列
bash
undefinedbash
undefinedshow extended columns (includes error reasons, sites, etc.)
show extended columns (includes error reasons, sites, etc.)
b2c scapi custom status --tenant-id zzxy_prd --extended
b2c scapi custom status --tenant-id zzxy_prd --extended
select specific columns to display
select specific columns to display
b2c scapi custom status --tenant-id zzxy_prd --columns type,apiName,status,sites
b2c scapi custom status --tenant-id zzxy_prd --columns type,apiName,status,sites
available columns: type, apiName, apiVersion, cartridgeName, endpointPath, httpMethod, status, sites, securityScheme, operationId, schemaFile, implementationScript, errorReason, id
available columns: type, apiName, apiVersion, cartridgeName, endpointPath, httpMethod, status, sites, securityScheme, operationId, schemaFile, implementationScript, errorReason, id
undefinedundefinedDebug Failed Registrations
调试注册失败问题
bash
undefinedbash
undefinedquickly find and diagnose failed Custom API registrations
quickly find and diagnose failed Custom API registrations
b2c scapi custom status --tenant-id zzxy_prd --status not_registered --columns type,apiName,endpointPath,errorReason
undefinedb2c scapi custom status --tenant-id zzxy_prd --status not_registered --columns type,apiName,endpointPath,errorReason
undefinedConfiguration
配置
The tenant ID and short code can be set via environment variables:
- : Tenant ID (e.g.,
SFCC_TENANT_ID, not the organization ID)zzxy_prd - : SCAPI short code
SFCC_SHORTCODE
你可以通过环境变量设置Tenant ID和短代码:
- :Tenant ID(例如
SFCC_TENANT_ID,不是组织ID)zzxy_prd - :SCAPI短代码
SFCC_SHORTCODE
More Commands
更多命令
See for a full list of available commands and options.
b2c scapi custom --help执行查看完整的可用命令和选项列表。
b2c scapi custom --helpRelated Skills
相关技能
- - Creating Custom API endpoints (schema, script, mapping)
b2c:b2c-custom-api-development - - Deploying and activating code versions (triggers registration)
b2c-cli:b2c-code
- - 创建自定义API端点(schema、脚本、映射)
b2c:b2c-custom-api-development - - 部署和激活代码版本(会触发注册流程)
b2c-cli:b2c-code