NAV

eCOA

shell

MyVeeva External APIs

The Veeva eCOA APIs help integrate participant data from external systems into Veeva eCOA. Pulling in the data from external systems prevents errors that may be caused by manually reentering data.

Before You Begin

All operations in the Participant API require authentication. Before you attempt to call any of the APIs described, work with your project team to ensure that the Veeva eCOA system is properly configured to accept your calls.

Also work with your project team to obtain an external system key and secret for the system to be integrated. These credentials are issued by Veeva personnel and should be closely protected.

Depending on the architecture of the integrating system, the system key may represent a study, a customer, or some other business entity. Your project team will help you decide on a name for your external system key.

The project team will need the following information to create your study mapping and issue your external system key and secret:

Authentication

Authenticate your account using the following method: HTTP Authentication, scheme: bearer

Discovery

The Discovery API enables you to determine the regional domain where the study site exists in Veeva eCOA. The URL returned in the response will be used as the base URL for the next two calls.

Note that some studies may have sites in only one geographic region. If this is the case, you may be able to skip this discovery call. Your project team will help you determine whether this is the case.

Discover Study Site

Request

# You can also use wget
curl -X POST https://sponsors.myveeva.com/services/v24.3/discover-study-site \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST services/{version}/discover-study-site

Identify the regional URL to use for subsequent calls.

Note that the base URL for this API is https://sponsors.myveeva.com

Example JSON Request Body

{
  "externalSystemId": "mv-ext-NT-VeevaPharm-RTSM",
  "externalStudySiteId": "1005",
  "externalSponsorStudyId": "5c8684a9-f2ec-4c69-b4bc-16cd05450fc2"
}

Parameters

Name In Type Required Description
version path string true The version of the API you want to use for the request.
body body DiscoverStudySiteRequest true No description

Response

{
  "responseStatus": "SUCCESS",
  "responseMessage": "",
  "errorType": null,
  "errors": [

  ],
  "data": [
    {
      "region": "https://sponsors-us.myveeva.com/"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK DiscoverStudySiteResponse

Authorization

Authorize External

Request

# You can also use wget
curl -X POST https://sponsors-us.myveeva.com/auth/v24.3/authorize \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST auth/{version}/authorize

Validate and authorize external requests to access the Veeva eCOA API.

Note that the base URL is the region URL that was returned by the Discovery API.

Example JSON Request Body

{
  "externalSystemId": "mv-ext-NT-VeevaPharm-RTSM",
  "externalSystemSecret": "your-secret",
  "tenantId": "NT-VeevaPharm-RTSM"
}

Parameters

Name In Type Required Description
version path string true The version of the API you want to use for the request.
body body AuthorizeExternalRequest true No description

Response

{
  "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODY5MCIsInVzZXJuYW1lIjoiSm9obiIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTUxNjIzOTU0NywiZXhwIjoxNTE2MjQ1NTQ3fQ.r95Xz9056186h8530X93s0-86g_2-000000000000000000000000000000000000000000000000"
}

Responses

Status Meaning Description Schema
200 OK OK AuthorizeExternalResponse

Participants

The Veeva eCOA Participant API allows integrating systems to read and write participant data in Veeva eCOA.

The most common operation is the creation of participants. When you use the Veeva eCOA API to create participants, their participant IDs are controlled by the system that first created the participants, such as an RTSM application. Site users are prevented from manually updating the participant IDs in Veeva eCOA. If the participant ID is updated in the source system, the update should be pushed to Veeva eCOA using the API.

Get Participant

Request

# You can also use wget
curl -X GET https://sponsors-us.myveeva.com/services/v24.3/sponsor/5c8684a9-f2ec-4c69-b4bc-16cd05450fc2/site/1005/participant?internalId=925c6db2-b07b-49fe-8f92-0f6a2cb405a6 \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODY5MCIsInVzZXJuYW1lIjoiSm9obiIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTUxNjIzOTU0NywiZXhwIjoxNTE2MjQ1NTQ3fQ.r95Xz9056186h8530X93s0-86g_2-000000000000000000000000000000000000000000000000

GET services/{version}/sponsor/{sponsorStudyId}/site/{siteNum}/participant?internalId={internalId}

Retrieve participant information from Veeva eCOA.

Note that the base URL is the region URL that was returned by the Discovery API.

Parameters

Name In Type Required Description
version path string true The version of the API you want to use for the request.
sponsorStudyId path string true The globally unique ID in Veeva eCOA for the study sponsor.
siteNum path string true The globally unique ID in Veeva eCOA for the study site.
internalId query string true The unique ID for the participant in the calling system.

Response

{
  "responseStatus": "SUCCESS",
  "responseMessage": "",
  "errorType": null,
  "errors": [

  ],
  "data": [
    {
      "myVeevaParticipantId": "c8e85718-7c59-4ef6-8faa-45154ccdb58b",
      "participantId": "1005-003"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ParticipantExternalGetResponse

Create or Update Participant

Request

# You can also use wget
curl -X POST https://sponsors-us.myveeva.com/services/v24.3/sponsor/5c8684a9-f2ec-4c69-b4bc-16cd05450fc2/site/1005/participant \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODY5MCIsInVzZXJuYW1lIjoiSm9obiIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTUxNjIzOTU0NywiZXhwIjoxNTE2MjQ1NTQ3fQ.r95Xz9056186h8530X93s0-86g_2-000000000000000000000000000000000000000000000000

POST services/{version}/sponsor/{sponsorStudyId}/site/{siteNum}/participant

Creates and updates participant IDs in Veeva eCOA.

Note that the base URL is the region URL that was returned by the Discovery API.

Example JSON Request Body

{
  "participantId": "1005-003",
  "internalId": "925c6db2-b07b-49fe-8f92-0f6a2cb405a6"
}

Parameters

Name In Type Required Description
version path string true The version of the API you want to use for the request.
sponsorStudyId path string true The globally unique ID in Veeva eCOA for the study sponsor.
siteNum path string true The globally unique ID in Veeva eCOA for the study site.
body body ParticipantExternalPostRequest true No description

Response

{
  "responseStatus": "SUCCESS",
  "responseMessage": "",
  "errorType": null,
  "errors": [

  ],
  "data": [
    "c8e85718-7c59-4ef6-8faa-45154ccdb58b"
  ]
}

Responses

Status Meaning Description Schema
200 OK OK ParticipantExternalPostResponse

Schemas

DiscoverStudySiteRequest

{
  "externalSponsorStudyId": "5c8684a9-f2ec-4c69-b4bc-16cd05450fc2",
  "externalStudySiteId": "1005",
  "externalSystemId": "mv-ext-NT-VeevaPharm-RTSM"
}

Properties

Name Type Required Restrictions Description
externalSponsorStudyId string true none The study ID in the integrating system.
externalStudySiteId string true none The study site ID in the integrating system.
externalSystemId string true none The system ID in the integrating system.

DiscoverStudySiteResponse

{
  "responseStatus": "SUCCESS",
  "responseMessage": "",
  "errorType": null,
  "errors": [

  ],
  "data": [
    {
      "region": "https://sponsors-us.myveeva.com/"
    }
  ]
}

Properties

Name Type Required Restrictions Description
responseStatus string false none The response status of the request.
responseMessage string false none The API request error message.
errorType string false none The type of error that is displayed.
errors [Error] false none A container for the code and message sub-properties.
data [StudySiteData] true none A container for specific study site data sub-properties.

Enumerated Values

Property Value
errorType UNEXPECTED_ERROR
errorType INVALID_DATA
errorType NOT_FOUND
errorType INVALID_CONFIG

Error

{
  "code": "ID-0001",
  "message": "Invalid Data"
}

Properties

Name Type Required Restrictions Description
code string false none The error code associated with the error type.
message string false none The message that is displayed with each error type and code. When available, the error message includes the specific reason.

StudySiteData

{
  "region": "https://sponsors-us.myveeva.com/"
}

Properties

Name Type Required Restrictions Description
region string false none The regional domain (US, EU, or AP) where the relevant study site exists in Veeva eCOA. Determined by calling the Discovery API.

AuthorizeExternalRequest

{
  "externalSystemId": "mv-ext-NT-VeevaPharm-RTSM",
  "externalSystemSecret": "your-secret",
  "tenantId": "NT-VeevaPharm-RTSM"
}

Properties

Name Type Required Restrictions Description
externalSystemId string true none The ID associated with the integrating system. Your Veeva project team will provide you with this value.
externalSystemSecret string true none The integrating system secret. This secret should be kept confidential. Your Veeva project team will provide you with this value.
tenantId string true none The ID that represents the integrating entity that will be calling a given API. A variety of architectures are used, so it may represent a single study protocol, a customer, or another value. Your Veeva project team will provide you with this value.

AuthorizeExternalResponse

{
  "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODY5MCIsInVzZXJuYW1lIjoiSm9obiIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTUxNjIzOTU0NywiZXhwIjoxNTE2MjQ1NTQ3fQ.r95Xz9056186h8530X93s0-86g_2-000000000000000000000000000000000000000000000000"
}

Properties

Name Type Required Restrictions Description
jwt string true none The access token you need for authorization.

ParticipantExternalGetResponse

{
  "responseStatus": "SUCCESS",
  "responseMessage": "",
  "errorType": null,
  "errors": [

  ],
  "data": [
    {
      "myVeevaParticipantId": "c8e85718-7c59-4ef6-8faa-45154ccdb58b",
      "participantId": "101-0010"
    }
  ]
}

Properties

Name Type Required Restrictions Description
responseStatus string false none The response status of the request.
responseMessage string false none The API request error message.
errorType string false none The type of error that is displayed.
errors [Error] false none A container for the code and message sub-properties.
data [ParticipantData] true none A container for specific study site data sub-properties.

Enumerated Values

Property Value
errorType UNEXPECTED_ERROR
errorType INVALID_DATA
errorType NOT_FOUND
errorType INVALID_CONFIG

ParticipantData

{
  "myVeevaParticipantId": "c8e85718-7c59-4ef6-8faa-45154ccdb58b",
  "participantId": "1005-003"
}

Properties

Name Type Required Restrictions Description
myVeevaParticipantId string false none The unique participant ID from Veeva eCOA.
participantId string false none The unique participant ID in the integrating system.

ParticipantExternalPostRequest

{
  "participantId": "1005-003",
  "internalId": "925c6db2-b07b-49fe-8f92-0f6a2cb405a6"
}

Properties

Name Type Required Restrictions Description
participantId string true none The participant ID in the integrating system.
internalId string true none The unique ID for the participant in the calling system.

ParticipantExternalPostResponse

{
  "responseStatus": "SUCCESS",
  "responseMessage": "",
  "errorType": null,
  "errors": [

  ],
  "data": [
    "c8e85718-7c59-4ef6-8faa-45154ccdb58b"
  ]
}

Properties

Name Type Required Restrictions Description
responseStatus string false none The response status of the request.
responseMessage string false none The API request error message.
errorType string false none The type of error that is displayed.
errors [Error] false none A container for the code and message sub-properties.
data [string] true none A container that includes the myVeevaParticipantId value.

Enumerated Values

Property Value
errorType UNEXPECTED_ERROR
errorType INVALID_DATA
errorType NOT_FOUND
errorType INVALID_CONFIG

Errors

Failure Response

{
    "responseStatus": "FAILURE",
    "responseMessage": "NOT_FOUND: Mapping info not found",
    "errorType": "NOT_FOUND",
    "errors": [
        {
            "code": "NF-0002",
            "message": "External system ID or external sponsor study ID not found"
        }
    ],
    "data": []
}

The following HTTP response status codes are possible:

Error Code Meaning
200 OK
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your authentication token is wrong.
500 Internal Server Error -- There was a problem with our server.

If the request results in a 200 the response will includes a field called responseStatus. Possible values are:

A responseStatus other than SUCCESS will include an errorType field. Possible values are:

For a responseStatus other than SUCCESS, users can inspect the errors field in the response. Each error includes the following fields:

Error Types

UNEXPECTED_ERROR

Code Description
UE-0001 Unexpected Error

INVALID_DATA

Code Description
ID-0001 Invalid Data
ID-0002 Site is not associated to specified study
ID-0003 Participant already exists

NOT_FOUND

Code Description
NF-0001 Not Found
NF-0002 External system ID or external sponsor study ID not found
NF-0003 Study site not found
NF-0004 Participant not found

INVALID_CONFIG

Code Description
IC-0001 Invalid Configuration
IC-0002 External integration not enabled; contact Veeva for help
IC-0003 Integration mapping not found; contact Veeva for help