Trendsic Platform Service

<back to all web services

PunchUpdateRequest

Requires Authentication
The following routes are available for this service:
PUT,OPTIONS/v1/projects/{ProjectID}/punch/{PunchItemID}
import Foundation
import ServiceStack

public class PunchUpdateRequest : Codable
{
    public var projectID:Int
    public var punchItemID:Int
    public var title:String
    public var Description:String
    public var area:String
    public var trade:String
    public var priority:String
    public var assignedSub:String
    public var assignedTo:String
    public var assignedSubContactID:Int?

    required public init(){}
}

public class PunchItemResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var item:PunchItem
    public var summary:PunchSummary

    required public init(){}
}

public class PunchItem : Codable
{
    public var punchItemID:Int
    public var punchItemUID:String
    public var projectID:Int
    public var punchNo:String
    public var title:String
    public var Description:String
    public var area:String
    public var trade:String
    public var status:String
    public var priority:String
    public var assignedSub:String
    public var assignedTo:String
    public var assignedSubContactID:Int?
    public var photoCount:Int
    public var originType:String
    public var originRef:String
    public var openedAt:Date?
    public var verifiedAt:Date?
    public var closedAt:Date?
    public var createdBy:String
    public var createdAt:Date?
    public var updatedAt:Date?

    required public init(){}
}

public class PunchSummary : Codable
{
    public var projectID:Int
    public var totalItems:Int
    public var openCount:Int
    public var verifyCount:Int
    public var closedCount:Int
    public var rejectedCount:Int
    public var percentComplete:Int

    required public init(){}
}


Swift PunchUpdateRequest 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}/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
	}
}