| Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator, Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/Organization/{OrganizationId} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Organization |
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 OrganizationResponse:
response_status: Optional[ResponseStatus] = None
organization: List[Organization] = field(default_factory=list)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OrganizationRequest:
organization: List[Organization] = field(default_factory=list)
organization_id: int = 0
Python OrganizationRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=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
}
]
}