@salesforce/b2c-tooling-sdk 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/schemas/dw.schema.json +14 -0
- package/data/tooling/index.json +5 -5
- package/dist/esm/cli/base-command.js +4 -3
- package/dist/esm/cli/base-command.js.map +1 -1
- package/dist/esm/cli/cartridge-command.js +2 -1
- package/dist/esm/cli/cartridge-command.js.map +1 -1
- package/dist/esm/cli/config.js +3 -1
- package/dist/esm/cli/config.js.map +1 -1
- package/dist/esm/cli/hooks.d.ts +13 -0
- package/dist/esm/cli/hooks.js +11 -0
- package/dist/esm/cli/hooks.js.map +1 -1
- package/dist/esm/cli/instance-command.js +2 -1
- package/dist/esm/cli/instance-command.js.map +1 -1
- package/dist/esm/clients/scapi-backend-utils.d.ts +15 -0
- package/dist/esm/clients/scapi-backend-utils.js +28 -1
- package/dist/esm/clients/scapi-backend-utils.js.map +1 -1
- package/dist/esm/clients/scapi-fallback-backend.js +2 -2
- package/dist/esm/clients/scapi-fallback-backend.js.map +1 -1
- package/dist/esm/clients/scapi-schemas.generated.d.ts +2 -2
- package/dist/esm/compat/dispatcher.js +2 -2
- package/dist/esm/compat/dispatcher.js.map +1 -1
- package/dist/esm/config/config-origins.d.ts +19 -0
- package/dist/esm/config/config-origins.js +11 -0
- package/dist/esm/config/config-origins.js.map +1 -0
- package/dist/esm/config/config-write.d.ts +86 -0
- package/dist/esm/config/config-write.js +296 -0
- package/dist/esm/config/config-write.js.map +1 -0
- package/dist/esm/config/dw-json-schema.js +4 -0
- package/dist/esm/config/dw-json-schema.js.map +1 -1
- package/dist/esm/config/dw-json.d.ts +2 -0
- package/dist/esm/config/dw-json.js +10 -6
- package/dist/esm/config/dw-json.js.map +1 -1
- package/dist/esm/config/index.d.ts +8 -3
- package/dist/esm/config/index.js +5 -2
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/config/instance-manager.d.ts +64 -28
- package/dist/esm/config/instance-manager.js +145 -63
- package/dist/esm/config/instance-manager.js.map +1 -1
- package/dist/esm/config/mapping.js +6 -0
- package/dist/esm/config/mapping.js.map +1 -1
- package/dist/esm/config/resolver.d.ts +22 -0
- package/dist/esm/config/resolver.js +54 -29
- package/dist/esm/config/resolver.js.map +1 -1
- package/dist/esm/config/sources/dw-json-source.d.ts +9 -1
- package/dist/esm/config/sources/dw-json-source.js +34 -20
- package/dist/esm/config/sources/dw-json-source.js.map +1 -1
- package/dist/esm/config/sources/env-source.d.ts +30 -3
- package/dist/esm/config/sources/env-source.js +126 -1
- package/dist/esm/config/sources/env-source.js.map +1 -1
- package/dist/esm/config/types.d.ts +46 -0
- package/dist/esm/operations/jobs/run-system-job.js +2 -2
- package/dist/esm/operations/jobs/run-system-job.js.map +1 -1
- package/dist/esm/plugins/discovery.js +2 -1
- package/dist/esm/plugins/discovery.js.map +1 -1
- package/dist/esm/scapi/index.d.ts +5 -2
- package/dist/esm/scapi/index.js +3 -2
- package/dist/esm/scapi/index.js.map +1 -1
- package/dist/esm/scapi/live.d.ts +12 -1
- package/dist/esm/scapi/live.js +30 -2
- package/dist/esm/scapi/live.js.map +1 -1
- package/dist/esm/scapi/local.d.ts +17 -0
- package/dist/esm/scapi/local.js +68 -16
- package/dist/esm/scapi/local.js.map +1 -1
- package/dist/esm/scapi/request.d.ts +2 -2
- package/dist/esm/scapi/request.js +2 -1
- package/dist/esm/scapi/request.js.map +1 -1
- package/dist/esm/scapi/runtime.d.ts +5 -0
- package/dist/esm/scapi/runtime.js.map +1 -1
- package/dist/esm/scapi/schema-source.d.ts +90 -0
- package/dist/esm/scapi/schema-source.js +146 -0
- package/dist/esm/scapi/schema-source.js.map +1 -0
- package/dist/esm/scapi/worker-source.js +30 -6
- package/dist/esm/scapi/worker-source.js.map +1 -1
- package/dist/esm/test-utils/config-isolation.js +9 -2
- package/dist/esm/test-utils/config-isolation.js.map +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/manifest.json +83 -42
- package/node_modules/@salesforce/b2c-api-schemas/package.json +1 -1
- package/node_modules/@salesforce/b2c-api-schemas/scapi/cdn/zones/v1.json +6798 -238
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/orders/v1.json +2296 -205
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v1.json +5571 -666
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-baskets/v2.json +6062 -371
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-orders/v1.json +3426 -360
- package/node_modules/@salesforce/b2c-api-schemas/scapi/checkout/shopper-payments/v1.json +351 -99
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/cors/v1.json +172 -12
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/preferences/v1.json +1497 -111
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/shopper-configurations/v1.json +202 -36
- package/node_modules/@salesforce/b2c-api-schemas/scapi/configuration/timeouts/v1.json +79 -10
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/custom-objects/v1.json +785 -49
- package/node_modules/@salesforce/b2c-api-schemas/scapi/custom-object/shopper-custom-objects/v1.json +191 -40
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/customers/v1.json +1483 -107
- package/node_modules/@salesforce/b2c-api-schemas/scapi/customer/shopper-customers/v1.json +4854 -787
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/custom-apis/v1.json +119 -15
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/object-definitions/v1.json +1699 -80
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scapi-schemas/v1.json +252 -18
- package/node_modules/@salesforce/b2c-api-schemas/scapi/dx/scripts/v1.json +329 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/experiences/v1.json +4208 -234
- package/node_modules/@salesforce/b2c-api-schemas/scapi/experience/shopper-experience/v1.json +1591 -247
- package/node_modules/@salesforce/b2c-api-schemas/scapi/intelligence/analytics/v1.json +396 -8
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/availability/v1.json +1242 -69
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/impex/v1.json +2354 -248
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/reservation/v1.json +1550 -45
- package/node_modules/@salesforce/b2c-api-schemas/scapi/inventory/segmentation/v1.json +6615 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/roles/v1.json +1520 -59
- package/node_modules/@salesforce/b2c-api-schemas/scapi/merchant/users/v1.json +397 -17
- package/node_modules/@salesforce/b2c-api-schemas/scapi/observability/metrics/v1.json +1241 -27
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/jobs/v1.json +1069 -68
- package/node_modules/@salesforce/b2c-api-schemas/scapi/operation/replications/v1.json +410 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/assignments/v1.json +502 -102
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/campaigns/v1.json +1112 -94
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/coupons/v1.json +820 -93
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/gift-certificates/v1.json +845 -92
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/promotions/v1.json +2716 -674
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json +130 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-promotions/v1.json +233 -63
- package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/source-code-groups/v1.json +630 -70
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/catalogs/v1.json +2886 -348
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/inventory-lists/v1.json +520 -19
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/price-books/v1.json +3115 -293
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/products/v1.json +3313 -138
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-availability/v1.json +266 -52
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-delivery-estimates/v1.json +256 -48
- package/node_modules/@salesforce/b2c-api-schemas/scapi/product/shopper-products/v1.json +1744 -306
- package/node_modules/@salesforce/b2c-api-schemas/scapi/search/shopper-search/v1.json +1661 -120
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth/v1.json +2174 -118
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/auth-admin/v1.json +1373 -24
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/consents/v1.json +531 -20
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-agents/v1.json +154 -6
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-consents/v1.json +596 -79
- package/node_modules/@salesforce/b2c-api-schemas/scapi/shopper/shopper-context/v1.json +456 -42
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/seo/v1.json +101 -23
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/shopper-seo/v1.json +184 -41
- package/node_modules/@salesforce/b2c-api-schemas/scapi/site/sites/v1.json +995 -47
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/shopper-stores/v1.json +370 -67
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/store-redirect-mappings/v1.json +319 -11
- package/node_modules/@salesforce/b2c-api-schemas/scapi/store/stores/v1.json +1109 -64
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/deployments/v1.json +1442 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/environments/v1.json +4293 -0
- package/node_modules/@salesforce/b2c-api-schemas/scapi/storefront/storefronts/v1.json +1371 -0
- package/package.json +2 -2
- package/specs/scapi-schemas-v1.yaml +4 -1
package/node_modules/@salesforce/b2c-api-schemas/scapi/pricing/shopper-gift-certificates/v1.json
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
"openapi": "3.0.3",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Shopper Gift Certificates",
|
|
5
|
-
"
|
|
5
|
+
"description": "[Download API specification](https://developer.salesforce.com/static/commercecloud/commerce-api/shopper-gift-certificates/shopper-gift-certificates-oas-v1-public.yaml)\n\n# API Overview\n\nUse the Shopper Gift Certificates API to obtain gift certificate details.\n\n## Authentication & Authorization\n\nThe Shopper Gift Certificates API requires a JSON Web Token acquired via the Shopper Customers endpoint:\n\n```\nhttps://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/v1/organizations/{organizationId}/customers/actions/login\n```\n\nYou must include the relevant scope(s) in the client ID used to generate the SLAS token. For details, see [Authorization Scopes Catalog.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html)\n\n## Customization\n\n### Custom Properties\n\nThis API supports custom properties (prefixed with `c_`). For details, see [Custom Properties.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/custom-properties.html)\n\n### Hooks\n\nFor details on working with hooks, see [Extensibility with Hooks.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/extensibility_via_hooks.html)\n\n## Request Details\n\n### URL Encoding\n\nIf resource identifiers in request parameters contain commas (`,`) or percent signs (`%`), they must be URL encoded. For details, see [Encode URL Special Characters.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/url-encode.html)\n\n## Response Details\n\n### Personalization\n\nResponses from this API are not personalized via the Shopper Context API.\n\n### Caching\n\nResponses from this API are not cached.\n\n### Timeouts\n\nShopper API requests must respond within 10 seconds, including any hook execution. If a response exceeds this threshold, an HTTP 504 status code is returned. For details, see [Timeouts and Limits.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/timeouts-limits.html)\n\n### Error Handling\n\nError responses follow the [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807) problem detail format. To trace errors, include a `correlation-id` header in your request — the response returns it as `x-correlation-id`. For details, see [HTTP Status Codes and Errors.](https://developer.salesforce.com/docs/commerce/commerce-api/guide/error-response-codes.html)\n\n## Use Cases\n\n### Retrieve a Gift Certificate\n\nLook up a gift certificate by its code. The code is sent in the request body (not the URL) for security.\n\n```sh\ncurl \"https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/v1/organizations/{organizationId}/gift-certificate?siteId=RefArch\" \\\n -X POST \\\n -H \"Authorization: Bearer {access_token}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{ \"giftCertificateCode\": \"GIFT-1234-ABCD\" }'\n```\n\n\n### Retrieve Existing Gift Certificate Details\n\nA shopper who received a code identifying a gift certificate can use the gift certificate code to query information, such as the status or remaining balance.\n\n## Related APIs\n\n- [Gift Certificates (Admin)](https://developer.salesforce.com/docs/commerce/commerce-api/references/gift-certificates?meta=Summary) — Create and manage gift certificates.",
|
|
6
|
+
"version": "1.3.2",
|
|
6
7
|
"x-api-type": "Shopper",
|
|
7
8
|
"x-api-family": "Pricing"
|
|
8
9
|
},
|
|
@@ -11,6 +12,7 @@
|
|
|
11
12
|
"url": "https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-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,56 +21,54 @@
|
|
|
19
21
|
"paths": {
|
|
20
22
|
"/organizations/{organizationId}/gift-certificate": {
|
|
21
23
|
"post": {
|
|
24
|
+
"summary": "Retrieve an existing gift certificate.",
|
|
22
25
|
"operationId": "getGiftCertificate",
|
|
23
26
|
"parameters": [
|
|
24
27
|
{
|
|
25
28
|
"name": "organizationId",
|
|
26
29
|
"in": "path",
|
|
30
|
+
"description": "An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).",
|
|
27
31
|
"required": true,
|
|
28
32
|
"style": "simple",
|
|
29
33
|
"explode": false,
|
|
30
34
|
"schema": {
|
|
31
35
|
"$ref": "#/components/schemas/OrganizationId"
|
|
32
|
-
}
|
|
36
|
+
},
|
|
37
|
+
"example": "f_ecom_zzxy_prd"
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
40
|
"name": "siteId",
|
|
36
41
|
"in": "query",
|
|
42
|
+
"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
43
|
"required": true,
|
|
38
44
|
"style": "form",
|
|
39
45
|
"explode": true,
|
|
40
46
|
"schema": {
|
|
41
47
|
"$ref": "#/components/schemas/SiteId"
|
|
48
|
+
},
|
|
49
|
+
"examples": {
|
|
50
|
+
"SiteId": {
|
|
51
|
+
"value": "RefArch"
|
|
52
|
+
}
|
|
42
53
|
}
|
|
43
54
|
},
|
|
44
55
|
{
|
|
45
56
|
"name": "sfdc_usid",
|
|
46
57
|
"in": "header",
|
|
58
|
+
"description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
|
|
47
59
|
"required": false,
|
|
48
60
|
"style": "simple",
|
|
49
61
|
"explode": false,
|
|
50
62
|
"schema": {
|
|
51
63
|
"type": "string",
|
|
52
|
-
"format": "uuid"
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "sfdc_dw_dnt",
|
|
57
|
-
"in": "header",
|
|
58
|
-
"required": false,
|
|
59
|
-
"style": "simple",
|
|
60
|
-
"explode": false,
|
|
61
|
-
"schema": {
|
|
62
|
-
"type": "string",
|
|
63
|
-
"enum": [
|
|
64
|
-
"0",
|
|
65
|
-
"1"
|
|
66
|
-
]
|
|
64
|
+
"format": "uuid",
|
|
65
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
67
66
|
}
|
|
68
67
|
},
|
|
69
68
|
{
|
|
70
69
|
"name": "sfdc_shopper_context",
|
|
71
70
|
"in": "header",
|
|
71
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
72
72
|
"required": false,
|
|
73
73
|
"style": "simple",
|
|
74
74
|
"explode": false,
|
|
@@ -82,6 +82,11 @@
|
|
|
82
82
|
"application/json": {
|
|
83
83
|
"schema": {
|
|
84
84
|
"$ref": "#/components/schemas/GiftCertificateRequest"
|
|
85
|
+
},
|
|
86
|
+
"examples": {
|
|
87
|
+
"Gift-Certificates": {
|
|
88
|
+
"$ref": "#/components/examples/GetGiftCertificate"
|
|
89
|
+
}
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
}
|
|
@@ -93,6 +98,11 @@
|
|
|
93
98
|
"application/json": {
|
|
94
99
|
"schema": {
|
|
95
100
|
"$ref": "#/components/schemas/GiftCertificate"
|
|
101
|
+
},
|
|
102
|
+
"examples": {
|
|
103
|
+
"CreateGiftCertificate": {
|
|
104
|
+
"$ref": "#/components/examples/CreateGiftCertificate"
|
|
105
|
+
}
|
|
96
106
|
}
|
|
97
107
|
}
|
|
98
108
|
}
|
|
@@ -103,6 +113,11 @@
|
|
|
103
113
|
"application/problem+json": {
|
|
104
114
|
"schema": {
|
|
105
115
|
"$ref": "#/components/schemas/ErrorResponse"
|
|
116
|
+
},
|
|
117
|
+
"examples": {
|
|
118
|
+
"GiftCertificate404": {
|
|
119
|
+
"$ref": "#/components/examples/GiftCertificate404"
|
|
120
|
+
}
|
|
106
121
|
}
|
|
107
122
|
}
|
|
108
123
|
}
|
|
@@ -129,19 +144,26 @@
|
|
|
129
144
|
"schemas": {
|
|
130
145
|
"OrganizationId": {
|
|
131
146
|
"type": "string",
|
|
147
|
+
"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).",
|
|
148
|
+
"example": "f_ecom_zzxy_prd",
|
|
132
149
|
"pattern": "^f_ecom_[a-z]{4}_(prd|stg|dev|s[0-9]{2}|[0-9]{3})$"
|
|
133
150
|
},
|
|
134
151
|
"SiteId": {
|
|
135
152
|
"type": "string",
|
|
153
|
+
"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",
|
|
154
|
+
"example": "RefArch",
|
|
136
155
|
"maxLength": 32,
|
|
137
156
|
"minLength": 1
|
|
138
157
|
},
|
|
139
158
|
"GiftCertificateRequest": {
|
|
140
159
|
"type": "object",
|
|
141
160
|
"additionalProperties": false,
|
|
161
|
+
"description": "Document representing a gift certificate request data.",
|
|
142
162
|
"properties": {
|
|
143
163
|
"giftCertificateCode": {
|
|
144
|
-
"type": "string"
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "The gift certificate code.",
|
|
166
|
+
"example": "MYGIFTCERTIFICATECODE"
|
|
145
167
|
}
|
|
146
168
|
},
|
|
147
169
|
"required": [
|
|
@@ -150,48 +172,73 @@
|
|
|
150
172
|
},
|
|
151
173
|
"GiftCertificate": {
|
|
152
174
|
"type": "object",
|
|
153
|
-
"additionalProperties": {
|
|
175
|
+
"additionalProperties": {
|
|
176
|
+
"description": "This type supports additional properties passed along with the defined properties of this API.\nTo indicate that the properties were defined and expected to be handled as additional properties, they are expected to be prefixed with a `c_`.\nThe type will reject any property that does not fit this pattern, only allowing additional properties beginning with the known prefix.",
|
|
177
|
+
"example": "c_trackingId",
|
|
178
|
+
"title": "Additional Property Support"
|
|
179
|
+
},
|
|
180
|
+
"description": "Document representing a gift certificate.",
|
|
154
181
|
"properties": {
|
|
155
182
|
"amount": {
|
|
156
183
|
"type": "number",
|
|
157
|
-
"format": "double"
|
|
184
|
+
"format": "double",
|
|
185
|
+
"description": "The gift certificate original amount.",
|
|
186
|
+
"example": 100
|
|
158
187
|
},
|
|
159
188
|
"balance": {
|
|
160
189
|
"type": "number",
|
|
161
|
-
"format": "double"
|
|
190
|
+
"format": "double",
|
|
191
|
+
"description": "The gift certificate remaining balance.",
|
|
192
|
+
"example": 100
|
|
162
193
|
},
|
|
163
194
|
"description": {
|
|
164
|
-
"type": "string"
|
|
195
|
+
"type": "string",
|
|
196
|
+
"description": "The gift certificate description."
|
|
165
197
|
},
|
|
166
198
|
"enabled": {
|
|
167
|
-
"type": "boolean"
|
|
199
|
+
"type": "boolean",
|
|
200
|
+
"description": "Is the gift certificate is enabled?",
|
|
201
|
+
"example": true
|
|
168
202
|
},
|
|
169
203
|
"maskedGiftCertificateCode": {
|
|
170
|
-
"type": "string"
|
|
204
|
+
"type": "string",
|
|
205
|
+
"description": "The masked gift certificate code.",
|
|
206
|
+
"example": "************FJWQ"
|
|
171
207
|
},
|
|
172
208
|
"merchantId": {
|
|
173
|
-
"type": "string"
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "The merchant ID.",
|
|
211
|
+
"example": "00000001"
|
|
174
212
|
},
|
|
175
213
|
"message": {
|
|
176
|
-
"type": "string"
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "The message."
|
|
177
216
|
},
|
|
178
217
|
"recipientEmail": {
|
|
179
|
-
"type": "string"
|
|
218
|
+
"type": "string",
|
|
219
|
+
"description": "The recipient email.",
|
|
220
|
+
"example": "p@gmail.com"
|
|
180
221
|
},
|
|
181
222
|
"recipientName": {
|
|
182
|
-
"type": "string"
|
|
223
|
+
"type": "string",
|
|
224
|
+
"description": "The recipient name.",
|
|
225
|
+
"example": "sampleuser"
|
|
183
226
|
},
|
|
184
227
|
"senderName": {
|
|
185
|
-
"type": "string"
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "The sender name.",
|
|
230
|
+
"example": "Salesforce Support"
|
|
186
231
|
},
|
|
187
232
|
"status": {
|
|
188
233
|
"type": "string",
|
|
234
|
+
"description": "The gift certificate status.",
|
|
189
235
|
"enum": [
|
|
190
236
|
"pending",
|
|
191
237
|
"issued",
|
|
192
238
|
"partially_redeemed",
|
|
193
239
|
"redeemed"
|
|
194
|
-
]
|
|
240
|
+
],
|
|
241
|
+
"example": "issued"
|
|
195
242
|
}
|
|
196
243
|
},
|
|
197
244
|
"required": [
|
|
@@ -212,17 +259,25 @@
|
|
|
212
259
|
"properties": {
|
|
213
260
|
"title": {
|
|
214
261
|
"type": "string",
|
|
262
|
+
"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",
|
|
263
|
+
"example": "You do not have enough credit",
|
|
215
264
|
"maxLength": 256
|
|
216
265
|
},
|
|
217
266
|
"type": {
|
|
218
267
|
"type": "string",
|
|
268
|
+
"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",
|
|
269
|
+
"example": "NotEnoughMoney",
|
|
219
270
|
"maxLength": 2048
|
|
220
271
|
},
|
|
221
272
|
"detail": {
|
|
222
|
-
"type": "string"
|
|
273
|
+
"type": "string",
|
|
274
|
+
"description": "A human-readable explanation specific to this occurrence of the problem.",
|
|
275
|
+
"example": "Your current balance is 30, but that costs 50"
|
|
223
276
|
},
|
|
224
277
|
"instance": {
|
|
225
278
|
"type": "string",
|
|
279
|
+
"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",
|
|
280
|
+
"example": "/account/12345/msgs/abc",
|
|
226
281
|
"maxLength": 2048
|
|
227
282
|
}
|
|
228
283
|
},
|
|
@@ -237,51 +292,48 @@
|
|
|
237
292
|
"organizationId": {
|
|
238
293
|
"name": "organizationId",
|
|
239
294
|
"in": "path",
|
|
295
|
+
"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).",
|
|
240
296
|
"required": true,
|
|
241
297
|
"style": "simple",
|
|
242
298
|
"explode": false,
|
|
243
299
|
"schema": {
|
|
244
300
|
"$ref": "#/components/schemas/OrganizationId"
|
|
245
|
-
}
|
|
301
|
+
},
|
|
302
|
+
"example": "f_ecom_zzxy_prd"
|
|
246
303
|
},
|
|
247
304
|
"siteId": {
|
|
248
305
|
"name": "siteId",
|
|
249
306
|
"in": "query",
|
|
307
|
+
"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.",
|
|
250
308
|
"required": true,
|
|
251
309
|
"style": "form",
|
|
252
310
|
"explode": true,
|
|
253
311
|
"schema": {
|
|
254
312
|
"$ref": "#/components/schemas/SiteId"
|
|
313
|
+
},
|
|
314
|
+
"examples": {
|
|
315
|
+
"SiteId": {
|
|
316
|
+
"value": "RefArch"
|
|
317
|
+
}
|
|
255
318
|
}
|
|
256
319
|
},
|
|
257
320
|
"sfdcUsid": {
|
|
258
321
|
"name": "sfdc_usid",
|
|
259
322
|
"in": "header",
|
|
323
|
+
"description": "A unique shopper identifier (USID) for tracking client context.\nUsed with endpoints secured with ShopperClientContextToken.\nThis header is required for all endpoints secured with ShopperClientContextToken.",
|
|
260
324
|
"required": false,
|
|
261
325
|
"style": "simple",
|
|
262
326
|
"explode": false,
|
|
263
327
|
"schema": {
|
|
264
328
|
"type": "string",
|
|
265
|
-
"format": "uuid"
|
|
266
|
-
|
|
267
|
-
},
|
|
268
|
-
"sfdcDwDnt": {
|
|
269
|
-
"name": "sfdc_dw_dnt",
|
|
270
|
-
"in": "header",
|
|
271
|
-
"required": false,
|
|
272
|
-
"style": "simple",
|
|
273
|
-
"explode": false,
|
|
274
|
-
"schema": {
|
|
275
|
-
"type": "string",
|
|
276
|
-
"enum": [
|
|
277
|
-
"0",
|
|
278
|
-
"1"
|
|
279
|
-
]
|
|
329
|
+
"format": "uuid",
|
|
330
|
+
"example": "550e8400-e29b-41d4-a716-446655440000"
|
|
280
331
|
}
|
|
281
332
|
},
|
|
282
333
|
"sfdcShopperContext": {
|
|
283
334
|
"name": "sfdc_shopper_context",
|
|
284
335
|
"in": "header",
|
|
336
|
+
"description": "Shopper context information (for example clientIP, sourceCode, and customQualifiers)\npassed in from a trusted backend application.",
|
|
285
337
|
"required": false,
|
|
286
338
|
"style": "simple",
|
|
287
339
|
"explode": false,
|
|
@@ -290,9 +342,39 @@
|
|
|
290
342
|
}
|
|
291
343
|
}
|
|
292
344
|
},
|
|
345
|
+
"examples": {
|
|
346
|
+
"GetGiftCertificate": {
|
|
347
|
+
"value": {
|
|
348
|
+
"giftCertificateCode": "MYGIFTCERTIFICATECODE"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"CreateGiftCertificate": {
|
|
352
|
+
"summary": "A newly issued gift certificate with full balance.",
|
|
353
|
+
"value": {
|
|
354
|
+
"amount": 100,
|
|
355
|
+
"balance": 100,
|
|
356
|
+
"enabled": true,
|
|
357
|
+
"maskedGiftCertificateCode": "************FJWQ",
|
|
358
|
+
"merchantId": "00000001",
|
|
359
|
+
"recipientEmail": "jane.doe@example.com",
|
|
360
|
+
"recipientName": "Jane Doe",
|
|
361
|
+
"senderName": "John Smith",
|
|
362
|
+
"status": "issued",
|
|
363
|
+
"description": "Happy Birthday!"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"GiftCertificate404": {
|
|
367
|
+
"value": {
|
|
368
|
+
"type": "https://api.commercecloud.salesforce.com/documentation/error/v1/errors/not-found",
|
|
369
|
+
"title": "Gift Certificate Not Found Exception",
|
|
370
|
+
"detail": "The gift certificate with the provided code could not be retrieved."
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
},
|
|
293
374
|
"securitySchemes": {
|
|
294
375
|
"ShopperToken": {
|
|
295
376
|
"type": "oauth2",
|
|
377
|
+
"description": "ShopperToken authentication follows the authorization code grant flow, as defined by the OAuth 2.1 standard. Depending on the type of OAuth client (public or private), this authorization flow has further requirements. \nFor a detailed description of the authorization flow, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nA shopper token allows you to access the Shopper API endpoints of both the Open Commerce API (OCAPI) and the B2C Commerce API. These endpoints can be used to build headless storefronts and other applications.\nThe `ShopperToken` security scheme is a parent of other security schemes, such as `ShopperTokenTsob`. A Shopper API endpoint can require a specific child scheme (`ShopperTokenTsob`, for example) that cannot be accessed with a regular shopper token.\n",
|
|
296
378
|
"flows": {
|
|
297
379
|
"clientCredentials": {
|
|
298
380
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token",
|
|
@@ -311,6 +393,7 @@
|
|
|
311
393
|
},
|
|
312
394
|
"ShopperClientContextToken": {
|
|
313
395
|
"type": "oauth2",
|
|
396
|
+
"description": "ShopperClientContextToken is a separate security scheme used to track and validate client context information.\nIt is valid for Guest shoppers flows only using SLAS private clients. For registered shoppers, use existing ShopperToken flows.\nFor authentication details, see the [SLAS overview](https://developer.salesforce.com/docs/commerce/commerce-api/references?meta=shopper-login:Summary).\nThis token allows access to Shopper API endpoints for guest shoppers only.\n",
|
|
314
397
|
"flows": {
|
|
315
398
|
"clientCredentials": {
|
|
316
399
|
"tokenUrl": "https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/{organizationId}/oauth2/token?hint=client_context",
|