@salesforce/b2c-tooling-sdk 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/data/schemas/dw.schema.json +14 -0
  2. package/data/tooling/index.json +5 -5
  3. package/dist/esm/cli/base-command.js +4 -3
  4. package/dist/esm/cli/base-command.js.map +1 -1
  5. package/dist/esm/cli/cartridge-command.js +2 -1
  6. package/dist/esm/cli/cartridge-command.js.map +1 -1
  7. package/dist/esm/cli/config.js +3 -1
  8. package/dist/esm/cli/config.js.map +1 -1
  9. package/dist/esm/cli/hooks.d.ts +13 -0
  10. package/dist/esm/cli/hooks.js +11 -0
  11. package/dist/esm/cli/hooks.js.map +1 -1
  12. package/dist/esm/cli/instance-command.js +2 -1
  13. package/dist/esm/cli/instance-command.js.map +1 -1
  14. package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
  15. package/dist/esm/clients/scapi-backend-utils.js +28 -1
  16. package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
  17. package/dist/esm/clients/scapi-fallback-backend.js +2 -2
  18. package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
  19. package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
  20. package/dist/esm/compat/dispatcher.js +2 -2
  21. package/dist/esm/compat/dispatcher.js.map +1 -1
  22. package/dist/esm/config/config-origins.d.ts +19 -0
  23. package/dist/esm/config/config-origins.js +11 -0
  24. package/dist/esm/config/config-origins.js.map +1 -0
  25. package/dist/esm/config/config-write.d.ts +86 -0
  26. package/dist/esm/config/config-write.js +296 -0
  27. package/dist/esm/config/config-write.js.map +1 -0
  28. package/dist/esm/config/dw-json-schema.js +4 -0
  29. package/dist/esm/config/dw-json-schema.js.map +1 -1
  30. package/dist/esm/config/dw-json.d.ts +2 -0
  31. package/dist/esm/config/dw-json.js +10 -6
  32. package/dist/esm/config/dw-json.js.map +1 -1
  33. package/dist/esm/config/index.d.ts +8 -3
  34. package/dist/esm/config/index.js +5 -2
  35. package/dist/esm/config/index.js.map +1 -1
  36. package/dist/esm/config/instance-manager.d.ts +64 -28
  37. package/dist/esm/config/instance-manager.js +145 -63
  38. package/dist/esm/config/instance-manager.js.map +1 -1
  39. package/dist/esm/config/mapping.js +6 -0
  40. package/dist/esm/config/mapping.js.map +1 -1
  41. package/dist/esm/config/resolver.d.ts +22 -0
  42. package/dist/esm/config/resolver.js +54 -29
  43. package/dist/esm/config/resolver.js.map +1 -1
  44. package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
  45. package/dist/esm/config/sources/dw-json-source.js +34 -20
  46. package/dist/esm/config/sources/dw-json-source.js.map +1 -1
  47. package/dist/esm/config/sources/env-source.d.ts +30 -3
  48. package/dist/esm/config/sources/env-source.js +126 -1
  49. package/dist/esm/config/sources/env-source.js.map +1 -1
  50. package/dist/esm/config/types.d.ts +46 -0
  51. package/dist/esm/operations/jobs/run-system-job.js +2 -2
  52. package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
  53. package/dist/esm/plugins/discovery.js +2 -1
  54. package/dist/esm/plugins/discovery.js.map +1 -1
  55. package/dist/esm/scapi/index.d.ts +5 -2
  56. package/dist/esm/scapi/index.js +3 -2
  57. package/dist/esm/scapi/index.js.map +1 -1
  58. package/dist/esm/scapi/live.d.ts +12 -1
  59. package/dist/esm/scapi/live.js +30 -2
  60. package/dist/esm/scapi/live.js.map +1 -1
  61. package/dist/esm/scapi/local.d.ts +17 -0
  62. package/dist/esm/scapi/local.js +68 -16
  63. package/dist/esm/scapi/local.js.map +1 -1
  64. package/dist/esm/scapi/request.d.ts +2 -2
  65. package/dist/esm/scapi/request.js +2 -1
  66. package/dist/esm/scapi/request.js.map +1 -1
  67. package/dist/esm/scapi/runtime.d.ts +5 -0
  68. package/dist/esm/scapi/runtime.js.map +1 -1
  69. package/dist/esm/scapi/schema-source.d.ts +90 -0
  70. package/dist/esm/scapi/schema-source.js +146 -0
  71. package/dist/esm/scapi/schema-source.js.map +1 -0
  72. package/dist/esm/scapi/worker-source.js +30 -6
  73. package/dist/esm/scapi/worker-source.js.map +1 -1
  74. package/dist/esm/test-utils/config-isolation.js +9 -2
  75. package/dist/esm/test-utils/config-isolation.js.map +1 -1
  76. package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
  77. package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
  78. package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
  79. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
  80. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
  81. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
  82. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
  83. package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
  84. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
  85. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
  86. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
  87. package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
  88. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
  89. package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
  90. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
  91. package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
  92. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
  93. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
  94. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
  95. package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
  96. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
  97. package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
  98. package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
  99. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
  100. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
  101. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
  102. package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
  103. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
  104. package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
  105. package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
  106. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
  107. package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
  108. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
  109. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
  110. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
  111. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
  112. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
  113. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
  114. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
  115. package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
  116. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
  117. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
  118. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
  119. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
  120. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
  121. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
  122. package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
  123. package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
  124. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
  125. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
  126. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
  127. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
  128. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
  129. package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
  130. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
  131. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
  132. package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
  133. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
  134. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
  135. package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
  136. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
  137. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
  138. package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
  139. package/package.json +2 -2
  140. package/specs/scapi-schemas-v1.yaml +4 -1
@@ -2,7 +2,8 @@
2
2
  "openapi": "3.0.3",
3
3
  "info": {
4
4
  "title": "Gift Certificates",
5
- "version": "1.0.42",
5
+ "description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/gift-certificates/gift-certificates-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Gift Certificates API to create, update, and delete gift certificates, so that your storefront customers can purchase and redeem gift certificates.\n\n## Authentication & Authorization\n\nThe client requesting the gift certificate information must have access to the Gift Certificates 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 the relevant scope(s) in the client ID used to generate the token. For details, see [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)\n\n## Use Cases\n\n### Capture All Gift Certificates\n\nRetrieve all gift certificates for a site with no filtering.\n\n### Capture Specific Gift Certificates\n\nRetrieve a specific gift certificate for a site using a merchant ID.\n\n### Create Site Specific Gift Certificates\n\nCreate and issue site-specific gift certificates with information such as amount, description, status, recipient email, recipient name, sender name, and so on.\n\n### Update Gift Certificates\n\nUpdate a gift certificate with specified information using a merchant ID.\n\n## Related APIs\n\n- [Shopper Gift Certificates](https://developer.salesforce.com/docs/commerce/commerce-api/references/shopper-gift-certificates?meta=Summary) — Retrieve gift certificate details for shoppers.",
6
+ "version": "1.0.43",
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/gift-certificates/v1",
12
13
  "variables": {
13
14
  "shortCode": {
15
+ "description": "An eight-character string assigned to a realm for routing purposes. See [Base URL and Request Formation.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html)",
14
16
  "default": "shortCode"
15
17
  }
16
18
  }
@@ -19,26 +21,36 @@
19
21
  "paths": {
20
22
  "/organizations/{organizationId}/gift-certificates": {
21
23
  "put": {
24
+ "summary": "Create a gift certificate using the information provided.",
25
+ "description": "If an existing identifier is specified, the gift certificate with that unique identifier is deleted and a new one is created.",
22
26
  "operationId": "createGiftCertificate",
23
27
  "parameters": [
24
28
  {
25
29
  "name": "organizationId",
26
30
  "in": "path",
31
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
27
32
  "required": true,
28
33
  "style": "simple",
29
34
  "explode": false,
30
35
  "schema": {
31
36
  "$ref": "#/components/schemas/OrganizationId"
32
- }
37
+ },
38
+ "example": "f_ecom_zzxy_prd"
33
39
  },
34
40
  {
35
41
  "name": "siteId",
36
42
  "in": "query",
43
+ "description": "The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites.",
37
44
  "required": true,
38
45
  "style": "form",
39
46
  "explode": true,
40
47
  "schema": {
41
48
  "$ref": "#/components/schemas/SiteId"
49
+ },
50
+ "examples": {
51
+ "SiteId": {
52
+ "value": "RefArch"
53
+ }
42
54
  }
43
55
  }
44
56
  ],
@@ -47,6 +59,11 @@
47
59
  "application/json": {
48
60
  "schema": {
49
61
  "$ref": "#/components/schemas/GiftCertificate"
62
+ },
63
+ "examples": {
64
+ "Gift-Certificates": {
65
+ "$ref": "#/components/examples/GiftCertificateCreateExample"
66
+ }
50
67
  }
51
68
  }
52
69
  },
@@ -59,26 +76,50 @@
59
76
  "application/json": {
60
77
  "schema": {
61
78
  "$ref": "#/components/schemas/GiftCertificate"
79
+ },
80
+ "examples": {
81
+ "CreateGiftCertificateSuccess": {
82
+ "$ref": "#/components/examples/CreateGiftCertificateSuccess"
83
+ }
62
84
  }
63
85
  }
64
86
  }
65
87
  },
