Product Examples

Listing Products With API Key

Request:

GET https://api.staging.milkbooks.com/products 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: 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: Thu, 18 Jul 2013 00:15:06 GMT
Content-Length: 63
{"Products":[{"Id":106697,"Name":"Test Book","Price":39.9500}]}

Listing Products with an Application Token

Request:

GET https://api.staging.milkbooks.com/products HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcHBsaWNhdGlvbi5leGFtcGxlLmNvbSIsImF1ZCI6ImFwaS5zdGFnaW5nLm1pbGtib29rcy5jb20iLCJleHAiOjE1MzE3ODcyODcsInR5cCI6IkpXVCJ9.v60NYIgqufZWgOVk2PaAZxKjQpIaRrwxdwWHb68n0Hk
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: Thu, 18 Jul 2013 00:29:20 GMT
Content-Length: 63
{"Products":[{"Id":113359,"Name":"Test Book","Price":39.9500}]}