@salesforce/b2c-tooling-sdk 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/schemas/dw.schema.json +14 -0
- package/data/tooling/index.json +5 -5
- package/dist/esm/cli/base-command.js +4 -3
- package/dist/esm/cli/base-command.js.map +1 -1
- package/dist/esm/cli/cartridge-command.js +2 -1
- package/dist/esm/cli/cartridge-command.js.map +1 -1
- package/dist/esm/cli/config.js +3 -1
- package/dist/esm/cli/config.js.map +1 -1
- package/dist/esm/cli/hooks.d.ts +13 -0
- package/dist/esm/cli/hooks.js +11 -0
- package/dist/esm/cli/hooks.js.map +1 -1
- package/dist/esm/cli/instance-command.js +2 -1
- package/dist/esm/cli/instance-command.js.map +1 -1
- package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
- package/dist/esm/clients/scapi-backend-utils.js +28 -1
- package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
- package/dist/esm/clients/scapi-fallback-backend.js +2 -2
- package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
- package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
- package/dist/esm/compat/dispatcher.js +2 -2
- package/dist/esm/compat/dispatcher.js.map +1 -1
- package/dist/esm/config/config-origins.d.ts +19 -0
- package/dist/esm/config/config-origins.js +11 -0
- package/dist/esm/config/config-origins.js.map +1 -0
- package/dist/esm/config/config-write.d.ts +86 -0
- package/dist/esm/config/config-write.js +296 -0
- package/dist/esm/config/config-write.js.map +1 -0
- package/dist/esm/config/dw-json-schema.js +4 -0
- package/dist/esm/config/dw-json-schema.js.map +1 -1
- package/dist/esm/config/dw-json.d.ts +2 -0
- package/dist/esm/config/dw-json.js +10 -6
- package/dist/esm/config/dw-json.js.map +1 -1
- package/dist/esm/config/index.d.ts +8 -3
- package/dist/esm/config/index.js +5 -2
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/instance-manager.d.ts +64 -28
- package/dist/esm/config/instance-manager.js +145 -63
- package/dist/esm/config/instance-manager.js.map +1 -1
- package/dist/esm/config/mapping.js +6 -0
- package/dist/esm/config/mapping.js.map +1 -1
- package/dist/esm/config/resolver.d.ts +22 -0
- package/dist/esm/config/resolver.js +54 -29
- package/dist/esm/config/resolver.js.map +1 -1
- package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
- package/dist/esm/config/sources/dw-json-source.js +34 -20
- package/dist/esm/config/sources/dw-json-source.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +30 -3
- package/dist/esm/config/sources/env-source.js +126 -1
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/types.d.ts +46 -0
- package/dist/esm/operations/jobs/run-system-job.js +2 -2
- package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
- package/dist/esm/plugins/discovery.js +2 -1
- package/dist/esm/plugins/discovery.js.map +1 -1
- package/dist/esm/scapi/index.d.ts +5 -2
- package/dist/esm/scapi/index.js +3 -2
- package/dist/esm/scapi/index.js.map +1 -1
- package/dist/esm/scapi/live.d.ts +12 -1
- package/dist/esm/scapi/live.js +30 -2
- package/dist/esm/scapi/live.js.map +1 -1
- package/dist/esm/scapi/local.d.ts +17 -0
- package/dist/esm/scapi/local.js +68 -16
- package/dist/esm/scapi/local.js.map +1 -1
- package/dist/esm/scapi/request.d.ts +2 -2
- package/dist/esm/scapi/request.js +2 -1
- package/dist/esm/scapi/request.js.map +1 -1
- package/dist/esm/scapi/runtime.d.ts +5 -0
- package/dist/esm/scapi/runtime.js.map +1 -1
- package/dist/esm/scapi/schema-source.d.ts +90 -0
- package/dist/esm/scapi/schema-source.js +146 -0
- package/dist/esm/scapi/schema-source.js.map +1 -0
- package/dist/esm/scapi/worker-source.js +30 -6
- package/dist/esm/scapi/worker-source.js.map +1 -1
- package/dist/esm/test-utils/config-isolation.js +9 -2
- package/dist/esm/test-utils/config-isolation.js.map +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
- package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
- package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
- package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
- package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
- package/package.json +2 -2
- package/specs/scapi-schemas-v1.yaml +4 -1
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "SCAPI Schemas",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/scapi-schemas/scapi-schemas-oas-v1-public.yaml)\n\n# API Overview\n\nThe 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.\n\nThis 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.\n\n## Authentication & Authorization\n\nThe 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.\n\nThe necessary scope for accessing the SCAPI Schema API is:\n\n- `sfcc.scapi-schemas`: Provides access to retrieve SCAPI schema definitions and listings.\n\nYou must include the relevant scope(s) in the client ID used to generate the token. For details, see [Authorization Scopes Catalog](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html).\n\nFor detailed setup instructions, see [Authorization for Admin APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html).\n\nAccess is typically intended for developers, integration tools, and administrative applications that need to programmatically work with SCAPI schema definitions.\n\n## Response Details\n\n### Timeouts\n\nAdmin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)\n\n## Use Cases\n\n### Schema Discovery and Cataloging\n\nDiscover all available SCAPI endpoints and their current schema versions. This is particularly useful for:\n- Development Tools: IDE plugins and code generators that need to understand available APIs\n- Integration Platforms: Systems that need to dynamically discover and adapt to available Commerce Cloud APIs\n- Documentation Systems: Tools that automatically generate API documentation or SDK references\n- Governance and Compliance: Tracking which APIs are available, their versions, and deprecation status\n\nThe API allows filtering by:\n- API family, for example: \"product\", \"checkout\", \"customer\n- API name, for example: \"shopper-products\", \"orders\"\n- API version, for example: \"v1\", \"v2\"\n- Cartridge name, for example: \"my_cartridge\". **Only for Custom APIs.**\n- Status, for example: \"current\", \"deprecated\"\n\n### Schema Validation and Code Generation\n\nRetrieve detailed OpenAPI schema specifications to enable:\n- Request/Response Validation: Validate API requests and responses against the official schema.\n- Mock Server Creation: Generate mock servers for testing and development.\n- API Contract Testing: Ensure your implementations comply with the SCAPI specifications.\n\n### Version Management and Migration Planning\n\nTrack schema versions and plan migrations by:\n- Version Comparison: Compare different versions of the same API to understand changes.\n- Deprecation Tracking: Identify deprecated schemas and plan migration strategies. \n- Breaking Change Detection: Analyze schema differences to identify potential breaking changes.\n- Rollback Planning: Access historical schema versions for rollback scenarios.\n\n### Development Workflow Integration\n\nIntegrate schema access into your development workflows:\n- CI/CD Pipeline Integration: Validate API implementations against current schemas during build processes.\n- Local Development: Provide developers with up-to-date schema definitions for better IDE support.\n- Testing Automation: Generate comprehensive test suites based on schema definitions.\n- API Gateway Configuration: Configure API gateways with current schema definitions for validation and routing.",
|
|
6
|
+
"version": "1.0.3",
|
|
6
7
|
"x-api-type": "Admin",
|
|
7
8
|
"x-api-family": "DX"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/dx/scapi-schemas/v1",
|
|
12
13
|
"variables": {
|
|
13
14
|
"shortCode": {
|
|
15
|
+
"description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
|
|
14
16
|
"default": "shortCode"
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -19,21 +21,25 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/schemas": {
|
|
21
23
|
"get": {
|
|
24
|
+
"summary": "Get a list of known SCAPI schema definitions.",
|
|
22
25
|
"operationId": "getSchemaList",
|
|
23
26
|
"parameters": [
|
|
24
27
|
{
|
|
25
28
|
"name": "organizationId",
|
|
26
29
|
"in": "path",
|
|
30
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
27
31
|
"required": true,
|
|
28
32
|
"style": "simple",
|
|
29
33
|
"explode": false,
|
|
30
34
|
"schema": {
|
|
31
35
|
"$ref": "#/components/schemas/OrganizationId"
|
|
32
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"example": "f_ecom_zzxy_prd"
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
40
|
"name": "apiFamily",
|
|
36
41
|
"in": "query",
|
|
42
|
+
"description": "The API family",
|
|
37
43
|
"required": false,
|
|
38
44
|
"style": "form",
|
|
39
45
|
"explode": true,
|
|
@@ -44,6 +50,7 @@
|
|
|
44
50
|
{
|
|
45
51
|
"name": "apiName",
|
|
46
52
|
"in": "query",
|
|
53
|
+
"description": "The API name",
|
|
47
54
|
"required": false,
|
|
48
55
|
"style": "form",
|
|
49
56
|
"explode": true,
|
|
@@ -54,6 +61,7 @@
|
|
|
54
61
|
{
|
|
55
62
|
"name": "apiVersion",
|
|
56
63
|
"in": "query",
|
|
64
|
+
"description": "The API version",
|
|
57
65
|
"required": false,
|
|
58
66
|
"style": "form",
|
|
59
67
|
"explode": true,
|
|
@@ -61,9 +69,21 @@
|
|
|
61
69
|
"$ref": "#/components/schemas/ApiVersion"
|
|
62
70
|
}
|
|
63
71
|
},
|
|
72
|
+
{
|
|
73
|
+
"name": "cartridgeName",
|
|
74
|
+
"in": "query",
|
|
75
|
+
"description": "The cartridge name",
|
|
76
|
+
"required": false,
|
|
77
|
+
"style": "form",
|
|
78
|
+
"explode": true,
|
|
79
|
+
"schema": {
|
|
80
|
+
"$ref": "#/components/schemas/CartridgeName"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
64
83
|
{
|
|
65
84
|
"name": "status",
|
|
66
85
|
"in": "query",
|
|
86
|
+
"description": "The schema status",
|
|
67
87
|
"required": false,
|
|
68
88
|
"style": "form",
|
|
69
89
|
"explode": true,
|
|
@@ -72,7 +92,8 @@
|
|
|
72
92
|
"enum": [
|
|
73
93
|
"current",
|
|
74
94
|
"deprecated"
|
|
75
|
-
]
|
|
95
|
+
],
|
|
96
|
+
"example": "current"
|
|
76
97
|
}
|
|
77
98
|
}
|
|
78
99
|
],
|
|
@@ -83,6 +104,14 @@
|
|
|
83
104
|
"application/json": {
|
|
84
105
|
"schema": {
|
|
85
106
|
"$ref": "#/components/schemas/SchemaListResult"
|
|
107
|
+
},
|
|
108
|
+
"examples": {
|
|
109
|
+
"SchemaListSuccess": {
|
|
110
|
+
"$ref": "#/components/examples/SchemaListSuccess"
|
|
111
|
+
},
|
|
112
|
+
"SchemaListSuccessNoFilter": {
|
|
113
|
+
"$ref": "#/components/examples/SchemaListSuccessNoFilter"
|
|
114
|
+
}
|
|
86
115
|
}
|
|
87
116
|
}
|
|
88
117
|
}
|
|
@@ -93,6 +122,11 @@
|
|
|
93
122
|
"application/problem+json": {
|
|
94
123
|
"schema": {
|
|
95
124
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
125
|
+
},
|
|
126
|
+
"examples": {
|
|
127
|
+
"BadRequest": {
|
|
128
|
+
"$ref": "#/components/examples/BadRequest"
|
|
129
|
+
}
|
|
96
130
|
}
|
|
97
131
|
}
|
|
98
132
|
}
|
|
@@ -103,6 +137,11 @@
|
|
|
103
137
|
"application/problem+json": {
|
|
104
138
|
"schema": {
|
|
105
139
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
140
|
+
},
|
|
141
|
+
"examples": {
|
|
142
|
+
"Unauthorized": {
|
|
143
|
+
"$ref": "#/components/examples/Unauthorized"
|
|
144
|
+
}
|
|
106
145
|
}
|
|
107
146
|
}
|
|
108
147
|
}
|
|
@@ -113,6 +152,11 @@
|
|
|
113
152
|
"application/problem+json": {
|
|
114
153
|
"schema": {
|
|
115
154
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
155
|
+
},
|
|
156
|
+
"examples": {
|
|
157
|
+
"Forbidden": {
|
|
158
|
+
"$ref": "#/components/examples/Forbidden"
|
|
159
|
+
}
|
|
116
160
|
}
|
|
117
161
|
}
|
|
118
162
|
}
|
|
@@ -129,21 +173,25 @@
|
|
|
129
173
|
},
|
|
130
174
|
"/organizations/{organizationId}/schemas/{apiFamily}/{apiName}/{apiVersion}": {
|
|
131
175
|
"get": {
|
|
176
|
+
"summary": "Get a SCAPI schema specification.",
|
|
132
177
|
"operationId": "getSchemaDetails",
|
|
133
178
|
"parameters": [
|
|
134
179
|
{
|
|
135
180
|
"name": "organizationId",
|
|
136
181
|
"in": "path",
|
|
182
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
137
183
|
"required": true,
|
|
138
184
|
"style": "simple",
|
|
139
185
|
"explode": false,
|
|
140
186
|
"schema": {
|
|
141
187
|
"$ref": "#/components/schemas/OrganizationId"
|
|
142
|
-
}
|
|
188
|
+
},
|
|
189
|
+
"example": "f_ecom_zzxy_prd"
|
|
143
190
|
},
|
|
144
191
|
{
|
|
145
192
|
"name": "apiFamily",
|
|
146
193
|
"in": "path",
|
|
194
|
+
"description": "The API family",
|
|
147
195
|
"required": true,
|
|
148
196
|
"style": "simple",
|
|
149
197
|
"explode": false,
|
|
@@ -154,6 +202,7 @@
|
|
|
154
202
|
{
|
|
155
203
|
"name": "apiName",
|
|
156
204
|
"in": "path",
|
|
205
|
+
"description": "The API name",
|
|
157
206
|
"required": true,
|
|
158
207
|
"style": "simple",
|
|
159
208
|
"explode": false,
|
|
@@ -164,6 +213,7 @@
|
|
|
164
213
|
{
|
|
165
214
|
"name": "apiVersion",
|
|
166
215
|
"in": "path",
|
|
216
|
+
"description": "The API version",
|
|
167
217
|
"required": true,
|
|
168
218
|
"style": "simple",
|
|
169
219
|
"explode": false,
|
|
@@ -174,16 +224,21 @@
|
|
|
174
224
|
{
|
|
175
225
|
"name": "expand",
|
|
176
226
|
"in": "query",
|
|
227
|
+
"description": "Optional schema expansion e.g. 'custom_properties'.",
|
|
177
228
|
"required": false,
|
|
178
229
|
"style": "form",
|
|
179
230
|
"explode": false,
|
|
180
231
|
"schema": {
|
|
181
232
|
"type": "array",
|
|
233
|
+
"example": [
|
|
234
|
+
"custom_properties"
|
|
235
|
+
],
|
|
182
236
|
"items": {
|
|
183
237
|
"type": "string",
|
|
184
238
|
"enum": [
|
|
185
239
|
"custom_properties"
|
|
186
|
-
]
|
|
240
|
+
],
|
|
241
|
+
"example": "custom_properties"
|
|
187
242
|
}
|
|
188
243
|
}
|
|
189
244
|
}
|
|
@@ -193,7 +248,8 @@
|
|
|
193
248
|
"description": "SCAPI schema specifications successfully retrieved.",
|
|
194
249
|
"content": {
|
|
195
250
|
"application/json": {
|
|
196
|
-
"schema": {}
|
|
251
|
+
"schema": {},
|
|
252
|
+
"example": {}
|
|
197
253
|
}
|
|
198
254
|
}
|
|
199
255
|
},
|
|
@@ -203,6 +259,11 @@
|
|
|
203
259
|
"application/problem+json": {
|
|
204
260
|
"schema": {
|
|
205
261
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
262
|
+
},
|
|
263
|
+
"examples": {
|
|
264
|
+
"BadRequest": {
|
|
265
|
+
"$ref": "#/components/examples/BadRequest"
|
|
266
|
+
}
|
|
206
267
|
}
|
|
207
268
|
}
|
|
208
269
|
}
|
|
@@ -213,6 +274,11 @@
|
|
|
213
274
|
"application/problem+json": {
|
|
214
275
|
"schema": {
|
|
215
276
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
277
|
+
},
|
|
278
|
+
"examples": {
|
|
279
|
+
"Unauthorized": {
|
|
280
|
+
"$ref": "#/components/examples/Unauthorized"
|
|
281
|
+
}
|
|
216
282
|
}
|
|
217
283
|
}
|
|
218
284
|
}
|
|
@@ -223,6 +289,11 @@
|
|
|
223
289
|
"application/problem+json": {
|
|
224
290
|
"schema": {
|
|
225
291
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
292
|
+
},
|
|
293
|
+
"examples": {
|
|
294
|
+
"Forbidden": {
|
|
295
|
+
"$ref": "#/components/examples/Forbidden"
|
|
296
|
+
}
|
|
226
297
|
}
|
|
227
298
|
}
|
|
228
299
|
}
|
|
@@ -233,6 +304,11 @@
|
|
|
233
304
|
"application/problem+json": {
|
|
234
305
|
"schema": {
|
|
235
306
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
307
|
+
},
|
|
308
|
+
"examples": {
|
|
309
|
+
"ResourceNotFound": {
|
|
310
|
+
"$ref": "#/components/examples/ResourceNotFound"
|
|
311
|
+
}
|
|
236
312
|
}
|
|
237
313
|
}
|
|
238
314
|
}
|
|
@@ -252,35 +328,53 @@
|
|
|
252
328
|
"schemas": {
|
|
253
329
|
"OrganizationId": {
|
|
254
330
|
"type": "string",
|
|
255
|
-
"
|
|
256
|
-
"
|
|
331
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
332
|
+
"example": "f_ecom_zzxy_prd",
|
|
333
|
+
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
257
334
|
},
|
|
258
335
|
"ApiFamily": {
|
|
259
336
|
"type": "string",
|
|
337
|
+
"description": "The API family name",
|
|
338
|
+
"example": "product",
|
|
260
339
|
"maxLength": 50,
|
|
261
340
|
"pattern": "^[a-z0-9-]+$"
|
|
262
341
|
},
|
|
263
342
|
"ApiName": {
|
|
264
343
|
"type": "string",
|
|
344
|
+
"description": "The API name",
|
|
345
|
+
"example": "shopper-products",
|
|
265
346
|
"maxLength": 200,
|
|
266
347
|
"pattern": "^[a-z0-9-]+$"
|
|
267
348
|
},
|
|
268
349
|
"ApiVersion": {
|
|
269
350
|
"type": "string",
|
|
351
|
+
"description": "The API version",
|
|
352
|
+
"example": "v1",
|
|
270
353
|
"pattern": "^v\\d+$"
|
|
271
354
|
},
|
|
355
|
+
"CartridgeName": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "The cartridge name",
|
|
358
|
+
"example": "my_cartridge",
|
|
359
|
+
"pattern": "^[a-z_][a-z0-9_]*$"
|
|
360
|
+
},
|
|
272
361
|
"Total": {
|
|
273
362
|
"type": "integer",
|
|
274
363
|
"format": "int32",
|
|
275
364
|
"default": 0,
|
|
365
|
+
"description": "The total number of hits that match the search's criteria. This can be greater than the number of results returned as search results are pagenated.",
|
|
366
|
+
"example": 10,
|
|
276
367
|
"minimum": 0
|
|
277
368
|
},
|
|
278
369
|
"ResultBase": {
|
|
279
370
|
"type": "object",
|
|
371
|
+
"description": "Schema defining generic list result. Each response schema of a resource requiring a list response should extend this schema. \nAdditionally it needs to be defined what data is returned.",
|
|
280
372
|
"properties": {
|
|
281
373
|
"limit": {
|
|
282
374
|
"type": "integer",
|
|
283
|
-
"format": "int32"
|
|
375
|
+
"format": "int32",
|
|
376
|
+
"description": "Maximum records to retrieve per request. The limit with its constraints (minimum, maximum, default) is defined by the request parameter `limit` of the endpoint returning this schema.",
|
|
377
|
+
"example": 10
|
|
284
378
|
},
|
|
285
379
|
"total": {
|
|
286
380
|
"$ref": "#/components/schemas/Total"
|
|
@@ -303,12 +397,16 @@
|
|
|
303
397
|
"apiVersion": {
|
|
304
398
|
"$ref": "#/components/schemas/ApiVersion"
|
|
305
399
|
},
|
|
400
|
+
"cartridgeName": {
|
|
401
|
+
"$ref": "#/components/schemas/CartridgeName"
|
|
402
|
+
},
|
|
306
403
|
"status": {
|
|
307
404
|
"type": "string",
|
|
308
405
|
"enum": [
|
|
309
406
|
"current",
|
|
310
407
|
"deprecated"
|
|
311
|
-
]
|
|
408
|
+
],
|
|
409
|
+
"example": "current"
|
|
312
410
|
}
|
|
313
411
|
}
|
|
314
412
|
},
|
|
@@ -317,31 +415,48 @@
|
|
|
317
415
|
"properties": {
|
|
318
416
|
"schemaVersion": {
|
|
319
417
|
"type": "string",
|
|
418
|
+
"description": "Semantic OAS schema version",
|
|
419
|
+
"example": "1.0.0",
|
|
320
420
|
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
321
421
|
},
|
|
322
422
|
"apiFamily": {
|
|
323
423
|
"type": "string",
|
|
424
|
+
"description": "The API family name",
|
|
425
|
+
"example": "product",
|
|
324
426
|
"maxLength": 50,
|
|
325
427
|
"pattern": "^[a-z0-9-]+$"
|
|
326
428
|
},
|
|
327
429
|
"apiName": {
|
|
328
430
|
"type": "string",
|
|
431
|
+
"description": "The API name",
|
|
432
|
+
"example": "shopper-products",
|
|
329
433
|
"maxLength": 200,
|
|
330
434
|
"pattern": "^[a-z0-9-]+$"
|
|
331
435
|
},
|
|
332
436
|
"apiVersion": {
|
|
333
437
|
"type": "string",
|
|
438
|
+
"description": "The API version",
|
|
439
|
+
"example": "v1",
|
|
334
440
|
"pattern": "^v\\d+$"
|
|
335
441
|
},
|
|
442
|
+
"cartridgeName": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"description": "The cartridge name (only for Custom APIs)",
|
|
445
|
+
"example": "my_cartridge",
|
|
446
|
+
"pattern": "^[a-z_][a-z0-9_]*$"
|
|
447
|
+
},
|
|
336
448
|
"status": {
|
|
337
449
|
"type": "string",
|
|
338
450
|
"enum": [
|
|
339
451
|
"current",
|
|
340
452
|
"deprecated"
|
|
341
|
-
]
|
|
453
|
+
],
|
|
454
|
+
"example": "deprecated"
|
|
342
455
|
},
|
|
343
456
|
"link": {
|
|
344
457
|
"type": "string",
|
|
458
|
+
"description": "The URL to the SCAPI schema detail endpoint",
|
|
459
|
+
"example": "https://api.example.com/scapi/schemas/customer/customers/v1",
|
|
345
460
|
"maxLength": 2048
|
|
346
461
|
}
|
|
347
462
|
}
|
|
@@ -358,6 +473,7 @@
|
|
|
358
473
|
},
|
|
359
474
|
"data": {
|
|
360
475
|
"type": "array",
|
|
476
|
+
"description": "List containing all filtered schema entries.",
|
|
361
477
|
"items": {
|
|
362
478
|
"$ref": "#/components/schemas/SchemaListItem"
|
|
363
479
|
}
|
|
@@ -370,17 +486,25 @@
|
|
|
370
486
|
"properties": {
|
|
371
487
|
"title": {
|
|
372
488
|
"type": "string",
|
|
489
|
+
"description": "A short, human-readable summary of the problem\ntype. It will not change from occurrence to occurrence of the \nproblem, except for purposes of localization\n",
|
|
490
|
+
"example": "You do not have enough credit",
|
|
373
491
|
"maxLength": 256
|
|
374
492
|
},
|
|
375
493
|
"type": {
|
|
376
494
|
"type": "string",
|
|
495
|
+
"description": "A URI reference [RFC3986] that identifies the\nproblem type. This specification encourages that, when\ndereferenced, it provide human-readable documentation for the\nproblem type (e.g., using HTML [W3C.REC-html5-20141028]). When\nthis member is not present, its value is assumed to be\n\"about:blank\". It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
|
|
496
|
+
"example": "NotEnoughMoney",
|
|
377
497
|
"maxLength": 2048
|
|
378
498
|
},
|
|
379
499
|
"detail": {
|
|
380
|
-
"type": "string"
|
|
500
|
+
"type": "string",
|
|
501
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
502
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
381
503
|
},
|
|
382
504
|
"instance": {
|
|
383
505
|
"type": "string",
|
|
506
|
+
"description": "A URI reference that identifies the specific\noccurrence of the problem. It may or may not yield further\ninformation if dereferenced. It accepts relative URIs; this means\nthat they must be resolved relative to the document's base URI, as\nper [RFC3986], Section 5.\n",
|
|
507
|
+
"example": "/account/12345/msgs/abc",
|
|
384
508
|
"maxLength": 2048
|
|
385
509
|
}
|
|
386
510
|
},
|
|
@@ -395,16 +519,19 @@
|
|
|
395
519
|
"organizationId": {
|
|
396
520
|
"name": "organizationId",
|
|
397
521
|
"in": "path",
|
|
522
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
398
523
|
"required": true,
|
|
399
524
|
"style": "simple",
|
|
400
525
|
"explode": false,
|
|
401
526
|
"schema": {
|
|
402
527
|
"$ref": "#/components/schemas/OrganizationId"
|
|
403
|
-
}
|
|
528
|
+
},
|
|
529
|
+
"example": "f_ecom_zzxy_prd"
|
|
404
530
|
},
|
|
405
531
|
"apiFamily": {
|
|
406
532
|
"name": "apiFamily",
|
|
407
533
|
"in": "query",
|
|
534
|
+
"description": "The API family",
|
|
408
535
|
"required": false,
|
|
409
536
|
"style": "form",
|
|
410
537
|
"explode": true,
|
|
@@ -415,6 +542,7 @@
|
|
|
415
542
|
"apiName": {
|
|
416
543
|
"name": "apiName",
|
|
417
544
|
"in": "query",
|
|
545
|
+
"description": "The API name",
|
|
418
546
|
"required": false,
|
|
419
547
|
"style": "form",
|
|
420
548
|
"explode": true,
|
|
@@ -425,6 +553,7 @@
|
|
|
425
553
|
"apiVersion": {
|
|
426
554
|
"name": "apiVersion",
|
|
427
555
|
"in": "query",
|
|
556
|
+
"description": "The API version",
|
|
428
557
|
"required": false,
|
|
429
558
|
"style": "form",
|
|
430
559
|
"explode": true,
|
|
@@ -432,9 +561,21 @@
|
|
|
432
561
|
"$ref": "#/components/schemas/ApiVersion"
|
|
433
562
|
}
|
|
434
563
|
},
|
|
564
|
+
"cartridgeName": {
|
|
565
|
+
"name": "cartridgeName",
|
|
566
|
+
"in": "query",
|
|
567
|
+
"description": "The cartridge name",
|
|
568
|
+
"required": false,
|
|
569
|
+
"style": "form",
|
|
570
|
+
"explode": true,
|
|
571
|
+
"schema": {
|
|
572
|
+
"$ref": "#/components/schemas/CartridgeName"
|
|
573
|
+
}
|
|
574
|
+
},
|
|
435
575
|
"status": {
|
|
436
576
|
"name": "status",
|
|
437
577
|
"in": "query",
|
|
578
|
+
"description": "The schema status",
|
|
438
579
|
"required": false,
|
|
439
580
|
"style": "form",
|
|
440
581
|
"explode": true,
|
|
@@ -443,12 +584,14 @@
|
|
|
443
584
|
"enum": [
|
|
444
585
|
"current",
|
|
445
586
|
"deprecated"
|
|
446
|
-
]
|
|
587
|
+
],
|
|
588
|
+
"example": "current"
|
|
447
589
|
}
|
|
448
590
|
},
|
|
449
591
|
"parameters-apiFamily": {
|
|
450
592
|
"name": "apiFamily",
|
|
451
593
|
"in": "path",
|
|
594
|
+
"description": "The API family",
|
|
452
595
|
"required": true,
|
|
453
596
|
"style": "simple",
|
|
454
597
|
"explode": false,
|
|
@@ -459,6 +602,7 @@
|
|
|
459
602
|
"parameters-apiName": {
|
|
460
603
|
"name": "apiName",
|
|
461
604
|
"in": "path",
|
|
605
|
+
"description": "The API name",
|
|
462
606
|
"required": true,
|
|
463
607
|
"style": "simple",
|
|
464
608
|
"explode": false,
|
|
@@ -469,6 +613,7 @@
|
|
|
469
613
|
"parameters-apiVersion": {
|
|
470
614
|
"name": "apiVersion",
|
|
471
615
|
"in": "path",
|
|
616
|
+
"description": "The API version",
|
|
472
617
|
"required": true,
|
|
473
618
|
"style": "simple",
|
|
474
619
|
"explode": false,
|
|
@@ -479,23 +624,113 @@
|
|
|
479
624
|
"expand": {
|
|
480
625
|
"name": "expand",
|
|
481
626
|
"in": "query",
|
|
627
|
+
"description": "Optional schema expansion e.g. 'custom_properties'.",
|
|
482
628
|
"required": false,
|
|
483
629
|
"style": "form",
|
|
484
630
|
"explode": false,
|
|
485
631
|
"schema": {
|
|
486
632
|
"type": "array",
|
|
633
|
+
"example": [
|
|
634
|
+
"custom_properties"
|
|
635
|
+
],
|
|
487
636
|
"items": {
|
|
488
637
|
"type": "string",
|
|
489
638
|
"enum": [
|
|
490
639
|
"custom_properties"
|
|
491
|
-
]
|
|
640
|
+
],
|
|
641
|
+
"example": "custom_properties"
|
|
492
642
|
}
|
|
493
643
|
}
|
|
494
644
|
}
|
|
495
645
|
},
|
|
646
|
+
"examples": {
|
|
647
|
+
"SchemaListSuccess": {
|
|
648
|
+
"value": {
|
|
649
|
+
"limit": 1,
|
|
650
|
+
"total": 3,
|
|
651
|
+
"filter": {
|
|
652
|
+
"apiFamily": "product",
|
|
653
|
+
"apiName": "shopper-products",
|
|
654
|
+
"apiVersion": "v1",
|
|
655
|
+
"status": "current"
|
|
656
|
+
},
|
|
657
|
+
"data": [
|
|
658
|
+
{
|
|
659
|
+
"schemaVersion": "1.0.25",
|
|
660
|
+
"apiFamily": "product",
|
|
661
|
+
"apiName": "shopper-products",
|
|
662
|
+
"apiVersion": "v1",
|
|
663
|
+
"status": "current",
|
|
664
|
+
"link": "https://api.example.com/scapi/schemas/product/shopper-products/v1"
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"SchemaListSuccessNoFilter": {
|
|
670
|
+
"value": {
|
|
671
|
+
"limit": 3,
|
|
672
|
+
"total": 3,
|
|
673
|
+
"data": [
|
|
674
|
+
{
|
|
675
|
+
"schemaVersion": "1.0.25",
|
|
676
|
+
"apiFamily": "product",
|
|
677
|
+
"apiName": "shopper-products",
|
|
678
|
+
"apiVersion": "v1",
|
|
679
|
+
"status": "current",
|
|
680
|
+
"link": "https://api.example.com/scapi/schemas/product/shopper-products/v1"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"schemaVersion": "2.1.0",
|
|
684
|
+
"apiFamily": "checkout",
|
|
685
|
+
"apiName": "shopper-baskets",
|
|
686
|
+
"apiVersion": "v2",
|
|
687
|
+
"status": "current",
|
|
688
|
+
"link": "https://api.example.com/scapi/schemas/checkout/shopper-baskets/v2"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"schemaVersion": "1.5.12",
|
|
692
|
+
"apiFamily": "customer",
|
|
693
|
+
"apiName": "customers",
|
|
694
|
+
"apiVersion": "v1",
|
|
695
|
+
"status": "deprecated",
|
|
696
|
+
"link": "https://api.example.com/scapi/schemas/customer/customers/v1"
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"BadRequest": {
|
|
702
|
+
"value": {
|
|
703
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/value-constraint-violation",
|
|
704
|
+
"title": "Bad Request",
|
|
705
|
+
"detail": "Value for parameter 'apiFamily' violates API constraint '^[a-z0-9-]+$'"
|
|
706
|
+
}
|
|
707
|
+
},
|
|
708
|
+
"Unauthorized": {
|
|
709
|
+
"value": {
|
|
710
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
711
|
+
"title": "Unauthorized",
|
|
712
|
+
"detail": "Unauthorized request"
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"Forbidden": {
|
|
716
|
+
"value": {
|
|
717
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
|
|
718
|
+
"title": "Forbidden",
|
|
719
|
+
"detail": "Access to requested resource forbidden"
|
|
720
|
+
}
|
|
721
|
+
},
|
|
722
|
+
"ResourceNotFound": {
|
|
723
|
+
"value": {
|
|
724
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/resource-not-found",
|
|
725
|
+
"title": "Resource Not Found",
|
|
726
|
+
"detail": "Could not find requested resource"
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
},
|
|
496
730
|
"securitySchemes": {
|
|
497
731
|
"AmOAuth2": {
|
|
498
732
|
"type": "oauth2",
|
|
733
|
+
"description": "AccountManager OAuth 2.0 bearer token Authentication.",
|
|
499
734
|
"flows": {
|
|
500
735
|
"clientCredentials": {
|
|
501
736
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
@@ -506,9 +741,8 @@
|
|
|
506
741
|
"authorizationCode": {
|
|
507
742
|
"authorizationUrl": "https://account.demandware.com/dwsso/oauth2/authorize",
|
|
508
743
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
509
|
-
"
|
|
510
|
-
|
|
511
|
-
}
|
|
744
|
+
"refreshUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
745
|
+
"scopes": {}
|
|
512
746
|
}
|
|
513
747
|
}
|
|
514
748
|
}
|