Trendsic Platform Service

<back to all web services

PayApplicationUpdateRequest

Requires Authentication
The following routes are available for this service:
PATCH,PUT,OPTIONS/v1/projects/{ProjectID}/pay-apps/{PeriodNumber}
"use strict";
export class PayApplicationLine {
    /** @param {{PayApplicationLineID?:number,PayApplicationID?:number,CostCode?:string,Description?:string,ScheduledValue?:number,FromPreviousPct?:number,ThisPeriodPct?:number,StoredMaterials?:number,IsChangeOrder?:boolean,ChangeOrderID?:number,SortOrder?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    PayApplicationLineID;
    /** @type {number} */
    PayApplicationID;
    /** @type {string} */
    CostCode;
    /** @type {string} */
    Description;
    /** @type {number} */
    ScheduledValue;
    /** @type {number} */
    FromPreviousPct;
    /** @type {number} */
    ThisPeriodPct;
    /** @type {number} */
    StoredMaterials;
    /** @type {boolean} */
    IsChangeOrder;
    /** @type {?number} */
    ChangeOrderID;
    /** @type {number} */
    SortOrder;
}
export class PayApplication {
    /** @param {{PayApplicationID?:number,PayApplicationUID?:string,ProjectID?:number,PeriodNumber?:number,PeriodStart?:string,PeriodEnd?:string,Status?:string,BillingTemplate?:string,RetainagePct?:number,OriginalContractSum?:number,NetChangeByCO?:number,ContractSumToDate?:number,CompletedStoredToDate?:number,RetainageAmount?:number,EarnedLessRetainage?:number,LessPreviousCertificates?:number,CurrentPaymentDue?:number,BalanceToFinish?:number,InvoiceID?:number,CertifiedAt?:string,CertifiedBy?:string,CreatedBy?:string,CreatedAt?:string,UpdatedAt?:string,Lines?:PayApplicationLine[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    PayApplicationID;
    /** @type {string} */
    PayApplicationUID;
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    PeriodNumber;
    /** @type {?string} */
    PeriodStart;
    /** @type {?string} */
    PeriodEnd;
    /** @type {string} */
    Status;
    /** @type {string} */
    BillingTemplate;
    /** @type {number} */
    RetainagePct;
    /** @type {number} */
    OriginalContractSum;
    /** @type {number} */
    NetChangeByCO;
    /** @type {number} */
    ContractSumToDate;
    /** @type {number} */
    CompletedStoredToDate;
    /** @type {number} */
    RetainageAmount;
    /** @type {number} */
    EarnedLessRetainage;
    /** @type {number} */
    LessPreviousCertificates;
    /** @type {number} */
    CurrentPaymentDue;
    /** @type {number} */
    BalanceToFinish;
    /** @type {?number} */
    InvoiceID;
    /** @type {?string} */
    CertifiedAt;
    /** @type {string} */
    CertifiedBy;
    /** @type {string} */
    CreatedBy;
    /** @type {?string} */
    CreatedAt;
    /** @type {?string} */
    UpdatedAt;
    /** @type {PayApplicationLine[]} */
    Lines = [];
}
export class PayApplicationResponse {
    /** @param {{ResponseStatus?:ResponseStatus,Application?:PayApplication}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {PayApplication} */
    Application;
}
export class PayApplicationUpdateRequest {
    /** @param {{ProjectID?:number,PeriodNumber?:number,PeriodStart?:string,PeriodEnd?:string,RetainagePct?:number,BillingTemplate?:string,SubmitForCertification?:boolean,Lines?:PayApplicationLine[],PullFromWip?:boolean,AppendApprovedChangeOrders?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    PeriodNumber;
    /** @type {?string} */
    PeriodStart;
    /** @type {?string} */
    PeriodEnd;
    /** @type {?number} */
    RetainagePct;
    /** @type {string} */
    BillingTemplate;
    /** @type {boolean} */
    SubmitForCertification;
    /** @type {PayApplicationLine[]} */
    Lines = [];
    /** @type {boolean} */
    PullFromWip;
    /** @type {boolean} */
    AppendApprovedChangeOrders;
}

JavaScript PayApplicationUpdateRequest 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.

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

{
	ProjectID: 0,
	PeriodNumber: 0,
	PeriodStart: 0001-01-01,
	PeriodEnd: 0001-01-01,
	RetainagePct: 0,
	BillingTemplate: String,
	SubmitForCertification: False,
	Lines: 
	[
		{
			PayApplicationLineID: 0,
			PayApplicationID: 0,
			CostCode: String,
			Description: String,
			ScheduledValue: 0,
			FromPreviousPct: 0,
			ThisPeriodPct: 0,
			StoredMaterials: 0,
			IsChangeOrder: False,
			ChangeOrderID: 0,
			SortOrder: 0
		}
	],
	PullFromWip: False,
	AppendApprovedChangeOrders: False
}
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
			}
		]
	}
}