Trustoo
  1. Reviews Data API
Trustoo
  • Reviews Widget Integration
  • Reviews Data API
    • API Quick Start
    • Response Code
    • Webhook Description
    • Create shop webhook
      POST
    • Update shop webhook
      PUT
    • Delete shop webhook
      DELETE
    • Get shop webhooks
      GET
    • Get review list
      GET
    • Get order list
      GET
    • Get customer event list
      GET
    • Unsubscribe
      POST
  1. Reviews Data API

Webhook Description

Webhooks are a way to make changes to your web application through custom callback functions. Webhooks allow you to select the type of notifications you want to receive and receive notifications at a specified URL. Once it's finished requesting the data, the webhook will push the data to you using a POST request via the URL you configured. You will respond as follows after receiving it:
{
	"code": 0,
	"message": "success"
}
NOTE
The HTTP status code must be 200, otherwise we will treat it as a failure and will push it repeatedly.

1 How to set up webhook#

You can set it through the "Set webhook for store" interface.

2 Webhooks re-push mechanism#

If the push fails, I will push it repeatedly according to the following time intervals, a total of 10 times.
Number of attemptsDelay before sending (minutes)Cumulative delay (minutes)
100
233
369
4918
51230
61545
71863
82184
924108
1027135

3 Webhook event type (event_type)#

Event type (event_type)Description
review/createdTriggered when a review is created
review/updatedTriggered when an original review is updated
review/deletedTriggered when a comment is deleted or hidden

4 Pushed data#

4.1 Header#

{
  "Content-Type": "application/json"
  "Open-Trustoo-Webhook-Public-token": "1662371528"
  "Open-Trustoo-Webhook-Timestamp": "1662371528"
  "Open-Trustoo-Webhook-Sign":"a37084ab68ae16b77db1f8463f31be9fcc965e2515e03efecf8139bb1e511b06"
  "Open-Trustoo-Webhook-RequestId":"kfhgdsjkfhksdjffkjsghks"
}
FieldValueDescription
Content-Typeapplication/jsonRequested data format, here is a fixed value
Open-Trustoo-Webhook-Public-tokenxxxxAuthorized Public-token
Open-Trustoo-Webhook-TimestampxxxRequested Unix timestamp
Open-Trustoo-Webhook-SignxxxxThe requested signature, please refer to the 2.2 sign algorithm in API Quick Start
Open-Trustoo-Webhook-RequestIdxxxxRequest id

4.2 Body#

{
	"list": [{
		"id": 123,
		"my_shopify_domain": "example.myshopify.com",
		"shopify_shop_id": 456,
		"shopify_product_id": 789,
		"product_rating": 4,
		"is_verified_badge": true,
		"reviewer": "John Doe",
		"from_country": "USA",
		"review_text": "This is a great product!",
		"review_images": ["image1.jpg", "image2.jpg"],
		"review_videos": ["video1.mp4"],
		"review_email": "[email protected]",
		"review_phone": "+1234567890",
		"create_at": "2023-11-21T12:34:56Z",
		"update_at": "2023-11-21T12:45:00Z",
		"is_publish": true
	}],
        "event_type":"review/created"
}
CAUTION
During signature verification, the values in the list are concatenated as a single string for signing.

4.2.1 Body.list#

FieldValueDescription
id123A:In the same store, the id is unique (shopify_shop_id+id only)
shopify_shop_id456B:shopify’s unique store id
my_shopify_domainexample.myshopify.comThe shopify domain name of the store
shopify_product_id789The unique id of the product
product_rating4Product rating 1-5
is_verified_badgetrueWhether to verify the badge 1-yes 2-no'
reviewerJohn DoeReview author
from_countryUSAFrom which country
review_textThis is a great product!text
review_images["image1.jpg", "image2.jpg"]Leave a comment on the image
review_videos["video1.mp4"]Leave a review video
review_email[email protected]Consumer email
review_phone+1234567890Consumer Phone
create_at2023-11-21T12:34:56ZCreation time
update_at2023-11-21T12:45:00ZUpdate time
is_publish1Whether to publish: 1-Publish 2-Unpublish

4.2.1 Body.event_type#

Please refer to 3 webhook event types (event_type).
Modified at 2024-07-09 10:48:02
Previous
Response Code
Next
Create shop webhook
Built with