1.0.2
API Overview
The SCAPI Schema API provides programmatic retrieval of OpenAPI schema definitions for all B2C Commerce API (SCAPI) endpoints, which facilitates better integration, validation, and development workflows across the Commerce Cloud ecosystem.
This API serves as a central registry for all SCAPI schema definitions, allowing you to discover available APIs by family, name, and version, as well as retrieve detailed schema specifications for specific API endpoints.
Authentication & Authorization
The SCAPI Schema API uses an Account Manager OAuth 2.0 bearer token for authentication. For resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request. The client must first authenticate against Account manager to log in.
The necessary scope for accessing the SCAPI Schema API is:
sfcc.scapi-schemas: Provides access to retrieve SCAPI schema definitions and listings.
You must include the relevant scope(s) in the client ID used to generate the token. For details, see Authorization Scopes Catalog.
For detailed setup instructions, see Authorization for Admin APIs.
Access is typically intended for developers, integration tools, and administrative applications that need to programmatically work with SCAPI schema definitions.
Use Cases
Schema Discovery and Cataloging
Discover all available SCAPI endpoints and their current schema versions. This is particularly useful for:
- Development Tools: IDE plugins and code generators that need to understand available APIs
- Integration Platforms: Systems that need to dynamically discover and adapt to available Commerce Cloud APIs
- Documentation Systems: Tools that automatically generate API documentation or SDK references
- Governance and Compliance: Tracking which APIs are available, their versions, and deprecation status
The API allows filtering by:
- API family, for example: "product", "checkout", "customer
- API name, for example: "shopper-products", "orders"
- API version, for example: "v1", "v2"
Schema Validation and Code Generation
Retrieve detailed OpenAPI schema specifications to enable:
- Request/Response Validation: Validate API requests and responses against the official schema.
- Mock Server Creation: Generate mock servers for testing and development.
- API Contract Testing: Ensure your implementations comply with the SCAPI specifications.
Version Management and Migration Planning
Track schema versions and plan migrations by:
- Version Comparison: Compare different versions of the same API to understand changes.
- Deprecation Tracking: Identify deprecated schemas and plan migration strategies.
- Breaking Change Detection: Analyze schema differences to identify potential breaking changes.
- Rollback Planning: Access historical schema versions for rollback scenarios.
Development Workflow Integration
Integrate schema access into your development workflows:
- CI/CD Pipeline Integration: Validate API implementations against current schemas during build processes.
- Local Development: Provide developers with up-to-date schema definitions for better IDE support.
- Testing Automation: Generate comprehensive test suites based on schema definitions.
- API Gateway Configuration: Configure API gateways with current schema definitions for validation and routing.
Let us know so we can improve!