Trendsic Platform Service

<back to all web services

PayApplicationListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/pay-apps
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 PayApplicationLine:
    pay_application_line_i_d: int = 0
    pay_application_i_d: int = 0
    cost_code: Optional[str] = None
    description: Optional[str] = None
    scheduled_value: Decimal = decimal.Decimal(0)
    from_previous_pct: Decimal = decimal.Decimal(0)
    this_period_pct: Decimal = decimal.Decimal(0)
    stored_materials: Decimal = decimal.Decimal(0)
    is_change_order: bool = False
    change_order_i_d: Optional[int] = None
    sort_order: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PayApplication:
    pay_application_i_d: int = 0
    pay_application_u_i_d: Optional[str] = None
    project_i_d: int = 0
    period_number: int = 0
    period_start: Optional[datetime.datetime] = None
    period_end: Optional[datetime.datetime] = None
    status: Optional[str] = None
    billing_template: Optional[str] = None
    retainage_pct: Decimal = decimal.Decimal(0)
    original_contract_sum: Decimal = decimal.Decimal(0)
    net_change_by_c_o: Decimal = decimal.Decimal(0)
    contract_sum_to_date: Decimal = decimal.Decimal(0)
    completed_stored_to_date: Decimal = decimal.Decimal(0)
    retainage_amount: Decimal = decimal.Decimal(0)
    earned_less_retainage: Decimal = decimal.Decimal(0)
    less_previous_certificates: Decimal = decimal.Decimal(0)
    current_payment_due: Decimal = decimal.Decimal(0)
    balance_to_finish: Decimal = decimal.Decimal(0)
    invoice_i_d: Optional[int] = None
    certified_at: Optional[datetime.datetime] = None
    certified_by: Optional[str] = None
    created_by: Optional[str] = None
    created_at: Optional[datetime.datetime] = None
    updated_at: Optional[datetime.datetime] = None
    lines: List[PayApplicationLine] = field(default_factory=list)


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


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

Python PayApplicationListRequest 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}/pay-apps 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,
	Applications: 
	[
		{
			PayApplicationID: 0,
			PayApplicationUID: 00000000000000000000000000000000,
			ProjectID: 0,
			PeriodNumber: 0,
			PeriodStart: 0001-01-01,
			PeriodEnd: 0001-01-01,
			Status: String,
			BillingTemplate: String,
			RetainagePct: 0,
			OriginalContractSum: 0,
			NetChangeByCO: 0,
			ContractSumToDate: 0,
			CompletedStoredToDate: 0,
			RetainageAmount: 0,
			EarnedLessRetainage: 0,
			LessPreviousCertificates: 0,
			CurrentPaymentDue: 0,
			BalanceToFinish: 0,
			InvoiceID: 0,
			CertifiedAt: 0001-01-01,
			CertifiedBy: String,
			CreatedBy: String,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			Lines: 
			[
				{
					PayApplicationLineID: 0,
					PayApplicationID: 0,
					CostCode: String,
					Description: String,
					ScheduledValue: 0,
					FromPreviousPct: 0,
					ThisPeriodPct: 0,
					StoredMaterials: 0,
					IsChangeOrder: False,
					ChangeOrderID: 0,
					SortOrder: 0
				}
			]
		}
	]
}