> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.megaport.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.megaport.ferndocs.com/_mcp/server.

# Get Product Price for Term Length (v4)

POST https://api.megaport.com/v4/pricebook/product/terms
Content-Type: application/json

Returns the pricing information of all available term lengths (available term discounts) for the Megaport service specified by the `productUid`.

When ordering services, customers can commit to a number of fixed term lengths. Fixed terms will offer discounted monthly pricing when compared to standard 'rack rates', with longer terms offering larger discounts.

You can return pricing for these services:

- Port
    
- VXC
    
- Megaport Internet
    
- MCR
    
- MVE
    

The request will be rejected if the product type is not supported.

The configurations of add-ons can be passed as part of the request Body and the add-on pricing will be included in the response.

The parameters are defined in the Body of the request:

- `productType` - The type of product for the pricing request. Valid values include: MEGAPORT, VXC, MCR2, MVE, IX, IP_ADDRESS (String).
    
- `currency` - The ISO 4217 currency code to use for pricing. For example, the US dollar is USD. If not provided, defaults to the existing product's currency. If the product is not specified, currency must be provided. For more information, see [Country Currency Codes](https://www.iban.com/currency-codes). (String)
    
- `LocationId` (Port/MCR/MVE) - The id of the location where the service will be deployed (Required - Integer).
    
- `Vendor` (MVE) - The provider name to use in the price calculations. For example, `Cisco` (String).
    
- `Size` (MVE) - The MVE size to use in price calculations. If both size and mveLabel are supplied, the endpoint will only accept mveLabel as the MVE size (String).
    
- `mveLabel` (MVE) - The size of the VM. The size defines the MVE specifications, including the number of cores, bandwidth, and number of connections (String).
    
- `aLocationId` (VXC) - The id of the A-End location of the VXC (Required - Integer).
    
- `bLocationId` - (VXC) - The id of the B-End location of the VXC (Required - Integer).
    
- `speed` - The service speed in Mbps (Integer).
    
- `aEndProductType` (VXC) - The product type of the A-End service of the VXC. Valid values include: MEGAPORT, VXC, MCR2, MVE, IX, IP_ADDRESS (String).
    
- `connectType` (VXC) - The connect type of the VXC, which is typically the same as the connect type of the B-End service. Valid values include: MVE, AMSIX, AWS (for Hosted VIF), AWSHC (for Hosted Connection), AZURE, GOOGLE, ORACLE, OUTSCALE, ALIBABA, and IBM. Use connectType=TRANSIT for Ports that support a Megaport Internet connection. Use connectType=FRANCEIX for Ports that you can create a VXC to in order to connect to France-IX (String).
    
- `productUid` - The unique identifier for the product (String).
    
- `term` - The contract term in months (Integer).
    
- `addOns` - List of add-on price book requests (Array).

Reference: https://en.megaport.ferndocs.com/api-reference/pricing/get-product-price-for-term-length-v-4

## Servers

- `https://api.megaport.com` (Production environment, default)
- `https://api-staging.megaport.com` (Staging environment (test only, reset every 24 hours))

## Request

### Query parameters

- `companyId` (string, optional) — The Id of the company that will own the product. If not provided, it will default to the authenticated user's company. This can be supplied with productUid to fetch the pricing of an existing product, but in the context of another company. (Optional - integer \<int32> >= 1)

### Body (application/json)

This endpoint expects an object.

- `currency` (string, optional)
- `locationId` (double, optional)
- `mveLabel` (string, optional)
- `productType` (string, optional)
- `productUid` (string, optional)
- `size` (string, optional)
- `term` (double, optional)
- `vendor` (string, optional)

## Response

### 200

Get Product Price for Term Length (v4) - Port / Get Product Price for Term Length (v4) - VXC / Get Product Price for Term Length (v4) - MCR / Get Product Price for Term Length (v4) - MVE / Get Product Price for Term Length (v4) - VXC / Get Product Price for Term Length (v4) - Port / Get Product Price for Term Length (v4) - MCR / Get Product Price for Term Length (v4) - MVE

- `data` (V4PricebookProductTermsPostResponsesContentApplicationJsonSchemaData, optional)
- `message` (string, optional)
- `terms` (string, optional)

