Webhooks (visible in sites subscribing to the Pressero API)

 

Webhooks are "user-defined HTTP callbacks", that allows Pressero to send notification to the application that has subscribed to an event, on Pressero the user can subscribe to the one (or all) of the following events:

 
OrderItemStatusChanged
VendorItemReady
PaymentReceived
LowInventory
NewUserAprvReq
OrderAllComplete
OrderAprvReq
OrderItemApproved
OrderItemComplete
OrderItemDenied
OrderPlaced
PageFormSubmit
OrderItemFilesGenerated
UpdatedSiteUser
NewSite
OrderUpdated
OrderItemUpdated
NewSiteUser
 
 

When the user subscriber use one of those events, when the action occurs Pressero will then send a notification, a JSON object, with all the basic information related to that event/action.

 

There are two ways to subscriber use a Webhook on Pressero:

 
  1. API

  2. Admin Area (API license is still required)

 
  1. API    

 

To use the API to handle all the webhooks configuration please check the API documentation, available here: http://admin.chi.v6.pressero.com/docs/api/#api-WebHooks-PostWebHook

 

  1. Admin

 

To use webhooks on the Admin you need to have the API subscription and request the feature to be enabled on your account, for this contact the support team, for more information.

 

Once you have the API and authorization, the Webhooks option will appear on Pressero Preferences panel.

 

When you access the Webhooks configuration you will have the option to create a new Webhooks.

 

On the Settings tab, you will have the following parameters:

Description: Sets the description for the new Webhook

Security Key: A string that you can define as a signature. When a key is defined, Pressero will concatenate it with the hook payload and will generate a SHA1 hash, this hash will be then added to the request headers as MessageHash, you can then validate the message and check if the hash matches the one sent by Pressero.

URL: The address to where Pressero should send the notification.

 

On the Events Tab, you can select the events that you wish to receive the notifications, you must select at least one event, otherwise the hook will not be created.

 

 

On the Sites Tab, you can select the sites you wish to receive the notification when the action occurs, if you don’t select a site, the application will understand that you want to receive notification from all your sites.

 

Once you click on the save button, Pressero will then enable the webhooks and you will start to receive the notification for the selected actions. Pressero will send the notification as Post request to the configured URL, the data will be in the request Body as a JSON object, the notification will be considered Delivered if your server send a 200 response (OK), otherwise it will be considered as a failure. If you server expects to receive the message as a parameter the notification will not be delivered as Pressero will not send data as parameter, unless you configure it directly on the URL.

 

 

After enabling a Webhook a new tab will be available on the Webhooks configuration page, it’s the Log Tab, here you can check the notification history, with the payload sent, check the notification status, if it was received by the destination URL or if an error occurred. If an error has occurred you will be able to check the message and if necessary resend the notification.

 

If you want to cancel the subscription you can remove the notifications you want to receive by unchecking the item on the Events tab, or by clicking on the Delete button on the bottom of the webhooks configuration page.

 

How to obtain a sample payload for each event:

You can see all the Webhooks here http://admin.chi.v6.pressero.com/docs/webhooks/

 
  1. You must have access to the Pressero API

  2. Authenticate on the Pressero API (http://admin.chi.v6.pressero.com/docs/api/#api-Authentication-Authentication)

  3. Send a request to the following URL:

http://admin.chi.v6.pressero.com/api/v2/Webhooks/{eventName}/SamplePayload

 

Replace the eventName string with the webhook event that you want to get the sample payload, here is the list of the available events:

 

OrderItemStatusChanged

VendorItemReady

PaymentReceived

LowInventory

NewUserAprvReq

OrderAllComplete

OrderAprvReq

OrderItemApproved

OrderItemComplete

OrderItemDenied

OrderPlaced

PageFormSubmit

OrderItemFilesGenerated

UpdatedSiteUser

NewSite

OrderUpdated

OrderItemUpdated

NewSiteUser


So, a valid URL request would be:

http://admin.chi.v6.pressero.com/api/v2/Webhooks/NewSiteUser/SamplePayload

 

Pressero API Rate Limits

 

When creating your API integration, please keep in mind the following limits: maximum API connection rate is 20 requests within 10 seconds. Requests that exceed this rate will fail for a 10-second cooldown period. Additionally, there is a limit of 100 records per API request.

 

See related Why am I getting "Error 429 TOO MANY REQUESTS" when making API calls to Pressero?

 

Pressero API Rate Limits for Dedicated Servers

 

Dedicated servers enable customers to perform better and have a higher API utilization rate. However, even though it is a dedicated server, there is always a limit on its usage. So, when you have a dedicated server, if the limit of that server is reached and you need to make changes to the server in order to increase its capacity, any updates that we made to Pressero because of how you are using or misusing the system you will be charged for. 

For more information please contact our support team.