Trendsic Platform Service

<back to all web services

ApplicationCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/field/application
"use strict";
export class ApplicationView {
    /** @param {{ChemicalApplicationID?:number,AppliedAt?:string,AreaTreated?:string,ProductName?:string,EpaRegistrationNumber?:string,AmountApplied?:number,AmountUnit?:string,Concentration?:string,TreatedQuantity?:number,TreatedUnit?:string,TargetPest?:string,ApplicatorName?:string,ApplicatorLicence?:string,WindSpeedMph?:number,WindDirection?:string,TemperatureF?:number,Notes?:string,SubmittedAt?:string,AmendsApplicationID?:number,IsAmended?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    ChemicalApplicationID;
    /** @type {?string} */
    AppliedAt;
    /** @type {string} */
    AreaTreated;
    /** @type {string} */
    ProductName;
    /** @type {string} */
    EpaRegistrationNumber;
    /** @type {?number} */
    AmountApplied;
    /** @type {string} */
    AmountUnit;
    /** @type {string} */
    Concentration;
    /** @type {?number} */
    TreatedQuantity;
    /** @type {string} */
    TreatedUnit;
    /** @type {string} */
    TargetPest;
    /** @type {string} */
    ApplicatorName;
    /** @type {string} */
    ApplicatorLicence;
    /** @type {?number} */
    WindSpeedMph;
    /** @type {string} */
    WindDirection;
    /** @type {?number} */
    TemperatureF;
    /** @type {string} */
    Notes;
    /** @type {?string} */
    SubmittedAt;
    /** @type {?number} */
    AmendsApplicationID;
    /** @type {boolean} */
    IsAmended;
}
export class ApplicationResponse {
    /** @param {{Applications?:ApplicationView[],ChemicalApplicationID?:number,ResponseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ApplicationView[]} */
    Applications = [];
    /** @type {number} */
    ChemicalApplicationID;
    /** @type {ResponseStatus} */
    ResponseStatus;
}
export class ApplicationCreateRequest {
    /** @param {{WorkerScheduleItemID?:number,AgreementJobID?:number,JobID?:number,ProjectID?:number,AppliedAt?:string,AreaTreated?:string,MaterialID?:number,AmountApplied?:number,AmountUnit?:string,Concentration?:string,TreatedQuantity?:number,TreatedUnit?:string,TargetPest?:string,WindSpeedMph?:number,WindDirection?:string,TemperatureF?:number,WeatherSource?:string,Notes?:string,AmendsApplicationID?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    WorkerScheduleItemID;
    /** @type {number} */
    AgreementJobID;
    /** @type {number} */
    JobID;
    /** @type {number} */
    ProjectID;
    /** @type {string} */
    AppliedAt;
    /** @type {string} */
    AreaTreated;
    /** @type {number} */
    MaterialID;
    /** @type {?number} */
    AmountApplied;
    /** @type {string} */
    AmountUnit;
    /** @type {string} */
    Concentration;
    /** @type {?number} */
    TreatedQuantity;
    /** @type {string} */
    TreatedUnit;
    /** @type {string} */
    TargetPest;
    /** @type {?number} */
    WindSpeedMph;
    /** @type {string} */
    WindDirection;
    /** @type {?number} */
    TemperatureF;
    /** @type {string} */
    WeatherSource;
    /** @type {string} */
    Notes;
    /** @type {number} */
    AmendsApplicationID;
}

JavaScript ApplicationCreateRequest 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/field/application HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ApplicationCreateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <AgreementJobID>0</AgreementJobID>
  <AmendsApplicationID>0</AmendsApplicationID>
  <AmountApplied>0</AmountApplied>
  <AmountUnit>String</AmountUnit>
  <AppliedAt>String</AppliedAt>
  <AreaTreated>String</AreaTreated>
  <Concentration>String</Concentration>
  <JobID>0</JobID>
  <MaterialID>0</MaterialID>
  <Notes>String</Notes>
  <ProjectID>0</ProjectID>
  <TargetPest>String</TargetPest>
  <TemperatureF>0</TemperatureF>
  <TreatedQuantity>0</TreatedQuantity>
  <TreatedUnit>String</TreatedUnit>
  <WeatherSource>String</WeatherSource>
  <WindDirection>String</WindDirection>
  <WindSpeedMph>0</WindSpeedMph>
  <WorkerScheduleItemID>0</WorkerScheduleItemID>
</ApplicationCreateRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ApplicationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Applications>
    <ApplicationView>
      <AmendsApplicationID>0</AmendsApplicationID>
      <AmountApplied>0</AmountApplied>
      <AmountUnit>String</AmountUnit>
      <ApplicatorLicence>String</ApplicatorLicence>
      <ApplicatorName>String</ApplicatorName>
      <AppliedAt>0001-01-01T00:00:00</AppliedAt>
      <AreaTreated>String</AreaTreated>
      <ChemicalApplicationID>0</ChemicalApplicationID>
      <Concentration>String</Concentration>
      <EpaRegistrationNumber>String</EpaRegistrationNumber>
      <IsAmended>false</IsAmended>
      <Notes>String</Notes>
      <ProductName>String</ProductName>
      <SubmittedAt>0001-01-01T00:00:00</SubmittedAt>
      <TargetPest>String</TargetPest>
      <TemperatureF>0</TemperatureF>
      <TreatedQuantity>0</TreatedQuantity>
      <TreatedUnit>String</TreatedUnit>
      <WindDirection>String</WindDirection>
      <WindSpeedMph>0</WindSpeedMph>
    </ApplicationView>
  </Applications>
  <ChemicalApplicationID>0</ChemicalApplicationID>
  <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>
</ApplicationResponse>