Webhooks

The Webhooks tab allows you to set special addresses to which information about the actions performed will be passed to an external service.

Webhook settings panel

Available options

Here is a list of the available options with a short explanation.

Webhook after placing an order

Determines the URL to which a POST request with information about the order in JSON format will be sent.

The Send test request button allows you to check whether the given address receives data correctly - before a real order is placed. In addition, for each order on the order list there is a Send webhook button, which allows you to re-send the data of a specific order.

Tip

When integrating, please take into account that we do not offer versioning of the data structure in webhooks. Consequently, new variables may appear in the returned data. Relying on a 1:1 data structure may lead to errors in the future. The safest approach is to read each variable from the JSON string separately and not, for example, assume that the address object will not be supplemented with additional information in the future.

Example data format sent by the webhook.
{
   "encoded_id":"123-456-789",
   "number":"123/03/2020",
   "total_price":"138.45",
   "total_copies":"3",
   "total_photos":"2",
   "buyer":{
      "email":"test@email.com",
      "phone":"+48 000 000 000",
      "comment":"Comment on the order",
      "address":{
         "parcel_locker":null,
         "is_company":"0",
         "company_name":null,
         "company_nip":null,
         "name":"John Smith",
         "street":"9 Jasmine Street",
         "postcode":"12-345",
         "city":"Krakow",
         "country":"Poland"
      }
   },
   "payment_percentage":null,
   "payment_percentage_price":null,
   "cart":{
      "1":{
         "total_price":"123.45",
         "items":[
            {
               "size_id":"3",
               "size_folder":"13x18",
               "file_name":"Photo101.jpg",
               "copies":"1",
               "paper":"matte",
               "price":"23.25"
            },
            {
               "size_id":"1",
               "size_folder":"9x13",
               "file_name":"Photo022.jpg",
               "copies":"2",
               "paper":"glossy",
               "price":"50.10"
            }
         ]
      }
   },
   "delivery":{
      "id":"2",
      "name":"Personal collection (Online payment)",
      "price":"15.00"
   },
   "coupon":{
      "code":null,
      "price":null
   },
   "services":{
      "photo_correction":"0",
      "photo_correction_price":null

}