Trendsic Platform Service

<back to all web services

MaterialProjectRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/Material/{MaterialID}/Projects

export class Location
{
    public Id: string;
    public ClientId: string;
    public Name: string;
    public Address1: string;
    public Address2: string;
    public City: string;
    public State: string;
    public Zip: string;
    public Phone: string;
    public Fax: string;
    public URL: string;
    public Email: string;
    public TimeZone: string;
    public Active: boolean;
    public EntDate: string;
    public ModDate: string;
    public LocationImage: string;

    public constructor(init?: Partial<Location>) { (Object as any).assign(this, init); }
}

export class Project
{
    public ProjectID: number;
    public ProjectUID: string;
    public ProjectName: string;
    public ImageURL: string;
    public ImageKey: string;
    public ClientName: string;
    public ClientPhone: string;
    public ClientEmail: string;
    public NotifyCustomerOnVisitCompletion: boolean;
    public ClientContactID?: number;
    public ProjectManagerID: number;
    public ProjectManagerName: string;
    public StartDate?: string;
    public EndDate?: string;
    public ActualStartDate?: string;
    public ActualEndDate?: string;
    public JobCount: number;
    public CrewMemberCount: number;
    public CrewAvatarsJson: string;
    public CrewNamesSearch: string;
    public EquipmentCount: number;
    public MaterialCount: number;
    public ProjectStatusID: number;
    public ProjectStatusDescription: string;
    public Budget: number;
    public CostToDate: number;
    public ProjectLocation: string;
    public ProjectType: string;
    public ProjectSponsor: string;
    public CreatedBy: string;
    public CreatedAt?: string;
    public UpdatedAt?: string;
    public ProjectDescription: string;
    public Scope: string;
    public StatusId: number;
    public BranchId: string;
    public BranchName: string;
    public Location: Location;

    public constructor(init?: Partial<Project>) { (Object as any).assign(this, init); }
}

export class MaterialProjectResponse
{
    public ResponseStatus: ResponseStatus;
    public Projects: Project[] = [];

    public constructor(init?: Partial<MaterialProjectResponse>) { (Object as any).assign(this, init); }
}

export class MaterialProjectRequest
{
    public MaterialID: number;

    public constructor(init?: Partial<MaterialProjectRequest>) { (Object as any).assign(this, init); }
}

TypeScript MaterialProjectRequest 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/Material/{MaterialID}/Projects 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
		}
	},
	Projects: 
	[
		{
			ProjectID: 0,
			ProjectUID: 00000000000000000000000000000000,
			ProjectName: String,
			ImageURL: String,
			ImageKey: String,
			ClientName: String,
			ClientPhone: String,
			ClientEmail: String,
			NotifyCustomerOnVisitCompletion: False,
			ClientContactID: 0,
			ProjectManagerID: 0,
			ProjectManagerName: String,
			StartDate: 0001-01-01,
			EndDate: 0001-01-01,
			ActualStartDate: 0001-01-01,
			ActualEndDate: 0001-01-01,
			JobCount: 0,
			CrewMemberCount: 0,
			CrewAvatarsJson: String,
			CrewNamesSearch: String,
			EquipmentCount: 0,
			MaterialCount: 0,
			ProjectStatusID: 0,
			ProjectStatusDescription: String,
			Budget: 0,
			CostToDate: 0,
			ProjectLocation: String,
			ProjectType: String,
			ProjectSponsor: String,
			CreatedBy: String,
			CreatedAt: 0001-01-01,
			UpdatedAt: 0001-01-01,
			ProjectDescription: String,
			Scope: String,
			StatusId: 0,
			BranchId: 00000000000000000000000000000000,
			BranchName: String,
			Location: 
			{
				Id: 00000000000000000000000000000000,
				ClientId: 00000000000000000000000000000000,
				Name: String,
				Address1: String,
				Address2: String,
				City: String,
				State: String,
				Zip: String,
				Phone: String,
				Fax: String,
				URL: String,
				Email: String,
				TimeZone: String,
				Active: False,
				EntDate: 0001-01-01,
				ModDate: 0001-01-01,
				LocationImage: String
			}
		}
	]
}