Trendsic Platform Service

<back to all web services

ProjectCostRequest

Requires Authentication
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Project/Cost/{ProjectID}
"use strict";
export class ProjectCost {
    /** @param {{ProjectID?:number,Budget?:number,CrewCost?:number,EquipmentCost?:number,MaterialCost?:number,TotalCost?:number,BilledCrewCost?:number,BilledEquipmentCost?:number,BilledMaterialCost?:number,BilledTotalCost?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ProjectID;
    /** @type {number} */
    Budget;
    /** @type {number} */
    CrewCost;
    /** @type {number} */
    EquipmentCost;
    /** @type {number} */
    MaterialCost;
    /** @type {number} */
    TotalCost;
    /** @type {number} */
    BilledCrewCost;
    /** @type {number} */
    BilledEquipmentCost;
    /** @type {number} */
    BilledMaterialCost;
    /** @type {number} */
    BilledTotalCost;
}
export class ProjectCostResponse {
    /** @param {{ResponseStatus?:ResponseStatus,ProjectCost?:ProjectCost}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {ProjectCost} */
    ProjectCost;
}
export class ProjectCostRequest {
    /** @param {{ProjectID?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ProjectID;
}

JavaScript ProjectCostRequest 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.

POST /v1/Project/Cost/{ProjectID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	ProjectID: 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
		}
	},
	ProjectCost: 
	{
		ProjectID: 0,
		Budget: 0,
		CrewCost: 0,
		EquipmentCost: 0,
		MaterialCost: 0,
		TotalCost: 0,
		BilledCrewCost: 0,
		BilledEquipmentCost: 0,
		BilledMaterialCost: 0,
		BilledTotalCost: 0
	}
}