Order-Domain-Alias

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
 
m (1 revision: Release 91)
 

Latest revision as of 10:57, 11 March 2014

Contents

[edit] Order a new email domain alias

This example provides the steps to order a new email domain through the Hostway Ordering API.

[edit] Create a new order

Use POST /orders to create a new order

[edit] Request

POST /orders
Content-Type: application/json; charset=UTF-8

{}
 

[edit] Response

201 Created
Content-Type: application/json; charset=UTF-8
Location : https://api.hostway.com/orders/00000143d407b34742ee26ae007f000000010001
Set-Cookie : OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
 "orderId": "00000143d407b34742ee26ae007f000000010001",
 "links": [
  {"href": "https://api.hostway.com/orders/", "rel": "self"},
  {"href": "https://api.hostway.com/orders/00000143d407b34742ee26ae007f000000010001", "rel": "item"}
 ]
}
 

[edit] Create a new acout for the order

Use PUT /orders/{order_id}/account to create an account or add an existing one to the order.

[edit] Request

PUT /orders/00000143d407b34742ee26ae007f000000010001/account
Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
 "currency": "USD",
 "language": "en-US"
}
 

[edit] Response

204 No Content
 

[edit] Add an email domain product

The email domain product specification offerings can be determined using the Hostway Product Catalog API. Then add a new email domain product to the order by using POST /orders/{order_id}/account/products.

[edit] Request

POST /orders/00000143d407b34742ee26ae007f000000010001/account/products
Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
  "offering": "https://api.hostway.com/productSpecifications/core.plan.email.business/offerings/USD-12"
}
 

[edit] Response

201 Created
Content-Type: application/json; charset=UTF-8
Location : https://api.hostway.com/orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001
 

[edit] Add an email service to the new product

The email service specification offerings can be determined using the Hostway Product Catalog API for the core.plan.email.business product. Then add a new email service to the order by using POST /orders/{order_id}/account/products/{product_id}/services.

[edit] Request

POST /orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services
Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
 "name": "test-email-domain.com",
 "serviceSpecification": "https://api.hostway.com/serviceSpecifications/core.email.mfg2",
 "billingCycle": 1
}
 

[edit] Response

201 Created
Content-Type: application/json; charset=UTF-8
Location : https://api.hostway.com/orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services/00000143d407bea7e2b84d31007f000000010001
 

[edit] Add service attributes

Use the PUT /orders/{order_id}/account/products/{product_id}/services/{service_id}/attributes call to add the domain name for the email service.

[edit] Request

POST /orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services/00000143d407bea7e2b84d31007f000000010001/attributes

Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
 "domain": "test-email-domain.com"
}
 

[edit] Response

204 No content
 

[edit] Add an email domain alias service to the new product

The email service specification offerings can be determined using the Hostway Product Catalog API for the core.plan.email.business product. Then add a new email service to the order by using POST /orders/{order_id}/account/products/{product_id}/services. The "relatedTo" attribute should contain the email domain product URL.

[edit] Request

POST /orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services
Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
 "name": "test-email-domain-alias.com",
 "serviceSpecification": "https://api.hostway.com/serviceSpecifications/core.email.domainalias.mfg2",
 "relatedTo": ["https://api.hostway.com/orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services/00000143d407bea7e2b84d31007f000000010001"],
 "billingCycle": 1
}
 

[edit] Response

201 Created
Content-Type: application/json; charset=UTF-8
Location : https://api.hostway.com/orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services/00000143d407bea7e2b84d37001f000000010001
 

[edit] Add the domain alias service attributes

Use the PUT /orders/{order_id}/account/products/{product_id}/services/{service_id}/attributes call to add the domain alias name for the email service.

[edit] Request

POST /orders/00000143d407b34742ee26ae007f000000010001/account/products/00000143d407b725d9eb9a41007f000000010001/services/00000143d407bea7e2b84d37001f000000010001/attributes

Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=09185e9b-2ea0-4bef-950e-fc9f8b89861f; Path=/

{
 "domain": "test-email-domain.com",
 "domain_alias": "test-email-domain-alias.com"
}
 

[edit] Response

204 No content
 

[edit] Submit the order

Use POST /orders/{order_id}/action to submit the order and invoke the email domain provisioning.

[edit] Request

POST /orders/00000143d407b34742ee26ae007f000000010001/action
Content-Type: application/json; charset=UTF-8

{
  "action": "submit"
}
 

[edit] Response

202 Accepted
 

See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox