I provide a PHP code for querying an API to retrieve product variants. I need to put those variants in the Magento 2 store. Every variant is a virtual product belonging to a configurable product. This configurable product has to be created too.
Additionally, there is an attribute set based on the Default attribute set, with color and size attributes. Each variant is a combination of color and size of the configurable product.
This has to be a new module, with vendor name Singolare and module name Cron (Singolare/Cron).
Important: the php code provided won't work correctly with the api key provided because it is sensitive information that will be provided with an NDA.