-2

I use the following json parameters to order a Baremetal server

`{
    "parameters": [
        {
            "location": "449494",
            "packageId": 257,
            "hardware": [
                {
                    "hostname": "BMtest1",
                    "domain": "domain.com",
                    "primaryBackendNetworkComponent": {
                        "networkVlanId": "1229225"
                    }
                }
            ],
            "prices": [
                {
                    "id": "49515"
                },
                {
                    "id": "50357"
                },
                {
                    "id": "49759"
                },
                {
                    "id": "876"
                },
                {
                    "id": "55"
                },
                {
                    "id": "57"
                },
                {
                    "id": "175791"
                },
                {
                    "id": "273"
                },
                {
                    "id": "21"
                },
                {
                    "id": "49495"
                },
                {
                    "id": "906"
                },
                {
                    "id": "418"
                },
                {
                    "id": "420"
                },
                {
                    "id": "58"
                }
            ]
        }
    ]
}`

the verifyOrder call is success and returns the details. But when I do place order it gives the following error: {"error":"A valid subnet id must be provided.","code":"SoftLayer_Exception_Public"}

How can I correct this error. Please let me know if some additional parameters are to be added.

yash nigam
  • 67
  • 4
  • I was able to make this work by adding the following json parameter `"hardware": [ { "hostname": "BMtest1", "domain": "domain.com", "primaryBackendNetworkComponent": { "networkVlanId": 1229225, "networkVlan": { "id": 1229225, "primarySubnetId": 1208347, "vlanNumber": 2072 } } } ],` – yash nigam Nov 14 '16 at 04:19
  • Something weird, but here a reference: [Create a SoftLayer virtual guest on a specific subnet](http://stackoverflow.com/questions/37592080/create-a-softlayer-virtual-guest-on-a-specific-subnet) – Ruber Cuellar Valenzuela Nov 14 '16 at 14:13

1 Answers1

0

You need to send the "1229225" without quotes:

"networkVlanId": 1229225

Try this:

{
    "parameters": [
        {
            "location": "449494",
            "packageId": 257,
            "hardware": [
                {
                    "hostname": "BMtest1",
                    "domain": "domain.com",
                    "primaryBackendNetworkComponent": {
                        "networkVlanId": 1229225
                    }
                }
            ],
            "prices": [
                {
                    "id": "49515"
                },
                {
                    "id": "50357"
                },
                {
                    "id": "49759"
                },
                {
                    "id": "876"
                },
                {
                    "id": "55"
                },
                {
                    "id": "57"
                },
                {
                    "id": "175791"
                },
                {
                    "id": "273"
                },
                {
                    "id": "21"
                },
                {
                    "id": "49495"
                },
                {
                    "id": "906"
                },
                {
                    "id": "418"
                },
                {
                    "id": "420"
                },
                {
                    "id": "58"
                }
            ]
        }
    ]
}`