---
agentTools:
  projectIndex: https://developers.ampeco.com/llms.txt
---

# 3.170.0 release notes

1. ✨ **New features**
   1. Added Energy Coupons resource endpoints: `GET /resources/energy-coupons/v1.0` (list with filters for `operatorId`, `userId`, `status`, `type`, `createdAfter`, `createdBefore`, `externalId`), `POST /resources/energy-coupons/v1.0` (create), and `GET /resources/energy-coupons/v1.0/{energyCoupon}` (read). Energy coupons represent pre-allocated energy allowances with properties including `id`, `operatorId`, `userId`, `code`, `type`, `status`, `energyWh`, `remainingEnergyWh`, `evseType`, `validFrom`, `validTo`, `externalId`, and `createdAt`.
   2. Added the `POST /actions/energy-coupon/v1.0/{energyCoupon}/cancel` action endpoint to cancel an active energy coupon. Accepts an optional `reason` field. Returns `409 Conflict` if the coupon is currently locked.
   3. Added the `GET /actions/users/v1.0/{user}/get-total-eligible-coupon-energy` action endpoint to retrieve the total remaining energy and coupon count for a user's eligible coupons at a given EVSE. Requires an `evseId` query parameter.
   4. Added the `GET /resources/energy-coupons/v1.0/{energyCoupon}/session-consumption-records` endpoint to retrieve session-level energy consumption records for a specific coupon. Each record includes `sessionId` and `consumedEnergyWh`.
   5. Added the `PATCH /resources/tariffs/v1.0/{tariff}` endpoint for partial tariff updates. Only the fields included in the request body are updated; omitted fields retain their current values. Note: the `type` field cannot be changed via PATCH — use `PUT` for tariff type changes.
   6. Added the optional `invoiceDetailsMandatory` boolean property to Payment Terminal responses on `GET /resources/payment-terminals/v1.1`, `POST /resources/payment-terminals/v1.1`, `GET /resources/payment-terminals/v1.1/{paymentTerminal}`, and `PATCH /resources/payment-terminals/v1.1/{paymentTerminal}`. Present on Valina, Web Portal, Adyen Castles, Printec Castles, and Cardlink Castles terminal types.
2. 🔧 **Improvements**
   1. Made the `stopSession.timeLimitMinutes` and `stopSession.stopWhenEnergyExceedsKwh` fields nullable on `POST /resources/tariffs/v1.0` and `PUT /resources/tariffs/v1.0/{tariff}`. These fields previously required a numeric value when present; they now also accept `null` to explicitly clear the setting.