Trendsic Platform Service

<back to all web services

ApplicationCreateRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/field/application
namespace CRM.AgencyPlatform.API.Internal

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type ApplicationView() = 
        member val ChemicalApplicationID:Int32 = new Int32() with get,set
        member val AppliedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val AreaTreated:String = null with get,set
        member val ProductName:String = null with get,set
        member val EpaRegistrationNumber:String = null with get,set
        member val AmountApplied:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val AmountUnit:String = null with get,set
        member val Concentration:String = null with get,set
        member val TreatedQuantity:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val TreatedUnit:String = null with get,set
        member val TargetPest:String = null with get,set
        member val ApplicatorName:String = null with get,set
        member val ApplicatorLicence:String = null with get,set
        member val WindSpeedMph:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val WindDirection:String = null with get,set
        member val TemperatureF:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val Notes:String = null with get,set
        member val SubmittedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val AmendsApplicationID:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val IsAmended:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type ApplicationResponse() = 
        member val Applications:ResizeArray<ApplicationView> = new ResizeArray<ApplicationView>() with get,set
        member val ChemicalApplicationID:Int32 = new Int32() with get,set
        member val ResponseStatus:ResponseStatus = null with get,set

    [<AllowNullLiteral>]
    type ApplicationCreateRequest() = 
        member val WorkerScheduleItemID:Int32 = new Int32() with get,set
        member val AgreementJobID:Int32 = new Int32() with get,set
        member val JobID:Int32 = new Int32() with get,set
        member val ProjectID:Int32 = new Int32() with get,set
        member val AppliedAt:String = null with get,set
        member val AreaTreated:String = null with get,set
        member val MaterialID:Int32 = new Int32() with get,set
        member val AmountApplied:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val AmountUnit:String = null with get,set
        member val Concentration:String = null with get,set
        member val TreatedQuantity:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val TreatedUnit:String = null with get,set
        member val TargetPest:String = null with get,set
        member val WindSpeedMph:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val WindDirection:String = null with get,set
        member val TemperatureF:Nullable<Decimal> = new Nullable<Decimal>() with get,set
        member val WeatherSource:String = null with get,set
        member val Notes:String = null with get,set
        member val AmendsApplicationID:Int32 = new Int32() with get,set

F# ApplicationCreateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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/json
Content-Type: application/json
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: application/json
Content-Length: length

{"Applications":[{"ChemicalApplicationID":0,"AppliedAt":"0001-01-01T00:00:00.0000000","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-01T00:00:00.0000000","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"}}}