Backend API
Swell is an event-based architecture that allows you to configure webhooks on a variety of events that occur within each of our base data models. These events are easily referenced when creating webhooks from within the Swell dashboard under Developer > Webhooks. All configured webhooks are also available at /:webhooks.
To view webhooks that have fired within your store, see the /events:webhooks endpoint.
Fields
id
objectIdautoThe unique identifier for the webhook.
alias
stringAlias used to refer to the webhook configuration.
url
stringrequiredURL endpoint for the webhook.
events
array of stringrequiredArray of trigger events for the webhook.
enabled
booleanDetermines whether the webhook is enabled. Defaults to false.
auto_disabled
booleanautoIndicates whether the webhook was automatically disabled. This occurs seven days after the first failed attempt and no subsequent successes.
retry_disabled_events
booleanDetermines whether the webhook retries disabled events.
attempts_failed
intDisplays the number failed webhook attempts.
date_first_failed
dateautoThe date the webhook's first failed attempt.
date_last_warned
dateautoThe date of the last warning for a failed attempt.
date_final_attempt
dateThe final attempt for a webhook after continuous failed attempts. Webhooks are disabled 7 days after the first failed attempt.
schedule
objectSchedule for specifying when a webhook is to be fired.
schedule.hour
intThe hour for which to fire the webhook. Min 0, max 23.
schedule.month_day
intThe day of the month for which to fire the webhook. Min 1, max 31.
schedule.month
intThe month for which to fire the webhook. Min 1, max 12.
schedule.week_day
intThe month for which to fire the webhook. Min 0, max 6.
date_scheduled
dateDate for which the webhook is scheduled to fire.
The webhook model
{
"url": "http://localhost:5000",
"enabled": false,
"alias": "webhook",
"description": null,
"events": [
"order.created",
"order.submitted",
"order.updated"
],
"api": "com",
"date_final_attempt": null,
"date_scheduled": null,
"date_created": "2021-09-27T16:30:11.837Z",
"date_updated": "2021-10-28T16:04:21.648Z",
"id": "6151f193ae97e82ccbf6f0a7"
}