tvpl.api

<back to all web services

ApproveProcurementItemRequest

Requires Authentication
The following routes are available for this service:
POST/procurement/item/{Id}/approve

export class ProcurementItem
{
    public id: number;
    public batchId: number;
    public departmentId?: number;
    public equipmentId?: number;
    // @Required()
    // @StringLength(500)
    public productName: string;

    public technicalSpec?: string;
    // @StringLength(50)
    public unit?: string;

    public quantity: number;
    public purpose?: string;
    public note?: string;
    public approvalStatus: number;
    public approvalNote?: string;
    public approvedAt?: string;
    public approvedBy?: number;
    public createdAt?: string;
    public createdBy?: number;
    public updatedAt?: string;
    public updatedBy?: number;
    public isDeleted?: boolean;
    public deletedAt?: string;
    public deletedBy?: number;
    // @Ignore()
    public departmentName?: string;

    // @Ignore()
    public createdByName?: string;

    // @Ignore()
    public approvedByName?: string;

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

export class ApproveProcurementItemRequest
{
    public id: number;
    public approve: boolean;
    public note?: string;

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

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

POST /procurement/item/{Id}/approve HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ApproveProcurementItemRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.api.ServiceModel">
  <Approve>false</Approve>
  <Id>0</Id>
  <Note>String</Note>
</ApproveProcurementItemRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ProcurementItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
  <ApprovalNote>String</ApprovalNote>
  <ApprovalStatus>0</ApprovalStatus>
  <ApprovedAt>0001-01-01T00:00:00</ApprovedAt>
  <ApprovedBy>0</ApprovedBy>
  <ApprovedByName>String</ApprovedByName>
  <BatchId>0</BatchId>
  <CreatedAt>0001-01-01T00:00:00</CreatedAt>
  <CreatedBy>0</CreatedBy>
  <CreatedByName>String</CreatedByName>
  <DeletedAt>0001-01-01T00:00:00</DeletedAt>
  <DeletedBy>0</DeletedBy>
  <DepartmentId>0</DepartmentId>
  <DepartmentName>String</DepartmentName>
  <EquipmentId>0</EquipmentId>
  <Id>0</Id>
  <IsDeleted>false</IsDeleted>
  <Note>String</Note>
  <ProductName>String</ProductName>
  <Purpose>String</Purpose>
  <Quantity>0</Quantity>
  <TechnicalSpec>String</TechnicalSpec>
  <Unit>String</Unit>
  <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
  <UpdatedBy>0</UpdatedBy>
</ProcurementItem>