Using Foundation Service REST APIs
The Foundation Service contains REST APIs that you can use in your application to fetch the Foundation data and associations and feed the data to the consuming applications.
Foundation Service provides the following types of APIs:
- Common REST APIs that enable developers to get Foundation data and associations.
- Specific REST APIs that enable developers to consume only the Foundation constructs and data.
Using the REST APIs, you can get the following Foundation data:
- Person data such as profile photo, primary site, department, and support group.
- Organization data such as the following:
- Organization name and organization ID.
- Primary organization data such as operating organization, service provider, manufacturer, and vendor organizations.
- Secondary organization data such as business unit, department, and support group.
- Category data.
- Location data such as region, site, and site area.
For more information about Foundation data, see Creating-or-modifying-Foundation-data.
Types of Foundation Service APIs
The following table provides information about the Foundation Service APIs:
API | Description |
---|---|
To retrieve Person data | |
Gets the details of any person within the organization. The person can be an employee, agent, customer, or vendor. | |
Gets the contact details of any person within the organization by using the person ID. The person can be an employee, agent, customer, or vendor. | |
Gets the contact details of any person that matches the search criteria. The person can be an employee, agent, customer, or vendor. | |
Gets the details of persons who are associated with a specific organization. | |
To retrieve Organization data | |
Gets details of any type of organization. | |
Gets all the organizations of a specific type by searching with the organization type. | |
Gets details of any type of organization by using the organization ID. | |
To retrieve Categorization data | |
Get details of all categories that match the search criteria. | |
Get details of any type of category by using the category ID. | |
To retrieve Region data | |
Gets details of all the regions that match the search criteria. | |
Gets the details of any region by using the region ID. | |
To retrieve Site data | |
Gets the details of all sites that match the search criteria. | |
Gets details of a site by using the site ID. | |
Gets the persons associated with a specific site ID. | |
Gets the organizations that are associated with a site by using the site ID. | |
To retrieve Site Area data | |
Gets the site areas that are associated with a site by using the site ID. | |
Gets the details of all the site areas that match the search criteria. | |
Gets details of a site area by using the site area ID. |
Sample response
All the GET Foundation Service APIs have similar response format. The following code snippet illustrates a sample JSON that is returned by a GET Foundation Service REST API:
"value": "Employee",
"id": 300
}
"fullName": "Bob Baxter",
"thumbnail": "iVBORw0KGgoAAAAN…",
"primaryEmail": "B.Baxter@calbroservices.com",
"primaryPhone": "1 212 555-5454 (22)",
"loginId": "Bob",
"personId": "PPL000000000014",
"id": "d0820c35-e959-416c-96d5-b3eeb959e2aa",
"isManager": "true",
"VIP": {
"id": 0,
"value": "false"
},
"primaryOrganization": {
"id": "1234567890",
"name": "Calbro Services",
},
"primarysite": {
"name": "Boston Support Center",
"address": {
"street": "1114 Eighth Avenue, 31st Floor",
"city": {
"name": "Buffalo",
"id": "52465637-dc21-427f-b408-b488297483d8"
},
"state": {
"name": "New York",
"id": "52465637-dc21-427f-b408-b488297483d7"
},
"country": {
"name": "United States",
"id": "52465637-dc21-427f-b408-b488297483d6"
},
"zip": "10036"
},
"region": {
"name": "Americas",
"id": "GUIDRGN"
}
},
"createdBy": "rmitcham1705",
"createdDate": "2017-03-07T19:02:38.000Z",
"modifiedBy": "rmitcham1705",
"modifiedDate": "2017-03-07T19:02:38.000Z",
}