Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page contains an example of executing an end to end order against the API with HTTP level examples.

Creating a User

Request:

POST http://api.staging.milkbooks.com/user HTTP/1.1
content-type: application/json
accept: application/json
x-milk-api-key: 12345678-1234-1234-1234-123456789012
Host: api.staging.milkbooks.com
Content-Length: 58
{"EmailAddress":"test1@example.com","Password":"test1234"}

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: Fri, 19 Apr 2013 03:21:46 GMT
Content-Length: 43
{"Id":2,"EmailAddress":"test1@example.com"}

Creating A Session

Request:

POST http://api.staging.milkbooks.com/session HTTP/1.1
content-type: application/json
accept: application/json
x-milk-api-key: 12345678-1234-1234-1234-123456789012
Host: api.staging.milkbooks.com
Content-Length: 58
{"EmailAddress":"test1@example.com","Password":"test1234"}

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: Fri, 19 Apr 2013 03:22:04 GMT
Content-Length: 36
{"SessionId":"SWzj84qs39YaFMpkofna"}

 

  • No labels