Trendsic Platform Service

<back to all web services

PmJobRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/pm/job/{JobID}
"use strict";
export class PmJobCrew {
    /** @param {{ContactID?:number,Name?:string,Rate?:number,BudgetedHours?:number,IsOpen?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ContactID;
    /** @type {string} */
    Name;
    /** @type {number} */
    Rate;
    /** @type {number} */
    BudgetedHours;
    /** @type {boolean} */
    IsOpen;
}
export class PmJobResource {
    /** @param {{Id?:number,Name?:string,Amount?:number,Qty?:number,Unit?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    Id;
    /** @type {string} */
    Name;
    /** @type {number} */
    Amount;
    /** @type {number} */
    Qty;
    /** @type {string} */
    Unit;
}
export class PmJob {
    /** @param {{JobID?:number,Name?:string,Description?:string,Status?:string,StartDate?:string,EndDate?:string,CrewCount?:number,BudgetedHours?:number,EquipmentCount?:number,MaterialCount?:number,CrewCost?:number,EquipCost?:number,MatCost?:number,Cost?:number,NoCrew?:boolean,EquipConflict?:boolean,MaterialGap?:boolean,ReadyPct?:number,Priority?:string,Tags?:string[],Crew?:PmJobCrew[],Equipment?:PmJobResource[],Materials?:PmJobResource[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
    /** @type {string} */
    Name;
    /** @type {string} */
    Description;
    /** @type {string} */
    Status;
    /** @type {string} */
    StartDate;
    /** @type {string} */
    EndDate;
    /** @type {number} */
    CrewCount;
    /** @type {number} */
    BudgetedHours;
    /** @type {number} */
    EquipmentCount;
    /** @type {number} */
    MaterialCount;
    /** @type {number} */
    CrewCost;
    /** @type {number} */
    EquipCost;
    /** @type {number} */
    MatCost;
    /** @type {number} */
    Cost;
    /** @type {boolean} */
    NoCrew;
    /** @type {boolean} */
    EquipConflict;
    /** @type {boolean} */
    MaterialGap;
    /** @type {number} */
    ReadyPct;
    /** @type {string} */
    Priority;
    /** @type {string[]} */
    Tags = [];
    /** @type {PmJobCrew[]} */
    Crew = [];
    /** @type {PmJobResource[]} */
    Equipment = [];
    /** @type {PmJobResource[]} */
    Materials = [];
}
export class PmJobResponse {
    /** @param {{Job?:PmJob,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {PmJob} */
    Job;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class PmJobRequest {
    /** @param {{JobID?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    JobID;
}

JavaScript PmJobRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/pm/job/{JobID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PmJobResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Job>
    <BudgetedHours>0</BudgetedHours>
    <Cost>0</Cost>
    <Crew>
      <PmJobCrew>
        <BudgetedHours>0</BudgetedHours>
        <ContactID>0</ContactID>
        <IsOpen>false</IsOpen>
        <Name>String</Name>
        <Rate>0</Rate>
      </PmJobCrew>
    </Crew>
    <CrewCost>0</CrewCost>
    <CrewCount>0</CrewCount>
    <Description>String</Description>
    <EndDate>String</EndDate>
    <EquipConflict>false</EquipConflict>
    <EquipCost>0</EquipCost>
    <Equipment>
      <PmJobResource>
        <Amount>0</Amount>
        <Id>0</Id>
        <Name>String</Name>
        <Qty>0</Qty>
        <Unit>String</Unit>
      </PmJobResource>
    </Equipment>
    <EquipmentCount>0</EquipmentCount>
    <JobID>0</JobID>
    <MatCost>0</MatCost>
    <MaterialCount>0</MaterialCount>
    <MaterialGap>false</MaterialGap>
    <Materials>
      <PmJobResource>
        <Amount>0</Amount>
        <Id>0</Id>
        <Name>String</Name>
        <Qty>0</Qty>
        <Unit>String</Unit>
      </PmJobResource>
    </Materials>
    <Name>String</Name>
    <NoCrew>false</NoCrew>
    <Priority>String</Priority>
    <ReadyPct>0</ReadyPct>
    <StartDate>String</StartDate>
    <Status>String</Status>
    <Tags xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </Tags>
  </Job>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</PmJobResponse>