Order-Exchange-mailbox-paid

From Hostway API Documentation
Jump to: navigation, search

Contents

Order a new, paid Exchange mailbox

This example provides the steps for ordering a new Exchange mailbox in the case where a charge applies

Create the mailbox

Request

POST /accounts/acct999999/exchange/myexchangedomain.com/mailboxes
Content-Type: application/json; charset=UTF-8
Authorization: Basic cXdlQHBhcnRuZXJfYXBpX2RldmVsb3Blcl91c19tYWluOml1MzR0OGhm

{
  "owner": {
    "username": "a.a",
    "password": "tester1234"
  },
  "admin": 0,
  "notes": "some text",
  "recipientLimit": 10,
  "deliverRedirect": "zsds",
  "forwardTo": "asdasd",
  "name": {
    "name": "John Smith",
    "company": "My Company",
    "department": "Sales",
    "title": "President"
  },
  "address": {
    "address": "100 Main St.",
    "city": "Chicago",
    "state": "IL",
    "zip": "60001",
    "country": "US"
  },
  "phones": {
    "businessPhone": "555-555-5501",
    "homePhone": "555-555-5502",
    "fax": "555-555-5503",
    "mobile": "555-555-5504"
  }
}
 

Response

202 Accepted
Set-Cookie: OwnerId=bd048fa5-8714-462f-86f6-1feffd04023b; Path=/
{
  "total" : [ "5.18", "USD" ],
  "subtotal" : [ "5.18", "USD" ],
  "deferredTotal": [],
  "deferredSubtotal": [],
  "quotehash" : "0dd6b20d1ce3ae0e44882f3db11124d03f60ba53",
  "links" : [ {
    "href" : "http://coreapi01.ote.chicago.hostway:8092/accounts/acct999999/exchange/myexchangedomain.com/mailboxes/",
    "rel" : "self"
  }, {
    "href" : "http://coreapi01.ote.chicago.hostway:8092/orders/00000145ff82ec6bf27d6421007f000000010001/action",
    "rel" : "related"
  } ]
}
 


Submit the order

Request

POST /orders/00000145ff82ec6bf27d6421007f000000010001/action
Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=bd048fa5-8714-462f-86f6-1feffd04023b; Path=/
{"action": "submit"}
 </nowkiki>

=== Response ===
 <nowiki>
202 Accepted
no-body
 


Check for status

Request

GET /orders/00000145ff82ec6bf27d6421007f000000010001
Cookie: OwnerId=bd048fa5-8714-462f-86f6-1feffd04023b; Path=/
Authorization: Basic cXdlQHBhcnRuZXJfYXBpX2RldmVsb3Blcl91c19tYWluOml1MzR0OGhm
 

Response

200 OK
{
  "order" : {
    "Status" : "Processing",                                                                  <- "Completed" means that everything provisioned successfully
    "Account" : "http://coreapi01.ote.chicago.hostway:8092/accounts/acct999999"
  },
  "links" : [ {
    "href" : "http://coreapi01.ote.chicago.hostway:8092/orders/00000145ff82ec6bf27d6421007f000000010001/",
    "rel" : "self"
  } ]
}

 


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox