@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
package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Shopper Delivery Estimates",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-delivery-estimates/shopper-delivery-estimates-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Delivery Estimates API to retrieve carrier-calculated delivery date ranges for a single product at a destination postal code. The API is intended for product detail pages (PDP) where shoppers want to know when an item will arrive before adding it to a basket.\n\nFor the requested product, the platform enumerates the site's applicable shipping methods. Estimates are returned only when the `sfcc.app.shipping.estimate` hook is bound to a provider via an installed Commerce App; if no provider is bound, the platform returns no estimates.\n\nThe Shopper Delivery Estimates API is currently uncached. The URL is deterministic in `productIds`, `postalCode`, and `countryCode`, and will utilize a cache layer in the future.\n\n## Authentication & Authorization\n\nThe Shopper Delivery Estimates API requires a shopper access token.\n\nFor details on how to request an access token, see [Get a Shopper Token from SLAS](https://developer.salesforce.com/docs/commerce/commerce-api/guide/slas.html).\n\nYou must include `sfcc.shopper-delivery-estimates` and `sfcc.shopper-standard` in the client ID used to generate the token. For a full list of permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Customization\n\n### Hooks\n\nFor details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Response Details\n\n### Personalization\n\nResponses from this API are not personalized via the Shopper Context API.\n\n### Caching\n\nResponses from this API are not cached. The endpoint is currently uncached even though request URLs are deterministic for `productIds`, `postalCode`, and `countryCode`; a cache layer is planned for a future release. For details, see [Server-Side Web-Tier Caching.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/server-side-web-tier-caching.html)\n\n### Timeouts\n\nShopper API requests must respond within 10 seconds, including any hook execution. 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### Show \"Arrives by\" on a Product Detail Page\n\nUse this API on the PDP after a shopper enters postal code and country. The response provides delivery windows by applicable shipping method so you can display messaging such as \"Arrives Fri, Oct 4.\"\n\n```bash\ncurl -X GET \\\n \"https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-delivery-estimates/v1/organizations/{organizationId}/delivery-estimates?siteId={siteId}&productIds={productId}&postalCode=94105&countryCode=US\" \\\n -H \"Authorization: Bearer {shopper_access_token}\" \\\n -H \"Content-Type: application/json\" \\\n -H \"correlation-id: pdp-delivery-estimate-001\"\n```\n\n### Choose Which Shipping Methods to Highlight\n\nThe response includes one entry per applicable shipping method for each product. If a method is deliverable, use the `deliveryWindow`; if it is not deliverable, use `nonDeliverableReason` to suppress or de-prioritize that method in your UI.\n\n### Hide the Estimate Module When No Estimates Are Available\n\nIf `productDeliveryEstimates` is empty, no estimates are available for requested products (for example, no applicable shipping methods or no provider response). In that case, hide the delivery estimate component to avoid showing incomplete or misleading delivery messaging.\n\n## Best Practices\n\n- Keep calls scoped to PDP interactions, since the endpoint is currently uncached.\n- Respect the current one-product constraint (`productIds` currently supports one product per request) and avoid batching assumptions until multi-product support is released.\n- Gracefully handle partial availability by rendering only methods with delivery windows and clearly handling non-deliverable methods.\n- Ensure the `sfcc.app.shipping.estimate` hook is bound to a provider via an installed Commerce App — without a bound provider, no estimates are returned. Validate hook performance and timeout behavior to stay within the 10-second Shopper API limit.\n- Always include a `correlation-id` header for easier production troubleshooting.\n\n## Related APIs\n\nThis API is commonly used with SLAS token APIs for shopper authentication and Shopper Products APIs for PDP data retrieval.",
|
|
6
|
+
"version": "1.2.2",
|
|
6
7
|
"x-api-type": "Shopper",
|
|
7
8
|
"x-api-family": "Product"
|
|
8
9
|
},
|
|
@@ -19,93 +20,102 @@
|
|
|
19
20
|
"paths": {
|
|
20
21
|
"/organizations/{organizationId}/delivery-estimates": {
|
|
21
22
|
"get": {
|
|
23
|
+
"summary": "Returns delivery date estimates for the requested product.",
|
|
24
|
+
"description": "Returns delivery date estimates for the requested products at a destination postal code. Currently limited to one product per request. For each requested product, the platform enumerates all applicable site-level shipping methods. Estimates are returned only when the `sfcc.app.shipping.estimate` Commerce Apps hook is bound to a provider. If no provider is bound, the platform returns no estimates.\nEach entry in the response corresponds to one requested product, and contains one entry per applicable shipping method. Methods for which the provider returned an estimate carry a `deliveryWindow`. Methods for which the provider could not return an estimate include a `nonDeliverableReason`. An empty `productDeliveryEstimates` array means the platform has no estimates for any of the requested products, for example, no applicable shipping methods or the provider returned no results. In this case, clients should hide the delivery estimation block.",
|
|
22
25
|
"operationId": "getDeliveryEstimates",
|
|
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": "productIds",
|
|
36
41
|
"in": "query",
|
|
42
|
+
"description": "The IDs of the products for which to retrieve delivery estimates. Each product must be online and site-assigned. Currently limited to one ID per request; multi-product support is reserved for a future release.",
|
|
37
43
|
"required": true,
|
|
38
44
|
"style": "form",
|
|
39
45
|
"explode": false,
|
|
40
46
|
"schema": {
|
|
41
47
|
"type": "array",
|
|
48
|
+
"example": [
|
|
49
|
+
"apple-ipod-shuffle"
|
|
50
|
+
],
|
|
42
51
|
"items": {
|
|
43
52
|
"$ref": "#/components/schemas/ProductId"
|
|
44
53
|
},
|
|
45
54
|
"maxItems": 1,
|
|
46
55
|
"minItems": 1
|
|
47
|
-
}
|
|
56
|
+
},
|
|
57
|
+
"example": "apple-ipod-shuffle"
|
|
48
58
|
},
|
|
49
59
|
{
|
|
50
60
|
"name": "postalCode",
|
|
51
61
|
"in": "query",
|
|
62
|
+
"description": "The destination postal code for which to compute delivery estimates. Format depends on the destination country (for example, a 5-digit ZIP for US, a 6-character alphanumeric code for CA).",
|
|
52
63
|
"required": true,
|
|
53
64
|
"style": "form",
|
|
54
65
|
"explode": true,
|
|
55
66
|
"schema": {
|
|
56
67
|
"type": "string",
|
|
68
|
+
"example": "10001",
|
|
57
69
|
"maxLength": 20,
|
|
58
70
|
"minLength": 1
|
|
59
|
-
}
|
|
71
|
+
},
|
|
72
|
+
"example": "10001"
|
|
60
73
|
},
|
|
61
74
|
{
|
|
62
75
|
"name": "countryCode",
|
|
63
76
|
"in": "query",
|
|
77
|
+
"description": "The destination country as an ISO 3166-1 alpha-2 country code (for example, `US`, `CA`, `GB`). Required for unambiguous resolution of the destination — postal codes are not globally unique.",
|
|
64
78
|
"required": true,
|
|
65
79
|
"style": "form",
|
|
66
80
|
"explode": true,
|
|
67
81
|
"schema": {
|
|
68
82
|
"$ref": "#/components/schemas/CountryCode"
|
|
69
|
-
}
|
|
83
|
+
},
|
|
84
|
+
"example": "US"
|
|
70
85
|
},
|
|
71
86
|
{
|
|
72
87
|
"name": "siteId",
|
|
73
88
|
"in": "query",
|
|
89
|
+
"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.",
|
|
74
90
|
"required": true,
|
|
75
91
|
"style": "form",
|
|
76
92
|
"explode": true,
|
|
77
93
|
"schema": {
|
|
78
94
|
"$ref": "#/components/schemas/SiteId"
|
|
95
|
+
},
|
|
96
|
+
"examples": {
|
|
97
|
+
"SiteId": {
|
|
98
|
+
"value": "RefArch"
|
|
99
|
+
}
|
|
79
100
|
}
|
|
80
101
|
},
|
|
81
102
|
{
|
|
82
103
|
"name": "sfdc_usid",
|
|
83
104
|
"in": "header",
|
|
105
|
+
"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.",
|
|
84
106
|
"required": false,
|
|
85
107
|
"style": "simple",
|
|
86
108
|
"explode": false,
|
|
87
109
|
"schema": {
|
|
88
110
|
"type": "string",
|
|
89
|
-
"format": "uuid"
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"name": "sfdc_dw_dnt",
|
|
94
|
-
"in": "header",
|
|
95
|
-
"required": false,
|
|
96
|
-
"style": "simple",
|
|
97
|
-
"explode": false,
|
|
98
|
-
"schema": {
|
|
99
|
-
"type": "string",
|
|
100
|
-
"enum": [
|
|
101
|
-
"0",
|
|
102
|
-
"1"
|
|
103
|
-
]
|
|
111
|
+
"format": "uuid",
|
|
112
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
104
113
|
}
|
|
105
114
|
},
|
|
106
115
|
{
|
|
107
116
|
"name": "personalized",
|
|
108
117
|
"in": "query",
|
|
118
|
+
"description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
|
|
109
119
|
"required": false,
|
|
110
120
|
"style": "form",
|
|
111
121
|
"explode": true,
|
|
@@ -113,12 +123,14 @@
|
|
|
113
123
|
"type": "string",
|
|
114
124
|
"enum": [
|
|
115
125
|
"none"
|
|
116
|
-
]
|
|
126
|
+
],
|
|
127
|
+
"example": "none"
|
|
117
128
|
}
|
|
118
129
|
},
|
|
119
130
|
{
|
|
120
131
|
"name": "sfdc_shopper_context",
|
|
121
132
|
"in": "header",
|
|
133
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
122
134
|
"required": false,
|
|
123
135
|
"style": "simple",
|
|
124
136
|
"explode": false,
|
|
@@ -134,6 +146,17 @@
|
|
|
134
146
|
"application/json": {
|
|
135
147
|
"schema": {
|
|
136
148
|
"$ref": "#/components/schemas/DeliveryEstimatesResult"
|
|
149
|
+
},
|
|
150
|
+
"examples": {
|
|
151
|
+
"GetDeliveryEstimatesResponseExample": {
|
|
152
|
+
"$ref": "#/components/examples/GetDeliveryEstimatesResponseExample"
|
|
153
|
+
},
|
|
154
|
+
"GetDeliveryEstimatesPartialResponseExample": {
|
|
155
|
+
"$ref": "#/components/examples/GetDeliveryEstimatesPartialResponseExample"
|
|
156
|
+
},
|
|
157
|
+
"GetDeliveryEstimatesEmptyResponseExample": {
|
|
158
|
+
"$ref": "#/components/examples/GetDeliveryEstimatesEmptyResponseExample"
|
|
159
|
+
}
|
|
137
160
|
}
|
|
138
161
|
}
|
|
139
162
|
}
|
|
@@ -144,6 +167,11 @@
|
|
|
144
167
|
"application/problem+json": {
|
|
145
168
|
"schema": {
|
|
146
169
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
170
|
+
},
|
|
171
|
+
"examples": {
|
|
172
|
+
"GetDeliveryEstimatesBadRequestResponseExample": {
|
|
173
|
+
"$ref": "#/components/examples/GetDeliveryEstimatesBadRequestResponseExample"
|
|
174
|
+
}
|
|
147
175
|
}
|
|
148
176
|
}
|
|
149
177
|
}
|
|
@@ -157,6 +185,11 @@
|
|
|
157
185
|
"application/problem+json": {
|
|
158
186
|
"schema": {
|
|
159
187
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
188
|
+
},
|
|
189
|
+
"examples": {
|
|
190
|
+
"GetDeliveryEstimatesProductNotFoundResponseExample": {
|
|
191
|
+
"$ref": "#/components/examples/GetDeliveryEstimatesProductNotFoundResponseExample"
|
|
192
|
+
}
|
|
160
193
|
}
|
|
161
194
|
}
|
|
162
195
|
}
|
|
@@ -183,27 +216,38 @@
|
|
|
183
216
|
"schemas": {
|
|
184
217
|
"OrganizationId": {
|
|
185
218
|
"type": "string",
|
|
219
|
+
"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).",
|
|
220
|
+
"example": "f_ecom_zzxy_prd",
|
|
186
221
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
187
222
|
},
|
|
188
223
|
"ProductId": {
|
|
189
224
|
"type": "string",
|
|
225
|
+
"description": "The id (SKU) of the product.",
|
|
226
|
+
"example": "apple-ipod-classic",
|
|
190
227
|
"maxLength": 100,
|
|
191
228
|
"minLength": 1
|
|
192
229
|
},
|
|
193
230
|
"CountryCode": {
|
|
194
231
|
"type": "string",
|
|
232
|
+
"description": "A two letter uppercase country code conforming to the [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 standard.",
|
|
233
|
+
"example": "US",
|
|
195
234
|
"pattern": "^[A-Z][A-Z]$"
|
|
196
235
|
},
|
|
197
236
|
"SiteId": {
|
|
198
237
|
"type": "string",
|
|
238
|
+
"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",
|
|
239
|
+
"example": "RefArch",
|
|
199
240
|
"maxLength": 32,
|
|
200
241
|
"minLength": 1
|
|
201
242
|
},
|
|
202
243
|
"Destination": {
|
|
203
244
|
"type": "object",
|
|
245
|
+
"description": "The normalized destination used for estimation. Echoes the values supplied on the request.",
|
|
204
246
|
"properties": {
|
|
205
247
|
"postalCode": {
|
|
206
248
|
"type": "string",
|
|
249
|
+
"description": "The destination postal code.",
|
|
250
|
+
"example": "10001",
|
|
207
251
|
"maxLength": 20,
|
|
208
252
|
"minLength": 1
|
|
209
253
|
},
|
|
@@ -212,7 +256,8 @@
|
|
|
212
256
|
{
|
|
213
257
|
"$ref": "#/components/schemas/CountryCode"
|
|
214
258
|
}
|
|
215
|
-
]
|
|
259
|
+
],
|
|
260
|
+
"description": "The destination country as an ISO 3166-1 alpha-2 code."
|
|
216
261
|
}
|
|
217
262
|
},
|
|
218
263
|
"required": [
|
|
@@ -222,18 +267,25 @@
|
|
|
222
267
|
},
|
|
223
268
|
"CurrencyCode": {
|
|
224
269
|
"type": "string",
|
|
270
|
+
"description": "A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.",
|
|
271
|
+
"example": "USD",
|
|
225
272
|
"pattern": "^([A-Z][A-Z][A-Z]|N/A)$"
|
|
226
273
|
},
|
|
227
274
|
"DeliveryWindow": {
|
|
228
275
|
"type": "object",
|
|
276
|
+
"description": "A time window during which the delivery is expected. Both endpoints are sub-day RFC 3339 timestamps passed through unmodified from the underlying provider.",
|
|
229
277
|
"properties": {
|
|
230
278
|
"startAt": {
|
|
231
279
|
"type": "string",
|
|
232
|
-
"format": "date-time"
|
|
280
|
+
"format": "date-time",
|
|
281
|
+
"description": "The earliest expected delivery timestamp (inclusive).",
|
|
282
|
+
"example": "2026-04-30T14:00:00Z"
|
|
233
283
|
},
|
|
234
284
|
"endAt": {
|
|
235
285
|
"type": "string",
|
|
236
|
-
"format": "date-time"
|
|
286
|
+
"format": "date-time",
|
|
287
|
+
"description": "The latest expected delivery timestamp (inclusive).",
|
|
288
|
+
"example": "2026-04-30T18:00:00Z"
|
|
237
289
|
}
|
|
238
290
|
},
|
|
239
291
|
"required": [
|
|
@@ -243,30 +295,41 @@
|
|
|
243
295
|
},
|
|
244
296
|
"ShippingOption": {
|
|
245
297
|
"type": "object",
|
|
298
|
+
"description": "A delivery estimate for one applicable shipping method. When the provider answered with a delivery window, `deliveryWindow` is populated and `nonDeliverableReason` is omitted. When the provider answered \"cannot deliver via this method\", `deliveryWindow` is omitted and `nonDeliverableReason` is populated.",
|
|
246
299
|
"properties": {
|
|
247
300
|
"shippingMethodId": {
|
|
248
301
|
"type": "string",
|
|
302
|
+
"description": "The identifier of the shipping method (matches the B2C Commerce `ShippingMethod.ID`).",
|
|
303
|
+
"example": "GroundShipping",
|
|
249
304
|
"maxLength": 256,
|
|
250
305
|
"minLength": 1
|
|
251
306
|
},
|
|
252
307
|
"name": {
|
|
253
308
|
"type": "string",
|
|
309
|
+
"description": "The localized name of the shipping method.",
|
|
310
|
+
"example": "Ground",
|
|
254
311
|
"maxLength": 256,
|
|
255
312
|
"minLength": 1
|
|
256
313
|
},
|
|
257
314
|
"description": {
|
|
258
315
|
"type": "string",
|
|
316
|
+
"description": "The localized description of the shipping method.",
|
|
317
|
+
"example": "Standard ground shipping",
|
|
259
318
|
"maxLength": 4000,
|
|
260
319
|
"minLength": 1
|
|
261
320
|
},
|
|
262
321
|
"carrier": {
|
|
263
322
|
"type": "string",
|
|
323
|
+
"description": "The carrier the provider resolved for this shipping method (for example, `UPS`, `FedEx`, `USPS`). May be omitted when the provider cannot or does not identify a single carrier.",
|
|
324
|
+
"example": "UPS",
|
|
264
325
|
"maxLength": 256,
|
|
265
326
|
"minLength": 1
|
|
266
327
|
},
|
|
267
328
|
"price": {
|
|
268
329
|
"type": "number",
|
|
269
330
|
"format": "double",
|
|
331
|
+
"description": "The estimated shipping cost for this shipping method, in the currency given by `currency`. May be omitted when the provider cannot or does not return a price.",
|
|
332
|
+
"example": 5.99,
|
|
270
333
|
"minimum": 0
|
|
271
334
|
},
|
|
272
335
|
"currency": {
|
|
@@ -274,21 +337,27 @@
|
|
|
274
337
|
{
|
|
275
338
|
"$ref": "#/components/schemas/CurrencyCode"
|
|
276
339
|
}
|
|
277
|
-
]
|
|
340
|
+
],
|
|
341
|
+
"description": "The ISO 4217 currency code for `price`. Defaults to the site's default currency. Omitted when `price` is omitted."
|
|
278
342
|
},
|
|
279
343
|
"deliveryWindow": {
|
|
280
344
|
"allOf": [
|
|
281
345
|
{
|
|
282
346
|
"$ref": "#/components/schemas/DeliveryWindow"
|
|
283
347
|
}
|
|
284
|
-
]
|
|
348
|
+
],
|
|
349
|
+
"description": "The estimated delivery window for this shipping method. Omitted when `nonDeliverableReason` is set."
|
|
285
350
|
},
|
|
286
351
|
"orderCutoffAt": {
|
|
287
352
|
"type": "string",
|
|
288
|
-
"format": "date-time"
|
|
353
|
+
"format": "date-time",
|
|
354
|
+
"description": "The latest timestamp by which an order must be placed for the `deliveryWindow` to apply. Clients compare this to the current time to decide whether the estimate is still valid. Omitted when not applicable. Sub-day RFC 3339 precision.",
|
|
355
|
+
"example": "2026-04-27T14:00:00Z"
|
|
289
356
|
},
|
|
290
357
|
"nonDeliverableReason": {
|
|
291
358
|
"type": "string",
|
|
359
|
+
"description": "A SCREAMING_SNAKE_CASE code identifying why the provider could not deliver via this shipping method. This is not localized and not intended to be shown directly to shoppers. This field may be omitted when the provider cannot or does not identify a single reason. Provider implementations may emit additional codes. Omitted when `deliveryWindow` is set.",
|
|
360
|
+
"example": "INSUFFICIENT_INVENTORY",
|
|
292
361
|
"maxLength": 256,
|
|
293
362
|
"minLength": 1
|
|
294
363
|
}
|
|
@@ -299,6 +368,7 @@
|
|
|
299
368
|
},
|
|
300
369
|
"ProductDeliveryEstimate": {
|
|
301
370
|
"type": "object",
|
|
371
|
+
"description": "Delivery estimates for one product at a destination, broken down by applicable shipping method.",
|
|
302
372
|
"properties": {
|
|
303
373
|
"productId": {
|
|
304
374
|
"$ref": "#/components/schemas/ProductId"
|
|
@@ -308,6 +378,7 @@
|
|
|
308
378
|
},
|
|
309
379
|
"shippingOptions": {
|
|
310
380
|
"type": "array",
|
|
381
|
+
"description": "The array of shipping method estimates for the product at the destination. Each entry corresponds to one applicable shipping method.",
|
|
311
382
|
"items": {
|
|
312
383
|
"$ref": "#/components/schemas/ShippingOption"
|
|
313
384
|
}
|
|
@@ -321,9 +392,11 @@
|
|
|
321
392
|
},
|
|
322
393
|
"DeliveryEstimatesResult": {
|
|
323
394
|
"type": "object",
|
|
395
|
+
"description": "Result document containing per-product delivery estimates.",
|
|
324
396
|
"properties": {
|
|
325
397
|
"productDeliveryEstimates": {
|
|
326
398
|
"type": "array",
|
|
399
|
+
"description": "The array of per-product delivery estimate entries, one per requested product that has estimates. The array is empty when the platform has no estimates for any of the requested products.",
|
|
327
400
|
"items": {
|
|
328
401
|
"$ref": "#/components/schemas/ProductDeliveryEstimate"
|
|
329
402
|
}
|
|
@@ -339,17 +412,25 @@
|
|
|
339
412
|
"properties": {
|
|
340
413
|
"title": {
|
|
341
414
|
"type": "string",
|
|
415
|
+
"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",
|
|
416
|
+
"example": "You do not have enough credit",
|
|
342
417
|
"maxLength": 256
|
|
343
418
|
},
|
|
344
419
|
"type": {
|
|
345
420
|
"type": "string",
|
|
421
|
+
"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",
|
|
422
|
+
"example": "NotEnoughMoney",
|
|
346
423
|
"maxLength": 2048
|
|
347
424
|
},
|
|
348
425
|
"detail": {
|
|
349
|
-
"type": "string"
|
|
426
|
+
"type": "string",
|
|
427
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
428
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
350
429
|
},
|
|
351
430
|
"instance": {
|
|
352
431
|
"type": "string",
|
|
432
|
+
"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",
|
|
433
|
+
"example": "/account/12345/msgs/abc",
|
|
353
434
|
"maxLength": 2048
|
|
354
435
|
}
|
|
355
436
|
},
|
|
@@ -367,6 +448,11 @@
|
|
|
367
448
|
"application/problem+json": {
|
|
368
449
|
"schema": {
|
|
369
450
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
451
|
+
},
|
|
452
|
+
"examples": {
|
|
453
|
+
"UnauthorizedExample": {
|
|
454
|
+
"$ref": "#/components/examples/UnauthorizedExample"
|
|
455
|
+
}
|
|
370
456
|
}
|
|
371
457
|
}
|
|
372
458
|
}
|
|
@@ -376,88 +462,95 @@
|
|
|
376
462
|
"organizationId": {
|
|
377
463
|
"name": "organizationId",
|
|
378
464
|
"in": "path",
|
|
465
|
+
"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).",
|
|
379
466
|
"required": true,
|
|
380
467
|
"style": "simple",
|
|
381
468
|
"explode": false,
|
|
382
469
|
"schema": {
|
|
383
470
|
"$ref": "#/components/schemas/OrganizationId"
|
|
384
|
-
}
|
|
471
|
+
},
|
|
472
|
+
"example": "f_ecom_zzxy_prd"
|
|
385
473
|
},
|
|
386
474
|
"productIds": {
|
|
387
475
|
"name": "productIds",
|
|
388
476
|
"in": "query",
|
|
477
|
+
"description": "The IDs of the products for which to retrieve delivery estimates. Each product must be online and site-assigned. Currently limited to one ID per request; multi-product support is reserved for a future release.",
|
|
389
478
|
"required": true,
|
|
390
479
|
"style": "form",
|
|
391
480
|
"explode": false,
|
|
392
481
|
"schema": {
|
|
393
482
|
"type": "array",
|
|
483
|
+
"example": [
|
|
484
|
+
"apple-ipod-shuffle"
|
|
485
|
+
],
|
|
394
486
|
"items": {
|
|
395
487
|
"$ref": "#/components/schemas/ProductId"
|
|
396
488
|
},
|
|
397
489
|
"maxItems": 1,
|
|
398
490
|
"minItems": 1
|
|
399
|
-
}
|
|
491
|
+
},
|
|
492
|
+
"example": "apple-ipod-shuffle"
|
|
400
493
|
},
|
|
401
494
|
"postalCode": {
|
|
402
495
|
"name": "postalCode",
|
|
403
496
|
"in": "query",
|
|
497
|
+
"description": "The destination postal code for which to compute delivery estimates. Format depends on the destination country (for example, a 5-digit ZIP for US, a 6-character alphanumeric code for CA).",
|
|
404
498
|
"required": true,
|
|
405
499
|
"style": "form",
|
|
406
500
|
"explode": true,
|
|
407
501
|
"schema": {
|
|
408
502
|
"type": "string",
|
|
503
|
+
"example": "10001",
|
|
409
504
|
"maxLength": 20,
|
|
410
505
|
"minLength": 1
|
|
411
|
-
}
|
|
506
|
+
},
|
|
507
|
+
"example": "10001"
|
|
412
508
|
},
|
|
413
509
|
"countryCode": {
|
|
414
510
|
"name": "countryCode",
|
|
415
511
|
"in": "query",
|
|
512
|
+
"description": "The destination country as an ISO 3166-1 alpha-2 country code (for example, `US`, `CA`, `GB`). Required for unambiguous resolution of the destination — postal codes are not globally unique.",
|
|
416
513
|
"required": true,
|
|
417
514
|
"style": "form",
|
|
418
515
|
"explode": true,
|
|
419
516
|
"schema": {
|
|
420
517
|
"$ref": "#/components/schemas/CountryCode"
|
|
421
|
-
}
|
|
518
|
+
},
|
|
519
|
+
"example": "US"
|
|
422
520
|
},
|
|
423
521
|
"siteId": {
|
|
424
522
|
"name": "siteId",
|
|
425
523
|
"in": "query",
|
|
524
|
+
"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.",
|
|
426
525
|
"required": true,
|
|
427
526
|
"style": "form",
|
|
428
527
|
"explode": true,
|
|
429
528
|
"schema": {
|
|
430
529
|
"$ref": "#/components/schemas/SiteId"
|
|
530
|
+
},
|
|
531
|
+
"examples": {
|
|
532
|
+
"SiteId": {
|
|
533
|
+
"value": "RefArch"
|
|
534
|
+
}
|
|
431
535
|
}
|
|
432
536
|
},
|
|
433
537
|
"sfdcUsid": {
|
|
434
538
|
"name": "sfdc_usid",
|
|
435
539
|
"in": "header",
|
|
540
|
+
"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.",
|
|
436
541
|
"required": false,
|
|
437
542
|
"style": "simple",
|
|
438
543
|
"explode": false,
|
|
439
544
|
"schema": {
|
|
440
545
|
"type": "string",
|
|
441
|
-
"format": "uuid"
|
|
442
|
-
|
|
443
|
-
},
|
|
444
|
-
"sfdcDwDnt": {
|
|
445
|
-
"name": "sfdc_dw_dnt",
|
|
446
|
-
"in": "header",
|
|
447
|
-
"required": false,
|
|
448
|
-
"style": "simple",
|
|
449
|
-
"explode": false,
|
|
450
|
-
"schema": {
|
|
451
|
-
"type": "string",
|
|
452
|
-
"enum": [
|
|
453
|
-
"0",
|
|
454
|
-
"1"
|
|
455
|
-
]
|
|
546
|
+
"format": "uuid",
|
|
547
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
456
548
|
}
|
|
457
549
|
},
|
|
458
550
|
"personalized": {
|
|
459
551
|
"name": "personalized",
|
|
460
552
|
"in": "query",
|
|
553
|
+
"description": "Controls whether personalization is applied to the response. When set to `none`, the server skips applying personalization to the response.",
|
|
461
554
|
"required": false,
|
|
462
555
|
"style": "form",
|
|
463
556
|
"explode": true,
|
|
@@ -465,12 +558,14 @@
|
|
|
465
558
|
"type": "string",
|
|
466
559
|
"enum": [
|
|
467
560
|
"none"
|
|
468
|
-
]
|
|
561
|
+
],
|
|
562
|
+
"example": "none"
|
|
469
563
|
}
|
|
470
564
|
},
|
|
471
565
|
"sfdcShopperContext": {
|
|
472
566
|
"name": "sfdc_shopper_context",
|
|
473
567
|
"in": "header",
|
|
568
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
474
569
|
"required": false,
|
|
475
570
|
"style": "simple",
|
|
476
571
|
"explode": false,
|
|
@@ -479,9 +574,121 @@
|
|
|
479
574
|
}
|
|
480
575
|
}
|
|
481
576
|
},
|
|
577
|
+
"examples": {
|
|
578
|
+
"GetDeliveryEstimatesResponseExample": {
|
|
579
|
+
"summary": "Happy path — one product with two shipping options, both deliverable.",
|
|
580
|
+
"value": {
|
|
581
|
+
"productDeliveryEstimates": [
|
|
582
|
+
{
|
|
583
|
+
"productId": "apple-ipod-shuffle",
|
|
584
|
+
"destination": {
|
|
585
|
+
"postalCode": "10001",
|
|
586
|
+
"countryCode": "US"
|
|
587
|
+
},
|
|
588
|
+
"shippingOptions": [
|
|
589
|
+
{
|
|
590
|
+
"shippingMethodId": "GroundShipping",
|
|
591
|
+
"name": "Ground",
|
|
592
|
+
"description": "Standard ground shipping",
|
|
593
|
+
"carrier": "UPS",
|
|
594
|
+
"price": 5.99,
|
|
595
|
+
"currency": "USD",
|
|
596
|
+
"deliveryWindow": {
|
|
597
|
+
"startAt": "2026-04-30T14:00:00Z",
|
|
598
|
+
"endAt": "2026-04-30T18:00:00Z"
|
|
599
|
+
},
|
|
600
|
+
"orderCutoffAt": "2026-04-27T14:00:00Z"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"shippingMethodId": "TwoDayShipping",
|
|
604
|
+
"name": "Two-Day",
|
|
605
|
+
"description": "Expedited air shipping",
|
|
606
|
+
"carrier": "UPS",
|
|
607
|
+
"price": 12.99,
|
|
608
|
+
"currency": "USD",
|
|
609
|
+
"deliveryWindow": {
|
|
610
|
+
"startAt": "2026-04-28T09:00:00Z",
|
|
611
|
+
"endAt": "2026-04-28T17:00:00Z"
|
|
612
|
+
},
|
|
613
|
+
"orderCutoffAt": "2026-04-26T18:00:00Z"
|
|
614
|
+
}
|
|
615
|
+
]
|
|
616
|
+
}
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
},
|
|
620
|
+
"GetDeliveryEstimatesPartialResponseExample": {
|
|
621
|
+
"summary": "One shipping option is deliverable, another is not. Methods that cannot deliver for a particular reason are kept in the response with `nonDeliverableReason` populated.",
|
|
622
|
+
"value": {
|
|
623
|
+
"productDeliveryEstimates": [
|
|
624
|
+
{
|
|
625
|
+
"productId": "apple-ipod-shuffle",
|
|
626
|
+
"destination": {
|
|
627
|
+
"postalCode": "10001",
|
|
628
|
+
"countryCode": "US"
|
|
629
|
+
},
|
|
630
|
+
"shippingOptions": [
|
|
631
|
+
{
|
|
632
|
+
"shippingMethodId": "GroundShipping",
|
|
633
|
+
"name": "Ground",
|
|
634
|
+
"description": "Standard ground shipping",
|
|
635
|
+
"carrier": "UPS",
|
|
636
|
+
"price": 5.99,
|
|
637
|
+
"currency": "USD",
|
|
638
|
+
"deliveryWindow": {
|
|
639
|
+
"startAt": "2026-04-30T14:00:00Z",
|
|
640
|
+
"endAt": "2026-04-30T18:00:00Z"
|
|
641
|
+
},
|
|
642
|
+
"orderCutoffAt": "2026-04-27T14:00:00Z"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
"shippingMethodId": "OvernightShipping",
|
|
646
|
+
"name": "Overnight",
|
|
647
|
+
"description": "Priority overnight shipping",
|
|
648
|
+
"carrier": "UPS",
|
|
649
|
+
"nonDeliverableReason": "INSUFFICIENT_INVENTORY"
|
|
650
|
+
}
|
|
651
|
+
]
|
|
652
|
+
}
|
|
653
|
+
]
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"GetDeliveryEstimatesEmptyResponseExample": {
|
|
657
|
+
"summary": "No estimates available — for example, when the provider returned an empty result.",
|
|
658
|
+
"value": {
|
|
659
|
+
"productDeliveryEstimates": []
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"GetDeliveryEstimatesBadRequestResponseExample": {
|
|
663
|
+
"summary": "A required parameter is missing or has an invalid value.",
|
|
664
|
+
"value": {
|
|
665
|
+
"title": "Bad Request",
|
|
666
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/validation",
|
|
667
|
+
"detail": "The 'postalCode' parameter is required."
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
"UnauthorizedExample": {
|
|
671
|
+
"value": {
|
|
672
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
673
|
+
"title": "Unauthorized",
|
|
674
|
+
"detail": "Unauthorized request"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
"GetDeliveryEstimatesProductNotFoundResponseExample": {
|
|
678
|
+
"summary": "The supplied `productId` does not resolve to an online, site-assigned product.",
|
|
679
|
+
"value": {
|
|
680
|
+
"title": "Product Not Found",
|
|
681
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/product-not-found",
|
|
682
|
+
"detail": "No product with ID 'apple-ipod-shuffle' for site 'SiteGenesis' could be found.",
|
|
683
|
+
"productId": "apple-ipod-shuffle",
|
|
684
|
+
"siteId": "SiteGenesis"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
482
688
|
"securitySchemes": {
|
|
483
689
|
"ShopperToken": {
|
|
484
690
|
"type": "oauth2",
|
|
691
|
+
"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 Shopper API endpoints of both OCAPI and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n",
|
|
485
692
|
"flows": {
|
|
486
693
|
"clientCredentials": {
|
|
487
694
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
|
|
@@ -502,6 +709,7 @@
|
|
|
502
709
|
},
|
|
503
710
|
"ShopperClientContextToken": {
|
|
504
711
|
"type": "oauth2",
|
|
712
|
+
"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",
|
|
505
713
|
"flows": {
|
|
506
714
|
"clientCredentials": {
|
|
507
715
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",
|