@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": "Analytics",
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/analytics/analytics-oas-v1-public.yaml)\n\n# API Overview\n\nThe Commerce Intelligence API provides access to metadata and query capabilities for analytics data available in the Commerce Intelligence Platform. Use this API to discover available subject areas and their dimensions and measures, and to query data for reporting and analytics purposes.\n\n## Features\n\n- **List Subject Areas**: Retrieve all available subject areas for an organization\n- **Subject Area Details**: Get detailed metadata including dimensions, measures, display names, and data types for a specific subject area\n- **Query Subject Area Data**: Query specific subject area data for reporting and analytics\n- **Flexible Filtering**: Filter by dimensions using operators such as equals, gt, lt, contains, date ranges, and more\n- **Sorting**: Order results by any field in ascending or descending order\n- **Pagination**: Built-in pagination support with configurable limit and offset\n\n## Endpoints\n\n### GET /organizations/{organizationId}/subject-areas\n\nRetrieve a list of all available subject areas in an organization.\n\n**Parameters:**\n- `organizationId` (required) - The organization identifier\n\n### GET /organizations/{organizationId}/subject-areas/{subjectAreaId}\n\nRetrieve metadata about a specific subject area, including its dimensions and measures.\n\n**Parameters:**\n- `organizationId` (required) - The organization identifier\n- `subjectAreaId` (required) - The subject area to retrieve metadata for (e.g., orderitems)\n\n### POST /organizations/{organizationId}/query/{subjectAreaId}\n\nQuery subject area data within an organization. Specify dimensions, measures, filters, and ordering in the request body.\n\n**Parameters:**\n- `organizationId` (required) - The organization identifier\n- `subjectAreaId` (required) - The subject area to query (e.g., orderitems)\n\n## Authentication and Authorization\n\nThis API uses OAuth 2.0 client credentials flow via Account Manager with the following scope:\n- `sfcc.analytics` - Access to analytics subject areas, metadata, and query operations",
|
|
5
6
|
"version": "1.0.0",
|
|
6
7
|
"x-api-type": "Admin",
|
|
7
8
|
"x-api-family": "Intelligence"
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/intelligence/analytics/v1",
|
|
12
13
|
"variables": {
|
|
13
14
|
"shortCode": {
|
|
15
|
+
"description": "A region-specific merchant identifier.",
|
|
14
16
|
"default": "0dnz6oep"
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -19,17 +21,21 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/subject-areas": {
|
|
21
23
|
"get": {
|
|
24
|
+
"summary": "Get Subject Areas",
|
|
25
|
+
"description": "Retrieve a list of subject areas.",
|
|
22
26
|
"operationId": "getSubjectAreas",
|
|
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
|
"responses": {
|
|
@@ -39,6 +45,11 @@
|
|
|
39
45
|
"application/json": {
|
|
40
46
|
"schema": {
|
|
41
47
|
"$ref": "#/components/schemas/SubjectAreasResponse"
|
|
48
|
+
},
|
|
49
|
+
"examples": {
|
|
50
|
+
"subjectAreasExample": {
|
|
51
|
+
"$ref": "#/components/examples/SubjectAreasResponseExample"
|
|
52
|
+
}
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
55
|
}
|
|
@@ -64,21 +75,26 @@
|
|
|
64
75
|
},
|
|
65
76
|
"/organizations/{organizationId}/subject-areas/{subjectAreaId}": {
|
|
66
77
|
"get": {
|
|
78
|
+
"summary": "Get Subject Area by ID",
|
|
79
|
+
"description": "Access metadata about a subject area",
|
|
67
80
|
"operationId": "getSubjectAreaById",
|
|
68
81
|
"parameters": [
|
|
69
82
|
{
|
|
70
83
|
"name": "organizationId",
|
|
71
84
|
"in": "path",
|
|
85
|
+
"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).",
|
|
72
86
|
"required": true,
|
|
73
87
|
"style": "simple",
|
|
74
88
|
"explode": false,
|
|
75
89
|
"schema": {
|
|
76
90
|
"$ref": "#/components/schemas/OrganizationId"
|
|
77
|
-
}
|
|
91
|
+
},
|
|
92
|
+
"example": "f_ecom_zzxy_prd"
|
|
78
93
|
},
|
|
79
94
|
{
|
|
80
95
|
"name": "subjectAreaId",
|
|
81
96
|
"in": "path",
|
|
97
|
+
"description": "The subject area to retrieve metadata for or to query",
|
|
82
98
|
"required": true,
|
|
83
99
|
"style": "simple",
|
|
84
100
|
"explode": false,
|
|
@@ -94,6 +110,11 @@
|
|
|
94
110
|
"application/json": {
|
|
95
111
|
"schema": {
|
|
96
112
|
"$ref": "#/components/schemas/SubjectArea"
|
|
113
|
+
},
|
|
114
|
+
"examples": {
|
|
115
|
+
"subjectAreaResponseExample": {
|
|
116
|
+
"$ref": "#/components/examples/SubjectAreaExample"
|
|
117
|
+
}
|
|
97
118
|
}
|
|
98
119
|
}
|
|
99
120
|
}
|
|
@@ -122,21 +143,26 @@
|
|
|
122
143
|
},
|
|
123
144
|
"/organizations/{organizationId}/query/{subjectAreaId}": {
|
|
124
145
|
"post": {
|
|
146
|
+
"summary": "Query subject area data",
|
|
147
|
+
"description": "Query subject area data for reporting and analytics purposes. Use `limit` and `offset` in the request body to control pagination. The response echoes the original query, including pagination parameters, in the `query` object.\n",
|
|
125
148
|
"operationId": "querySubjectArea",
|
|
126
149
|
"parameters": [
|
|
127
150
|
{
|
|
128
151
|
"name": "organizationId",
|
|
129
152
|
"in": "path",
|
|
153
|
+
"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).",
|
|
130
154
|
"required": true,
|
|
131
155
|
"style": "simple",
|
|
132
156
|
"explode": false,
|
|
133
157
|
"schema": {
|
|
134
158
|
"$ref": "#/components/schemas/OrganizationId"
|
|
135
|
-
}
|
|
159
|
+
},
|
|
160
|
+
"example": "f_ecom_zzxy_prd"
|
|
136
161
|
},
|
|
137
162
|
{
|
|
138
163
|
"name": "subjectAreaId",
|
|
139
164
|
"in": "path",
|
|
165
|
+
"description": "The subject area to retrieve metadata for or to query",
|
|
140
166
|
"required": true,
|
|
141
167
|
"style": "simple",
|
|
142
168
|
"explode": false,
|
|
@@ -146,10 +172,19 @@
|
|
|
146
172
|
}
|
|
147
173
|
],
|
|
148
174
|
"requestBody": {
|
|
175
|
+
"description": "The query request document",
|
|
149
176
|
"content": {
|
|
150
177
|
"application/json": {
|
|
151
178
|
"schema": {
|
|
152
179
|
"$ref": "#/components/schemas/QueryRequest"
|
|
180
|
+
},
|
|
181
|
+
"examples": {
|
|
182
|
+
"queryRequestExample": {
|
|
183
|
+
"$ref": "#/components/examples/QueryRequestExample"
|
|
184
|
+
},
|
|
185
|
+
"queryRequestSetOperatorExample": {
|
|
186
|
+
"$ref": "#/components/examples/QueryRequestSetOperatorExample"
|
|
187
|
+
}
|
|
153
188
|
}
|
|
154
189
|
}
|
|
155
190
|
},
|
|
@@ -162,6 +197,11 @@
|
|
|
162
197
|
"application/json": {
|
|
163
198
|
"schema": {
|
|
164
199
|
"$ref": "#/components/schemas/QueryResponse"
|
|
200
|
+
},
|
|
201
|
+
"examples": {
|
|
202
|
+
"queryResponseExample": {
|
|
203
|
+
"$ref": "#/components/examples/QueryResponseExample"
|
|
204
|
+
}
|
|
165
205
|
}
|
|
166
206
|
}
|
|
167
207
|
}
|
|
@@ -193,16 +233,26 @@
|
|
|
193
233
|
"schemas": {
|
|
194
234
|
"OrganizationId": {
|
|
195
235
|
"type": "string",
|
|
236
|
+
"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).",
|
|
237
|
+
"example": "f_ecom_zzxy_prd",
|
|
196
238
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
197
239
|
},
|
|
198
240
|
"SubjectAreasResponse": {
|
|
199
241
|
"type": "object",
|
|
200
242
|
"additionalProperties": false,
|
|
243
|
+
"example": {
|
|
244
|
+
"data": [
|
|
245
|
+
"orderitems",
|
|
246
|
+
"sessions",
|
|
247
|
+
"pageviews"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
201
250
|
"properties": {
|
|
202
251
|
"data": {
|
|
203
252
|
"type": "array",
|
|
204
253
|
"items": {
|
|
205
254
|
"type": "string",
|
|
255
|
+
"example": "orderitems",
|
|
206
256
|
"maxLength": 256,
|
|
207
257
|
"minLength": 1
|
|
208
258
|
}
|
|
@@ -215,17 +265,25 @@
|
|
|
215
265
|
"properties": {
|
|
216
266
|
"title": {
|
|
217
267
|
"type": "string",
|
|
268
|
+
"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",
|
|
269
|
+
"example": "You do not have enough credit",
|
|
218
270
|
"maxLength": 256
|
|
219
271
|
},
|
|
220
272
|
"type": {
|
|
221
273
|
"type": "string",
|
|
274
|
+
"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",
|
|
275
|
+
"example": "NotEnoughMoney",
|
|
222
276
|
"maxLength": 2048
|
|
223
277
|
},
|
|
224
278
|
"detail": {
|
|
225
|
-
"type": "string"
|
|
279
|
+
"type": "string",
|
|
280
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
281
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
226
282
|
},
|
|
227
283
|
"instance": {
|
|
228
284
|
"type": "string",
|
|
285
|
+
"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",
|
|
286
|
+
"example": "/account/12345/msgs/abc",
|
|
229
287
|
"maxLength": 2048
|
|
230
288
|
}
|
|
231
289
|
},
|
|
@@ -241,9 +299,16 @@
|
|
|
241
299
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
242
300
|
}
|
|
243
301
|
],
|
|
302
|
+
"description": "Returned when a query or request body parameter is malformed.",
|
|
303
|
+
"example": {
|
|
304
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-parameter",
|
|
305
|
+
"title": "Malformed Parameter",
|
|
306
|
+
"detail": "The requested query or request body parameter 'subjectAreaId' is malformed."
|
|
307
|
+
},
|
|
244
308
|
"properties": {
|
|
245
309
|
"parameterId": {
|
|
246
310
|
"type": "string",
|
|
311
|
+
"example": "subjectAreaId",
|
|
247
312
|
"maxLength": 256,
|
|
248
313
|
"minLength": 1
|
|
249
314
|
}
|
|
@@ -251,11 +316,15 @@
|
|
|
251
316
|
},
|
|
252
317
|
"SubjectAreaId": {
|
|
253
318
|
"type": "string",
|
|
319
|
+
"description": "The unique identifier of the subject area",
|
|
320
|
+
"example": "orderitems",
|
|
254
321
|
"maxLength": 256,
|
|
255
322
|
"minLength": 1
|
|
256
323
|
},
|
|
257
324
|
"DimensionId": {
|
|
258
325
|
"type": "string",
|
|
326
|
+
"description": "The unique identifier of the dimension",
|
|
327
|
+
"example": "utc_submit_timestamp",
|
|
259
328
|
"maxLength": 256,
|
|
260
329
|
"minLength": 1
|
|
261
330
|
},
|
|
@@ -267,16 +336,22 @@
|
|
|
267
336
|
},
|
|
268
337
|
"displayName": {
|
|
269
338
|
"type": "string",
|
|
339
|
+
"description": "The display name of the dimension",
|
|
340
|
+
"example": "Submit Timestamp (UTC)",
|
|
270
341
|
"maxLength": 256,
|
|
271
342
|
"minLength": 1
|
|
272
343
|
},
|
|
273
344
|
"description": {
|
|
274
345
|
"type": "string",
|
|
346
|
+
"description": "Description of the dimension",
|
|
347
|
+
"example": "The UTC timestamp when the order was submitted",
|
|
275
348
|
"maxLength": 1024,
|
|
276
349
|
"minLength": 1
|
|
277
350
|
},
|
|
278
351
|
"type": {
|
|
279
352
|
"type": "string",
|
|
353
|
+
"description": "The data type of the dimension",
|
|
354
|
+
"example": "timestamp",
|
|
280
355
|
"maxLength": 256,
|
|
281
356
|
"minLength": 1
|
|
282
357
|
}
|
|
@@ -288,6 +363,8 @@
|
|
|
288
363
|
},
|
|
289
364
|
"MeasureId": {
|
|
290
365
|
"type": "string",
|
|
366
|
+
"description": "The unique identifier of the measure",
|
|
367
|
+
"example": "units",
|
|
291
368
|
"maxLength": 256,
|
|
292
369
|
"minLength": 1
|
|
293
370
|
},
|
|
@@ -299,16 +376,22 @@
|
|
|
299
376
|
},
|
|
300
377
|
"displayName": {
|
|
301
378
|
"type": "string",
|
|
379
|
+
"description": "The display name of the measure",
|
|
380
|
+
"example": "Units",
|
|
302
381
|
"maxLength": 256,
|
|
303
382
|
"minLength": 1
|
|
304
383
|
},
|
|
305
384
|
"description": {
|
|
306
385
|
"type": "string",
|
|
386
|
+
"description": "Description of the measure",
|
|
387
|
+
"example": "Number of units ordered",
|
|
307
388
|
"maxLength": 1024,
|
|
308
389
|
"minLength": 1
|
|
309
390
|
},
|
|
310
391
|
"type": {
|
|
311
392
|
"type": "string",
|
|
393
|
+
"description": "The data type of the measure",
|
|
394
|
+
"example": "integer",
|
|
312
395
|
"maxLength": 256,
|
|
313
396
|
"minLength": 1
|
|
314
397
|
}
|
|
@@ -326,30 +409,42 @@
|
|
|
326
409
|
},
|
|
327
410
|
"description": {
|
|
328
411
|
"type": "string",
|
|
412
|
+
"description": "Description of the subject area",
|
|
413
|
+
"example": "Order item level data",
|
|
329
414
|
"maxLength": 1024,
|
|
330
415
|
"minLength": 1
|
|
331
416
|
},
|
|
332
417
|
"tags": {
|
|
333
418
|
"type": "array",
|
|
419
|
+
"description": "Tags associated with the subject area",
|
|
420
|
+
"example": [
|
|
421
|
+
"orders",
|
|
422
|
+
"commerce"
|
|
423
|
+
],
|
|
334
424
|
"items": {
|
|
335
425
|
"type": "string",
|
|
426
|
+
"example": "orders",
|
|
336
427
|
"maxLength": 256,
|
|
337
428
|
"minLength": 1
|
|
338
429
|
}
|
|
339
430
|
},
|
|
340
431
|
"displayName": {
|
|
341
432
|
"type": "string",
|
|
433
|
+
"description": "The display name of the subject area",
|
|
434
|
+
"example": "Order Items",
|
|
342
435
|
"maxLength": 256,
|
|
343
436
|
"minLength": 1
|
|
344
437
|
},
|
|
345
438
|
"dimensions": {
|
|
346
439
|
"type": "array",
|
|
440
|
+
"description": "Array of dimension metadata for the subject area",
|
|
347
441
|
"items": {
|
|
348
442
|
"$ref": "#/components/schemas/Dimension"
|
|
349
443
|
}
|
|
350
444
|
},
|
|
351
445
|
"measures": {
|
|
352
446
|
"type": "array",
|
|
447
|
+
"description": "Array of measure metadata for the subject area",
|
|
353
448
|
"items": {
|
|
354
449
|
"$ref": "#/components/schemas/Measure"
|
|
355
450
|
}
|
|
@@ -368,6 +463,13 @@
|
|
|
368
463
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
369
464
|
}
|
|
370
465
|
],
|
|
466
|
+
"description": "Returned when the requested subject area was not found.",
|
|
467
|
+
"example": {
|
|
468
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/subject-area-not-found",
|
|
469
|
+
"title": "Subject Area Not Found",
|
|
470
|
+
"detail": "The requested 'orderitems' subject area was not found.\"",
|
|
471
|
+
"subjectAreaId": "orderitems"
|
|
472
|
+
},
|
|
371
473
|
"properties": {
|
|
372
474
|
"subjectAreaId": {
|
|
373
475
|
"$ref": "#/components/schemas/SubjectAreaId"
|
|
@@ -379,6 +481,7 @@
|
|
|
379
481
|
"properties": {
|
|
380
482
|
"operator": {
|
|
381
483
|
"type": "string",
|
|
484
|
+
"description": "The filter operator to apply",
|
|
382
485
|
"enum": [
|
|
383
486
|
"equals",
|
|
384
487
|
"not_equals",
|
|
@@ -394,12 +497,18 @@
|
|
|
394
497
|
"not_in_date_range",
|
|
395
498
|
"before_date",
|
|
396
499
|
"after_date"
|
|
397
|
-
]
|
|
500
|
+
],
|
|
501
|
+
"example": "gt"
|
|
398
502
|
},
|
|
399
503
|
"values": {
|
|
400
504
|
"type": "array",
|
|
505
|
+
"description": "Array of values for the filter. For operators `set` and `not_set`, which check for the presence or absence of a value, pass an empty array (`[]`) since these operators do not take operands.\n",
|
|
506
|
+
"example": [
|
|
507
|
+
"2020-01-01"
|
|
508
|
+
],
|
|
401
509
|
"items": {
|
|
402
510
|
"type": "string",
|
|
511
|
+
"example": "2020-01-01",
|
|
403
512
|
"maxLength": 256,
|
|
404
513
|
"minLength": 1
|
|
405
514
|
}
|
|
@@ -420,6 +529,8 @@
|
|
|
420
529
|
"properties": {
|
|
421
530
|
"dimension": {
|
|
422
531
|
"type": "string",
|
|
532
|
+
"description": "The dimension to filter on",
|
|
533
|
+
"example": "utc_submit_timestamp",
|
|
423
534
|
"maxLength": 256,
|
|
424
535
|
"minLength": 1
|
|
425
536
|
}
|
|
@@ -440,6 +551,8 @@
|
|
|
440
551
|
"properties": {
|
|
441
552
|
"measure": {
|
|
442
553
|
"type": "string",
|
|
554
|
+
"description": "The measure to filter on",
|
|
555
|
+
"example": "units",
|
|
443
556
|
"maxLength": 256,
|
|
444
557
|
"minLength": 1
|
|
445
558
|
}
|
|
@@ -455,15 +568,19 @@
|
|
|
455
568
|
"properties": {
|
|
456
569
|
"field": {
|
|
457
570
|
"type": "string",
|
|
571
|
+
"description": "The field to order by",
|
|
572
|
+
"example": "utc_submit_timestamp",
|
|
458
573
|
"maxLength": 256,
|
|
459
574
|
"minLength": 1
|
|
460
575
|
},
|
|
461
576
|
"order": {
|
|
462
577
|
"type": "string",
|
|
578
|
+
"description": "The sort order (ascending or descending)",
|
|
463
579
|
"enum": [
|
|
464
580
|
"asc",
|
|
465
581
|
"desc"
|
|
466
|
-
]
|
|
582
|
+
],
|
|
583
|
+
"example": "asc"
|
|
467
584
|
}
|
|
468
585
|
},
|
|
469
586
|
"required": [
|
|
@@ -476,18 +593,37 @@
|
|
|
476
593
|
"properties": {
|
|
477
594
|
"dimensions": {
|
|
478
595
|
"type": "array",
|
|
596
|
+
"description": "Array of dimension IDs to include in the query",
|
|
597
|
+
"example": [
|
|
598
|
+
"utc_submit_timestamp",
|
|
599
|
+
"site_name"
|
|
600
|
+
],
|
|
479
601
|
"items": {
|
|
480
602
|
"$ref": "#/components/schemas/DimensionId"
|
|
481
603
|
}
|
|
482
604
|
},
|
|
483
605
|
"measures": {
|
|
484
606
|
"type": "array",
|
|
607
|
+
"description": "Array of measure IDs to include in the query",
|
|
608
|
+
"example": [
|
|
609
|
+
"units"
|
|
610
|
+
],
|
|
485
611
|
"items": {
|
|
486
612
|
"$ref": "#/components/schemas/MeasureId"
|
|
487
613
|
}
|
|
488
614
|
},
|
|
489
615
|
"filters": {
|
|
490
616
|
"type": "array",
|
|
617
|
+
"description": "Array of filter expressions for dimensions or measures",
|
|
618
|
+
"example": [
|
|
619
|
+
{
|
|
620
|
+
"dimension": "utc_submit_timestamp",
|
|
621
|
+
"operator": "gt",
|
|
622
|
+
"values": [
|
|
623
|
+
"2020-01-01"
|
|
624
|
+
]
|
|
625
|
+
}
|
|
626
|
+
],
|
|
491
627
|
"items": {
|
|
492
628
|
"oneOf": [
|
|
493
629
|
{
|
|
@@ -501,16 +637,27 @@
|
|
|
501
637
|
},
|
|
502
638
|
"order": {
|
|
503
639
|
"type": "array",
|
|
640
|
+
"description": "Array of ordering expressions",
|
|
641
|
+
"example": [
|
|
642
|
+
{
|
|
643
|
+
"field": "utc_submit_timestamp",
|
|
644
|
+
"order": "asc"
|
|
645
|
+
}
|
|
646
|
+
],
|
|
504
647
|
"items": {
|
|
505
648
|
"$ref": "#/components/schemas/SortOrder"
|
|
506
649
|
}
|
|
507
650
|
},
|
|
508
651
|
"limit": {
|
|
509
652
|
"type": "integer",
|
|
653
|
+
"description": "Maximum number of results to return",
|
|
654
|
+
"example": 100,
|
|
510
655
|
"minimum": 1
|
|
511
656
|
},
|
|
512
657
|
"offset": {
|
|
513
658
|
"type": "integer",
|
|
659
|
+
"description": "Number of results to skip",
|
|
660
|
+
"example": 0,
|
|
514
661
|
"minimum": 0
|
|
515
662
|
}
|
|
516
663
|
},
|
|
@@ -527,33 +674,52 @@
|
|
|
527
674
|
{
|
|
528
675
|
"$ref": "#/components/schemas/SubjectAreaId"
|
|
529
676
|
}
|
|
530
|
-
]
|
|
677
|
+
],
|
|
678
|
+
"description": "The subject area that was queried",
|
|
679
|
+
"example": "orderitems"
|
|
531
680
|
},
|
|
532
681
|
"query": {
|
|
533
682
|
"$ref": "#/components/schemas/QueryRequest"
|
|
534
683
|
},
|
|
535
684
|
"dimensions": {
|
|
536
685
|
"type": "array",
|
|
686
|
+
"description": "Array of dimension IDs in the response",
|
|
687
|
+
"example": [
|
|
688
|
+
"utc_submit_timestamp",
|
|
689
|
+
"site_name"
|
|
690
|
+
],
|
|
537
691
|
"items": {
|
|
538
692
|
"$ref": "#/components/schemas/DimensionId"
|
|
539
693
|
}
|
|
540
694
|
},
|
|
541
695
|
"measures": {
|
|
542
696
|
"type": "array",
|
|
697
|
+
"description": "Array of measure IDs in the response",
|
|
698
|
+
"example": [
|
|
699
|
+
"units"
|
|
700
|
+
],
|
|
543
701
|
"items": {
|
|
544
702
|
"$ref": "#/components/schemas/MeasureId"
|
|
545
703
|
}
|
|
546
704
|
},
|
|
547
705
|
"fields": {
|
|
548
706
|
"type": "array",
|
|
707
|
+
"description": "Ordered list of all column keys in the response — the concatenation of `dimensions` and `measures`. Each entry is a `DimensionId` or `MeasureId` string. Provided as a convenience for tabular rendering so consumers can iterate columns in order without having to concatenate `dimensions` and `measures` themselves.\n",
|
|
708
|
+
"example": [
|
|
709
|
+
"utc_submit_timestamp",
|
|
710
|
+
"site_name",
|
|
711
|
+
"units"
|
|
712
|
+
],
|
|
549
713
|
"items": {
|
|
550
714
|
"type": "string",
|
|
715
|
+
"example": "utc_submit_timestamp",
|
|
551
716
|
"maxLength": 256,
|
|
552
717
|
"minLength": 1
|
|
553
718
|
}
|
|
554
719
|
},
|
|
555
720
|
"data": {
|
|
556
721
|
"type": "array",
|
|
722
|
+
"description": "Array of result objects containing the queried data. Each object has keys corresponding to the requested dimension and measure IDs. Value types vary based on each field's data type as described in the subject area metadata (e.g., string, integer, decimal, timestamp).",
|
|
557
723
|
"items": {
|
|
558
724
|
"type": "object",
|
|
559
725
|
"additionalProperties": true
|
|
@@ -577,6 +743,11 @@
|
|
|
577
743
|
"application/problem+json": {
|
|
578
744
|
"schema": {
|
|
579
745
|
"$ref": "#/components/schemas/MalformedParameterErrorResponse"
|
|
746
|
+
},
|
|
747
|
+
"examples": {
|
|
748
|
+
"MalformedParameterErrorResponseExample": {
|
|
749
|
+
"$ref": "#/components/examples/MalformedParameterErrorResponseExample"
|
|
750
|
+
}
|
|
580
751
|
}
|
|
581
752
|
}
|
|
582
753
|
}
|
|
@@ -587,6 +758,11 @@
|
|
|
587
758
|
"application/problem+json": {
|
|
588
759
|
"schema": {
|
|
589
760
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
761
|
+
},
|
|
762
|
+
"examples": {
|
|
763
|
+
"UnauthorizedExample": {
|
|
764
|
+
"$ref": "#/components/examples/UnauthorizedExample"
|
|
765
|
+
}
|
|
590
766
|
}
|
|
591
767
|
}
|
|
592
768
|
}
|
|
@@ -597,6 +773,11 @@
|
|
|
597
773
|
"application/problem+json": {
|
|
598
774
|
"schema": {
|
|
599
775
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
776
|
+
},
|
|
777
|
+
"examples": {
|
|
778
|
+
"ForbiddenExample": {
|
|
779
|
+
"$ref": "#/components/examples/ForbiddenExample"
|
|
780
|
+
}
|
|
600
781
|
}
|
|
601
782
|
}
|
|
602
783
|
}
|
|
@@ -607,6 +788,11 @@
|
|
|
607
788
|
"application/problem+json": {
|
|
608
789
|
"schema": {
|
|
609
790
|
"$ref": "#/components/schemas/SubjectAreaNotFoundErrorResponse"
|
|
791
|
+
},
|
|
792
|
+
"examples": {
|
|
793
|
+
"SubjectAreaNotFoundErrorResponseExample": {
|
|
794
|
+
"$ref": "#/components/examples/SubjectAreaNotFoundErrorResponseExample"
|
|
795
|
+
}
|
|
610
796
|
}
|
|
611
797
|
}
|
|
612
798
|
}
|
|
@@ -616,16 +802,19 @@
|
|
|
616
802
|
"organizationId": {
|
|
617
803
|
"name": "organizationId",
|
|
618
804
|
"in": "path",
|
|
805
|
+
"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).",
|
|
619
806
|
"required": true,
|
|
620
807
|
"style": "simple",
|
|
621
808
|
"explode": false,
|
|
622
809
|
"schema": {
|
|
623
810
|
"$ref": "#/components/schemas/OrganizationId"
|
|
624
|
-
}
|
|
811
|
+
},
|
|
812
|
+
"example": "f_ecom_zzxy_prd"
|
|
625
813
|
},
|
|
626
814
|
"subjectAreaId": {
|
|
627
815
|
"name": "subjectAreaId",
|
|
628
816
|
"in": "path",
|
|
817
|
+
"description": "The subject area to retrieve metadata for or to query",
|
|
629
818
|
"required": true,
|
|
630
819
|
"style": "simple",
|
|
631
820
|
"explode": false,
|
|
@@ -634,9 +823,208 @@
|
|
|
634
823
|
}
|
|
635
824
|
}
|
|
636
825
|
},
|
|
826
|
+
"examples": {
|
|
827
|
+
"SubjectAreasResponseExample": {
|
|
828
|
+
"value": {
|
|
829
|
+
"data": [
|
|
830
|
+
"orderitems",
|
|
831
|
+
"sessions",
|
|
832
|
+
"pageviews"
|
|
833
|
+
]
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"UnauthorizedExample": {
|
|
837
|
+
"value": {
|
|
838
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unauthorized",
|
|
839
|
+
"title": "Unauthorized",
|
|
840
|
+
"detail": "Unauthorized request"
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"ForbiddenExample": {
|
|
844
|
+
"value": {
|
|
845
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/forbidden",
|
|
846
|
+
"title": "Forbidden",
|
|
847
|
+
"detail": "Access to requested resource forbidden"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
"SubjectAreaExample": {
|
|
851
|
+
"value": {
|
|
852
|
+
"id": "orderitems",
|
|
853
|
+
"displayName": "Order Items",
|
|
854
|
+
"description": "Order item level data",
|
|
855
|
+
"tags": [
|
|
856
|
+
"orders",
|
|
857
|
+
"commerce"
|
|
858
|
+
],
|
|
859
|
+
"dimensions": [
|
|
860
|
+
{
|
|
861
|
+
"id": "utc_submit_timestamp",
|
|
862
|
+
"displayName": "Submit Timestamp (UTC)",
|
|
863
|
+
"description": "The UTC timestamp when the order was submitted",
|
|
864
|
+
"type": "timestamp"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"id": "site_name",
|
|
868
|
+
"displayName": "Site Name",
|
|
869
|
+
"description": "The name of the site",
|
|
870
|
+
"type": "string"
|
|
871
|
+
}
|
|
872
|
+
],
|
|
873
|
+
"measures": [
|
|
874
|
+
{
|
|
875
|
+
"id": "units",
|
|
876
|
+
"displayName": "Units",
|
|
877
|
+
"description": "Number of units ordered",
|
|
878
|
+
"type": "integer"
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"id": "revenue",
|
|
882
|
+
"displayName": "Revenue",
|
|
883
|
+
"description": "Total revenue amount",
|
|
884
|
+
"type": "decimal"
|
|
885
|
+
}
|
|
886
|
+
]
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"QueryRequestExample": {
|
|
890
|
+
"value": {
|
|
891
|
+
"dimensions": [
|
|
892
|
+
"utc_submit_timestamp",
|
|
893
|
+
"site_name"
|
|
894
|
+
],
|
|
895
|
+
"measures": [
|
|
896
|
+
"units"
|
|
897
|
+
],
|
|
898
|
+
"filters": [
|
|
899
|
+
{
|
|
900
|
+
"dimension": "utc_submit_timestamp",
|
|
901
|
+
"operator": "gt",
|
|
902
|
+
"values": [
|
|
903
|
+
"2020-01-01"
|
|
904
|
+
]
|
|
905
|
+
}
|
|
906
|
+
],
|
|
907
|
+
"order": [
|
|
908
|
+
{
|
|
909
|
+
"field": "utc_submit_timestamp",
|
|
910
|
+
"order": "asc"
|
|
911
|
+
}
|
|
912
|
+
],
|
|
913
|
+
"limit": 100,
|
|
914
|
+
"offset": 0
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
"QueryRequestSetOperatorExample": {
|
|
918
|
+
"summary": "Filter using set / not_set operators",
|
|
919
|
+
"description": "Example showing the `set` and `not_set` operators. These check for the presence or absence of a value on a dimension and do not take operands, so `values` must be an empty array (`[]`).\n",
|
|
920
|
+
"value": {
|
|
921
|
+
"dimensions": [
|
|
922
|
+
"utc_submit_timestamp",
|
|
923
|
+
"site_name"
|
|
924
|
+
],
|
|
925
|
+
"measures": [
|
|
926
|
+
"units"
|
|
927
|
+
],
|
|
928
|
+
"filters": [
|
|
929
|
+
{
|
|
930
|
+
"dimension": "site_name",
|
|
931
|
+
"operator": "set",
|
|
932
|
+
"values": []
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"dimension": "campaign_id",
|
|
936
|
+
"operator": "not_set",
|
|
937
|
+
"values": []
|
|
938
|
+
}
|
|
939
|
+
],
|
|
940
|
+
"limit": 100,
|
|
941
|
+
"offset": 0
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"QueryResponseExample": {
|
|
945
|
+
"value": {
|
|
946
|
+
"subjectAreaId": "orderitems",
|
|
947
|
+
"query": {
|
|
948
|
+
"dimensions": [
|
|
949
|
+
"utc_submit_timestamp",
|
|
950
|
+
"site_name"
|
|
951
|
+
],
|
|
952
|
+
"measures": [
|
|
953
|
+
"units"
|
|
954
|
+
],
|
|
955
|
+
"filters": [
|
|
956
|
+
{
|
|
957
|
+
"dimension": "utc_submit_timestamp",
|
|
958
|
+
"operator": "gt",
|
|
959
|
+
"values": [
|
|
960
|
+
"2020-01-01"
|
|
961
|
+
]
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
"order": [
|
|
965
|
+
{
|
|
966
|
+
"field": "utc_submit_timestamp",
|
|
967
|
+
"order": "asc"
|
|
968
|
+
}
|
|
969
|
+
],
|
|
970
|
+
"limit": 100,
|
|
971
|
+
"offset": 0
|
|
972
|
+
},
|
|
973
|
+
"dimensions": [
|
|
974
|
+
"utc_submit_timestamp",
|
|
975
|
+
"site_name"
|
|
976
|
+
],
|
|
977
|
+
"measures": [
|
|
978
|
+
"units"
|
|
979
|
+
],
|
|
980
|
+
"fields": [
|
|
981
|
+
"utc_submit_timestamp",
|
|
982
|
+
"site_name",
|
|
983
|
+
"units"
|
|
984
|
+
],
|
|
985
|
+
"data": [
|
|
986
|
+
{
|
|
987
|
+
"utc_submit_timestamp": "2020-01-01",
|
|
988
|
+
"site_name": "Sites-SiteGenesis-Site",
|
|
989
|
+
"units": 42
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"utc_submit_timestamp": "2020-01-01",
|
|
993
|
+
"site_name": "Sites-SiteGenesisGlobal-Site",
|
|
994
|
+
"units": 37
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"utc_submit_timestamp": "2020-01-02",
|
|
998
|
+
"site_name": "Sites-SiteGenesis-Site",
|
|
999
|
+
"units": 12
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"utc_submit_timestamp": "2020-01-02",
|
|
1003
|
+
"site_name": "Sites-SiteGenesisGlobal-Site",
|
|
1004
|
+
"units": 75
|
|
1005
|
+
}
|
|
1006
|
+
]
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
"MalformedParameterErrorResponseExample": {
|
|
1010
|
+
"value": {
|
|
1011
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-parameter",
|
|
1012
|
+
"detail": "The requested query or request body parameter 'subjectAreaId' is malformed.",
|
|
1013
|
+
"title": "Malformed Parameter"
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
"SubjectAreaNotFoundErrorResponseExample": {
|
|
1017
|
+
"value": {
|
|
1018
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/subject-area-not-found",
|
|
1019
|
+
"detail": "The requested 'orderitems' subject area was not found.",
|
|
1020
|
+
"title": "Subject Area Not Found"
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
637
1024
|
"securitySchemes": {
|
|
638
1025
|
"AmOAuth2": {
|
|
639
1026
|
"type": "oauth2",
|
|
1027
|
+
"description": "Account Manager OAuth 2.0 bearer token authentication.",
|
|
640
1028
|
"flows": {
|
|
641
1029
|
"clientCredentials": {
|
|
642
1030
|
"tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
|