Review Glossary FR

Size

Eyes

Finish a part in any dojo to unlock the next eyes.

Day 35 10 min

Changing a public API

1 / 6 · ≈ 14 min left

The problem

A shipping company's public API returns "weight": "12.5 kg". The new warehouse scales weigh to the gram, and some customers ship in pounds. The team wants "weight": { "value": 12.5, "unit": "kg" }.

2 000 customer integrations read that field today. One of them is a small shop's Node.js script that calls parseFloat(shipment.weight). On "12.5 kg" it returns 12.5. On an object, parseFloat first converts it to the string [object Object] and returns NaN, and the label printer stops.

Nobody at the shipping company can fix that script. The change must ship anyway, and no integration may break.