POST v1/copy/payrolls?importAction={importAction}
Copy Payrolls
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| importAction |
The import action. |
ImportAction |
Default value is Replace |
Body Parameters
The items to copy.
Collection of CopyPayrollDTO| Name | Description | Type | Additional information |
|---|---|---|---|
| SourceCheckDate | date |
None. |
|
| SourceRunNumber | integer |
None. |
|
| SourceBatchCode | string |
None. |
|
| TargetCheckDate | date |
None. |
|
| TargetRunNumber | integer |
None. |
|
| TargetBatchCode | string |
None. |
|
| CreateTargetBatch | boolean |
None. |
|
| TargetBatch | CopyPayBatchSubDTO |
None. |
|
| DivisionCode | string |
None. |
|
| CompanyCode | string |
Required |
Request Formats
application/json, text/json
Sample:
[
{
"sourceCheckDate": "0001-02-03",
"sourceRunNumber": 1,
"sourceBatchCode": "sample string 2",
"targetCheckDate": "0001-02-03",
"targetRunNumber": 3,
"targetBatchCode": "sample string 4",
"createTargetBatch": true,
"targetBatch": {
"description": "sample string 1",
"checkTypeCode": "sample string 2",
"employeeSortCode": "sample string 3",
"gridCode": "sample string 4",
"blockScheduledEarnings": true,
"blockAdditionalTax": true,
"blockAutoPay": true,
"payGroupCode": "sample string 5"
},
"divisionCode": "sample string 6",
"companyCode": "sample string 7"
},
{
"sourceCheckDate": "0001-02-03",
"sourceRunNumber": 1,
"sourceBatchCode": "sample string 2",
"targetCheckDate": "0001-02-03",
"targetRunNumber": 3,
"targetBatchCode": "sample string 4",
"createTargetBatch": true,
"targetBatch": {
"description": "sample string 1",
"checkTypeCode": "sample string 2",
"employeeSortCode": "sample string 3",
"gridCode": "sample string 4",
"blockScheduledEarnings": true,
"blockAdditionalTax": true,
"blockAutoPay": true,
"payGroupCode": "sample string 5"
},
"divisionCode": "sample string 6",
"companyCode": "sample string 7"
}
]
text/xml
Sample:
<ArrayOfCopyPayrollDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BDBPayroll.Integration.ServiceContracts.Data.Models">
<CopyPayrollDTO>
<CompanyCode>sample string 7</CompanyCode>
<DivisionCode>sample string 6</DivisionCode>
<CreateTargetBatch>true</CreateTargetBatch>
<SourceBatchCode>sample string 2</SourceBatchCode>
<SourceCheckDate 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>
</SourceCheckDate>
<SourceRunNumber>1</SourceRunNumber>
<TargetBatch>
<BlockAdditionalTax>true</BlockAdditionalTax>
<BlockAutoPay>true</BlockAutoPay>
<BlockScheduledEarnings>true</BlockScheduledEarnings>
<CheckTypeCode>sample string 2</CheckTypeCode>
<Description>sample string 1</Description>
<EmployeeSortCode>sample string 3</EmployeeSortCode>
<GridCode>sample string 4</GridCode>
<PayGroupCode>sample string 5</PayGroupCode>
</TargetBatch>
<TargetBatchCode>sample string 4</TargetBatchCode>
<TargetCheckDate 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>
</TargetCheckDate>
<TargetRunNumber>3</TargetRunNumber>
</CopyPayrollDTO>
<CopyPayrollDTO>
<CompanyCode>sample string 7</CompanyCode>
<DivisionCode>sample string 6</DivisionCode>
<CreateTargetBatch>true</CreateTargetBatch>
<SourceBatchCode>sample string 2</SourceBatchCode>
<SourceCheckDate 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>
</SourceCheckDate>
<SourceRunNumber>1</SourceRunNumber>
<TargetBatch>
<BlockAdditionalTax>true</BlockAdditionalTax>
<BlockAutoPay>true</BlockAutoPay>
<BlockScheduledEarnings>true</BlockScheduledEarnings>
<CheckTypeCode>sample string 2</CheckTypeCode>
<Description>sample string 1</Description>
<EmployeeSortCode>sample string 3</EmployeeSortCode>
<GridCode>sample string 4</GridCode>
<PayGroupCode>sample string 5</PayGroupCode>
</TargetBatch>
<TargetBatchCode>sample string 4</TargetBatchCode>
<TargetCheckDate 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>
</TargetCheckDate>
<TargetRunNumber>3</TargetRunNumber>
</CopyPayrollDTO>
</ArrayOfCopyPayrollDTO>
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
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>