# DescribeDataCenterPortPrice

## 1. API Description

This API is used to query available port types and corresponding price.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="182.7219152854512">Parameter Name</th><th width="105">Required</th><th width="102">Type</th><th>Description</th></tr></thead><tbody><tr><td>dcId</td><td>Yes</td><td>String</td><td><p>Code of data center.</p><p>To obtain code, you can call <a href="../common/describedatacenters"><code>DescribeDataCenters</code></a>, and find <code>dcId</code> in the response.</p></td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="186.33333333333331">Parameter Name</th><th width="172">Type</th><th>Description</th></tr></thead><tbody><tr><td>requestId</td><td>String</td><td>The unique request ID, which is returned for each request. RequestId is required for locating a problem.</td></tr><tr><td>portPriceSet</td><td>Array of <a href="../../datastructure#portprice">PortPrice</a></td><td>Price information of ports.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query available port types and corresponding price in** `SIN1`**.**

```json
POST /api/v2/sdn HTTP/1.1
Host: console.zenlayer.com
Content-Type: application/json
X-ZC-Action: DescribeDataCenterPortType
<Common Request Params>

Request: {
    "dcId": "SIN1"
}

Response: {
    "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
    "response": {
        "requestId": "TEEFDCA5B-76FB-4E91-A18E-DF7F5D2CE41F",
        "portTypeSet": [{
            "portType":"1G",
            "dcId":"SIN1",
            "portDailyPrice":0.0,
            "portMonthlyPrice":0.0
        }, {
            "portType":"10G",
            "dcId":"SIN1",
            "portDailyPrice":0.0,
            "portMonthlyPrice":0.0
        }, , {
            "portType":"40G",
            "dcId":"SIN1",
            "portDailyPrice":0.0,
            "portMonthlyPrice":0.0
        }]
    }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

Zenlayer Cloud API 2.0 integrates [SDKs](https://docs.console.zenlayer.com/api-reference/api-introduction/toolkit/api-sdk) to make it easier for you to call APIs. More programming languages will be supported.

## 6. Error Codes

No error codes related to the API business logic. For other error codes, see [Common Error Codes](https://docs.console.zenlayer.com/api-reference/api-introduction/instruction/commonerrorcode).​
