# InquiryCreatePrivateConnectPrice

## 1. API Description

This API is used to query the price of creating a Layer 2 private connect.

## 2. Input Parameters

The following request parameter list only provides API request parameters.

<table><thead><tr><th width="198.98840579710148">Parameter Name</th><th width="112">Required</th><th width="151">Type</th><th>Description</th></tr></thead><tbody><tr><td>endpointA</td><td>Yes</td><td><a href="/pages/QGlc5uBFvAM7iixepjmI#createendpointparam">CreateEndpointInfoParam</a></td><td>One access point (A) of the private connect.</td></tr><tr><td>endpointZ</td><td>Yes</td><td><a href="/pages/QGlc5uBFvAM7iixepjmI#createendpointparam">CreateEndpointInfoParam</a></td><td>The other access point (Z) of the private connect.</td></tr><tr><td>bandwidthMbps</td><td>No</td><td>Integer</td><td><p>Maximum bandwidth cap of the private connect.<br>Default value: 1</p><p>Unit: Mbps</p></td></tr></tbody></table>

## 3. Output Parameters

<table><thead><tr><th width="228.33333333333331">Parameter Name</th><th width="112">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>privateConnectPrice</td><td><a href="/pages/QGlc5uBFvAM7iixepjmI#price">Price</a></td><td>Price of a Layer 2 private connect.</td></tr></tbody></table>

## 4. Code Example

{% tabs %}
{% tab title="Example" %}
**Query the price of a Layer 2 private connect with ports in the connection. The bandwidth is 1 Mbps by default.**

```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 Code

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.console.zenlayer.com/api-reference/networking/sdn/private-connect/inquirycreateprivateconnectprice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
