tvpl.api

<back to all web services

SearchProcurementItemRequest

Requires Authentication
The following routes are available for this service:
GET/procurement/item/search
namespace tvpl.api.ServiceModel

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type PagingRequest() = 
        member val Page:Int32 = new Int32() with get,set
        member val Limit:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type SearchProcurementItemRequest() = 
        inherit PagingRequest()
        member val BatchId:Int32 = new Int32() with get,set
        member val DepartmentId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val ApprovalStatus:Nullable<Int32> = new Nullable<Int32>() with get,set

    [<AllowNullLiteral>]
    type MongoObject() = 
        member val Id:String = null with get,set

    [<AllowNullLiteral>]
    type AuditLog() = 
        inherit MongoObject()
        member val UserName:String = null with get,set
        member val UserId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val DocumentId:Int32 = new Int32() with get,set
        member val Action:String = null with get,set
        member val Description:String = null with get,set
        member val CreatedDate:DateTime = new DateTime() with get,set
        member val UpdatedDate:DateTime = new DateTime() with get,set
        member val IpAddress:String = null with get,set
        member val UserAgent:String = null with get,set

    [<AllowNullLiteral>]
    type Pagination() = 
        member val Total:Int64 = new Int64() with get,set
        member val Pages:Int32 = new Int32() with get,set
        member val Offset:Int64 = new Int64() with get,set
        member val Limit:Int32 = new Int32() with get,set
        member val CurrentPage:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type PageResponse<AuditLog>() = 
        member val Code:Int32 = new Int32() with get,set
        member val Message:String = null with get,set
        member val Data:ResizeArray<AuditLog> = new ResizeArray<AuditLog>() with get,set
        member val Pagination:Pagination = null with get,set

F# SearchProcurementItemRequest 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.

GET /procurement/item/search HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"code":0,"message":"String","data":[{"id":0,"batchId":0,"departmentId":0,"equipmentId":0,"productName":"String","technicalSpec":"String","unit":"String","quantity":0,"purpose":"String","note":"String","approvalStatus":0,"approvalNote":"String","approvedAt":"0001-01-01T00:00:00.0000000+07:06","approvedBy":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0,"updatedAt":"0001-01-01T00:00:00.0000000+07:06","updatedBy":0,"isDeleted":false,"deletedAt":"0001-01-01T00:00:00.0000000+07:06","deletedBy":0,"departmentName":"String","createdByName":"String","approvedByName":"String"}],"pagination":null}