66
88
  "400": {
67
- "description": "Potential reasons:\n- Thrown when the merchant ID is not unique.\n- Thrown when the specified gift certificate status is invalid.\n- Thrown when the specified gift certificate is not valid (the argument indicates the field that was invalid).\n- Thrown when the specified amount is out of range.",
89
+ "description": "Potential reasons:\n- Returned when the merchant ID is not unique.\n- Returned when the specified gift certificate status is invalid.\n- Returned when the specified gift certificate is not valid (the argument indicates the field that was invalid).\n- Returned when the specified amount is out of range.",
68
90
  "content": {
69
91
  "application/json": {
70
92
  "schema": {
71
93
  "$ref": "#/components/schemas/ErrorResponse"
94
+ },
95
+ "examples": {
96
+ "InvalidRecipientEmail400": {
97
+ "$ref": "#/components/examples/InvalidRecipientEmail400"
98
+ },
99
+ "InvalidStatus400": {
100
+ "$ref": "#/components/examples/InvalidStatus400"
101
+ },
102
+ "Invalid400": {
103
+ "$ref": "#/components/examples/Invalid400"
104
+ },
105
+ "MerchantIdNotUnique400": {
106
+ "$ref": "#/components/examples/MerchantIdNotUnique400"
107
+ }
72
108
  }
73
109
  }
74
110
  }
75
111
  },
76
112
  "404": {
77
- "description": "Thrown when the gift certificate does not exist or does not match the specified merchant ID.",
113
+ "description": "Returned when the gift certificate does not exist or does not match the specified merchant ID.",
78
114
  "content": {
79
115
  "application/json": {
80
116
  "schema": {
81
117
  "$ref": "#/components/schemas/ErrorResponse"
118
+ },
119
+ "examples": {
120
+ "createGiftCertificate404": {
121
+ "$ref": "#/components/examples/GiftCertificate404"
122
+ }
82
123
  }
83
124
  }
84
125
  }
@@ -93,26 +134,36 @@
93
134
  ]
94
135
  },
95
136
  "post": {
137
+ "summary": "Search for gift certificates.",
138
+ "description": "Use the following searchable query attributes to narrow the search:\n\n| Attribute | Type | Sortable |\n|-----------|--------|----------|\n| merchantId | String | yes |\n| maskedGiftCertificateCode * | String | no |\n| orderNo | String | yes |\n| senderName | String | yes |\n| recipientName | String | yes |\n| recipientEmail | String | yes |\n| status | String | yes |\n| enabled | Boolean | yes |\n| message | String | yes |\n| description | String | yes |\n| creationDate | Date | yes |\n| currencyMnemonic ** | String | yes |\n\n## Notes:\n * *`maskedGiftCertificateCode`, also known as just code, can only be used in a term query. If a\n four-character code is supplied, it is assumed that the search is on the unmasked portion of the code. Otherwise,\n the full code must be matched. Text queries are not allowed.\n * **`currencyMnemonic` can only be joined with other attributes using a conjunction (`AND`).\n * Only searchable attributes can be used in sorting.",
96
139
  "operationId": "giftCertificatesSearch",
97
140
  "parameters": [
98
141
  {
99
142
  "name": "organizationId",
100
143
  "in": "path",
144
+ "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).",
101
145
  "required": true,
102
146
  "style": "simple",
103
147
  "explode": false,
104
148
  "schema": {
105
149
  "$ref": "#/components/schemas/OrganizationId"
106
- }
150
+ },
151
+ "example": "f_ecom_zzxy_prd"
107
152
  },
108
153
  {
109
154
  "name": "siteId",
110
155
  "in": "query",
156
+ "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.",
111
157
  "required": true,
112
158
  "style": "form",
113
159
  "explode": true,
114
160
  "schema": {
115
161
  "$ref": "#/components/schemas/SiteId"
162
+ },
163
+ "examples": {
164
+ "SiteId": {
165
+ "value": "RefArch"
166
+ }
116
167
  }
117
168
  }
118
169
  ],
@@ -132,16 +183,29 @@
132
183
  "application/json": {
133
184
  "schema": {
134
185
  "$ref": "#/components/schemas/GiftCertificateSearchResult"
186
+ },
187
+ "examples": {
188
+ "GiftCertificatesSearchSuccess": {
189
+ "$ref": "#/components/examples/GiftCertificatesSearchSuccess"
190
+ }
135
191
  }
136
192
  }
137
193
  }
138
194
  },
139
195
  "400": {
140
- "description": "Potential reasons:\n- Thrown when the given query field cannot be queried.\n- Thrown when the query is malformed.",
196
+ "description": "Potential reasons:\n- Returned when the given query field cannot be queried.\n- Returned when the query is malformed.",
141
197
  "content": {
142
198
  "application/json": {
143
199
  "schema": {
144
200
  "$ref": "#/components/schemas/ErrorResponse"
201
+ },
202
+ "examples": {
203
+ "UnqueryableField400": {
204
+ "$ref": "#/components/examples/UnqueryableField400"
205
+ },
206
+ "MalformedSearchParameter400": {
207
+ "$ref": "#/components/examples/MalformedSearchParameter400"
208
+ }
145
209
  }
146
210
  }
147
211
  }
@@ -159,21 +223,25 @@
159
223
  },
160
224
  "/organizations/{organizationId}/gift-certificates/{merchantId}": {
161
225
  "get": {
226
+ "description": "Retrieve gift certificate information for a specified merchant ID.",
162
227
  "operationId": "getGiftCertificate",
163
228
  "parameters": [
164
229
  {
165
230
  "name": "organizationId",
166
231
  "in": "path",
232
+ "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).",
167
233
  "required": true,
168
234
  "style": "simple",
169
235
  "explode": false,
170
236
  "schema": {
171
237
  "$ref": "#/components/schemas/OrganizationId"
172
- }
238
+ },
239
+ "example": "f_ecom_zzxy_prd"
173
240
  },
174
241
  {
175
242
  "name": "merchantId",
176
243
  "in": "path",
244
+ "description": "The merchant ID of the requested gift certificate.",
177
245
  "required": true,
178
246
  "style": "simple",
179
247
  "explode": false,
@@ -185,11 +253,17 @@
185
253
  {
186
254
  "name": "siteId",
187
255
  "in": "query",
256
+ "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.",
188
257
  "required": true,
189
258
  "style": "form",
190
259
  "explode": true,
191
260
  "schema": {
192
261
  "$ref": "#/components/schemas/SiteId"
262
+ },
263
+ "examples": {
264
+ "SiteId": {
265
+ "value": "RefArch"
266
+ }
193
267
  }
194
268
  }
195
269
  ],
@@ -200,16 +274,26 @@
200
274
  "application/json": {
201
275
  "schema": {
202
276
  "$ref": "#/components/schemas/GiftCertificate"
277
+ },
278
+ "examples": {
279
+ "GetGiftCertificateSuccess": {
280
+ "$ref": "#/components/examples/GetGiftCertificateSuccess"
281
+ }
203
282
  }
204
283
  }
205
284
  }
206
285
  },
