This repository was archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Organization Location API
jay-lee00 edited this page Aug 7, 2019
·
10 revisions
GET v2/organizations
Request
| X-Developer-Id | developer id |
| X-Api-Key | api key |
| Authorization | Bearer {{access_token}} |
| includeLocations | boolean |
Default value is True |
| includeDeleted | boolean |
Default value is False |
| idsToLoadLocations | string |
Space separated organization ids. Default value is empty string |
sample request
GET /api/v2/organizations HTTP/1.1
Host: api.sandbox.connectedcare.md
X-Developer-Id: {{apiDeveloperId}}
X-Api-Key: {{apiKey}}
Authorization: Bearer {{accessToken}}
cache-control: no-cache
Postman-Token: 5738c8d8-7872-4ecb-b256-d584c8f711ed
sample response:
{
"data": [
{
"addresses": [],
"hospitalId": 126,
"locations": [
{
"name": "O1L2",
"organizationId": 72,
"id": 83,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.54Z",
"modifiedDate": "2019-01-02T23:57:06.8266667Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O1L3",
"organizationId": 72,
"id": 84,
"statusCode": 1,
"createdDate": "2019-01-02T23:57:06.8266667Z",
"modifiedDate": "2019-01-02T23:57:06.8266667Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O1Loc1",
"organizationId": 72,
"id": 82,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.54Z",
"modifiedDate": "2019-01-02T23:57:06.8266667Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"name": "Org1-1",
"organizationTypeId": 2,
"id": 72,
"statusCode": 1,
"createdDate": "0001-01-01T00:00:00Z",
"createdByUserId": 0
},
{
"addresses": [],
"hospitalId": 126,
"locations": [
{
"name": "O2L1",
"organizationId": 73,
"id": 85,
"statusCode": 1,
"createdDate": "2019-01-03T00:07:20.2033333Z",
"modifiedDate": "2019-01-03T00:07:20.2033333Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O2L2",
"organizationId": 73,
"id": 86,
"statusCode": 1,
"createdDate": "2019-01-03T00:07:20.2033333Z",
"modifiedDate": "2019-01-03T00:07:20.2033333Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"name": "Org2",
"organizationTypeId": 2,
"id": 73,
"statusCode": 1,
"createdDate": "0001-01-01T00:00:00Z",
"createdByUserId": 0
}
],
"total": 2
}
POST v2/client/organizations
Request
| X-Developer-Id | developer id |
| X-Api-Key | api key |
| Authorization | Bearer {{access_token}} |
| HospitalId | integer |
| Name | string |
| OrganizationTypeId | 2 |
| StatusCode | StatusCode |
| Locations | Collection of Location |
sample request
POST /api/v2/client/organizations HTTP/1.1
Host: api.sandbox.connectedcare.md
X-Developer-Id: {{apiDeveloperId}}
X-Api-Key: {{apiKey}}
Authorization: Bearer {{accessToken}}
cache-control: no-cache
Content-Type: application/json; charset=UTF-8
Postman-Token: c0acb400-6f5b-4685-b10e-1fa94f1fbbbd
{
"hospitalId": 126,
"locations": [
{
"name": "Loc1",
"statusCode": 1
},
{
"name": "O2L2",
"statusCode": 1
}
],
"name": "Org1",
"organizationTypeId": 2,
"statusCode": 1
}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
sample response:
{
"data": [
{
"addresses": [],
"hospitalId": 126,
"locations": [
{
"name": "Loc1",
"organizationId": 72,
"id": 82,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.5383856Z",
"modifiedDate": "2019-01-02T21:13:36.5383856Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O2L2",
"organizationId": 72,
"id": 83,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.5383856Z",
"modifiedDate": "2019-01-02T21:13:36.5383856Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"name": "Org1",
"organizationTypeId": 2,
"id": 72,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.5383856Z",
"modifiedDate": "2019-01-02T21:13:36.5383856Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"total": 1
}
PUT v2/client/organizations
Request
| X-Developer-Id | developer id |
| X-Api-Key | api key |
| Authorization | Bearer {{access_token}} |
| syncLocations | boolean |
Default value is False |
| Id | integer |
| Name | string |
| OrganizationTypeId | 2 |
| StatusCode | StatusCode |
| Locations | Collection of Location |
sample request
PUT /api/v2/client/organizations?syncLocations=true HTTP/1.1
Host: api.sandbox.connectedcare.md
X-Developer-Id: {{apiDeveloperId}}
X-Api-Key: {{apiKey}}
Authorization: Bearer {{accessToken}}
cache-control: no-cache
Content-Type: application/json; charset=UTF-8
Postman-Token: c0acb400-6f5b-4685-b10e-1fa94f1fbbbd
{
"id": 72,
"name": "Org1-1",
"organizationTypeId": 2,
"statusCode": 1,
"locations": [
{
"id": 82,
"name": "O1Loc1",
"statusCode": 1
},
{
"id": 83,
"name": "O1L2",
"statusCode": 1
},
{
"name": "O1L3",
"statusCode": 1
}
]
}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
sample response:
{
"data": [
{
"addresses": [],
"hospitalId": 126,
"locations": [
{
"name": "O1Loc1",
"organizationId": 72,
"id": 82,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.54Z",
"modifiedDate": "2019-01-02T23:57:06.8276704Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O1L2",
"organizationId": 72,
"id": 83,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.54Z",
"modifiedDate": "2019-01-02T23:57:06.8276704Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O1L3",
"organizationId": 72,
"id": 84,
"statusCode": 1,
"createdDate": "2019-01-02T23:57:06.8276704Z",
"modifiedDate": "2019-01-02T23:57:06.8276704Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"name": "Org1-1",
"organizationTypeId": 2,
"id": 72,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.54Z",
"modifiedDate": "2019-01-02T23:57:06.8276704Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"total": 1
}
GET v2/locations
Request
| X-Developer-Id | developer id |
| X-Api-Key | api key |
| Authorization | Bearer {{access_token}} |
sample request
GET /api/v2/locations HTTP/1.1
Host: api.sandbox.connectedcare.md
X-Developer-Id: {{apiDeveloperId}}
X-Api-Key: {{apiKey}}
Authorization: Bearer {{accessToken}}
cache-control: no-cache
Postman-Token: 5738c8d8-7872-4ecb-b256-d584c8f711ed
sample response:
{
"data": [
{
"name": "O1L3+1",
"organizationId": 72,
"id": 84,
"statusCode": 1,
"createdDate": "2019-01-02T23:57:06.827Z",
"modifiedDate": "2019-01-03T00:24:48.227Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O1Loc1-1",
"organizationId": 72,
"id": 82,
"statusCode": 1,
"createdDate": "2019-01-02T21:13:36.54Z",
"modifiedDate": "2019-01-03T00:24:48.227Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O2L1",
"organizationId": 73,
"id": 85,
"statusCode": 1,
"createdDate": "2019-01-03T00:07:20.203Z",
"modifiedDate": "2019-01-03T00:07:20.203Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
},
{
"name": "O2L2",
"organizationId": 73,
"id": 86,
"statusCode": 1,
"createdDate": "2019-01-03T00:07:20.203Z",
"modifiedDate": "2019-01-03T00:07:20.203Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"total": 4
}
POST v2/client/locations
Request
| X-Developer-Id | developer id |
| X-Api-Key | api key |
| Authorization | Bearer {{access_token}} |
| OrganizationId | integer |
| Name | string |
| StatusCode | StatusCode |
sample request
POST /api/v2/client/locations HTTP/1.1
Host: api.sandbox.connectedcare.md
X-Developer-Id: {{apiDeveloperId}}
X-Api-Key: {{apiKey}}
Authorization: Bearer {{accessToken}}
cache-control: no-cache
Content-Type: application/json; charset=UTF-8
Postman-Token: c0acb400-6f5b-4685-b10e-1fa94f1fbbbd
{
"organizationId": 73,
"name": "O2Loc3",
"statusCode": 1
}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
sample response:
{
"data": [
{
"name": "O2Loc3",
"organizationId": 73,
"id": 87,
"statusCode": 1,
"createdDate": "2019-01-03T19:00:54.4878473Z",
"modifiedDate": "2019-01-03T19:00:54.4878473Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"total": 1
}
PUT v2/client/locations
Request
| X-Developer-Id | developer id |
| X-Api-Key | api key |
| Authorization | Bearer {{access_token}} |
| OrganizationId | integer |
| Id | integer |
| Name | string |
| StatusCode | StatusCode |
sample request
PUT /api/v2/client/locations HTTP/1.1
Host: api.sandbox.connectedcare.md
X-Developer-Id: {{apiDeveloperId}}
X-Api-Key: {{apiKey}}
Authorization: Bearer {{accessToken}}
cache-control: no-cache
Content-Type: application/json; charset=UTF-8
Postman-Token: c0acb400-6f5b-4685-b10e-1fa94f1fbbbd
{
"organizationId": 73,
"id": 87,
"name": "O2Loc3-1",
"statusCode": 1
}
------WebKitFormBoundary7MA4YWxkTrZu0gW--
sample response:
{
"data": [
{
"name": "O2Loc3-1",
"organizationId": 73,
"id": 87,
"statusCode": 1,
"createdDate": "2019-01-03T19:00:54.487Z",
"modifiedDate": "2019-01-03T19:20:00.1017855Z",
"createdByUserId": 31630,
"modifiedByUserId": 31630
}
],
"total": 1
}