Create or update one or more site.

post

/<irt_study>/api/sites

Request

Supported Media Types
  • application/json
  • text/json
  • application/xml
  • text/xml
Body Parameter
List of sites.
Root Schema : /paths/~1api~1sites/post/parameters/0/schema
Type: array
Nested Schema : SiteDto
Type: object
Nested Schema : ErrorMessages
Type: array
Error list.
Nested Schema : ErrorDto
Type: object

Response

Supported Media Types
  • application/json
  • text/json
  • application/xml
  • text/xml
200 Response
The sites have been created/updated successfully.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[UserDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
201 Response
The sites have been created successfully.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[UserDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
204 Response
The response has no content.
Body
Root Schema : /paths/~1api~1sites/post/responses/204/schema
Type: string
207 Response
The request ran successfully, but some records had errors.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[UserDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : UserDto
Type: object
Nested Schema : ErrorMessages
Type: array
The error details.
400 Response
The request could not be understood by the server due to malformed syntax.
Body
Root Schema : /paths/~1api~1sites/post/responses/400/schema
Type: string
401 Response
User authentication or authorization failed.
Body
Root Schema : /paths/~1api~1sites/post/responses/401/schema
Type: string
404 Response
The requested resource was not found.
Body
Root Schema : /paths/~1api~1sites/post/responses/404/schema
Type: string
417 Response
User creation/update failed because the records have errors.
Body
The class process Users/Sites and creates response to send back
Root Schema : ResponseModel[SiteDto]
Type: object
The class process Users/Sites and creates response to send back
Nested Schema : CommonExceptions
Type: array
Read Only: true
The list of errors that occurred while transforming the payload that fails the entire transaction.
Nested Schema : Records
Type: array
The total number of records processed in the request.
Nested Schema : ErrorDto
Type: object
Nested Schema : SiteDto
Type: object
Nested Schema : ErrorMessages
Type: array
Error list.
500 Response
The server encountered an unexpected error.
Body
Root Schema : /paths/~1api~1sites/post/responses/500/schema
Type: string

Examples

The following example submits a POST request.

API URL

http://localhost:65385/IrtStudy/api/sites/post

Example of Request Body

The following example shows the request sent in JSON format.

[
  {
    "SiteId": "208",
    "InvestigatorId": "1289003",
    "InvestigatorFirstName": "John",
    "InvestigatorLastName": "Doe",
    "Address1": "123 Main Street",
    "Address2": "456 Main Street",
    "Address3": "789 Main Street",
    "City": "Broomal",
    "State": "PA",
    "Zip": "18976",
    "CountryId": "USA",
    "ShipPhone": "1239809118",
    "ShipFax": "12398098111",
    "ShipName": "Marysya",
    "ShipEmail": "john.doe@oracle.com",
    "ShipNote": "just note",
    "TimeZone": "Eastern Standard Time",
    "ExternalId": "1233229",
    "DEARegistrationNumber": "ab1234568",
    "DEAExpiration": "2018-05-25T14:01:06.439617-04:00"
  }
]

Example of Response Body

The following example shows the response returned in JSON format.

{
  "Transaction": "4706050217164838947",
  "Records": [
    {
      "Key": "7ac180e6-d840-4d4e-91cc-e70a14839ef2",
      "ErrorCount": 0,
      "ErrorMessages": [],
      "IsSuccessful": true,
      "SiteId": "208",
      "InvestigatorId": "1289003",
      "InvestigatorFirstName": "John",
      "InvestigatorLastName": "Doe",
      "Address1": "123 Main Street",
      "Address2": "456 Main Street",
      "Address3": "789 Main Street",
      "City": "Broomal",
      "State": "PA",
      "Zip": "18976",
      "CountryId": "USA",
      "ShipPhone": "1239809118",
      "ShipFax": "12398098111",
      "ShipName": "Marysya",
      "ShipEmail": "john.doe@oracle.com",
      "ShipNote": "just note",
      "TimeZone": "Eastern Standard Time",
      "ExternalId": "1233229",
      "DEARegistrationNumber": "ab1234568",
      "DEAExpiration": "2018-05-25T14:01:06.439617-04:00"
    }
  ],
  "CommonExceptions": [],
  "SuccessfulRecords": 1,
  "HasExceptions": false
}