-
Notifications
You must be signed in to change notification settings - Fork 47
/
apiary.apib
82 lines (73 loc) · 1.73 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
HOST: http://www.google.com/
--- OSDI ---
---
Welcome to the our sample API documentation. All comments can be written in (support [Markdown](http://daringfireball.net/projects/markdown/syntax) syntax)
---
--
API Endpoint
--
Get the API Endpoint
GET /api/v1
< 200
< Content-Type: application/json
{
"motd": "Welcome to the ACME Action Platform OSDI API endpoint!!",
"capabilities" : {
"osdi:rest-read" : true,
"osdi:actions" : true,
"osdi:rest-write" : true,
"acme:defeat_opponent": { "modes" : [
"landslide", "nailbiter"
]
},
"_links": {
"curies": [
{"name": "osdi", "href": "http://api.opensupporter.org/docs/v1/{rel}", "templated": true },
{"name": "acme", "href": "http://acme.foo/"}
],
"osdi:people": {
"href": "/api/v1/people",
},
"osdi:people_lists": {
"href": "/api/v1/people_lists",
},
"osdi:addresses": {
"href": "/api/v1/addresses",
},
"odsi:questions": {
"href": "http://api.opensupporter.org/api/v1/questions",
},
"osdi:question_answers": {
"href": "http://api.opensupporter.org/api/v1/question_answers",
},
"self": {
"href": "/api/v1",
}
}
}
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"
}
-- Donation Resources --
List Donations
GET /api/v1/donations
< 200
< Content-Type: application/json
{
Send a Donation
POST /api/v1/donations
{
"amount": "50.00", "currency": "usd",
"person" : {
"given_name" : "John",
"family_name" : "Doe"
}
}
< 200
{ "receipt": "/payment/receipt/1" }