Step 1. Tradecloud sends a webhook trigger to your webhook service When an order (response) is new or has been changed at Tradecloud, we will trigger your webhook. You can either choose GET which will contain the order id as path or query parameter Or you can choose POST or PUT which will contain the order event in a JSON body. In case of GET, the triggered webhook URL contains an order id parameter, for example: GET https://yourcompany.com/any/path/:orderId Step 2. Your webhook service fetches the actual order from Tradecloud In case of a GET webhook , using the order id you can fetch the actual order from Tradecloud: GET https://api.accp.tradecloud1.com/order/:orderId In case of POST or PUT webhook you can use the order event inside the request JSON body: When you GET the order yourself you will get ALL the order lines. When you use the order event it will ONLY contain the lines affected by the order event. Setting up your webhook service To receive a webhook trigger you will need: a simple web service reachable from the internet, which listens to some URL the web service should support SSL only and you will need a SSL certificate Self-signed certificates are NOT supported the web service should be configured to use TLS v1.2 You can test the security level of your certificate at SSL Labs the web service should support basic authentication the HTTP method should be either GET, POST or PUT Webhook with order id https://yourcompany.com /any/path/:orderId The GET webhook method is used to send the order id when the order (response) is new or has been updated. Webhook with event https://yourcompany.com /any/path The POST and PUT webhook method is used to send the order event when the order (response) is new or has been updated. There is a known bug TC-6431 "Webhook POST body contains JSON numbers with quotes"
Currently webhook body JSON numbers, have quotes around them (like "12.34") while they should not have them (12.34)
The bugfix is currently planned to be released in April 2021 Next: configure the webhook