Accounts-accountNumber-web-domainName-websitebuilder:PUT
From Hostway API Documentation
				
								
				(Difference between revisions)
				
																
				
				
								
				 (Created page with "= PUT /accounts/{accountNumber}/web/{domainName}/websiteBuilder = Adds WebsPlanet product to a domain.  __TOC__  == Request == <code>PUT /accounts/{accountNumber}/web/{domainN...")  | 
		Mike.robski  (Talk | contribs)  m (1 revision: Release 109)  | 
		
Latest revision as of 12:16, 24 July 2015
[edit] PUT /accounts/{accountNumber}/web/{domainName}/websiteBuilder
Adds WebsPlanet product to a domain.
Contents | 
[edit] Request
PUT /accounts/{accountNumber}/web/{domainName}/websiteBuilder
[edit] URI Parameters
- accountNumber - string
 - The user account to which the domain name belongs
 
- domainName - string
 - The target domain name (domain name under which the site is actually hosted)
 
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
 - The Authentication credentials of the client application.
 
[edit] Response
[edit] Status Code
- 202 Accepted
 - Success
 
- 400 Bad Request
 - The format of the request body is invalid.
 
- 401 Unauthorized
 - The supplied credentials are invalid or do not provide permissions for this operation.
 
- 404 Not Found
 - The domain name does not exist.
 
- 409 Conflict
 - The product already exists(on create) or domain is disabled(on update).
 
[edit] Examples
[edit] Try to add WebsPlanet product to a not existing domain
Request
PUT /accounts/test-account/email/test.com/websiteBuilder
Response
404 Not Found
{"itemNotFound": {"guid": "", "message": "Resource not found", "code": 404, "details": ""}}
 
[edit] Successfully adding WebsPlanet product
Request
PUT /accounts/test-account/email/test.com/websiteBuilder
Response
 202 Accepted
 {
   "links": [{"href": "https://api.hostway.com/accounts/test-account/web/test.com/websiteBuilder/", "rel": "self"},
             {"href": "https://api.hostway.com/orders/123/action/", "rel": "submit"},
             {"href": "https://api.hostway.com/orders/123/quote/", "rel": "quote"}]
 }
 
Request
POST /orders/123/action
{"action": "submit"}
 
Response
202 Accepted