Trendsic Platform Service

<back to all web services

CertifiedPayrollListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/certified-payroll
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CertifiedPayrollLine:
    certified_payroll_line_i_d: int = 0
    certified_payroll_i_d: int = 0
    worker_name: Optional[str] = None
    contact_i_d: Optional[int] = None
    classification: Optional[str] = None
    hours_s_t: Decimal = decimal.Decimal(0)
    hours_o_t: Decimal = decimal.Decimal(0)
    base_rate: Decimal = decimal.Decimal(0)
    fringe_rate: Decimal = decimal.Decimal(0)
    fringe_cash_rate: Decimal = decimal.Decimal(0)
    fringe_plan_rate: Decimal = decimal.Decimal(0)
    gross_pay: Decimal = decimal.Decimal(0)
    flagged: bool = False
    restitution_amount: Decimal = decimal.Decimal(0)
    restitution_note: Optional[str] = None
    required_base: Decimal = decimal.Decimal(0)
    required_fringe: Decimal = decimal.Decimal(0)
    sort_order: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CertifiedPayroll:
    certified_payroll_i_d: int = 0
    certified_payroll_u_i_d: Optional[str] = None
    project_i_d: int = 0
    payroll_number: int = 0
    week_ending: Optional[datetime.datetime] = None
    status: Optional[str] = None
    dbe_participation_pct: Decimal = decimal.Decimal(0)
    dbe_goal_pct: Decimal = decimal.Decimal(0)
    ojt_apprentice_hours: Decimal = decimal.Decimal(0)
    ojt_apprentice_goal_hours: Decimal = decimal.Decimal(0)
    worker_count: int = 0
    total_hours_s_t: Decimal = decimal.Decimal(0)
    total_hours_o_t: Decimal = decimal.Decimal(0)
    total_gross_pay: Decimal = decimal.Decimal(0)
    flagged_count: int = 0
    submitted_by: Optional[str] = None
    submitted_at: Optional[datetime.datetime] = None
    created_by: Optional[str] = None
    created_at: Optional[datetime.datetime] = None
    updated_at: Optional[datetime.datetime] = None
    lines: List[CertifiedPayrollLine] = field(default_factory=list)
    determination_no: Optional[str] = None
    determination_type: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CertifiedPayrollListResponse:
    response_status: Optional[ResponseStatus] = None
    project_i_d: int = 0
    payrolls: List[CertifiedPayroll] = field(default_factory=list)


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CertifiedPayrollListRequest:
    project_i_d: int = 0

Python CertifiedPayrollListRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/projects/{ProjectID}/certified-payroll HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	ProjectID: 0,
	Payrolls: 
	[
		{
			CertifiedPayrollID: 0,
			CertifiedPayrollUID: 00000000000000000000000000000000,
			ProjectID: 0,
			PayrollNumber: 0,
			WeekEnding: 0001-01-01,
			Status: String,
			DbeParticipationPct: 0,
			DbeGoalPct: 0,
			OjtApprenticeHours: 0,
			OjtApprenticeGoalHours: 0,
			WorkerCount: 0,
			TotalHoursST: 0,
			TotalHoursOT: 0,
			TotalGrossPay: 0,
			FlaggedCount: 0,
			SubmittedBy: String,
			SubmittedAt: 0001-01-01,
			CreatedBy: String,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			Lines: 
			[
				{
					CertifiedPayrollLineID: 0,
					CertifiedPayrollID: 0,
					WorkerName: String,
					ContactID: 0,
					Classification: String,
					HoursST: 0,
					HoursOT: 0,
					BaseRate: 0,
					FringeRate: 0,
					FringeCashRate: 0,
					FringePlanRate: 0,
					GrossPay: 0,
					Flagged: False,
					RestitutionAmount: 0,
					RestitutionNote: String,
					RequiredBase: 0,
					RequiredFringe: 0,
					SortOrder: 0
				}
			],
			DeterminationNo: String,
			DeterminationType: String
		}
	]
}