| PUT,OPTIONS | /v1/projects/{ProjectID}/punch/{PunchItemID} |
|---|
export class PunchItem
{
public PunchItemID: number;
public PunchItemUID: string;
public ProjectID: number;
public PunchNo: string;
public Title: string;
public Description: string;
public Area: string;
public Trade: string;
public Status: string;
public Priority: string;
public AssignedSub: string;
public AssignedTo: string;
public AssignedSubContactID?: number;
public PhotoCount: number;
public OriginType: string;
public OriginRef: string;
public OpenedAt?: string;
public VerifiedAt?: string;
public ClosedAt?: string;
public CreatedBy: string;
public CreatedAt?: string;
public UpdatedAt?: string;
public constructor(init?: Partial<PunchItem>) { (Object as any).assign(this, init); }
}
export class PunchSummary
{
public ProjectID: number;
public TotalItems: number;
public OpenCount: number;
public VerifyCount: number;
public ClosedCount: number;
public RejectedCount: number;
public PercentComplete: number;
public constructor(init?: Partial<PunchSummary>) { (Object as any).assign(this, init); }
}
export class PunchItemResponse
{
public ResponseStatus: ResponseStatus;
public Item: PunchItem;
public Summary: PunchSummary;
public constructor(init?: Partial<PunchItemResponse>) { (Object as any).assign(this, init); }
}
export class PunchUpdateRequest
{
public ProjectID: number;
public PunchItemID: number;
public Title: string;
public Description: string;
public Area: string;
public Trade: string;
public Priority: string;
public AssignedSub: string;
public AssignedTo: string;
public AssignedSubContactID?: number;
public constructor(init?: Partial<PunchUpdateRequest>) { (Object as any).assign(this, init); }
}
TypeScript PunchUpdateRequest 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.
PUT /v1/projects/{ProjectID}/punch/{PunchItemID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
ProjectID: 0,
PunchItemID: 0,
Title: String,
Description: String,
Area: String,
Trade: String,
Priority: String,
AssignedSub: String,
AssignedTo: String,
AssignedSubContactID: 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
}
},
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-01,
VerifiedAt: 0001-01-01,
ClosedAt: 0001-01-01,
CreatedBy: String,
CreatedAt: 0001-01-01,
UpdatedAt: 0001-01-01
},
Summary:
{
ProjectID: 0,
TotalItems: 0,
OpenCount: 0,
VerifyCount: 0,
ClosedCount: 0,
RejectedCount: 0,
PercentComplete: 0
}
}