Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 7.38 KB

File metadata and controls

19 lines (16 loc) · 7.38 KB

# WebhookCreate

Properties

Name Type Description Notes
entity string Specify the entity that you want to enable webhooks for (e.g product, order, customer, category)
action string Specify what action (event) will trigger the webhook (e.g add, delete, or update)
callback string Callback url that returns shipping rates. It should be able to accept POST requests with json data. [optional]
label string The name you give to the webhook [optional]
fields string Fields the webhook should send [optional] [default to 'force_all']
response_fields string Set this parameter in order to choose which entity fields you want to retrieve [optional]
active bool Webhook status [optional] [default to true]
lang_id string Language id [optional]
store_id string Defines store id where the webhook should be assigned [optional]
filtering_conditions \OpenAPI\Client\Model\ParamDefinitionFilteringConditionsFilterCondition <p>Defines the logic for filtering webhooks based on the entity's data. If provided, the webhook will only be sent if the entity matches the specified conditions. Pass <strong>null</strong> to disable filtering and receive all webhooks (for <strong>webhook.update</strong> method).</p><p>The filter accepts a recursive JSON object. The maximum nesting level is <strong>5</strong>. Exceeding this will result in a validation error. <p><strong>Strict Rule:</strong> Each level of the object must contain <strong>exactly one</strong> of the following keys:</p><ul><li><strong>Logical Groups:</strong><code>and</code>, <code>or</code>, <code>not</code> (used to combine multiple conditions).</li><li><strong>Condition:</strong><code>field</code>, <code>operator</code> and <code>value</code></li></ul><br/><p><strong>Logical Operators:</strong><ul><li><code>and</code>: Accepts an array of objects. All conditions must be true.</li><li><code>or</code>: Accepts an array of objects. At least one condition must be true.</li><li><code>not</code>: Accepts a single object. The condition inside must be false.</li></ul></p><br/><p><strong>Condition Object:</strong><ul><li><code>field</code>: The dot-notation path to the attribute (e.g., id, customer.email, items.price).</li><li><code>operator</code>: The comparison method (see list below).</li><li><code>value</code>: The value to compare against.</li></ul></p><br/><p>The list of available fields for filtering is returned by the <strong>webhook.events</strong> method in the <strong>filterable_fields</strong> property. The available fields depend on the webhook entity. If the list for a specific webhook is empty, it means that filtering is not supported for this entity or action.</p><p>The system validates operators against the field type defined in the entity schema.</p><p><ul><li><strong>string:</strong><code>eq</code>, <code>neq</code>, <code>in</code>, <code>not_in</code>, <code>like</code>, <code>not_like</code>.</li><li><strong>integer:</strong><code>eq</code>, <code>neq</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>.</li><li><strong>number:</strong><code>eq</code>, <code>neq</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>.</li><li><strong>boolean:</strong><code>eq</code>, <code>neq</code>.</li><li><strong>date:</strong><code>eq</code>, <code>neq</code>, <code>gt</code>, <code>gte</code>, <code>lt</code>, <code>lte</code>.</li><li><strong>array:</strong><code>eq</code>, <code>neq</code>, <code>in</code>, <code>not_in</code>.</li></ul></p><br/><p><strong>Operators:</strong><ul><li><code>eq</code>: Exact match. The field value must match the specified value exactly (case sensitive). For array-type fields, compares two arrays regardless of the element order.</li><li><code>neq</code>: Not equal. The field value must be different from the specified value.</li><li><code>like</code>: Partial match (SQL-style). Case-insensitive. Supported wildcards:<ul><li><strong>%</strong> - matches any sequence of characters (0 or more).</li><li><strong></strong> - matches exactly one character.</li></ul> If the value contains the '%' or '' characters, they must be escaped using a backslash ('\'). For example, if the string is 'demo_', the value should be specified as 'demo\_'.</li><li><code>not_like</code>: Inverted Partial Match. Ensures the pattern does not match.</li><li><code>in</code>: In List. The field value must match one of the values in the provided array. For array-type fields, the condition is considered valid if at least one element from the provided list exists in the array.</li><li><code>not_in</code>: Not In List. The field value must not be present in the provided array. For array-type fields, the condition is considered valid if none of the elements in the array exist in the provided list.</li><li><code>lt</code>: Less (Strictly Less). The value is strictly less than value.</li><li><code>lte</code>: Less than or equal to.</li><li><code>gt</code>: Strictly Greater. The value is strictly greater than value.</li><li><code>gte</code>: Greater than or equal to.</li></ul></p><br/><p><strong>Please note: the filter is universal for all platforms; however, for some platforms, certain fields may never be populated. Before defining a filter, make sure that the field is populated for the specific platform. Otherwise, a webhook configured with such a filter may never be triggered.</strong></p><br/> [optional]
idempotency_key string A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong> [optional]

[Back to Model list] [Back to API list] [Back to README]