Loading...
 

Create Pricing Profile


HTTP VerbPOST
URI Template/account/{accID}/pricingprofile/virtual
MIME Typeapplication/vnd.pncp.v.1.0+json onwards
Normal HTTP Response Code200 OK
DescriptionCreates a new pricing profile within an account. Note that the new pricing profile has to match the current assigned profile
Can be invoked byResellers can invoke this for their own account as well as any other account they own. End-clients cannot place this request.
Response ModeSynchronous.

Sample Request

Note: The JSON body of the example response has been trimmed to improve readability.

POST /pncp-external-api-rest/account/88/pricingprofile/virtual HTTP/1.1
Accept: application/vnd.pncp.v.5.0+json
Authorization: PNCP SmBJLJKF31FftzxwBGrGaAHZp7JGmv9kDMoKHZ2/LS4=
Content-Type: application/vnd.pncp.v.5.0+json
Content-Length: 5332
User-Agent: Jakarta Commons-HttpClient/3.1
Host: YOUR_API_URL

{
   "pricingProfileName":"TestPP440013bf",
   "nodePricingDetails":[
      {
         "nodeResource":{
            "resourceURL":"/node/1"
         },
         "pricePoints":[
            {
               "price":2.7,
               "pricePointResource":{
                  "resourceURL":"/pricepoint/0x1x2x2x3x14"
               }
            },

…

            {
               "price":1.1,
               "pricePointResource":{
                  "resourceURL":"/pricepoint/0x1x2x1x3x512"
               }
            },
            {
               "price":1.0,
               "pricePointResource":{
                  "resourceURL":"/pricepoint/0x1x107x1"
               }
            },
         ]
      }
   ]
}

Sample Response

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Cache-Control: no-store
Content-Type: application/vnd.pncp.v.5.0+json
Transfer-Encoding: chunked
Date: Fri, 03 Feb 2012 10:13:46 GMT

{
   "resourceURL":"/pricingprofile/50/virtual "
}

Field Info

Field Name
Required
pricingProfileName
YES
[nodePricingDetails]
YES
[nodePricingDetails].nodeResource
YES
[nodePricingDetails].pricePoints
YES
[pricePoints].price
YES
[pricePoints].pricePointResource
YES