Order Examples

Retrieve Orders for a User

Request:

GET https://api.staging.milkbooks.com/orders HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuc3RhZ2luZy5taWxrYm9va3MuY29tIiwiYXVkIjoiYXBpLnN0YWdpbmcubWlsa2Jvb2tzLmNvbSIsImV4cCI6MTM3NDE0MjM1Mywic3ViIjoiMzMifQ.CcMJDeRRaASEasdVbac1uqs2WYvnUQSmgt3DnuCYv_I
Host: api.staging.milkbooks.com
Content-Length: 0

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ServiceStack/3.938 Win32NT/.NET
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 26 Jun 2013 00:40:27 GMT
Content-Length: 153
{"Orders":[{"OrderGuid":"y92f870fdfgfa4326sdfsdfsdf74fd540",
"Lines":[{"Id":588671,"ProjectGuid":"e92f870a47fa4326b97bb21e074fd540","Quantity":1,"Total":39.95000000}],
"OrderTotal":39.50,"Status":"Processing","CreatedDateUtc":"\/Date(-62135596800000+1300)\/",
"CompletedDateUtc":"\/Date(-62135596800000+1300)\/","LastSavedDateUtc":"\/Date(-62135596800000+1300)\/"}]}

Retrieve Orders that include a specific Project

Request:

GET https://api.staging.milkbooks.com/orders?projectguid=e92f870a47fa4326b97bb21e074fd540 HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcGkuc3RhZ2luZy5taWxrYm9va3MuY29tIiwiYXVkIjoiYXBpLnN0YWdpbmcubWlsa2Jvb2tzLmNvbSIsImV4cCI6MTM3NDE0MjM1Mywic3ViIjoiMzMifQ.CcMJDeRRaASEasdVbac1uqs2WYvnUQSmgt3DnuCYv_I
Host: api.staging.milkbooks.com
Content-Length: 0

Response:

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ServiceStack/3.938 Win32NT/.NET
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 26 Jun 2013 00:40:27 GMT
Content-Length: 153
{"Orders":[{"OrderGuid":"y92f870fdfgfa4326sdfsdfsdf74fd540",
"Lines":[{"Id":588671,"ProjectGuid":"e92f870a47fa4326b97bb21e074fd540","Quantity":1,"Total":39.95000000}],
"OrderTotal":39.50,"Status":"Processing","CreatedDateUtc":"\/Date(-62135596800000+1300)\/",
"CompletedDateUtc":"\/Date(-62135596800000+1300)\/","LastSavedDateUtc":"\/Date(-62135596800000+1300)\/"}]}

Retrieve a specific Order

Request:

Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ServiceStack/3.938 Win32NT/.NET
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 26 Jun 2013 00:40:27 GMT
Content-Length: 153
{"OrderGuid":"93624257685e4c4293e64029c0881f86","Lines":[{"Id":535798,"ProjectGuid":"15574278972747b0b773395fdd570319","ProjectVersion":0,
"Quantity":1,"SubTotal":35.0000,"Total":35.0000,"AddOns":[]}],"OrderTotal":35.0000,"Status":"OrderReceived","CreatedDateUtc":"\/Date(1372908059000)\/",
"CompletedDateUtc":"\/Date(1372908059000)\/","LastSavedDateUtc":"\/Date(1372908209000)\/"}