Trendsic Platform Service

<back to all web services

OrganizationRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/Organization/{OrganizationId}
GET,POST,PUT,DELETE,OPTIONS/v1/Organization
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 OrganizationResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<Organization>? Organization = [];

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

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

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

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

class OrganizationRequest implements IConvertible
{
    List<Organization>? Organization = [];
    int? OrganizationId;

    OrganizationRequest({this.Organization,this.OrganizationId});
    OrganizationRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'Organization': TypeInfo(TypeOf.Class, create:() => Organization()),
    'OrganizationResponse': TypeInfo(TypeOf.Class, create:() => OrganizationResponse()),
    'List<Organization>': TypeInfo(TypeOf.Class, create:() => <Organization>[]),
    'OrganizationRequest': TypeInfo(TypeOf.Class, create:() => OrganizationRequest()),
});

Dart OrganizationRequest DTOs

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

HTTP + JSV

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

POST /v1/Organization/{OrganizationId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Organization: 
	[
		{
			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
		}
	],
	OrganizationId: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	Organization: 
	[
		{
			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
		}
	]
}