Search…
Account
The Account Object represents a user account within an Organization.
_id ObjectId
The account identifier.
access Number
The current caller's context access level.
activationRequired Boolean
True if the account must be activated before use. Dependant on Org settings.
age Number
The age of the account holder (based on the dob property).
connections Reference[]
Connections associated with the Account.
created Date
The date the context was created.
dob Date
Account holder date of birth.
email* String
The email address for the account and must be unique within the Org.
favorite Boolean
Tags the context as a favorite, which can then be filtered using the API.
gender String
Account holder gender. Available values are: f - Female m - Male n - Neither o - Other t - Trans u - Unspecified
image File
The account profile image.
inherited_roles ObjectId[]
Any roles that are inherited from my current role. If my current role has no sub-roles then this is an empty array.
key Document
A fingerprint and secret, re-generated on password change. Useful for client-side PHI encryption/caching scenarios, it is available to the account holder for the life of an authenticated session.
mobile String
The mobile number of the account holder. This number should be capable of receiving SMS messages and must be in E.164 format.
name Document
Name of the account holder (split into first and last names as well as optional prefix, middle, suffix and additional[]).
object String
The context’s object name.
preferences Document
The account preferences.
profile Document
The account profile.
roles ObjectId[]
Account roles (e.g. Provider, Administrator, Developer). Accounts can have more than one role.
shared Boolean
True if there are any active or pending connections for this context.
state String
Current state for the account. (e.g. unverified, verified)
tz String
Timezone for the account. This helps determine UTC offset when working in scripts. The timezone must by a unique identifier for an IANA assigned zone, e.g. "US/Pacific"
updated Date
The date the latest update was made to a context’s properties
updater Reference
The account id of the context updater
Example Account Object
1
{
2
"_id": "54c66edac364f2201b78c34e",
3
"access": 6,
4
"dob": "1975-01-26",
5
"email": "[email protected]",
6
"favorite": false,
7
"gender": "m",
8
"key": {
9
"fingerprint": "094be6f0-a57b-11e4-9323-d35446f5af36",
10
"secret": "P07uqKLlXDWjj3s85TGJt4BXSuSCFlpx"
11
},
12
"locale": "en_US",
13
"locked": false,
14
"mobile": "15551234567",
15
"name": {
16
"first": "John",
17
"last": "Smith"
18
},
19
"object": "account",
20
"preferences": {
21
"notifications": [
22
{
23
"label": "Custom Notifier",
24
"name": "c_notifier",
25
"_id": "56cbfddcba9ef5257bf48513",
26
"endpoints": [
27
{
28
"_id": "456e64706f696e7420536d73",
29
"enabled": false,
30
"label": "SMS",
31
"name": "sms"
32
},
33
{
34
"_id": "456e64706f696e7420456d6c",
35
"enabled": true,
36
"label": "Email",
37
"name": "email"
38
}
39
]
40
}
41
]
42
},
43
"profile": {
44
"provider": {
45
"affiliation": "None",
46
"license": {
47
"number": "777",
48
"state": "Alabama"
49
},
50
"npi": "798798798",
51
"specialty": "Allergy and Immunology",
52
"state": "processing",
53
"visibility": {
54
"provider": false,
55
"public": false
56
}
57
}
58
},
59
"roles": [
60
"000000000000000000000005"
61
],
62
"shared": false,
63
"state": "verified",
64
"updated": "2015-03-12T18:47:34.010Z"
65
}
Copied!
get
https://api.dev.medable.com/
your_org_name/v2/accounts
List
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts?paths[]=name",
3
method: "GET",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
get
https://api.dev.medable.com/
your_org_name/v2/accounts/account_id
Read
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/5525fc2db7995d2c2807632a",
3
method: "GET",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
get
https://api.dev.medable.com/
your_org_name/v2/accounts/me
Current User
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/me",
3
method: "GET",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
post
https://api.dev.medable.com/
your_org_name/v2/accounts/register
Register
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/register",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"name": {
13
"first": "Charles",
14
"last": "Best"
15
},
16
"email": "[email protected]",
17
"gender": "m",
18
"dob": "1899-02-27",
19
"mobile": "1-650-555-5555",
20
"password": "Thanks for the break, Banting!"
21
}
22
}).done(function(data) {
23
// ...
24
});
Copied!
post
https://api.dev.medable.com/your_org_name/v2/accounts/login
Login
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/login",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"email": "[email protected]",
13
"password": "this is not my passphrase",
14
"location": {
15
"verificationToken": "123456",
16
"locationName": "New Orleans",
17
"singleUse": true
18
}
19
}
20
}).done(function(data) {
21
// ...
22
});
Copied!
post
https://api.dev.medable.com
/your_org_name/v2/accounts/me/logout
Logout
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/me/logout",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
post
https://api.dev.medable.com
/your_org_name/v2/accounts/request-password-reset
Request Password Reset
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/request-password-reset",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"email": "[email protected]"
13
}
14
}).done(function(data) {
15
// ...
16
});
Copied!
Example:
    1.
    Request Password Reset gets called
    2.
    Medable sends the email with a one-time secure reset password token (string)
    3.
    The user opens that email and clicks a link which has this token as a url parameter
    4.
    User gets navigated to a Medable web GUI for setting the new password
You can override the destination link in part 4 to be your own page on your own domain for app look and feel consistency.
post
https://api.dev.medable.com
/your_org_name/accounts/me/update-password
Update My Password
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/me/update-password",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"current": "this is not my passphrase",
13
"password": "correct horse battery staple"
14
}
15
}).done(function(data) {
16
// ...
17
});
Copied!
post
https://api.dev.medable.com
/your_org_name/accounts/reset-password
Update Password (Token)
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/reset-password",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"token": "kPBg3AACpwTzhiOpUTz2i2koJqqot70M",
13
"password": "here's a new passphrase!"
14
}
15
}).done(function(data) {
16
// ...
17
});
Copied!
post
https://api.dev.medable.com
/your_org_name/v2/token
Verify Email From Token
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/lBMSJWtqKVdx8Z888syX6axpCk2j7eYm",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
post
https://api.dev.medable.com
/your_org_name/v2/accounts/me/resend-verification
Resend Email Verification
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/me/resend-verification",
3
method: "POST",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
}
11
}).done(function(data) {
12
// ...
13
});
Copied!
put
https://api.dev.medable.com
/your_org_name/v2/accounts/me/resend-verification
Update
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/586eb9ef64129a5f3631a0ca",
3
method: "PUT",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"name": {
13
"first":"Bob",
14
"last":"Dole"
15
}
16
}
17
}).done(function(data) {
18
// ...
19
});
Copied!
Due to security reasons, we do not allow modifying of the email address of a given account.
patch
https://api.dev.medable.com/
your_org_name/v2/accounts/account_id
Update
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/accounts/586eb9ef64129a5f3631a0ca",
3
method: "PATCH",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: {
12
"op": "push",
13
"path": "/roles",
14
"value": "587012227d67efea0843fa80"
15
}
16
}).done(function(data) {
17
// ...
18
});
Copied!
Last modified 1mo ago