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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<OrganizationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Organization>
    <Organization>
      <CountyID>0</CountyID>
      <CountyName>String</CountyName>
      <DistrictID>0</DistrictID>
      <DistrictName>String</DistrictName>
      <EntityId>String</EntityId>
      <EntityName>String</EntityName>
      <OrganizationId>0</OrganizationId>
      <OrganizationTypeId>0</OrganizationTypeId>
      <Pera_ListId>0</Pera_ListId>
      <SchoolID>0</SchoolID>
      <SchoolName>String</SchoolName>
      <Source>String</Source>
      <StateID>0</StateID>
      <StateName>String</StateName>
    </Organization>
  </Organization>
  <OrganizationId>0</OrganizationId>
</OrganizationRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<OrganizationResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Organization>
    <Organization>
      <CountyID>0</CountyID>
      <CountyName>String</CountyName>
      <DistrictID>0</DistrictID>
      <DistrictName>String</DistrictName>
      <EntityId>String</EntityId>
      <EntityName>String</EntityName>
      <OrganizationId>0</OrganizationId>
      <OrganizationTypeId>0</OrganizationTypeId>
      <Pera_ListId>0</Pera_ListId>
      <SchoolID>0</SchoolID>
      <SchoolName>String</SchoolName>
      <Source>String</Source>
      <StateID>0</StateID>
      <StateName>String</StateName>
    </Organization>
  </Organization>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</OrganizationResponse>