Trendsic Platform Service

<back to all web services

CoveragePolicySaveRequest

Requires Authentication
The following routes are available for this service:
POST/v1/coverage/policies/{CoveragePolicyId}
"use strict";
export class CoveragePolicy {
    /** @param {{CoveragePolicyId?:number,CoveragePolicyUID?:string,Name?:string,ScopeLevel?:string,BranchId?:string,BranchName?:string,WorkTypeKey?:string,JobID?:number,JobName?:string,CurrentVersion?:number,IsActive?:boolean,CreatedAt?:string,UpdatedAt?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoveragePolicyId;
    /** @type {string} */
    CoveragePolicyUID;
    /** @type {string} */
    Name;
    /** @type {string} */
    ScopeLevel;
    /** @type {?string} */
    BranchId;
    /** @type {string} */
    BranchName;
    /** @type {string} */
    WorkTypeKey;
    /** @type {?number} */
    JobID;
    /** @type {string} */
    JobName;
    /** @type {number} */
    CurrentVersion;
    /** @type {boolean} */
    IsActive;
    /** @type {string} */
    CreatedAt;
    /** @type {?string} */
    UpdatedAt;
}
export class CoverageRingDef {
    /** @param {{Key?:string,Label?:string,Sub?:string,WaitMinutes?:number,Enabled?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Key;
    /** @type {string} */
    Label;
    /** @type {string} */
    Sub;
    /** @type {?number} */
    WaitMinutes;
    /** @type {boolean} */
    Enabled;
}
export class CoveragePolicyPrefs {
    /** @param {{AssignmentMode?:string,RestHours?:number,OtThresholdHours?:number,RingWaitMinutes?:number,QuietStart?:string,QuietEnd?:string,RescheduleAllowed?:boolean,QuietMode?:string,Rings?:CoverageRingDef[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    AssignmentMode;
    /** @type {number} */
    RestHours;
    /** @type {number} */
    OtThresholdHours;
    /** @type {number} */
    RingWaitMinutes;
    /** @type {string} */
    QuietStart;
    /** @type {string} */
    QuietEnd;
    /** @type {boolean} */
    RescheduleAllowed;
    /** @type {string} */
    QuietMode;
    /** @type {CoverageRingDef[]} */
    Rings = [];
}
export class CoverageRuleDocSection {
    /** @param {{H?:string,T?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    H;
    /** @type {string} */
    T;
}
export class CoverageRuleTuneOption {
    /** @param {{Label?:string,Sub?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Label;
    /** @type {string} */
    Sub;
}
export class CoverageRuleTune {
    /** @param {{Intro?:string,Options?:CoverageRuleTuneOption[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Intro;
    /** @type {CoverageRuleTuneOption[]} */
    Options = [];
}
export class CoverageRuleDef {
    /** @param {{RuleId?:string,Name?:string,Kind?:string,Demand?:string,SourcePolicyName?:string,CascadeLevel?:string,Why?:string,Change?:string,OverrideWho?:string,OverrideConsequence?:string,NoNote?:string,Params?:{ [index:string]: string; },Doc?:CoverageRuleDocSection[],Tune?:CoverageRuleTune}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    RuleId;
    /** @type {string} */
    Name;
    /** @type {string} */
    Kind;
    /** @type {string} */
    Demand;
    /** @type {string} */
    SourcePolicyName;
    /** @type {string} */
    CascadeLevel;
    /** @type {string} */
    Why;
    /** @type {string} */
    Change;
    /** @type {string} */
    OverrideWho;
    /** @type {string} */
    OverrideConsequence;
    /** @type {string} */
    NoNote;
    /** @type {{ [index:string]: string; }} */
    Params = {};
    /** @type {CoverageRuleDocSection[]} */
    Doc = [];
    /** @type {CoverageRuleTune} */
    Tune;
}
export class CoveragePolicyDoc {
    /** @param {{Intro?:string,LockLine?:string,TemplateName?:string,Prefs?:CoveragePolicyPrefs,Rules?:CoverageRuleDef[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    Intro;
    /** @type {string} */
    LockLine;
    /** @type {string} */
    TemplateName;
    /** @type {CoveragePolicyPrefs} */
    Prefs;
    /** @type {CoverageRuleDef[]} */
    Rules = [];
}
export class CoveragePolicyVersionInfo {
    /** @param {{CoveragePolicyVersionId?:number,CoveragePolicyId?:number,VersionNumber?:number,ChangeNote?:string,ChangedByName?:string,CreatedAtUtc?:string,Doc?:CoveragePolicyDoc}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoveragePolicyVersionId;
    /** @type {number} */
    CoveragePolicyId;
    /** @type {number} */
    VersionNumber;
    /** @type {string} */
    ChangeNote;
    /** @type {string} */
    ChangedByName;
    /** @type {string} */
    CreatedAtUtc;
    /** @type {CoveragePolicyDoc} */
    Doc;
}
export class CoverageCascadeResponse {
    /** @param {{Policy?:CoveragePolicy,Doc?:CoveragePolicyDoc,VersionNumber?:number,Versions?:CoveragePolicyVersionInfo[],ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {CoveragePolicy} */
    Policy;
    /** @type {CoveragePolicyDoc} */
    Doc;
    /** @type {number} */
    VersionNumber;
    /** @type {CoveragePolicyVersionInfo[]} */
    Versions = [];
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class CoveragePolicySaveRequest {
    /** @param {{CoveragePolicyId?:number,Doc?:CoveragePolicyDoc,ChangeNote?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    CoveragePolicyId;
    /** @type {CoveragePolicyDoc} */
    Doc;
    /** @type {string} */
    ChangeNote;
}

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

POST /v1/coverage/policies/{CoveragePolicyId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CoveragePolicySaveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ChangeNote>String</ChangeNote>
  <CoveragePolicyId>0</CoveragePolicyId>
  <Doc>
    <Intro>String</Intro>
    <LockLine>String</LockLine>
    <Prefs>
      <AssignmentMode>String</AssignmentMode>
      <OtThresholdHours>0</OtThresholdHours>
      <QuietEnd>String</QuietEnd>
      <QuietMode>String</QuietMode>
      <QuietStart>String</QuietStart>
      <RescheduleAllowed>false</RescheduleAllowed>
      <RestHours>0</RestHours>
      <RingWaitMinutes>0</RingWaitMinutes>
      <Rings>
        <CoverageRingDef>
          <Enabled>false</Enabled>
          <Key>String</Key>
          <Label>String</Label>
          <Sub>String</Sub>
          <WaitMinutes>0</WaitMinutes>
        </CoverageRingDef>
      </Rings>
    </Prefs>
    <Rules>
      <CoverageRuleDef>
        <CascadeLevel>String</CascadeLevel>
        <Change>String</Change>
        <Demand>String</Demand>
        <Doc>
          <CoverageRuleDocSection>
            <H>String</H>
            <T>String</T>
          </CoverageRuleDocSection>
        </Doc>
        <Kind>String</Kind>
        <Name>String</Name>
        <NoNote>String</NoNote>
        <OverrideConsequence>String</OverrideConsequence>
        <OverrideWho>String</OverrideWho>
        <Params xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Params>
        <RuleId>String</RuleId>
        <SourcePolicyName>String</SourcePolicyName>
        <Tune>
          <Intro>String</Intro>
          <Options>
            <CoverageRuleTuneOption>
              <Label>String</Label>
              <Sub>String</Sub>
            </CoverageRuleTuneOption>
          </Options>
        </Tune>
        <Why>String</Why>
      </CoverageRuleDef>
    </Rules>
    <TemplateName>String</TemplateName>
  </Doc>
</CoveragePolicySaveRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CoverageCascadeResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Doc>
    <Intro>String</Intro>
    <LockLine>String</LockLine>
    <Prefs>
      <AssignmentMode>String</AssignmentMode>
      <OtThresholdHours>0</OtThresholdHours>
      <QuietEnd>String</QuietEnd>
      <QuietMode>String</QuietMode>
      <QuietStart>String</QuietStart>
      <RescheduleAllowed>false</RescheduleAllowed>
      <RestHours>0</RestHours>
      <RingWaitMinutes>0</RingWaitMinutes>
      <Rings>
        <CoverageRingDef>
          <Enabled>false</Enabled>
          <Key>String</Key>
          <Label>String</Label>
          <Sub>String</Sub>
          <WaitMinutes>0</WaitMinutes>
        </CoverageRingDef>
      </Rings>
    </Prefs>
    <Rules>
      <CoverageRuleDef>
        <CascadeLevel>String</CascadeLevel>
        <Change>String</Change>
        <Demand>String</Demand>
        <Doc>
          <CoverageRuleDocSection>
            <H>String</H>
            <T>String</T>
          </CoverageRuleDocSection>
        </Doc>
        <Kind>String</Kind>
        <Name>String</Name>
        <NoNote>String</NoNote>
        <OverrideConsequence>String</OverrideConsequence>
        <OverrideWho>String</OverrideWho>
        <Params xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Params>
        <RuleId>String</RuleId>
        <SourcePolicyName>String</SourcePolicyName>
        <Tune>
          <Intro>String</Intro>
          <Options>
            <CoverageRuleTuneOption>
              <Label>String</Label>
              <Sub>String</Sub>
            </CoverageRuleTuneOption>
          </Options>
        </Tune>
        <Why>String</Why>
      </CoverageRuleDef>
    </Rules>
    <TemplateName>String</TemplateName>
  </Doc>
  <Policy>
    <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
    <BranchName>String</BranchName>
    <CoveragePolicyId>0</CoveragePolicyId>
    <CoveragePolicyUID>00000000-0000-0000-0000-000000000000</CoveragePolicyUID>
    <CreatedAt>0001-01-01T00:00:00</CreatedAt>
    <CurrentVersion>0</CurrentVersion>
    <IsActive>false</IsActive>
    <JobID>0</JobID>
    <JobName>String</JobName>
    <Name>String</Name>
    <ScopeLevel>String</ScopeLevel>
    <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
    <WorkTypeKey>String</WorkTypeKey>
  </Policy>
  <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>
  <VersionNumber>0</VersionNumber>
  <Versions>
    <CoveragePolicyVersionInfo>
      <ChangeNote>String</ChangeNote>
      <ChangedByName>String</ChangedByName>
      <CoveragePolicyId>0</CoveragePolicyId>
      <CoveragePolicyVersionId>0</CoveragePolicyVersionId>
      <CreatedAtUtc>0001-01-01T00:00:00</CreatedAtUtc>
      <Doc>
        <Intro>String</Intro>
        <LockLine>String</LockLine>
        <Prefs>
          <AssignmentMode>String</AssignmentMode>
          <OtThresholdHours>0</OtThresholdHours>
          <QuietEnd>String</QuietEnd>
          <QuietMode>String</QuietMode>
          <QuietStart>String</QuietStart>
          <RescheduleAllowed>false</RescheduleAllowed>
          <RestHours>0</RestHours>
          <RingWaitMinutes>0</RingWaitMinutes>
          <Rings>
            <CoverageRingDef>
              <Enabled>false</Enabled>
              <Key>String</Key>
              <Label>String</Label>
              <Sub>String</Sub>
              <WaitMinutes>0</WaitMinutes>
            </CoverageRingDef>
          </Rings>
        </Prefs>
        <Rules>
          <CoverageRuleDef>
            <CascadeLevel>String</CascadeLevel>
            <Change>String</Change>
            <Demand>String</Demand>
            <Doc>
              <CoverageRuleDocSection>
                <H>String</H>
                <T>String</T>
              </CoverageRuleDocSection>
            </Doc>
            <Kind>String</Kind>
            <Name>String</Name>
            <NoNote>String</NoNote>
            <OverrideConsequence>String</OverrideConsequence>
            <OverrideWho>String</OverrideWho>
            <Params xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </Params>
            <RuleId>String</RuleId>
            <SourcePolicyName>String</SourcePolicyName>
            <Tune>
              <Intro>String</Intro>
              <Options>
                <CoverageRuleTuneOption>
                  <Label>String</Label>
                  <Sub>String</Sub>
                </CoverageRuleTuneOption>
              </Options>
            </Tune>
            <Why>String</Why>
          </CoverageRuleDef>
        </Rules>
        <TemplateName>String</TemplateName>
      </Doc>
      <VersionNumber>0</VersionNumber>
    </CoveragePolicyVersionInfo>
  </Versions>
</CoverageCascadeResponse>