Update to the breaking change in Products endpoint and webhook

Effective from: February 7, 2022


Regarding the breaking change in Products endpoint and webhook we communicated on September 24, 2021, we will be updating the response schema of the PUT /v1/products/{id} endpoint and the response payload of the updated.product webhook. The updated structure follows a consistent pattern and is unified with the responses of the Products endpoint.

The current response structure:

{
   ...
   “id”: 1,
   "add_time": "2019-12-19 11:36:49",
   "update_time": "2019-12-26 13:35:17",
   "prices":  {
         "EUR": {
            "id": 1,
            "product_id": 1,
            "price": 5,
            "currency": "EUR",
            "cost": 2,
            "overhead_cost": 3
          }
    }
   ...
};

The updated response structure:

{
   ...
   “id”: 123,
   “add_time”: "2019-12-19 11:36:49",
   “update_time”: "2019-12-26 13:35:17",
   “prices”: [
      {
         “id”: 1,
         “product_id”: 123,
         “price”: 5,
         “currency”: "EUR",
         “cost”: 2,
         “overhead_cost”: 3,
      },
   ],
   ...
};

The updated response structure ensures consistency with the POST /v1/products endpoint. The prices property is now represented in the same way - as an array of price objects.


See more about recent changes announced in our Changelog!

1 Like