@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": "Shopper Agents",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-agents/shopper-agents-oas-v1-public.yaml)\n\n# API Overview\nThis REST API initializes an Agentforce session when a new session starts.\n\n## Authentication & Authorization\nThe Shopper Agent API requires a shopper access token from the Shopper Login and API Access Service (SLAS).\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token.\n\n- `sfcc.shopper-agents.rw`: Required for initializing shopper agent session (POST operations).\n\nFor a full list of required permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor details on how to request a shopper access token from SLAS, see the guest user flows for [public clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-public-client.html) and [private clients](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas-private-client.html) in the SLAS guides. \n\n\n## Use Cases\n\n### Shopper Agent Initialization\n\nWhen a new agentic session starts, you receive a session initialization key. Include that key in the request to initialize the Agentforce session.\n\n**Flow:**\n\n1. Obtain a `sessionInitKey` from a supported service.\n2. Initialize an agent session using the previously obtained `sessionInitKey`.\n\n### sessionInitKey\n\n`sessionInitKey` is the session initialization identifier that is obtained when an Agentforce session starts.\n\n\nThe request body must include the `sessionInitKey` field. Missing or invalid `sessionInitKey` results in `INVALID_REQUEST_PARAMETERS` (400).",
|
|
6
|
+
"version": "1.1.5",
|
|
6
7
|
"x-api-type": "Shopper",
|
|
7
8
|
"x-api-family": "Shopper"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-agents/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,26 +21,60 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/session/init": {
|
|
21
23
|
"post": {
|
|
24
|
+
"summary": "Initializes an Agentforce session.",
|
|
25
|
+
"description": "The request body must include the sessionInitKey field. Missing or invalid sessionInitKey information results in INVALID_REQUEST_PARAMETERS (400).",
|
|
22
26
|
"operationId": "postSessionInit",
|
|
23
27
|
"parameters": [
|
|
24
28
|
{
|
|
25
29
|
"name": "organizationId",
|
|
26
30
|
"in": "path",
|
|
31
|
+
"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
32
|
"required": true,
|
|
28
33
|
"style": "simple",
|
|
29
34
|
"explode": false,
|
|
30
35
|
"schema": {
|
|
31
36
|
"$ref": "#/components/schemas/OrganizationId"
|
|
32
|
-
}
|
|
37
|
+
},
|
|
38
|
+
"example": "f_ecom_zzxy_prd"
|
|
33
39
|
},
|
|
34
40
|
{
|
|
35
41
|
"name": "siteId",
|
|
36
42
|
"in": "query",
|
|
43
|
+
"description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
|
|
37
44
|
"required": true,
|
|
38
45
|
"style": "form",
|
|
39
46
|
"explode": true,
|
|
40
47
|
"schema": {
|
|
41
48
|
"$ref": "#/components/schemas/SiteId"
|
|
49
|
+
},
|
|
50
|
+
"examples": {
|
|
51
|
+
"SiteId": {
|
|
52
|
+
"value": "RefArch"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "sfdc_usid",
|
|
58
|
+
"in": "header",
|
|
59
|
+
"description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
|
|
60
|
+
"required": false,
|
|
61
|
+
"style": "simple",
|
|
62
|
+
"explode": false,
|
|
63
|
+
"schema": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"format": "uuid",
|
|
66
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "sfdc_shopper_context",
|
|
71
|
+
"in": "header",
|
|
72
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
73
|
+
"required": false,
|
|
74
|
+
"style": "simple",
|
|
75
|
+
"explode": false,
|
|
76
|
+
"schema": {
|
|
77
|
+
"type": "string"
|
|
42
78
|
}
|
|
43
79
|
}
|
|
44
80
|
],
|
|
@@ -47,6 +83,11 @@
|
|
|
47
83
|
"application/json": {
|
|
48
84
|
"schema": {
|
|
49
85
|
"$ref": "#/components/schemas/SessionInitRequest"
|
|
86
|
+
},
|
|
87
|
+
"examples": {
|
|
88
|
+
"ShopperAgentsSessionInitRequest": {
|
|
89
|
+
"$ref": "#/components/examples/ShopperAgentsSessionInitRequest"
|
|
90
|
+
}
|
|
50
91
|
}
|
|
51
92
|
}
|
|
52
93
|
},
|
|
@@ -62,6 +103,11 @@
|
|
|
62
103
|
"application/problem+json": {
|
|
63
104
|
"schema": {
|
|
64
105
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
106
|
+
},
|
|
107
|
+
"examples": {
|
|
108
|
+
"ValidationError": {
|
|
109
|
+
"$ref": "#/components/examples/ValidationError"
|
|
110
|
+
}
|
|
65
111
|
}
|
|
66
112
|
}
|
|
67
113
|
}
|
|
@@ -72,6 +118,11 @@
|
|
|
72
118
|
"application/problem+json": {
|
|
73
119
|
"schema": {
|
|
74
120
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
121
|
+
},
|
|
122
|
+
"examples": {
|
|
123
|
+
"Unauthorized": {
|
|
124
|
+
"$ref": "#/components/examples/InvalidBasicAuth"
|
|
125
|
+
}
|
|
75
126
|
}
|
|
76
127
|
}
|
|
77
128
|
}
|
|
@@ -82,6 +133,11 @@
|
|
|
82
133
|
"application/problem+json": {
|
|
83
134
|
"schema": {
|
|
84
135
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
136
|
+
},
|
|
137
|
+
"examples": {
|
|
138
|
+
"ReadError": {
|
|
139
|
+
"$ref": "#/components/examples/InternalServerError"
|
|
140
|
+
}
|
|
85
141
|
}
|
|
86
142
|
}
|
|
87
143
|
}
|
|
@@ -92,6 +148,11 @@
|
|
|
92
148
|
"ShopperToken": [
|
|
93
149
|
"sfcc.shopper-agents.rw"
|
|
94
150
|
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"ShopperClientContextToken": [
|
|
154
|
+
"sfcc.shopper-agents.rw"
|
|
155
|
+
]
|
|
95
156
|
}
|
|
96
157
|
]
|
|
97
158
|
}
|
|
@@ -101,10 +162,14 @@
|
|
|
101
162
|
"schemas": {
|
|
102
163
|
"OrganizationId": {
|
|
103
164
|
"type": "string",
|
|
165
|
+
"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).",
|
|
166
|
+
"example": "f_ecom_zzxy_prd",
|
|
104
167
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
105
168
|
},
|
|
106
169
|
"SiteId": {
|
|
107
170
|
"type": "string",
|
|
171
|
+
"description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites",
|
|
172
|
+
"example": "RefArch",
|
|
108
173
|
"maxLength": 32,
|
|
109
174
|
"minLength": 1
|
|
110
175
|
},
|
|
@@ -114,6 +179,8 @@
|
|
|
114
179
|
"properties": {
|
|
115
180
|
"sessionInitKey": {
|
|
116
181
|
"type": "string",
|
|
182
|
+
"description": "The session initialization key that is is obtained when beginning an Agentforce session, and is then used to initialize the session.",
|
|
183
|
+
"example": "aPrx.0rn0R1k7G.PtUUXh6S90_rMvqsYhpDZlNpyYsLsTm8KYLodM3flsRBbCD",
|
|
117
184
|
"maxLength": 256,
|
|
118
185
|
"minLength": 1
|
|
119
186
|
}
|
|
@@ -125,17 +192,25 @@
|
|
|
125
192
|
"properties": {
|
|
126
193
|
"title": {
|
|
127
194
|
"type": "string",
|
|
195
|
+
"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",
|
|
196
|
+
"example": "You do not have enough credit",
|
|
128
197
|
"maxLength": 256
|
|
129
198
|
},
|
|
130
199
|
"type": {
|
|
131
200
|
"type": "string",
|
|
201
|
+
"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",
|
|
202
|
+
"example": "NotEnoughMoney",
|
|
132
203
|
"maxLength": 2048
|
|
133
204
|
},
|
|
134
205
|
"detail": {
|
|
135
|
-
"type": "string"
|
|
206
|
+
"type": "string",
|
|
207
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
208
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
136
209
|
},
|
|
137
210
|
"instance": {
|
|
138
211
|
"type": "string",
|
|
212
|
+
"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",
|
|
213
|
+
"example": "/account/12345/msgs/abc",
|
|
139
214
|
"maxLength": 2048
|
|
140
215
|
}
|
|
141
216
|
},
|
|
@@ -150,27 +225,88 @@
|
|
|
150
225
|
"organizationId": {
|
|
151
226
|
"name": "organizationId",
|
|
152
227
|
"in": "path",
|
|
228
|
+
"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).",
|
|
153
229
|
"required": true,
|
|
154
230
|
"style": "simple",
|
|
155
231
|
"explode": false,
|
|
156
232
|
"schema": {
|
|
157
233
|
"$ref": "#/components/schemas/OrganizationId"
|
|
158
|
-
}
|
|
234
|
+
},
|
|
235
|
+
"example": "f_ecom_zzxy_prd"
|
|
159
236
|
},
|
|
160
237
|
"siteId": {
|
|
161
238
|
"name": "siteId",
|
|
162
239
|
"in": "query",
|
|
240
|
+
"description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
|
|
163
241
|
"required": true,
|
|
164
242
|
"style": "form",
|
|
165
243
|
"explode": true,
|
|
166
244
|
"schema": {
|
|
167
245
|
"$ref": "#/components/schemas/SiteId"
|
|
246
|
+
},
|
|
247
|
+
"examples": {
|
|
248
|
+
"SiteId": {
|
|
249
|
+
"value": "RefArch"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
"sfdcUsid": {
|
|
254
|
+
"name": "sfdc_usid",
|
|
255
|
+
"in": "header",
|
|
256
|
+
"description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
|
|
257
|
+
"required": false,
|
|
258
|
+
"style": "simple",
|
|
259
|
+
"explode": false,
|
|
260
|
+
"schema": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"format": "uuid",
|
|
263
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"sfdcShopperContext": {
|
|
267
|
+
"name": "sfdc_shopper_context",
|
|
268
|
+
"in": "header",
|
|
269
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
270
|
+
"required": false,
|
|
271
|
+
"style": "simple",
|
|
272
|
+
"explode": false,
|
|
273
|
+
"schema": {
|
|
274
|
+
"type": "string"
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"examples": {
|
|
279
|
+
"ShopperAgentsSessionInitRequest": {
|
|
280
|
+
"value": {
|
|
281
|
+
"sessionInitKey": "aPrx.0rn0R1k7G.PtUUXh6S90_rMvqsYhpDZlNpyYsLsTm8KYLodM3flsRBbCD"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"ValidationError": {
|
|
285
|
+
"value": {
|
|
286
|
+
"title": "Validation Error",
|
|
287
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
|
|
288
|
+
"detail": "Unable to validate post body."
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"InvalidBasicAuth": {
|
|
292
|
+
"value": {
|
|
293
|
+
"title": "Invalid Basic Authentication",
|
|
294
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
295
|
+
"detail": "Your access token is invalid or expired and can’t be used to identify a user."
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"InternalServerError": {
|
|
299
|
+
"value": {
|
|
300
|
+
"title": "Internal Server Error",
|
|
301
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/internal-server-error",
|
|
302
|
+
"detail": "Unexpected server-side exception during SLAS authentication."
|
|
168
303
|
}
|
|
169
304
|
}
|
|
170
305
|
},
|
|
171
306
|
"securitySchemes": {
|
|
172
307
|
"ShopperToken": {
|
|
173
308
|
"type": "oauth2",
|
|
309
|
+
"description": "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the B2C Commerce Shopper API endpoints. \n",
|
|
174
310
|
"flows": {
|
|
175
311
|
"clientCredentials": {
|
|
176
312
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
|
|
@@ -179,13 +315,25 @@
|
|
|
179
315
|
}
|
|
180
316
|
},
|
|
181
317
|
"authorizationCode": {
|
|
182
|
-
"authorizationUrl": "https://{
|
|
183
|
-
"tokenUrl": "https://{
|
|
318
|
+
"authorizationUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/authorize",
|
|
319
|
+
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
|
|
184
320
|
"scopes": {
|
|
185
321
|
"sfcc.shopper-agents.rw": "Allows read/write operations on shopper agents"
|
|
186
322
|
}
|
|
187
323
|
}
|
|
188
324
|
}
|
|
325
|
+
},
|
|
326
|
+
"ShopperClientContextToken": {
|
|
327
|
+
"type": "oauth2",
|
|
328
|
+
"description": "ShopperClientContextToken is a separate security scheme used to track and validate client context information.\nIt is valid for Guest shoppers flows only using SLAS private clients. For registered shoppers, use existing ShopperToken flows.\nFor authentication details, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nThis token allows access to Shopper API endpoints for guest shoppers only.\n",
|
|
329
|
+
"flows": {
|
|
330
|
+
"clientCredentials": {
|
|
331
|
+
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",
|
|
332
|
+
"scopes": {
|
|
333
|
+
"sfcc.shopper-agents.rw": "Allows read/write operations on shopper agents."
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
189
337
|
}
|
|
190
338
|
}
|
|
191
339
|
}
|