Trendsic Platform Service

<back to all web services

PayApplicationCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/projects/{ProjectID}/pay-apps

export class PayApplicationLine
{
    public PayApplicationLineID: number;
    public PayApplicationID: number;
    public CostCode: string;
    public Description: string;
    public ScheduledValue: number;
    public FromPreviousPct: number;
    public ThisPeriodPct: number;
    public StoredMaterials: number;
    public IsChangeOrder: boolean;
    public ChangeOrderID?: number;
    public SortOrder: number;

    public constructor(init?: Partial<PayApplicationLine>) { (Object as any).assign(this, init); }
}

export class PayApplication
{
    public PayApplicationID: number;
    public PayApplicationUID: string;
    public ProjectID: number;
    public PeriodNumber: number;
    public PeriodStart?: string;
    public PeriodEnd?: string;
    public Status: string;
    public BillingTemplate: string;
    public RetainagePct: number;
    public OriginalContractSum: number;
    public NetChangeByCO: number;
    public ContractSumToDate: number;
    public CompletedStoredToDate: number;
    public RetainageAmount: number;
    public EarnedLessRetainage: number;
    public LessPreviousCertificates: number;
    public CurrentPaymentDue: number;
    public BalanceToFinish: number;
    public InvoiceID?: number;
    public CertifiedAt?: string;
    public CertifiedBy: string;
    public CreatedBy: string;
    public CreatedAt?: string;
    public UpdatedAt?: string;
    public Lines: PayApplicationLine[] = [];

    public constructor(init?: Partial<PayApplication>) { (Object as any).assign(this, init); }
}

export class PayApplicationResponse
{
    public ResponseStatus: ResponseStatus;
    public Application: PayApplication;

    public constructor(init?: Partial<PayApplicationResponse>) { (Object as any).assign(this, init); }
}

export class PayApplicationCreateRequest
{
    public ProjectID: number;
    public PeriodStart?: string;
    public PeriodEnd?: string;
    public RetainagePct?: number;
    public BillingTemplate: string;

    public constructor(init?: Partial<PayApplicationCreateRequest>) { (Object as any).assign(this, init); }
}

TypeScript PayApplicationCreateRequest 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.

POST /v1/projects/{ProjectID}/pay-apps HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ProjectID: 0,
	PeriodStart: 0001-01-01,
	PeriodEnd: 0001-01-01,
	RetainagePct: 0,
	BillingTemplate: String
}
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
		}
	},
	Application: 
	{
		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
			}
		]
	}
}