Order-Exchange-otherproduct
From Hostway API Documentation
(Difference between revisions)
Corinne.chui (Talk | contribs) m (1 revision) |
Latest revision as of 14:36, 30 May 2016
Contents |
Ordering Other Exchange Products
This order flow applies to encryption, archiving, mailing list and blackberry products. The example illustrates ordering encryption.
Create Encryption for a domain
Request
PUT /accounts/acct999999/exchange/myexchangedomain.com/emailEncryption
Authorization: Basic cXdlQHBhcnRuZXJfYXBpX2RldmVsb3Blcl91c19tYWluOml1MzR0OGhm
{
"adminEmail": "someone@somewhere.com"
}
Response
202 Accepted Set-Cookie: OwnerId=73adb746-2443-4cc8-879e-886348385b9a; Path=/ Location: http://coreapi01.ote.chicago.hostway:8092/orders/00000145ffa79d31de17529f007f000000010001 no-body
Note: specified order has not yet been submitted.
Obtain a quote
Request
GET /orders/00000145ffa79d31de17529f007f000000010001/quote Cookie: OwnerId=73adb746-2443-4cc8-879e-886348385b9a; Path=/ Authorization: Basic cXdlQHBhcnRuZXJfYXBpX2RldmVsb3Blcl91c19tYWluOml1MzR0OGhm
Response
200 OK
Content-Type: application/json; charset=UTF-8
{
"quote" : {
"Hash" : "b6a714a2ba76b6f15df9e46964df21ca726594a0",
"Currency" : "USD",
"Total" : "0.00",
"SubTotal" : "0.00",
"OneTimeFeeAmount" : "0",
"TaxTotal" : "0",
"DeferredSubTotals": [],
"DeferredTaxes": [],
"DeferredTotals": []
},
"links" : {
"self" : {
"href" : "http://coreapi01.ote.chicago.hostway:8092/orders/00000145ffa79d31de17529f007f000000010001/quote/",
"rel" : "self"
}
}
}
Submit the order
Request
POST /orders/00000145ffa79d31de17529f007f000000010001/action
Content-Type: application/json; charset=UTF-8
Cookie: OwnerId=73adb746-2443-4cc8-879e-886348385b9a; Path=/
Authorization: Basic cXdlQHBhcnRuZXJfYXBpX2RldmVsb3Blcl91c19tYWluOml1MzR0OGhm
{"action": "submit"}
</nowkiki>
=== Response ===
<nowiki>
202 Accepted
no-body
Check for status
Request
GET /orders/00000145ffa79d31de17529f007f000000010001 Cookie: OwnerId=73adb746-2443-4cc8-879e-886348385b9a; Path=/ Authorization: Basic cXdlQHBhcnRuZXJfYXBpX2RldmVsb3Blcl91c19tYWluOml1MzR0OGhm
Response
200 OK
{
"order" : {
"Status" : "Processing", <- "Completed" means that everything has provisioned successfully
"Account" : "http://coreapi01.ote.chicago.hostway:8092/accounts/acct999999"
},
"links" : [ {
"href" : "http://coreapi01.ote.chicago.hostway:8092/orders/00000145ffa79d31de17529f007f000000010001/",
"rel" : "self"
} ]
}