SIGN IN / UP
    opened image

    To work with Cloud VPS services via API, Zomro provides a convenient interface for obtaining information about available plans. Using the function v2.instances.order.pricelist, you can get a complete list of plans with brief descriptions and prices. Then, using the function v2.instances.order.param with the specified plan ID and order period, you can get detailed characteristics of the selected plan. Below are examples of requests and the response structure for each function. This information will help you effectively manage your cloud servers through the Zomro API.

    To get all available plans for the Cloud VPS service, you can use the following function:

    v2.instances.order.pricelist

     

    Request structure:
    URL: 

    https://api.zomro.com/

    Request method: POST
    Request body (form-data):

     

    Parameter Example value Value description
    func v2.instances.order.pricelist Function to get available plans for order
    auth 21fc199...c43f71 Session token. This is one of the authorization options. More about other options is described here
    out json Expected response structure

     

    Here is an example of a request that can be executed from the console:

    curl --location 'https://api.zomro.com/' \
    --form 'func="v2.instances.order.pricelist"' \
    --form 'auth="19c8130ac494a5e7c162d246"' \
    --form 'out="json"'

     

    After executing the request, we need the data located in the following nesting:
     

    doc.list.elem

     

    Here is an example of one of the elements we get:
     

    ...,
    {
    "buttons": {
        "button": {
            "$name": "order",
            "$type": "func",
            "$key": "pricelist",
            "$theme": "primary",
            "$func": "v2.instances.order.param"
        }
    },
    "description": {},
    "detail": [
        {
            "name": {
                "$": "network"
            },
            "value": {
                "$": "IPv4 NL-2"
            }
        },
        {
            "name": {
                "$": "CPU count"
            },
            "value": {
                "$": "1"
            }
        },
        {
            "name": {
                "$": "Memory"
            },
            "value": {
                "$": "2 Gb"
            }
        },
        {
            "name": {
                "$": "Disk space"
            },
            "value": {
                "$": "12 Gb"
            }
        },
        {
            "name": {
                "$": "Port speed"
            },
            "value": {
                "$": "1 Gbit/s."
            }
        },
        {
            "name": {
                "$": "Bandwidth"
            },
            "value": {
                "$": "Unmetered traffic"
            }
        }
    ],
    "flabel": {
        "tag": [
            {
                "$": "72866a3690e44679070d48b8ffa2c963"
            },
            {
                "$": "a362f6fd19c99d07441692bf4cce537c"
            }
        ]
    },
    "id": {
        "$": "6740"
    },
    "pricelist": {
        "$": "6740"
    },
    "prices": {
        "$key": "period_6740",
        "price": {
            "$special_price": "no",
            "cost": {
                "$": "0.13"
            },
            "currency": {
                "$": "EUR"
            },
            "period": {
                "$": "-50"
            }
        }
    },
    "title": {
        "$": "Cloud Essential"
    }
    },
    ...

     

    With this data, you can find out the plan ID. In our case, the value is "6740", and brief information about the plan. To get full details about the plan, you need to use the function: 

    v2.instances.order.param

    and the plan ID and order period. 

     

    Request structure:

    URL: 

    https://api.zomro.com/

    Request method: POST
    Request body (form-data):

    Parameter Example value Value description
    func v2.instances.order.param Function to get additional data about the plan
    auth 21fc199...c43f71 Session token. This is one of the authorization options. More about other options is described here
    out json Expected response structure
    order_period -50 The period for which the service can be ordered
    pricelist 6740 ID of the service to be ordered

    Here is an example of a request that can be executed from the console:

    curl --location 'https://api.zomro.com/' \
    --form 'func="v2.instances.order.param"' \
    --form 'auth="579ea10f7790f5e7de91357c"' \
    --form 'out="json"' \
    --form 'order_period="-50"' \
    --form 'pricelist="6740"'

    After executing the request, we need the data located in the following nesting:

    doc.slist

    Here are the values obtained as a result of the request:

    {
    "$name": "instances_os",
    "val": [
        {
            "$key": "18d0ee2e-4d57-4f40-9b56-03c1773b5831",
            "$": "AlmaLinux 8"
        },
        {
            "$key": "5da4ad83-45f6-4c0e-9a7e-7a7c18b2be6c",
            "$": "AlmaLinux 9"
        },
        {
            "$key": "3d9d9db6-325a-4d91-9bdb-6c48ad291cb6",
            "$": "CentOS Stream 8"
        },
        {
            "$key": "7d7911e3-7178-4f36-a308-d841db5fe654",
            "$": "CentOS Stream 9"
        },
        {
            "$key": "0bf4deb2-855c-4863-8518-6006d804adbb",
            "$": "Debian 10"
        },
        {
            "$key": "3010ae60-0185-4021-98da-f50013147ebd",
            "$": "Debian 11"
        },
        {
            "$key": "93878ba5-6b9e-4924-a4be-34edb623f808",
            "$": "Debian 12"
        },
        {
            "$key": "1d9dda4c-34b0-4304-a90a-8f3018722fa2",
            "$": "Rocky-Linux-8"
        },
        {
            "$key": "a8b7bcb3-6698-4264-b413-f2b866a46a70",
            "$": "Rocky-Linux-9"
        },
        {
            "$key": "479c96f1-ccc6-47a2-952c-c9e3bbdc8d07",
            "$": "Ubuntu 20.04"
        },
        {
            "$key": "f8f2573f-56c4-44c5-8469-84eee4aa64e7",
            "$": "Ubuntu 22.04"
        },
        {
            "$key": "92fabac2-69cc-46ad-8439-c377e0c90632",
            "$": "Ubuntu 23.04"
        },
        {
            "$key": "6f8476f9-93f0-4ddd-b0fd-624e930ffacd",
            "$": "Ubuntu 23.10"
        }
    ]
    },
    {
    "$name": "addon_6746",
    "val": [
        {
            "$key": "259",
            "$": "IPv4 NL-2 (0.04 EUR)"
        },
        {
            "$key": "260",
            "$": "IPv6 NL-2 (0.00 EUR)"
        }
    ]
    },
    {
    "$name": "addon_6745",
    "val": [
        {
            "$key": "58",
            "$": "1 (0.00 EUR)"
        }
    ]
    },
    {
    "$name": "addon_6744",
    "val": [
        {
            "$key": "42",
            "$": "2 Gb (0.00 EUR)"
        }
    ]
    },
    {
    "$name": "addon_6743",
    "val": [
        {
            "$key": "143",
            "$": "12 Gb (0.00 EUR)"
        }
    ]
    },
    {
    "$name": "addon_6742",
    "val": [
        {
            "$key": "246",
            "$": "1 Gbit/s. (0.00 EUR)"
        }
    ]
    },
    {
    "$name": "addon_6741",
    "val": [
        {
            "$key": "244",
            "$": "Unmetered traffic (0.00 EUR)"
        }
    ]
    },
    {
    "$name": "order_period",
    "val": [
        {
            "$msg": "yes",
            "$key": "-50",
            "$": "Day"
        }
    ]
    },
    {
    "$name": "instances_ssh_keys",
    "val": [
        {
            "$key": "283",
            "$": "new"
        },
        {
            "$key": "471",
            "$": "111"
        },
        {
            "$key": "490",
            "$": "1115"
        }
    ]
    }

     

    This entry provides the following data:

     

    Parameter name Parameter description
    instances_os Possible OS that are available for installation for this plan
    addon_6746 Which type of IP to use. If you choose only IPv6, IPv4 will not be issued for the server. In the case of IPv4, both IPv6 and IPv4 will be issued. The cost of the service will increase accordingly.
    addon_6745 Number of CPUs available for order
    addon_6744 Amount of RAM available for order
    addon_6743 Disk space size on the server
    addon_6742 Internet traffic speed on the server
    addon_6741 Internet traffic limit on the server
    order_period Available service payment periods
    instances_ssh_keys SSH keys added in the personal account

    Using these parameters, you can use them to order the service. 


    We also suggest studying articles that may be useful for interacting with Cloud VPS products using the API: