Getting Started
Before you can integrate with PhlexTMF you must have a PhlexTMF system with API access enabled. For more information about access to the PhlexTMF API please contact your Client Engagement Manager.
Accessing the API
The API is available over HTTPS and is located at https://{client}-api.phlextmf.com/auth/v5/auth/login.
The API accepts payloads in JSON. You must use the Accepts header (application/json) to indicate this.
All dates should be provided in the format dd-MMM-yyyy (for example 30-Jul-1966) unless the system has been configured otherwise, in which case the appropriate date format will have been provided by Phlexglobal.
POST /attributes/v5/attributes/protocol/values HTTP 1.1
Accept: application/json
Authorization: Bearer 191QMi...
{
"value": "PG-001",
"status": 1,
"relations": {
"Product": "TestProduct"
}
}
HTTP/1.1 201 Created
{
"id": 900000000285,
"attributeId": 5,
"attributeDisplayName": "Protocol",
"attributeRefName": "PROTOCOL",
"attributeFieldName": "protocol",
"value": "PG-001",
"status": 1
}
Where multiple values are returned, the data will be either returned as an array or encapsulated in an ApiPagedListResult node, depending upon the purpose of the endpoint.
The below example shows data encapsulated in an ApiPagedListResult node:
GET /attributes/v5/attributes/protocol/values HTTP 1.1
HTTP/1.1 200 OK
{
"data": [
{
"id": 8,
"attributeId": 5,
"attributeDisplayName": "Protocol",
"attributeRefName": "PROTOCOL",
"attributeFieldName": "protocol",
"value": "TestProtocol1",
"status": 1
},
{
"id": 9,
"attributeId": 5,
"attributeDisplayName": "Protocol",
"attributeRefName": "PROTOCOL",
"attributeFieldName": "protocol",
"value": "TestProtocol2",
"status": 1
},
...
],
"paging": {
"offset": 0,
"limit": 100,
"totalItemCount": 21
}
}
If there is no data to be returned when performing a search request, the response should be a 200 OK with an empty ApiPagedListResult node:
GET /attributes/v5/attributes/protocol/values?filter=value eq 'DoesNotExist' HTTP 1.1
HTTP/1.1 200 OK
{
"data": [],
"paging": {
"offset": 0,
"limit": 100,
"totalItemCount": 0
}
}
If there is no data to be returned when performing a get by the identifier, the response should be a 404 Not Found:
GET /attributes/v5/attributes/protocol/values/1234 HTTP 1.1
HTTP/1.1 404 Not Found
{
"errorType": "RESOURCE_NOT_FOUND",
"message": "The metadata value requested was not found",
"exception": null
}
Authentication
To grant access to the PhlexTMF resources, you need to use the Auth POST endpoint to log into the system and fetch a JSON web token.
Create a POST request to the method's /auth/login URI. For example:
POST /auth/v5/auth/login HTTP/1.1
Host: client-api.phlextmf.com
Content-Type: application/json
{"Username":"[email protected]","Password":"c113ntPa55w0Rd!"}
If the credentials are correct, the API returns a 200 response code indicating the JSON web token has been successfully returned.
Use this token in all subsequent calls via the HTTP Authorization header:
GET /documents/v5/documents/1000004554 HTTP/1.1
Host: client-api.phlextmf.com
Authorization: bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
API Structure
The PhlexTMF API is structured into several different sections depending upon the resource being accessed.
API | Description |
---|---|
Authorisation | Used for logging in and acquiring a JSON web token for API requests. |
Attributes | The set of metadata that can be associated with documents, for example sites, countries and protocols. The Attributes API enables the retrieval of these attributes and the creation, modification and retrieval of their values within the system. |
Documents | An API for creation and management of documents within the PhlexTMF system. |
Milestones | Milestones are a representation of key dates against entities within the system. Only certain objects (namely sites, protocols and countries) are permitted to have milestones, which are used in completeness reporting and understanding expected dates for documents. The Milestones API allows the update and retrieval of an object's milestones and milestone types. |
Events | Events allow for the registration of additional expected documentation within the system, for example when new site personnel are employed in a study or when protocols are amended. Only certain objects (namely sites, protocols and counties) are permitted to have events raised against them and the event types must already exist within the system. The Events API allows for the retrieval of event types and the creation of events. |
Reports | PhlexTMF reporting can present information on study-specific content, user activity or business-related performance. Users access the appropriate data with standard system-generated reports, or from lists generated in the Documents screen. All reports can be saved to enable you to rerun your favourite reports without having to redefine them each time, and their content exported to Excel for further analysis and comparison. |