How to use variable in Request URI but not send it with?

Say you want to use the ${sku} in the request uri
“/rest/V1/products/&{sku}/media”.
But not have the sku key present in your payload.
Or you want to remove all but certain data from your payload.

How do you do it?

Answer

You can do this by defining ‘requestBody’ in you payload.
All data within the ‘requestBody’ will be sent with the request.
All data outside of it will not be sent.

{
   "sku": "foo",
   "requestBody": "some other data"
}

Take for example this transformer:

It will copy all input data into ‘requestBody’ and add a ‘sku’ key.

Then use the &{requestBody} placeholder in the request parameters instead of the default &{@}.

In the outgoing configuration, the ‘&{sku}’ can be used and only the data within ‘requestBody’ will be sent.

Search terms: only send specific data

1 Like

The answer is in the topic