I take all the products into storage. Now from there I need to import the product on system B with optional variants and options, where both of those are separate endpoints in the API on system B.
Incoming from A to Storage: All products, no filter
Outgoing: Child and simple products
a. transformP + Create OR update product
b. (if parentId) transformV + create OR update product variant (variant-endpoints)
c. (if options) transformO + Create OR Update product options (option-endpoints)
Would that be possible (and how) or is it better to make 3 different routes for it (all based on the same incoming data).
PS since b. and c. are related to a. in the database through ID’s, I need to have the products in first, and only then the variants and/or options can be imported.