Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit 20b7744

Browse files
committed
Add API documentation
1 parent c553a87 commit 20b7744

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/api-members-verify.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Membership verification API
2+
3+
Simple private API to check membership status based on e-mail.
4+
5+
`POST https://dev.codemooc.net/api/members/verify?email=EMAILADDRESS`
6+
7+
Requests _require_ a `Authorization` header with [Basic authentication information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication).
8+
9+
Response format:
10+
11+
```json
12+
{
13+
"id": 123,
14+
"primaryMail": "EMAILADDRESS",
15+
"registeredOn": "2019-01-07T11:10:14",
16+
"isMember": true,
17+
"memberships": {
18+
"2019": {
19+
"issuedOn": "2019-01-11T14:50:52"
20+
}
21+
}
22+
}
23+
```
24+
25+
| Attribute | Type | Description |
26+
| --- | --- | --- |
27+
| id | Numeric | Unique ID of the user (internal in CodeMOOC). |
28+
| primaryMail | String | Primary e-mail address, may not be equal to the input e-mail. |
29+
| registeredOn | UTC Date | Timestamp of registration on CodeMOOC. |
30+
| isMember | Boolean | Whether the user is currently a member. |
31+
| memberships | Object | Map of membership information by year. |

0 commit comments

Comments
 (0)