Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transferring blueprint from apiary.io
- Loading branch information
Nikita
committed
Mar 13, 2013
1 parent
3a406f6
commit 39232aa
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
HOST: http://www.google.com/ | ||
|
||
--- Sample API v2 --- | ||
--- | ||
Welcome to the our sample API documentation. All comments can be written in (support [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax) | ||
--- | ||
|
||
-- | ||
Shopping Cart Resources | ||
The following is a section of resources related to the shopping cart | ||
-- | ||
List products added into your shopping-cart. (comment block again in Markdown) | ||
GET /shopping-cart | ||
< 200 | ||
< Content-Type: application/json | ||
{ "items": [ | ||
{ "url": "/shopping-cart/1", "product":"2ZY48XPZ", "quantity": 1, "name": "New socks", "price": 1.25 } | ||
] } | ||
|
||
Save new products in your shopping cart | ||
POST /shopping-cart | ||
> Content-Type: application/json | ||
{ "product":"1AB23ORM", "quantity": 2 } | ||
< 201 | ||
< Content-Type: application/json | ||
{ "status": "created", "url": "/shopping-cart/2" } | ||
|
||
-- Payment Resources -- | ||
This resource allows you to submit payment information to process your *shopping cart* items | ||
POST /payment | ||
{ "cc": "12345678900", "cvc": "123", "expiry": "0112" } | ||
< 200 | ||
{ "receipt": "/payment/receipt/1" } |