Trendsic Platform Service

<back to all web services

StaffMatchRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/staff/match
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class StaffSkillChip implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Name=null,
        /** @var bool|null */
        public ?bool $Matched=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Matched'])) $this->Matched = $o['Matched'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Matched)) $o['Matched'] = $this->Matched;
        return empty($o) ? new class(){} : $o;
    }
}

class StaffCandidate implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ContactID=0,
        /** @var string|null */
        public ?string $Name=null,
        /** @var string|null */
        public ?string $Kind=null,
        /** @var float */
        public float $Rate=0.0,
        /** @var float */
        public float $Rating=0.0,
        /** @var int */
        public int $RatingCount=0,
        /** @var string|null */
        public ?string $Base=null,
        /** @var int */
        public int $DistanceMi=0,
        /** @var int */
        public int $MatchCount=0,
        /** @var int */
        public int $TotalRequired=0,
        /** @var array<StaffSkillChip>|null */
        public ?array $Skills=null,
        /** @var bool|null */
        public ?bool $Conflict=null,
        /** @var string|null */
        public ?string $BusyUntil=null,
        /** @var string|null */
        public ?string $BusyJob=null,
        /** @var string|null */
        public ?string $Phone=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var bool|null */
        public ?bool $Sms=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ContactID'])) $this->ContactID = $o['ContactID'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['Kind'])) $this->Kind = $o['Kind'];
        if (isset($o['Rate'])) $this->Rate = $o['Rate'];
        if (isset($o['Rating'])) $this->Rating = $o['Rating'];
        if (isset($o['RatingCount'])) $this->RatingCount = $o['RatingCount'];
        if (isset($o['Base'])) $this->Base = $o['Base'];
        if (isset($o['DistanceMi'])) $this->DistanceMi = $o['DistanceMi'];
        if (isset($o['MatchCount'])) $this->MatchCount = $o['MatchCount'];
        if (isset($o['TotalRequired'])) $this->TotalRequired = $o['TotalRequired'];
        if (isset($o['Skills'])) $this->Skills = JsonConverters::fromArray('StaffSkillChip', $o['Skills']);
        if (isset($o['Conflict'])) $this->Conflict = $o['Conflict'];
        if (isset($o['BusyUntil'])) $this->BusyUntil = $o['BusyUntil'];
        if (isset($o['BusyJob'])) $this->BusyJob = $o['BusyJob'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['Sms'])) $this->Sms = $o['Sms'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ContactID)) $o['ContactID'] = $this->ContactID;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->Kind)) $o['Kind'] = $this->Kind;
        if (isset($this->Rate)) $o['Rate'] = $this->Rate;
        if (isset($this->Rating)) $o['Rating'] = $this->Rating;
        if (isset($this->RatingCount)) $o['RatingCount'] = $this->RatingCount;
        if (isset($this->Base)) $o['Base'] = $this->Base;
        if (isset($this->DistanceMi)) $o['DistanceMi'] = $this->DistanceMi;
        if (isset($this->MatchCount)) $o['MatchCount'] = $this->MatchCount;
        if (isset($this->TotalRequired)) $o['TotalRequired'] = $this->TotalRequired;
        if (isset($this->Skills)) $o['Skills'] = JsonConverters::toArray('StaffSkillChip', $this->Skills);
        if (isset($this->Conflict)) $o['Conflict'] = $this->Conflict;
        if (isset($this->BusyUntil)) $o['BusyUntil'] = $this->BusyUntil;
        if (isset($this->BusyJob)) $o['BusyJob'] = $this->BusyJob;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->Sms)) $o['Sms'] = $this->Sms;
        return empty($o) ? new class(){} : $o;
    }
}

