Skip to main content
More in Learn

Webhooks

Webhooks are user-defined HTTP callbacks triggered by an event. They allow a web-based application to respond in real time to something that’s happened on a different web-based application. They eliminate the need for polling and greatly facilitate decoupling, which makes your code simpler and easier to maintain over time.

Using the Crystallize App or PIM API, you can define webhooks that listen for and fire on specific events that occur within Crystallize (refer to our example repository for webhook-related sample queries). Webhooks can be used to automate processes such as emailing customers as their orders proceed through various stages of your fulfilment pipeline.

Crystallize offers webhooks for these categories of events:

You have the flexibility to respond to webhooks however you require. Crystallize webhook requests may use one of the following HTTP methods:

  • GET
  • PUT
  • POST
  • PATCH
  • DELETE

You can optionally specify headers and a payload within the request, or handle everything separately in your own code with your own logic. If you don’t specify a payload, the webhook endpoint will still contain a JSON payload containing all of the parameters available to such a query.

To test webhooks, we recommend using something like webhook.site or ngrok.

For added security, the requests sent by Crystallize webhooks are signed. It is your responsibility to verify these signatures.

People showing thumbs up

Need further assistance?

Ask the Crystallize team or other enthusiasts in our slack community.

Join our slack community