Trendsic Platform Service

<back to all web services

PunchListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/punch
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PunchItem:
    punch_item_i_d: int = 0
    punch_item_u_i_d: Optional[str] = None
    project_i_d: int = 0
    punch_no: Optional[str] = None
    title: Optional[str] = None
    description: Optional[str] = None
    area: Optional[str] = None
    trade: Optional[str] = None
    status: Optional[str] = None
    priority: Optional[str] = None
    assigned_sub: Optional[str] = None
    assigned_to: Optional[str] = None
    assigned_sub_contact_i_d: Optional[int] = None
    photo_count: int = 0
    origin_type: Optional[str] = None
    origin_ref: Optional[str] = None
    opened_at: Optional[datetime.datetime] = None
    verified_at: Optional[datetime.datetime] = None
    closed_at: Optional[datetime.datetime] = None
    created_by: Optional[str] = None
    created_at: Optional[datetime.datetime] = None
    updated_at: Optional[datetime.datetime] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PunchSummary:
    project_i_d: int = 0
    total_items: int = 0
    open_count: int = 0
    verify_count: int = 0
    closed_count: int = 0
    rejected_count: int = 0
    percent_complete: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PunchListResponse:
    response_status: Optional[ResponseStatus] = None
    project_i_d: int = 0
    items: List[PunchItem] = field(default_factory=list)
    summary: Optional[PunchSummary] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PunchListRequest:
    project_i_d: int = 0

Python PunchListRequest 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.

GET /v1/projects/{ProjectID}/punch HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	ProjectID: 0,
	Items: 
	[
		{
			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
	}
}