Trendsic Platform Service

<back to all web services

AgreementNeedsSetRequest

Requires Authentication
The following routes are available for this service:
POST,OPTIONS/v1/territory/agreementneeds
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class AgreementNeedsSetRequest
{
    open var AgreementID:Int? = null
    open var EquipmentIDs:ArrayList<Int> = ArrayList<Int>()
}

open class TerritoryResponse
{
    open var ResponseStatus:ResponseStatus? = null
    open var Territories:ArrayList<Territory> = ArrayList<Territory>()
    open var Properties:ArrayList<TerritoryPropertyRow> = ArrayList<TerritoryPropertyRow>()
    open var CrewEquipment:ArrayList<CrewEquipmentRow> = ArrayList<CrewEquipmentRow>()
    open var AgreementNeeds:ArrayList<AgreementNeedRow> = ArrayList<AgreementNeedRow>()
}

open class Territory
{
    open var TerritoryID:Int? = null
    open var TerritoryUID:String? = null
    open var Name:String? = null
    open var Color:String? = null
    open var ZipCsv:String? = null
    open var CrewID:Int? = null
    open var CrewName:String? = null
    open var Active:Boolean? = null
}

open class TerritoryPropertyRow
{
    open var TerritoryID:Int? = null
    open var AgreementID:Int? = null
}

open class CrewEquipmentRow
{
    open var CrewID:Int? = null
    open var EquipmentID:Int? = null
    open var EquipmentName:String? = null
}

open class AgreementNeedRow
{
    open var AgreementID:Int? = null
    open var EquipmentID:Int? = null
    open var EquipmentName:String? = null
}

Kotlin AgreementNeedsSetRequest 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/territory/agreementneeds HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"AgreementID":0,"EquipmentIDs":[0]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Territories":[{"TerritoryID":0,"TerritoryUID":"String","Name":"String","Color":"String","ZipCsv":"String","CrewID":0,"CrewName":"String","Active":false}],"Properties":[{"TerritoryID":0,"AgreementID":0}],"CrewEquipment":[{"CrewID":0,"EquipmentID":0,"EquipmentName":"String"}],"AgreementNeeds":[{"AgreementID":0,"EquipmentID":0,"EquipmentName":"String"}]}