## Types

### V4PricebookProductTermsPostResponsesContentApplicationJsonSchemaData

- `1` (V4PricebookProductTermsPostResponsesContentApplicationJsonSchemaData, optional)
- `12` (V4PricebookProductTermsPostResponsesContentApplicationJsonSchemaData, optional)
- `24` (V4PricebookProductTermsPostResponsesContentApplicationJsonSchemaData, optional)
- `36` (V4PricebookProductTermsPostResponsesContentApplicationJsonSchemaData, optional)

## Examples

### Get Product Price for Term Length (v4) - MCR

**Response**

```json
{
  "data": {
    "1": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 0,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 1063.64,
      "prices": [],
      "productType": "MCR2"
    },
    "12": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 177.27,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 886.37,
      "prices": [],
      "productType": "MCR2"
    },
    "24": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 221.59,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 842.05,
      "prices": [],
      "productType": "MCR2"
    },
    "36": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 265.91,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 797.73,
      "prices": [],
      "productType": "MCR2"
    }
  },
  "message": "Prices for all terms",
  "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy"
}
```

**SDK Code**

```python Get Product Price for Term Length (v4) - MCR
import requests

url = "https://api.megaport.com/v4/pricebook/product/terms"

response = requests.post(url)

print(response.json())
```

```javascript Get Product Price for Term Length (v4) - MCR
const url = 'https://api.megaport.com/v4/pricebook/product/terms';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Product Price for Term Length (v4) - MCR
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/v4/pricebook/product/terms"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Product Price for Term Length (v4) - MCR
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/v4/pricebook/product/terms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Get Product Price for Term Length (v4) - MCR
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.megaport.com/v4/pricebook/product/terms")
  .asString();
```

```php Get Product Price for Term Length (v4) - MCR
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.megaport.com/v4/pricebook/product/terms');

echo $response->getBody();
```

```csharp Get Product Price for Term Length (v4) - MCR
using RestSharp;

var client = new RestClient("https://api.megaport.com/v4/pricebook/product/terms");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Get Product Price for Term Length (v4) - MCR
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/v4/pricebook/product/terms")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Get Product Price for Term Length (v4) - MVE

**Response**

```json
{
  "data": {
    "1": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 0,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 3545.45454545455,
      "monthlyRate": 3545.45,
      "prices": [],
      "productType": "MVE"
    },
    "12": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 590.91,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 3545.45454545455,
      "monthlyRate": 2954.54,
      "prices": [],
      "productType": "MVE"
    },
    "24": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 738.63,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 3545.45454545455,
      "monthlyRate": 2806.82,
      "prices": [],
      "productType": "MVE"
    },
    "36": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 886.36,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 3545.45454545455,
      "monthlyRate": 2659.09,
      "prices": [],
      "productType": "MVE"
    }
  },
  "message": "Prices for all terms",
  "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy"
}
```

**SDK Code**

```python Get Product Price for Term Length (v4) - MVE
import requests

url = "https://api.megaport.com/v4/pricebook/product/terms"

response = requests.post(url)

print(response.json())
```

```javascript Get Product Price for Term Length (v4) - MVE
const url = 'https://api.megaport.com/v4/pricebook/product/terms';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Product Price for Term Length (v4) - MVE
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/v4/pricebook/product/terms"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Product Price for Term Length (v4) - MVE
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/v4/pricebook/product/terms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Get Product Price for Term Length (v4) - MVE
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.megaport.com/v4/pricebook/product/terms")
  .asString();
```

```php Get Product Price for Term Length (v4) - MVE
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.megaport.com/v4/pricebook/product/terms');

echo $response->getBody();
```

```csharp Get Product Price for Term Length (v4) - MVE
using RestSharp;

var client = new RestClient("https://api.megaport.com/v4/pricebook/product/terms");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Get Product Price for Term Length (v4) - MVE
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/v4/pricebook/product/terms")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Get Product Price for Term Length (v4) - Port

**Response**

