Loading...
 

Modify Account


HTTP VerbPUT
URI Template/account/{accID}
MIME Typeapplication/vnd.pncp.v1.0+json
Normal HTTP Response Code200 OK
Invoked ByResellers can invoke this for their own account as well as any other account they own. End-clients can invoke this for their account only.
Response ModeSynchronous.

Sample Request

PUT /pncp-external-api-rest/account/99 HTTP/1.1
Accept: application/vnd.pncp.v.5.0+json
Authorization: PNCP CS2c7zO0AqJ+6QJl/YBjlC/GZUt1sEH33dVKy/uqfwU=
Content-Type: application/vnd.pncp.v.5.0+json
Content-Length: 332
User-Agent: Jakarta Commons-HttpClient/3.1
Host: YOUR_API_URL

{
   "name":"MyNewResellerName",
   "description":"This is a different description for my new reseller.",
   "email":"mail@mynewreseller.com",
   "adminUrl":"http://www.admin.mynewreseller.com/login",
   "reportBugEmail":"bugs@mynewreseller.com",
   "clientAssignedId":"345",
   "permissions":{  
      "reseller":true,
      "virtual":true,
      "bareMetal":false
   }
}

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: Wed, 25 Jan 2012 16:56:28 GMT

{
   "name":"My New Reseller Name",
   "description":"This is a different description for my new reseller.",
   "signUpDate":"2012/01/18 12:24:16",
   "email":"mail@mynewreseller.com",
   "adminUrl":"http://www.admin.mynewreseller.com/login",
   "reportBugEmail":"bugs@mynewreseller.com",
   "clientAssignedId":"MyNewResellerID",
   "accountResource":{
      "resourceURL":"/account/99"
   },
   "parentAccountResource":{
      "resourceURL":"/account/88"
   },
   "primaryContactResource":{
      "resourceURL":"account/99/primaryContact"
   },
   "technicalContactResource":{
      "resourceURL":"account/99/technicalContact"
   },
   "permissions":{  
      "reseller":true,
      "virtual":true,
      "bareMetal":false
   }
}

Field Info

Field Name
Required for Resellers
Required for End-Clients
adminUrl
YES
NO
clientAssignedId
NO
NO
description
NO
NO
email
YES
YES
name
YES
YES
permissions
YES
NO
reportBugEmail
YES
NO

Notes

  • signUpDate is date formatted yyyy/MM/dd HH:mm:ss
  • adminUrl and reportBugEmail fields are only considered for accounts of type RESELLER. If set for an END_CLIENT, they will be ignored.
  • You are not allowed to modify your own account name.