HTTP subscriber: can we Create or update on more than one endpoint in one go

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.

  1. Incoming from A to Storage: All products, no filter

  2. 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.

Hi @kjetil,

Yes, you can go to more than one endpoint in one go by using the HTTP transformer in your transformer.
You can also create your configuration based on the conditions in the field. Like if field “transformV” has a specific value, then do something like send the data to some endpoints.

And which is better, creating three different routes or putting them all at one endpoint?
If we are talking about ease of maintenance, we recommend creating a separate route.
But if the actions of “B” and “C” need IDs that are provided by the output of “A”, you need to put them in the same route.

I hope it’s clear for you.