tvpl.api

<back to all web services

CloseProcurementBatchRequest

Requires Authentication
The following routes are available for this service:
POST/procurement/batch/{Id}/close
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ProcurementBatch:
    id: int = 0
    # @Required()
    # @StringLength(500)
    title: Optional[str] = None

    deadline: datetime.datetime = datetime.datetime(1, 1, 1)
    description: Optional[str] = None
    status: int = 0
    created_at: Optional[datetime.datetime] = None
    created_by: Optional[int] = None
    closed_at: Optional[datetime.datetime] = None
    closed_by: Optional[int] = None
    is_deleted: Optional[bool] = None
    deleted_at: Optional[datetime.datetime] = None
    deleted_by: Optional[int] = None
    # @Ignore()
    created_by_name: Optional[str] = None

    # @Ignore()
    item_count: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CloseProcurementBatchRequest:
    id: int = 0

Python CloseProcurementBatchRequest 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.

POST /procurement/batch/{Id}/close HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":0,"title":"String","deadline":"0001-01-01T00:00:00.0000000+07:06","description":"String","status":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0,"closedAt":"0001-01-01T00:00:00.0000000+07:06","closedBy":0,"isDeleted":false,"deletedAt":"0001-01-01T00:00:00.0000000+07:06","deletedBy":0,"createdByName":"String","itemCount":0}