> 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/networking/sdn/private-connect/inquirycreateprivateconnectprice.md).

# InquiryCreatePrivateConnectPrice

## 1. API Description

This API (InquiryCreatePrivateConnectPrice) 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                                                                                                 |
| --------------- | -------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| endpointA       | Yes      | [CreateEndpointParam](/api-reference/networking/sdn/datastructure.md#createendpointparam) | Endpoint A of the Private Connect.                                                                          |
| endpointZ       | Yes      | [CreateEndpointParam](/api-reference/networking/sdn/datastructure.md#createendpointparam) | Endpoint Z of the Private Connect.                                                                          |
| bandwidthMbps   | No       | Integer                                                                                   | <p>Maximum bandwidth limit for the Private Connect. Default: 1, unit: Mbps.</p><p>Value range: \[10, +)</p> |
| internetType    | No       | [InternetType](/api-reference/networking/sdn/datastructure.md#internettype)               | <p>Internet billing type.</p><p>Default value: ByBandwidth</p>                                              |
| commitBandwidth | No       | Integer                                                                                   | <p>Committed bandwidth, in Mbps.</p><p>Value range: \[1, +)</p>                                             |

## 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> |
| privateConnectPrice     | [PriceItem](/api-reference/networking/sdn/datastructure.md#priceitem) | Bandwidth price of the Private Connect.                                                                               |
| privateConnectBandwidth | Integer                                                               | Bandwidth of the Private Connect.                                                                                     |
| endpointAPrice          | [PriceItem](/api-reference/networking/sdn/datastructure.md#priceitem) | Construction price of Endpoint A.                                                                                     |
| endpointABandwidth      | Integer                                                               | Bandwidth of Endpoint A.                                                                                              |
| endpointZPrice          | [PriceItem](/api-reference/networking/sdn/datastructure.md#priceitem) | Construction price of Endpoint Z.                                                                                     |
| endpointZBandwidth      | Integer                                                               | Bandwidth of Endpoint Z.                                                                                              |

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**1. Inquire the price for a Private Connect (both Endpoint A and Endpoint Z are ports), with the default bandwidth of 1 Mbps.**

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

Request:
{
    "endpointA": {
        "portId": "your-port-Id"
    }
    "endpointZ": {
        "portId": "your-port-Id-2"
    }
}

Response:
{   
  "requestId": "TDB181167-C39F-4C3E-8E88-B8FDE755FDC0",
  "response": {
    "requestId":"TDB181167-C39F-4C3E-8E88-B8FDE755FDC0",
    "privateConnectPrice":        {
            "unitPrice":1.65,
            "originalPrice":null,
            "discountPrice":null,
            "discount":100,
            "stepPrices":null,
            "discountUnitPrice":1.65,
            "chargeUnit":"DAY"
        }
  }
}
```

{% 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                                                      |
| ---------------- | ----------------------------- | ---------------------------------------------------------------- |
| 400              | INVALID\_GOOGLE\_PAIRING\_KEY | Invalid Google pairing key.                                      |
| 404              | INVALID\_PORT\_NOT\_FOUND     | The port does not exist.                                         |
| 400              | INVALID\_PORT\_STATUS         | Invalid port status.                                             |
| 400              | INVALID\_ENDPOINT\_PARAMETER  | Unable to determine the endpoint type from the given parameters. |
