| POST,OPTIONS | /v1/projects/{ProjectID}/punch |
|---|
"use strict";
export class PunchItem {
/** @param {{PunchItemID?:number,PunchItemUID?:string,ProjectID?:number,PunchNo?:string,Title?:string,Description?:string,Area?:string,Trade?:string,Status?:string,Priority?:string,AssignedSub?:string,AssignedTo?:string,AssignedSubContactID?:number,PhotoCount?:number,OriginType?:string,OriginRef?:string,OpenedAt?:string,VerifiedAt?:string,ClosedAt?:string,CreatedBy?:string,CreatedAt?:string,UpdatedAt?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
PunchItemID;
/** @type {string} */
PunchItemUID;
/** @type {number} */
ProjectID;
/** @type {string} */
PunchNo;
/** @type {string} */
Title;
/** @type {string} */
Description;
/** @type {string} */
Area;
/** @type {string} */
Trade;
/** @type {string} */
Status;
/** @type {string} */
Priority;
/** @type {string} */
AssignedSub;
/** @type {string} */
AssignedTo;
/** @type {?number} */
AssignedSubContactID;
/** @type {number} */
PhotoCount;
/** @type {string} */
OriginType;
/** @type {string} */
OriginRef;
/** @type {?string} */
OpenedAt;
/** @type {?string} */
VerifiedAt;
/** @type {?string} */
ClosedAt;
/** @type {string} */
CreatedBy;
/** @type {?string} */
CreatedAt;
/** @type {?string} */
UpdatedAt;
}
export class PunchSummary {
/** @param {{ProjectID?:number,TotalItems?:number,OpenCount?:number,VerifyCount?:number,ClosedCount?:number,RejectedCount?:number,PercentComplete?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {number} */
TotalItems;
/** @type {number} */
OpenCount;
/** @type {number} */
VerifyCount;
/** @type {number} */
ClosedCount;
/** @type {number} */
RejectedCount;
/** @type {number} */
PercentComplete;
}
export class PunchItemResponse {
/** @param {{ResponseStatus?:ResponseStatus,Item?:PunchItem,Summary?:PunchSummary}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {PunchItem} */
Item;
/** @type {PunchSummary} */
Summary;
}
export class PunchCreateRequest {
/** @param {{ProjectID?:number,PunchNo?:string,Title?:string,Description?:string,Area?:string,Trade?:string,Priority?:string,AssignedSub?:string,AssignedTo?:string,AssignedSubContactID?:number,OriginType?:string,OriginRef?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
ProjectID;
/** @type {string} */
PunchNo;
/** @type {string} */
Title;
/** @type {string} */
Description;
/** @type {string} */
Area;
/** @type {string} */
Trade;
/** @type {string} */
Priority;
/** @type {string} */
AssignedSub;
/** @type {string} */
AssignedTo;
/** @type {?number} */
AssignedSubContactID;
/** @type {string} */
OriginType;
/** @type {string} */
OriginRef;
}
JavaScript PunchCreateRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/projects/{ProjectID}/punch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ProjectID":0,"PunchNo":"String","Title":"String","Description":"String","Area":"String","Trade":"String","Priority":"String","AssignedSub":"String","AssignedTo":"String","AssignedSubContactID":0,"OriginType":"String","OriginRef":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Item":{"PunchItemID":0,"PunchItemUID":"00000000000000000000000000000000","ProjectID":0,"PunchNo":"String","Title":"String","Description":"String","Area":"String","Trade":"String","Status":"String","Priority":"String","AssignedSub":"String","AssignedTo":"String","AssignedSubContactID":0,"PhotoCount":0,"OriginType":"String","OriginRef":"String","OpenedAt":"0001-01-01T00:00:00.0000000","VerifiedAt":"0001-01-01T00:00:00.0000000","ClosedAt":"0001-01-01T00:00:00.0000000","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000"},"Summary":{"ProjectID":0,"TotalItems":0,"OpenCount":0,"VerifyCount":0,"ClosedCount":0,"RejectedCount":0,"PercentComplete":0}}