207
286
  "404": {
208
- "description": "Thrown when the gift certificate does not exist or does not match the specified merchant ID.",
287
+ "description": "Returned when the gift certificate does not exist or does not match the specified merchant ID.",
209
288
  "content": {
210
289
  "application/json": {
211
290
  "schema": {
212
291
  "$ref": "#/components/schemas/ErrorResponse"
292
+ },
293
+ "examples": {
294
+ "createGiftCertificate404": {
295
+ "$ref": "#/components/examples/GiftCertificate404"
296
+ }
213
297
  }
214
298
  }
215
299
  }
@@ -225,21 +309,25 @@
225
309
  ]
226
310
  },
227
311
  "delete": {
312
+ "summary": "Delete gift certificate information for a specified merchant ID.",
228
313
  "operationId": "deleteGiftCertificate",
229
314
  "parameters": [
230
315
  {
231
316
  "name": "organizationId",
232
317
  "in": "path",
318
+ "description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
233
319
  "required": true,
234
320
  "style": "simple",
235
321
  "explode": false,
236
322
  "schema": {
237
323
  "$ref": "#/components/schemas/OrganizationId"
238
- }
324
+ },
325
+ "example": "f_ecom_zzxy_prd"
239
326
  },
240
327
  {
241
328
  "name": "merchantId",
242
329
  "in": "path",
330
+ "description": "The merchant ID of the requested gift certificate.",
243
331
  "required": true,
244
332
  "style": "simple",
245
333
  "explode": false,
@@ -251,11 +339,17 @@
251
339
  {
252
340
  "name": "siteId",
253
341
  "in": "query",
342
+ "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.",
254
343
  "required": true,
255
344
  "style": "form",
256
345
  "explode": true,
257
346
  "schema": {
258
347
  "$ref": "#/components/schemas/SiteId"
348
+ },
349
+ "examples": {
350
+ "SiteId": {
351
+ "value": "RefArch"
352
+ }
259
353
  }
260
354
  }
261
355
  ],
@@ -273,21 +367,25 @@
273
367
  ]
274
368
  },
275
369
  "patch": {
370
+ "summary": "Update gift certificate information for a specified merchant ID.",
276
371
  "operationId": "updateGiftCertificate",
277
372
  "parameters": [
278
373
  {
279
374
  "name": "organizationId",
280
375
  "in": "path",
376
+ "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).",
281
377
  "required": true,
282
378
  "style": "simple",
283
379
  "explode": false,
284
380
  "schema": {
285
381
  "$ref": "#/components/schemas/OrganizationId"
286
- }
382
+ },
383
+ "example": "f_ecom_zzxy_prd"
287
384
  },
288
385
  {
289
386
  "name": "merchantId",
290
387
  "in": "path",
388
+ "description": "The merchant ID of the requested gift certificate.",
291
389
  "required": true,
292
390
  "style": "simple",
293
391
  "explode": false,
@@ -299,11 +397,17 @@
299
397
  {
300
398
  "name": "siteId",
301
399
  "in": "query",
400
+ "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.",
302
401
  "required": true,
303
402
  "style": "form",
304
403
  "explode": true,
305
404
  "schema": {
306
405
  "$ref": "#/components/schemas/SiteId"
406
+ },
407
+ "examples": {
408
+ "SiteId": {
409
+ "value": "RefArch"
410
+ }
307
411
  }
308
412
  }
309
413
  ],
@@ -312,6 +416,11 @@
312
416
  "application/json": {
313
417
  "schema": {
314
418
  "$ref": "#/components/schemas/GiftCertificate"
419
+ },
420
+ "examples": {
421
+ "Gift-Certificates": {
422
+ "$ref": "#/components/examples/GiftCertificateUpdateExample"
423
+ }
315
424
  }
316
425
  }
317
426
  },
@@ -324,26 +433,44 @@
324
433
  "application/json": {
325
434
  "schema": {
326
435
  "$ref": "#/components/schemas/GiftCertificate"
436
+ },
437
+ "examples": {
438
+ "updateGiftCertificateSuccess": {
439
+ "$ref": "#/components/examples/UpdateGiftCertificateSuccess"
440
+ }
327
441
  }
328
442
  }
329
443
  }
330
444
  },
331
445
  "400": {
332
- "description": "Potential reasons:\n- Thrown when the recipient email address is invalid.\n- Thrown when the specified gift certificate status is invalid.",
446
+ "description": "Potential reasons:\n- Returned when the recipient email address is invalid.\n- Returned when the specified gift certificate status is invalid.",
333
447
  "content": {
334
448
  "application/json": {
335
449
  "schema": {
336
450
  "$ref": "#/components/schemas/ErrorResponse"
451
+ },
452
+ "examples": {
453
+ "InvalidRecipientEmail400": {
454
+ "$ref": "#/components/examples/InvalidRecipientEmail400"
455
+ },
456
+ "InvalidStatus400": {
457
+ "$ref": "#/components/examples/InvalidStatus400"
458
+ }
337
459
  }
338
460
  }
339
461
  }
340
462
  },
