POST v1/imports/training-documents?importAction={importAction}&allowSameFile={allowSameFile}
Import Training Documents
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| importAction |
The import action. |
ImportAction |
Default value is Insert |
| allowSameFile |
Determines if the import allows the content to be imported multiple times |
boolean |
Default value is True |
Body Parameters
The items to import.
Collection of EmployeeTrainingDocumentImportDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| SerializableTrainingKey | globally unique identifier |
None. |
|
| Documents | Collection of DivisionDocumentSubImportDTO |
None. |
|
| EmployeeNumber | string |
None. |
|
| EmployeePersonalId | integer |
None. |
|
| DivisionCode | string |
None. |
|
| CompanyCode | string |
Required |
Request Formats
application/json, text/json
Sample:
[
{
"serializableTrainingKey": "c5062277-8c32-45f3-aec3-df1f91d6c5a1",
"trainingKey": "c5062277-8c32-45f3-aec3-df1f91d6c5a1",
"documents": [
{
"content": "QEA=",
"name": "sample string 1",
"sourcePath": "sample string 2",
"mimeType": "sample string 3",
"documentTypeCode": "sample string 4"
},
{
"content": "QEA=",
"name": "sample string 1",
"sourcePath": "sample string 2",
"mimeType": "sample string 3",
"documentTypeCode": "sample string 4"
}
],
"employeeNumber": "sample string 2",
"employeePersonalId": 1,
"divisionCode": "sample string 3",
"companyCode": "sample string 4"
},
{
"serializableTrainingKey": "c5062277-8c32-45f3-aec3-df1f91d6c5a1",
"trainingKey": "c5062277-8c32-45f3-aec3-df1f91d6c5a1",
"documents": [
{
"content": "QEA=",
"name": "sample string 1",
"sourcePath": "sample string 2",
"mimeType": "sample string 3",
"documentTypeCode": "sample string 4"
},
{
"content": "QEA=",
"name": "sample string 1",
"sourcePath": "sample string 2",
"mimeType": "sample string 3",
"documentTypeCode": "sample string 4"
}
],
"employeeNumber": "sample string 2",
"employeePersonalId": 1,
"divisionCode": "sample string 3",
"companyCode": "sample string 4"
}
]
text/xml
Sample:
<ArrayOfEmployeeTrainingDocumentImportDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BDBPayroll.Integration.ServiceContracts.Data.Models">
<EmployeeTrainingDocumentImportDTO>
<CompanyCode>sample string 4</CompanyCode>
<DivisionCode>sample string 3</DivisionCode>
<EmployeeNumber>sample string 2</EmployeeNumber>
<EmployeePersonalId>1</EmployeePersonalId>
<Documents>
<DivisionDocumentSubImportDTO>
<Content>QEA=</Content>
<DocumentTypeCode>sample string 4</DocumentTypeCode>
<MimeType>sample string 3</MimeType>
<Name>sample string 1</Name>
<SourcePath>sample string 2</SourcePath>
</DivisionDocumentSubImportDTO>
<DivisionDocumentSubImportDTO>
<Content>QEA=</Content>
<DocumentTypeCode>sample string 4</DocumentTypeCode>
<MimeType>sample string 3</MimeType>
<Name>sample string 1</Name>
<SourcePath>sample string 2</SourcePath>
</DivisionDocumentSubImportDTO>
</Documents>
<SerializableTrainingKey>c5062277-8c32-45f3-aec3-df1f91d6c5a1</SerializableTrainingKey>
<TrainingKey xmlns:d3p1="http://schemas.datacontract.org/2004/07/BDBPayroll.Services.Data.Shared.Keys">
<d3p1:_entityKey>
<d3p1:_hasValue>true</d3p1:_hasValue>
<d3p1:_value>c5062277-8c32-45f3-aec3-df1f91d6c5a1</d3p1:_value>
</d3p1:_entityKey>
</TrainingKey>
</EmployeeTrainingDocumentImportDTO>
<EmployeeTrainingDocumentImportDTO>
<CompanyCode>sample string 4</CompanyCode>
<DivisionCode>sample string 3</DivisionCode>
<EmployeeNumber>sample string 2</EmployeeNumber>
<EmployeePersonalId>1</EmployeePersonalId>
<Documents>
<DivisionDocumentSubImportDTO>
<Content>QEA=</Content>
<DocumentTypeCode>sample string 4</DocumentTypeCode>
<MimeType>sample string 3</MimeType>
<Name>sample string 1</Name>
<SourcePath>sample string 2</SourcePath>
</DivisionDocumentSubImportDTO>
<DivisionDocumentSubImportDTO>
<Content>QEA=</Content>
<DocumentTypeCode>sample string 4</DocumentTypeCode>
<MimeType>sample string 3</MimeType>
<Name>sample string 1</Name>
<SourcePath>sample string 2</SourcePath>
</DivisionDocumentSubImportDTO>
</Documents>
<SerializableTrainingKey>c5062277-8c32-45f3-aec3-df1f91d6c5a1</SerializableTrainingKey>
<TrainingKey xmlns:d3p1="http://schemas.datacontract.org/2004/07/BDBPayroll.Services.Data.Shared.Keys">
<d3p1:_entityKey>
<d3p1:_hasValue>true</d3p1:_hasValue>
<d3p1:_value>c5062277-8c32-45f3-aec3-df1f91d6c5a1</d3p1:_value>
</d3p1:_entityKey>
</TrainingKey>
</EmployeeTrainingDocumentImportDTO>
</ArrayOfEmployeeTrainingDocumentImportDTO>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
The results of the import.
ImportResultDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| NewRecords | integer |
None. |
|
| UpdatedRecords | integer |
None. |
|
| Errors | Collection of ImportErrorDTO |
None. |
|
| NewRecordKeys | Collection of ImportKeyDTO |
None. |
|
| UpdatedRecordKeys | Collection of ImportKeyDTO |
None. |
|
| ImportKey | GlobalEntityKeyOfIImportSubmission |
None. |
Response Formats
application/json, text/json, text/xml
Sample:
Sample not available.