/
Create a Staff

Create a Staff

Using the LinkIt! REST API, you can create a new staff in your district.

Resource URI
/staffs
HTTPS POST
/staffs?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 staff.

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 staff.

ParameterRequiredData TypeDescription
RoleYesSTRING (100)

the role of the staff, TEACHER, SCHOOL ADMIN or DISTRICT ADMIN.

SchoolIDNoINTEGERthe ID of the school associated with the staff. If a school ID is provided when creating a staff, the staff will be associated with that school immediately. Alternatively, you could assign a staff to a school after the staff is created, or even assign multiple schools to a staff.
UserNameYesSTRING (50)

the username used by the staff to log into LinkIt!. EXAMPLES: JSMITH

FirstNameNoSTRING (50)the first name of the staff. EXAMPLES: JOHN If a first name is not provided, it will default to blank.
LastNameNoSTRING (50)the last name of the staff. EXAMPLES: SMITH If a last name is not provided, it will default to the username.
EmailAddressNoSTRING (100)the email address of the staff.
PhoneNumberNoSTRING (50)the phone number of the staff.
LocalCodeYesSTRING (50)the local code used by the district or the Student Information System to identify each staff. EXAMPLES: 060, ES001
StateCodeNoSTRING (100)the code used by the state to identify each staff. May or may not be the same as the local code. EXAMPLE: NY123456, 00112233
  • While first name and last name are not strictly required for creating a staff via API, we recommend that they be included. They are displayed in various parts of the LinkIt! portal and appear on bubble sheets and online tests.
  • We also recommend that an email address be provided when creating a staff. In the case of lost password, a temporary password can be sent to the email address provided.
  • When a staff is created via API, their default password is set to be the same as the local code provided. If a district-wide password is provided to LinkIt! beforehand, that password will be used instead. In both cases, users will be prompted to change their password upon first log-in.

Note about Username and Local Code

Given that LinkIt! requires username and local code to be uniquely paired within each district, you cannot create a staff with an existing username or local code.

Response

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

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

SUCCESS

ERROR

DataJSON/XML

returns properties of the created staff if result is SUCCESS.

 

 Returned data includes
  • UserID
  • Role
  • UserName
  • FirstName
  • LastName
  • PhoneNumber
  • LocalCode
  • StateCode
  • Status
  • Schools
    • SchoolID
    • SchoolName
  • EmailAddress
  • 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 staff . Furthermore, following a successful call to create a staff , CreatedDate will be automatically recorded for the staff and the status of the staff will be set to active. (Click here to learn how to deactivate a staff.) ModifiedDate will be set to be the same as CreatedDate until further edits are made to the staff .

 

Check out the Staff page to learn more about the various properties that define a staff.

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 staff with the following information:

Role: Teacher, UserName: JohnSmith, LocalCode: JS12345

 


 

 JSON
Method

POST

Request URL
/staffs?timestamp=6%2f1%2f2013+3%3a43%3a42+PM&accesskey=123456789-987654321&tag=4581a8d4dbb4a85c25c096532bb1bcc7ca92d4bf
Request Header
{ "UserName": "JohnSmith", "LocalCode": "JS12345", "Role": "Teacher", }
Response Content
{"Result":"SUCCESS", "Data":{"User":{"UserID":324024, "Role":"teacher", "UserName":"JohnSmith", "FirstName":"", "LastName":"JohnSmith", "PhoneNumber":null, "LocalCode":"JS12345", "StateCode":null, "Status":"Active", "Schools":null, "EmailAddress":null, "ModifiedDate":"6/1/2013 3:43:59 PM", "CreatedDate":"6/1/2013 3:43:59 PM"}}, "Error":null}
 XML
Method

POST

Request URL
/staffs?timestamp=6%2f1%2f2013+3%3a43%3a42+PM&accesskey=123456789-987654321&tag=4581a8d4dbb4a85c25c096532bb1bcc7ca92d4bf
Request Header
<UserElement xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserName>JohnSmith</UserName> <LocalCode>JS12345</LocalCode> <Role>Teacher</Role> </UserElement>
Response Content
<Response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Result>SUCCESS</Result><Data><User><UserID>324024</UserID><Role>teacher</Role><UserName>JohnSmith</UserName><FirstName /><LastName>JohnSmith</LastName><PhoneNumber /><LocalCode>JS12345</LocalCode><StateCode /><Status>Active</Status><EmailAddress /><ModifiedDate>6/1/2013 3:43:59 PM</ModifiedDate><CreatedDate>6/1/2013 3:43:59 PM</CreatedDate></User></Data></Response>

Navigation and Reference