Trendsic Platform Service

<back to all web services

orgGetSingleRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET, OPTIONS/v1/Organization/GetSingleBySchoolID/{schoolID}
GET, OPTIONS/v1/Organization/GetSingleByDistrictID/{districtID}
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class Organization implements IConvertible
{
    int? OrganizationId;
    int? OrganizationTypeId;
    int? StateID;
    String? StateName;
    int? DistrictID;
    String? DistrictName;
    int? CountyID;
    String? CountyName;
    int? SchoolID;
    String? SchoolName;
    String? EntityName;
    String? EntityId;
    String? Source;
    int? Pera_ListId;

    Organization({this.OrganizationId,this.OrganizationTypeId,this.StateID,this.StateName,this.DistrictID,this.DistrictName,this.CountyID,this.CountyName,this.SchoolID,this.SchoolName,this.EntityName,this.EntityId,this.Source,this.Pera_ListId});
    Organization.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        OrganizationId = json['OrganizationId'];
        OrganizationTypeId = json['OrganizationTypeId'];
        StateID = json['StateID'];
        StateName = json['StateName'];
        DistrictID = json['DistrictID'];
        DistrictName = json['DistrictName'];
        CountyID = json['CountyID'];
        CountyName = json['CountyName'];
        SchoolID = json['SchoolID'];
        SchoolName = json['SchoolName'];
        EntityName = json['EntityName'];
        EntityId = json['EntityId'];
        Source = json['Source'];
        Pera_ListId = json['Pera_ListId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'OrganizationId': OrganizationId,
        'OrganizationTypeId': OrganizationTypeId,
        'StateID': StateID,
        'StateName': StateName,
        'DistrictID': DistrictID,
        'DistrictName': DistrictName,
        'CountyID': CountyID,
        'CountyName': CountyName,
        'SchoolID': SchoolID,
        'SchoolName': SchoolName,
        'EntityName': EntityName,
        'EntityId': EntityId,
        'Source': Source,
        'Pera_ListId': Pera_ListId
    };

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

class orgGetSingleResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    Organization? org;

    orgGetSingleResponse({this.ResponseStatus,this.org});
    orgGetSingleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        org = JsonConverters.fromJson(json['org'],'Organization',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'org': JsonConverters.toJson(org,'Organization',context!)
    };

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

class orgGetSingleRequest implements IConvertible
{
    int? schoolID;
    int? districtID;

    orgGetSingleRequest({this.schoolID,this.districtID});
    orgGetSingleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'schoolID': schoolID,
        'districtID': districtID
    };

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'Organization': TypeInfo(TypeOf.Class, create:() => Organization()),
    'orgGetSingleResponse': TypeInfo(TypeOf.Class, create:() => orgGetSingleResponse()),
    'orgGetSingleRequest': TypeInfo(TypeOf.Class, create:() => orgGetSingleRequest()),
});

Dart orgGetSingleRequest DTOs

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

HTTP + OTHER

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

GET /v1/Organization/GetSingleBySchoolID/{schoolID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"org":{"OrganizationId":0,"OrganizationTypeId":0,"StateID":0,"StateName":"String","DistrictID":0,"DistrictName":"String","CountyID":0,"CountyName":"String","SchoolID":0,"SchoolName":"String","EntityName":"String","EntityId":"String","Source":"String","Pera_ListId":0}}