a logic doesn’t strongly related with API, you should consider to implement the logic in service layer. Unless, you will have a moster controller. (And you might have many duplicated or similar code) buzzscreen/controller/device_v1.go func InitDeviceV1(c *gin.Context) { var deviceReq dto.InitDeviceV1Request err := bindValue(c, &deviceReq) ... device, _ := service.HandleNewDevice(&requestedDevice, c.Request) ... writeJsonSafely(c, http.StatusOK, res) } buzzscreen/controller/device.go func PostDevice(c *gin.Context) { var deviceReq dto.DeviceRequest err := bindValue(c, &deviceReq) ... device, isNewDevice := service.HandleNewDevice(&requestedDevice, c.Request) ... writeJsonSafely(c, http.StatusOK, res) }