Reputation: 33
I have multiple accounts in SoftLayer and I'm ordering hardware using "placeOrder()" function from the API. The problem is that, even though that I'm using different credentials to connect to SoftLayer, it seems that the hardware is ordered always to the default account.
So there must be a place in the order JSON blob where the "accountId" can be specified. I have tried it on each element of the "hardware" field (as I saw that "verifyOrder()" returned it empty). But it didn't work. I can't find any documentation about this. Is there any way to specify the account ID where I want to order hardware? Thanks!
Upvotes: 1
Views: 66
Reputation: 1104
No, there is not way to specify the account id, you must to use an userName and apiKey of each account.
Account A:
- userName: A889_userA
- apiKey: 4S5DF46S5DFS656SF......
Account B:
- userName: B898_userB
- apiKey: 2S16WE5RT4S32DF1......
So if you send a placeOrder request by using the user account A889_userA the created hardware should be listed in the "Account A".
https://A889_userA:[email protected]/rest/v3/SoftLayer_Product_Order/placeOrder
The same idea when using credentials of user B898_userB in account B
https://B898_userB:[email protected]/rest/v3/SoftLayer_Product_Order/placeOrder
Upvotes: 1