POST v1/imports/employee-pto-histories?action={action}&allowSameFile={allowSameFile}
Imports PTO Histories
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| action |
The import action. |
ImportAction |
Default value is Replace |
| 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 EmployeePTOHistoryImportDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| PTOCode | string |
None. |
|
| CheckDate | date |
None. |
|
| RunNumber | integer |
None. |
|
| TakenThisPeriod | decimal number |
None. |
|
| AccruedThisPeriod | decimal number |
None. |
|
| PendingThisPeriod | decimal number |
None. |
|
| Allowed | decimal number |
None. |
|
| Taken | decimal number |
None. |
|
| Pending | decimal number |
None. |
|
| AccrualToDate | decimal number |
None. |
|
| EmployeeNumber | string |
None. |
|
| EmployeePersonalId | integer |
None. |
|
| DivisionCode | string |
None. |
|
| CompanyCode | string |
Required |
Request Formats
application/json, text/json
Sample:
[
{
"ptoCode": "sample string 1",
"checkDate": "0001-02-03",
"runNumber": 2,
"takenThisPeriod": 3.0,
"accruedThisPeriod": 4.0,
"pendingThisPeriod": 5.0,
"allowed": 6.0,
"taken": 7.0,
"pending": 8.0,
"accrualToDate": 9.0,
"employeeNumber": "sample string 10",
"employeePersonalId": 1,
"divisionCode": "sample string 11",
"companyCode": "sample string 12"
},
{
"ptoCode": "sample string 1",
"checkDate": "0001-02-03",
"runNumber": 2,
"takenThisPeriod": 3.0,
"accruedThisPeriod": 4.0,
"pendingThisPeriod": 5.0,
"allowed": 6.0,
"taken": 7.0,
"pending": 8.0,
"accrualToDate": 9.0,
"employeeNumber": "sample string 10",
"employeePersonalId": 1,
"divisionCode": "sample string 11",
"companyCode": "sample string 12"
}
]
text/xml
Sample:
<ArrayOfEmployeePTOHistoryImportDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BDBPayroll.Integration.ServiceContracts.Data.Models">
<EmployeePTOHistoryImportDTO>
<CompanyCode>sample string 12</CompanyCode>
<DivisionCode>sample string 11</DivisionCode>
<EmployeeNumber>sample string 10</EmployeeNumber>
<EmployeePersonalId>1</EmployeePersonalId>
<AccrualToDate>9</AccrualToDate>
<AccruedThisPeriod>4</AccruedThisPeriod>
<Allowed>6</Allowed>
<CheckDate xmlns:d3p1="http://schemas.datacontract.org/2004/07/EntireOne.Shared.Dates">
<d3p1:Year>1</d3p1:Year>
<d3p1:Month>2</d3p1:Month>
<d3p1:Day>3</d3p1:Day>
</CheckDate>
<PTOCode>sample string 1</PTOCode>
<Pending>8</Pending>
<PendingThisPeriod>5</PendingThisPeriod>
<RunNumber>2</RunNumber>
<Taken>7</Taken>
<TakenThisPeriod>3</TakenThisPeriod>
</EmployeePTOHistoryImportDTO>
<EmployeePTOHistoryImportDTO>
<CompanyCode>sample string 12</CompanyCode>
<DivisionCode>sample string 11</DivisionCode>
<EmployeeNumber>sample string 10</EmployeeNumber>
<EmployeePersonalId>1</EmployeePersonalId>
<AccrualToDate>9</AccrualToDate>
<AccruedThisPeriod>4</AccruedThisPeriod>
<Allowed>6</Allowed>
<CheckDate xmlns:d3p1="http://schemas.datacontract.org/2004/07/EntireOne.Shared.Dates">
<d3p1:Year>1</d3p1:Year>
<d3p1:Month>2</d3p1:Month>
<d3p1:Day>3</d3p1:Day>
</CheckDate>
<PTOCode>sample string 1</PTOCode>
<Pending>8</Pending>
<PendingThisPeriod>5</PendingThisPeriod>
<RunNumber>2</RunNumber>
<Taken>7</Taken>
<TakenThisPeriod>3</TakenThisPeriod>
</EmployeePTOHistoryImportDTO>
</ArrayOfEmployeePTOHistoryImportDTO>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
The result 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
Sample:
{
"newRecords": 1,
"updatedRecords": 2,
"errors": [
{
"index": 1,
"details": [
{
"propertyName": "sample string 1",
"arrayIndex": 1,
"errorMessages": [
"sample string 1",
"sample string 2"
]
},
{
"propertyName": "sample string 1",
"arrayIndex": 1,
"errorMessages": [
"sample string 1",
"sample string 2"
]
}
]
},
{
"index": 1,
"details": [
{
"propertyName": "sample string 1",
"arrayIndex": 1,
"errorMessages": [
"sample string 1",
"sample string 2"
]
},
{
"propertyName": "sample string 1",
"arrayIndex": 1,
"errorMessages": [
"sample string 1",
"sample string 2"
]
}
]
}
],
"newRecordKeys": [
{
"index": 1,
"key": "sample string 2"
},
{
"index": 1,
"key": "sample string 2"
}
],
"updatedRecordKeys": [
{
"index": 1,
"key": "sample string 2"
},
{
"index": 1,
"key": "sample string 2"
}
],
"importKey": "<empty>"
}
text/xml
Sample:
<ImportResultDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BDBPayroll.Integration.Data.Models">
<Errors>
<ImportErrorDTO>
<Details>
<ImportErrorDetailsDTO>
<ArrayIndex>1</ArrayIndex>
<ErrorMessages xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>sample string 1</d6p1:string>
<d6p1:string>sample string 2</d6p1:string>
</ErrorMessages>
<PropertyName>sample string 1</PropertyName>
</ImportErrorDetailsDTO>
<ImportErrorDetailsDTO>
<ArrayIndex>1</ArrayIndex>
<ErrorMessages xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>sample string 1</d6p1:string>
<d6p1:string>sample string 2</d6p1:string>
</ErrorMessages>
<PropertyName>sample string 1</PropertyName>
</ImportErrorDetailsDTO>
</Details>
<Index>1</Index>
</ImportErrorDTO>
<ImportErrorDTO>
<Details>
<ImportErrorDetailsDTO>
<ArrayIndex>1</ArrayIndex>
<ErrorMessages xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>sample string 1</d6p1:string>
<d6p1:string>sample string 2</d6p1:string>
</ErrorMessages>
<PropertyName>sample string 1</PropertyName>
</ImportErrorDetailsDTO>
<ImportErrorDetailsDTO>
<ArrayIndex>1</ArrayIndex>
<ErrorMessages xmlns:d6p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d6p1:string>sample string 1</d6p1:string>
<d6p1:string>sample string 2</d6p1:string>
</ErrorMessages>
<PropertyName>sample string 1</PropertyName>
</ImportErrorDetailsDTO>
</Details>
<Index>1</Index>
</ImportErrorDTO>
</Errors>
<ImportKey xmlns:d2p1="http://schemas.datacontract.org/2004/07/BDBPayroll.Services.Data.Shared.Keys">
<d2p1:_entityKey>
<d2p1:_hasValue>false</d2p1:_hasValue>
<d2p1:_value>00000000-0000-0000-0000-000000000000</d2p1:_value>
</d2p1:_entityKey>
</ImportKey>
<NewRecordKeys>
<ImportKeyDTO>
<Index>1</Index>
<Key>sample string 2</Key>
</ImportKeyDTO>
<ImportKeyDTO>
<Index>1</Index>
<Key>sample string 2</Key>
</ImportKeyDTO>
</NewRecordKeys>
<NewRecords>1</NewRecords>
<UpdatedRecordKeys>
<ImportKeyDTO>
<Index>1</Index>
<Key>sample string 2</Key>
</ImportKeyDTO>
<ImportKeyDTO>
<Index>1</Index>
<Key>sample string 2</Key>
</ImportKeyDTO>
</UpdatedRecordKeys>
<UpdatedRecords>2</UpdatedRecords>
</ImportResultDTO>