Create an alert
sortly_create_alertCreate a stock alert on an item (type Quantity, e.g. threshold_method quantity_less_than with threshold_value 5, or less_than_or_equal_to_min_quantity), or a DateReminder on a datetime custom field (custom_attribute_id + before/after/same_day + threshold_interval). WRITE. Sortly: POST /api/v1/alerts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Quantity = stock threshold; DateReminder = date custom field. | |
| item_id | Yes | The item the alert watches. | |
| threshold_value | No | The number compared against (or the interval count). | |
| recipient_groups | No | Who is notified: owners, admins, members, limited, or a custom role name. Default owners. | |
| threshold_method | Yes | What triggers it: a quantity_* method for Quantity, before/after/same_day for DateReminder. | |
| threshold_interval | No | Required for DateReminder; omit for Quantity. | |
| custom_attribute_id | No | For DateReminder: the datetime custom field to watch. |