GET | /api/GetSchoolList |
---|
"use strict";
export class BaseRequest {
/** @param {{ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description This is your AIM API Key provided by Tri-Tech */
ApiKey;
/** @type {string} */
OAuthToken;
}
export class BaseSecureRequest extends BaseRequest {
/** @param {{Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string} */
Token;
/** @type {string} */
DeviceId;
/** @type {string} */
AppId;
}
export class BaseResponseResult {
/** @param {{StatusCode?:string,Login?:string,ErrorCode?:string,ErrorDisplayText?:string,ErrorMessage?:string,DomainName?:string,IpAddress?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
StatusCode;
/** @type {string} */
Login;
/** @type {string} */
ErrorCode;
/** @type {string} */
ErrorDisplayText;
/** @type {string} */
ErrorMessage;
/** @type {string} */
DomainName;
/** @type {string} */
IpAddress;
}
export class BaseResponse {
/** @param {{Status?:BaseResponseResult}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {BaseResponseResult} */
Status;
}
export class C2BDeliveryInfo {
/** @param {{FirstDelivery?:string,DeliveryTime?:string,DeliveryThreshold?:number,SundayDelivery?:boolean,MondayDelivery?:boolean,TuesdayDelivery?:boolean,WednesdayDelivery?:boolean,ThursdayDelivery?:boolean,FridayDelivery?:boolean,SaturdayDelivery?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
FirstDelivery;
/** @type {string} */
DeliveryTime;
/** @type {number} */
DeliveryThreshold;
/** @type {boolean} */
SundayDelivery;
/** @type {boolean} */
MondayDelivery;
/** @type {boolean} */
TuesdayDelivery;
/** @type {boolean} */
WednesdayDelivery;
/** @type {boolean} */
ThursdayDelivery;
/** @type {boolean} */
FridayDelivery;
/** @type {boolean} */
SaturdayDelivery;
}
export class SchoolGeneric {
/** @param {{Id?:number,SchoolName?:string,District?:string,Address?:string,City?:string,State?:string,Zip?:string,Phone?:string,TaxAuth?:string,DeliveryInfo?:C2BDeliveryInfo}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
SchoolName;
/** @type {string} */
District;
/** @type {string} */
Address;
/** @type {string} */
City;
/** @type {string} */
State;
/** @type {string} */
Zip;
/** @type {string} */
Phone;
/** @type {string} */
TaxAuth;
/** @type {C2BDeliveryInfo} */
DeliveryInfo;
}
export class GetSchoolListResponse extends BaseResponse {
/** @param {{Schools?:SchoolGeneric[],Status?:BaseResponseResult}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {SchoolGeneric[]} */
Schools;
}
export class GetSchoolListRequest extends BaseSecureRequest {
/** @param {{DistrictId?:number,Token?:string,DeviceId?:string,AppId?:string,ApiKey?:string,OAuthToken?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?number}
* @description District ID. Skip this parameter to return all schools. -1 will return all schools that don't have a district assigned. */
DistrictId;
}
JavaScript GetSchoolListRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/GetSchoolList HTTP/1.1 Host: active-ewebservice.biz Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetSchoolListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService"> <Status> <DomainName>String</DomainName> <ErrorCode>String</ErrorCode> <ErrorDisplayText>String</ErrorDisplayText> <ErrorMessage>String</ErrorMessage> <IpAddress>String</IpAddress> <Login>String</Login> <StatusCode>String</StatusCode> </Status> <Schools xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM"> <d2p1:SchoolGeneric> <d2p1:Address>String</d2p1:Address> <d2p1:City>String</d2p1:City> <d2p1:DeliveryInfo> <d2p1:DeliveryThreshold>0</d2p1:DeliveryThreshold> <d2p1:DeliveryTime>0001-01-01T00:00:00</d2p1:DeliveryTime> <d2p1:FirstDelivery>0001-01-01T00:00:00</d2p1:FirstDelivery> <d2p1:FridayDelivery>false</d2p1:FridayDelivery> <d2p1:MondayDelivery>false</d2p1:MondayDelivery> <d2p1:SaturdayDelivery>false</d2p1:SaturdayDelivery> <d2p1:SundayDelivery>false</d2p1:SundayDelivery> <d2p1:ThursdayDelivery>false</d2p1:ThursdayDelivery> <d2p1:TuesdayDelivery>false</d2p1:TuesdayDelivery> <d2p1:WednesdayDelivery>false</d2p1:WednesdayDelivery> </d2p1:DeliveryInfo> <d2p1:District>String</d2p1:District> <d2p1:Id>0</d2p1:Id> <d2p1:Phone>String</d2p1:Phone> <d2p1:SchoolName>String</d2p1:SchoolName> <d2p1:State>String</d2p1:State> <d2p1:TaxAuth>String</d2p1:TaxAuth> <d2p1:Zip>String</d2p1:Zip> </d2p1:SchoolGeneric> </Schools> </GetSchoolListResponse>