| 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 .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
Content-Length: length
{
WorkerScheduleItemID: 0,
AgreementJobID: 0,
JobID: 0,
ProjectID: 0,
AppliedAt: String,
AreaTreated: String,
MaterialID: 0,
AmountApplied: 0,
AmountUnit: String,
Concentration: String,
TreatedQuantity: 0,
TreatedUnit: String,
TargetPest: String,
WindSpeedMph: 0,
WindDirection: String,
TemperatureF: 0,
WeatherSource: String,
Notes: String,
AmendsApplicationID: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Applications:
[
{
ChemicalApplicationID: 0,
AppliedAt: 0001-01-01,
AreaTreated: String,
ProductName: String,
EpaRegistrationNumber: String,
AmountApplied: 0,
AmountUnit: String,
Concentration: String,
TreatedQuantity: 0,
TreatedUnit: String,
TargetPest: String,
ApplicatorName: String,
ApplicatorLicence: String,
WindSpeedMph: 0,
WindDirection: String,
TemperatureF: 0,
Notes: String,
SubmittedAt: 0001-01-01,
AmendsApplicationID: 0,
IsAmended: False
}
],
ChemicalApplicationID: 0,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}