Lifecycle: change data with post request response

You already answered all your questions, I don’t understand where is the problem.


async beforeCreate(data) {

    //send data to an API
    //get response from api
    let externalData = await axios.post('https://some_external_api.com/products', {
        productName: data.name,
        productId: data.id
    });

    //manipulate one of the properties of the data object with the response I got from the post request
    data.price = externalData.data.price;

    //create new product in the strapi backend with the new data
    //--product gets created automatically after executing all the code above--
}