Orders API

Creating an order

First, create an order, then make a later request to get it back

Parameters

Name Description
order[name] Name of order
order[paid] If the order has been paid for
order[email] Email of user that placed the order

Request

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Route

POST /orders

Body

cURL

curl "http://rad-example.herokuapp.com/orders" -d '{"order":{"name":"Order 1","paid":true,"email":"email@example.com"}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json; charset=utf-8
Location: http://example.org/orders/9
X-UA-Compatible: IE=Edge,chrome=1
ETag: "5fffd66f61cdd4ab8881584dbf5e72cf"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 30b5b2a41f8d1c14939a8bccab82dbb8
X-Runtime: 0.010198
Content-Length: 58

Status

201

Body

Request

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Route

GET /orders/9

cURL

curl "http://rad-example.herokuapp.com/orders/9" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json; charset=utf-8
X-UA-Compatible: IE=Edge,chrome=1
ETag: "5fffd66f61cdd4ab8881584dbf5e72cf"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: c9e24ad3accc8a22ba7554a5dfd1dee8
X-Runtime: 0.006183
Content-Length: 58

Status

200

Body