This section provides a comprehensive guide for integrating Console Connect Pricing - Ports and Layer 2 Connection API which accepts an array of port
configuration or an array of connection
configuration.
The following requirements must be met to perform the provided code samples.
Below is an example execution of API to filter and return a list Data Center Facilities with details, it accepts criteria(optional
), page, and page size query parameters.
curl -X GET "https://api.consoleconnect.com/v2/data-center-facility/search?criteria={}&page=1&pageSize=10"`\
-H "Authorization: Bearer <API_KEY>"
[{
"company": {
"privacy": {
"network": {
"mode": "PUBLIC",
"blackListIds": [],
"whiteListIds": []
},
"community": {
"mode": "PUBLIC",
"blackListIds": [],
"whiteListIds": []
}
},
"addresses": [
{
"registered": false,
"address": "",
"city": "Hong Kong",
"state": "",
"zip": "zipcode",
"country": "HK",
"email": null,
"phone": null,
"geo": {
"type": "Point",
"coordinates": []
}
}
],
"parentIds": [],
"regionalInternetRegistry": [],
"businessRegistrationCertVerified": "UNVERIFIED",
"website": "http://www.company.com1",
"emailDomains": [],
"industry": "",
"businessDevelopmentManagerTypePreference": "UNSPECIFIED",
"isIoTDemoCompany": false
},
"username": "DCF_COMPANY_USERNAME",
"name": "SAMPLE-DCF-NAME",
"tags": [
"offnet",
"monthly-ports"
],
"dataCenterFacility": {
"airportCodes": [],
"speeds": [],
"metroId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"ready": true,
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"nniReady": true,
"brandId": null,
"canBundleCrossConnect": false
},
"stats": {
"members": 0,
"interconnections": 0,
"followers": 5,
"following": 0,
"privateArticles": 0,
"privateEvents": 0,
"privatePosts": 0,
"articles": 0,
"events": 0,
"posts": 0
},
"provider": [
"PCCWGLOBAL"
],
"selectiveQinQTunnelProvider": [],
"externalId": null,
"destinationPortOnly": false,
"verified": true,
"nnis": null,
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"bundleCrossConnectChargeId": null,
"deletedAt": null,
"createdAt": "2018-02-20T04:49:09.604Z",
"updatedAt": "2024-07-10T04:22:15.894Z",
"products": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"companyId": null,
"dataCenterFacilityId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"slug": null,
"status": "PUBLISHED",
"transactionType": "ENQUIRE",
"productType": "Data centers",
"promoted": true,
"name": "Sample Product Name",
"headline": "Sample Headline",
"description": "Demo description",
"logo": null,
"overviewImage": null,
"background": null,
"categories": [
"Data Center"
],
"tags": null,
"promoTitle": "Sample Title",
"promoHeadline": "Sample Headline",
"callToActionLabel": "Order rack",
"callToActionLink": null,
"vendorUrl": null,
"hubspotFormId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"productFamilyId": null,
"isAddon": false,
"productCode": null,
"created_at": "2021-02-16T04:18:06.026Z",
"updated_at": "2021-05-19T06:43:38.193Z"
}
],
"isFollowing": false
}]
Info
Take note of the DCF ID (
[0].id
).
This section is a detailed guideline for calculating Ports with different payload configuration.
This sample calculates a single port with 20 Mbps bandwidth for 1 month duration.
curl -X POST https://api.consoleconnect.com/api/pricing/calculate`\
-H "Authorization: Bearer <API_KEY>"
--data-raw '{
"ports": [
{
"dcf: "xxxxxxxxxxxxxxxxxxxxxxxx",
"speed": 1000,
"duration": "y"
}
]
}'
{
"results": [
{
"type": "PORT",
"entity": {
"dcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company A",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"speed": 1000,
"discountId": "",
"durationUnit": "y"
},
"price": 300,
"preAuthAmount": 300,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": null,
"basicMonthlyAmount": null,
"priceCalculatorAttributes": {
"discountIds": [],
"discounts": []
}
}
]
}
This sample calculates a single port with 1000 Mbps bandwidth for 1 month duration and with a cross-connect add-on.
curl -X POST https://api.consoleconnect.com/api/pricing/calculate`\
-H "Authorization: Bearer <API_KEY>"
--data-raw '{
"ports": [
{
"dcf": "xxxxxxxxxxxxxxxxxxxxxxxx",
"speed": 1000,
"durationUnit": "y"
}
],
"includeCrossConnect": true
}'
{
"results": [
{
"type": "PORT",
"entity": {
"dcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company A",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"speed": 1000,
"discountId": "",
"durationUnit": "y"
},
"price": 300,
"preAuthAmount": 300,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": null,
"basicMonthlyAmount": null,
"priceCalculatorAttributes": {
"discountIds": [],
"discounts": []
},
"crossConnectAmount": 65
}
]
}
This sample calculates a multiple ports with different bandwidth configuration and duration
curl -X POST https://api.consoleconnect.com/api/pricing/calculate`\
-H "Authorization: Bearer <API_KEY>"
--data-raw '{
"ports": [
{
"dcf": "xxxxxxxxxxxxxxxxxxxxxxxx",
"speed": 10000,
"durationUnit": "y"
},
{
"dcf": "xxxxxxxxxxxxxxxxxxxxxxxx",
"speed": 1000,
"durationUnit": "m"
}
]
}'
{
"results": [
{
"type": "PORT",
"entity": {
"dcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company A",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"speed": 10000,
"discountId": "",
"durationUnit": "y"
},
"price": 400,
"preAuthAmount": 400,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": null,
"basicMonthlyAmount": null,
"priceCalculatorAttributes": {
"discountIds": [],
"discounts": []
}
},
{
"type": "PORT",
"entity": {
"dcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company B",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"speed": 1000,
"discountId": "",
"durationUnit": "m"
},
"price": 450,
"preAuthAmount": 450,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": null,
"basicMonthlyAmount": null
}
]
}
This section is a detailed guideline for calculating Ports with different payload configuration.
This sample calculates a single connection with 20 Mbps bandwidth for 1 month duration.
curl -X POST https://api.consoleconnect.com/api/pricing/calculate`\
-H "Authorization: Bearer <API_KEY>"
--data-raw '{
"connections": [
{
"bandwidth": 20,
"classOfService": "SILVER",
"duration": {
"value": 1,
"unit": "m"
},
"srcDcf": "xxxxxxxxxxxxxxxxxxxxxxxx",
"destDcf": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
]
}'
{
"results": [
{
"type": "CONNECTION",
"entity": {
"srcDcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company A",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"destDcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company B",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"duration": {
"from": null,
"to": null,
"unit": "m",
"value": 1
},
"bandwidth": 20,
"classOfService": "SILVER",
"discountId": ""
},
"price": 80,
"preAuthAmount": 80,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": 80,
"basicMonthlyAmount": 80,
"formula": "(bandwidthCost*multiplier)*duration/(1-margin)+portFee",
"factors": [
{
"name": "margin",
"number": 0,
"ref": null
},
{
"name": "portFee",
"number": 0,
"ref": null
},
{
"name": "nniFee",
"number": 0,
"ref": null
},
{
"name": "bandwidthCost",
"number": 80,
"ref": {
"from": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "EUROPE/UK",
"regionIds": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
]
},
"to": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "EUROPE/UK",
"regionIds": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
]
},
"price": {
"price": 1.75,
"bandwidth": {
"from": 1,
"to": 100
},
"cos": "SILVER"
}
}
},
{
"name": "multiplier",
"number": 1,
"ref": null
},
{
"name": "duration",
"number": 1,
"ref": null
}
],
"priceCalculatorAttributes": {
"discountIds": [],
"discounts": []
}
}
]
}
This sample calculates multiple connections with different configuration.
curl -X POST https://api.consoleconnect.com/api/pricing/calculate`\
-H "Authorization: Bearer <API_KEY>"
--data-raw '{
"connections": [
"bandwidth": 20,
"classOfService": "SILVER",
"duration": {
"value": 1,
"unit": "w"
},
"srcDcf": "xxxxxxxxxxxxxxxxxxxxxxxx",
"destDcf": "xxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"bandwidth": 20,
"classOfService": "SILVER",
"duration": {
"value": 1,
"unit": "m"
},
"srcDcf": "xxxxxxxxxxxxxxxxxxxxxxxx",
"destDcf": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
]
}'
{
"results": [
{
"type": "CONNECTION",
"entity": {
"srcDcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company A",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"destDcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company B",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"duration": {
"from": null,
"to": null,
"unit": "w",
"value": 1
},
"bandwidth": 20,
"classOfService": "SILVER",
"discountId": ""
},
"price": 28.8,
"preAuthAmount": 28.8,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": 28.8,
"basicMonthlyAmount": 28.8,
"formula": "(bandwidthCost*multiplier)*duration/(1-margin)+portFee",
"factors": [
{
"name": "margin",
"number": 0,
"ref": null
},
{
"name": "portFee",
"number": 0,
"ref": null
},
{
"name": "nniFee",
"number": 0,
"ref": null
},
{
"name": "bandwidthCost",
"number": 80,
"ref": {
"from": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "EUROPE/UK",
"regionIds": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
]
},
"to": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "EUROPE/UK",
"regionIds": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
]
},
"price": {
"price": 1.75,
"bandwidth": {
"from": 1,
"to": 100
},
"cos": "SILVER"
}
}
},
{
"name": "multiplier",
"number": 0.36,
"ref": null
},
{
"name": "duration",
"number": 1,
"ref": null
}
],
"priceCalculatorAttributes": {
"discountIds": [],
"discounts": []
}
},
{
"type": "CONNECTION",
"entity": {
"srcDcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company A",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"destDcf": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "Company B",
"popId": null,
"regionIds": null,
"metroIds": null,
"tags": null
},
"duration": {
"from": null,
"to": null,
"unit": "m",
"value": 1
},
"bandwidth": 20,
"classOfService": "SILVER",
"discountId": ""
},
"price": 80,
"preAuthAmount": 80,
"amountSaved": null,
"amountSavedTotal": null,
"basicTotalAmount": 80,
"basicMonthlyAmount": 80,
"formula": "(bandwidthCost*multiplier)*duration/(1-margin)+portFee",
"factors": [
{
"name": "margin",
"number": 0,
"ref": null
},
{
"name": "portFee",
"number": 0,
"ref": null
},
{
"name": "nniFee",
"number": 0,
"ref": null
},
{
"name": "bandwidthCost",
"number": 80,
"ref": {
"from": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "EUROPE/UK",
"regionIds": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
]
},
"to": {
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "EUROPE/UK",
"regionIds": [
"xxxxxxxxxxxxxxxxxxxxxxxx"
]
},
"price": {
"price": 1.75,
"bandwidth": {
"from": 1,
"to": 100
},
"cos": "SILVER"
}
}
},
{
"name": "multiplier",
"number": 1,
"ref": null
},
{
"name": "duration",
"number": 1,
"ref": null
}
]
}
]
}