Agent skill · Backend & API

b2c-custom-api-development

Guide for developing SCAPI Custom APIs on Salesforce B2C Commerce

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill b2c-custom-api-development --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 16 KB
Bundled scripts: none
Path: skills/api/b2c-custom-api-development/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Custom API Development Skill This skill guides you through developing Custom APIs for Salesforce B2C Commerce. Custom APIs let you expose custom script code as REST endpoints under the SCAPI framework. ## Overview A Custom API URL has this structure: ``` https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}/organizations/{organizationId}/{endpointPath} ``` Three components are required to create a Custom API: 1. **API Contract** - An OAS 3.0 schema file (YAML) 2. **API Implementation** - A script using the B2C Commerce Script API 3. **API Mapping** - An `api.json` file binding endpoints to implementations ## Cartridge Structure Custom APIs are defined within cartridges. Create a `rest-apis` folder in the cartridge directory with subdirectories for each API: ``` /my-cartridge /cartridge package.json /rest-apis /my-api-name # API name (lowercase alphanumeric and hyphens only) api.json # Mapping file schema.yaml # OAS 3.0 contract script.js # Implementation /scripts /controllers ``` **Important:** API directory names can only contain alphanumeric lowercase characters and hyphens. ## Component 1: API Contract (schema.yaml) The API contract defines endpoin

What's inside
Steps it walks through
  1. Overview
  2. Cartridge Structure
  3. Component 1: API Contract (schema.yaml)
  4. Contract Requirements
  5. Shopper vs Admin APIs
  6. Component 2: Implementation (script.js)
  7. Implementation Best Practices
  8. Caching Responses
  9. Remote Includes
  10. Component 3: Mapping (api.json)
  11. Endpoint Registration
  12. Circuit Breaker Protection
  13. Troubleshooting
  14. Common Errors
Ships with 1 file
  • metadata.json
Commands it runs
Deploy cartridge and reload (re-activate) to register endpoints
b2c code deploy ./my-cartridge --reload
Or deploy then activate separately
b2c code deploy ./my-cartridge
b2c code activate my-code-version
Check Custom API registration status
Tenant ID: derive from hostname (e.g., zzpq-013 → zzpq_013)
b2c scapi custom status --tenant-id zzpq_013
Filter to see only failed registrations
b2c scapi custom status --tenant-id zzpq_013 --status not_registered
More from claude-skill-registry
All skills →
About this skill
What does the b2c-custom-api-development skill do?

Guide for developing SCAPI Custom APIs on Salesforce B2C Commerce

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill b2c-custom-api-development --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going