> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/api-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/api-reference/sdn/pricing/queryprivateconnectprice.md).

# QueryPrivateConnectPrice

## 1. API Description

This API (QueryPrivateConnectPrice) is used to inquiry Private Connect Price

## 2. Input Parameters

The following request parameter list only provides API request parameters.

| Parameter Name | Required | Type                                                                                         | Description                                                                                                                                |
| -------------- | -------- | -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| internetType   | Yes      | [InternetType](/api-reference/sdn/datastructure.md#internettype)                             | <p>Internet billing type.</p><p>Default: ByBandwidth.</p><p>Default value: ByBandwidth</p>                                                 |
| bandwidthMbps  | Yes      | Integer                                                                                      | <p>Maximum bandwidth limit for the Private Connect.</p><p>Default: 10, unit: Mbps.</p><p>Value range: \[10, +)</p><p>Default value: 10</p> |
| endpointA      | Yes      | [PrivateConnectEndpointInfo](/api-reference/sdn/datastructure.md#privateconnectendpointinfo) | Endpoint A information of the Private Connect.                                                                                             |
| endpointZ      | Yes      | [PrivateConnectEndpointInfo](/api-reference/sdn/datastructure.md#privateconnectendpointinfo) | Endpoint Z information of the Private Connect.                                                                                             |

## 3. Output Parameters

| Parameter Name | Type                                                                                           | Description                                                                                                           |
| -------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| requestId      | String                                                                                         | <p>The unique request ID, which is returned for each request.</p><p>RequestId is required for locating a problem.</p> |
| endpointAPrice | [PrivateConnectEndpointPrice](/api-reference/sdn/datastructure.md#privateconnectendpointprice) | Price information for Endpoint A of the Private Connect.                                                              |
| endpointZPrice | [PrivateConnectEndpointPrice](/api-reference/sdn/datastructure.md#privateconnectendpointprice) | Price information for Endpoint Z of the Private Connect.                                                              |
| price          | [PriceItem](/api-reference/sdn/datastructure.md#priceitem)                                     | Price information.                                                                                                    |
| stock          | Integer                                                                                        | Available stock quantity.                                                                                             |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Inquire the price for a Private Connect with a bandwidth of 10 Mbps, where Endpoint A is a data center port and Endpoint Z is a public cloud.**

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

Request:
{
    "internetType": "ByBandwidth",
    "bandwidthMbps": 50,
    "endpointA": {
        "dcId": "822b9bd9-44f0-4279-a64d-568f5bc4a77b",
        "portType": "10G",
        "buildCrossConnectWithAssisted": true
    },
    "endpointZ": {
        "cloudType": "AWS",
        "dcId": "AMS1",
        "bandwidthMbps": 50,
        "vlanId": 1000,
        "cloudRegionId": null
    }
}

Response:
{
    "requestId": "T746CA1D1-339E-4344-939F-E089ABD246B7",
    "response": {
        "price": {
            "unitPrice": 27.750000,
            "originalPrice": null,
            "discountPrice": null,
            "discount": 100,
            "stepPrices": null,
            "discountUnitPrice": 27.750000,
            "chargeUnit": "DAY",
            "amountUnit": null
        },
        "requestId": "T746CA1D1-339E-4344-939F-E089ABD246B7",
        "endpointAPrice": {
            "crossConnectOneTimeConstructionPrice": {
                "unitPrice": 500.000000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": null,
                "stepPrices": null,
                "discountUnitPrice": 500.000000,
                "chargeUnit": "MONTH",
                "amountUnit": null
            },
            "price": {
                "unitPrice": 0.550000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": 100,
                "stepPrices": null,
                "discountUnitPrice": 0.550000,
                "chargeUnit": "DAY",
                "amountUnit": null
            },
            "stock": 11,
            "crossConnectPrice": {
                "unitPrice": 15.000000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": 100,
                "stepPrices": null,
                "discountUnitPrice": 15.000000,
                "chargeUnit": "MONTH",
                "amountUnit": null
            }
        },
        "endpointZPrice": {
            "crossConnectOneTimeConstructionPrice": null,
            "price": {
                "unitPrice": 5.000000,
                "originalPrice": null,
                "discountPrice": null,
                "discount": 100,
                "stepPrices": null,
                "discountUnitPrice": 5.000000,
                "chargeUnit": "DAY",
                "amountUnit": null
            },
            "stock": null,
            "crossConnectPrice": null
        },
        "stock": 5000
    }
}
```

{% endtab %}
{% endtabs %}

## 5. Developer Resources

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

## 6. Error Codes

The following only lists the error codes related to the API business logic. For other error codes, see [Common Error Codes](/api-reference/api-introduction/instruction/commonerrorcode.md).

| HTTP Status Code | Error Code                              | Description                                            |
| ---------------- | --------------------------------------- | ------------------------------------------------------ |
| 404              | INVALID\_DATACENTER\_NOT\_FOUND         | The specified data center does not exist.              |
| 400              | INVALID\_PRIVATE\_CONNECT\_NOT\_SUPPORT | This Private Connect combination is not yet supported. |
