|overview

Overview

FSI's patron synchronisation API provides customers with a simple and secure way to manage your users' profile information automatically within SmarteCloud.

Interrogate or update user information via simple HTTP calls providing you with full customisation to keep your patron information up to date in real time.

This documentation covers the technology, workflow, and endpoints required to build your API sync.

For any queries or issues, contact us at support@functionalsolutions.com.au.

Authentication flow

  1. Init Sessions / Get Code — pass your API key to receive a one-time code in the response.
  2. Get Session Token — exchange the code + API secret for a session token.
  3. Use the token — pass the token in all subsequent requests (Search, Get, Update, Renew).
  4. Renew Token — extend your session before it expires without re-authenticating.

Fees

$0.

Access to FSI's API is complimentary with any active subscription to:

  • SmartSuite-Library
  • TV4Education V2

If you are unsure whether your subscription includes API access, please contact support@functionalsolutions.com.au.

License Info

Use and licensing of the FSI API is covered under the FSI product terms of use and privacy policies respectively.

Whilst all attempts have been made to secure data at rest and in transit, FSI accepts no liability for breaches as a result of third-party apps where data was transferred or in transit as a result of unsecured connections.

All API keys and secrets are solely for the purpose of interrogating and maintaining user profiles for the SmartSuite-Library and TV4Education v2 platforms for the subscribing organisation that the key and secret was issued to.

Breach of these terms — including data extraction for purposes other than maintaining user profiles for SmartSuite-Library or TV4Education, or disbursing the key or secret to third parties — reserves the right of FSI to cancel the organisation's subscription without refund.

Authentication

Authentication to the FSI API can only be achieved by acquiring a unique API Key and API Secret from our Customer Service Centre.

This API key and secret is unique to your organisation and cannot be used by any other organisation.

When you are ready, please contact our Customer Service team to request your credentials:

support@functionalsolutions.com.au

FSI ID

All connections must be established using a unique API Key and API Secret which is generated and supplied by FSI directly for your organisation.

Please read through the License Info section prior to proceeding.

Once you are ready to proceed, contact our customer service team to request your key and secret:

support@functionalsolutions.com.au

Init Sessions & Get Code

The first step in the authentication flow. Submit your API Key to initiate a session and receive a one-time code in the response (data.d). Use that code in the next step to obtain a session token.

POST/services/SSLIB_SER_PATRON_API.asmx/patron

Parameters

ParameterTypeRequiredDescription
actionstringYesFixed value: "getcode".
apikeystringYesYour organisation's unique API Key, issued by FSI.

Live Tester

Request builder
const response = await fetch("https://{yourdomain}/services/SSLIB_SER_PATRON_API.asmx/patron", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "getcode",
  "apikey": ""
}),
});

const data = await response.json();
console.log(data.d); // returned value

Get Session Token

Exchange the one-time code from Init Sessions and your API Secret for a session token. Store the returned token and renewtoken — you'll need both for subsequent calls.

POST/services/SSLIB_SER_PATRON_API.asmx/patron

Parameters

ParameterTypeRequiredDescription
actionstringYesFixed value: "gettoken".
codestringYesOne-time code returned by the getcode action.
apisecretstringYesYour organisation's unique API Secret, issued by FSI.

Live Tester

Request builder
const response = await fetch("https://{yourdomain}/services/SSLIB_SER_PATRON_API.asmx/patron", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "gettoken",
  "code": "",
  "apisecret": ""
}),
});

const data = await response.json();
console.log(data.d); // returned value

Search Patron

Search for patron records using a keyword. Returns a paginated list of matching patrons. Useful for lookups before performing a targeted Get Patron by Key call.

POST/services/SSLIB_SER_PATRON_API.asmx/patron

Parameters

ParameterTypeRequiredDescription
actionstringYesFixed value: "searchpatron".
tokenstringYesActive session token from gettoken.
pagenumberintegerNoPage of results to return. Defaults to 1.
pagecountintegerNoResults per page. Defaults to 50.
keywordstringNoSearch keyword (name, barcode, username, etc.).

Live Tester

Request builder
const response = await fetch("https://{yourdomain}/services/SSLIB_SER_PATRON_API.asmx/patron", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "searchpatron",
  "token": "",
  "pagenumber": "1",
  "pagecount": "50",
  "keyword": ""
}),
});

const data = await response.json();
console.log(data.d); // returned value

Get Patron by Key

Retrieve the full details of a single patron record matched by a specific key field. Use this to verify a record before updating it.

POST/services/SSLIB_SER_PATRON_API.asmx/patron

Parameters

ParameterTypeRequiredDescription
actionstringYesFixed value: "getpatron".
tokenstringYesActive session token from gettoken.
keyfieldstringYesField to match on. One of: "barcode", "username", "externalid", "email", "fullname".
keyvaluestringYesThe value to look up for the chosen keyfield.

Live Tester

Request builder
const response = await fetch("https://{yourdomain}/services/SSLIB_SER_PATRON_API.asmx/patron", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "getpatron",
  "token": "",
  "keyfield": "barcode",
  "keyvalue": ""
}),
});

const data = await response.json();
console.log(data.d); // returned value

Update Patron

Create a new patron record or update an existing one. The record is matched using the specified keyfield. If no match is found and allownew is true, a new record will be created.

POST/services/SSLIB_SER_PATRON_API.asmx/patron

Parameters

ParameterTypeRequiredDescription
actionstringYesFixed value: "setpatron".
tokenstringYesActive session token from gettoken.
keyfieldstringYesField to match on. One of: "barcode", "username", "externalid", "email", "fullname".
allownewbooleanNoSet to true to allow creating a new record if no match is found.
itemindexintegerYesRecord index within the batch. Use 1 for single-record calls.
barcodestringNoPatron barcode.
usernamestringNoLogin username.
externalidstringNoExternal system ID (e.g. from a student management system).
firstnamestringNoPatron first name.
surnamestringNoPatron surname.
emailstringNoPatron email address.
classgradestringNoClass or year level (e.g. 7A, Year 10).
roomstringNoHomeroom or classroom identifier.
rolestringNoPatron role. One of: "STUDENT", "TEACHER", "PARENT", "LIBRARIAN".

Live Tester

Request builder
const response = await fetch("https://{yourdomain}/services/SSLIB_SER_PATRON_API.asmx/patron", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "setpatron",
  "token": "",
  "keyfield": "barcode",
  "allownew": false,
  "itemindex": 1,
  "role": "STUDENT"
}),
});

const data = await response.json();
console.log(data.d); // returned value

Renew Session Token

Extend your current session by exchanging your existing token and renewtoken value for a fresh session token. Use this to avoid repeated full re-authentication in long-running sync processes.

POST/services/SSLIB_SER_PATRON_API.asmx/patron

Parameters

ParameterTypeRequiredDescription
actionstringYesFixed value: "renewtoken".
tokenstringYesThe current active session token.
apisecretstringYesYour organisation's API Secret.
renewtokenstringYesThe renewtoken value returned when you last called gettoken or renewtoken.

Live Tester

Request builder
const response = await fetch("https://{yourdomain}/services/SSLIB_SER_PATRON_API.asmx/patron", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "action": "renewtoken",
  "token": "",
  "apisecret": "",
  "renewtoken": ""
}),
});

const data = await response.json();
console.log(data.d); // returned value