@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,7 +2,8 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Source Code Groups",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/source-code-groups/source-code-groups-oas-v1-public.yaml)\n\n# API Overview\n\nAPIs that support the creation, update, deletions and search of source code groups. \n\n## Authentication & Authorization\n\nThe client requesting the source code information must have access to the Source Code resource. For resource access, you must use a client ID and client secret from Account Manager to request an access token. The access token is used as a bearer token and added to the Authorization header of your API request. The client must first authenticate against Account Manager to log in.\n\nYou must include `sfcc.source-codes` or `sfcc.source-codes.rw` in the client ID used to generate the token. For a full list of required permissions, see the [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\nFor detailed setup instructions, see [Authorization for Admin APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guide/authorization-for-admin-apis.html).\n\n## Response Details\n\n### Timeouts\n\nAdmin API requests must respond within 60 seconds. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)",
|
|
6
|
+
"version": "1.0.42",
|
|
6
7
|
"x-api-type": "Admin",
|
|
7
8
|
"x-api-family": "Pricing"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/pricing/source-code-groups/v1",
|
|
12
13
|
"variables": {
|
|
13
14
|
"shortCode": {
|
|
15
|
+
"description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
|
|
14
16
|
"default": "shortCode"
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -19,21 +21,25 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/source-code-groups/{id}": {
|
|
21
23
|
"get": {
|
|
24
|
+
"summary": "Retrieve source code group information.",
|
|
22
25
|
"operationId": "getSourceCodeGroup",
|
|
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": "id",
|
|
36
41
|
"in": "path",
|
|
42
|
+
"description": "The unique identifier of the source code group.",
|
|
37
43
|
"required": true,
|
|
38
44
|
"style": "simple",
|
|
39
45
|
"explode": false,
|
|
@@ -44,11 +50,17 @@
|
|
|
44
50
|
{
|
|
45
51
|
"name": "siteId",
|
|
46
52
|
"in": "query",
|
|
53
|
+
"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.",
|
|
47
54
|
"required": true,
|
|
48
55
|
"style": "form",
|
|
49
56
|
"explode": true,
|
|
50
57
|
"schema": {
|
|
51
58
|
"$ref": "#/components/schemas/SiteId"
|
|
59
|
+
},
|
|
60
|
+
"examples": {
|
|
61
|
+
"SiteId": {
|
|
62
|
+
"value": "RefArch"
|
|
63
|
+
}
|
|
52
64
|
}
|
|
53
65
|
}
|
|
54
66
|
],
|
|
@@ -59,16 +71,26 @@
|
|
|
59
71
|
"application/json": {
|
|
60
72
|
"schema": {
|
|
61
73
|
"$ref": "#/components/schemas/SourceCodeGroup"
|
|
74
|
+
},
|
|
75
|
+
"examples": {
|
|
76
|
+
"GetSourceCodeGroup": {
|
|
77
|
+
"$ref": "#/components/examples/GetSourceCodeGroup"
|
|
78
|
+
}
|
|
62
79
|
}
|
|
63
80
|
}
|
|
64
81
|
}
|
|
65
82
|
},
|
|
66
83
|
"404": {
|
|
67
|
-
"description": "
|
|
84
|
+
"description": "Returned when the source code group does not exist or does not match the given ID.\n",
|
|
68
85
|
"content": {
|
|
69
86
|
"application/json": {
|
|
70
87
|
"schema": {
|
|
71
88
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
89
|
+
},
|
|
90
|
+
"examples": {
|
|
91
|
+
"SourceCodeGroupNotFound404": {
|
|
92
|
+
"$ref": "#/components/examples/SourceCodeGroupNotFound404"
|
|
93
|
+
}
|
|
72
94
|
}
|
|
73
95
|
}
|
|
74
96
|
}
|
|
@@ -84,21 +106,25 @@
|
|
|
84
106
|
]
|
|
85
107
|
},
|
|
86
108
|
"put": {
|
|
109
|
+
"summary": "Create a source code group using the information provided.",
|
|
87
110
|
"operationId": "createSourceCodeGroup",
|
|
88
111
|
"parameters": [
|
|
89
112
|
{
|
|
90
113
|
"name": "organizationId",
|
|
91
114
|
"in": "path",
|
|
115
|
+
"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).",
|
|
92
116
|
"required": true,
|
|
93
117
|
"style": "simple",
|
|
94
118
|
"explode": false,
|
|
95
119
|
"schema": {
|
|
96
120
|
"$ref": "#/components/schemas/OrganizationId"
|
|
97
|
-
}
|
|
121
|
+
},
|
|
122
|
+
"example": "f_ecom_zzxy_prd"
|
|
98
123
|
},
|
|
99
124
|
{
|
|
100
125
|
"name": "id",
|
|
101
126
|
"in": "path",
|
|
127
|
+
"description": "The unique identifier of the source code group.",
|
|
102
128
|
"required": true,
|
|
103
129
|
"style": "simple",
|
|
104
130
|
"explode": false,
|
|
@@ -109,11 +135,17 @@
|
|
|
109
135
|
{
|
|
110
136
|
"name": "siteId",
|
|
111
137
|
"in": "query",
|
|
138
|
+
"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.",
|
|
112
139
|
"required": true,
|
|
113
140
|
"style": "form",
|
|
114
141
|
"explode": true,
|
|
115
142
|
"schema": {
|
|
116
143
|
"$ref": "#/components/schemas/SiteId"
|
|
144
|
+
},
|
|
145
|
+
"examples": {
|
|
146
|
+
"SiteId": {
|
|
147
|
+
"value": "RefArch"
|
|
148
|
+
}
|
|
117
149
|
}
|
|
118
150
|
}
|
|
119
151
|
],
|
|
@@ -133,16 +165,29 @@
|
|
|
133
165
|
"application/json": {
|
|
134
166
|
"schema": {
|
|
135
167
|
"$ref": "#/components/schemas/SourceCodeGroup"
|
|
168
|
+
},
|
|
169
|
+
"examples": {
|
|
170
|
+
"CreateSourceCodeGroup": {
|
|
171
|
+
"$ref": "#/components/examples/CreateSourceCodeGroup"
|
|
172
|
+
}
|
|
136
173
|
}
|
|
137
174
|
}
|
|
138
175
|
}
|
|
139
176
|
},
|
|
140
177
|
"400": {
|
|
141
|
-
"description": "Possible reasons:\n-
|
|
178
|
+
"description": "Possible reasons:\n- Returned when the ID given in the request URL is different from the ID provided in the source code group document.\n- The source code group peovided is not valid.\n",
|
|
142
179
|
"content": {
|
|
143
180
|
"application/json": {
|
|
144
181
|
"schema": {
|
|
145
182
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
183
|
+
},
|
|
184
|
+
"examples": {
|
|
185
|
+
"IdConflict400": {
|
|
186
|
+
"$ref": "#/components/examples/IdConflict400"
|
|
187
|
+
},
|
|
188
|
+
"SourceCodeGroupInvalid400": {
|
|
189
|
+
"$ref": "#/components/examples/SourceCodeGroupInvalid400"
|
|
190
|
+
}
|
|
146
191
|
}
|
|
147
192
|
}
|
|
148
193
|
}
|
|
@@ -157,21 +202,25 @@
|
|
|
157
202
|
]
|
|
158
203
|
},
|
|
159
204
|
"delete": {
|
|
205
|
+
"summary": "Delete the specified source code group ID.",
|
|
160
206
|
"operationId": "deleteSourceCodeGroup",
|
|
161
207
|
"parameters": [
|
|
162
208
|
{
|
|
163
209
|
"name": "organizationId",
|
|
164
210
|
"in": "path",
|
|
211
|
+
"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).",
|
|
165
212
|
"required": true,
|
|
166
213
|
"style": "simple",
|
|
167
214
|
"explode": false,
|
|
168
215
|
"schema": {
|
|
169
216
|
"$ref": "#/components/schemas/OrganizationId"
|
|
170
|
-
}
|
|
217
|
+
},
|
|
218
|
+
"example": "f_ecom_zzxy_prd"
|
|
171
219
|
},
|
|
172
220
|
{
|
|
173
221
|
"name": "id",
|
|
174
222
|
"in": "path",
|
|
223
|
+
"description": "The unique identifier of the source code group.",
|
|
175
224
|
"required": true,
|
|
176
225
|
"style": "simple",
|
|
177
226
|
"explode": false,
|
|
@@ -182,11 +231,17 @@
|
|
|
182
231
|
{
|
|
183
232
|
"name": "siteId",
|
|
184
233
|
"in": "query",
|
|
234
|
+
"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.",
|
|
185
235
|
"required": true,
|
|
186
236
|
"style": "form",
|
|
187
237
|
"explode": true,
|
|
188
238
|
"schema": {
|
|
189
239
|
"$ref": "#/components/schemas/SiteId"
|
|
240
|
+
},
|
|
241
|
+
"examples": {
|
|
242
|
+
"SiteId": {
|
|
243
|
+
"value": "RefArch"
|
|
244
|
+
}
|
|
190
245
|
}
|
|
191
246
|
}
|
|
192
247
|
],
|
|
@@ -204,21 +259,25 @@
|
|
|
204
259
|
]
|
|
205
260
|
},
|
|
206
261
|
"patch": {
|
|
262
|
+
"summary": "Update the source code group with the specified information.",
|
|
207
263
|
"operationId": "updateSourceCodeGroup",
|
|
208
264
|
"parameters": [
|
|
209
265
|
{
|
|
210
266
|
"name": "organizationId",
|
|
211
267
|
"in": "path",
|
|
268
|
+
"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).",
|
|
212
269
|
"required": true,
|
|
213
270
|
"style": "simple",
|
|
214
271
|
"explode": false,
|
|
215
272
|
"schema": {
|
|
216
273
|
"$ref": "#/components/schemas/OrganizationId"
|
|
217
|
-
}
|
|
274
|
+
},
|
|
275
|
+
"example": "f_ecom_zzxy_prd"
|
|
218
276
|
},
|
|
219
277
|
{
|
|
220
278
|
"name": "id",
|
|
221
279
|
"in": "path",
|
|
280
|
+
"description": "The unique identifier of the source code group.",
|
|
222
281
|
"required": true,
|
|
223
282
|
"style": "simple",
|
|
224
283
|
"explode": false,
|
|
@@ -229,11 +288,17 @@
|
|
|
229
288
|
{
|
|
230
289
|
"name": "siteId",
|
|
231
290
|
"in": "query",
|
|
291
|
+
"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.",
|
|
232
292
|
"required": true,
|
|
233
293
|
"style": "form",
|
|
234
294
|
"explode": true,
|
|
235
295
|
"schema": {
|
|
236
296
|
"$ref": "#/components/schemas/SiteId"
|
|
297
|
+
},
|
|
298
|
+
"examples": {
|
|
299
|
+
"SiteId": {
|
|
300
|
+
"value": "RefArch"
|
|
301
|
+
}
|
|
237
302
|
}
|
|
238
303
|
}
|
|
239
304
|
],
|
|
@@ -253,16 +318,26 @@
|
|
|
253
318
|
"application/json": {
|
|
254
319
|
"schema": {
|
|
255
320
|
"$ref": "#/components/schemas/SourceCodeGroup"
|
|
321
|
+
},
|
|
322
|
+
"examples": {
|
|
323
|
+
"UpdateSourceCodeGroup": {
|
|
324
|
+
"$ref": "#/components/examples/UpdateSourceCodeGroup"
|
|
325
|
+
}
|
|
256
326
|
}
|
|
257
327
|
}
|
|
258
328
|
}
|
|
259
329
|
},
|
|
260
330
|
"404": {
|
|
261
|
-
"description": "
|
|
331
|
+
"description": "Returned when the source code group does not exist matching the given ID.\n",
|
|
262
332
|
"content": {
|
|
263
333
|
"application/json": {
|
|
264
334
|
"schema": {
|
|
265
335
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
336
|
+
},
|
|
337
|
+
"examples": {
|
|
338
|
+
"SourceCodeGroupNotFound404": {
|
|
339
|
+
"$ref": "#/components/examples/SourceCodeGroupNotFound404"
|
|
340
|
+
}
|
|
266
341
|
}
|
|
267
342
|
}
|
|
268
343
|
}
|
|
@@ -279,26 +354,36 @@
|
|
|
279
354
|
},
|
|
280
355
|
"/organizations/{organizationId}/source-code-groups": {
|
|
281
356
|
"post": {
|
|
357
|
+
"summary": "Search for source code groups.",
|
|
358
|
+
"description": "\nThe following query attributes can be used to narrow the search:\n \n | Attribute | Type |\n |-----------|--------|\n | id| String |\n | description | String |\n | sourceCode | String |\n | startTime | DateTime |\n | endTime | DateTime |\n | creationDate | DateTime |\n | enabled | Boolean |\n | active | Boolean |\n\nThe sourceCode and active fields can only be used in queries as conjunctions (using AND). If the field is used in a disjunction\n(OR), an exception is thrown.\n\nThe query output can also be sorted with the following attributes:\n \n | Attribute | Type |\n |-----------|--------|\n | id| String |\n | description | String |\n | enabled | Boolean |\n | creationDate | DateTime |",
|
|
282
359
|
"operationId": "sourceCodeGroupsSearch",
|
|
283
360
|
"parameters": [
|
|
284
361
|
{
|
|
285
362
|
"name": "organizationId",
|
|
286
363
|
"in": "path",
|
|
364
|
+
"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).",
|
|
287
365
|
"required": true,
|
|
288
366
|
"style": "simple",
|
|
289
367
|
"explode": false,
|
|
290
368
|
"schema": {
|
|
291
369
|
"$ref": "#/components/schemas/OrganizationId"
|
|
292
|
-
}
|
|
370
|
+
},
|
|
371
|
+
"example": "f_ecom_zzxy_prd"
|
|
293
372
|
},
|
|
294
373
|
{
|
|
295
374
|
"name": "siteId",
|
|
296
375
|
"in": "query",
|
|
376
|
+
"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.",
|
|
297
377
|
"required": true,
|
|
298
378
|
"style": "form",
|
|
299
379
|
"explode": true,
|
|
300
380
|
"schema": {
|
|
301
381
|
"$ref": "#/components/schemas/SiteId"
|
|
382
|
+
},
|
|
383
|
+
"examples": {
|
|
384
|
+
"SiteId": {
|
|
385
|
+
"value": "RefArch"
|
|
386
|
+
}
|
|
302
387
|
}
|
|
303
388
|
}
|
|
304
389
|
],
|
|
@@ -318,12 +403,17 @@
|
|
|
318
403
|
"application/json": {
|
|
319
404
|
"schema": {
|
|
320
405
|
"$ref": "#/components/schemas/SourceCodeGroupSearchResult"
|
|
406
|
+
},
|
|
407
|
+
"examples": {
|
|
408
|
+
"SourceCodeGroupsSearch": {
|
|
409
|
+
"$ref": "#/components/examples/SourceCodeGroupsSearch"
|
|
410
|
+
}
|
|
321
411
|
}
|
|
322
412
|
}
|
|
323
413
|
}
|
|
324
414
|
},
|
|
325
415
|
"400": {
|
|
326
|
-
"description": "
|
|
416
|
+
"description": "Returned when the query is ill-formed.\n"
|
|
327
417
|
}
|
|
328
418
|
},
|
|
329
419
|
"security": [
|
|
@@ -341,25 +431,32 @@
|
|
|
341
431
|
"schemas": {
|
|
342
432
|
"OrganizationId": {
|
|
343
433
|
"type": "string",
|
|
344
|
-
"
|
|
345
|
-
"
|
|
434
|
+
"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).",
|
|
435
|
+
"example": "f_ecom_zzxy_prd",
|
|
436
|
+
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
346
437
|
},
|
|
347
438
|
"SourceCodeGroupId": {
|
|
348
439
|
"type": "string",
|
|
440
|
+
"description": "The ID of source code group.",
|
|
441
|
+
"example": "TV-Email",
|
|
349
442
|
"maxLength": 28,
|
|
350
443
|
"minLength": 1
|
|
351
444
|
},
|
|
352
445
|
"SiteId": {
|
|
353
446
|
"type": "string",
|
|
447
|
+
"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",
|
|
448
|
+
"example": "RefArch",
|
|
354
449
|
"maxLength": 32,
|
|
355
450
|
"minLength": 1
|
|
356
451
|
},
|
|
357
452
|
"SourceCodeRedirectInfo": {
|
|
358
453
|
"type": "object",
|
|
359
454
|
"additionalProperties": false,
|
|
455
|
+
"description": "Document representing source code redirect info.",
|
|
360
456
|
"properties": {
|
|
361
457
|
"locationType": {
|
|
362
458
|
"type": "string",
|
|
459
|
+
"description": "The type of redirect location, such as product (for a product page), category (a category page), home (for home page), page (for content), or URL (for a URL location).",
|
|
363
460
|
"enum": [
|
|
364
461
|
"default",
|
|
365
462
|
"home",
|
|
@@ -367,10 +464,12 @@
|
|
|
367
464
|
"category",
|
|
368
465
|
"page",
|
|
369
466
|
"url"
|
|
370
|
-
]
|
|
467
|
+
],
|
|
468
|
+
"example": "url"
|
|
371
469
|
},
|
|
372
470
|
"location": {
|
|
373
|
-
"type": "string"
|
|
471
|
+
"type": "string",
|
|
472
|
+
"description": "The location of redirect, based on the type, this can be a product location, category location, home page, content page, or just a URL."
|
|
374
473
|
}
|
|
375
474
|
},
|
|
376
475
|
"required": [
|
|
@@ -380,9 +479,12 @@
|
|
|
380
479
|
"SourceCodeSpecification": {
|
|
381
480
|
"type": "object",
|
|
382
481
|
"additionalProperties": false,
|
|
482
|
+
"description": "Document representing a source code specification.",
|
|
383
483
|
"properties": {
|
|
384
484
|
"expression": {
|
|
385
|
-
"type": "string"
|
|
485
|
+
"type": "string",
|
|
486
|
+
"description": "Expression is a value for the \"Source Code Specification\" may be literal source code, or it may contain wildcards.\nLiteral code is simply the literal code. Valid characters are letters and numbers (no spaces).\nA wildcard allows a single source code specification to match multiple source codes. The following wildcards are supported:\n\n* ? - Matches any single alpha-numeric character.\n\nFor example: the source code specification 'ABC?' would match 'ABCD' or 'ABC3', but not 'ABCDE'.\n* \\* - Matches any sequence of alpha-numeric characters.\n\nFor example: the source code specification 'ABC*' would match 'ABCD', 'ABCDE', or 'ABC123'.\n* [n1..n2] - Matches any number from n1 through and including n2.\n \nFor example: the source code specification 'ABC[3..22]' would match 'ABC3', 'ABC4' or 'ABC22', but not 'ABC33' or 'ABCD'.",
|
|
487
|
+
"example": "televisions[1..10000]"
|
|
386
488
|
}
|
|
387
489
|
},
|
|
388
490
|
"required": [
|
|
@@ -391,37 +493,55 @@
|
|
|
391
493
|
},
|
|
392
494
|
"SourceCodeGroup": {
|
|
393
495
|
"type": "object",
|
|
394
|
-
"additionalProperties": {
|
|
496
|
+
"additionalProperties": {
|
|
497
|
+
"description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.",
|
|
498
|
+
"example": "c_trackingId",
|
|
499
|
+
"title": "Additional Property Support"
|
|
500
|
+
},
|
|
501
|
+
"description": "Document representing a source code group.",
|
|
395
502
|
"properties": {
|
|
396
503
|
"active": {
|
|
397
|
-
"type": "boolean"
|
|
504
|
+
"type": "boolean",
|
|
505
|
+
"description": "The active flag, a computed value based on start and end time.",
|
|
506
|
+
"example": true
|
|
398
507
|
},
|
|
399
508
|
"activeRedirect": {
|
|
400
509
|
"allOf": [
|
|
401
510
|
{
|
|
402
511
|
"$ref": "#/components/schemas/SourceCodeRedirectInfo"
|
|
403
512
|
}
|
|
404
|
-
]
|
|
513
|
+
],
|
|
514
|
+
"description": "The active redirect information."
|
|
405
515
|
},
|
|
406
516
|
"cookieDuration": {
|
|
407
517
|
"type": "integer",
|
|
408
518
|
"format": "int32",
|
|
519
|
+
"description": "The cookie duration in days.",
|
|
520
|
+
"example": 25,
|
|
409
521
|
"maximum": 999,
|
|
410
522
|
"minimum": 0
|
|
411
523
|
},
|
|
412
524
|
"creationDate": {
|
|
413
525
|
"type": "string",
|
|
414
|
-
"format": "date-time"
|
|
526
|
+
"format": "date-time",
|
|
527
|
+
"description": "Returns the value of attribute 'creationDate'.",
|
|
528
|
+
"example": "2019-10-20T12:00:00Z"
|
|
415
529
|
},
|
|
416
530
|
"description": {
|
|
417
|
-
"type": "string"
|
|
531
|
+
"type": "string",
|
|
532
|
+
"description": "The description.",
|
|
533
|
+
"example": "This source code group is used to email promoting Flat Screen Television.\n"
|
|
418
534
|
},
|
|
419
535
|
"enabled": {
|
|
420
|
-
"type": "boolean"
|
|
536
|
+
"type": "boolean",
|
|
537
|
+
"description": "The enabled flag for storefront to consider the source code group, default to false.",
|
|
538
|
+
"example": false
|
|
421
539
|
},
|
|
422
540
|
"endTime": {
|
|
423
541
|
"type": "string",
|
|
424
|
-
"format": "date-time"
|
|
542
|
+
"format": "date-time",
|
|
543
|
+
"description": "The end time.",
|
|
544
|
+
"example": "2019-11-20T12:00:00Z"
|
|
425
545
|
},
|
|
426
546
|
"id": {
|
|
427
547
|
"$ref": "#/components/schemas/SourceCodeGroupId"
|
|
@@ -431,21 +551,27 @@
|
|
|
431
551
|
{
|
|
432
552
|
"$ref": "#/components/schemas/SourceCodeRedirectInfo"
|
|
433
553
|
}
|
|
434
|
-
]
|
|
554
|
+
],
|
|
555
|
+
"description": "The inactive redirect information."
|
|
435
556
|
},
|
|
436
557
|
"lastModified": {
|
|
437
558
|
"type": "string",
|
|
438
|
-
"format": "date-time"
|
|
559
|
+
"format": "date-time",
|
|
560
|
+
"description": "Returns the value of attribute 'lastModified'.",
|
|
561
|
+
"example": "2019-10-20T12:00:00Z"
|
|
439
562
|
},
|
|
440
563
|
"specifications": {
|
|
441
564
|
"type": "array",
|
|
565
|
+
"description": "Source code specifications.",
|
|
442
566
|
"items": {
|
|
443
567
|
"$ref": "#/components/schemas/SourceCodeSpecification"
|
|
444
568
|
}
|
|
445
569
|
},
|
|
446
570
|
"startTime": {
|
|
447
571
|
"type": "string",
|
|
448
|
-
"format": "date-time"
|
|
572
|
+
"format": "date-time",
|
|
573
|
+
"description": "The start time.",
|
|
574
|
+
"example": "2019-10-20T12:00:00Z"
|
|
449
575
|
}
|
|
450
576
|
},
|
|
451
577
|
"required": [
|
|
@@ -458,17 +584,25 @@
|
|
|
458
584
|
"properties": {
|
|
459
585
|
"title": {
|
|
460
586
|
"type": "string",
|
|
587
|
+
"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",
|
|
588
|
+
"example": "You do not have enough credit",
|
|
461
589
|
"maxLength": 256
|
|
462
590
|
},
|
|
463
591
|
"type": {
|
|
464
592
|
"type": "string",
|
|
593
|
+
"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",
|
|
594
|
+
"example": "NotEnoughMoney",
|
|
465
595
|
"maxLength": 2048
|
|
466
596
|
},
|
|
467
597
|
"detail": {
|
|
468
|
-
"type": "string"
|
|
598
|
+
"type": "string",
|
|
599
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
600
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
469
601
|
},
|
|
470
602
|
"instance": {
|
|
471
603
|
"type": "string",
|
|
604
|
+
"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",
|
|
605
|
+
"example": "/account/12345/msgs/abc",
|
|
472
606
|
"maxLength": 2048
|
|
473
607
|
}
|
|
474
608
|
},
|
|
@@ -481,6 +615,28 @@
|
|
|
481
615
|
"Query": {
|
|
482
616
|
"type": "object",
|
|
483
617
|
"additionalProperties": false,
|
|
618
|
+
"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._",
|
|
619
|
+
"example": {
|
|
620
|
+
"filteredQuery": {
|
|
621
|
+
"query": {
|
|
622
|
+
"textQuery": {
|
|
623
|
+
"fields": [
|
|
624
|
+
"couponId"
|
|
625
|
+
],
|
|
626
|
+
"searchPhrase": "disabled"
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
"filter": {
|
|
630
|
+
"termFilter": {
|
|
631
|
+
"field": "enabled",
|
|
632
|
+
"operator": "is",
|
|
633
|
+
"values": [
|
|
634
|
+
false
|
|
635
|
+
]
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
},
|
|
484
640
|
"maxProperties": 1,
|
|
485
641
|
"minProperties": 1,
|
|
486
642
|
"properties": {
|
|
@@ -507,21 +663,58 @@
|
|
|
507
663
|
"BoolQuery": {
|
|
508
664
|
"type": "object",
|
|
509
665
|
"additionalProperties": false,
|
|
666
|
+
"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",
|
|
667
|
+
"example": {
|
|
668
|
+
"must": [
|
|
669
|
+
{
|
|
670
|
+
"textQuery": {
|
|
671
|
+
"fields": [
|
|
672
|
+
"couponId"
|
|
673
|
+
],
|
|
674
|
+
"searchPhrase": "DEAL"
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
"textQuery": {
|
|
679
|
+
"fields": [
|
|
680
|
+
"description"
|
|
681
|
+
],
|
|
682
|
+
"searchPhrase": "Big bargain deal"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
],
|
|
686
|
+
"mustNot": [
|
|
687
|
+
{
|
|
688
|
+
"termQuery": {
|
|
689
|
+
"fields": [
|
|
690
|
+
"enabled"
|
|
691
|
+
],
|
|
692
|
+
"operator": "is",
|
|
693
|
+
"values": [
|
|
694
|
+
false
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
]
|
|
699
|
+
},
|
|
510
700
|
"properties": {
|
|
511
701
|
"must": {
|
|
512
702
|
"type": "array",
|
|
703
|
+
"description": "List of queries to be evaluated as an `AND` operator.",
|
|
513
704
|
"items": {
|
|
514
705
|
"$ref": "#/components/schemas/Query"
|
|
515
706
|
}
|
|
516
707
|
},
|
|
517
708
|
"mustNot": {
|
|
518
709
|
"type": "array",
|
|
710
|
+
"description": "List of queries to be evaluated as a `NOT` operator.",
|
|
519
711
|
"items": {
|
|
520
712
|
"$ref": "#/components/schemas/Query"
|
|
521
713
|
}
|
|
522
714
|
},
|
|
523
715
|
"should": {
|
|
524
716
|
"type": "array",
|
|
717
|
+
"description": "List of queries to be evaluated as an `OR` operator.",
|
|
525
718
|
"items": {
|
|
526
719
|
"$ref": "#/components/schemas/Query"
|
|
527
720
|
}
|
|
@@ -531,6 +724,7 @@
|
|
|
531
724
|
"Filter": {
|
|
532
725
|
"type": "object",
|
|
533
726
|
"additionalProperties": false,
|
|
727
|
+
"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.",
|
|
534
728
|
"maxProperties": 1,
|
|
535
729
|
"minProperties": 1,
|
|
536
730
|
"properties": {
|
|
@@ -554,20 +748,47 @@
|
|
|
554
748
|
"BoolFilter": {
|
|
555
749
|
"type": "object",
|
|
556
750
|
"additionalProperties": false,
|
|
751
|
+
"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.",
|
|
752
|
+
"example": {
|
|
753
|
+
"operator": "and",
|
|
754
|
+
"filters": [
|
|
755
|
+
{
|
|
756
|
+
"termFilter": {
|
|
757
|
+
"field": "id",
|
|
758
|
+
"operator": "is",
|
|
759
|
+
"values": [
|
|
760
|
+
"myId"
|
|
761
|
+
]
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
{
|
|
765
|
+
"termFilter": {
|
|
766
|
+
"field": "couponId",
|
|
767
|
+
"operator": "is",
|
|
768
|
+
"values": [
|
|
769
|
+
"couponOne"
|
|
770
|
+
]
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
]
|
|
774
|
+
},
|
|
557
775
|
"properties": {
|
|
558
776
|
"filters": {
|
|
559
777
|
"type": "array",
|
|
778
|
+
"description": "A list of filters that are logically combined by an operator.",
|
|
560
779
|
"items": {
|
|
561
780
|
"$ref": "#/components/schemas/Filter"
|
|
562
781
|
}
|
|
563
782
|
},
|
|
564
783
|
"operator": {
|
|
565
784
|
"type": "string",
|
|
785
|
+
"description": "The logical operator that is used to combine the filters.",
|
|
566
786
|
"enum": [
|
|
567
787
|
"and",
|
|
568
788
|
"or",
|
|
569
789
|
"not"
|
|
570
|
-
]
|
|
790
|
+
],
|
|
791
|
+
"example": "and"
|
|
571
792
|
}
|
|
572
793
|
},
|
|
573
794
|
"required": [
|
|
@@ -576,6 +797,7 @@
|
|
|
576
797
|
},
|
|
577
798
|
"QueryFilter": {
|
|
578
799
|
"type": "object",
|
|
800
|
+
"description": "Wraps any query and allows it to be used as a filter.",
|
|
579
801
|
"properties": {
|
|
580
802
|
"query": {
|
|
581
803
|
"$ref": "#/components/schemas/Query"
|
|
@@ -587,45 +809,71 @@
|
|
|
587
809
|
},
|
|
588
810
|
"Field": {
|
|
589
811
|
"type": "string",
|
|
812
|
+
"description": "Name of the field. Might be a custom field name prefixed with c_.",
|
|
813
|
+
"example": "couponId",
|
|
590
814
|
"maxLength": 260
|
|
591
815
|
},
|
|
592
816
|
"Range2Filter": {
|
|
593
817
|
"type": "object",
|
|
594
818
|
"additionalProperties": false,
|
|
819
|
+
"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.",
|
|
820
|
+
"example": {
|
|
821
|
+
"fromField": "validFrom",
|
|
822
|
+
"toField": "validTo",
|
|
823
|
+
"filterMode": "overlap",
|
|
824
|
+
"fromValue": "2007-01-01T00:00:00.000Z",
|
|
825
|
+
"toValue": "2017-01-01T00:00:00.000Z"
|
|
826
|
+
},
|
|
595
827
|
"properties": {
|
|
596
828
|
"filterMode": {
|
|
597
829
|
"type": "string",
|
|
598
830
|
"default": "overlap",
|
|
831
|
+
"description": "Compare mode: overlap, containing, or contained.",
|
|
599
832
|
"enum": [
|
|
600
833
|
"overlap",
|
|
601
834
|
"containing",
|
|
602
835
|
"contained"
|
|
603
|
-
]
|
|
836
|
+
],
|
|
837
|
+
"example": "overlap"
|
|
604
838
|
},
|
|
605
839
|
"fromField": {
|
|
606
840
|
"allOf": [
|
|
607
841
|
{
|
|
608
842
|
"$ref": "#/components/schemas/Field"
|
|
609
843
|
}
|
|
610
|
-
]
|
|
844
|
+
],
|
|
845
|
+
"description": "The field name of the field that starts the first range.",
|
|
846
|
+
"example": "validFrom"
|
|
611
847
|
},
|
|
612
848
|
"fromInclusive": {
|
|
613
849
|
"type": "boolean",
|
|
614
|
-
"default": true
|
|
850
|
+
"default": true,
|
|
851
|
+
"description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
852
|
+
"example": true
|
|
853
|
+
},
|
|
854
|
+
"fromValue": {
|
|
855
|
+
"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.",
|
|
856
|
+
"example": "2007-01-01T00:00:00.000Z"
|
|
615
857
|
},
|
|
616
|
-
"fromValue": {},
|
|
617
858
|
"toField": {
|
|
618
859
|
"allOf": [
|
|
619
860
|
{
|
|
620
861
|
"$ref": "#/components/schemas/Field"
|
|
621
862
|
}
|
|
622
|
-
]
|
|
863
|
+
],
|
|
864
|
+
"description": "The field name of the field that ends the first range.",
|
|
865
|
+
"example": "validTo"
|
|
623
866
|
},
|
|
624
867
|
"toInclusive": {
|
|
625
868
|
"type": "boolean",
|
|
626
|
-
"default": true
|
|
869
|
+
"default": true,
|
|
870
|
+
"description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
871
|
+
"example": true
|
|
627
872
|
},
|
|
628
|
-
"toValue": {
|
|
873
|
+
"toValue": {
|
|
874
|
+
"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.",
|
|
875
|
+
"example": "2017-01-01T00:00:00.000Z"
|
|
876
|
+
}
|
|
629
877
|
},
|
|
630
878
|
"required": [
|
|
631
879
|
"fromField",
|
|
@@ -634,49 +882,64 @@
|
|
|
634
882
|
},
|
|
635
883
|
"RangeFilter": {
|
|
636
884
|
"type": "object",
|
|
885
|
+
"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.",
|
|
637
886
|
"properties": {
|
|
638
887
|
"field": {
|
|
639
888
|
"allOf": [
|
|
640
889
|
{
|
|
641
890
|
"$ref": "#/components/schemas/Field"
|
|
642
891
|
}
|
|
643
|
-
]
|
|
892
|
+
],
|
|
893
|
+
"description": "The search field.",
|
|
894
|
+
"example": "validFrom"
|
|
644
895
|
},
|
|
645
896
|
"from": {
|
|
897
|
+
"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.",
|
|
646
898
|
"oneOf": [
|
|
647
899
|
{
|
|
648
900
|
"type": "string",
|
|
649
|
-
"format": "date-time"
|
|
901
|
+
"format": "date-time",
|
|
902
|
+
"example": "2007-01-01T00:00:00Z"
|
|
650
903
|
},
|
|
651
904
|
{
|
|
652
|
-
"type": "integer"
|
|
905
|
+
"type": "integer",
|
|
906
|
+
"example": 1
|
|
653
907
|
},
|
|
654
908
|
{
|
|
655
|
-
"type": "number"
|
|
909
|
+
"type": "number",
|
|
910
|
+
"example": 1
|
|
656
911
|
}
|
|
657
912
|
]
|
|
658
913
|
},
|
|
659
914
|
"fromInclusive": {
|
|
660
915
|
"type": "boolean",
|
|
661
|
-
"default": true
|
|
916
|
+
"default": true,
|
|
917
|
+
"description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
|
|
918
|
+
"example": true
|
|
662
919
|
},
|
|
663
920
|
"to": {
|
|
921
|
+
"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.",
|
|
664
922
|
"oneOf": [
|
|
665
923
|
{
|
|
666
924
|
"type": "string",
|
|
667
|
-
"format": "date-time"
|
|
925
|
+
"format": "date-time",
|
|
926
|
+
"example": "2007-01-02T00:00:00Z"
|
|
668
927
|
},
|
|
669
928
|
{
|
|
670
|
-
"type": "integer"
|
|
929
|
+
"type": "integer",
|
|
930
|
+
"example": 2
|
|
671
931
|
},
|
|
672
932
|
{
|
|
673
|
-
"type": "number"
|
|
933
|
+
"type": "number",
|
|
934
|
+
"example": 2
|
|
674
935
|
}
|
|
675
936
|
]
|
|
676
937
|
},
|
|
677
938
|
"toInclusive": {
|
|
678
939
|
"type": "boolean",
|
|
679
|
-
"default": true
|
|
940
|
+
"default": true,
|
|
941
|
+
"description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
|
|
942
|
+
"example": true
|
|
680
943
|
}
|
|
681
944
|
},
|
|
682
945
|
"required": [
|
|
@@ -686,16 +949,26 @@
|
|
|
686
949
|
"TermFilter": {
|
|
687
950
|
"type": "object",
|
|
688
951
|
"additionalProperties": false,
|
|
952
|
+
"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.",
|
|
953
|
+
"example": {
|
|
954
|
+
"field": "id",
|
|
955
|
+
"operator": "is",
|
|
956
|
+
"values": [
|
|
957
|
+
"myId"
|
|
958
|
+
]
|
|
959
|
+
},
|
|
689
960
|
"properties": {
|
|
690
961
|
"field": {
|
|
691
962
|
"allOf": [
|
|
692
963
|
{
|
|
693
964
|
"$ref": "#/components/schemas/Field"
|
|
694
965
|
}
|
|
695
|
-
]
|
|
966
|
+
],
|
|
967
|
+
"description": "The filter field."
|
|
696
968
|
},
|
|
697
969
|
"operator": {
|
|
698
970
|
"type": "string",
|
|
971
|
+
"description": "The operator used to compare the field's values with the given values.",
|
|
699
972
|
"enum": [
|
|
700
973
|
"is",
|
|
701
974
|
"one_of",
|
|
@@ -705,12 +978,15 @@
|
|
|
705
978
|
"greater",
|
|
706
979
|
"not_in",
|
|
707
980
|
"neq"
|
|
708
|
-
]
|
|
981
|
+
],
|
|
982
|
+
"example": "is"
|
|
709
983
|
},
|
|
710
984
|
"values": {
|
|
711
985
|
"type": "array",
|
|
986
|
+
"description": "The filter values.",
|
|
712
987
|
"items": {
|
|
713
|
-
"type": "string"
|
|
988
|
+
"type": "string",
|
|
989
|
+
"example": "myId"
|
|
714
990
|
}
|
|
715
991
|
}
|
|
716
992
|
},
|
|
@@ -722,6 +998,26 @@
|
|
|
722
998
|
"FilteredQuery": {
|
|
723
999
|
"type": "object",
|
|
724
1000
|
"additionalProperties": false,
|
|
1001
|
+
"description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
|
|
1002
|
+
"example": {
|
|
1003
|
+
"query": {
|
|
1004
|
+
"textQuery": {
|
|
1005
|
+
"fields": [
|
|
1006
|
+
"couponId"
|
|
1007
|
+
],
|
|
1008
|
+
"searchPhrase": "disabled"
|
|
1009
|
+
}
|
|
1010
|
+
},
|
|
1011
|
+
"filter": {
|
|
1012
|
+
"termFilter": {
|
|
1013
|
+
"field": "enabled",
|
|
1014
|
+
"operator": "is",
|
|
1015
|
+
"values": [
|
|
1016
|
+
false
|
|
1017
|
+
]
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
725
1021
|
"properties": {
|
|
726
1022
|
"filter": {
|
|
727
1023
|
"$ref": "#/components/schemas/Filter"
|
|
@@ -736,14 +1032,62 @@
|
|
|
736
1032
|
]
|
|
737
1033
|
},
|
|
738
1034
|
"MatchAllQuery": {
|
|
739
|
-
"type": "object"
|
|
1035
|
+
"type": "object",
|
|
1036
|
+
"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."
|
|
740
1037
|
},
|
|
741
1038
|
"NestedQuery": {
|
|
742
1039
|
"type": "object",
|
|
743
1040
|
"additionalProperties": false,
|
|
1041
|
+
"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",
|
|
1042
|
+
"example": {
|
|
1043
|
+
"path": "order.shippingAddresses",
|
|
1044
|
+
"query": {
|
|
1045
|
+
"boolQuery": {
|
|
1046
|
+
"must": [
|
|
1047
|
+
{
|
|
1048
|
+
"boolQuery": {
|
|
1049
|
+
"must": [
|
|
1050
|
+
{
|
|
1051
|
+
"termQuery": {
|
|
1052
|
+
"fields": [
|
|
1053
|
+
"order.shippingAddresses.firstName"
|
|
1054
|
+
],
|
|
1055
|
+
"operator": "is",
|
|
1056
|
+
"values": [
|
|
1057
|
+
"John"
|
|
1058
|
+
]
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
]
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"boolQuery": {
|
|
1066
|
+
"must": [
|
|
1067
|
+
{
|
|
1068
|
+
"termQuery": {
|
|
1069
|
+
"fields": [
|
|
1070
|
+
"order.shippingAddresses.lastName"
|
|
1071
|
+
],
|
|
1072
|
+
"operator": "is",
|
|
1073
|
+
"values": [
|
|
1074
|
+
"Doe"
|
|
1075
|
+
]
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
]
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
]
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1084
|
+
"scoreMode": "avg"
|
|
1085
|
+
},
|
|
744
1086
|
"properties": {
|
|
745
1087
|
"path": {
|
|
746
1088
|
"type": "string",
|
|
1089
|
+
"description": "The path to the nested document.",
|
|
1090
|
+
"example": "order.shippingAddresses",
|
|
747
1091
|
"maxLength": 2048
|
|
748
1092
|
},
|
|
749
1093
|
"query": {
|
|
@@ -751,12 +1095,14 @@
|
|
|
751
1095
|
},
|
|
752
1096
|
"scoreMode": {
|
|
753
1097
|
"type": "string",
|
|
1098
|
+
"description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
|
|
754
1099
|
"enum": [
|
|
755
1100
|
"avg",
|
|
756
1101
|
"total",
|
|
757
1102
|
"max",
|
|
758
1103
|
"none"
|
|
759
|
-
]
|
|
1104
|
+
],
|
|
1105
|
+
"example": "avg"
|
|
760
1106
|
}
|
|
761
1107
|
},
|
|
762
1108
|
"required": [
|
|
@@ -766,9 +1112,11 @@
|
|
|
766
1112
|
},
|
|
767
1113
|
"TermQuery": {
|
|
768
1114
|
"type": "object",
|
|
1115
|
+
"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.",
|
|
769
1116
|
"properties": {
|
|
770
1117
|
"fields": {
|
|
771
1118
|
"type": "array",
|
|
1119
|
+
"description": "The document fields that the values are matched against, combined with the operator.",
|
|
772
1120
|
"items": {
|
|
773
1121
|
"$ref": "#/components/schemas/Field"
|
|
774
1122
|
},
|
|
@@ -776,6 +1124,7 @@
|
|
|
776
1124
|
},
|
|
777
1125
|
"operator": {
|
|
778
1126
|
"type": "string",
|
|
1127
|
+
"description": "Returns the operator to use for the term query.",
|
|
779
1128
|
"enum": [
|
|
780
1129
|
"is",
|
|
781
1130
|
"one_of",
|
|
@@ -785,23 +1134,30 @@
|
|
|
785
1134
|
"greater",
|
|
786
1135
|
"not_in",
|
|
787
1136
|
"neq"
|
|
788
|
-
]
|
|
1137
|
+
],
|
|
1138
|
+
"example": "is"
|
|
789
1139
|
},
|
|
790
1140
|
"values": {
|
|
791
1141
|
"type": "array",
|
|
1142
|
+
"description": "The values that the fields are compared against, combined with the operator.",
|
|
792
1143
|
"items": {
|
|
1144
|
+
"example": "myCouponId",
|
|
793
1145
|
"oneOf": [
|
|
794
1146
|
{
|
|
795
|
-
"type": "string"
|
|
1147
|
+
"type": "string",
|
|
1148
|
+
"example": "myCouponId"
|
|
796
1149
|
},
|
|
797
1150
|
{
|
|
798
|
-
"type": "number"
|
|
1151
|
+
"type": "number",
|
|
1152
|
+
"example": 1
|
|
799
1153
|
},
|
|
800
1154
|
{
|
|
801
|
-
"type": "boolean"
|
|
1155
|
+
"type": "boolean",
|
|
1156
|
+
"example": true
|
|
802
1157
|
},
|
|
803
1158
|
{
|
|
804
|
-
"type": "integer"
|
|
1159
|
+
"type": "integer",
|
|
1160
|
+
"example": 1
|
|
805
1161
|
}
|
|
806
1162
|
]
|
|
807
1163
|
}
|
|
@@ -815,16 +1171,26 @@
|
|
|
815
1171
|
"TextQuery": {
|
|
816
1172
|
"type": "object",
|
|
817
1173
|
"additionalProperties": false,
|
|
1174
|
+
"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.",
|
|
1175
|
+
"example": {
|
|
1176
|
+
"fields": [
|
|
1177
|
+
"couponId"
|
|
1178
|
+
],
|
|
1179
|
+
"searchPhrase": "limit"
|
|
1180
|
+
},
|
|
818
1181
|
"properties": {
|
|
819
1182
|
"fields": {
|
|
820
1183
|
"type": "array",
|
|
1184
|
+
"description": "The document fields that the search phrase matches against.",
|
|
821
1185
|
"items": {
|
|
822
1186
|
"$ref": "#/components/schemas/Field"
|
|
823
1187
|
},
|
|
824
1188
|
"minItems": 1
|
|
825
1189
|
},
|
|
826
1190
|
"searchPhrase": {
|
|
827
|
-
"type": "string"
|
|
1191
|
+
"type": "string",
|
|
1192
|
+
"description": "A search phrase, which can include multiple terms separated by spaces.",
|
|
1193
|
+
"example": "campaign summer"
|
|
828
1194
|
}
|
|
829
1195
|
},
|
|
830
1196
|
"required": [
|
|
@@ -832,28 +1198,30 @@
|
|
|
832
1198
|
"searchPhrase"
|
|
833
1199
|
]
|
|
834
1200
|
},
|
|
835
|
-
"String256": {
|
|
836
|
-
"type": "string",
|
|
837
|
-
"maxLength": 256
|
|
838
|
-
},
|
|
839
1201
|
"Sort": {
|
|
840
1202
|
"type": "object",
|
|
841
1203
|
"additionalProperties": false,
|
|
1204
|
+
"description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
|
|
1205
|
+
"example": {
|
|
1206
|
+
"field": "couponId",
|
|
1207
|
+
"sortOrder": "desc"
|
|
1208
|
+
},
|
|
842
1209
|
"properties": {
|
|
843
1210
|
"field": {
|
|
844
|
-
"
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
]
|
|
1211
|
+
"type": "string",
|
|
1212
|
+
"description": "The name of the field to sort on.",
|
|
1213
|
+
"example": "couponId",
|
|
1214
|
+
"maxLength": 256
|
|
849
1215
|
},
|
|
850
1216
|
"sortOrder": {
|
|
851
1217
|
"type": "string",
|
|
852
1218
|
"default": "asc",
|
|
1219
|
+
"description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
|
|
853
1220
|
"enum": [
|
|
854
1221
|
"asc",
|
|
855
1222
|
"desc"
|
|
856
|
-
]
|
|
1223
|
+
],
|
|
1224
|
+
"example": "asc"
|
|
857
1225
|
}
|
|
858
1226
|
},
|
|
859
1227
|
"required": [
|
|
@@ -864,14 +1232,19 @@
|
|
|
864
1232
|
"type": "integer",
|
|
865
1233
|
"format": "int32",
|
|
866
1234
|
"default": 0,
|
|
1235
|
+
"description": "The zero-based index of the first hit/data to include in the result.",
|
|
1236
|
+
"example": 0,
|
|
867
1237
|
"minimum": 0
|
|
868
1238
|
},
|
|
869
1239
|
"SearchRequest": {
|
|
870
1240
|
"type": "object",
|
|
1241
|
+
"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.",
|
|
871
1242
|
"properties": {
|
|
872
1243
|
"limit": {
|
|
873
1244
|
"type": "integer",
|
|
874
1245
|
"format": "int32",
|
|
1246
|
+
"description": "Maximum records to retrieve per request, not to exceed 200.",
|
|
1247
|
+
"example": 10,
|
|
875
1248
|
"maximum": 200,
|
|
876
1249
|
"minimum": 1
|
|
877
1250
|
},
|
|
@@ -880,6 +1253,7 @@
|
|
|
880
1253
|
},
|
|
881
1254
|
"sorts": {
|
|
882
1255
|
"type": "array",
|
|
1256
|
+
"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.",
|
|
883
1257
|
"items": {
|
|
884
1258
|
"$ref": "#/components/schemas/Sort"
|
|
885
1259
|
}
|
|
@@ -896,14 +1270,19 @@
|
|
|
896
1270
|
"type": "integer",
|
|
897
1271
|
"format": "int32",
|
|
898
1272
|
"default": 0,
|
|
1273
|
+
"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.",
|
|
1274
|
+
"example": 10,
|
|
899
1275
|
"minimum": 0
|
|
900
1276
|
},
|
|
901
1277
|
"ResultBase": {
|
|
902
1278
|
"type": "object",
|
|
1279
|
+
"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.",
|
|
903
1280
|
"properties": {
|
|
904
1281
|
"limit": {
|
|
905
1282
|
"type": "integer",
|
|
906
|
-
"format": "int32"
|
|
1283
|
+
"format": "int32",
|
|
1284
|
+
"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.",
|
|
1285
|
+
"example": 10
|
|
907
1286
|
},
|
|
908
1287
|
"total": {
|
|
909
1288
|
"$ref": "#/components/schemas/Total"
|
|
@@ -920,6 +1299,7 @@
|
|
|
920
1299
|
"$ref": "#/components/schemas/ResultBase"
|
|
921
1300
|
}
|
|
922
1301
|
],
|
|
1302
|
+
"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`.",
|
|
923
1303
|
"properties": {
|
|
924
1304
|
"offset": {
|
|
925
1305
|
"$ref": "#/components/schemas/Offset"
|
|
@@ -938,18 +1318,67 @@
|
|
|
938
1318
|
"$ref": "#/components/schemas/PaginatedResultBase"
|
|
939
1319
|
}
|
|
940
1320
|
],
|
|
1321
|
+
"description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
|
|
1322
|
+
"example": {
|
|
1323
|
+
"limit": 1,
|
|
1324
|
+
"hits": [
|
|
1325
|
+
{
|
|
1326
|
+
"couponId": "coupon1",
|
|
1327
|
+
"creationDate": "2019-10-20T12:00:00Z",
|
|
1328
|
+
"description": "This coupon is used to give 10% off stuff.",
|
|
1329
|
+
"enabled": false,
|
|
1330
|
+
"exportedCodeCount": 0,
|
|
1331
|
+
"lastModified": "2019-10-30T04:23:59Z",
|
|
1332
|
+
"redemptionCount": 3,
|
|
1333
|
+
"redemptionLimits": {
|
|
1334
|
+
"limitPerCode": 1,
|
|
1335
|
+
"limitPerCustomer": 1,
|
|
1336
|
+
"limitPerTimeFrame": {
|
|
1337
|
+
"limit": 2,
|
|
1338
|
+
"redemptionTimeFrame": 24
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
"singleCode": "MyCode",
|
|
1342
|
+
"systemCodesConfig": {
|
|
1343
|
+
"codePrefix": "SG",
|
|
1344
|
+
"numberOfCodes": 500000
|
|
1345
|
+
},
|
|
1346
|
+
"totalCodesCount": 50,
|
|
1347
|
+
"type": "single_code"
|
|
1348
|
+
}
|
|
1349
|
+
],
|
|
1350
|
+
"query": {
|
|
1351
|
+
"textQuery": {
|
|
1352
|
+
"fields": [
|
|
1353
|
+
"id",
|
|
1354
|
+
"description"
|
|
1355
|
+
],
|
|
1356
|
+
"searchPhrase": "stuff"
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
"sorts": [
|
|
1360
|
+
{
|
|
1361
|
+
"field": "couponId",
|
|
1362
|
+
"sortOrder": "desc"
|
|
1363
|
+
}
|
|
1364
|
+
],
|
|
1365
|
+
"offset": 2,
|
|
1366
|
+
"total": 8
|
|
1367
|
+
},
|
|
941
1368
|
"properties": {
|
|
942
1369
|
"query": {
|
|
943
1370
|
"$ref": "#/components/schemas/Query"
|
|
944
1371
|
},
|
|
945
1372
|
"sorts": {
|
|
946
1373
|
"type": "array",
|
|
1374
|
+
"description": "The sorting that was applied to the result.",
|
|
947
1375
|
"items": {
|
|
948
1376
|
"$ref": "#/components/schemas/Sort"
|
|
949
1377
|
}
|
|
950
1378
|
},
|
|
951
1379
|
"hits": {
|
|
952
1380
|
"type": "array",
|
|
1381
|
+
"description": "The sorted array of search hits. Can be empty.",
|
|
953
1382
|
"items": {
|
|
954
1383
|
"type": "object"
|
|
955
1384
|
}
|
|
@@ -965,9 +1394,11 @@
|
|
|
965
1394
|
"$ref": "#/components/schemas/PaginatedSearchResult"
|
|
966
1395
|
}
|
|
967
1396
|
],
|
|
1397
|
+
"description": "Document representing a source code group search result.",
|
|
968
1398
|
"properties": {
|
|
969
1399
|
"hits": {
|
|
970
1400
|
"type": "array",
|
|
1401
|
+
"description": "The sorted array of search hits. Can be empty.",
|
|
971
1402
|
"items": {
|
|
972
1403
|
"$ref": "#/components/schemas/SourceCodeGroup"
|
|
973
1404
|
}
|
|
@@ -982,16 +1413,19 @@
|
|
|
982
1413
|
"organizationId": {
|
|
983
1414
|
"name": "organizationId",
|
|
984
1415
|
"in": "path",
|
|
1416
|
+
"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).",
|
|
985
1417
|
"required": true,
|
|
986
1418
|
"style": "simple",
|
|
987
1419
|
"explode": false,
|
|
988
1420
|
"schema": {
|
|
989
1421
|
"$ref": "#/components/schemas/OrganizationId"
|
|
990
|
-
}
|
|
1422
|
+
},
|
|
1423
|
+
"example": "f_ecom_zzxy_prd"
|
|
991
1424
|
},
|
|
992
1425
|
"id": {
|
|
993
1426
|
"name": "id",
|
|
994
1427
|
"in": "path",
|
|
1428
|
+
"description": "The unique identifier of the source code group.",
|
|
995
1429
|
"required": true,
|
|
996
1430
|
"style": "simple",
|
|
997
1431
|
"explode": false,
|
|
@@ -1002,17 +1436,145 @@
|
|
|
1002
1436
|
"siteId": {
|
|
1003
1437
|
"name": "siteId",
|
|
1004
1438
|
"in": "query",
|
|
1439
|
+
"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.",
|
|
1005
1440
|
"required": true,
|
|
1006
1441
|
"style": "form",
|
|
1007
1442
|
"explode": true,
|
|
1008
1443
|
"schema": {
|
|
1009
1444
|
"$ref": "#/components/schemas/SiteId"
|
|
1445
|
+
},
|
|
1446
|
+
"examples": {
|
|
1447
|
+
"SiteId": {
|
|
1448
|
+
"value": "RefArch"
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
},
|
|
1453
|
+
"examples": {
|
|
1454
|
+
"GetSourceCodeGroup": {
|
|
1455
|
+
"value": {
|
|
1456
|
+
"active": false,
|
|
1457
|
+
"activeRedirect": {
|
|
1458
|
+
"location": "urlString",
|
|
1459
|
+
"locationType": "url"
|
|
1460
|
+
},
|
|
1461
|
+
"creationDate": "2019-11-25T15:24:25.317Z",
|
|
1462
|
+
"description": "description for source code group test2",
|
|
1463
|
+
"enabled": false,
|
|
1464
|
+
"endTime": "2030-10-01T00:00:00.000Z",
|
|
1465
|
+
"id": "20% off (£30) New Customer",
|
|
1466
|
+
"inactiveRedirect": {
|
|
1467
|
+
"location": "urlString",
|
|
1468
|
+
"locationType": "url"
|
|
1469
|
+
},
|
|
1470
|
+
"lastModified": "2019-11-25T15:28:55.175Z",
|
|
1471
|
+
"startTime": "2014-10-01T00:00:00.000Z"
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
"SourceCodeGroupNotFound404": {
|
|
1475
|
+
"value": {
|
|
1476
|
+
"type": "SourceCodeGroupNotFoundException",
|
|
1477
|
+
"title": "Source Code Groups Not Found",
|
|
1478
|
+
"instance": "/sites/SiteGenesis/source_code_groups/foo",
|
|
1479
|
+
"detail": "No source code group with ID 'foo' for site 'SiteGenesis' could be found."
|
|
1480
|
+
}
|
|
1481
|
+
},
|
|
1482
|
+
"CreateSourceCodeGroup": {
|
|
1483
|
+
"value": {
|
|
1484
|
+
"active": false,
|
|
1485
|
+
"activeRedirect": {
|
|
1486
|
+
"location": "urlString",
|
|
1487
|
+
"locationType": "url"
|
|
1488
|
+
},
|
|
1489
|
+
"creationDate": "2019-11-25T15:24:25.317Z",
|
|
1490
|
+
"description": "description for source code group test",
|
|
1491
|
+
"enabled": false,
|
|
1492
|
+
"endTime": "2030-10-01T00:00:00.000Z",
|
|
1493
|
+
"id": "20% off (£30) New Customer",
|
|
1494
|
+
"inactiveRedirect": {
|
|
1495
|
+
"location": "urlString",
|
|
1496
|
+
"locationType": "url"
|
|
1497
|
+
},
|
|
1498
|
+
"lastModified": "2019-11-25T15:24:25.320Z",
|
|
1499
|
+
"startTime": "2014-10-01T00:00:00.000Z"
|
|
1500
|
+
}
|
|
1501
|
+
},
|
|
1502
|
+
"IdConflict400": {
|
|
1503
|
+
"value": {
|
|
1504
|
+
"type": "IdConflictException",
|
|
1505
|
+
"title": "Source Code Groups Id Conflict",
|
|
1506
|
+
"instance": "/sites/SiteGenesis/source_code_groups/foo",
|
|
1507
|
+
"detail": "The ID given in the request URL is different from the ID provided in the source code group document."
|
|
1508
|
+
}
|
|
1509
|
+
},
|
|
1510
|
+
"SourceCodeGroupInvalid400": {
|
|
1511
|
+
"value": {
|
|
1512
|
+
"type": "SourceCodeGroupInvalidException",
|
|
1513
|
+
"title": "Source Code Groups Invalid",
|
|
1514
|
+
"instance": "/sites/SiteGenesis/source_code_groups/foo",
|
|
1515
|
+
"detail": "The source code group passed in is not valid."
|
|
1516
|
+
}
|
|
1517
|
+
},
|
|
1518
|
+
"UpdateSourceCodeGroup": {
|
|
1519
|
+
"value": {
|
|
1520
|
+
"active": false,
|
|
1521
|
+
"activeRedirect": {
|
|
1522
|
+
"location": "urlString",
|
|
1523
|
+
"locationType": "url"
|
|
1524
|
+
},
|
|
1525
|
+
"creationDate": "2019-11-25T15:24:25.317Z",
|
|
1526
|
+
"description": "description for source code group test2",
|
|
1527
|
+
"enabled": false,
|
|
1528
|
+
"endTime": "2030-10-01T00:00:00.000Z",
|
|
1529
|
+
"id": "20% off (£30) New Customer",
|
|
1530
|
+
"inactiveRedirect": {
|
|
1531
|
+
"location": "urlString",
|
|
1532
|
+
"locationType": "url"
|
|
1533
|
+
},
|
|
1534
|
+
"lastModified": "2019-11-25T15:28:55.175Z",
|
|
1535
|
+
"startTime": "2014-10-01T00:00:00.000Z"
|
|
1536
|
+
}
|
|
1537
|
+
},
|
|
1538
|
+
"SourceCodeGroupsSearch": {
|
|
1539
|
+
"value": {
|
|
1540
|
+
"limit": 1,
|
|
1541
|
+
"hits": [
|
|
1542
|
+
{
|
|
1543
|
+
"active": false,
|
|
1544
|
+
"activeRedirect": {
|
|
1545
|
+
"location": "nintendo-wii-console",
|
|
1546
|
+
"locationType": "product"
|
|
1547
|
+
},
|
|
1548
|
+
"creationDate": "2020-01-06T15:30:26.000Z",
|
|
1549
|
+
"description": "Email promoting save 20% of WII game when buying system",
|
|
1550
|
+
"enabled": true,
|
|
1551
|
+
"endTime": "2009-12-20T00:00:00.000Z",
|
|
1552
|
+
"id": "gaming-email",
|
|
1553
|
+
"inactiveRedirect": {
|
|
1554
|
+
"location": "inactive-source-code",
|
|
1555
|
+
"locationType": "page"
|
|
1556
|
+
},
|
|
1557
|
+
"lastModified": "2020-01-06T15:30:26.000Z",
|
|
1558
|
+
"startTime": "2009-11-01T00:00:00.000Z"
|
|
1559
|
+
}
|
|
1560
|
+
],
|
|
1561
|
+
"query": {
|
|
1562
|
+
"textQuery": {
|
|
1563
|
+
"fields": [
|
|
1564
|
+
"id"
|
|
1565
|
+
],
|
|
1566
|
+
"searchPhrase": "gaming"
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"offset": 0,
|
|
1570
|
+
"total": 1
|
|
1010
1571
|
}
|
|
1011
1572
|
}
|
|
1012
1573
|
},
|
|
1013
1574
|
"securitySchemes": {
|
|
1014
1575
|
"AmOAuth2": {
|
|
1015
1576
|
"type": "oauth2",
|
|
1577
|
+
"description": "AccountManager OAuth 2.0 bearer token Authentication.",
|
|
1016
1578
|
"flows": {
|
|
1017
1579
|
"clientCredentials": {
|
|
1018
1580
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
@@ -1024,10 +1586,8 @@
|
|
|
1024
1586
|
"authorizationCode": {
|
|
1025
1587
|
"authorizationUrl": "https://account.demandware.com/dwsso/oauth2/authorize",
|
|
1026
1588
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
1027
|
-
"
|
|
1028
|
-
|
|
1029
|
-
"sfcc.source-codes.rw": "source-codes read/write"
|
|
1030
|
-
}
|
|
1589
|
+
"refreshUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|
|
1590
|
+
"scopes": {}
|
|
1031
1591
|
}
|
|
1032
1592
|
}
|
|
1033
1593
|
}
|