how do I add a webhook?
  • 26 Aug 2022
  • 1 Minute to read
  • Contributors
  • Dark

how do I add a webhook?

  • Dark

Simplified Webhook Interaction

Template Selection
Product specification is simplified by dynamically encoding the required SKU Number and target Template ID into the webhook based on the template the user copies the hook from on PRINTgenie.

No additional authentication steps are required as we’ve encoded your user data directly into the webhook. Be sure you don’t share you’re webhooks with anyone because this unique webhook can place orders on your behalf!

Address Data Delivery
We’ll need the webhook to be executed as an HTTP POST and have the intended recipient sent to us from your platform.  We currently support up to 300 addresses per request serialized as application/json.
The minimum required address data is:

Custom Variable Data
This data can be extended to include any custom variable data needed, simply add a custom_field object to your contact object:

Payment Processing
Based on the encoded API Key, we will be able to collect payment directly from the end-user. This will necessitate that the end user maintains their balance. We an auto-pay feature coming soon to help reduce the risk of failed automations due to insufficient funds.

Error detection
If anything goes wrong with the order (for example insufficient funds) our webhook will return an non-200 HTTP response along with application/json data describing the nature of the failure.
It’s advisable that you implement some sort of user-facing alert when this occurs so the user can take corrective action; like Zapier’s Zap History for example:


Here’s an example of a failure response from our one-off-marketing webhook:

Data Quality
It is recommended that you either purchase pre-validated address data directly from PRINTgenie or you sanitize your address data using our data cleaning APIs. This will significantly reduce any failed deliveries and wasted marketing dollars.

{{ API Details Pending }}