Webhooks

  • Updated

This guide describes how to push certain events from Stamped as a POST request to external services.


In This Guide


List Of Events Covered by Webhooks

1. Reviews
2. Questions & Answers
3. Net Promoter Scores
4. Checkout Comments
5. Rewards Earned
6. Rewards Spent
7. Rewards Referral
8. Rewards VIP
9. Rewards Points Adjustment


Example

We add these headers to all webhook event pushes:

1) X-Secret-Key		
2) X-Stamped-Webhook-Secret		
3) X-Stamped-Store-Url		
4) X-Shopify-Shop-ID		
5) X-Stamped-Topic
Below we provide an example for each event type.
1. Reviews 
{
    "customerEmail": "example@gmail.com",
    "id": 14243711,
    "author": "John Doe",
    "reviewTitle": "Test review",
    "reviewMessage": "testing",
    "reviewRating": 3,
    "reviewDate": null,
    "reviewUserPhotos": null,
    "reviewUserVideos": null,
    "reviewVerifiedType": 0,
    "reviewReply": null,
    "reviewReplyDate": null,
    "productId": 2640569991268,
    "productName": "2PCS Tassels Crop Top & Short Pants Sets",
    "productSKU": null,
    "productUrl": "https://stamped.io/go/d3xOb25lfDB8cnwxNDI0MzcxMQ2",
    "productImageUrl": "//cdn.shopify.com/s/files/1/0196/8521/2260/products/3cc053bd-1e5a-47ec-8a1a-5b6438a41dd9-52766-pc_large.jpg%3Fv=1548841799",
    "productImageLargeUrl": null,
    "productImageThumbnailUrl": null,
    "productDescription": null,
    "avatar": null,
    "location": "",
    "reviewVotesUp": 0,
    "reviewVotesDown": 0,
    "userReference": null,
    "dateCreated": "2019-06-05T09:30:14.963",
    "dateReplied": null,
    "reviewType": 1,
    "widgetType": null,
    "reviewOptionsList": []
}
2. Questions & Answers
{
    "id": 1993308,
    "message": "Where are the brownie bites ? I don’t care for the other products.",
    "email": "example@gmail.com",
    "name": "John Doe",
    "date_created": "2021-03-26T01:43:30.62",
    "product_id": 10192130439,
    "product_name": "Fat Snax Cookies",
    "customer_id": 76472997,
    "customer_name": null,
    "customer_email": "example@gmail.com"
}
3. Net Promoter Score
{
    "Id": 1630794,
    "Rating": 5,
    "Body": "The monthly fee is odd.",
    "Reply": null,
    "State": 0,
    "SurveySource": null,
    "ShopProductId": null,
    "IpAddress": null,
    "CustomerId": 50692984,
    "QueueReviewEmailId": 338048385,
    "IsRead": false,
    "IsFeatured": false,
    "Shop_ID": 73244,
    "ShopProduct": null,
    "VerifiedType": 2,
    "DateCreated": "2020-04-01T15:14:14.297",
    "DateAdded": "2020-04-01T15:14:14.297",
    "DateReplied": null,
    "TagsList": []
}
4. Checkout Comments
{
    "id": 1787048,
    "productTitle": "KLIP mini",
    "email": "example@gmail.com",
    "orderNumber": "3642451951782",
    "orderId": 3642451951782,
    "body": "Great reviews "
}
5. Rewards Earned
{
    "id": 1787048,
    "title": "Example title",
    "title_public": "Example title public",
    "points": 7.00
    "date_created": "2020-04-01T15:14:14.297",
    "customer_email": "example@gmail.com"
}
6. Rewards Spent
{
    "id": 1787048,
    "title": "Example title",
    "title_public": "Example title public",
    "points": 7.00
    "date_created": "2020-04-01T15:14:14.297",
    "customer_email": "example@gmail.com"
}
7. Rewards Referral
{
    "id": 5727602,
    "title": "Fixed amount discount",
    "title_public": "$12 off coupon",
    "points": null,
    "date_created": "2020-11-19T21:19:41.843",
    "customer_email": "example@gmail.com",
    "customer_referred_id": "64693436"
}
8. Rewards VIP Tier Entry
{
    "id": 5727602,
    "title": "Example VIP Tier Title",
    "tierEventType": "tier entry",
    "date_created": "2020-11-19T21:19:41.843",
    "customer_email": "example@gmail.com",
    "vip_tier_id": 12345
}
9. Rewards Point Adjustment
{
    "id": 23125294,
    "title": "Manual adjustments",
    "title_public": "Manual adjustments",
    "points": 500.0,
    "date_created": "2021-08-16T21:52:00.263",
    "customer_email": "example@gmail.com",
    "customer_referred_id": "2118_30_void_2123"
}

Adding A Webhook

  1. Head over to Settings - Webhooks
  2. Click on "Add Webhook". You will see the following interface:

    Webhook1.png

  3. You will need to fill in the following fields:

    • Payload URL: Target URL to send the POST request to
    • Secret: API secret key
    • Is Active: Uncheck the box to deactivate the webhook
    • All events: Checking will send all events. Uncheck to select individual events.
  4. Click "Save"

Was this article helpful?

0 out of 1 found this helpful

Have more questions? Submit a request