/
Create a District Term

Create a District Term

Using the LinkIt! REST API, you can create a new district term.

Resource URI
/districtterms
HTTPS POST
/districtterms?timestamp={TimeStamp}&accesskey={AccessKey}&tag={Token}
Parameters for Request URL

The following parameters should be included in the request URL of the HTTPS POST call to create a district term.

Parameter
Required?
Data Type
Description
TimeStampYesDATETIMEthe GMT time at which the call is generated. EXAMPLE: 5/1/2013+5:10:5+PM
AccessKeyYesSTRING (128)a unique key associated with the API user. EXAMPLE: 123456789-987654321
TagYesSTRING (128)token generated for authorization and authentication.
Parameters for Request Header

The following parameters may be included in the request header of the HTTPS POST call to create a district term.

ParameterRequiredData TypeDescription
NameYesSTRING (100)the name of the district term. EXAMPLE: 2012-13 FY
DateStartYesDATETIMEthe start date of the district term. EXAMPLES: 9/12/2012, 9/1/2012+12:00:00 AM
DateEndYesDATETIMEthe end date of the district term. EXAMPLES: 9/12/2012, 9/1/2012+12:00:00 AM
CodeNoSTRING (50)the code used by some Student Information System to identify district terms. Reserved for future use.

(grey lightbulb) Make sure the DateEnd is after the DateStart.

Response

The following fields are included in the response following an HTTPS POST call to create a district term.

Field NameData TypeDescriptionExample
ResultSTRING (10)indicates whether the district term is created successfully.

SUCCESS

ERROR

DataJSON/XML

returns properties of the created district term if result is SUCCESS.

 

 Returned data includes
  • DistrictTermID
  • Name
  • DateStart
  • DateEnd
  • Code
  • CreatedDate
  • ModifiedDate

Note

All the fields will be included in the response, regardless of which fields are used in the request header to create the district term. Furthermore, following a successful call to create a district term, CreatedDate will be automatically recorded for the district term. ModifiedDate will be set to be the same as CreatedDate until further edits are made to the district term.


Check out the District Term page to learn more about the various properties that define a district term.

See below for detailed examples.
ErrorSTRING (100)

provides explanation if result is ERROR."Null" is returned if result is SUCCESS.

Click here for a list of error messages.

 

 

Example

Create a new district term called "2013-14 Full Year" with the start date of "9/1/2013" and end date of "9/1/2014".


 

 JSON
Method

POST

Request URL
/districtterms?timestamp=5%2f1%2f2013+6%3a21%3a34+PM&accesskey=123456789-987654321&tag=103cc7052a29da5f446f1c7d1ee2daf27f311e19
Request Header
{
 "Name": "2013-14 Full Year",
  "DateStart": "9/1/2013",
  "DateEnd": "9/1/2014",
}
Response Content
{"Result":"SUCCESS", "Data":{"DistrictTerm":{"DistrictTermID":28500, "Name":"2013-14 Full Year", "DateStart":"9/1/2013 12:00:00 AM", "DateEnd":"9/1/2014 12:00:00 AM", "Code":"", "CreatedDate":"5/1/2013 6:21:34 PM", "ModifiedDate":"5/1/2013 6:21:34 PM"}}, "Error":null}

 

 

 XML
Method

POST

Request URL
/districtterms?timestamp=5%2f1%2f2013+6%3a21%3a34+PM&accesskey=123456789-987654321&tag=103cc7052a29da5f446f1c7d1ee2daf27f311e19
Body Content
<DistrictTermElement xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Name>2013-14 Full Year</Name>
 <DateStart>9/1/2013</DateStart>
 <DateEnd>9/1/2014</DateEnd>
 </DistrictTermElement>
Response Content
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Result>SUCCESS</Result><Data><DistrictTerm><DistrictTermID>28500</DistrictTermID><Name>2013-14 Full Year</Name><DateStart>9/1/2013 12:00:00 AM</DateStart><DateEnd>9/1/2014 12:00:00 AM</DateEnd><Code /><CreatedDate>5/1/2013 6:21:34 PM</CreatedDate><ModifiedDate>5/1/2013 6:21:34 PM</ModifiedDate></DistrictTerm></Data></Response>

Navigation and Reference