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 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 Organization:
    organization_id: int = 0
    organization_type_id: int = 0
    state_i_d: int = 0
    state_name: Optional[str] = None
    district_i_d: int = 0
    district_name: Optional[str] = None
    county_i_d: int = 0
    county_name: Optional[str] = None
    school_i_d: int = 0
    school_name: Optional[str] = None
    entity_name: Optional[str] = None
    entity_id: Optional[str] = None
    source: Optional[str] = None
    pera__list_id: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class orgGetSingleResponse:
    response_status: Optional[ResponseStatus] = None
    org: Optional[Organization] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class orgGetSingleRequest:
    school_i_d: int = 0
    district_i_d: int = 0

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

GET /v1/Organization/GetSingleBySchoolID/{schoolID} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsv
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
		}
	},
	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
	}
}