class StaffPosition implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $PlaceholderContactID=0,
        /** @var int */
        public int $JobID=0,
        /** @var int */
        public int $ProjectID=0,
        /** @var string|null */
        public ?string $JobName=null,
        /** @var string|null */
        public ?string $PositionTag=null,
        /** @var array<string>|null */
        public ?array $Skills=null,
        /** @var float */
        public float $BudgetedHours=0.0,
        /** @var float */
        public float $TargetRate=0.0,
        /** @var string|null */
        public ?string $StartDate=null,
        /** @var string|null */
        public ?string $EndDate=null,
        /** @var string|null */
        public ?string $WindowText=null,
        /** @var int */
        public int $ResponsesActionable=0,
        /** @var string|null */
        public ?string $PostingStatus=null,
        /** @var int */
        public int $ApplicantTotal=0,
        /** @var int */
        public int $ApplicantStrong=0,
        /** @var bool|null */
        public ?bool $Filled=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['PlaceholderContactID'])) $this->PlaceholderContactID = $o['PlaceholderContactID'];
        if (isset($o['JobID'])) $this->JobID = $o['JobID'];
        if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
        if (isset($o['JobName'])) $this->JobName = $o['JobName'];
        if (isset($o['PositionTag'])) $this->PositionTag = $o['PositionTag'];
        if (isset($o['Skills'])) $this->Skills = JsonConverters::fromArray('string', $o['Skills']);
        if (isset($o['BudgetedHours'])) $this->BudgetedHours = $o['BudgetedHours'];
        if (isset($o['TargetRate'])) $this->TargetRate = $o['TargetRate'];
        if (isset($o['StartDate'])) $this->StartDate = $o['StartDate'];
        if (isset($o['EndDate'])) $this->EndDate = $o['EndDate'];
        if (isset($o['WindowText'])) $this->WindowText = $o['WindowText'];
        if (isset($o['ResponsesActionable'])) $this->ResponsesActionable = $o['ResponsesActionable'];
        if (isset($o['PostingStatus'])) $this->PostingStatus = $o['PostingStatus'];
        if (isset($o['ApplicantTotal'])) $this->ApplicantTotal = $o['ApplicantTotal'];
        if (isset($o['ApplicantStrong'])) $this->ApplicantStrong = $o['ApplicantStrong'];
        if (isset($o['Filled'])) $this->Filled = $o['Filled'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->PlaceholderContactID)) $o['PlaceholderContactID'] = $this->PlaceholderContactID;
        if (isset($this->JobID)) $o['JobID'] = $this->JobID;
        if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
        if (isset($this->JobName)) $o['JobName'] = $this->JobName;
        if (isset($this->PositionTag)) $o['PositionTag'] = $this->PositionTag;
        if (isset($this->Skills)) $o['Skills'] = JsonConverters::toArray('string', $this->Skills);
        if (isset($this->BudgetedHours)) $o['BudgetedHours'] = $this->BudgetedHours;
        if (isset($this->TargetRate)) $o['TargetRate'] = $this->TargetRate;
        if (isset($this->StartDate)) $o['StartDate'] = $this->StartDate;
        if (isset($this->EndDate)) $o['EndDate'] = $this->EndDate;
        if (isset($this->WindowText)) $o['WindowText'] = $this->WindowText;
        if (isset($this->ResponsesActionable)) $o['ResponsesActionable'] = $this->ResponsesActionable;
        if (isset($this->PostingStatus)) $o['PostingStatus'] = $this->PostingStatus;
        if (isset($this->ApplicantTotal)) $o['ApplicantTotal'] = $this->ApplicantTotal;
        if (isset($this->ApplicantStrong)) $o['ApplicantStrong'] = $this->ApplicantStrong;
        if (isset($this->Filled)) $o['Filled'] = $this->Filled;
        return empty($o) ? new class(){} : $o;
    }
}

class StaffMatchResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var array<StaffCandidate>|null */
        public ?array $Candidates=null,
        /** @var StaffPosition|null */
        public ?StaffPosition $Position=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['Candidates'])) $this->Candidates = JsonConverters::fromArray('StaffCandidate', $o['Candidates']);
        if (isset($o['Position'])) $this->Position = JsonConverters::from('StaffPosition', $o['Position']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->Candidates)) $o['Candidates'] = JsonConverters::toArray('StaffCandidate', $this->Candidates);
        if (isset($this->Position)) $o['Position'] = JsonConverters::to('StaffPosition', $this->Position);
        return empty($o) ? new class(){} : $o;
    }
}

class StaffMatchRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $PlaceholderContactID=0,
        /** @var int */
        public int $JobID=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['PlaceholderContactID'])) $this->PlaceholderContactID = $o['PlaceholderContactID'];
        if (isset($o['JobID'])) $this->JobID = $o['JobID'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->PlaceholderContactID)) $o['PlaceholderContactID'] = $this->PlaceholderContactID;
        if (isset($this->JobID)) $o['JobID'] = $this->JobID;
        return empty($o) ? new class(){} : $o;
    }
}

PHP StaffMatchRequest 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/staff/match HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<StaffMatchResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Candidates>
    <StaffCandidate>
      <Base>String</Base>
      <BusyJob>String</BusyJob>
      <BusyUntil>String</BusyUntil>
      <Conflict>false</Conflict>
      <ContactID>0</ContactID>
      <DistanceMi>0</DistanceMi>
      <Email>String</Email>
      <Kind>String</Kind>
      <MatchCount>0</MatchCount>
      <Name>String</Name>
      <Phone>String</Phone>
      <Rate>0</Rate>
      <Rating>0</Rating>
      <RatingCount>0</RatingCount>
      <Skills>
        <StaffSkillChip>
          <Matched>false</Matched>
          <Name>String</Name>
        </StaffSkillChip>
      </Skills>
      <Sms>false</Sms>
      <TotalRequired>0</TotalRequired>
    </StaffCandidate>
  </Candidates>
  <Position>
    <ApplicantStrong>0</ApplicantStrong>
    <ApplicantTotal>0</ApplicantTotal>
    <BudgetedHours>0</BudgetedHours>
    <EndDate>String</EndDate>
    <Filled>false</Filled>
    <JobID>0</JobID>
    <JobName>String</JobName>
    <PlaceholderContactID>0</PlaceholderContactID>
    <PositionTag>String</PositionTag>
    <PostingStatus>String</PostingStatus>
    <ProjectID>0</ProjectID>
    <ResponsesActionable>0</ResponsesActionable>
    <Skills xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </Skills>
    <StartDate>String</StartDate>
    <TargetRate>0</TargetRate>
    <WindowText>String</WindowText>
  </Position>
  <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>
</StaffMatchResponse>