tvpl.api

<back to all web services

AssignDocumentReadRequest

Requires Authentication
The following routes are available for this service:
POST/document-permission/assign-Read
import 'package:servicestack/servicestack.dart';

class DocumentPemissionResponse implements IConvertible
{
    int? code;
    String? message;

    DocumentPemissionResponse({this.code,this.message});
    DocumentPemissionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        code = json['code'];
        message = json['message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'code': code,
        'message': message
    };

    getTypeName() => "DocumentPemissionResponse";
    TypeContext? context = _ctx;
}

class AssignDocumentReadRequest implements IPost, IConvertible
{
    int? documentId;
    List<int>? accountIds;

    AssignDocumentReadRequest({this.documentId,this.accountIds});
    AssignDocumentReadRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        documentId = json['documentId'];
        accountIds = JsonConverters.fromJson(json['accountIds'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'documentId': documentId,
        'accountIds': JsonConverters.toJson(accountIds,'List<int>',context!)
    };

    getTypeName() => "AssignDocumentReadRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'etc_api.vsmlab.vn', types: <String, TypeInfo> {
    'DocumentPemissionResponse': TypeInfo(TypeOf.Class, create:() => DocumentPemissionResponse()),
    'AssignDocumentReadRequest': TypeInfo(TypeOf.Class, create:() => AssignDocumentReadRequest()),
});

Dart AssignDocumentReadRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /document-permission/assign-Read HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"documentId":0,"accountIds":[0]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"code":0,"message":"String"}