| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Approve |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
open class RfpApproveRequest
{
open var RfpDocumentUID:UUID? = null
open var Proposal:ProjectProposal? = null
}
open class ProjectProposal
{
open var RfpDocumentID:Int? = null
open var ProjectName:String? = null
open var ClientName:String? = null
open var ProjectType:String? = null
open var ProjectLocation:String? = null
open var Scope:String? = null
open var ProjectDescription:String? = null
open var ContractDurationDays:Int? = null
open var BidDueDate:String? = null
open var EstimatedStartDate:Date? = null
open var EstimatedEndDate:Date? = null
open var Tasks:ArrayList<ProposedTask> = ArrayList<ProposedTask>()
}
open class ProposedTask
{
open var Seq:Int? = null
open var Name:String? = null
open var Category:String? = null
open var Quantity:Double? = null
open var Unit:String? = null
open var SourceItemNumber:String? = null
open var SourceReference:String? = null
open var Notes:String? = null
open var Resourcing:TaskResourcing? = null
open var DurationDays:Double? = null
open var DependsOn:ArrayList<Int> = ArrayList<Int>()
open var EstimatedStartDate:Date? = null
open var EstimatedEndDate:Date? = null
}
open class TaskResourcing
{
open var Positions:ArrayList<ResourcedPosition> = ArrayList<ResourcedPosition>()
open var Equipment:ArrayList<ResourcedEquipment> = ArrayList<ResourcedEquipment>()
open var Materials:ArrayList<ResourcedMaterial> = ArrayList<ResourcedMaterial>()
}
open class ResourcedPosition
{
open var PositionTag:String? = null
open var Hours:Double? = null
open var Headcount:Int? = null
open var SourceReference:String? = null
open var Notes:String? = null
open var IsInCatalog:Boolean? = null
open var ContactID:Int? = null
}
open class ResourcedEquipment
{
open var EquipmentID:Int? = null
open var EquipmentName:String? = null
open var MakeModel:String? = null
open var Quantity:Double? = null
open var DurationDays:Double? = null
open var SourceReference:String? = null
open var Notes:String? = null
open var IsInCatalog:Boolean? = null
open var SuggestedEquipmentID:Int? = null
open var SuggestedEquipmentName:String? = null
}
open class ResourcedMaterial
{
open var MaterialID:Int? = null
open var MaterialName:String? = null
open var MakeModel:String? = null
open var Quantity:Double? = null
open var Unit:String? = null
open var SourceReference:String? = null
open var Notes:String? = null
open var IsInCatalog:Boolean? = null
open var SuggestedMaterialID:Int? = null
open var SuggestedMaterialName:String? = null
}
open class RfpApproveResponse
{
open var ResponseStatus:ResponseStatus? = null
open var RfpDocumentID:Int? = null
open var ProjectID:Int? = null
open var ProjectUID:UUID? = null
open var RfpApprovalID:Int? = null
open var JobIDs:ArrayList<Int> = ArrayList<Int>()
open var OpenPositionCount:Int? = null
open var Diff:ProposalDiff? = null
}
open class ProposalDiff
{
open var TasksAdded:ArrayList<String> = ArrayList<String>()
open var TasksRemoved:ArrayList<String> = ArrayList<String>()
open var Tasks:ArrayList<TaskDiff> = ArrayList<TaskDiff>()
open var HasChanges:Boolean? = null
}
open class TaskDiff
{
open var TaskName:String? = null
open var PositionsAdded:ArrayList<String> = ArrayList<String>()
open var PositionsRemoved:ArrayList<String> = ArrayList<String>()
open var PositionsStaffed:ArrayList<String> = ArrayList<String>()
open var EquipmentAdded:ArrayList<Int> = ArrayList<Int>()
open var EquipmentRemoved:ArrayList<Int> = ArrayList<Int>()
open var MaterialsAdded:ArrayList<Int> = ArrayList<Int>()
open var MaterialsRemoved:ArrayList<Int> = ArrayList<Int>()
open var HasChanges:Boolean? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Rfp/{RfpDocumentUID}/Approve HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<RfpApproveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Proposal>
<BidDueDate>String</BidDueDate>
<ClientName>String</ClientName>
<ContractDurationDays>0</ContractDurationDays>
<EstimatedEndDate>0001-01-01T00:00:00</EstimatedEndDate>
<EstimatedStartDate>0001-01-01T00:00:00</EstimatedStartDate>
<ProjectDescription>String</ProjectDescription>
<ProjectLocation>String</ProjectLocation>
<ProjectName>String</ProjectName>
<ProjectType>String</ProjectType>
<RfpDocumentID>0</RfpDocumentID>
<Scope>String</Scope>
<Tasks>
<ProposedTask>
<Category>String</Category>
<DependsOn xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</DependsOn>
<DurationDays>0</DurationDays>
<EstimatedEndDate>0001-01-01T00:00:00</EstimatedEndDate>
<EstimatedStartDate>0001-01-01T00:00:00</EstimatedStartDate>
<Name>String</Name>
<Notes>String</Notes>
<Quantity>0</Quantity>
<Resourcing>
<Equipment>
<ResourcedEquipment>
<DurationDays>0</DurationDays>
<EquipmentID>0</EquipmentID>
<EquipmentName>String</EquipmentName>
<IsInCatalog>false</IsInCatalog>
<MakeModel>String</MakeModel>
<Notes>String</Notes>
<Quantity>0</Quantity>
<SourceReference>String</SourceReference>
<SuggestedEquipmentID>0</SuggestedEquipmentID>
<SuggestedEquipmentName>String</SuggestedEquipmentName>
</ResourcedEquipment>
</Equipment>
<Materials>
<ResourcedMaterial>
<IsInCatalog>false</IsInCatalog>
<MakeModel>String</MakeModel>
<MaterialID>0</MaterialID>
<MaterialName>String</MaterialName>
<Notes>String</Notes>
<Quantity>0</Quantity>
<SourceReference>String</SourceReference>
<SuggestedMaterialID>0</SuggestedMaterialID>
<SuggestedMaterialName>String</SuggestedMaterialName>
<Unit>String</Unit>
</ResourcedMaterial>
</Materials>
<Positions>
<ResourcedPosition>
<ContactID>0</ContactID>
<Headcount>0</Headcount>
<Hours>0</Hours>
<IsInCatalog>false</IsInCatalog>
<Notes>String</Notes>
<PositionTag>String</PositionTag>
<SourceReference>String</SourceReference>
</ResourcedPosition>
</Positions>
</Resourcing>
<Seq>0</Seq>
<SourceItemNumber>String</SourceItemNumber>
<SourceReference>String</SourceReference>
<Unit>String</Unit>
</ProposedTask>
</Tasks>
</Proposal>
<RfpDocumentUID>00000000-0000-0000-0000-000000000000</RfpDocumentUID>
</RfpApproveRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<RfpApproveResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Diff>
<Tasks>
<TaskDiff>
<EquipmentAdded xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</EquipmentAdded>
<EquipmentRemoved xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</EquipmentRemoved>
<MaterialsAdded xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</MaterialsAdded>
<MaterialsRemoved xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:int>0</d5p1:int>
</MaterialsRemoved>
<PositionsAdded xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</PositionsAdded>
<PositionsRemoved xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</PositionsRemoved>
<PositionsStaffed xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</PositionsStaffed>
<TaskName>String</TaskName>
</TaskDiff>
</Tasks>
<TasksAdded xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</TasksAdded>
<TasksRemoved xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:string>String</d3p1:string>
</TasksRemoved>
</Diff>
<JobIDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</JobIDs>
<OpenPositionCount>0</OpenPositionCount>
<ProjectID>0</ProjectID>
<ProjectUID>00000000-0000-0000-0000-000000000000</ProjectUID>
<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>
<RfpApprovalID>0</RfpApprovalID>
<RfpDocumentID>0</RfpDocumentID>
</RfpApproveResponse>