You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"fallback_error_message": "Unable to validate product",
32
+
"ttl": 6000,
33
+
"fields": [
34
+
{
35
+
"name": "name",
36
+
"source": "data.product.name"
37
+
},
38
+
{
39
+
"name": "price",
40
+
"source": "data.product.price"
41
+
}
42
+
],
43
+
"rules": [
44
+
{
45
+
"field": "data.product.sku",
46
+
"operator": "regex",
47
+
"value": "\/.*car.*\/"
48
+
}
49
+
],
50
+
"headers": [
51
+
{
52
+
"name": "header-name",
53
+
"value": "header-value"
54
+
}
55
+
]
56
+
}
57
57
]
58
58
```
59
59
@@ -69,23 +69,23 @@ curl --request GET \
69
69
--header 'Authorization: Bearer <TOKEN>'
70
70
```
71
71
72
-
###Get supported webhooks for SaaS
72
+
## Get supported webhooks for SaaS
73
73
74
74
<Editionname="saas" />
75
75
76
76
The `GET /V1/webhooks/supportedList` endpoint returns the events supported in Adobe Commerce as a Cloud Service (SaaS). The response body is similar to the following:
To subscribe a webhook, make a `POST` request to the `/V1/webhooks/subscribe` endpoint. [Create a webhook](./conditional-webhooks.md) provides details about the contents of a webhook.
110
+
111
+
The following restrictions apply to the webhook request:
112
+
113
+
- Any specified `fields` must have a `name`.
114
+
-`name` cannot be a null.
115
+
- Any `rules` must have a `field`, `value`, and `operator`.
116
+
-`field` and `operator` cannot be null.
117
+
- The `operator` must be one of the supported options listed under [conditional webhooks](./conditional-webhooks.md).
118
+
- Any `headers` must have a `name` and `value`.
119
+
-`name` and `value` cannot be null.
120
+
-`timeout`, `ttl`, and `soft_timeout` must be non-negative integers.
121
+
122
+
The request body must include the following attributes:
123
+
124
+
| Attribute | Type | Description | Is required | Default |
125
+
|---|---|---|---|---|
126
+
|`hook_name`| String | A hook name that is unique within a batch. This value must contain English alphanumeric characters and underscores (_) only.| true | Not applicable |
127
+
|`url`| String | The HTTP endpoint to send the request for processing. | true | Not applicable |
128
+
|`webhook_method`| String | The webhook code name. The value must be in the form `<type>.<webhook_name>`, where `type` is either `observer` or `plugin`, and `webhook_name` matches a valid Commerce webhook name. | true | Not applicable |
129
+
|`webhook_type`| String | Specifies whether to execute the webhook `before` or `after` the original action. | true | Not applicable |
130
+
|`batch_name`| String | A unique name for the batch. This value must contain English alphanumeric characters and underscores (_) only.| true | Not applicable |
"fallback_error_message": "Unable to validate product",
149
+
"fields": [
150
+
{
151
+
"name": "name",
152
+
"source": "data.product.name"
153
+
},
154
+
{
155
+
"name": "price",
156
+
"source": "data.product.price"
157
+
}
158
+
],
159
+
"rules": [
160
+
{
161
+
"field": "data.product.sku",
162
+
"operator": "regex",
163
+
"value": "/.*car.*/"
164
+
}
165
+
],
166
+
"headers": [
167
+
{
168
+
"name": "CLIENT_ID",
169
+
"value": "abcasdf-12abcd3-45efabc4"
170
+
}
171
+
]
172
+
}
173
+
}
174
+
```
175
+
176
+
## Unsubscribe a webhook
177
+
178
+
<Editionname="saas" />
179
+
180
+
The unsubscribe endpoint allows you to delete an existing webhook subscription. To delete a webhook, make a `POST` request to the `/V1/webhooks/unsubscribe` endpoint. The request body must include the following attributes from the existing webhook:
Copy file name to clipboardExpand all lines: src/pages/webhooks/create-webhooks.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ With this knowledge, you can create a webhook, which defines the following sets
27
27
28
28
* Optional rules that trigger only when certain conditions are met, such as when a string matches a specific value.
29
29
30
-
In Adobe Commerce as a Cloud Service, you can create a webhook subscription in the Admin or by using a REST endpoint. (See [Webhooks in Adobe Commerce as a Cloud Service](https://developer.adobe.com/commerce/services/cloud/guides/rest/webhooks/) for details on using REST.) In Platform as a Service (PaaS) and on-premises environments, you must create an `app/etc/webhooks.xml` file or create a custom module that includes a `<custom-module-root>/etc/webhooks.xml` file.
30
+
In Adobe Commerce as a Cloud Service, you can create a webhook subscription in the Admin or by using a REST endpoint. (See [Subscribe a webhook](./api.md#subscribe-a-webhook) for details on using REST.) In Platform as a Service (PaaS) and on-premises environments, you must create an `app/etc/webhooks.xml` file or create a custom module that includes a `<custom-module-root>/etc/webhooks.xml` file.
0 commit comments