341
463
  "404": {
342
- "description": "Thrown when the gift certificate does not exist or does not match the specified merchant ID.",
464
+ "description": "Returned when the gift certificate does not exist or does not match the specified merchant ID.",
343
465
  "content": {
344
466
  "application/json": {
345
467
  "schema": {
346
468
  "$ref": "#/components/schemas/ErrorResponse"
469
+ },
470
+ "examples": {
471
+ "createGiftCertificate404": {
472
+ "$ref": "#/components/examples/GiftCertificate404"
473
+ }
347
474
  }
348
475
  }
349
476
  }
@@ -363,69 +490,66 @@
363
490
  "schemas": {
364
491
  "OrganizationId": {
365
492
  "type": "string",
366
- "maxLength": 32,
367
- "minLength": 1
493
+ "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).",
494
+ "example": "f_ecom_zzxy_prd",
495
+ "pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
368
496
  },
369
497
  "SiteId": {
370
498
  "type": "string",
499
+ "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",
500
+ "example": "RefArch",
371
501
  "maxLength": 32,
372
502
  "minLength": 1
373
503
  },
374
- "ISOCurrency": {
375
- "type": "string",
376
- "pattern": "^[A-Z][A-Z][A-Z]$"
377
- },
378
- "NoValue": {
379
- "type": "string",
380
- "default": "N/A",
381
- "enum": [
382
- "N/A"
383
- ]
384
- },
385
504
  "CurrencyCode": {
386
- "oneOf": [
387
- {
388
- "$ref": "#/components/schemas/ISOCurrency"
389
- },
390
- {
391
- "$ref": "#/components/schemas/NoValue"
392
- }
393
- ]
505
+ "type": "string",
506
+ "description": "A three letter uppercase currency code conforming to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard, or the string `N/A` indicating that a currency is not applicable.",
507
+ "example": "USD",
508
+ "pattern": "^([A-Z][A-Z][A-Z]|N/A)$"
394
509
  },
395
510
  "Money": {
396
511
  "type": "object",
512
+ "description": "A combination of a Currency and an amount of that Currency.",
397
513
  "properties": {
398
514
  "currencyMnemonic": {
399
515
  "$ref": "#/components/schemas/CurrencyCode"
400
516
  },
401
517
  "value": {
402
518
  "type": "number",
403
- "format": "double"
519
+ "format": "double",
520
+ "description": "The amount of money for the given currency.",
521
+ "example": 1234.56
404
522
  }
405
523
  }
406
524
  },
407
525
  "AccountTransaction": {
408
526
  "type": "object",
527
+ "description": "Document representing an account transaction.",
409
528
  "properties": {
410
529
  "amount": {
411
530
  "$ref": "#/components/schemas/Money"
412
531
  },
413
532
  "orderNo": {
414
- "type": "string"
533
+ "type": "string",
534
+ "description": "The order number of the gift certificate.",
535
+ "example": "my-order-43128"
415
536
  },
416
537
  "timestamp": {
417
538
  "type": "string",
418
- "format": "date-time"
539
+ "format": "date-time",
540
+ "description": "The timestamp of the transaction of the gift certificate."
419
541
  },
420
542
  "typeCode": {
421
543
  "type": "string",
544
+ "description": "The type code of the gift certificate.",
422
545
  "enum": [
423
546
  "create",
424
547
  "redeem",
425
548
  "delete",
426
549
  "enable",
427
550
  "disable"
428
- ]
551
+ ],
552
+ "example": "redeem"
429
553
  }
430
554
  },
431
555
  "required": [
@@ -437,71 +561,108 @@
437
561
  },
438
562
  "GiftCertificate": {
439
563
  "type": "object",
564
+ "description": "Document representing a gift certificate.",
440
565
  "properties": {
441
566
  "amount": {
442
567
  "allOf": [
443
568
  {
444
569
  "$ref": "#/components/schemas/Money"
445
570
  }
446
- ]
571
+ ],
572
+ "description": "The gift certificate amount.\n The user cannot change the gift certificate amount after the creation of the gift certificate."
447
573
  },
448
574
  "balance": {
449
575
  "allOf": [
450
576
  {
451
577
  "$ref": "#/components/schemas/Money"
452
578
  }
453
- ]
579
+ ],
580
+ "description": "The gift certificate balance.\n This is a computed attribute and cannot be modified."
454
581
  },
455
582
  "creationDate": {
456
583
  "type": "string",
457
- "format": "date-time"
584
+ "format": "date-time",
585
+ "description": "Returns the value of attribute 'creationDate'."
458
586
  },
459
587
  "description": {
460
588
  "type": "string",
589
+ "description": "The description of the gift certificate.",
590
+ "example": "A gift certificate for birthday.\n",
461
591
  "maxLength": 4000
462
592
  },
463
593
  "enabled": {
464
- "type": "boolean"
594
+ "type": "boolean",
595
+ "description": "The enabled flag of the gift certificate.",
596
+ "example": true
465
597
  },
466
598
  "lastModified": {
467
599
  "type": "string",
468
- "format": "date-time"
600
+ "format": "date-time",
601
+ "description": "Returns the value of attribute 'lastModified'."
469
602
  },
470
603
  "maskedGiftCertificateCode": {
471
- "type": "string"
604
+ "type": "string",
605
+ "description": "Masked code.",
606
+ "example": "*******XQTY"
472
607
  },
473
608
  "merchantId": {
474
- "type": "string"
609
+ "type": "string",
610
+ "description": "The merchant ID of the gift certificate.\n This is a unique attribute.\n This is a computed attribute and cannot be modified.\n This is used to get, update and the delete gift certificates.",
611
+ "example": "Macy's1256489\n"
475
612
  },
476
613
  "message": {
477
614
  "type": "string",
615
+ "description": "The message to the recipient of the gift certificate.",
616
+ "example": "This gift certificate is to be given as birthday present\n",
478
617
  "maxLength": 4000
479
618
  },
480
619
  "orderNo": {
481
- "type": "string"
620
+ "type": "string",
621
+ "description": "The order number of the gift certificate.",
622
+ "example": "MyOrder5421\n"
482
623
  },
483
624
  "recipientEmail": {
484
- "type": "string"
625
+ "type": "string",
626
+ "description": "The email address of the recipient of the gift certificate.",
627
+ "example": "my-recipient-email@gmail.com\n"
485
628
  },
486
629
  "recipientName": {
487
630
  "type": "string",
631
+ "description": "The recipient of the gift certificate.",
632
+ "example": "Jane Doe\n",
488
633
  "maxLength": 256
489
634
  },
490
635
  "senderName": {
491
636
  "type": "string",
637
+ "description": "The sender of the gift certificate.",
638
+ "example": "John Smith\n",
492
639
  "maxLength": 256
493
640
  },
494
641
  "status": {
495
642
  "type": "string",
643
+ "description": "The status of the gift certificate.\n While creating a gift certificate, user can set the status\n to either \"pending\" or \"issued\" only.",
496
644
  "enum": [
497
645
  "issued",
498
646
  "partially_redeemed",
499
647
  "pending",
500
648
  "redeemed"
501
- ]
649
+ ],
650
+ "example": "issued"
502
651
  },
503
652
  "transactions": {
504
653
  "type": "array",
654
+ "description": "The transactions of the gift certificate.",
655
+ "example": [
656
+ {
657
+ "amount": {
658
+ "currencyMnemonic": "USD",
659
+ "value": 1000
660
+ },
661
+ "orderNo": "my-test-order_no",
662
+ "timestamp": "2020-01-08T20:54:56.644Z",
663
+ "typeCode": "create"
664
+ }
665
+ ],
505
666
  "items": {
506
667
  "$ref": "#/components/schemas/AccountTransaction"
507
668
  }
@@ -514,17 +675,25 @@
514
675
  "properties": {
515
676
  "title": {
516
677
  "type": "string",
678
+ "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",
679
+ "example": "You do not have enough credit",
517
680
  "maxLength": 256
518
681
  },
519
682
  "type": {
520
683
  "type": "string",
684
+ "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",
685
+ "example": "NotEnoughMoney",
521
686
  "maxLength": 2048
522
687
  },
523
688
  "detail": {
524
- "type": "string"
689
+ "type": "string",
690
+ "description": "A human-readable explanation specific to this occurrence of the problem.",
691
+ "example": "Your current balance is 30, but that costs 50"
525
692
  },
526
693
  "instance": {
527
694
  "type": "string",
695
+ "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",
696
+ "example": "/account/12345/msgs/abc",
528
697
  "maxLength": 2048
529
698
  }
530
699
  },
@@ -537,6 +706,28 @@
537
706
  "Query": {
538
707
  "type": "object",
539
708
  "additionalProperties": false,
709
+ "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._",
710
+ "example": {
711
+ "filteredQuery": {
712
+ "query": {
713
+ "textQuery": {
714
+ "fields": [
715
+ "couponId"
716
+ ],
717
+ "searchPhrase": "disabled"
718
+ }
719
+ },
720
+ "filter": {
721
+ "termFilter": {
722
+ "field": "enabled",
723
+ "operator": "is",
724
+ "values": [
725
+ false
726
+ ]
727
+ }
728
+ }
729
+ }
730
+ },
540
731
  "maxProperties": 1,
541
732
  "minProperties": 1,
542
733
  "properties": {
@@ -563,21 +754,58 @@
563
754
  "BoolQuery": {
564
755
  "type": "object",
565
756
  "additionalProperties": false,
757
+ "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",
758
+ "example": {
759
+ "must": [
760
+ {
761
+ "textQuery": {
762
+ "fields": [
763
+ "couponId"
764
+ ],
765
+ "searchPhrase": "DEAL"
766
+ }
767
+ },
768
+ {
769
+ "textQuery": {
770
+ "fields": [
771
+ "description"
772
+ ],
773
+ "searchPhrase": "Big bargain deal"
774
+ }
775
+ }
776
+ ],
777
+ "mustNot": [
778
+ {
779
+ "termQuery": {
780
+ "fields": [
781
+ "enabled"
782
+ ],
783
+ "operator": "is",
784
+ "values": [
785
+ false
786
+ ]
787
+ }
788
+ }
789
+ ]
790
+ },
566
791
  "properties": {
567
792
  "must": {
568
793
  "type": "array",
794
+ "description": "List of queries to be evaluated as an `AND` operator.",
569
795
  "items": {
570
796
  "$ref": "#/components/schemas/Query"
571
797
  }
572
798
  },
573
799
  "mustNot": {
574
800
  "type": "array",
801
+ "description": "List of queries to be evaluated as a `NOT` operator.",
575
802
  "items": {
576
803
  "$ref": "#/components/schemas/Query"
577
804
  }
578
805
  },
579
806
  "should": {
580
807
  "type": "array",
808
+ "description": "List of queries to be evaluated as an `OR` operator.",
581
809
  "items": {
582
810
  "$ref": "#/components/schemas/Query"
583
811
  }
@@ -587,6 +815,7 @@
587
815
  "Filter": {
588
816
  "type": "object",
589
817
  "additionalProperties": false,
818
+ "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.",
590
819
  "maxProperties": 1,
591
820
  "minProperties": 1,
592
821
  "properties": {
@@ -610,20 +839,47 @@
610
839
  "BoolFilter": {
611
840
  "type": "object",
612
841
  "additionalProperties": false,
842
+ "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.",
843
+ "example": {
844
+ "operator": "and",
845
+ "filters": [
846
+ {
847
+ "termFilter": {
848
+ "field": "id",
849
+ "operator": "is",
850
+ "values": [
851
+ "myId"
852
+ ]
853
+ }
854
+ },
855
+ {
856
+ "termFilter": {
857
+ "field": "couponId",
858
+ "operator": "is",
859
+ "values": [
860
+ "couponOne"
861
+ ]
862
+ }
863
+ }
864
+ ]
865
+ },
613
866
  "properties": {
614
867
  "filters": {
615
868
  "type": "array",
869
+ "description": "A list of filters that are logically combined by an operator.",
616
870
  "items": {
617
871
  "$ref": "#/components/schemas/Filter"
618
872
  }
619
873
  },
620
874
  "operator": {
621
875
  "type": "string",
876
+ "description": "The logical operator that is used to combine the filters.",
622
877
  "enum": [
623
878
  "and",
624
879
  "or",
625
880
  "not"
626
- ]
881
+ ],
882
+ "example": "and"
627
883
  }
628
884
  },
629
885
  "required": [
@@ -632,6 +888,7 @@
632
888
  },
633
889
  "QueryFilter": {
634
890
  "type": "object",
891
+ "description": "Wraps any query and allows it to be used as a filter.",
635
892
  "properties": {
636
893
  "query": {
637
894
  "$ref": "#/components/schemas/Query"
@@ -643,45 +900,71 @@
643
900
  },
644
901
  "Field": {
645
902
  "type": "string",
903
+ "description": "Name of the field. Might be a custom field name prefixed with c_.",
904
+ "example": "couponId",
646
905
  "maxLength": 260
647
906
  },
648
907
  "Range2Filter": {
649
908
  "type": "object",
650
909
  "additionalProperties": false,
910
+ "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.",
911
+ "example": {
912
+ "fromField": "validFrom",
913
+ "toField": "validTo",
914
+ "filterMode": "overlap",
915
+ "fromValue": "2007-01-01T00:00:00.000Z",
916
+ "toValue": "2017-01-01T00:00:00.000Z"
917
+ },
651
918
  "properties": {
652
919
  "filterMode": {
653
920
  "type": "string",
654
921
  "default": "overlap",
922
+ "description": "Compare mode: overlap, containing, or contained.",
655
923
  "enum": [
656
924
  "overlap",
657
925
  "containing",
658
926
  "contained"
659
- ]
927
+ ],
928
+ "example": "overlap"
660
929
  },
661
930
  "fromField": {
662
931
  "allOf": [
663
932
  {
664
933
  "$ref": "#/components/schemas/Field"
665
934
  }
666
- ]
935
+ ],
936
+ "description": "The field name of the field that starts the first range.",
937
+ "example": "validFrom"
667
938
  },
668
939
  "fromInclusive": {
669
940
  "type": "boolean",
670
- "default": true
941
+ "default": true,
942
+ "description": "A flag indicating if the lower bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
943
+ "example": true
944
+ },
945
+ "fromValue": {
946
+ "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.",
947
+ "example": "2007-01-01T00:00:00.000Z"
671
948
  },
672
- "fromValue": {},
673
949
  "toField": {
674
950
  "allOf": [
675
951
  {
676
952
  "$ref": "#/components/schemas/Field"
677
953
  }
678
- ]
954
+ ],
955
+ "description": "The field name of the field that ends the first range.",
956
+ "example": "validTo"
679
957
  },
680
958
  "toInclusive": {
681
959
  "type": "boolean",
682
- "default": true
960
+ "default": true,
961
+ "description": "A flag indicating if the upper bound of the second range is inclusive. To make the lower bound exclusive, set to `false`.",
962
+ "example": true
683
963
  },
684
- "toValue": {}
964
+ "toValue": {
965
+ "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.",
966
+ "example": "2017-01-01T00:00:00.000Z"
967
+ }
685
968
  },
686
969
  "required": [
687
970
  "fromField",
@@ -690,49 +973,64 @@
690
973
  },
691
974
  "RangeFilter": {
692
975
  "type": "object",
976
+ "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.",
693
977
  "properties": {
694
978
  "field": {
695
979
  "allOf": [
696
980
  {
697
981
  "$ref": "#/components/schemas/Field"
698
982
  }
699
- ]
983
+ ],
984
+ "description": "The search field.",
985
+ "example": "validFrom"
700
986
  },
701
987
  "from": {
988
+ "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.",
702
989
  "oneOf": [
703
990
  {
704
991
  "type": "string",
705
- "format": "date-time"
992
+ "format": "date-time",
993
+ "example": "2007-01-01T00:00:00Z"
706
994
  },
707
995
  {
708
- "type": "integer"
996
+ "type": "integer",
997
+ "example": 1
709
998
  },
710
999
  {
711
- "type": "number"
1000
+ "type": "number",
1001
+ "example": 1
712
1002
  }
713
1003
  ]
714
1004
  },
715
1005
  "fromInclusive": {
716
1006
  "type": "boolean",
717
- "default": true
1007
+ "default": true,
1008
+ "description": "A flag indicating if the lower bound of the range is inclusive. To make the lower bound exclusive, set to `false`.",
1009
+ "example": true
718
1010
  },
719
1011
  "to": {
1012
+ "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.",
720
1013
  "oneOf": [
721
1014
  {
722
1015
  "type": "string",
723
- "format": "date-time"
1016
+ "format": "date-time",
1017
+ "example": "2007-01-02T00:00:00Z"
724
1018
  },
725
1019
  {
726
- "type": "integer"
1020
+ "type": "integer",
1021
+ "example": 2
727
1022
  },
728
1023
  {
729
- "type": "number"
1024
+ "type": "number",
1025
+ "example": 2
730
1026
  }
731
1027
  ]
732
1028
  },
733
1029
  "toInclusive": {
734
1030
  "type": "boolean",
735
- "default": true
1031
+ "default": true,
1032
+ "description": "A flag indicating if the upper bound of the range is inclusive. To make the upper bound exclusive, set to `false`.",
1033
+ "example": true
736
1034
  }
737
1035
  },
738
1036
  "required": [
@@ -742,16 +1040,26 @@
742
1040
  "TermFilter": {
743
1041
  "type": "object",
744
1042
  "additionalProperties": false,
1043
+ "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.",
1044
+ "example": {
1045
+ "field": "id",
1046
+ "operator": "is",
1047
+ "values": [
1048
+ "myId"
1049
+ ]
1050
+ },
745
1051
  "properties": {
746
1052
  "field": {
747
1053
  "allOf": [
748
1054
  {
749
1055
  "$ref": "#/components/schemas/Field"
750
1056
  }
751
- ]
1057
+ ],
1058
+ "description": "The filter field."
752
1059
  },
753
1060
  "operator": {
754
1061
  "type": "string",
1062
+ "description": "The operator used to compare the field's values with the given values.",
755
1063
  "enum": [
756
1064
  "is",
757
1065
  "one_of",
@@ -761,12 +1069,15 @@
761
1069
  "greater",
762
1070
  "not_in",
763
1071
  "neq"
764
- ]
1072
+ ],
1073
+ "example": "is"
765
1074
  },
766
1075
  "values": {
767
1076
  "type": "array",
1077
+ "description": "The filter values.",
768
1078
  "items": {
769
- "type": "string"
1079
+ "type": "string",
1080
+ "example": "myId"
770
1081
  }
771
1082
  }
772
1083
  },
@@ -778,6 +1089,26 @@
778
1089
  "FilteredQuery": {
779
1090
  "type": "object",
780
1091
  "additionalProperties": false,
1092
+ "description": "Allows to filter the result of a possibly complex query using a possibly complex filter.",
1093
+ "example": {
1094
+ "query": {
1095
+ "textQuery": {
1096
+ "fields": [
1097
+ "couponId"
1098
+ ],
1099
+ "searchPhrase": "disabled"
1100
+ }
1101
+ },
1102
+ "filter": {
1103
+ "termFilter": {
1104
+ "field": "enabled",
1105
+ "operator": "is",
1106
+ "values": [
1107
+ false
1108
+ ]
1109
+ }
1110
+ }
1111
+ },
781
1112
  "properties": {
782
1113
  "filter": {
783
1114
  "$ref": "#/components/schemas/Filter"
@@ -792,14 +1123,62 @@
792
1123
  ]
793
1124
  },
794
1125
  "MatchAllQuery": {
795
- "type": "object"
1126
+ "type": "object",
1127
+ "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."
796
1128
  },
797
1129
  "NestedQuery": {
798
1130
  "type": "object",
799
1131
  "additionalProperties": false,
1132
+ "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",
1133
+ "example": {
1134
+ "path": "order.shippingAddresses",
1135
+ "query": {
1136
+ "boolQuery": {
1137
+ "must": [
1138
+ {
1139
+ "boolQuery": {
1140
+ "must": [
1141
+ {
1142
+ "termQuery": {
1143
+ "fields": [
1144
+ "order.shippingAddresses.firstName"
1145
+ ],
1146
+ "operator": "is",
1147
+ "values": [
1148
+ "John"
1149
+ ]
1150
+ }
1151
+ }
1152
+ ]
1153
+ }
1154
+ },
1155
+ {
1156
+ "boolQuery": {
1157
+ "must": [
1158
+ {
1159
+ "termQuery": {
1160
+ "fields": [
1161
+ "order.shippingAddresses.lastName"
1162
+ ],
1163
+ "operator": "is",
1164
+ "values": [
1165
+ "Doe"
1166
+ ]
1167
+ }
1168
+ }
1169
+ ]
1170
+ }
1171
+ }
1172
+ ]
1173
+ }
1174
+ },
1175
+ "scoreMode": "avg"
1176
+ },
800
1177
  "properties": {
801
1178
  "path": {
802
1179
  "type": "string",
1180
+ "description": "The path to the nested document.",
1181
+ "example": "order.shippingAddresses",
803
1182
  "maxLength": 2048
804
1183
  },
805
1184
  "query": {
@@ -807,12 +1186,14 @@
807
1186
  },
808
1187
  "scoreMode": {
809
1188
  "type": "string",
1189
+ "description": "Indicates how scores for matching child objects affect the root parent document’s relevance score.",
810
1190
  "enum": [
811
1191
  "avg",
812
1192
  "total",
813
1193
  "max",
814
1194
  "none"
815
- ]
1195
+ ],
1196
+ "example": "avg"
816
1197
  }
817
1198
  },
818
1199
  "required": [
@@ -822,9 +1203,11 @@
822
1203
  },
823
1204
  "TermQuery": {
824
1205
  "type": "object",
1206
+ "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.",
825
1207
  "properties": {
826
1208
  "fields": {
827
1209
  "type": "array",
1210
+ "description": "The document fields that the values are matched against, combined with the operator.",
828
1211
  "items": {
829
1212
  "$ref": "#/components/schemas/Field"
830
1213
  },
@@ -832,6 +1215,7 @@
832
1215
  },
833
1216
  "operator": {
834
1217
  "type": "string",
1218
+ "description": "Returns the operator to use for the term query.",
835
1219
  "enum": [
836
1220
  "is",
837
1221
  "one_of",
@@ -841,23 +1225,30 @@
841
1225
  "greater",
842
1226
  "not_in",
843
1227
  "neq"
844
- ]
1228
+ ],
1229
+ "example": "is"
845
1230
  },
846
1231
  "values": {
847
1232
  "type": "array",
1233
+ "description": "The values that the fields are compared against, combined with the operator.",
848
1234
  "items": {
1235
+ "example": "myCouponId",
849
1236
  "oneOf": [
850
1237
  {
851
- "type": "string"
1238
+ "type": "string",
1239
+ "example": "myCouponId"
852
1240
  },
853
1241
  {
854
- "type": "number"
1242
+ "type": "number",
1243
+ "example": 1
855
1244
  },
856
1245
  {
857
- "type": "boolean"
1246
+ "type": "boolean",
1247
+ "example": true
858
1248
  },
859
1249
  {
860
- "type": "integer"
1250
+ "type": "integer",
1251
+ "example": 1
861
1252
  }
862
1253
  ]
863
1254
  }
@@ -871,16 +1262,26 @@
871
1262
  "TextQuery": {
872
1263
  "type": "object",
873
1264
  "additionalProperties": false,
1265
+ "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.",
1266
+ "example": {
1267
+ "fields": [
1268
+ "couponId"
1269
+ ],
1270
+ "searchPhrase": "limit"
1271
+ },
874
1272
  "properties": {
875
1273
  "fields": {
876
1274
  "type": "array",
1275
+ "description": "The document fields that the search phrase matches against.",
877
1276
  "items": {
878
1277
  "$ref": "#/components/schemas/Field"
879
1278
  },
880
1279
  "minItems": 1
881
1280
  },
882
1281
  "searchPhrase": {
883
- "type": "string"
1282
+ "type": "string",
1283
+ "description": "A search phrase, which can include multiple terms separated by spaces.",
1284
+ "example": "campaign summer"
884
1285
  }
885
1286
  },
886
1287
  "required": [
@@ -888,28 +1289,30 @@
888
1289
  "searchPhrase"
889
1290
  ]
890
1291
  },
891
- "String256": {
892
- "type": "string",
893
- "maxLength": 256
894
- },
895
1292
  "Sort": {
896
1293
  "type": "object",
897
1294
  "additionalProperties": false,
1295
+ "description": "Document representing a sort request. Each API has a different default sort configuration that can be modified in the request.",
1296
+ "example": {
1297
+ "field": "couponId",
1298
+ "sortOrder": "desc"
1299
+ },
898
1300
  "properties": {
899
1301
  "field": {
900
- "allOf": [
901
- {
902
- "$ref": "#/components/schemas/String256"
903
- }
904
- ]
1302
+ "type": "string",
1303
+ "description": "The name of the field to sort on.",
1304
+ "example": "couponId",
1305
+ "maxLength": 256
905
1306
  },
906
1307
  "sortOrder": {
907
1308
  "type": "string",
908
1309
  "default": "asc",
1310
+ "description": "The sort order to be applied when sorting. When omitted, the default sort order (asc) is used.",
909
1311
  "enum": [
910
1312
  "asc",
911
1313
  "desc"
912
- ]
1314
+ ],
1315
+ "example": "asc"
913
1316
  }
914
1317
  },
915
1318
  "required": [
@@ -920,14 +1323,19 @@
920
1323
  "type": "integer",
921
1324
  "format": "int32",
922
1325
  "default": 0,
1326
+ "description": "The zero-based index of the first hit/data to include in the result.",
1327
+ "example": 0,
923
1328
  "minimum": 0
924
1329
  },
925
1330
  "SearchRequest": {
926
1331
  "type": "object",
1332
+ "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.",
927
1333
  "properties": {
928
1334
  "limit": {
929
1335
  "type": "integer",
930
1336
  "format": "int32",
1337
+ "description": "Maximum records to retrieve per request, not to exceed 200.",
1338
+ "example": 10,
931
1339
  "maximum": 200,
932
1340
  "minimum": 1
933
1341
  },
@@ -936,6 +1344,7 @@
936
1344
  },
937
1345
  "sorts": {
938
1346
  "type": "array",
1347
+ "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.",
939
1348
  "items": {
940
1349
  "$ref": "#/components/schemas/Sort"
941
1350
  }
@@ -952,14 +1361,19 @@
952
1361
  "type": "integer",
953
1362
  "format": "int32",
954
1363
  "default": 0,
1364
+ "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.",
1365
+ "example": 10,
955
1366
  "minimum": 0
956
1367
  },
957
1368
  "ResultBase": {
958
1369
  "type": "object",
1370
+ "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.",
959
1371
  "properties": {
960
1372
  "limit": {
961
1373
  "type": "integer",
962
- "format": "int32"
1374
+ "format": "int32",
1375
+ "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.",
1376
+ "example": 10
963
1377
  },
964
1378
  "total": {
965
1379
  "$ref": "#/components/schemas/Total"
@@ -976,6 +1390,7 @@
976
1390
  "$ref": "#/components/schemas/ResultBase"
977
1391
  }
978
1392
  ],
1393
+ "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`.",
979
1394
  "properties": {
980
1395
  "offset": {
981
1396
  "$ref": "#/components/schemas/Offset"
@@ -994,18 +1409,67 @@
994
1409
  "$ref": "#/components/schemas/PaginatedResultBase"
995
1410
  }
996
1411
  ],
1412
+ "description": "Document representing a generic search result. Each search resource should extend this to define what is returned in the `hits`.",
1413
+ "example": {
1414
+ "limit": 1,
1415
+ "hits": [
1416
+ {
1417
+ "couponId": "coupon1",
1418
+ "creationDate": "2019-10-20T12:00:00Z",
1419
+ "description": "This coupon is used to give 10% off stuff.",
1420
+ "enabled": false,
1421
+ "exportedCodeCount": 0,
1422
+ "lastModified": "2019-10-30T04:23:59Z",
1423
+ "redemptionCount": 3,
1424
+ "redemptionLimits": {
1425
+ "limitPerCode": 1,
1426
+ "limitPerCustomer": 1,
1427
+ "limitPerTimeFrame": {
1428
+ "limit": 2,
1429
+ "redemptionTimeFrame": 24
1430
+ }
1431
+ },
1432
+ "singleCode": "MyCode",
1433
+ "systemCodesConfig": {
1434
+ "codePrefix": "SG",
1435
+ "numberOfCodes": 500000
1436
+ },
1437
+ "totalCodesCount": 50,
1438
+ "type": "single_code"
1439
+ }
1440
+ ],
1441
+ "query": {
1442
+ "textQuery": {
1443
+ "fields": [
1444
+ "id",
1445
+ "description"
1446
+ ],
1447
+ "searchPhrase": "stuff"
1448
+ }
1449
+ },
1450
+ "sorts": [
1451
+ {
1452
+ "field": "couponId",
1453
+ "sortOrder": "desc"
1454
+ }
1455
+ ],
1456
+ "offset": 2,
1457
+ "total": 8
1458
+ },
997
1459
  "properties": {
998
1460
  "query": {
999
1461
  "$ref": "#/components/schemas/Query"
1000
1462
  },
1001
1463
  "sorts": {
1002
1464
  "type": "array",
1465
+ "description": "The sorting that was applied to the result.",
1003
1466
  "items": {
1004
1467
  "$ref": "#/components/schemas/Sort"
1005
1468
  }
1006
1469
  },
1007
1470
  "hits": {
1008
1471
  "type": "array",
1472
+ "description": "The sorted array of search hits. Can be empty.",
1009
1473
  "items": {
1010
1474
  "type": "object"
1011
1475
  }
@@ -1021,6 +1485,7 @@
1021
1485
  "$ref": "#/components/schemas/PaginatedSearchResult"
1022
1486
  }
1023
1487
  ],
1488
+ "description": "Document representing a gift certificate search result.",
1024
1489
  "properties": {
1025
1490
  "hits": {
1026
1491
  "type": "array",
@@ -1038,26 +1503,35 @@
1038
1503
  "organizationId": {
1039
1504
  "name": "organizationId",
1040
1505
  "in": "path",
1506
+ "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).",
1041
1507
  "required": true,
1042
1508
  "style": "simple",
1043
1509
  "explode": false,
1044
1510
  "schema": {
1045
1511
  "$ref": "#/components/schemas/OrganizationId"
1046
- }
1512
+ },
1513
+ "example": "f_ecom_zzxy_prd"
1047
1514
  },
1048
1515
  "siteId": {
1049
1516
  "name": "siteId",
1050
1517
  "in": "query",
1518
+ "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.",
1051
1519
  "required": true,
1052
1520
  "style": "form",
1053
1521
  "explode": true,
1054
1522
  "schema": {
1055
1523
  "$ref": "#/components/schemas/SiteId"
1524
+ },
1525
+ "examples": {
1526
+ "SiteId": {
1527
+ "value": "RefArch"
1528
+ }
1056
1529
  }
1057
1530
  },
1058
1531
  "merchantId": {
1059
1532
  "name": "merchantId",
1060
1533
  "in": "path",
1534
+ "description": "The merchant ID of the requested gift certificate.",
1061
1535
  "required": true,
1062
1536
  "style": "simple",
1063
1537
  "explode": false,
@@ -1067,9 +1541,290 @@
1067
1541
  }
1068
1542
  }
1069
1543
  },
1544
+ "examples": {
1545
+ "GiftCertificateCreateExample": {
1546
+ "value": {
1547
+ "amount": {
1548
+ "currencyMnemonic": "USD",
1549
+ "value": 1000
1550
+ },
1551
+ "description": "Birthday gift",
1552
+ "message": "A birthday present to you",
1553
+ "senderName": "Jane Doe",
1554
+ "recipientName": "John Doe",
1555
+ "recipientEmail": "john.doe@gmail.com",
1556
+ "status": "issued",
1557
+ "orderNo": "CA17293",
1558
+ "enabled": false
1559
+ }
1560
+ },
1561
+ "CreateGiftCertificateSuccess": {
1562
+ "value": {
1563
+ "amount": {
1564
+ "currencyMnemonic": "USD",
1565
+ "value": 100
1566
+ },
1567
+ "balance": {
1568
+ "currencyMnemonic": "USD",
1569
+ "value": 100
1570
+ },
1571
+ "creationDate": "2015-07-31T14:36:17.544Z",
1572
+ "description": "Birthday gift",
1573
+ "enabled": false,
1574
+ "maskedGiftCertificateCode": "************KTIP",
1575
+ "merchantId": "NorthernTrailOutfitters",
1576
+ "message": "A birthday gift for you",
1577
+ "orderNo": "CA17293",
1578
+ "recipientName": "John Doe",
1579
+ "recipientEmail": "john.doe@gmail.com",
1580
+ "senderName": "Jane Doe",
1581
+ "status": "issued",
1582
+ "transactions": [
1583
+ {
1584
+ "amount": {
1585
+ "currencyMnemonic": "EUR",
1586
+ "value": 80
1587
+ },
1588
+ "orderNo": "my-order_no",
1589
+ "timestamp": "2015-09-09T17:16:12.066Z",
1590
+ "typeCode": "create"
1591
+ }
1592
+ ]
1593
+ }
1594
+ },
1595
+ "InvalidRecipientEmail400": {
1596
+ "value": {
1597
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-recipient-email",
1598
+ "title": "Invalid Recipient Email Exception",
1599
+ "detail": "Invalid recipient email ID provided."
1600
+ }
1601
+ },
1602
+ "InvalidStatus400": {
1603
+ "value": {
1604
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid-status",
1605
+ "title": "Invalid Gift Certificate Status Exception",
1606
+ "detail": "Invalid gift certificate status provided."
1607
+ }
1608
+ },
1609
+ "Invalid400": {
1610
+ "value": {
1611
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/invalid",
1612
+ "title": "Invalid Gift Certificate Exception",
1613
+ "detail": "Invalid gift certificate provided."
1614
+ }
1615
+ },
1616
+ "MerchantIdNotUnique400": {
1617
+ "value": {
1618
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/merchant-id-not-unique",
1619
+ "title": "Gift Certificate Create Merchant Id Not Unique Exception",
1620
+ "detail": "Merchant id is not unique."
1621
+ }
1622
+ },
1623
+ "GiftCertificate404": {
1624
+ "value": {
1625
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found",
1626
+ "title": "Gift Certificate Not Found Exception",
1627
+ "detail": "No gift certificate with merchant ID 'my-merchant_id' for site 'TestWapi' was found."
1628
+ }
1629
+ },
1630
+ "GiftCertificatesSearchSuccess": {
1631
+ "value": {
1632
+ "limit": 3,
1633
+ "hits": [
1634
+ {
1635
+ "amount": {
1636
+ "currencyMnemonic": "USD",
1637
+ "value": 100
1638
+ },
1639
+ "balance": {
1640
+ "currencyMnemonic": "USD",
1641
+ "value": 100
1642
+ },
1643
+ "creationDate": "2015-07-31T15:10:25.192Z",
1644
+ "description": "Birthday Gift",
1645
+ "enabled": true,
1646
+ "maskedGiftCertificateCode": "************HHHZ",
1647
+ "merchantId": "NorthernTrailOutfitters",
1648
+ "orderNo": "CA17293",
1649
+ "status": "pending",
1650
+ "transactions": [
1651
+ {
1652
+ "amount": {
1653
+ "currencyMnemonic": "EUR",
1654
+ "value": 80
1655
+ },
1656
+ "orderNo": "CA17293",
1657
+ "timestamp": "2015-01-09T17:16:12.066Z",
1658
+ "typeCode": "create"
1659
+ }
1660
+ ]
1661
+ },
1662
+ {
1663
+ "amount": {
1664
+ "currencyMnemonic": "USD",
1665
+ "value": 100
1666
+ },
1667
+ "balance": {
1668
+ "currencyMnemonic": "USD",
1669
+ "value": 100
1670
+ },
1671
+ "creationDate": "2015-07-31T15:03:21.988Z",
1672
+ "enabled": true,
1673
+ "maskedGiftCertificateCode": "************DOIZ",
1674
+ "merchantId": "my-merchant_id",
1675
+ "orderNo": "00000002",
1676
+ "status": "pending",
1677
+ "transactions": [
1678
+ {
1679
+ "amount": {
1680
+ "currencyMnemonic": "EUR",
1681
+ "value": 80
1682
+ },
1683
+ "orderNo": "00000002",
1684
+ "timestamp": "2015-02-09T17:16:12.066Z",
1685
+ "typeCode": "create"
1686
+ }
1687
+ ]
1688
+ },
1689
+ {
1690
+ "amount": {
1691
+ "currencyMnemonic": "USD",
1692
+ "value": 100
1693
+ },
1694
+ "balance": {
1695
+ "currencyMnemonic": "USD",
1696
+ "value": 100
1697
+ },
1698
+ "creationDate": "2015-07-31T15:10:00.659Z",
1699
+ "description": "Promotion Gift",
1700
+ "enabled": true,
1701
+ "maskedGiftCertificateCode": "************GSPZ",
1702
+ "merchantId": "NorthernTrailOutfitters",
1703
+ "orderNo": "00000003",
1704
+ "status": "pending",
1705
+ "transactions": [
1706
+ {
1707
+ "amount": {
1708
+ "currencyMnemonic": "EUR",
1709
+ "value": 80
1710
+ },
1711
+ "orderNo": "00000003",
1712
+ "timestamp": "2015-09-09T17:16:12.066Z",
1713
+ "typeCode": "create"
1714
+ }
1715
+ ]
1716
+ }
1717
+ ],
1718
+ "query": {
1719
+ "textQuery": {
1720
+ "fields": [
1721
+ "status"
1722
+ ],
1723
+ "searchPhrase": "pending"
1724
+ }
1725
+ },
1726
+ "offset": 0,
1727
+ "total": 3
1728
+ }
1729
+ },
1730
+ "UnqueryableField400": {
1731
+ "value": {
1732
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/unqueryable-field",
1733
+ "title": "Unqueryable Field Exception",
1734
+ "detail": "Given field cannot be queried. For example - The field 'link' is unqueryable."
1735
+ }
1736
+ },
1737
+ "MalformedSearchParameter400": {
1738
+ "value": {
1739
+ "type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/malformed-search-parameter",
1740
+ "title": "Malformed Search Parameter Exception",
1741
+ "detail": "An error occurred while decoding the request, the body was 'malformed'."
1742
+ }
1743
+ },
1744
+ "GetGiftCertificateSuccess": {
1745
+ "value": {
1746
+ "amount": {
1747
+ "currencyMnemonic": "USD",
1748
+ "value": 100
1749
+ },
1750
+ "balance": {
1751
+ "currencyMnemonic": "USD",
1752
+ "value": 100
1753
+ },
1754
+ "creationDate": "2015-07-31T14:56:38.936Z",
1755
+ "description": "Birthday Gift",
1756
+ "enabled": true,
1757
+ "maskedGiftCertificateCode": "************LKWJ",
1758
+ "merchantId": "NorthernTrailOutfitters",
1759
+ "message": "A birthday gift for you",
1760
+ "orderNo": "CA17293",
1761
+ "recipientName": "John Doe",
1762
+ "recipientEmail": "john.doe@gmail.com",
1763
+ "senderName": "Jane Doe",
1764
+ "status": "issued",
1765
+ "transactions": [
1766
+ {
1767
+ "amount": {
1768
+ "currencyMnemonic": "EUR",
1769
+ "value": 80
1770
+ },
1771
+ "orderNo": "CA17293",
1772
+ "timestamp": "2015-09-09T17:16:12.066Z",
1773
+ "typeCode": "create"
1774
+ }
1775
+ ]
1776
+ }
1777
+ },
1778
+ "GiftCertificateUpdateExample": {
1779
+ "value": {
1780
+ "description": "Birthday Gift",
1781
+ "enabled": false,
1782
+ "message": "A birthday gift for you",
1783
+ "recipientEmail": "john.doe@gmail.com",
1784
+ "recipientName": "John Doe",
1785
+ "senderName": "Jane Doe",
1786
+ "status": "pending"
1787
+ }
1788
+ },
1789
+ "UpdateGiftCertificateSuccess": {
1790
+ "value": {
1791
+ "amount": {
1792
+ "currencyMnemonic": "USD",
1793
+ "value": 100
1794
+ },
1795
+ "balance": {
1796
+ "currencyMnemonic": "USD",
1797
+ "value": 100
1798
+ },
1799
+ "creationDate": "2015-07-31T15:05:52.311Z",
1800
+ "description": "Birthday Gift",
1801
+ "enabled": false,
1802
+ "maskedGiftCertificateCode": "***********cate",
1803
+ "merchantId": "NorthernTrailOutfitters",
1804
+ "message": "A birthday gift for you",
1805
+ "orderNo": "CA17293",
1806
+ "recipientEmail": "john.doe@gmail.com",
1807
+ "recipientName": "John Doe",
1808
+ "senderName": "Jane Doe",
1809
+ "status": "pending",
1810
+ "transactions": [
1811
+ {
1812
+ "amount": {
1813
+ "currencyMnemonic": "EUR",
1814
+ "value": 80
1815
+ },
1816
+ "orderNo": "CA17293",
1817
+ "timestamp": "2015-09-09T17:16:12.066Z",
1818
+ "typeCode": "create"
1819
+ }
1820
+ ]
1821
+ }
1822
+ }
1823
+ },
1070
1824
  "securitySchemes": {
1071
1825
  "AmOAuth2": {
1072
1826
  "type": "oauth2",
1827
+ "description": "AccountManager OAuth 2.0 bearer token Authentication.",
1073
1828
  "flows": {
1074
1829
  "clientCredentials": {
1075
1830
  "tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
@@ -1081,10 +1836,8 @@
1081
1836
  "authorizationCode": {
1082
1837
  "authorizationUrl": "https://account.demandware.com/dwsso/oauth2/authorize",
1083
1838
  "tokenUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
1084
- "scopes": {
1085
- "sfcc.gift-certificates": "gift certificate READONLY",
1086
- "sfcc.gift-certificates.rw": "gift certificate read/write"
1087
- }
1839
+ "refreshUrl": "https://account.demandware.com/dwsso/oauth2/access_token",
1840
+ "scopes": {}
1088
1841
  }
1089
1842
  }
1090
1843
  }