tvpl.api

<back to all web services

GetAdvancedWorkflowInfoRequest

Requires Authentication
The following routes are available for this service:
GET/workflow/{WorkflowId}/advanced-info
import Foundation
import ServiceStack

public class GetAdvancedWorkflowInfoRequest : Codable
{
    public var workflowId:Int

    required public init(){}
}

public class AdvancedWorkflowInfoResponse : Codable
{
    public var code:Int
    public var message:String
    public var data:AdvancedWorkflowInfoData

    required public init(){}
}

public class AdvancedWorkflowInfoData : Codable
{
    public var provider:Provider
    public var contract:Contract
    public var estimate:Estimate
    public var purchaseHistory:[PurchaseHistory] = []

    required public init(){}
}

public class Provider : Codable
{
    public var id:Int
    public var name:String
    public var taxCode:String
    public var address:String
    public var email:String
    public var phone:String
    public var additionalInfo:String
    public var providerType:Int
    public var createdAt:Date?
    public var createdBy:Int?

    required public init(){}
}

public class Contract : Codable
{
    public var id:Int
    // @Required()
    public var workflowId:Int?

    // @StringLength(100)
    public var contractNo:String

    // @StringLength(100)
    public var contractDate:String

    public var serviceName:String
    // @StringLength(100)
    public var contractType:String

    public var objective:String
    public var location:String
    public var createdAt:Date
    // @Required()
    public var createdBy:Int?

    required public init(){}
}

public class Estimate : Codable
{
    public var id:Int
    // @Required()
    public var workflowId:Int?

    public var valueBeforeTax:Int?
    public var taxAmount:Int?
    public var totalAmount:Int?
    public var createdAt:Date
    // @Required()
    public var createdBy:Int?

    required public init(){}
}

public class PurchaseHistory : Codable
{
    public var id:Int
    // @Required()
    public var workflowId:Int?

    public var sequenceNo:Int?
    public var detail:String
    // @StringLength(150)
    public var unit:String

    public var quantity:Int?
    public var unitPrice:Int?
    public var amount:Int?
    public var note:String
    public var createdAt:Date
    // @Required()
    public var createdBy:Int?

    required public init(){}
}


Swift GetAdvancedWorkflowInfoRequest 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.

GET /workflow/{WorkflowId}/advanced-info HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AdvancedWorkflowInfoResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Code>0</Code>
  <Data>
    <Contract xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
      <d3p1:ContractDate>String</d3p1:ContractDate>
      <d3p1:ContractNo>String</d3p1:ContractNo>
      <d3p1:ContractType>String</d3p1:ContractType>
      <d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
      <d3p1:CreatedBy>0</d3p1:CreatedBy>
      <d3p1:Id>0</d3p1:Id>
      <d3p1:Location>String</d3p1:Location>
      <d3p1:Objective>String</d3p1:Objective>
      <d3p1:ServiceName>String</d3p1:ServiceName>
      <d3p1:WorkflowId>0</d3p1:WorkflowId>
    </Contract>
    <Estimate xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
      <d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
      <d3p1:CreatedBy>0</d3p1:CreatedBy>
      <d3p1:Id>0</d3p1:Id>
      <d3p1:TaxAmount>0</d3p1:TaxAmount>
      <d3p1:TotalAmount>0</d3p1:TotalAmount>
      <d3p1:ValueBeforeTax>0</d3p1:ValueBeforeTax>
      <d3p1:WorkflowId>0</d3p1:WorkflowId>
    </Estimate>
    <Provider xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
      <d3p1:AdditionalInfo>String</d3p1:AdditionalInfo>
      <d3p1:Address>String</d3p1:Address>
      <d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
      <d3p1:CreatedBy>0</d3p1:CreatedBy>
      <d3p1:DeletedAt>0001-01-01T00:00:00</d3p1:DeletedAt>
      <d3p1:DeletedBy>0</d3p1:DeletedBy>
      <d3p1:Email>String</d3p1:Email>
      <d3p1:Id>0</d3p1:Id>
      <d3p1:IsDeleted>false</d3p1:IsDeleted>
      <d3p1:Name>String</d3p1:Name>
      <d3p1:Phone>String</d3p1:Phone>
      <d3p1:ProviderType>0</d3p1:ProviderType>
      <d3p1:TaxCode>String</d3p1:TaxCode>
    </Provider>
    <PurchaseHistory xmlns:d3p1="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
      <d3p1:PurchaseHistory>
        <d3p1:Amount>0</d3p1:Amount>
        <d3p1:CreatedAt>0001-01-01T00:00:00</d3p1:CreatedAt>
        <d3p1:CreatedBy>0</d3p1:CreatedBy>
        <d3p1:Detail>String</d3p1:Detail>
        <d3p1:Id>0</d3p1:Id>
        <d3p1:Note>String</d3p1:Note>
        <d3p1:Quantity>0</d3p1:Quantity>
        <d3p1:SequenceNo>0</d3p1:SequenceNo>
        <d3p1:Unit>String</d3p1:Unit>
        <d3p1:UnitPrice>0</d3p1:UnitPrice>
        <d3p1:WorkflowId>0</d3p1:WorkflowId>
      </d3p1:PurchaseHistory>
    </PurchaseHistory>
  </Data>
  <Message>String</Message>
</AdvancedWorkflowInfoResponse>