@salesforce/b2c-tooling-sdk 2.3.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/guides/enrichment.json +291 -0
- package/data/guides/index.json +426 -37
- package/data/schemas/dw.schema.json +590 -0
- package/data/tooling/index.json +18 -9
- package/dist/esm/cli/base-command.d.ts +20 -1
- package/dist/esm/cli/base-command.js +61 -11
- 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/command-search.d.ts +85 -0
- package/dist/esm/cli/command-search.js +147 -0
- package/dist/esm/cli/command-search.js.map +1 -0
- package/dist/esm/cli/config.d.ts +10 -1
- package/dist/esm/cli/config.js +18 -9
- 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/index.d.ts +2 -0
- package/dist/esm/cli/index.js +2 -0
- package/dist/esm/cli/index.js.map +1 -1
- package/dist/esm/cli/instance-command.d.ts +1 -0
- package/dist/esm/cli/instance-command.js +2 -1
- package/dist/esm/cli/instance-command.js.map +1 -1
- package/dist/esm/cli/mrt-command.d.ts +3 -2
- package/dist/esm/cli/mrt-command.js +4 -4
- package/dist/esm/cli/mrt-command.js.map +1 -1
- package/dist/esm/cli/oauth-command.d.ts +1 -0
- package/dist/esm/cli/ods-command.d.ts +1 -0
- package/dist/esm/cli/webdav-command.d.ts +1 -0
- package/dist/esm/clients/custom-apis.d.ts +36 -2
- package/dist/esm/clients/custom-apis.js +57 -4
- package/dist/esm/clients/custom-apis.js.map +1 -1
- package/dist/esm/clients/index.d.ts +1 -1
- package/dist/esm/clients/index.js +1 -1
- package/dist/esm/clients/index.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.d.ts +14 -0
- package/dist/esm/config/dw-json-schema.js +269 -0
- package/dist/esm/config/dw-json-schema.js.map +1 -0
- 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 +13 -4
- package/dist/esm/config/index.js +8 -3
- 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.d.ts +5 -0
- package/dist/esm/config/mapping.js +20 -1
- package/dist/esm/config/mapping.js.map +1 -1
- package/dist/esm/config/project-environment.d.ts +62 -0
- package/dist/esm/config/project-environment.js +113 -0
- package/dist/esm/config/project-environment.js.map +1 -1
- package/dist/esm/config/resolver.d.ts +22 -0
- package/dist/esm/config/resolver.js +106 -37
- 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 +59 -23
- package/dist/esm/config/sources/dw-json-source.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +70 -9
- package/dist/esm/config/sources/env-source.js +205 -47
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/sources/index.d.ts +1 -1
- package/dist/esm/config/sources/index.js +1 -1
- package/dist/esm/config/sources/index.js.map +1 -1
- package/dist/esm/config/types.d.ts +53 -3
- package/dist/esm/docs/search.js +3 -1
- package/dist/esm/docs/search.js.map +1 -1
- package/dist/esm/docs/types.d.ts +3 -1
- package/dist/esm/guidance/bundle.d.ts +33 -0
- package/dist/esm/guidance/bundle.js +268 -0
- package/dist/esm/guidance/bundle.js.map +1 -0
- package/dist/esm/guidance/catalog.d.ts +8 -1
- package/dist/esm/guidance/catalog.js +48 -6
- package/dist/esm/guidance/catalog.js.map +1 -1
- package/dist/esm/guidance/index.d.ts +1 -0
- package/dist/esm/guidance/index.js +1 -0
- package/dist/esm/guidance/index.js.map +1 -1
- package/dist/esm/guidance/types.d.ts +17 -1
- package/dist/esm/guidance/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- 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/catalog.d.ts +5 -2
- package/dist/esm/scapi/catalog.js.map +1 -1
- package/dist/esm/scapi/index.d.ts +6 -2
- package/dist/esm/scapi/index.js +4 -2
- package/dist/esm/scapi/index.js.map +1 -1
- package/dist/esm/scapi/live.d.ts +14 -3
- package/dist/esm/scapi/live.js +33 -5
- package/dist/esm/scapi/live.js.map +1 -1
- package/dist/esm/scapi/local.d.ts +26 -0
- package/dist/esm/scapi/local.js +143 -0
- package/dist/esm/scapi/local.js.map +1 -0
- package/dist/esm/scapi/request.d.ts +2 -2
- package/dist/esm/scapi/request.js +4 -2
- 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 +31 -7
- package/dist/esm/scapi/worker-source.js.map +1 -1
- package/dist/esm/telemetry/telemetry.d.ts +1 -0
- package/dist/esm/telemetry/telemetry.js +18 -1
- package/dist/esm/telemetry/telemetry.js.map +1 -1
- package/dist/esm/telemetry/types.d.ts +9 -0
- package/dist/esm/test-utils/config-isolation.js +21 -15
- package/dist/esm/test-utils/config-isolation.js.map +1 -1
- package/dist/esm/ux/agent-context.d.ts +69 -0
- package/dist/esm/ux/agent-context.js +133 -0
- package/dist/esm/ux/agent-context.js.map +1 -0
- package/dist/esm/ux/confirm.d.ts +27 -0
- package/dist/esm/ux/confirm.js +32 -0
- package/dist/esm/ux/confirm.js.map +1 -1
- package/dist/esm/ux/index.d.ts +2 -1
- package/dist/esm/ux/index.js +2 -1
- package/dist/esm/ux/index.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 +5 -2
- package/specs/scapi-schemas-v1.yaml +4 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Sites",
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/sites/sites-oas-v1-public.yaml)\n\n# API Overview\n\nThe Sites API provides endpoints for retrieving and searching sites within Salesforce Commerce Cloud using the following capabilities:\n\n- Site Retrieval: List all sites in an organization or retrieve a specific site by ID.\n- Advanced Discovery: Use the `displayName`, `description`, or `id` attributes to find specific sites for reporting or administrative operations.\n- Status Monitoring: Filter sites by their `inDeletion` status to track maintenance workflows or identify sites marked for removal.\n- Results Management: Navigate large datasets efficiently using pagination (limit/offset), field selection, and multi-field sorting.\n\nSites represent individual storefronts or channels within a Commerce Cloud organization.\n\n## Authentication\n\nFor 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.\n\nYou must include `sfcc.sites` (read-only access) or `sfcc.sites.rw` (read-write access) and other relevant scopes 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\nFor detailed setup instructions, see the [Authorization for Admin APIs guide.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html)\n\n## Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| GET | `/organizations/{organizationId}/sites` | Returns a paginated list of sites |\n| GET | `/organizations/{organizationId}/sites/{siteId}` | Returns a single site by ID |\n| POST | `/organizations/{organizationId}/site-search` | Searches for sites using complex queries |\n\n## Attribute Reference\n\nThe following attributes can be used in search queries and sorting:\n\n- `id`: The unique identifier of the site (String)\n- `displayName`: The user-friendly display name of the site (String)\n- `description`: The description of the site (String)\n- `inDeletion`: Boolean flag indicating if the site is marked for deletion (Boolean)\n\n## Use Cases\n\n- Site Management: Find and filter sites for administrative operations.\n- Site Lookup: Retrieve a specific site by ID to inspect its configuration.\n- Reporting: Generate reports on site configurations and status.\n- Monitoring: Track sites that are marked for deletion or maintenance.\n- Lifecycle Tracking: Monitor the deletion queue by filtering for sites where `inDeletion` is true.\n\n## Best Practices\n\n- Use the `select` parameter to limit response fields and reduce payload size.\n- Use specific search queries to minimize result set size.\n- Apply sorting to organize results meaningfully.\n- Use pagination for large result sets.\n- Filter out deleted sites when appropriate using the `inDeletion` attribute.\n- Cache site information when possible to reduce API calls.",
|
|
5
6
|
"version": "1.3.0",
|
|
6
7
|
"x-api-type": "Admin",
|
|
7
8
|
"x-api-family": "Site"
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/site/sites/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,24 +21,43 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/site-search": {
|
|
21
23
|
"post": {
|
|
24
|
+
"summary": "Search Sites",
|
|
25
|
+
"description": "Searches for sites.\n\nThe query attribute specifies a complex query that can be used to narrow down the search. This is the list of\nsearchable attributes:\n\n- id - String\n- displayName - String\n- description - String\n- inDeletion - Boolean\n\nThe output of the query can also be sorted. These are the list of sortable attributes:\n\n- id - String\n- displayName - String\n- description - String\n- inDeletion - Boolean\n",
|
|
22
26
|
"operationId": "searchSites",
|
|
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
|
"requestBody": {
|
|
42
|
+
"description": "The search request document",
|
|
36
43
|
"content": {
|
|
37
44
|
"application/json": {
|
|
38
45
|
"schema": {
|
|
39
46
|
"$ref": "#/components/schemas/SiteSearchRequest"
|
|
47
|
+
},
|
|
48
|
+
"examples": {
|
|
49
|
+
"SiteSearchById": {
|
|
50
|
+
"$ref": "#/components/examples/SiteSearchById"
|
|
51
|
+
},
|
|
52
|
+
"SiteSearchByDisplayName": {
|
|
53
|
+
"$ref": "#/components/examples/SiteSearchByDisplayName"
|
|
54
|
+
},
|
|
55
|
+
"SiteSearchActiveOnly": {
|
|
56
|
+
"$ref": "#/components/examples/SiteSearchActiveOnly"
|
|
57
|
+
},
|
|
58
|
+
"SiteSearchComplex": {
|
|
59
|
+
"$ref": "#/components/examples/SiteSearchComplex"
|
|
60
|
+
}
|
|
40
61
|
}
|
|
41
62
|
}
|
|
42
63
|
},
|
|
@@ -49,6 +70,14 @@
|
|
|
49
70
|
"application/json": {
|
|
50
71
|
"schema": {
|
|
51
72
|
"$ref": "#/components/schemas/SiteSearchResult"
|
|
73
|
+
},
|
|
74
|
+
"examples": {
|
|
75
|
+
"SiteSearchResultSuccess": {
|
|
76
|
+
"$ref": "#/components/examples/SiteSearchResultSuccess"
|
|
77
|
+
},
|
|
78
|
+
"SiteSearchResultSingle": {
|
|
79
|
+
"$ref": "#/components/examples/SiteSearchResultSingle"
|
|
80
|
+
}
|
|
52
81
|
}
|
|
53
82
|
}
|
|
54
83
|
}
|
|
@@ -59,6 +88,17 @@
|
|
|
59
88
|
"application/problem+json": {
|
|
60
89
|
"schema": {
|
|
61
90
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
91
|
+
},
|
|
92
|
+
"examples": {
|
|
93
|
+
"MalformedSearchParameter": {
|
|
94
|
+
"$ref": "#/components/examples/MalformedSearchParameter"
|
|
95
|
+
},
|
|
96
|
+
"InvalidFieldName": {
|
|
97
|
+
"$ref": "#/components/examples/InvalidFieldName"
|
|
98
|
+
},
|
|
99
|
+
"InvalidSortField": {
|
|
100
|
+
"$ref": "#/components/examples/InvalidSortField"
|
|
101
|
+
}
|
|
62
102
|
}
|
|
63
103
|
}
|
|
64
104
|
}
|
|
@@ -82,17 +122,21 @@
|
|
|
82
122
|
},
|
|
83
123
|
"/organizations/{organizationId}/sites": {
|
|
84
124
|
"get": {
|
|
125
|
+
"summary": "Get Sites",
|
|
126
|
+
"description": "Returns a paginated list of sites for the organization. Results are sorted by site ID in ascending order by default.\n\nUse the `select` parameter to control which fields are included in the response. Use the `limit` and `offset`\nparameters to paginate through results.\n",
|
|
85
127
|
"operationId": "getSites",
|
|
86
128
|
"parameters": [
|
|
87
129
|
{
|
|
88
130
|
"name": "organizationId",
|
|
89
131
|
"in": "path",
|
|
132
|
+
"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).",
|
|
90
133
|
"required": true,
|
|
91
134
|
"style": "simple",
|
|
92
135
|
"explode": false,
|
|
93
136
|
"schema": {
|
|
94
137
|
"$ref": "#/components/schemas/OrganizationId"
|
|
95
|
-
}
|
|
138
|
+
},
|
|
139
|
+
"example": "f_ecom_zzxy_prd"
|
|
96
140
|
},
|
|
97
141
|
{
|
|
98
142
|
"name": "select",
|
|
@@ -102,11 +146,17 @@
|
|
|
102
146
|
"explode": true,
|
|
103
147
|
"schema": {
|
|
104
148
|
"$ref": "#/components/schemas/Select"
|
|
149
|
+
},
|
|
150
|
+
"examples": {
|
|
151
|
+
"select": {
|
|
152
|
+
"value": "(**)"
|
|
153
|
+
}
|
|
105
154
|
}
|
|
106
155
|
},
|
|
107
156
|
{
|
|
108
157
|
"name": "limit",
|
|
109
158
|
"in": "query",
|
|
159
|
+
"description": "Number of records to retrieve per request. Must be between 1 (minimum) and 50 (maximum). Defaults to 25.",
|
|
110
160
|
"required": false,
|
|
111
161
|
"style": "form",
|
|
112
162
|
"explode": true,
|
|
@@ -121,6 +171,7 @@
|
|
|
121
171
|
{
|
|
122
172
|
"name": "offset",
|
|
123
173
|
"in": "query",
|
|
174
|
+
"description": "Used to retrieve the results based on a particular resource offset.",
|
|
124
175
|
"required": false,
|
|
125
176
|
"style": "form",
|
|
126
177
|
"explode": true,
|
|
@@ -139,6 +190,14 @@
|
|
|
139
190
|
"application/json": {
|
|
140
191
|
"schema": {
|
|
141
192
|
"$ref": "#/components/schemas/Sites"
|
|
193
|
+
},
|
|
194
|
+
"examples": {
|
|
195
|
+
"GetSitesSuccess": {
|
|
196
|
+
"$ref": "#/components/examples/GetSitesSuccess"
|
|
197
|
+
},
|
|
198
|
+
"GetSitesWithSelect": {
|
|
199
|
+
"$ref": "#/components/examples/GetSitesWithSelect"
|
|
200
|
+
}
|
|
142
201
|
}
|
|
143
202
|
}
|
|
144
203
|
}
|
|
@@ -162,27 +221,33 @@
|
|
|
162
221
|
},
|
|
163
222
|
"/organizations/{organizationId}/sites/{siteId}": {
|
|
164
223
|
"get": {
|
|
224
|
+
"summary": "Get Site",
|
|
225
|
+
"description": "Returns the site identified by the given site ID.\n",
|
|
165
226
|
"operationId": "getSiteById",
|
|
166
227
|
"parameters": [
|
|
167
228
|
{
|
|
168
229
|
"name": "organizationId",
|
|
169
230
|
"in": "path",
|
|
231
|
+
"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).",
|
|
170
232
|
"required": true,
|
|
171
233
|
"style": "simple",
|
|
172
234
|
"explode": false,
|
|
173
235
|
"schema": {
|
|
174
236
|
"$ref": "#/components/schemas/OrganizationId"
|
|
175
|
-
}
|
|
237
|
+
},
|
|
238
|
+
"example": "f_ecom_zzxy_prd"
|
|
176
239
|
},
|
|
177
240
|
{
|
|
178
241
|
"name": "siteId",
|
|
179
242
|
"in": "path",
|
|
243
|
+
"description": "The identifier of the site.",
|
|
180
244
|
"required": true,
|
|
181
245
|
"style": "simple",
|
|
182
246
|
"explode": false,
|
|
183
247
|
"schema": {
|
|
184
248
|
"$ref": "#/components/schemas/SiteId"
|
|
185
|
-
}
|
|
249
|
+
},
|
|
250
|
+
"example": "RefArch"
|
|
186
251
|
}
|
|
187
252
|
],
|
|
188
253
|
"responses": {
|
|
@@ -192,6 +257,14 @@
|
|
|
192
257
|
"application/json": {
|
|
193
258
|
"schema": {
|
|
194
259
|
"$ref": "#/components/schemas/Site"
|
|
260
|
+
},
|
|
261
|
+
"examples": {
|
|
262
|
+
"GetSiteByIdSuccess": {
|
|
263
|
+
"$ref": "#/components/examples/GetSiteByIdSuccess"
|
|
264
|
+
},
|
|
265
|
+
"GetSiteByIdMaintenance": {
|
|
266
|
+
"$ref": "#/components/examples/GetSiteByIdMaintenance"
|
|
267
|
+
}
|
|
195
268
|
}
|
|
196
269
|
}
|
|
197
270
|
}
|
|
@@ -208,6 +281,11 @@
|
|
|
208
281
|
"application/problem+json": {
|
|
209
282
|
"schema": {
|
|
210
283
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
284
|
+
},
|
|
285
|
+
"examples": {
|
|
286
|
+
"SiteNotFound": {
|
|
287
|
+
"$ref": "#/components/examples/SiteNotFound"
|
|
288
|
+
}
|
|
211
289
|
}
|
|
212
290
|
}
|
|
213
291
|
}
|
|
@@ -225,27 +303,33 @@
|
|
|
225
303
|
},
|
|
226
304
|
"/organizations/{organizationId}/sites/{siteId}/custom-cartridges": {
|
|
227
305
|
"get": {
|
|
306
|
+
"summary": "Get Site Custom Cartridges",
|
|
307
|
+
"description": "Returns the site's custom cartridge path - the colon-delimited list of custom (non-system)\ncartridges assigned to the site. This is the mutable segment of the site's cartridge path.\n\nFor the effective cartridge path, including system cartridges, see the `cartridges` field on\nthe [Site](#tag/Sites/operation/getSiteById) resource.\n",
|
|
228
308
|
"operationId": "getSiteCustomCartridges",
|
|
229
309
|
"parameters": [
|
|
230
310
|
{
|
|
231
311
|
"name": "organizationId",
|
|
232
312
|
"in": "path",
|
|
313
|
+
"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).",
|
|
233
314
|
"required": true,
|
|
234
315
|
"style": "simple",
|
|
235
316
|
"explode": false,
|
|
236
317
|
"schema": {
|
|
237
318
|
"$ref": "#/components/schemas/OrganizationId"
|
|
238
|
-
}
|
|
319
|
+
},
|
|
320
|
+
"example": "f_ecom_zzxy_prd"
|
|
239
321
|
},
|
|
240
322
|
{
|
|
241
323
|
"name": "siteId",
|
|
242
324
|
"in": "path",
|
|
325
|
+
"description": "The identifier of the site.",
|
|
243
326
|
"required": true,
|
|
244
327
|
"style": "simple",
|
|
245
328
|
"explode": false,
|
|
246
329
|
"schema": {
|
|
247
330
|
"$ref": "#/components/schemas/SiteId"
|
|
248
|
-
}
|
|
331
|
+
},
|
|
332
|
+
"example": "RefArch"
|
|
249
333
|
}
|
|
250
334
|
],
|
|
251
335
|
"responses": {
|
|
@@ -255,6 +339,11 @@
|
|
|
255
339
|
"application/json": {
|
|
256
340
|
"schema": {
|
|
257
341
|
"$ref": "#/components/schemas/SiteCustomCartridges"
|
|
342
|
+
},
|
|
343
|
+
"examples": {
|
|
344
|
+
"GetSiteCustomCartridgesSuccess": {
|
|
345
|
+
"$ref": "#/components/examples/GetSiteCustomCartridgesSuccess"
|
|
346
|
+
}
|
|
258
347
|
}
|
|
259
348
|
}
|
|
260
349
|
}
|
|
@@ -271,6 +360,11 @@
|
|
|
271
360
|
"application/problem+json": {
|
|
272
361
|
"schema": {
|
|
273
362
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
363
|
+
},
|
|
364
|
+
"examples": {
|
|
365
|
+
"SiteNotFound": {
|
|
366
|
+
"$ref": "#/components/examples/SiteNotFound"
|
|
367
|
+
}
|
|
274
368
|
}
|
|
275
369
|
}
|
|
276
370
|
}
|
|
@@ -286,34 +380,46 @@
|
|
|
286
380
|
]
|
|
287
381
|
},
|
|
288
382
|
"put": {
|
|
383
|
+
"summary": "Replace Site Custom Cartridges",
|
|
384
|
+
"description": "Atomically replaces the site's custom cartridge path with the provided colon-delimited list.\nEach cartridge name must start with a letter and contain only letters, numbers, or\nunderscores. Cartridge names that don't match this format are rejected with 400 Bad Request. This\nendpoint does not verify that a cartridge is present the active code version.\nSystem cartridges are not part of this resource and are unaffected by this operation.\n",
|
|
289
385
|
"operationId": "replaceSiteCustomCartridges",
|
|
290
386
|
"parameters": [
|
|
291
387
|
{
|
|
292
388
|
"name": "organizationId",
|
|
293
389
|
"in": "path",
|
|
390
|
+
"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).",
|
|
294
391
|
"required": true,
|
|
295
392
|
"style": "simple",
|
|
296
393
|
"explode": false,
|
|
297
394
|
"schema": {
|
|
298
395
|
"$ref": "#/components/schemas/OrganizationId"
|
|
299
|
-
}
|
|
396
|
+
},
|
|
397
|
+
"example": "f_ecom_zzxy_prd"
|
|
300
398
|
},
|
|
301
399
|
{
|
|
302
400
|
"name": "siteId",
|
|
303
401
|
"in": "path",
|
|
402
|
+
"description": "The identifier of the site.",
|
|
304
403
|
"required": true,
|
|
305
404
|
"style": "simple",
|
|
306
405
|
"explode": false,
|
|
307
406
|
"schema": {
|
|
308
407
|
"$ref": "#/components/schemas/SiteId"
|
|
309
|
-
}
|
|
408
|
+
},
|
|
409
|
+
"example": "RefArch"
|
|
310
410
|
}
|
|
311
411
|
],
|
|
312
412
|
"requestBody": {
|
|
413
|
+
"description": "The custom cartridge path replacement request",
|
|
313
414
|
"content": {
|
|
314
415
|
"application/json": {
|
|
315
416
|
"schema": {
|
|
316
417
|
"$ref": "#/components/schemas/SiteCustomCartridges"
|
|
418
|
+
},
|
|
419
|
+
"examples": {
|
|
420
|
+
"ReplaceSiteCustomCartridgesRequest": {
|
|
421
|
+
"$ref": "#/components/examples/ReplaceSiteCustomCartridgesRequest"
|
|
422
|
+
}
|
|
317
423
|
}
|
|
318
424
|
}
|
|
319
425
|
},
|
|
@@ -326,6 +432,11 @@
|
|
|
326
432
|
"application/json": {
|
|
327
433
|
"schema": {
|
|
328
434
|
"$ref": "#/components/schemas/SiteCustomCartridges"
|
|
435
|
+
},
|
|
436
|
+
"examples": {
|
|
437
|
+
"ReplaceSiteCustomCartridgesSuccess": {
|
|
438
|
+
"$ref": "#/components/examples/ReplaceSiteCustomCartridgesSuccess"
|
|
439
|
+
}
|
|
329
440
|
}
|
|
330
441
|
}
|
|
331
442
|
}
|
|
@@ -336,6 +447,11 @@
|
|
|
336
447
|
"application/problem+json": {
|
|
337
448
|
"schema": {
|
|
338
449
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
450
|
+
},
|
|
451
|
+
"examples": {
|
|
452
|
+
"InvalidCartridgeName": {
|
|
453
|
+
"$ref": "#/components/examples/InvalidCartridgePath"
|
|
454
|
+
}
|
|
339
455
|
}
|
|
340
456
|
}
|
|
341
457
|
}
|
|
@@ -352,6 +468,11 @@
|
|
|
352
468
|
"application/problem+json": {
|
|
353
469
|
"schema": {
|
|
354
470
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
471
|
+
},
|
|
472
|
+
"examples": {
|
|
473
|
+
"SiteNotFound": {
|
|
474
|
+
"$ref": "#/components/examples/SiteNotFound"
|
|
475
|
+
}
|
|
355
476
|
}
|
|
356
477
|
}
|
|
357
478
|
}
|
|
@@ -371,11 +492,35 @@
|
|
|
371
492
|
"schemas": {
|
|
372
493
|
"OrganizationId": {
|
|
373
494
|
"type": "string",
|
|
495
|
+
"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).",
|
|
496
|
+
"example": "f_ecom_zzxy_prd",
|
|
374
497
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
375
498
|
},
|
|
376
499
|
"Query": {
|
|
377
500
|
"type": "object",
|
|
378
501
|
"additionalProperties": false,
|
|
502
|
+
"description": "A set of objects that define criteria used to select records. A query can contain one of the following:\n* `MatchAllQuery`\n - Matches all documents.\n* `TermQuery`\n - Matches one or more documents against one or more document fields.\n* `TextQuery`\n - Matches text against one or more fields.\n* `BoolQuery`\n - Allows construction of a logical expression of multiple queries.\n* `FilteredQuery`\n - Allows a filter to be applied to a query.\n* `NestedQuery`\n - Allows you to query on nested documents.\n - _Only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation._",
|
|
503
|
+
"example": {
|
|
504
|
+
"filteredQuery": {
|
|
505
|
+
"query": {
|
|
506
|
+
"textQuery": {
|
|
507
|
+
"fields": [
|
|
508
|
+
"couponId"
|
|
509
|
+
],
|
|
510
|
+
"searchPhrase": "disabled"
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
"filter": {
|
|
514
|
+
"termFilter": {
|
|
515
|
+
"field": "enabled",
|
|
516
|
+
"operator": "is",
|
|
517
|
+
"values": [
|
|
518
|
+
false
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
379
524
|
"maxProperties": 1,
|
|
380
525
|
"minProperties": 1,
|
|
381
526
|
"properties": {
|
|
@@ -402,21 +547,58 @@
|
|
|
402
547
|
"BoolQuery": {
|
|
403
548
|
"type": "object",
|
|
404
549
|
"additionalProperties": false,
|
|
550
|
+
"description": "A boolean query allows construction of full logical expression trees that are composed of other queries (usually term queries and text queries). A boolean query has three sets of clauses:\n \n - `must`, which combines as an `AND` operator.\n - `should`, which combines as an `OR` operator.\n - `must_not`, which combines as a `NOT` operator.\n \nIf `must`, `mustNot`, or `should` appear in the same boolean query, they are combined logically using the `AND` operator. For example:\n\n (must-1 AND must-1 AND ...)\n AND (should-1 OR should-2 OR ...)\n AND NOT (must_not-1 OR must_not-2 OR ...)\n",
|
|
551
|
+
"example": {
|
|
552
|
+
"must": [
|
|
553
|
+
{
|
|
554
|
+
"textQuery": {
|
|
555
|
+
"fields": [
|
|
556
|
+
"couponId"
|
|
557
|
+
],
|
|
558
|
+
"searchPhrase": "DEAL"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"textQuery": {
|
|
563
|
+
"fields": [
|
|
564
|
+
"description"
|
|
565
|
+
],
|
|
566
|
+
"searchPhrase": "Big bargain deal"
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"mustNot": [
|
|
571
|
+
{
|
|
572
|
+
"termQuery": {
|
|
573
|
+
"fields": [
|
|
574
|
+
"enabled"
|
|
575
|
+
],
|
|
576
|
+
"operator": "is",
|
|
577
|
+
"values": [
|
|
578
|
+
false
|
|
579
|
+
]
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
]
|
|
583
|
+
},
|
|
405
584
|
"properties": {
|
|
406
585
|
"must": {
|
|
407
586
|
"type": "array",
|
|
587
|
+
"description": "List of queries to be evaluated as an `AND` operator.",
|
|
408
588
|
"items": {
|
|
409
589
|
"$ref": "#/components/schemas/Query"
|
|
410
590
|
}
|
|
411
591
|
},
|
|
412
592
|
"mustNot": {
|
|
413
593
|
"type": "array",
|
|
594
|
+
"description": "List of queries to be evaluated as a `NOT` operator.",
|
|
414
595
|
"items": {
|
|
415
596
|
"$ref": "#/components/schemas/Query"
|
|
416
597
|
}
|
|
417
598
|
},
|
|
418
599
|
"should": {
|
|
419
600
|
"type": "array",
|
|
601
|
+
"description": "List of queries to be evaluated as an `OR` operator.",
|
|
420
602
|
"items": {
|
|
421
603
|
"$ref": "#/components/schemas/Query"
|
|
422
604
|
}
|
|
@@ -426,6 +608,7 @@
|
|
|
426
608
|
"Filter": {
|
|
427
609
|
"type": "object",
|
|
428
610
|
"additionalProperties": false,
|
|
611
|
+
"description": "Contains a set of objects that define criteria used to select records. A filter can contain one of the following:\n * `TermFilter`\n - Matches records where a field (or fields) exactly matches some simple value (including `null`).\n * `RangeFilter`\n - Matches records where a field value lies within a specified range.\n * `Range2Filter`\n - Matches records in a specified range across fields.\n * `QueryFilter`\n - Matches records based on a query.\n * `BoolFilter`\n - Provides filtering of records using a set of filters combined using a logical operator.",
|
|
429
612
|
"maxProperties": 1,
|
|
430
613
|
"minProperties": 1,
|
|
431
614
|
"properties": {
|
|
@@ -449,20 +632,47 @@
|
|
|
449
632
|
"BoolFilter": {
|
|
450
633
|
"type": "object",
|
|
451
634
|
"additionalProperties": false,
|
|
635
|
+
"description": "Allows you to combine other filters into (possibly recursive) logical expression trees. A boolean filter is composed of a logical operator (`AND`, `OR`, `NOT`) and a list of filters that the operator relates to. Multiple filters can be negated with a single `NOT` operator, even when the filters are combined with the `AND` operator.",
|
|
636
|
+
"example": {
|
|
637
|
+
"operator": "and",
|
|
638
|
+
"filters": [
|
|
639
|
+
{
|
|
640
|
+
"termFilter": {
|
|
641
|
+
"field": "id",
|
|
642
|
+
"operator": "is",
|
|
643
|
+
"values": [
|
|
644
|
+
"myId"
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
"termFilter": {
|
|
650
|
+
"field": "couponId",
|
|
651
|
+
"operator": "is",
|
|
652
|
+
"values": [
|
|
653
|
+
"couponOne"
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
]
|
|
658
|
+
},
|
|
452
659
|
"properties": {
|
|
453
660
|
"filters": {
|
|
454
661
|
"type": "array",
|
|
662
|
+
"description": "A list of filters that are logically combined by an operator.",
|
|
455
663
|
"items": {
|
|
456
664
|
"$ref": "#/components/schemas/Filter"
|
|
457
665
|
}
|
|
458
666
|
},
|
|
459
667
|
"operator": {
|
|
460
668
|
"type": "string",
|
|
669
|
+
"description": "The logical operator that is used to combine the filters.",
|
|
461
670
|
"enum": [
|
|
462
671
|
"and",
|
|
463
672
|
"or",
|
|
464
673
|
"not"
|
|
465
|
-
]
|
|
674
|
+
],
|
|
675
|
+
"example": "and"
|
|
466
676
|
}
|
|
467
677
|
},
|
|
468
678
|
"required": [
|
|
@@ -471,6 +681,7 @@
|
|
|
471
681
|
},
|
|
472
682
|
"QueryFilter": {
|
|
473
683
|
"type": "object",
|
|
684
|
+
"description": "Wraps any query and allows it to be used as a filter.",
|
|
474
685
|
"properties": {
|
|
475
686
|
"query": {
|
|
476
687
|
"$ref": "#/components/schemas/Query"
|
|
@@ -482,45 +693,71 @@
|
|
|
482
693
|
},
|
|
483
694
|
"Field": {
|
|
484
695
|
"type": "string",
|
|
696
|
+
"description": "Name of the field. Might be a custom field name prefixed with c_.",
|
|
697
|
+
"example": "couponId",
|
|
485
698
|
"maxLength": 260
|
|
486
699
|
},
|
|
487
700
|
"Range2Filter": {
|
|
488
701
|
"type": "object",
|
|
489
702
|
"additionalProperties": false,
|
|
703
|
+
"description": "Allows you to restrict a search result to hits where a range defined by specified attributes has a certain relationship to a specified range.\n\nThe first range (R1) is defined by a pair of attributes (`fromField` and `toField`) that specify the extent of a range, such as attributes `validFrom` and `validTo`.\n\nThe second range (R2) is defined by `fromValue` and `toValue`.\n\nThe filter mode specifies the method used to compare the two ranges:\n\n* `overlap`: R1 overlaps fully or partially with R2.\n* `containing`: R1 contains R2.\n* `contained`: R1 is contained in R2.\n\nThe range filter supports several value types, and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range 2 filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
|
|
704
|
+
"example": {
|
|
705
|
+
"fromField": "validFrom",
|
|
706
|
+
"toField": "validTo",
|
|
707
|
+
"filterMode": "overlap",
|
|
708
|
+
"fromValue": "2007-01-01T00:00:00.000Z",
|
|
709
|
+
"toValue": "2017-01-01T00:00:00.000Z"
|
|
710
|
+
},
|
|
490
711
|
"properties": {
|
|
491
712
|
"filterMode": {
|
|
492
713
|
"type": "string",
|
|
493
714
|
"default": "overlap",
|
|
715
|
+
"description": "Compare mode: overlap, containing, or contained.",
|
|
494
716
|
"enum": [
|
|
495
717
|
"overlap",
|
|
496
718
|
"containing",
|
|
497
719
|
"contained"
|
|
498
|
-
]
|
|
720
|
+
],
|
|
721
|
+
"example": "overlap"
|
|
499
722
|
},
|
|
500
723
|
"fromField": {
|
|
501
724
|
"allOf": [
|
|
502
725
|
{
|
|
503
726
|
"$ref": "#/components/schemas/Field"
|
|
504
727
|
}
|
|
505
|
-
]
|
|
728
|
+
],
|
|
729
|
+
"description": "The field name of the field that starts the first range.",
|
|
730
|
+
"example": "validFrom"
|
|
506
731
|
},
|
|
507
732
|
"fromInclusive": {
|
|
508
733
|
"type": "boolean",
|
|
509
|
-
"default": true
|
|
734
|
+
"default": true,
|
|
735
|
+
"description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
736
|
+
"example": true
|
|
737
|
+
},
|
|
738
|
+
"fromValue": {
|
|
739
|
+
"description": "The lower bound of the second range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
|
|
740
|
+
"example": "2007-01-01T00:00:00.000Z"
|
|
510
741
|
},
|
|
511
|
-
"fromValue": {},
|
|
512
742
|
"toField": {
|
|
513
743
|
"allOf": [
|
|
514
744
|
{
|
|
515
745
|
"$ref": "#/components/schemas/Field"
|
|
516
746
|
}
|
|
517
|
-
]
|
|
747
|
+
],
|
|
748
|
+
"description": "The field name of the field that ends the first range.",
|
|
749
|
+
"example": "validTo"
|
|
518
750
|
},
|
|
519
751
|
"toInclusive": {
|
|
520
752
|
"type": "boolean",
|
|
521
|
-
"default": true
|
|
753
|
+
"default": true,
|
|
754
|
+
"description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
755
|
+
"example": true
|
|
522
756
|
},
|
|
523
|
-
"toValue": {
|
|
757
|
+
"toValue": {
|
|
758
|
+
"description": "The upper bound of the second range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
|
|
759
|
+
"example": "2017-01-01T00:00:00.000Z"
|
|
760
|
+
}
|
|
524
761
|
},
|
|
525
762
|
"required": [
|
|
526
763
|
"fromField",
|
|
@@ -529,49 +766,64 @@
|
|
|
529
766
|
},
|
|
530
767
|
"RangeFilter": {
|
|
531
768
|
"type": "object",
|
|
769
|
+
"description": "Allows you to restrict a search result to hits that have values for a given attribute that fall within a given value range. The range filter supports several value types and relies on the natural sorting of the value type for range interpretation. Value ranges can be open-ended, but only at one end of the range. You can configure whether the lower bounds and upper bounds are inclusive or exclusive.\n\nA range filter is useful for general restrictions that can be shared between searches (like a static date range) because the filter result is cached in memory. Range filters are not appropriate if the range is expected to be different for every query (for example, if the user controls the date range down to the hour via a UI control). Range filters are inclusive by default.",
|
|
532
770
|
"properties": {
|
|
533
771
|
"field": {
|
|
534
772
|
"allOf": [
|
|
535
773
|
{
|
|
536
774
|
"$ref": "#/components/schemas/Field"
|
|
537
775
|
}
|
|
538
|
-
]
|
|
776
|
+
],
|
|
777
|
+
"description": "The search field.",
|
|
778
|
+
"example": "validFrom"
|
|
539
779
|
},
|
|
540
780
|
"from": {
|
|
781
|
+
"description": "The lower bound of the filter range. If not specified, the range is open-ended with respect to the lower bound. You can't leave both the lower and upper bounds open-ended.",
|
|
541
782
|
"oneOf": [
|
|
542
783
|
{
|
|
543
784
|
"type": "string",
|
|
544
|
-
"format": "date-time"
|
|
785
|
+
"format": "date-time",
|
|
786
|
+
"example": "2007-01-01T00:00:00Z"
|
|
545
787
|
},
|
|
546
788
|
{
|
|
547
|
-
"type": "integer"
|
|
789
|
+
"type": "integer",
|
|
790
|
+
"example": 1
|
|
548
791
|
},
|
|
549
792
|
{
|
|
550
|
-
"type": "number"
|
|
793
|
+
"type": "number",
|
|
794
|
+
"example": 1
|
|
551
795
|
}
|
|
552
796
|
]
|
|
553
797
|
},
|
|
554
798
|
"fromInclusive": {
|
|
555
799
|
"type": "boolean",
|
|
556
|
-
"default": true
|
|
800
|
+
"default": true,
|
|
801
|
+
"description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
802
|
+
"example": true
|
|
557
803
|
},
|
|
558
804
|
"to": {
|
|
805
|
+
"description": "The upper bound of the filter range. If not specified, the range is open-ended with respect to the upper bound. You can't leave both the upper and lower bounds open-ended.",
|
|
559
806
|
"oneOf": [
|
|
560
807
|
{
|
|
561
808
|
"type": "string",
|
|
562
|
-
"format": "date-time"
|
|
809
|
+
"format": "date-time",
|
|
810
|
+
"example": "2007-01-02T00:00:00Z"
|
|
563
811
|
},
|
|
564
812
|
{
|
|
565
|
-
"type": "integer"
|
|
813
|
+
"type": "integer",
|
|
814
|
+
"example": 2
|
|
566
815
|
},
|
|
567
816
|
{
|
|
568
|
-
"type": "number"
|
|
817
|
+
"type": "number",
|
|
818
|
+
"example": 2
|
|
569
819
|
}
|
|
570
820
|
]
|
|
571
821
|
},
|
|
572
822
|
"toInclusive": {
|
|
573
823
|
"type": "boolean",
|
|
574
|
-
"default": true
|
|
824
|
+
"default": true,
|
|
825
|
+
"description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
|
|
826
|
+
"example": true
|
|
575
827
|
}
|
|
576
828
|
},
|
|
577
829
|
"required": [
|
|
@@ -581,16 +833,26 @@
|
|
|
581
833
|
"TermFilter": {
|
|
582
834
|
"type": "object",
|
|
583
835
|
"additionalProperties": false,
|
|
836
|
+
"description": "Allows you to restrict a search result to hits that match exactly one of the values configured for the filter. A term filter is useful for general restrictions that can be shared between searches. Use term filters whenever the criteria you filter on is a shared property of multiple searches (for example, like filtering by an order status). Use term filters for fields that have a discrete and small set of values only.",
|
|
837
|
+
"example": {
|
|
838
|
+
"field": "id",
|
|
839
|
+
"operator": "is",
|
|
840
|
+
"values": [
|
|
841
|
+
"myId"
|
|
842
|
+
]
|
|
843
|
+
},
|
|
584
844
|
"properties": {
|
|
585
845
|
"field": {
|
|
586
846
|
"allOf": [
|
|
587
847
|
{
|
|
588
848
|
"$ref": "#/components/schemas/Field"
|
|
589
849
|
}
|
|
590
|
-
]
|
|
850
|
+
],
|
|
851
|
+
"description": "The filter field."
|
|
591
852
|
},
|
|
592
853
|
"operator": {
|
|
593
854
|
"type": "string",
|
|
855
|
+
"description": "The operator used to compare the field's values with the given values.",
|
|
594
856
|
"enum": [
|
|
595
857
|
"is",
|
|
596
858
|
"one_of",
|
|
@@ -600,12 +862,15 @@
|
|
|
600
862
|
"greater",
|
|
601
863
|
"not_in",
|
|
602
864
|
"neq"
|
|
603
|
-
]
|
|
865
|
+
],
|
|
866
|
+
"example": "is"
|
|
604
867
|
},
|
|
605
868
|
"values": {
|
|
606
869
|
"type": "array",
|
|
870
|
+
"description": "The filter values.",
|
|
607
871
|
"items": {
|
|
608
|
-
"type": "string"
|
|
872
|
+
"type": "string",
|
|
873
|
+
"example": "myId"
|
|
609
874
|
}
|
|
610
875
|
}
|
|
611
876
|
},
|
|
@@ -617,6 +882,26 @@
|
|
|
617
882
|
"FilteredQuery": {
|
|
618
883
|
"type": "object",
|
|
619
884
|
"additionalProperties": false,
|
|
885
|
+
"description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
|
|
886
|
+
"example": {
|
|
887
|
+
"query": {
|
|
888
|
+
"textQuery": {
|
|
889
|
+
"fields": [
|
|
890
|
+
"couponId"
|
|
891
|
+
],
|
|
892
|
+
"searchPhrase": "disabled"
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
"filter": {
|
|
896
|
+
"termFilter": {
|
|
897
|
+
"field": "enabled",
|
|
898
|
+
"operator": "is",
|
|
899
|
+
"values": [
|
|
900
|
+
false
|
|
901
|
+
]
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
},
|
|
620
905
|
"properties": {
|
|
621
906
|
"filter": {
|
|
622
907
|
"$ref": "#/components/schemas/Filter"
|
|
@@ -631,14 +916,62 @@
|
|
|
631
916
|
]
|
|
632
917
|
},
|
|
633
918
|
"MatchAllQuery": {
|
|
634
|
-
"type": "object"
|
|
919
|
+
"type": "object",
|
|
920
|
+
"description": "Matches all documents (namespace and document type). This query comes in handy if you just want to filter a search result or really do not have any constraints."
|
|
635
921
|
},
|
|
636
922
|
"NestedQuery": {
|
|
637
923
|
"type": "object",
|
|
638
924
|
"additionalProperties": false,
|
|
925
|
+
"description": "Allows you to query nested documents that are part of a larger document. Say, for example, that you have a main product with variations in one big document, and you want to constrain a search to main products that have variations that match multiple constraints. \n\nA `NestedQuery` is only supported by some Commerce APIs. For more details, see the endpoint descriptions in the API documentation.\n",
|
|
926
|
+
"example": {
|
|
927
|
+
"path": "order.shippingAddresses",
|
|
928
|
+
"query": {
|
|
929
|
+
"boolQuery": {
|
|
930
|
+
"must": [
|
|
931
|
+
{
|
|
932
|
+
"boolQuery": {
|
|
933
|
+
"must": [
|
|
934
|
+
{
|
|
935
|
+
"termQuery": {
|
|
936
|
+
"fields": [
|
|
937
|
+
"order.shippingAddresses.firstName"
|
|
938
|
+
],
|
|
939
|
+
"operator": "is",
|
|
940
|
+
"values": [
|
|
941
|
+
"John"
|
|
942
|
+
]
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
]
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"boolQuery": {
|
|
950
|
+
"must": [
|
|
951
|
+
{
|
|
952
|
+
"termQuery": {
|
|
953
|
+
"fields": [
|
|
954
|
+
"order.shippingAddresses.lastName"
|
|
955
|
+
],
|
|
956
|
+
"operator": "is",
|
|
957
|
+
"values": [
|
|
958
|
+
"Doe"
|
|
959
|
+
]
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
]
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
]
|
|
966
|
+
}
|
|
967
|
+
},
|
|
968
|
+
"scoreMode": "avg"
|
|
969
|
+
},
|
|
639
970
|
"properties": {
|
|
640
971
|
"path": {
|
|
641
972
|
"type": "string",
|
|
973
|
+
"description": "The path to the nested document.",
|
|
974
|
+
"example": "order.shippingAddresses",
|
|
642
975
|
"maxLength": 2048
|
|
643
976
|
},
|
|
644
977
|
"query": {
|
|
@@ -646,12 +979,14 @@
|
|
|
646
979
|
},
|
|
647
980
|
"scoreMode": {
|
|
648
981
|
"type": "string",
|
|
982
|
+
"description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
|
|
649
983
|
"enum": [
|
|
650
984
|
"avg",
|
|
651
985
|
"total",
|
|
652
986
|
"max",
|
|
653
987
|
"none"
|
|
654
|
-
]
|
|
988
|
+
],
|
|
989
|
+
"example": "avg"
|
|
655
990
|
}
|
|
656
991
|
},
|
|
657
992
|
"required": [
|
|
@@ -661,9 +996,11 @@
|
|
|
661
996
|
},
|
|
662
997
|
"TermQuery": {
|
|
663
998
|
"type": "object",
|
|
999
|
+
"description": "A term query matches one or more values against one or more document fields. A document is considered a hit if one of the values matches exactly with at least one of the given fields. The operator `is` can only take one value, while `one_of` can take multiple values. If multiple fields are specified, they are combined using a logical `OR` operator.\n\n**Limitations:**\n\n* The `greater` and `less` operators are not supported under certain conditions. Both operators are permitted unless the API documentation states otherwise.\n* A subset of Commerce APIs handle queries with multiple fields differently. If the query has multiple fields, the query is internally handled as a logical `OR` of `DisjointMaxQueries` (with the dismax matching a value against all fields). The dismax makes sure that a document carrying a single term in multiple fields does not get higher scores than a document matching multiple terms in multiple fields.",
|
|
664
1000
|
"properties": {
|
|
665
1001
|
"fields": {
|
|
666
1002
|
"type": "array",
|
|
1003
|
+
"description": "The document fields that the values are matched against, combined with the operator.",
|
|
667
1004
|
"items": {
|
|
668
1005
|
"$ref": "#/components/schemas/Field"
|
|
669
1006
|
},
|
|
@@ -671,6 +1008,7 @@
|
|
|
671
1008
|
},
|
|
672
1009
|
"operator": {
|
|
673
1010
|
"type": "string",
|
|
1011
|
+
"description": "Returns the operator to use for the term query.",
|
|
674
1012
|
"enum": [
|
|
675
1013
|
"is",
|
|
676
1014
|
"one_of",
|
|
@@ -680,23 +1018,30 @@
|
|
|
680
1018
|
"greater",
|
|
681
1019
|
"not_in",
|
|
682
1020
|
"neq"
|
|
683
|
-
]
|
|
1021
|
+
],
|
|
1022
|
+
"example": "is"
|
|
684
1023
|
},
|
|
685
1024
|
"values": {
|
|
686
1025
|
"type": "array",
|
|
1026
|
+
"description": "The values that the fields are compared against, combined with the operator.",
|
|
687
1027
|
"items": {
|
|
1028
|
+
"example": "myCouponId",
|
|
688
1029
|
"oneOf": [
|
|
689
1030
|
{
|
|
690
|
-
"type": "string"
|
|
1031
|
+
"type": "string",
|
|
1032
|
+
"example": "myCouponId"
|
|
691
1033
|
},
|
|
692
1034
|
{
|
|
693
|
-
"type": "number"
|
|
1035
|
+
"type": "number",
|
|
1036
|
+
"example": 1
|
|
694
1037
|
},
|
|
695
1038
|
{
|
|
696
|
-
"type": "boolean"
|
|
1039
|
+
"type": "boolean",
|
|
1040
|
+
"example": true
|
|
697
1041
|
},
|
|
698
1042
|
{
|
|
699
|
-
"type": "integer"
|
|
1043
|
+
"type": "integer",
|
|
1044
|
+
"example": 1
|
|
700
1045
|
}
|
|
701
1046
|
]
|
|
702
1047
|
}
|
|
@@ -710,16 +1055,26 @@
|
|
|
710
1055
|
"TextQuery": {
|
|
711
1056
|
"type": "object",
|
|
712
1057
|
"additionalProperties": false,
|
|
1058
|
+
"description": "A text query is used to match some text (for example, a search phrase possibly consisting of multiple terms) against one or more fields. When multiple fields are provided, the phrase conceptually forms a logical `OR` over the fields. In this case, the terms of the phrase basically have to match within the text, that would result in concatenating all given fields.",
|
|
1059
|
+
"example": {
|
|
1060
|
+
"fields": [
|
|
1061
|
+
"couponId"
|
|
1062
|
+
],
|
|
1063
|
+
"searchPhrase": "limit"
|
|
1064
|
+
},
|
|
713
1065
|
"properties": {
|
|
714
1066
|
"fields": {
|
|
715
1067
|
"type": "array",
|
|
1068
|
+
"description": "The document fields that the search phrase matches against.",
|
|
716
1069
|
"items": {
|
|
717
1070
|
"$ref": "#/components/schemas/Field"
|
|
718
1071
|
},
|
|
719
1072
|
"minItems": 1
|
|
720
1073
|
},
|
|
721
1074
|
"searchPhrase": {
|
|
722
|
-
"type": "string"
|
|
1075
|
+
"type": "string",
|
|
1076
|
+
"description": "A search phrase, which can include multiple terms separated by spaces.",
|
|
1077
|
+
"example": "campaign summer"
|
|
723
1078
|
}
|
|
724
1079
|
},
|
|
725
1080
|
"required": [
|
|
@@ -730,18 +1085,27 @@
|
|
|
730
1085
|
"Sort": {
|
|
731
1086
|
"type": "object",
|
|
732
1087
|
"additionalProperties": false,
|
|
1088
|
+
"description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
|
|
1089
|
+
"example": {
|
|
1090
|
+
"field": "couponId",
|
|
1091
|
+
"sortOrder": "desc"
|
|
1092
|
+
},
|
|
733
1093
|
"properties": {
|
|
734
1094
|
"field": {
|
|
735
1095
|
"type": "string",
|
|
1096
|
+
"description": "The name of the field to sort on.",
|
|
1097
|
+
"example": "couponId",
|
|
736
1098
|
"maxLength": 256
|
|
737
1099
|
},
|
|
738
1100
|
"sortOrder": {
|
|
739
1101
|
"type": "string",
|
|
740
1102
|
"default": "asc",
|
|
1103
|
+
"description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
|
|
741
1104
|
"enum": [
|
|
742
1105
|
"asc",
|
|
743
1106
|
"desc"
|
|
744
|
-
]
|
|
1107
|
+
],
|
|
1108
|
+
"example": "asc"
|
|
745
1109
|
}
|
|
746
1110
|
},
|
|
747
1111
|
"required": [
|
|
@@ -752,14 +1116,19 @@
|
|
|
752
1116
|
"type": "integer",
|
|
753
1117
|
"format": "int32",
|
|
754
1118
|
"default": 0,
|
|
1119
|
+
"description": "The zero-based index of the first hit/data to include in the result.",
|
|
1120
|
+
"example": 0,
|
|
755
1121
|
"minimum": 0
|
|
756
1122
|
},
|
|
757
1123
|
"SearchRequest": {
|
|
758
1124
|
"type": "object",
|
|
1125
|
+
"description": "Document representing a search request for retrieving items within the Data API. The query is a potentially complex set of expressions. The fields and expands that each query supports are defined within the search resource.",
|
|
759
1126
|
"properties": {
|
|
760
1127
|
"limit": {
|
|
761
1128
|
"type": "integer",
|
|
762
1129
|
"format": "int32",
|
|
1130
|
+
"description": "Maximum records to retrieve per request, not to exceed 200.",
|
|
1131
|
+
"example": 10,
|
|
763
1132
|
"maximum": 200,
|
|
764
1133
|
"minimum": 1
|
|
765
1134
|
},
|
|
@@ -768,6 +1137,7 @@
|
|
|
768
1137
|
},
|
|
769
1138
|
"sorts": {
|
|
770
1139
|
"type": "array",
|
|
1140
|
+
"description": "The list of sort clauses configured for the search request. Sort clauses are optional. See the description of the search endpoint for details on the default sorting behavior that is used when explicit sorts are not passed.",
|
|
771
1141
|
"items": {
|
|
772
1142
|
"$ref": "#/components/schemas/Sort"
|
|
773
1143
|
}
|
|
@@ -785,20 +1155,26 @@
|
|
|
785
1155
|
{
|
|
786
1156
|
"$ref": "#/components/schemas/SearchRequest"
|
|
787
1157
|
}
|
|
788
|
-
]
|
|
1158
|
+
],
|
|
1159
|
+
"description": "Document representing a search request for retrieving sites. The query is a potentially complex set of expressions.\n\nSearchable attributes:\n- id - String\n- displayName - String\n- description - String\n- inDeletion - Boolean\n\nSortable attributes:\n- id - String\n- displayName - String\n- description - String\n- inDeletion - Boolean\n"
|
|
789
1160
|
},
|
|
790
1161
|
"Total": {
|
|
791
1162
|
"type": "integer",
|
|
792
1163
|
"format": "int32",
|
|
793
1164
|
"default": 0,
|
|
1165
|
+
"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.",
|
|
1166
|
+
"example": 10,
|
|
794
1167
|
"minimum": 0
|
|
795
1168
|
},
|
|
796
1169
|
"ResultBase": {
|
|
797
1170
|
"type": "object",
|
|
1171
|
+
"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.",
|
|
798
1172
|
"properties": {
|
|
799
1173
|
"limit": {
|
|
800
1174
|
"type": "integer",
|
|
801
|
-
"format": "int32"
|
|
1175
|
+
"format": "int32",
|
|
1176
|
+
"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.",
|
|
1177
|
+
"example": 10
|
|
802
1178
|
},
|
|
803
1179
|
"total": {
|
|
804
1180
|
"$ref": "#/components/schemas/Total"
|
|
@@ -815,6 +1191,7 @@
|
|
|
815
1191
|
"$ref": "#/components/schemas/ResultBase"
|
|
816
1192
|
}
|
|
817
1193
|
],
|
|
1194
|
+
"description": "Schema defining generic pageable result. Each response schema of a resource requiring pagination should extend this schema. \nIf you use this extend this schema directly, it needs to be defined what data is returned. Allowed names for the data field is `data`.",
|
|
818
1195
|
"properties": {
|
|
819
1196
|
"offset": {
|
|
820
1197
|
"$ref": "#/components/schemas/Offset"
|
|
@@ -833,18 +1210,67 @@
|
|
|
833
1210
|
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
834
1211
|
}
|
|
835
1212
|
],
|
|
1213
|
+
"description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
|
|
1214
|
+
"example": {
|
|
1215
|
+
"limit": 1,
|
|
1216
|
+
"hits": [
|
|
1217
|
+
{
|
|
1218
|
+
"couponId": "coupon1",
|
|
1219
|
+
"creationDate": "2019-10-20T12:00:00Z",
|
|
1220
|
+
"description": "This coupon is used to give 10% off stuff.",
|
|
1221
|
+
"enabled": false,
|
|
1222
|
+
"exportedCodeCount": 0,
|
|
1223
|
+
"lastModified": "2019-10-30T04:23:59Z",
|
|
1224
|
+
"redemptionCount": 3,
|
|
1225
|
+
"redemptionLimits": {
|
|
1226
|
+
"limitPerCode": 1,
|
|
1227
|
+
"limitPerCustomer": 1,
|
|
1228
|
+
"limitPerTimeFrame": {
|
|
1229
|
+
"limit": 2,
|
|
1230
|
+
"redemptionTimeFrame": 24
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
"singleCode": "MyCode",
|
|
1234
|
+
"systemCodesConfig": {
|
|
1235
|
+
"codePrefix": "SG",
|
|
1236
|
+
"numberOfCodes": 500000
|
|
1237
|
+
},
|
|
1238
|
+
"totalCodesCount": 50,
|
|
1239
|
+
"type": "single_code"
|
|
1240
|
+
}
|
|
1241
|
+
],
|
|
1242
|
+
"query": {
|
|
1243
|
+
"textQuery": {
|
|
1244
|
+
"fields": [
|
|
1245
|
+
"id",
|
|
1246
|
+
"description"
|
|
1247
|
+
],
|
|
1248
|
+
"searchPhrase": "stuff"
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"sorts": [
|
|
1252
|
+
{
|
|
1253
|
+
"field": "couponId",
|
|
1254
|
+
"sortOrder": "desc"
|
|
1255
|
+
}
|
|
1256
|
+
],
|
|
1257
|
+
"offset": 2,
|
|
1258
|
+
"total": 8
|
|
1259
|
+
},
|
|
836
1260
|
"properties": {
|
|
837
1261
|
"query": {
|
|
838
1262
|
"$ref": "#/components/schemas/Query"
|
|
839
1263
|
},
|
|
840
1264
|
"sorts": {
|
|
841
1265
|
"type": "array",
|
|
1266
|
+
"description": "The sorting that was applied to the result.",
|
|
842
1267
|
"items": {
|
|
843
1268
|
"$ref": "#/components/schemas/Sort"
|
|
844
1269
|
}
|
|
845
1270
|
},
|
|
846
1271
|
"hits": {
|
|
847
1272
|
"type": "array",
|
|
1273
|
+
"description": "The sorted array of search hits. Can be empty.",
|
|
848
1274
|
"items": {
|
|
849
1275
|
"type": "object"
|
|
850
1276
|
}
|
|
@@ -856,19 +1282,26 @@
|
|
|
856
1282
|
},
|
|
857
1283
|
"SiteId": {
|
|
858
1284
|
"type": "string",
|
|
1285
|
+
"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",
|
|
1286
|
+
"example": "RefArch",
|
|
859
1287
|
"maxLength": 32,
|
|
860
1288
|
"minLength": 1
|
|
861
1289
|
},
|
|
862
1290
|
"CustomerListLink": {
|
|
863
1291
|
"type": "object",
|
|
1292
|
+
"description": "Document representing a link to a customer list.",
|
|
864
1293
|
"properties": {
|
|
865
1294
|
"customerListId": {
|
|
866
1295
|
"type": "string",
|
|
1296
|
+
"description": "The customer list identifier",
|
|
1297
|
+
"example": "customer-list-1",
|
|
867
1298
|
"maxLength": 256,
|
|
868
1299
|
"minLength": 1
|
|
869
1300
|
},
|
|
870
1301
|
"title": {
|
|
871
1302
|
"type": "string",
|
|
1303
|
+
"description": "The title of the customer list link",
|
|
1304
|
+
"example": "Default Customer List",
|
|
872
1305
|
"maxLength": 256
|
|
873
1306
|
}
|
|
874
1307
|
}
|
|
@@ -881,22 +1314,42 @@
|
|
|
881
1314
|
{
|
|
882
1315
|
"$ref": "#/components/schemas/SiteId"
|
|
883
1316
|
}
|
|
884
|
-
]
|
|
1317
|
+
],
|
|
1318
|
+
"description": "The ID of the site.",
|
|
1319
|
+
"title": "ID"
|
|
885
1320
|
},
|
|
886
1321
|
"displayName": {
|
|
887
1322
|
"type": "object",
|
|
888
1323
|
"additionalProperties": {
|
|
889
1324
|
"type": "string",
|
|
1325
|
+
"description": "Localized string",
|
|
1326
|
+
"example": "Site Display Name",
|
|
890
1327
|
"maxLength": 4000
|
|
891
1328
|
},
|
|
1329
|
+
"description": "B2C Commerce API - Localization doc: https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html",
|
|
1330
|
+
"example": {
|
|
1331
|
+
"default": "Site Display Name",
|
|
1332
|
+
"en-US": "Site Display Name",
|
|
1333
|
+
"de-DE": "Site-Anzeigename",
|
|
1334
|
+
"ja-JP": "サイト表示名"
|
|
1335
|
+
},
|
|
892
1336
|
"x-format": "localized"
|
|
893
1337
|
},
|
|
894
1338
|
"description": {
|
|
895
1339
|
"type": "object",
|
|
896
1340
|
"additionalProperties": {
|
|
897
1341
|
"type": "string",
|
|
1342
|
+
"description": "Localized string",
|
|
1343
|
+
"example": "Site Description",
|
|
898
1344
|
"maxLength": 4000
|
|
899
1345
|
},
|
|
1346
|
+
"description": "B2C Commerce API - Localization doc: https://developer.salesforce.com/docs/commerce/commerce-api/guide/b2c-localization.html",
|
|
1347
|
+
"example": {
|
|
1348
|
+
"default": "Site Description",
|
|
1349
|
+
"en-US": "Site Description",
|
|
1350
|
+
"de-DE": "Site-Beschreibung",
|
|
1351
|
+
"ja-JP": "サイトの説明"
|
|
1352
|
+
},
|
|
900
1353
|
"x-format": "localized"
|
|
901
1354
|
},
|
|
902
1355
|
"customerListLink": {
|
|
@@ -904,41 +1357,56 @@
|
|
|
904
1357
|
{
|
|
905
1358
|
"$ref": "#/components/schemas/CustomerListLink"
|
|
906
1359
|
}
|
|
907
|
-
]
|
|
1360
|
+
],
|
|
1361
|
+
"description": "The link to the customer list"
|
|
908
1362
|
},
|
|
909
1363
|
"inDeletion": {
|
|
910
|
-
"type": "boolean"
|
|
1364
|
+
"type": "boolean",
|
|
1365
|
+
"description": "Specifies whether the site status is in deletion (true) or not (false)",
|
|
1366
|
+
"example": false
|
|
911
1367
|
},
|
|
912
1368
|
"storefrontStatus": {
|
|
913
1369
|
"type": "string",
|
|
1370
|
+
"description": "Status of the storefront",
|
|
914
1371
|
"enum": [
|
|
915
1372
|
"online",
|
|
916
1373
|
"maintenance",
|
|
917
1374
|
"to_be_deleted",
|
|
918
1375
|
"protected"
|
|
919
|
-
]
|
|
1376
|
+
],
|
|
1377
|
+
"example": "online"
|
|
920
1378
|
},
|
|
921
1379
|
"siteCatalogId": {
|
|
922
1380
|
"type": "string",
|
|
1381
|
+
"description": "The catalog bound to the given site.",
|
|
1382
|
+
"example": "storefront-catalog-m-en",
|
|
923
1383
|
"maxLength": 256,
|
|
924
1384
|
"minLength": 1
|
|
925
1385
|
},
|
|
926
1386
|
"cartridges": {
|
|
927
1387
|
"type": "string",
|
|
1388
|
+
"description": "The effective cartridge path for the site, delimited by ':'. Includes both system cartridges and the site's custom cartridges (see `customCartridges`).",
|
|
1389
|
+
"example": "app_storefront_base:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
928
1390
|
"maxLength": 4000,
|
|
929
1391
|
"readOnly": true
|
|
930
1392
|
},
|
|
931
1393
|
"customCartridges": {
|
|
932
1394
|
"type": "string",
|
|
1395
|
+
"description": "The custom cartridge path assigned to the site, delimited by ':'. Does not include system cartridges. This is the subset of `cartridges` that can be configured for the site.",
|
|
1396
|
+
"example": "app_storefront_base",
|
|
933
1397
|
"maxLength": 4000
|
|
934
1398
|
},
|
|
935
1399
|
"creationDate": {
|
|
936
1400
|
"type": "string",
|
|
937
|
-
"format": "date-time"
|
|
1401
|
+
"format": "date-time",
|
|
1402
|
+
"description": "The timestamp when the site was created.",
|
|
1403
|
+
"example": "2024-01-15T10:00:00Z"
|
|
938
1404
|
},
|
|
939
1405
|
"lastModified": {
|
|
940
1406
|
"type": "string",
|
|
941
|
-
"format": "date-time"
|
|
1407
|
+
"format": "date-time",
|
|
1408
|
+
"description": "The timestamp when the site was last modified.",
|
|
1409
|
+
"example": "2024-10-14T15:30:00Z"
|
|
942
1410
|
}
|
|
943
1411
|
},
|
|
944
1412
|
"required": [
|
|
@@ -951,9 +1419,11 @@
|
|
|
951
1419
|
"$ref": "#/components/schemas/PaginatedSearchResult"
|
|
952
1420
|
}
|
|
953
1421
|
],
|
|
1422
|
+
"description": "Document representing a site search result. This includes the query, sorts, hits (array of Site objects), and pagination information.",
|
|
954
1423
|
"properties": {
|
|
955
1424
|
"hits": {
|
|
956
1425
|
"type": "array",
|
|
1426
|
+
"description": "The sorted array of search hits (Site objects). Can be empty.",
|
|
957
1427
|
"items": {
|
|
958
1428
|
"$ref": "#/components/schemas/Site"
|
|
959
1429
|
}
|
|
@@ -970,17 +1440,25 @@
|
|
|
970
1440
|
"properties": {
|
|
971
1441
|
"title": {
|
|
972
1442
|
"type": "string",
|
|
1443
|
+
"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",
|
|
1444
|
+
"example": "You do not have enough credit",
|
|
973
1445
|
"maxLength": 256
|
|
974
1446
|
},
|
|
975
1447
|
"type": {
|
|
976
1448
|
"type": "string",
|
|
1449
|
+
"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",
|
|
1450
|
+
"example": "NotEnoughMoney",
|
|
977
1451
|
"maxLength": 2048
|
|
978
1452
|
},
|
|
979
1453
|
"detail": {
|
|
980
|
-
"type": "string"
|
|
1454
|
+
"type": "string",
|
|
1455
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
1456
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
981
1457
|
},
|
|
982
1458
|
"instance": {
|
|
983
1459
|
"type": "string",
|
|
1460
|
+
"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",
|
|
1461
|
+
"example": "/account/12345/msgs/abc",
|
|
984
1462
|
"maxLength": 2048
|
|
985
1463
|
}
|
|
986
1464
|
},
|
|
@@ -992,6 +1470,8 @@
|
|
|
992
1470
|
},
|
|
993
1471
|
"Select": {
|
|
994
1472
|
"type": "string",
|
|
1473
|
+
"description": "The property selector declaring which fields are included into the response payload. You can specify a single field name, a comma-separated list of names or work with wildcards. You can also specify array operations and filter expressions. The actual selector value must be enclosed within parentheses. For more information, please read the documentation about property selectors [here](https://developer.salesforce.com/docs/commerce/commerce-api/guide/scapi-property-selection.html).",
|
|
1474
|
+
"example": "(name,id,variationAttributes.(**))",
|
|
995
1475
|
"minLength": 1,
|
|
996
1476
|
"pattern": "^[(].*[)]$"
|
|
997
1477
|
},
|
|
@@ -1001,9 +1481,11 @@
|
|
|
1001
1481
|
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
1002
1482
|
}
|
|
1003
1483
|
],
|
|
1484
|
+
"description": "Document representing a paginated list of sites.",
|
|
1004
1485
|
"properties": {
|
|
1005
1486
|
"data": {
|
|
1006
1487
|
"type": "array",
|
|
1488
|
+
"description": "The array of sites.",
|
|
1007
1489
|
"items": {
|
|
1008
1490
|
"$ref": "#/components/schemas/Site"
|
|
1009
1491
|
}
|
|
@@ -1015,9 +1497,12 @@
|
|
|
1015
1497
|
},
|
|
1016
1498
|
"SiteCustomCartridges": {
|
|
1017
1499
|
"type": "object",
|
|
1500
|
+
"description": "Document representing the custom cartridge path of a site - the colon-delimited list of\ncustom (non-system) cartridges assigned to the site. This is the mutable segment of the\nsite's cartridge path and aligns with the site import and export representation\n(`custom-cartridges`).\nEach cartridge name must start with a letter and contain only letters, numbers, or\nunderscores.\n",
|
|
1018
1501
|
"properties": {
|
|
1019
1502
|
"customCartridges": {
|
|
1020
1503
|
"type": "string",
|
|
1504
|
+
"description": "The custom cartridges assigned to the site, delimited by ':'.",
|
|
1505
|
+
"example": "plugin_custom_cartridge:plugin_wishlists",
|
|
1021
1506
|
"maxLength": 4000
|
|
1022
1507
|
}
|
|
1023
1508
|
},
|
|
@@ -1033,6 +1518,11 @@
|
|
|
1033
1518
|
"application/problem+json": {
|
|
1034
1519
|
"schema": {
|
|
1035
1520
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1521
|
+
},
|
|
1522
|
+
"examples": {
|
|
1523
|
+
"UnauthorizedExample": {
|
|
1524
|
+
"$ref": "#/components/examples/UnauthorizedExample"
|
|
1525
|
+
}
|
|
1036
1526
|
}
|
|
1037
1527
|
}
|
|
1038
1528
|
}
|
|
@@ -1043,6 +1533,11 @@
|
|
|
1043
1533
|
"application/problem+json": {
|
|
1044
1534
|
"schema": {
|
|
1045
1535
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
1536
|
+
},
|
|
1537
|
+
"examples": {
|
|
1538
|
+
"ForbiddenExample": {
|
|
1539
|
+
"$ref": "#/components/examples/ForbiddenExample"
|
|
1540
|
+
}
|
|
1046
1541
|
}
|
|
1047
1542
|
}
|
|
1048
1543
|
}
|
|
@@ -1052,12 +1547,14 @@
|
|
|
1052
1547
|
"organizationId": {
|
|
1053
1548
|
"name": "organizationId",
|
|
1054
1549
|
"in": "path",
|
|
1550
|
+
"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).",
|
|
1055
1551
|
"required": true,
|
|
1056
1552
|
"style": "simple",
|
|
1057
1553
|
"explode": false,
|
|
1058
1554
|
"schema": {
|
|
1059
1555
|
"$ref": "#/components/schemas/OrganizationId"
|
|
1060
|
-
}
|
|
1556
|
+
},
|
|
1557
|
+
"example": "f_ecom_zzxy_prd"
|
|
1061
1558
|
},
|
|
1062
1559
|
"select": {
|
|
1063
1560
|
"name": "select",
|
|
@@ -1067,12 +1564,463 @@
|
|
|
1067
1564
|
"explode": true,
|
|
1068
1565
|
"schema": {
|
|
1069
1566
|
"$ref": "#/components/schemas/Select"
|
|
1567
|
+
},
|
|
1568
|
+
"examples": {
|
|
1569
|
+
"select": {
|
|
1570
|
+
"value": "(**)"
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
"examples": {
|
|
1576
|
+
"SiteSearchById": {
|
|
1577
|
+
"summary": "Search sites by ID",
|
|
1578
|
+
"description": "Example of searching for sites by their ID using a term query",
|
|
1579
|
+
"value": {
|
|
1580
|
+
"query": {
|
|
1581
|
+
"termQuery": {
|
|
1582
|
+
"fields": [
|
|
1583
|
+
"id"
|
|
1584
|
+
],
|
|
1585
|
+
"operator": "is",
|
|
1586
|
+
"values": [
|
|
1587
|
+
"RefArch"
|
|
1588
|
+
]
|
|
1589
|
+
}
|
|
1590
|
+
},
|
|
1591
|
+
"limit": 10,
|
|
1592
|
+
"offset": 0
|
|
1593
|
+
}
|
|
1594
|
+
},
|
|
1595
|
+
"SiteSearchByDisplayName": {
|
|
1596
|
+
"summary": "Search sites by display name",
|
|
1597
|
+
"description": "Example of searching for sites by their display name using a text query",
|
|
1598
|
+
"value": {
|
|
1599
|
+
"query": {
|
|
1600
|
+
"textQuery": {
|
|
1601
|
+
"fields": [
|
|
1602
|
+
"displayName"
|
|
1603
|
+
],
|
|
1604
|
+
"searchPhrase": "Reference Architecture"
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
"limit": 25,
|
|
1608
|
+
"offset": 0,
|
|
1609
|
+
"sorts": [
|
|
1610
|
+
{
|
|
1611
|
+
"field": "displayName",
|
|
1612
|
+
"sortOrder": "asc"
|
|
1613
|
+
}
|
|
1614
|
+
]
|
|
1615
|
+
}
|
|
1616
|
+
},
|
|
1617
|
+
"SiteSearchActiveOnly": {
|
|
1618
|
+
"summary": "Search only non-deleted sites",
|
|
1619
|
+
"description": "Example of searching for sites that are not marked for deletion",
|
|
1620
|
+
"value": {
|
|
1621
|
+
"query": {
|
|
1622
|
+
"termQuery": {
|
|
1623
|
+
"fields": [
|
|
1624
|
+
"inDeletion"
|
|
1625
|
+
],
|
|
1626
|
+
"operator": "is",
|
|
1627
|
+
"values": [
|
|
1628
|
+
false
|
|
1629
|
+
]
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
"limit": 100,
|
|
1633
|
+
"offset": 0,
|
|
1634
|
+
"sorts": [
|
|
1635
|
+
{
|
|
1636
|
+
"field": "id",
|
|
1637
|
+
"sortOrder": "asc"
|
|
1638
|
+
}
|
|
1639
|
+
]
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1642
|
+
"SiteSearchComplex": {
|
|
1643
|
+
"summary": "Complex site search with multiple criteria",
|
|
1644
|
+
"description": "Example of a complex search combining multiple conditions",
|
|
1645
|
+
"value": {
|
|
1646
|
+
"query": {
|
|
1647
|
+
"boolQuery": {
|
|
1648
|
+
"must": [
|
|
1649
|
+
{
|
|
1650
|
+
"termQuery": {
|
|
1651
|
+
"fields": [
|
|
1652
|
+
"inDeletion"
|
|
1653
|
+
],
|
|
1654
|
+
"operator": "is",
|
|
1655
|
+
"values": [
|
|
1656
|
+
false
|
|
1657
|
+
]
|
|
1658
|
+
}
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
"textQuery": {
|
|
1662
|
+
"fields": [
|
|
1663
|
+
"displayName",
|
|
1664
|
+
"description"
|
|
1665
|
+
],
|
|
1666
|
+
"searchPhrase": "production"
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
]
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
"limit": 20,
|
|
1673
|
+
"offset": 0,
|
|
1674
|
+
"sorts": [
|
|
1675
|
+
{
|
|
1676
|
+
"field": "displayName",
|
|
1677
|
+
"sortOrder": "asc"
|
|
1678
|
+
}
|
|
1679
|
+
]
|
|
1680
|
+
}
|
|
1681
|
+
},
|
|
1682
|
+
"SiteSearchResultSuccess": {
|
|
1683
|
+
"summary": "Successful site search result",
|
|
1684
|
+
"description": "Example of a successful site search returning multiple sites",
|
|
1685
|
+
"value": {
|
|
1686
|
+
"limit": 2,
|
|
1687
|
+
"offset": 0,
|
|
1688
|
+
"total": 2,
|
|
1689
|
+
"hits": [
|
|
1690
|
+
{
|
|
1691
|
+
"id": "RefArch",
|
|
1692
|
+
"customerListLink": {
|
|
1693
|
+
"customerListId": "RefArch",
|
|
1694
|
+
"title": "Default Customer List"
|
|
1695
|
+
},
|
|
1696
|
+
"displayName": {
|
|
1697
|
+
"default": "displayName",
|
|
1698
|
+
"en": "An English displayName",
|
|
1699
|
+
"de": "A German displayName"
|
|
1700
|
+
},
|
|
1701
|
+
"description": {
|
|
1702
|
+
"default": "description",
|
|
1703
|
+
"en": "An English description",
|
|
1704
|
+
"de": "A German description"
|
|
1705
|
+
},
|
|
1706
|
+
"inDeletion": false,
|
|
1707
|
+
"storefrontStatus": "online",
|
|
1708
|
+
"siteCatalogId": "storefront-catalog-m-en",
|
|
1709
|
+
"cartridges": "plugin_custom_cartridge:plugin_wishlists:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1710
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists",
|
|
1711
|
+
"creationDate": "2024-01-15T10:00:00.000Z",
|
|
1712
|
+
"lastModified": "2024-10-14T15:30:00.000Z"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"id": "RefArchGlobal",
|
|
1716
|
+
"customerListLink": {
|
|
1717
|
+
"customerListId": "RefArchGlobal",
|
|
1718
|
+
"title": "Default Customer List"
|
|
1719
|
+
},
|
|
1720
|
+
"displayName": {
|
|
1721
|
+
"default": "displayName",
|
|
1722
|
+
"en": "An English displayName",
|
|
1723
|
+
"de": "A German displayName"
|
|
1724
|
+
},
|
|
1725
|
+
"description": {
|
|
1726
|
+
"default": "description",
|
|
1727
|
+
"en": "An English description",
|
|
1728
|
+
"de": "A German description"
|
|
1729
|
+
},
|
|
1730
|
+
"inDeletion": false,
|
|
1731
|
+
"storefrontStatus": "online",
|
|
1732
|
+
"siteCatalogId": "storefront-catalog-m-de",
|
|
1733
|
+
"cartridges": "plugin_custom_cartridge:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1734
|
+
"customCartridges": "plugin_custom_cartridge",
|
|
1735
|
+
"creationDate": "2024-02-10T08:00:00.000Z",
|
|
1736
|
+
"lastModified": "2024-11-01T12:00:00.000Z"
|
|
1737
|
+
}
|
|
1738
|
+
],
|
|
1739
|
+
"query": {
|
|
1740
|
+
"termQuery": {
|
|
1741
|
+
"fields": [
|
|
1742
|
+
"inDeletion"
|
|
1743
|
+
],
|
|
1744
|
+
"operator": "is",
|
|
1745
|
+
"values": [
|
|
1746
|
+
false
|
|
1747
|
+
]
|
|
1748
|
+
}
|
|
1749
|
+
},
|
|
1750
|
+
"sorts": [
|
|
1751
|
+
{
|
|
1752
|
+
"field": "id",
|
|
1753
|
+
"sortOrder": "asc"
|
|
1754
|
+
}
|
|
1755
|
+
]
|
|
1756
|
+
}
|
|
1757
|
+
},
|
|
1758
|
+
"SiteSearchResultSingle": {
|
|
1759
|
+
"summary": "Single site search result",
|
|
1760
|
+
"description": "Example of a site search returning a single site",
|
|
1761
|
+
"value": {
|
|
1762
|
+
"limit": 1,
|
|
1763
|
+
"offset": 0,
|
|
1764
|
+
"total": 1,
|
|
1765
|
+
"hits": [
|
|
1766
|
+
{
|
|
1767
|
+
"id": "RefArch",
|
|
1768
|
+
"customerListLink": {
|
|
1769
|
+
"customerListId": "RefArch",
|
|
1770
|
+
"title": "Default Customer List"
|
|
1771
|
+
},
|
|
1772
|
+
"displayName": {
|
|
1773
|
+
"default": "displayName",
|
|
1774
|
+
"en": "An English displayName",
|
|
1775
|
+
"de": "A German displayName"
|
|
1776
|
+
},
|
|
1777
|
+
"description": {
|
|
1778
|
+
"default": "description",
|
|
1779
|
+
"en": "An English description",
|
|
1780
|
+
"de": "A German description"
|
|
1781
|
+
},
|
|
1782
|
+
"inDeletion": false,
|
|
1783
|
+
"storefrontStatus": "online",
|
|
1784
|
+
"siteCatalogId": "storefront-catalog-m-en",
|
|
1785
|
+
"cartridges": "plugin_custom_cartridge:plugin_wishlists:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1786
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists",
|
|
1787
|
+
"creationDate": "2024-01-15T10:00:00.000Z",
|
|
1788
|
+
"lastModified": "2024-10-14T15:30:00.000Z"
|
|
1789
|
+
}
|
|
1790
|
+
],
|
|
1791
|
+
"query": {
|
|
1792
|
+
"termQuery": {
|
|
1793
|
+
"fields": [
|
|
1794
|
+
"id"
|
|
1795
|
+
],
|
|
1796
|
+
"operator": "is",
|
|
1797
|
+
"values": [
|
|
1798
|
+
"RefArch"
|
|
1799
|
+
]
|
|
1800
|
+
}
|
|
1801
|
+
},
|
|
1802
|
+
"sorts": [
|
|
1803
|
+
{
|
|
1804
|
+
"field": "id",
|
|
1805
|
+
"sortOrder": "asc"
|
|
1806
|
+
}
|
|
1807
|
+
]
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
"MalformedSearchParameter": {
|
|
1811
|
+
"summary": "Malformed search query",
|
|
1812
|
+
"description": "Example of an error when the search query is malformed or invalid",
|
|
1813
|
+
"value": {
|
|
1814
|
+
"title": "Malformed Search Parameter",
|
|
1815
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-search-parameter",
|
|
1816
|
+
"detail": "The search query contains invalid syntax. Please check the query structure and try again."
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
"InvalidFieldName": {
|
|
1820
|
+
"summary": "Unqueryable Field",
|
|
1821
|
+
"description": "Example of an error when an invalid field name is used in the search query",
|
|
1822
|
+
"value": {
|
|
1823
|
+
"title": "Unqueryable Field",
|
|
1824
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unqueryable-field",
|
|
1825
|
+
"detail": "The field 'invalid_field' is not a searchable attribute for sites. Valid fields are: id, displayName, description, inDeletion."
|
|
1826
|
+
}
|
|
1827
|
+
},
|
|
1828
|
+
"InvalidSortField": {
|
|
1829
|
+
"summary": "Field Not Sortable",
|
|
1830
|
+
"description": "Example of an error when an invalid field is used for sorting",
|
|
1831
|
+
"value": {
|
|
1832
|
+
"title": "Field Not Sortable",
|
|
1833
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/field-not-sortable",
|
|
1834
|
+
"detail": "The field 'invalid_sort' is not a sortable attribute for sites. Valid sortable fields are: id, displayName, description, inDeletion."
|
|
1835
|
+
}
|
|
1836
|
+
},
|
|
1837
|
+
"UnauthorizedExample": {
|
|
1838
|
+
"value": {
|
|
1839
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
1840
|
+
"title": "Unauthorized",
|
|
1841
|
+
"detail": "Unauthorized request"
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
"ForbiddenExample": {
|
|
1845
|
+
"value": {
|
|
1846
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
|
|
1847
|
+
"title": "Forbidden",
|
|
1848
|
+
"detail": "Access to requested resource forbidden"
|
|
1849
|
+
}
|
|
1850
|
+
},
|
|
1851
|
+
"GetSitesSuccess": {
|
|
1852
|
+
"summary": "Successful retrieval of sites",
|
|
1853
|
+
"description": "Example of a successful response returning a paginated list of sites with `select=(**)` applied.",
|
|
1854
|
+
"value": {
|
|
1855
|
+
"limit": 3,
|
|
1856
|
+
"offset": 0,
|
|
1857
|
+
"total": 3,
|
|
1858
|
+
"data": [
|
|
1859
|
+
{
|
|
1860
|
+
"id": "RefArch",
|
|
1861
|
+
"displayName": {
|
|
1862
|
+
"default": "Reference Architecture Site"
|
|
1863
|
+
},
|
|
1864
|
+
"description": {
|
|
1865
|
+
"default": "Main storefront for reference architecture"
|
|
1866
|
+
},
|
|
1867
|
+
"inDeletion": false,
|
|
1868
|
+
"storefrontStatus": "online",
|
|
1869
|
+
"siteCatalogId": "storefront-catalog-m-en",
|
|
1870
|
+
"cartridges": "plugin_custom_cartridge:plugin_wishlists:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1871
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists",
|
|
1872
|
+
"customerListLink": {
|
|
1873
|
+
"customerListId": "customer-list-1",
|
|
1874
|
+
"title": "Default Customer List"
|
|
1875
|
+
},
|
|
1876
|
+
"creationDate": "2024-01-15T10:00:00.000Z",
|
|
1877
|
+
"lastModified": "2024-10-14T15:30:00.000Z"
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
"id": "SiteGenesis",
|
|
1881
|
+
"displayName": {
|
|
1882
|
+
"default": "SiteGenesis Demo Site"
|
|
1883
|
+
},
|
|
1884
|
+
"description": {
|
|
1885
|
+
"default": "Demo site for testing purposes"
|
|
1886
|
+
},
|
|
1887
|
+
"inDeletion": false,
|
|
1888
|
+
"storefrontStatus": "online",
|
|
1889
|
+
"siteCatalogId": "storefront-catalog-sg",
|
|
1890
|
+
"cartridges": "plugin_custom_cartridge:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1891
|
+
"customCartridges": "plugin_custom_cartridge",
|
|
1892
|
+
"customerListLink": {
|
|
1893
|
+
"customerListId": "customer-list-sg",
|
|
1894
|
+
"title": "SiteGenesis Customer List"
|
|
1895
|
+
},
|
|
1896
|
+
"creationDate": "2023-06-10T08:00:00.000Z",
|
|
1897
|
+
"lastModified": "2024-09-20T12:45:00.000Z"
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
"id": "MobileSite",
|
|
1901
|
+
"displayName": {
|
|
1902
|
+
"default": "Mobile First Site"
|
|
1903
|
+
},
|
|
1904
|
+
"description": {
|
|
1905
|
+
"default": "Optimized for mobile shopping experience"
|
|
1906
|
+
},
|
|
1907
|
+
"inDeletion": false,
|
|
1908
|
+
"storefrontStatus": "maintenance",
|
|
1909
|
+
"siteCatalogId": "mobile-catalog",
|
|
1910
|
+
"cartridges": "plugin_wishlists:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1911
|
+
"customCartridges": "plugin_wishlists",
|
|
1912
|
+
"creationDate": "2024-03-01T14:20:00.000Z",
|
|
1913
|
+
"lastModified": "2024-10-10T09:15:00.000Z"
|
|
1914
|
+
}
|
|
1915
|
+
]
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"GetSitesWithSelect": {
|
|
1919
|
+
"summary": "Sites with select filter applied",
|
|
1920
|
+
"description": "Example of a response when the select parameter limits returned fields",
|
|
1921
|
+
"value": {
|
|
1922
|
+
"limit": 2,
|
|
1923
|
+
"offset": 0,
|
|
1924
|
+
"total": 2,
|
|
1925
|
+
"data": [
|
|
1926
|
+
{
|
|
1927
|
+
"id": "RefArch"
|
|
1928
|
+
},
|
|
1929
|
+
{
|
|
1930
|
+
"id": "SiteGenesis"
|
|
1931
|
+
}
|
|
1932
|
+
]
|
|
1933
|
+
}
|
|
1934
|
+
},
|
|
1935
|
+
"GetSiteByIdSuccess": {
|
|
1936
|
+
"summary": "Successful retrieval of a single site",
|
|
1937
|
+
"description": "Example of a successful response returning a single site by its ID",
|
|
1938
|
+
"value": {
|
|
1939
|
+
"id": "RefArch",
|
|
1940
|
+
"displayName": {
|
|
1941
|
+
"default": "Reference Architecture Site"
|
|
1942
|
+
},
|
|
1943
|
+
"description": {
|
|
1944
|
+
"default": "Main storefront for reference architecture"
|
|
1945
|
+
},
|
|
1946
|
+
"inDeletion": false,
|
|
1947
|
+
"storefrontStatus": "online",
|
|
1948
|
+
"siteCatalogId": "storefront-catalog-m-en",
|
|
1949
|
+
"cartridges": "plugin_custom_cartridge:plugin_wishlists:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1950
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists",
|
|
1951
|
+
"customerListLink": {
|
|
1952
|
+
"customerListId": "customer-list-1",
|
|
1953
|
+
"title": "Default Customer List"
|
|
1954
|
+
},
|
|
1955
|
+
"creationDate": "2024-01-15T10:00:00.000Z",
|
|
1956
|
+
"lastModified": "2024-10-14T15:30:00.000Z"
|
|
1957
|
+
}
|
|
1958
|
+
},
|
|
1959
|
+
"GetSiteByIdMaintenance": {
|
|
1960
|
+
"summary": "Site in maintenance mode",
|
|
1961
|
+
"description": "Example of a site with maintenance storefront status",
|
|
1962
|
+
"value": {
|
|
1963
|
+
"id": "MobileSite",
|
|
1964
|
+
"displayName": {
|
|
1965
|
+
"default": "Mobile First Site"
|
|
1966
|
+
},
|
|
1967
|
+
"description": {
|
|
1968
|
+
"default": "Optimized for mobile shopping experience"
|
|
1969
|
+
},
|
|
1970
|
+
"inDeletion": false,
|
|
1971
|
+
"storefrontStatus": "maintenance",
|
|
1972
|
+
"siteCatalogId": "mobile-catalog",
|
|
1973
|
+
"cartridges": "plugin_wishlists:plugin_apple_pay:plugin_facebook:plugin_payments:plugin_pinterest_commerce:plugin_web_payments:bc_content:core",
|
|
1974
|
+
"customCartridges": "plugin_wishlists",
|
|
1975
|
+
"creationDate": "2024-03-01T14:20:00.000Z",
|
|
1976
|
+
"lastModified": "2024-10-10T09:15:00.000Z"
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
"SiteNotFound": {
|
|
1980
|
+
"summary": "Site Not Found",
|
|
1981
|
+
"description": "Example of an error when the requested site ID does not exist",
|
|
1982
|
+
"value": {
|
|
1983
|
+
"title": "Site Not Found",
|
|
1984
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/site-not-found",
|
|
1985
|
+
"detail": "No site with ID 'unknown' could be found."
|
|
1986
|
+
}
|
|
1987
|
+
},
|
|
1988
|
+
"GetSiteCustomCartridgesSuccess": {
|
|
1989
|
+
"summary": "Successful retrieval of a site's custom cartridge path",
|
|
1990
|
+
"description": "Example of a successful response returning the site's custom cartridge path",
|
|
1991
|
+
"value": {
|
|
1992
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists"
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1995
|
+
"ReplaceSiteCustomCartridgesRequest": {
|
|
1996
|
+
"summary": "Replace the custom cartridge path",
|
|
1997
|
+
"description": "Example of replacing a site's custom cartridge path with a new colon-delimited list",
|
|
1998
|
+
"value": {
|
|
1999
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists:plugin_loyalty"
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
"ReplaceSiteCustomCartridgesSuccess": {
|
|
2003
|
+
"summary": "Successfully replaced a site's custom cartridge path",
|
|
2004
|
+
"description": "Example of a successful response after replacing the site's custom cartridge path",
|
|
2005
|
+
"value": {
|
|
2006
|
+
"customCartridges": "plugin_custom_cartridge:plugin_wishlists:plugin_loyalty"
|
|
2007
|
+
}
|
|
2008
|
+
},
|
|
2009
|
+
"InvalidCartridgePath": {
|
|
2010
|
+
"summary": "Invalid Cartridge Path",
|
|
2011
|
+
"description": "Example of an error when a specified cartridge name does not match the required format",
|
|
2012
|
+
"value": {
|
|
2013
|
+
"title": "Invalid Cartridge Path",
|
|
2014
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-cartridge-path",
|
|
2015
|
+
"detail": "Invalid cartridge path '123_invalid': The cartridge name may only contain letters, numbers, or '_', must start with a letter, and be separated by ':'.",
|
|
2016
|
+
"cartridge": "123_invalid"
|
|
1070
2017
|
}
|
|
1071
2018
|
}
|
|
1072
2019
|
},
|
|
1073
2020
|
"securitySchemes": {
|
|
1074
2021
|
"AmOAuth2": {
|
|
1075
2022
|
"type": "oauth2",
|
|
2023
|
+
"description": "OAuth 2.0 security scheme for Admin API access using Account Manager.\nRequires appropriate scopes for site management operations.\n",
|
|
1076
2024
|
"flows": {
|
|
1077
2025
|
"clientCredentials": {
|
|
1078
2026
|
"tokenUrl": "https://account.demandware.com/dw/oauth2/access_token",
|