Search…
Organization
Represents the Organization itself
All Organization properties requiring Public access are exposed through GET to the public.

Organization Object Data Model

name
data type
description
id
String
The org identifier
access
Number
The current caller’s context access level.
apps
Document
The Org’s configured applications.
code
String
The Org’s code, used to access the api, uniquely identifies the org.
configuration
String
Org configuration settings.
connections
Reference
Connections associated with the Org.
created
Date
The date the context was created
deployment
Document
Org deployment settings
favicon
File
Organization Icon
locale
String
The Org’s default locale setting.
logo
File
The Org logo.
maintenance
Boolean
True if Org is in maintenance mode.
maintenanceMessage
String
The message to show during maintenance mode.
name
String
The Org label.
object
String
The context’s object name.
posts
Reference
A list of posts made in the context of the org.
registration
Document
Org registration settings.
roles
Document
Org’s configured roles
schemasETag
String
Org schemas ETag
security
Document
Org security settings
shared
Boolean
True if there are any active or pending connections for this context.
state
String
The Org state.
support
Document
Support options.
tz
String
Default timezone for the org. This helps determine UTC offset when working in scripts when a user tz is not available. 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
website
String
The Org website, available for use as a variable in email templates (org.website).

Example Organization Object

Untitled
1
{
2
"_id": "5516ee1b34d8d934281699e3",
3
"access": 1,
4
"code": "example",
5
"favicon": {
6
"ETag": "31074002db56d2d6fc8fee5b05caee1c",
7
"creator": "5516ee2634d8d93428169c0e",
8
"location": 4,
9
"mime": "image/x-icon",
10
"name": "content",
11
"path": "/orgs/5516ee1b34d8d934281699e3/favicon/content",
12
"size": 15086,
13
"state": 2
14
},
15
"locale": "en_US",
16
"logo": {
17
"ETag": "594b69d035ac27c2e69ef053082eb6a3",
18
"creator": "5516ee2634d8d93428169c0e",
19
"facets": [
20
{
21
"ETag": "5046104d05edf82e2a2c0d72118ca15b",
22
"creator": "5516ee2634d8d93428169c0e",
23
"height": 241,
24
"location": 4,
25
"mime": "image/jpeg",
26
"name": "thumbnail",
27
"path": "/orgs/5516ee1b34d8d934281699e3/logo/thumbnail",
28
"size": 16495,
29
"state": 2,
30
"width": 300
31
}
32
],
33
"height": 500,
34
"location": 4,
35
"mime": "image/jpeg",
36
"name": "content",
37
"path": "/orgs/5516ee1b34d8d934281699e3/logo/content",
38
"size": 52586,
39
"state": 2,
40
"width": 622
41
},
42
"name": "Example",
43
"object": "org",
44
"schemasETag": "b7fa703927702d09ada85150f475d88c"
45
}
Copied!
get
https://api.dev.medable.com/
{your_org_name}/v2
Read (Public)
Javascript
Objective C
Java
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/",
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!
1
[[MDAPIClient sharedClient] getOrgInfoWithCallback:^(MDOrg *org, MDFault *fault)
2
{
3
// Handle fault or process results
4
}];
Copied!
1
APIClient.sharedInstance().getPublicOrgInfo(new ObjectFaultCallback<JsonObject>()
2
{
3
@Override
4
public void call(JsonObject object, Fault fault)
5
{
6
// Public org's info in Json format
7
}
8
});
Copied!
--
get
https://api.dev.medable.com/{your_org_name}/v2/orgs
/org_id
Read (Full)
Javascript
Objective C
Java
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/orgs/5516ee1b34d8d934281699e3",
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!
1
[[MDAPIClient sharedClient]
2
orgWithId:self.Id
3
parameters:parameters
4
callback:^(MDOrg* updatedOrg, MDFault *fault)
5
{
6
if ( [updatedOrg isKindOfClass:[wSelf class]] && fault == nil )
7
{
8
[wSelf updateWithInstance:updatedOrg];
9
}
10
11
if ( callback )
12
{
13
callback(updatedOrg, fault);
14
}
15
}];
Copied!
1
Org org = APIClient.sharedInstance().getCurrentOrg();
2
3
// or:
4
5
APIClient.sharedInstance().getOrg(
6
new ObjectId("orgId here"),
7
null,
8
new ObjectFaultCallback<Org>()
9
{
10
@Override
11
public void call(Org org, Fault fault)
12
{
13
// Handle fault or process results
14
}
15
}
16
);
Copied!
put
https://api.dev.medable.com/
{your_org_name}/v2
Update
Javascript
Objective C
Java
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/orgs/5516ee1b34d8d934281699e3/c_4providers",
3
method: "PUT",
4
dataType : "json",
5
xhrFields: {
6
withCredentials: true
7
},
8
headers: {
9
"Medable-Client-Key": "GsAqlhnIMzrDeD8V2MBQWq"
10
},
11
data: [
12
-5,
13
-4,
14
-3,
15
-2,
16
-1,
17
0,
18
11,
19
22,
20
33,
21
44,
22
55
23
]
24
}).done(function(data) {
25
// ...
26
});
Copied!
1
NSDictionary *body = @{ @"c_providers": @{ @"data": @[ @(-5), @(-4), @(-3), @(-2), @(-1), @(0), @(11), @(22), @(33), @(44), @(55) ] } };
2
3
[[MDAPIClient sharedClient]
4
updateOrgWithId:[MDObjectId objectIdWithString:@"5516ee1b34d8d934281699e3"]
5
body:body
6
callback:^(MDOrg * _Nullable editedObject, MDFault * _Nullable fault)
7
{
8
9
}];
Copied!
1
Body body = new Body();
2
3
JsonObject jsonContent = APIClient.sharedInstance().getGsonParser()
4
.parse("{ \"c_providers\": { \"data\": [ -5, -4, -3, -2, -1, 0, 11, 22, 33, 44, 55 ] } }")
5
.getAsJsonObject();
6
7
FastBodyProperty fastProp = new FastBodyProperty(jsonContent);
8
body.addProperty(fastProp);
9
10
APIClient.sharedInstance().updateOrg(
11
new ObjectId("5516ee1b34d8d934281699e3"),
12
body,
13
new ObjectFaultCallback<Org>()
14
{
15
@Override
16
public void call(Org editedOrg, Fault fault)
17
{
18
19
}
20
}
21
);
Copied!
patch
https://api.dev.medable.com/
{your_org_name}/v2
Update
JavaScript
1
$.ajax({
2
url: "https://api.dev.medable.com/example/v2/orgs/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": "/configuration/email/locationBypass",
14
"value": "[email protected]"
15
}
16
}).done(function(data) {
17
// ...
18
});
Copied!
Last modified 1mo ago