| POST,OPTIONS | /v1/projects/{ProjectID}/change-orders/{ChangeOrderID}/submit |
|---|
"use strict";
export class ChangeOrderLine {
/** @param {{ChangeOrderLineID?:number,ChangeOrderID?:number,Category?:string,Description?:string,CostUSD?:number,MarkupPct?:number,CostCode?:string,SortOrder?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ChangeOrderLineID;
/** @type {number} */
ChangeOrderID;
/** @type {string} */
Category;
/** @type {string} */
Description;
/** @type {number} */
CostUSD;
/** @type {number} */
MarkupPct;
/** @type {string} */
CostCode;
/** @type {number} */
SortOrder;
}
export class ChangeOrder {
/** @param {{ChangeOrderID?:number,ChangeOrderUID?:string,ProjectID?:number,CONumber?:string,Title?:string,Scope?:string,Status?:string,CostUSD?:number,PriceUSD?:number,ScheduleDays?:number,OverheadProfitPct?:number,PricingMethod?:string,OriginType?:string,OriginRef?:string,CostCode?:string,OpenedAt?:string,SubmittedAt?:string,DecidedAt?:string,CreatedBy?:string,CreatedAt?:string,UpdatedAt?:string,DaysOpen?:number,Lines?:ChangeOrderLine[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ChangeOrderID;
/** @type {string} */
ChangeOrderUID;
/** @type {number} */
ProjectID;
/** @type {string} */
CONumber;
/** @type {string} */
Title;
/** @type {string} */
Scope;
/** @type {string} */
Status;
/** @type {number} */
CostUSD;
/** @type {number} */
PriceUSD;
/** @type {number} */
ScheduleDays;
/** @type {number} */
OverheadProfitPct;
/** @type {string} */
PricingMethod;
/** @type {string} */
OriginType;
/** @type {string} */
OriginRef;
/** @type {string} */
CostCode;
/** @type {?string} */
OpenedAt;
/** @type {?string} */
SubmittedAt;
/** @type {?string} */
DecidedAt;
/** @type {string} */
CreatedBy;
/** @type {?string} */
CreatedAt;
/** @type {?string} */
UpdatedAt;
/** @type {number} */
DaysOpen;
/** @type {ChangeOrderLine[]} */
Lines = [];
}
export class ChangeOrderContractSummary {
/** @param {{ProjectID?:number,OriginalContract?:number,ApprovedCOValue?:number,ApprovedCOCount?:number,PendingCOValue?:number,PendingCOCount?:number,RevisedContract?:number,PotentialContract?:number,ApprovedScheduleDays?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {number} */
OriginalContract;
/** @type {number} */
ApprovedCOValue;
/** @type {number} */
ApprovedCOCount;
/** @type {number} */
PendingCOValue;
/** @type {number} */
PendingCOCount;
/** @type {number} */
RevisedContract;
/** @type {number} */
PotentialContract;
/** @type {number} */
ApprovedScheduleDays;
}
export class ChangeOrderResponse {
/** @param {{ResponseStatus?:ResponseStatus,Order?:ChangeOrder,Summary?:ChangeOrderContractSummary}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {ChangeOrder} */
Order;
/** @type {ChangeOrderContractSummary} */
Summary;
}
export class ChangeOrderSubmitRequest {
/** @param {{ProjectID?:number,ChangeOrderID?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {number} */
ChangeOrderID;
}
JavaScript ChangeOrderSubmitRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/projects/{ProjectID}/change-orders/{ChangeOrderID}/submit HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
ChangeOrderID: 0
}
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
}
},
Order:
{
ChangeOrderID: 0,
ChangeOrderUID: 00000000000000000000000000000000,
ProjectID: 0,
CONumber: String,
Title: String,
Scope: String,
Status: String,
CostUSD: 0,
PriceUSD: 0,
ScheduleDays: 0,
OverheadProfitPct: 0,
PricingMethod: String,
OriginType: String,
OriginRef: String,
CostCode: String,
OpenedAt: 0001-01-01,
SubmittedAt: 0001-01-01,
DecidedAt: 0001-01-01,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01,
DaysOpen: 0,
Lines:
[
{
ChangeOrderLineID: 0,
ChangeOrderID: 0,
Category: String,
Description: String,
CostUSD: 0,
MarkupPct: 0,
CostCode: String,
SortOrder: 0
}
]
},
Summary:
{
ProjectID: 0,
OriginalContract: 0,
ApprovedCOValue: 0,
ApprovedCOCount: 0,
PendingCOValue: 0,
PendingCOCount: 0,
RevisedContract: 0,
PotentialContract: 0,
ApprovedScheduleDays: 0
}
}