Description
When using ordercli deliveroo history with a UK Deliveroo account, the command fails with:
json: cannot unmarshal number into Go struct field Order.orders.order_number of type string
Cause
The Deliveroo UK API returns order_number as an integer:
But internal/deliveroo/model.go expects a string:
OrderNumber string `json:"order_number"`
Suggested fix
Change the type to int or use json.Number for flexibility:
OrderNumber int `json:"order_number"`
Environment
- ordercli v0.1.0
- Market: UK
- macOS (arm64)
Workaround
Calling the API directly works:
curl -H "Authorization: Bearer $TOKEN" \
"https://co-m.uk.deliveroo.com/consumer/order-history/v1/orders?limit=3"
Description
When using
ordercli deliveroo historywith a UK Deliveroo account, the command fails with:Cause
The Deliveroo UK API returns
order_numberas an integer:But
internal/deliveroo/model.goexpects a string:Suggested fix
Change the type to
intor usejson.Numberfor flexibility:Environment
Workaround
Calling the API directly works: