NOVELTY - Desired fraction of bio-based raw stock is fed to a fluidized-bed reactor, and the undesired fraction is fed to a combustion boiler to produce energy fractions. A heat transfer material to be used in the reactor is warmed up in the boiler and led to the reactor. The bio-based raw stock is heated in the reactor in oxygen-free conditions to 220-350 degrees C in the presence of the heat transfer material to form a solid biocarbon product. The heat transfer material is circulated from the reactor to the boiler to warm up the heat transfer material.    USE - Production of biocarbon product e.g. charcoal used for producing heat energy, from bio-based raw stock.    ADVANTAGE - The method enables economical production of high-quality biocarbon product by using different types of raw stock and raw stock components which may not have been utilized economically before. A better transfer of heat and power density of the reactor are achieved. The integration of biocarbon and combustion boiler offers important advantages in the treatment and drying of raw stock as well as treatment of different residual and minor flows. Additionally, higher efficiency is reached, because essentially all the minor flows can be utilized.    DETAILED DESCRIPTION - Bio-based raw stock is sorted by removing in the raw stock the fraction which is undesired in terms of the production of biocarbon from the desired fraction of the raw stock which is used for the production of biocarbon. The desired fraction is fed to a fluidized-bed reactor, and the undesired fraction is fed to a combustion boiler disposed in connection with the fluidized-bed reactor in order to produce energy fractions. A heat transfer material to be used in the fluidized-bed reactor is warmed up in the combustion boiler and the warmed-up heat transfer material is led to the fluidized-bed reactor. The bio-based raw stock is heated in the fluidized-bed reactor in oxygen-free conditions to 220-350 degrees C in the presence of the heat transfer material to form a solid biocarbon product. The heat transfer material is circulated from the fluidized-bed reactor to the combustion boiler to warm up the heat transfer material. An INDEPENDENT CLAIM is included for apparatus for producing biocarbon product, consisting of a fluidized-bed reactor (1) and a combustion boiler (2) integrated together, a sorting unit (3) for sorting the bio-based raw stock into desired fraction (18) and undesired fraction (19), a feeding unit for feeding the desired fraction to the reactor (1), a feeding unit for feeding the undesired fraction to the boiler, a unit for leading the warmed-up heat transfer material (6) from the boiler to the reactor, a unit for separating the heat transfer material from the formed biocarbon product (10), and a unit for circulating the heat transfer material (7) back to the boiler to warm up the heat transfer material.    DESCRIPTION OF DRAWING(S) - The drawing shows a schematic view of the apparatus used for producing biocarbon product.    Fluidized-bed reactor (1)    Combustion boiler (2)    Separator device (4)    Dryer (5)    Heat transfer materials (6,7)    Biocarbon product (10)    Combustion gases (11)    Combustion gas circulating unit (12)    Desired fraction (18)    Undesired fraction (19)