Applications API - Developer Guide v1.10
Applications API - Developer Guide v1.10
Technical Documentation
Document version: v1.10
Contents
Overview 3
API Authentication 4
API Versioning 4
Listing Applications 5
Retrieving an Application 6
Listing Programs 24
Listing Rounds 25
Page 2 of 25
Overview
SmartyGrants offers an Applications API for customers who want to integrate SmartyGrants with other business
applications. It provides functionality for software developers to retrieve and update SmartyGrants applications through
a HTTP/REST based JSON API.
1. Retrieve summary details of a SmartyGrants Grant Application, including details of the Program, Round and
Decision.
2. Retrieve and update all Standard Field values associated with an Application, including both default and custom
Standard Fields.
3. Retrieve Form Responses for an Application – including answers to all questions.
Note that there is currently no functionality to list Applications. The Applications API is intended to be used in
conjunction with the ContactSync API, which provides functionality to list Applications relating to particular Contacts.
SmartyGrants’ data model groups Grant Applications into Programs and Rounds. Forms, such as those that an
applicant will complete when applying for a grant, belong to a Program and can be re-used in multiple Rounds. Each
time a Form is completed, a Form Response is created. The below entity-relationship diagram describes the logical
data model around Applications, and is a useful reference for understanding the Applications API.
Page 3 of 25
API Authentication
An API client will need to provide two HTTP headers as part of each API call in order to be successfully authenticated
and authorised:
1. x-api-key
This header will contain a 40-character string that is provided to you by the SmartyGrants Service team and
identifies your organisation’s account.
Eg: x-api-key: LhGU6jr5C19QrT8yexCNoaBYeYHy9iwa5ugZlRzm
2. Authorization
A Basic HTTP Authentication header that contains the username and password of a valid SmartyGrants
‘manage’ user with access to your organisation’s account. The user must be authorised to perform the action
you are attempting to perform via the API. If the user is a ‘program-specific’ user, they must have access to the
grant program to which the entities you are accessing belong, otherwise our API will return a HTTP 403 error
response.
This header is prefixed by the string "Basic " followed by "<username>:<password>" Base64 encoded.
Eg: Authorization: Basic bXlhcGl1c2VyQGdyYW50bWFrZXIub3JnOmEtJHRyb25nLVBhc3N3MHJkIQ==
If you do not already have an API Key, you may request one via [email protected]. We strongly
recommend creating a dedicated API user in your account, so that SmartyGrant’s audit history will clearly show where
changes were made by your system via the API, as opposed to an individual user.
Exceeding these limits will result in a HTTP 429 response with the following response body:
{"message": "Too many requests"}
If you receive such a response from the API, the operation has not succeeded and the request should be retried after a
short delay.
API Versioning
SmartyGrants reserves the right to add new data elements and change the order of response fields at any time. New
API versions will be released only if data elements are removed or renamed. SmartyGrants will support previous API
versions for a minimum of 12 months from the release of a new upgraded or equivalent API.
Page 4 of 25
Listing Applications
GET /applications
This operation retrieves a list of Grant Applications based on the criteria specified.
Request
Method Path
GET /applications
Response
HTTP Status Meaning Body Content
200 OK Information on the specified applications has been A JSON object whose fields are described
returned successfully. below.
Request Parameters
programId The unique identifier of a Program. Limit returned results to applications within this
Program.
roundId The unique identifier of a Round. Limit returned results to applications within this Round.
submittedFrom The inclusive start submit date-time from which applications should be returned.
Specified in ISO8601 compact-format: YYYYMMDDThhmmssZ
or YYYYMMDDThhmmss±hhmm
Eg: 20150412T101530Z or 20150412T101530+0400
submittedTo The inclusive end submit date-time up to which applications should be returned.
Specified in ISO8601 compact-format:
YYYYMMDDThhmmssZ or YYYYMMDDThhmmss±hhmm
programId The unique identifier of a Program. Limit returned results to applications within this
Program.
roundId The unique identifier of a Round. Limit returned results fo applications within this Round.
filterName A string that matches the name of a saved application filter, previously created in
SmartyGrants through the 'manage' web interface, by the same user calling the API.
offset As this endpoint returns up to 100 applications, this parameter can be used to retrieve
the any payments that come after the next 100.
Response Fields
paging.next The endpoint from which the next 'page' of up to 100 applications can be retrieved. The
filter parameters on this URL will match those provided in the current request.
The "offset" parameter on this URL will mirror the "nextOffset" value returned in this
response. This field is only returned where the pageCount is greater than 1.
paging.nextOffset The "offset" input parameter that can be used to retrieve the next 'page' of up to 100
applications.
Page 5 of 25
This is identical to the "offset" parameter in the URL above. This field is only returned
where the pageCount is greater than 1.
paging.pageCount The number of pages (of up to 100 applications) that match the specified 'from' and 'to'
date.
Example Request
GET /v0.1/applications
Example Response
HTTP/1.1 200 OK
{
"paging": {
"next":
"https://api.smartygrants.com.au/v0.1/applications?programId=No7AD953vzpvO4pHvozKOoLojFWl&filterName=Eligible
&offset=100",
"nextOffset": 100,
"pageCount": 1
},
"results": [{
"id": "953vzpvO4pHvozKOoLojFWlNo7AD"
}, {
"id": "Y4Xdz4G6mxS5dB9QXMERc7OwOnx"
}]
}
Retrieving an Application
GET /applications/{id}
This resource retrieves an application, along with summary details of its decisions, round, program and responses.
Request
Method Path
GET /applications/{id}
Response
HTTP Status Meaning Body Content
200 OK Information on the specified application has been A JSON object whose fields are described
returned successfully. below.
404 Not Found The specified application does not exist. A JSON object with the properties status and
error - describing the error.
Page 6 of 25
403 Forbidden The current user does not have the required A JSON object with the properties status and
access the specified application error - describing the error.
Request Parameters
id The unique identifier of the application to retrieve. This parameter is supplied in the URI.
Response Fields
id The unique identifier of the application.
publicId The grant application's application number, which is displayed to the applicant.
submitted The date/time the grant application was first submitted, in YYYY-MM-
DDThh:mm:ssZ format.
applicantName The name of the applicant as specified in the application form, otherwise the name of
the applicant user that submitted this application.
applicantContactId The id of the applicant as specified in the application form. This can be used to
retrieve the applicant details via a call to /contacts/{id} (See ContactSync API
Developer Guide).
Where no applicant contact exists for an application (for example, because no
Applicant question was asked on any Application Form), this property is omitted.
status The status of the grant application, one of PENDING, ACTIVE or CLOSED.
totalFundingAllocated The total amount of all Funding Allocations created against this Application.
totalPaymentsPaid The total amount of Payments belonging to this Application with a Payment status is
PAID.
totalPaymentsToBePaid The total amount of all Payments belonging to this Application where the Payment
status is one of SCHEDULED or APPROVED.
stage.name The name of the stage to which the Application currently belongs.
decision.date The date of the decision for this grant application, if one has been recorded.
decision.defaultPayeeName The name of the default payee recorded against this decision.
Where no decision has previously been recorded, or no applicant contacts exists for
an application (for example, because no Applicant question was asked on any
Application Form), this property is omitted.
decision.defaultPayeeContactid The id of the default payee recorded against this decision. This can be used to
retrieve the contact details via a call to /contacts/{id}.
Where no decision has previously been recorded, or no applicant contacts exists for
an application (for example, because no Applicant question was asked on any
Application Form), this property is omitted.
decision.internalComments A free-text field for recording internal comments about the decision.
Page 7 of 25
decision.externalComments A free-text field for recording external comments about the decision.
round.id The unique identifier of the round within which this application was submitted.
round.name The name of the round within which this application was submitted.
round.program.id The unique identifier of the program within which this application was submitted.
round.program.name The name of the program within which this application was submitted.
round.program.status The status of the program within which this application was submitted, one of
PENDING, ACTIVE or CLOSED.
responses.id The unique identifier of a form response, saved or submitted against this grant
application.
This can be used to retrieve the response from the /responses/{id} endpoint (see
below).
Responses for external forms (APPLICATION and ACQUITTAL) will only be visible
once they have been submitted.
responses.formName The name of the form which was filled out for this response.
responses.formType The type of form which was filled out for this response, one of APPLICATION,
ASSESSMENT, ADMINISTRATION or ACQUITTAL.
responses.modified The date/time the response was last modified, in YYYY-MM-DDThh:mm:ssZ format.
responses.currentVersion Where a form has been re-opened and a new response created that supersedes this
one, this property will provide the unique id of the most current response.
Example Request
GET /v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9
Example Response
HTTP/1.1 200 OK
{
"id": "953vzpvO4pHvozKOoLojFWlNo7AD",
"publicId": "00005",
"projectTitle": "Operation Sustainability",
"submitted": "2015-10-15T15:15:00Z",
"applicantName": "Mr Frank Garcia",
"applicantContactId": "4o7ADpHvozKO953vzpvOoLojFWlN",
"status": "ACTIVE",
"totalFundingAllocated": "2000.00",
"totalPaymentsPaid": "1500.00",
"totalPaymentsToBePaid": "500.00",
Page 8 of 25
Example Request
"stage": {
"name": "Paid Stage"
},
"decision": {
"date": "2017-09-26",
"outcome": "APPROVED"
"defaultPayeeName": "Mr Frank Garcia",
"defaultPayeeContactid": "4o7ADpHvozKO953vzpvOoLojFWlN",
"internalComments": "Recommended by the board.",
"externalComments": "A quality proposal.",
"fundingConditions": ""
},
"round": {
"id": "4pHv7AD953vzpvOozKOoLojFWlNo",
"name": "Round 1",
"program": {
"id": "OoLojFWlNo4pHv7AD953vzpvOozK",
"name": "Grants Program",
"status": "ACTIVE"
}
},
"responses": [{
"id": "953vzpvO4pHvozKOoLojFWlNo7AD",
"formName": "2018 Application Form",
"formType": "APPLICATION",
"modified": "2017-10-15T15:15:00Z",
"submitted": "2017-10-15T15:15:00Z",
"currentVersion": "Y4Xdz4G6mxS5dB9QXMERc7OwOnx"
}, {
"id": "Y4Xdz4G6mxS5dB9QXMERc7OwOnx",
"formName": "2018 Assessment Form",
"formType": "ASSESSMENT",
"modified": "2017-10-15T16:15:00Z"
}],
"payments": [{
"id": "vozKOo95LojFWlNo7AD3vzpvO4pH",
}, {
"id": "xS5dB9QXMERc7OG6mOnxwY4Xdz4",
}]
}
Page 9 of 25
Request
Method Path
GET /applications/{id}/contacts
Response
HTTP Status Meaning Body Content
200 OK Information on the specified application has been A JSON object whose fields are described
returned successfully. below.
404 Not Found The specified application does not exist. A JSON object with the properties status and
error - describing the error.
403 Forbidden The current user does not have the required A JSON object with the properties status and
access the specified application. error - describing the error.
Request Parameters
id The unique identifier of the application for which the contacts are required. This parameter is supplied in
the URI.
Response Fields
paging.next The endpoint from which the next 'page' of up to 100 contacts can be retrieved. The
filter parameters on this URL will match those provided in the current request.
The "offset" parameter on this URL will mirror the "nextOffset" value returned in this
response. This field is only returned where the pageCount is greater than 1.
paging.nextOffset The "offset" input parameter that can be used to retrieve the next 'page' of up to 100
contacts.
This is identical to the "offset" parameter in the URL above. This field is only returned
where the pageCount is greater than 1.
paging.pageCount The number of pages (of up to 100 contacts) that match the specified application.
results.relationships The relationship of the contact to the specified grant application. (eg: "Applicant", or
"Auspice")
Example Request
GET /v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/contacts
Example Response
Page 10 of 25
Example Response
HTTP/1.1 200 OK
{
"paging": {
"next":
"https://api.smartygrants.com.au/v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/contacts?offset=100",
"nextOffset": 100,
"pageCount": 1
},
"results": [
{
"contactId": "4o7ADpHvozKO953vzpvOoLojFWlN",
"contactName": "Mr Frank Garcia",
"relationships": ["Applicant"]
},{
"contactId": "Y4Xdz4G6mxS5dB9QXMERc7OwOnx",
"contactName": "ExampleOrg Pty Ltd",
"relationships": ["Auspice"]
}
]
}
Request
Method Path
GET /applications/{id}/standardfields
Response
HTTP Status Meaning Body Content
200 OK Information on the specified application has been A JSON object whose fields are described
returned successfully. below.
404 Not Found The specified application does not exist. A JSON object with the properties status and
error - describing the error.
403 Forbidden The current user does not have the required A JSON object with the properties status and
access the specified application. error - describing the error.
Request Parameters
id The unique identifier of the application to retrieve. This parameter is supplied in the URI.
Page 11 of 25
Response Fields
label The label of a Standard Field associated with this grant application.
type The type of value for this Standard Field, one of TEXT, NUMBER, CHOICES, FILE or LOOKUP.
value The value of the Standard Field specified in label, for this grant application.
Where the question can have multiple values, such as a Standard Field of type CHOICES or FILES,
these will be returned in an array.
valueKey Where the Standard Field value has an associated key or other identifier, these will be provided in this
property. In other cases, this property is not returned.
Where the valueKey and value are an array, both arrays will have the same number of elements, and the
elements will be in the same order such that valueKey[0] and value[0] correlate, as do valueKey [1] and
value[1], etc.
Currently this applies only to the CLASSIE Standard Fields. The full list of these are available at
https://www.ourcommunity.com.au/CLASSIE, and the key returned by this API will match the Immutable
Id listed for each CLASSIE category.
Example Request
GET /v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/standardfields
Example Response
HTTP/1.1 200 OK
[
{
"label": "Project Title",
"type": "TEXT",
"value": "Operation Sustainability"
},
{
"label": "Project Description",
"type": "TEXT",
"value": "An Example Project for the API Documentation"
},
{
"label": "Infrastructure Type",
"type": "CHOICES",
"value": ["Park", "Playground", "Community Centre"]
},
{
"label": "Project Beneficiaries - Anticipated",
"type": "CHOICES",
"key": ["POP00004",
"POP00005"],
"valueKey": ["Age groups > Children and youth (age 0-17) > Infants and toddlers (people aged 0-2)",
"Age groups > Children and youth (age 0-17) > Children (people aged 3-9)"]
}
]
Page 12 of 25
Page 13 of 25
Updating Standard Fields for an Application
POST /applications/{id}/standardfields
Updates provided Standard Fields for an application.
Request
Method Path Body
Response
HTTP Status Meaning Body Content HTTP Headers
303 See Other The Standard Fields for this (none) A Location header with the
application have been URL for accessing the
successfully updated. application’s Standard Fields.
See Operation:
GET /applications/{id}
/standardfields
404 Not Found The specified application does A JSON object with the A JSON object with the
not exist. properties status and error - properties status and error -
describing the error. describing the error.
403 Forbidden The current user does not have A JSON object with the (none)
the required access the specified properties status and error -
application describing the error.
Request Parameters
id The unique identifier of the application to retrieve. This parameter is supplied in the URI.
label The label of each Standard Field that is to be updated for the grant application with the specified id.
valueKey Key(s) for the value of the Standard Field specified in label.
Where the values for this Standard Field have an associated key or other identifier, it is
this valueKey that should be supplied. Any value provided will be ignored.
Currently this applies only to the CLASSIE Standard Fields of using the Beneficiaries and Subject choice
lists. The full list of these are available at https://www.ourcommunity.com.au/CLASSIE, and the key
provided must match the Immutable Id listed for each CLASSIE category. As these are CHOICE fields,
the valueKey should be provided as an array.
Example Request
POST /v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/standardfields
Host: api.smartygrants.com.au
Content-Type: application/json
Page 14 of 25
Example Request
[
{
"label": "Project Title",
"value": "Operation Sustainability"
},
{
"label": "Infrastructure Type",
"value": ["Playground", "Community Centre"]
},
{
"label": "Project Beneficiaries - Anticipated",
"valueKey": ["POP00004", "POP00006"]
}
]
Example Response
HTTP/1.1 303 OK
Location: https://api.smartgrants.com.au/v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/standardfields
...
Request
Method Path Body
Response
HTTP Status Meaning Body Content HTTP Headers
303 See Other The decision for this application (none) A Location header with the
has been successfully updated. URL for accessing the
application.
See Operation:
GET /applications/{id}
404 Not Found The specified application does A JSON object with the (none)
not exist within this properties status and error -
SmartyGrants account. describing the error.
403 Forbidden The current user does not have A JSON object with the (none)
permission to update the properties status and error -
specified application. describing the error.
Page 15 of 25
Request Parameters
id The unique identifier of the application to update. This parameter is supplied in the URI.
internalComments A free-text field for recording internal comments about the decision.
externalComments A free-text field for recording external comments about the decision.
Example Request
POST /v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/decision
Content-Type: application/json
…
{
"date": "2017-09-26",
"outcome": "APPROVED",
"defaultPayeeContactId": "4o7ADpHvozKO953vzpvOoLojFWlN",
"internalComments": "Recommended by the board.",
"externalComments": "A quality proposal.",
"fundingConditions": ""
}
Example Response
HTTP/1.1 303 OK
Location: https://api.smartgrants.com.au/v0.1/applications/Eqx5gp4Qwnt7DoNDNEaXU3E004Q9/decision
...
Page 16 of 25
Retrieving Form Responses for an Application
GET /responses/{id}
This operation requests the full content of a form response belonging to a single application.
SmartyGrants forms consist of Pages, which contain Sections, which in turn contain Questions. The responses
returned by this API provide the answers to all questions, grouped by Section and Page.
Sections and Pages that are hidden or disabled via a Form's Conditional Logic will not be returned by the API.
Responses for external forms (APPLICATION and ACQUITTAL) will only be visible once they have been submitted.
Request
Method Path
GET /responses/{id}
Response
HTTP Status Meaning Body Content
200 OK The specified application and response was found A JSON object whose fields are described
and is being returned successfully. below.
404 Not Found The specified response does not exist within this (none)
SmartyGrants account.
Where the response is for an External Form and
has not yet been Submitted, a 404 will also be
returned.
403 Forbidden The current user does not have the required A JSON object with the properties status and
access the specified application error - describing the error.
Request Parameters
applicationId The unique identifier of the application to retrieve. This parameter is supplied in the URI.
responseId The unique identifier of the response to retrieve. This parameter is supplied in the URI.
Response Fields
formName The name of the form related to this response.
Page 17 of 25
pages.label The page label, as defined via the Form Editor UI.
pages.heading The page heading, as defined via the Form Editor UI.
pages.sections.label The section label, as defined via the Form Editor UI.
pages.sections.heading The section heading, as defined via the Form Editor UI.
pages.sections.responseFields.questionLabel The label of the question for this field, as defined via the Form Editor
UI.
pages.sections.responseFields.type The type of value for this field, one of TEXT, NUMBER, CHOICES,
FILE, LOOKUP or MULTIPART.
pages.sections.responseFields.value The value of this field (ie, the answer to the question).
pages.sections.responseFields.valueKey Where the field value has an associated key or other identifier,
these will be provided in this property. In other cases, this property
is not returned.
Where the valueKey and value are an array, both arrays will have
the same number of elements, and the elements will be in the same
order such that valueKey[0] and value[0] correlate, as do
valueKey[1] and value[1], etc.
Currently this applies only to the CLASSIE Standard Fields. The full
list of these are available at
https://www.ourcommunity.com.au/CLASSIE, and the key returned
by this API will match the Immutable Id listed for each CLASSIE
category.
Page 18 of 25
• state - The state of the entity's main business physical
address.
• status - Signifies whether the ABR data is
available/populated for this ABN. Possible values are
POPULATED and NOT_POPULATED.
• taxConcessions - A comma-separated list of any charity
tax concessions. May contain the strings "FBT
Exemption", "FBT Rebate", "GST Concession", "Income
Tax Exemption" - or "No tax concessions" if there are
none.
• fbte - A boolean value indicating whether the entity has a
Charity Tax Concession of type "FBT Exemption".
• fbtr - A boolean value indicating whether the entity has a
Charity Tax Concession of type "FBT Rebate".
• gst - A boolean value indicating whether the entity has a
GST registration that is active at the retrieved date.
• gstc - A boolean value indicating whether the entity has a
Charity Tax Concession of type "GST Concession".
• itec - A boolean value indicating whether the entity has a
Charity Tax Concession of type "Income Tax Exemption".
• registerLastUpdated - Date the register was last
updated, at the retrieved date.
• retrieved - Date/time this data was retrieved from ABR.
pages.sections.responseFields.values.type The type of value for this fieldKey, one of TEXT, NUMBER,
CHOICES, FILE, or LOOKUP.
pages.sections.responseFields.attachments.file The file size of an attachment for this question. Returned only
Size where responseFields.type is FILES.
pages.sections.rows.responseFields.questionL The label of this question, as defined via the Form Editor UI.
abel
pages.sections.rows.responseFields.type The type of value for this field, one of TEXT, NUMBER, CHOICES,
FILE, LOOKUP or MULTIPART.
pages.sections.rows.responseFields.value The value of this field (ie, the answer to the question) for the current
Page 19 of 25
row.
Note: the example response below has been annotated with grey comments that aren’t returned by the API.
Example Request
GET /v0.1/responses/oNEqx5gaXU3p4QwnDNEE004Q9t7D
Example Response
HTTP/1.1 200 OK
{
"formName": "2018 Application Form",
"formType": "APPLICATION",
"status": "SUBMITTED",
"modified": "2015-10-15T15:15:00Z",
"submitted": "2015-10-15T15:15:00Z",
"due": "2015-10-16T17:00:00Z",
"pages": [
{
"label": "Page 1",
"heading": "Page 1",
"sections": [
{
"label": "Project Overview",
"heading": "Project Overview",
"responseFields": [
Page 20 of 25
Example Request
"valueKey": ["POP00004",
"POP00005"],
"value": ["Age groups > Children and youth (age 0-17) > Infants and toddlers (people aged 0-2)",
"Age groups > Children and youth (age 0-17) > Children (people aged 3-9)"]
},
Page 22 of 25
Example Request
"registerLastUpdated": "2019-03-20",
"retrieved": "2019-03-20T10:19:38+1100"
}
}
]
},
Page 23 of 25
Listing Programs
/programs
This operation returns a list of all programs in an organisation’s account – so the id can be used as the programId when
requesting an export where this is required.
Request parameters
None.
Response fields
results.id The unqiue identifier of the Grant Program.
Example Request
GET https://api.smartygrants.com.au/v0.1/programs
Example Response
HTTP/1.1 200 OK
…
{
results: [{
"id": "953vzpvO4pHvozKOoLojFWlNo7AD", "name": "Community Grants Program"
}, {
"id": "Y4Xdz4G6mxS5dB9QXMERc7OwOnx", "name": "Volunteer Equipment Grants"
}]
}
Page 24 of 25
Listing Rounds
/programs/{programId}/rounds
This operation returns a list of all rounds within the selected program.
Request parameters
None.
Response fields
results.id The unqiue identifier of the Grant Round.
Example Request
GET https://api.smartygrants.com.au/v0.1/programs/WlNo7AD953vzpvO4pHvozKOoLojF/rounds
Example Response
HTTP/1.1 200 OK
…
{
results: [{
"id": "953vzpvO4pHvozKOoLojFWlNo7AD", "name": "Community Grants 2019 Round"
}, {
"id": "Y4Xdz4G6mxS5dB9QXMERc7OwOnx", "name": "Equipment Grants 2019 Round"
}]
}
Page 25 of 25