```json
{
  "data": {
    "1": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 0,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.63636363636,
      "monthlyRate": 1063.64,
      "prices": [],
      "productType": "MEGAPORT"
    },
    "12": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 177.28,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.63636363636,
      "monthlyRate": 886.36,
      "prices": [],
      "productType": "MEGAPORT"
    },
    "24": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 221.59,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.63636363636,
      "monthlyRate": 842.05,
      "prices": [],
      "productType": "MEGAPORT"
    },
    "36": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 265.91,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.63636363636,
      "monthlyRate": 797.73,
      "prices": [],
      "productType": "MEGAPORT"
    }
  },
  "message": "Prices for all terms",
  "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy"
}
```

**SDK Code**

```python Get Product Price for Term Length (v4) - Port
import requests

url = "https://api.megaport.com/v4/pricebook/product/terms"

response = requests.post(url)

print(response.json())
```

```javascript Get Product Price for Term Length (v4) - Port
const url = 'https://api.megaport.com/v4/pricebook/product/terms';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Product Price for Term Length (v4) - Port
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/v4/pricebook/product/terms"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Product Price for Term Length (v4) - Port
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/v4/pricebook/product/terms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Get Product Price for Term Length (v4) - Port
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.megaport.com/v4/pricebook/product/terms")
  .asString();
```

```php Get Product Price for Term Length (v4) - Port
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.megaport.com/v4/pricebook/product/terms');

echo $response->getBody();
```

```csharp Get Product Price for Term Length (v4) - Port
using RestSharp;

var client = new RestClient("https://api.megaport.com/v4/pricebook/product/terms");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Get Product Price for Term Length (v4) - Port
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/v4/pricebook/product/terms")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Get Product Price for Term Length (v4) - VXC

**Response**

```json
{
  "data": {
    "1": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 0,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 9430.90909090909,
      "monthlyRate": 9430.91,
      "prices": [],
      "productType": "VXC"
    },
    "12": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 1571.82,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 9430.90909090909,
      "monthlyRate": 7859.09,
      "prices": [],
      "productType": "VXC"
    },
    "24": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 1964.77,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 9430.90909090909,
      "monthlyRate": 7466.14,
      "prices": [],
      "productType": "VXC"
    },
    "36": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 2357.73,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 9430.90909090909,
      "monthlyRate": 7073.18,
      "prices": [],
      "productType": "VXC"
    }
  },
  "message": "Prices for all terms",
  "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy"
}
```

**SDK Code**

```python Get Product Price for Term Length (v4) - VXC
import requests

url = "https://api.megaport.com/v4/pricebook/product/terms"

response = requests.post(url)

print(response.json())
```

```javascript Get Product Price for Term Length (v4) - VXC
const url = 'https://api.megaport.com/v4/pricebook/product/terms';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Product Price for Term Length (v4) - VXC
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/v4/pricebook/product/terms"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Product Price for Term Length (v4) - VXC
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/v4/pricebook/product/terms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java Get Product Price for Term Length (v4) - VXC
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.megaport.com/v4/pricebook/product/terms")
  .asString();
```

```php Get Product Price for Term Length (v4) - VXC
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.megaport.com/v4/pricebook/product/terms');

echo $response->getBody();
```

```csharp Get Product Price for Term Length (v4) - VXC
using RestSharp;

var client = new RestClient("https://api.megaport.com/v4/pricebook/product/terms");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift Get Product Price for Term Length (v4) - VXC
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/v4/pricebook/product/terms")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Get Product Price for Term Length (v4)

**Request**

```json
{
  "currency": "AUD",
  "locationId": 123,
  "mveLabel": "MVE 16/64",
  "productType": "MVE",
  "productUid": "8afe49da-e936-4e2d-a1dd-03e2c6525108",
  "size": "large",
  "term": 12,
  "vendor": "cisco"
}
```

**Response**

```json
{
  "data": {
    "1": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 0,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 1063.64,
      "prices": [],
      "productType": "MCR2"
    },
    "12": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 177.27,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 886.37,
      "prices": [],
      "productType": "MCR2"
    },
    "24": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 221.59,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 842.05,
      "prices": [],
      "productType": "MCR2"
    },
    "36": {
      "currency": "AUD",
      "discounts": [
        {
          "amount": 265.91,
          "discountDetails": {
            "code": null,
            "description": null,
            "mechanism": null,
            "percentageAmount": null
          },
          "discountReason": "TERM"
        }
      ],
      "monthlyRackRate": 1063.64,
      "monthlyRate": 797.73,
      "prices": [],
      "productType": "MCR2"
    }
  },
  "message": "Prices for all terms",
  "terms": "This data is subject to the Acceptable Use Policy https://www.megaport.com/legal/acceptable-use-policy"
}
```

