I'm trying to order a 250 Gb 3000 IOPS encrypted block storage. Using request:
{"parameters": [{
"complexType":"SoftLayer_Container_Product_Order_Network_Storage_AsAService",
"packageId": 759,
"location": 957095,
"quantity": 1,
"iops":3000,
"prices": [
{ "id": 189439},
{ "id": 196039},
{"id": 196099},
{"id":189939}],
"volumeSize": 250,
"osFormatType":{
"id":24,
"keyName":"WINDOWS_2008"
}
}
]}
The error returned from verify order is:
{
"error": "Undefined storage type",
"code": "SoftLayer_Exception_Public"
}
Is there a mismatch with the items I've chosen? or with something else in the order?
The error was in the item’s prices.
Here is an example, how to place a block storage order by rest api.
Method: POST
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Order/verifyOrder
Body: Json
{
• This is the categoryCode and description for the item’s prices:
"id": 189433 (categoryCode: storage_as_a_service, "description": "Storage as a Service")
"id": 189443 (categoryCode: storage_block, "description": "Block Storage")
"id": 189833 (categoryCode: performance_storage_space, “description": "100 - 499 GBs")
"id": 189893 (categoryCode: performance_storage_iops, "description": "100 - 6000 IOPS")
• You can find the ids of the item’s prices, searching in this rest api by “description” values:
Method: GET
https://[username]:[apiKey]@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/759/getItemPrices?objectMask=mask[id,locationGroupId,item[id,keyName,description],pricingLocationGroup[locations[id,name,longName]]]
e.g "description": "Storage as a Service"
{
e.g “description": "100 - 499 GBs" you will find same options, but you have to choose depend of the Location that you want.
For my example I chose “Amsterdam 1” and the “id” will be "id": 189833
{
It is the same for the rest of the item’s prices.