Is it possible to receive a JSON that isn't part of a field?

In that case I would suggest creating/overriding a controller.

We list all of the example code for the default controllers on our documentation here: https://strapi.io/documentation/developer-docs/latest/concepts/controllers.html#core-controllers

Basically what you would do (in the example of a findOne):

const { sanitizeEntity } = require('strapi-utils');

module.exports = {
  /**
   * Retrieve a record.
   *
   * @return {Object}
   */

  async findOne(ctx) {
    const { id } = ctx.params;

    const entity = await strapi.services.restaurant.findOne({ id });
    let cleanEntity = sanitizeEntity(entity, { model: strapi.models.restaurant });

   // Inject your custom json from some external await call into cleanEntity

   return cleanEntity;
  },
};
1 Like