Order-Exchange-mailbox-free
From Hostway API Documentation
Contents |
Order a new, free Exchange mailbox
This example provides the steps for ordering a new Exchange mailbox in the case where it's offered without charge
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 Location http://coreapi01.ote.chicago.hostway:8092/orders/00000145ff9ba7e58e7c2c51007f000000010001 Set-Cookie OwnerId=f9cafb10-2e85-4b1a-bd69-1b1a91437d50; Path=/ no-body
Note: order has already been submitted at this point!
Check for status
Request
GET /orders/00000145ff9ba7e58e7c2c51007f000000010001 Cookie: OwnerId=f9cafb10-2e85-4b1a-bd69-1b1a91437d50; 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/00000145ff9ba7e58e7c2c51007f000000010001/",
"rel" : "self"
} ]
}