sfcc-scapi-custom-endpoints

Create SCAPI Custom API endpoints with schema.yaml, script.js, and api.json mappings.

27|9|Updated Aug 8, 2025
One-click install
npx skills add https://github.com/taurgis/sfcc-dev-mcp --skill sfcc-scapi-custom-endpoints
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sfcc-scapi-custom-endpoints
Source: https://github.com/taurgis/sfcc-dev-mcp/tree/main/ai-instructions/skills/sfcc-scapi-custom-endpoints
Command: npx skills add https://github.com/taurgis/sfcc-dev-mcp --skill sfcc-scapi-custom-endpoints

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill provides a structured guide to design, implement, and validate SCAPI Custom APIs in Salesforce B2C Commerce Cloud, covering contracts, mappings, and server-side scripts to streamline endpoint development.

Core Features & Use Cases

  • Structured cartridge layout guidance: sets up the rest-apis/{api-name} folder with schema.yaml, script.js, and api.json.
  • OpenAPI-compliant contracts: enforce schema.yaml correctness and endpoint definitions with proper security scopes.
  • Mapping & implementation workflow: align endpoints to exported functions and ensure proper activation steps for code versions.
  • Use Case: Create a new custom endpoint for a loyalty service following the provided structure and mapping.

Quick Start

Create a new SCAPI endpoint by adding cartridge/rest-apis/{api-name}/ with a schema.yaml, a script.js, and an api.json, then activate the code version to register the endpoint.

Frequently Asked Questions about sfcc-scapi-custom-endpoints

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a custom SCAPI endpoint in Salesforce B2C Commerce?▼

Create a custom SCAPI endpoint by adding a cartridge/rest-apis/{api-name}/ directory containing schema.yaml, script.js, and api.json, then activate the code version to register the endpoint.

What is the required structure for an OpenAPI schema.yaml contract in SFCC?▼

The OpenAPI schema.yaml contract in SFCC must enforce correct endpoint definitions, specify proper security scopes, and align with the structured cartridge layout to validate custom API requests.

How do I map SCAPI endpoints to script functions across SFCC cartridges?▼

Map SCAPI endpoints to script functions by configuring the api.json file to align endpoint definitions with exported functions in script.js, ensuring proper implementation workflow across cartridges.

Do I need to activate a code version to register new SCAPI custom APIs?▼

Yes, you must activate the code version after adding the REST API folder structure and mapping files to register and expose the new SCAPI custom APIs in the SFCC environment.

Can I use SCAPI custom endpoints to build a loyalty service in SFCC?▼

Yes, you can build a loyalty service by following the provided SCAPI structure and mapping workflow, creating a custom endpoint with the required schema.yaml, script.js, and api.json files.

Why are my SCAPI custom endpoints not showing up after deployment?▼

SCAPI custom endpoints may not appear if the OpenAPI schema.yaml contracts are incorrect, endpoint mappings in api.json are misconfigured, or the code version containing the cartridge is not activated.