Order-Email-Domain
Mike.robski (Talk | contribs) |
Mike.robski (Talk | contribs) m (1 revision: Release 91) |
Latest revision as of 10:57, 11 March 2014
Contents |
[edit] Order a new email domain
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/0000013ad6dd95746a399f90000a71384bf242cf Set-Cookie : OwnerId=b0d6352a-f66a-476d-8e1d-2f3f9dea5c49; Path=/ { "orderId": "0000013ad6dd95746a399f90000a71384bf242cf", "links": [ {"href": "https://api.hostway.com/orders/", "rel": "self"}, {"href": "https://api.hostway.com/orders/0000013ad6dd95746a399f90000a71384bf242cf", "rel": "item"} ] }
[edit] Create a new account 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/0000013ad6dd95746a399f90000a71384bf242cf/account Content-Type: application/json; charset=UTF-8 Cookie: OwnerId=b0d6352a-f66a-476d-8e1d-2f3f9dea5c49; Path=/ { "currency": "USD", "language": "en-US" }
[edit] Response
204 No Content
[edit] Add the 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/0000013ad6dd95746a399f90000a71384bf242cf/account/products Content-Type: application/json; charset=UTF-8 Cookie: OwnerId=b0d6352a-f66a-476d-8e1d-2f3f9dea5c49; 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/0000013ad6dd95746a399f90000a71384bf242cf/account/products/0000013fd6dd95726c399e90000a71384bf242cf
[edit] Add the 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/0000013ad6dd95746a399f90000a71384bf242cf/account/products/0000013fd6dd95726c399e90000a71384bf242cf/services Content-Type: application/json; charset=UTF-8 Cookie: OwnerId=b0d6352a-f66a-476d-8e1d-2f3f9dea5c49; 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/0000013ad6dd95746a399f90000a71384bf242cf/account/products/0000013fd6dd95726c399e90000a71384bf242cf/services/0000013fe6dd95726c399e54500a71384bf242cf
[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/0000013ad6dd95746a399f90000a71384bf242cf/account/products/0000013fd6dd95726c399e90000a71384bf242cf/services/0000013fe6dd95726c399e54500a71384bf242cf/attributes Content-Type: application/json; charset=UTF-8 Cookie: OwnerId=b0d6352a-f66a-476d-8e1d-2f3f9dea5c49; Path=/ { "domain": "test-email-domain.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/0000013ad6dd95746a399f90000a71384bf242cf/action Content-Type: application/json; charset=UTF-8 { "action": "submit" }
[edit] Response
202 Accepted
See also