webhooks

Description

This link relationship returns a collection of resources. You can easily paginate through this collection using the hypermedia links provided and the link relationships of first, prev, next, and last. Scroll down to view a representation of a single resource embedded within this collection.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

Actions

GET
View a list of webhooks
POST
Create a new webhook
HEAD
Get just the header response
OPTIONS
Get a response explaining which HTTP methods are supported

Example Representation

{
  "_links": {
    "curies": [
      {
        "name": "fx",
        "href": "https://api.foxycart.com/rels/{rel}",
        "templated": true
      }
    ],
    "self": {
      "href": "...",
      "title": "This Collection"
    },
    "first": {
      "href": "...?offset=0",
      "title": "First Page of this Collection"
    },
    "prev": {
      "href": "...?offset=0",
      "title": "Previous Page of this Collection"
    },
    "next": {
      "href": "...?offset=0",
      "title": "Next Page of this Collection"
    },
    "last": {
      "href": "...?offset=0",
      "title": "Last Page of this Collection"
    }
  },
  "_embedded": {
    "fx:webhooks": [...]
  },
  "total_items": "5",
  "returned_items": 5,
  "limit": 20,
  "offset": 0
}
<?xml version="1.0" encoding="UTF-8"?>
<resource href="...">
  <link rel="self" href="..." title="This Collection"/>
  <link rel="first" href="...?offset=0" title="First Page of this Collection"/>
  <link rel="prev" href="...?offset=0" title="Previous Page of this Collection"/>
  <link rel="next" href="...?offset=0" title="Next Page of this Collection"/>
  <link rel="last" href="...?offset=0" title="Last Page of this Collection"/>
  <resource href="..." rel="https://api.foxycart.com/rels/webhook">
  ...
  </resource>
  <total_items>5</total_items>
  <returned_items>5</returned_items>
  <limit>20</limit>
  <offset>0</offset>
</resource>
{
    "properties": {
        "total_items": "5",
        "returned_items": 5,
        "limit": 20,
        "offset": 0
    },
    "entities": [...],
    "links": [
        {
            "rel": [
                "self"
            ],
            "href": "..."
        },
        {
            "rel": [
                "first"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "prev"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "next"
            ],
            "href": "...?offset=0"
        },
        {
            "rel": [
                "last"
            ],
            "href": "...?offset=0"
        }
    ],
    "actions": [
    ]
}

Embedded Resource: 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.

Sandbox Example

You can interact with this resource and run actions against the sandbox API via our HAL Brower.

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.