Dynamically spawning actors with coordinates: Convert R-hand XYZ (y-up) to L-hand XZY (Z-up)

Hello, I’m currently developing an application for which I will need to be able to spawn some actors using coordinates received from an API call. These coordinates are written in a Right-hand XYZ (y-up) coordinate system and are used by another application so they can’t be changed to a different system. Unreal Engine uses a Left-hand XZY (Z-up) coordinate system, so when spawning the actors by using the given coordinates, the positions and orientations are messed up. This is an example of the API response:

“camera-actors”: [
{
“position”: {
“y”: 1.4,
“x”: 2.26,
“z”: -0.45
},
“rotation”: {
“y”: -1.41,
“x”: 0,
“z”: 0
}
},
{
“position”: {
“y”: 2.03,
“x”: -2.1,
“z”: -0.73
},
“rotation”: {
“y”: 1.34,
“x”: 0,
“z”: 0
}
} ]

I am parsing these coordinates and storing them in variables in another section of my code, and then scaling them accordingly (cm to meters, radians to degrees) and spawning an actor on that location in the scene, with the following blueprint code:

As a result I have the problem I mentioned above. I tried swapping around x,y,z values but it didn’t work, and also I’ve been told that this would cause other problems. The best way to do it as far as I know is with a conversion Matrix. But I cannot figure out how to create a matrix with these coordinates nor how to apply the conversion so that I can have the correct transformation. I would greatly appreciate it if someone can help with this. Thank you!