**SDK Code**

```python Get Product Price for Term Length (v4)
import requests

url = "https://api.megaport.com/v4/pricebook/product/terms"

payload = {
    "currency": "AUD",
    "locationId": 123,
    "mveLabel": "MVE 16/64",
    "productType": "MVE",
    "productUid": "8afe49da-e936-4e2d-a1dd-03e2c6525108",
    "size": "large",
    "term": 12,
    "vendor": "cisco"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Get Product Price for Term Length (v4)
const url = 'https://api.megaport.com/v4/pricebook/product/terms';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"currency":"AUD","locationId":123,"mveLabel":"MVE 16/64","productType":"MVE","productUid":"8afe49da-e936-4e2d-a1dd-03e2c6525108","size":"large","term":12,"vendor":"cisco"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get Product Price for Term Length (v4)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.megaport.com/v4/pricebook/product/terms"

	payload := strings.NewReader("{\n  \"currency\": \"AUD\",\n  \"locationId\": 123,\n  \"mveLabel\": \"MVE 16/64\",\n  \"productType\": \"MVE\",\n  \"productUid\": \"8afe49da-e936-4e2d-a1dd-03e2c6525108\",\n  \"size\": \"large\",\n  \"term\": 12,\n  \"vendor\": \"cisco\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get Product Price for Term Length (v4)
require 'uri'
require 'net/http'

url = URI("https://api.megaport.com/v4/pricebook/product/terms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"currency\": \"AUD\",\n  \"locationId\": 123,\n  \"mveLabel\": \"MVE 16/64\",\n  \"productType\": \"MVE\",\n  \"productUid\": \"8afe49da-e936-4e2d-a1dd-03e2c6525108\",\n  \"size\": \"large\",\n  \"term\": 12,\n  \"vendor\": \"cisco\"\n}"

response = http.request(request)
puts response.read_body
```

```java Get Product Price for Term Length (v4)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.megaport.com/v4/pricebook/product/terms")
  .header("Content-Type", "application/json")
  .body("{\n  \"currency\": \"AUD\",\n  \"locationId\": 123,\n  \"mveLabel\": \"MVE 16/64\",\n  \"productType\": \"MVE\",\n  \"productUid\": \"8afe49da-e936-4e2d-a1dd-03e2c6525108\",\n  \"size\": \"large\",\n  \"term\": 12,\n  \"vendor\": \"cisco\"\n}")
  .asString();
```

```php Get Product Price for Term Length (v4)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.megaport.com/v4/pricebook/product/terms', [
  'body' => '{
  "currency": "AUD",
  "locationId": 123,
  "mveLabel": "MVE 16/64",
  "productType": "MVE",
  "productUid": "8afe49da-e936-4e2d-a1dd-03e2c6525108",
  "size": "large",
  "term": 12,
  "vendor": "cisco"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Get Product Price for Term Length (v4)
using RestSharp;

var client = new RestClient("https://api.megaport.com/v4/pricebook/product/terms");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"currency\": \"AUD\",\n  \"locationId\": 123,\n  \"mveLabel\": \"MVE 16/64\",\n  \"productType\": \"MVE\",\n  \"productUid\": \"8afe49da-e936-4e2d-a1dd-03e2c6525108\",\n  \"size\": \"large\",\n  \"term\": 12,\n  \"vendor\": \"cisco\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Get Product Price for Term Length (v4)
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "currency": "AUD",
  "locationId": 123,
  "mveLabel": "MVE 16/64",
  "productType": "MVE",
  "productUid": "8afe49da-e936-4e2d-a1dd-03e2c6525108",
  "size": "large",
  "term": 12,
  "vendor": "cisco"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.megaport.com/v4/pricebook/product/terms")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```