tvpl.api

<back to all web services

GetAdvancedWorkflowInfoRequest

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

export class Provider
{
    public id: number;
    public name: string;
    public taxCode?: string;
    public address?: string;
    public email?: string;
    public phone?: string;
    public additionalInfo?: string;
    public providerType: number;
    public createdAt?: string;
    public createdBy?: number;

    public constructor(init?: Partial<Provider>) { (Object as any).assign(this, init); }
}

export class Contract
{
    public id: number;
    // @Required()
    public workflowId: number;

    // @StringLength(100)
    public contractNo?: string;

    // @StringLength(100)
    public contractDate?: string;

    public serviceName?: string;
    // @StringLength(100)
    public contractType?: string;

    public objective?: string;
    public location?: string;
    public createdAt: string;
    // @Required()
    public createdBy: number;

    public constructor(init?: Partial<Contract>) { (Object as any).assign(this, init); }
}

export class Estimate
{
    public id: number;
    // @Required()
    public workflowId: number;

    public valueBeforeTax?: number;
    public taxAmount?: number;
    public totalAmount?: number;
    public createdAt: string;
    // @Required()
    public createdBy: number;

    public constructor(init?: Partial<Estimate>) { (Object as any).assign(this, init); }
}

export class PurchaseHistory
{
    public id: number;
    // @Required()
    public workflowId: number;

    public sequenceNo?: number;
    public detail?: string;
    // @StringLength(150)
    public unit?: string;

    public quantity?: number;
    public unitPrice?: number;
    public amount?: number;
    public note?: string;
    public createdAt: string;
    // @Required()
    public createdBy: number;

    public constructor(init?: Partial<PurchaseHistory>) { (Object as any).assign(this, init); }
}

export class AdvancedWorkflowInfoData
{
    public provider?: Provider;
    public contract?: Contract;
    public estimate?: Estimate;
    public purchaseHistory?: PurchaseHistory[];

    public constructor(init?: Partial<AdvancedWorkflowInfoData>) { (Object as any).assign(this, init); }
}

export class AdvancedWorkflowInfoResponse
{
    public code: number;
    public message: string;
    public data: AdvancedWorkflowInfoData;

    public constructor(init?: Partial<AdvancedWorkflowInfoResponse>) { (Object as any).assign(this, init); }
}

export class GetAdvancedWorkflowInfoRequest
{
    public workflowId: number;

    public constructor(init?: Partial<GetAdvancedWorkflowInfoRequest>) { (Object as any).assign(this, init); }
}

TypeScript 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>