webhook
Description
Webhooks allow you to configure Foxy to push data to an endpoint of your choosing. This is useful for providing notifications, syncing data, and more. Available webhooks include: Foxy JSON webhook; Zapier; Webflow.
Interact with this resource
To interact with this resource and see it in the context of the API, you can utilise Postman or your Terminal/Console to perform requests. If you have a Foxy store, you can also use the API browser in the admin to interact with resources connected to your store.
Actions
- GET
- View a webhook
- PATCH
- Update a webhook (send only the properties you want to modify)
- PUT
- Replace a webhook (send the entire representation)
- DELETE
- Delete a webhook
- HEAD
- Get just the header response
- OPTIONS
- Get a response explaining which HTTP methods are supported
Properties
Property | Description | Type | Constraints |
---|---|---|---|
name | The name of this webhook. | String | Required. 255 characters or less. |
format | Type of webhook. | String | Required. 'json', 'webflow' or 'zapier'. |
version | Version of the webhook. Should not be modified unless you have specific instructions from Foxy. | String | Default value is 2 |
url | The endpoint where we will send the webhook data. | String | 1000 characters or less. |
query | The webhook payload mirrors the API, and you can include more or less data according to your needs (using zoom and other modifiers). |
String | 1000 characters or less. Something like zoom=items,items:options,customer |
encryption_key | The JSON webhooks are encrypted in certain situations. This key is also used to generate a signature to verify the integrity of the payload. | String | 1000 characters or less. |
events | A webhook can be configured for different events, like when transactions are created or subscriptions are cancelled. | String | An array of strings. Possible events: 'transaction/created', 'transaction/captured', 'transaction/refunded', 'transaction/voided', 'subscription/cancelled' |
date_created | The date this resource was created. | Date | Read only |
date_modified | The date this resource was last modified. | Date | Read only |
Example Representation
{ "_links": { "curies": [ { "name": "fx", "href": "https://api.foxycart.com/rels/{rel}", "templated": true } ], "self": { "href": "https://api.foxy.test/webhooks/2", "title": "This Webhook" }, "fx:store": { "href": "https://api.foxy.test/stores/40018", "title": "This Store" }, "fx:webhooks": { "href": "https://api.foxy.test/stores/40018/webhooks", "title": "All webhooks" } }, "format": "json", "version": 2, "name": "My JSON endpoint", "url": "https://example.com", "query": "zoom=items", "encryption_key": "HNL978XVXXCM66DM5N2T78D5MT66BC6D", "events": [ "transaction/created", "transaction/captured" ] "date_created": "2020-10-28T07:03:19-0700", "date_modified": "2020-10-28T08:45:46-0700" }
Zoomable Resources
This resource has no linked resources which can be "zoomed" in on, filtered and embedded within this resource.