Migration guide Ducky API v2 to v3

This document details how to migrate from v2 to v3, for each of our endpoints.

v2 v3 Scope of migration
/ping /ping -
/ping/protected /ping/protected -
/calculator /calculator Minor input body changes
/calculator/money /calculate/finance Minor input body changes
- /calculate/food-and-drink -
/batch - Deleted
- /convert/food-and-drink -
- /convert/transport -
- /convert/energy -
- /convert/finance -
- /convert/goods-and-services -
- /compare/food-and-drink -
- /compare/general -
- /change -
/translate/car /translate/car -
/translate/tree /translate/tree -
/translate/energy /translate/energy -
/translate/plane /translate/plane -
- /track/transport -

Detailed description of changes and new features

/calculator

  • New query parameter: dataFromDate allows you to choose a dataset from a given date.
  • Body:
    • household.income changed to household.monthlyIncomeAfterTax. The old input, income, was before tax.
    • energy.heatSourceWood has new possible input: heatSourceWood5 (More than 5000 liters).
    • energy has two new parameters: solarPanelKW and solarSize.
    • New body input user which at the moment only contains the age of the user (used in the context of calculating food waste footprint).

/calculator/money → /calculate/finance

  • Rename the endpoint to /calculate/finance.
  • New query parameter: dataFromDate allows you to choose a dataset from a given date.
  • Body:
    • habits.household.income changed to habits.household.monthlyIncomeAfterTax. The old input, income, was before tax.
    • habits.energy has been removed.
    • habits.consumption.serviceConsumer, habits.consumption.wasteConsumer and habits.consumption.wasteConsumer.yearlyDonationAmount have been removed.
    • habits.food.dietAmount and habits.food.foodWaste have been removed.
    • habits.transport has been removed.