regis

<back to all web services

InstitutionCreateRequest

Requires Authentication
Required role:REGISUserRole
The following routes are available for this service:
POST/Academic/Institution/Create
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class InstitutionResponse implements IConvertible
{
    ResponseStatus? responseStatus;
    int? institution_id;
    String? institution_name;
    String? institution_previous_names;
    String? institution_other_names;
    String? institution_type;
    String? accreditation_status;
    String? accreditation_status_notes;
    List<String>? related_institutions;
    DateTime? accreditation_status_changed_date;
    String? gpa_conversion;
    String? credit_hour_conversion;
    String? addr1;
    String? addr2;
    String? city;
    String? state;
    String? country;
    String? zip;

    InstitutionResponse({this.responseStatus,this.institution_id,this.institution_name,this.institution_previous_names,this.institution_other_names,this.institution_type,this.accreditation_status,this.accreditation_status_notes,this.related_institutions,this.accreditation_status_changed_date,this.gpa_conversion,this.credit_hour_conversion,this.addr1,this.addr2,this.city,this.state,this.country,this.zip});
    InstitutionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        institution_id = json['institution_id'];
        institution_name = json['institution_name'];
        institution_previous_names = json['institution_previous_names'];
        institution_other_names = json['institution_other_names'];
        institution_type = json['institution_type'];
        accreditation_status = json['accreditation_status'];
        accreditation_status_notes = json['accreditation_status_notes'];
        related_institutions = JsonConverters.fromJson(json['related_institutions'],'List<String>',context!);
        accreditation_status_changed_date = JsonConverters.fromJson(json['accreditation_status_changed_date'],'DateTime',context!);
        gpa_conversion = json['gpa_conversion'];
        credit_hour_conversion = json['credit_hour_conversion'];
        addr1 = json['addr1'];
        addr2 = json['addr2'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        zip = json['zip'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!),
        'institution_id': institution_id,
        'institution_name': institution_name,
        'institution_previous_names': institution_previous_names,
        'institution_other_names': institution_other_names,
        'institution_type': institution_type,
        'accreditation_status': accreditation_status,
        'accreditation_status_notes': accreditation_status_notes,
        'related_institutions': JsonConverters.toJson(related_institutions,'List<String>',context!),
        'accreditation_status_changed_date': JsonConverters.toJson(accreditation_status_changed_date,'DateTime',context!),
        'gpa_conversion': gpa_conversion,
        'credit_hour_conversion': credit_hour_conversion,
        'addr1': addr1,
        'addr2': addr2,
        'city': city,
        'state': state,
        'country': country,
        'zip': zip
    };

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

class InstitutionCreateRequest implements IConvertible
{
    String? institution_name;
    String? institution_other_names;
    String? institution_previous_names;
    String? institution_type;
    String? accreditation_status;
    String? accreditation_status_notes;
    DateTime? accreditation_status_changed_date;
    String? gpa_conversion;
    String? credit_hour_conversion;
    String? authorizing_uuid;

    InstitutionCreateRequest({this.institution_name,this.institution_other_names,this.institution_previous_names,this.institution_type,this.accreditation_status,this.accreditation_status_notes,this.accreditation_status_changed_date,this.gpa_conversion,this.credit_hour_conversion,this.authorizing_uuid});
    InstitutionCreateRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        institution_name = json['institution_name'];
        institution_other_names = json['institution_other_names'];
        institution_previous_names = json['institution_previous_names'];
        institution_type = json['institution_type'];
        accreditation_status = json['accreditation_status'];
        accreditation_status_notes = json['accreditation_status_notes'];
        accreditation_status_changed_date = JsonConverters.fromJson(json['accreditation_status_changed_date'],'DateTime',context!);
        gpa_conversion = json['gpa_conversion'];
        credit_hour_conversion = json['credit_hour_conversion'];
        authorizing_uuid = json['authorizing_uuid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'institution_name': institution_name,
        'institution_other_names': institution_other_names,
        'institution_previous_names': institution_previous_names,
        'institution_type': institution_type,
        'accreditation_status': accreditation_status,
        'accreditation_status_notes': accreditation_status_notes,
        'accreditation_status_changed_date': JsonConverters.toJson(accreditation_status_changed_date,'DateTime',context!),
        'gpa_conversion': gpa_conversion,
        'credit_hour_conversion': credit_hour_conversion,
        'authorizing_uuid': authorizing_uuid
    };

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

TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
    'InstitutionResponse': TypeInfo(TypeOf.Class, create:() => InstitutionResponse()),
    'InstitutionCreateRequest': TypeInfo(TypeOf.Class, create:() => InstitutionCreateRequest()),
});

Dart InstitutionCreateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /Academic/Institution/Create HTTP/1.1 
Host: data.regent-college.edu 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"institution_name":"String","institution_other_names":"String","institution_previous_names":"String","institution_type":"String","accreditation_status":"String","accreditation_status_notes":"String","accreditation_status_changed_date":"0001-01-01T00:00:00.0000000","gpa_conversion":"String","credit_hour_conversion":"String","authorizing_uuid":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}},"institution_id":0,"institution_name":"String","institution_previous_names":"String","institution_other_names":"String","institution_type":"String","accreditation_status":"String","accreditation_status_notes":"String","related_institutions":["String"],"accreditation_status_changed_date":"0001-01-01T00:00:00.0000000","gpa_conversion":"String","credit_hour_conversion":"String","addr1":"String","addr2":"String","city":"String","state":"String","country":"String","zip":"String"}