0% found this document useful (0 votes)
12 views

Applications API - Developer Guide v1.10

Uploaded by

Vivek Handa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Applications API - Developer Guide v1.10

Uploaded by

Vivek Handa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Applications API

Technical Documentation
Document version: v1.10
Contents

Overview 3

Applications Data Model 3

API Authentication 4

API Request Limits 4

API Versioning 4

Listing Applications 5

Retrieving an Application 6

Retrieving Contacts for an Application 9

Retrieving Standard Fields for an Application 11

Updating Standard Fields for an Application 14

Updating Decision for an Application 15

Retrieving Form Responses for an Application 17

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.

The SmartyGrants Applications API provides the following functionality:

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.

Applications Data Model

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.

API Request Limits


Calls to the SmartyGrants API are limited per IP address, in order to ensure no one customer places undue load on the
platform. Limits can vary by endpoint - see the table below:

Endpoint Request limits

https://api.smartygrants.com.au/v0.1/payments/{id} 40 requests per minute

https://api.smartygrants.com.au/v0.1/* 24 requests per minute

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.

Applications returned will be restricted to those matching this filter.


Example: "Apps1213".

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.

(See also the output parameter paging.nextOffset)

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.

results.id The id of an application matching the specified filter.

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.

projectTitle The project title of the grant application, if supplied.

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.outcome The decision outcome, either UNDECIDED, WITHDRAWN, APPROVED or


REJECTED.

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.

decision.fundingConditions A free-text field for recording details of funding conditions.

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.submitted The date/time the response was submitted, 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.

payments.id The ID of a payment associated with this Application.

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",
}]
}

Retrieving Contacts for an Application


GET /applications/{id}/contacts
Retrieves a list of contacts associated with a single application.

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.contactId The unique identifier of the contact.

results.contactName The name of the organisation or individual.

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"]
}

]
}

Retrieving Standard Fields for an Application


GET /applications/{id}/standardfields
Retrieves all Standard Fields for an application.

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

POST /applications/{id}/standard fields A JSON object whose fields are described


below.

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.

value The value of the Standard Field specified in label.


Where the Standard Field allows multiple values, such as a CHOICE field, the value should be provided
as an array.

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

Updating Decision for an Application


POST /applications/{id}/decision
This operation updates details of the decision recorded against a single application.

Request
Method Path Body

POST /applications/{id}/decision A JSON object whose fields are described


below.

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.

date The date of the decision for this grant application.

outcome The decision outcome, either UNDECIDED, WITHDRAWN, APPROVED or REJECTED.


This field is mandatory.

defaultPayeeContactId The id of the default payee.

internalComments A free-text field for recording internal comments about the decision.

externalComments A free-text field for recording external comments about the decision.

fundingConditions A free-text field for recording details of funding conditions.

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.

formType The type of form related to this response, one of APPLICATION,


ASSESSMENT, ADMINISTRATION or ACQUITTAL.

status The status of this response, one of:


• PENDING - The response is in progress
• SUBMITTED - The response has been submitted

modified The date/time the response was last modified, in YYYY-MM-


DDThh:mm:ssZ format.

submitted The date/time the response was submitted, in YYYY-MM-


DDThh:mm:ssZ format.

due The date/time the response is/was due, in YYYY-MM-


DDThh:mm:ssZ format.

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.

pages.sections.responseFields.abrData Where the responseField.type is ABN, additional data retrieved


from the Australian Business Register (ABR) will be included in
this property. The below values reflect the data supplied by ABR
at the "retrieved" date/time.

• abn - The ABN of the entity.


• acncRegistration - Contains the string "Registered" if the
entity has an Australian Charities and Not-for-profits
Commission (ACNC) registration at the "retrieved" date.
• acncRegisteredCharity - A boolean value indicating
whether the entity is an ACNC registered charity at the
retrieved date.
• active - A boolean value indicating the status of the ABN
at the retrieved date. i.e. true = active, false = cancelled
• charityType - Where the entity is a charity, a description
of the type of charity the entity is.
• dgr - A boolean value indicating whether the entity has a
deductible gift recipient (DGR) endorsement that is active
at the retrieved date.
• dgrItemNumnber - The DGR Item Numbers - eg "Item 1"
or "Item 1 & 4".
• entityTypeCode - The code of the entity's type.
See https://abr.business.gov.au/Documentation/Referenc
eData for a complete list.
• entityTypeDescription - A description of the entity's type.
• name - The name of the entity.
• postcode - The postcode of the entity's main business
physical address.

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.fieldKey For responseFields of type MULTIPART, there is more than one


value. Each value has a distinct fieldKey.
An example of this is the Applicant question, which returns
separate fields for the Applicant Type (ie Individual or
Organisation), Organisation Name, Title, First Name and
Surname.

pages.sections.responseFields.values.type The type of value for this fieldKey, one of TEXT, NUMBER,
CHOICES, FILE, or LOOKUP.

pages.sections.responseFields.values.value The value for this fieldKey.

pages.sections.responseFields.attachments.na The filename of an attachment for this question. Returned only


me where responseFields.type is FILES.

pages.sections.responseFields.attachments.file The file size of an attachment for this question. Returned only
Size where responseFields.type is FILES.

pages.sections.repeating Contains a value of 'true' where the Form Section is either a


Repeating Section or a Grid.

pages.sections.rows Used where sections.repeating is true.


Repeating Sections or Grids may contain multiple rows, each with
its own value for each field (or column) in the Section/Grid.

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": [

//Example of simple text fields


{
"questionLabel": "Project Title",
"type": "TEXT",
"value": "Operation Sustainability"
},
{
"questionLabel": "Project Description",
"type": "TEXT",
"value": "An Example Project for the API Documentation"
},

//Example of a simple choice field


{
"questionLabel": "Infrastructure Type",
"type": "CHOICES",
"value": ["Playground", "Community Centre"]
},

//Example of a CLASSIE Choice field


{
"questionLabel": "Project Beneficiaries - Anticipated",
"type": "CHOICES",

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)"]
},

//Example of a file upload field


{
"questionLabel": "Illustrative Diagram",
"type": "FILES",
"attachments": [
{"fileName": "photo1.jpg", "fileSize": 65187},
{"fileName": "photo2.jpg", "fileSize": 28941}
]
},

//Example of multi-part fields


{
"questionLabel": "Applicant",
"type": "MULTIPART",
"values": [
{
"fieldKey": "CHOICE",
"type": "CHOICES",
"value": "Individual"
},
{
"fieldKey": "NAME_TITLE",
"type": "TEXT",
"value": "Mr"
},
{
"fieldKey": "NAME_FIRSTNAME",
"type": "TEXT",
"value": "Johnathan"
},
{
"fieldKey": "NAME_LASTNAME",
"type": "TEXT",
"value": "Smith"
}
]
},
{
"questionLabel": "Project Address",
"type": "MULTIPART",
"values": [
{
"fieldKey": "ADDRESS_ADDRESS1",
"type": "TEXT",
Page 21 of 25
Example Request

"value": "51 Stanley Street"


},
{
"fieldKey": "ADDRESS_LOCALITY",
"type": "TEXT",
"value": "West Melbourne"
},
{
"fieldKey": "ADDRESS_STATE",
"type": "TEXT",
"value": "Victoria"
},
{
"fieldKey": "ADDRESS_POSTCODE",
"type": "TEXT",
"value": "3003"
},
{
"fieldKey": "ADDRESS_COUNTRY",
"type": "TEXT",
"value": "Australia"
}
]
},

//Example of an ABN field


{
"questionLabel": "Applicant ABN",
"type": "ABN",
"value": "12345678901",
"abrData": {
"abn": "12345678901",
"active": true,
"acncRegistration": "Registered",
"charityType": "Benevolent Institution",
"dgrItemNumber": "Item 1",
"entityTypeCode": "PRV",
"entityTypeDescription": "Australian Private Company",
"name": "Example Pty Ltd",
"postcode": "3000",
"state": "VIC",
"status": "POPULATED",
"taxConcessions": "No tax concessions",
"acncRegisteredCharity": false,
"dgr": false,
"fbte": false,
"fbtr": false,
"gst": false,
"gstc": false,
"itec": false,

Page 22 of 25
Example Request

"registerLastUpdated": "2019-03-20",
"retrieved": "2019-03-20T10:19:38+1100"
}
}

]
},

//Example of a grid/repeating-section with 2 rows


{
"label": "Expenditure Overview",
"name": "Expenditure Overview",
"repeating": true,
"rows": [
{
"responseFields": [
{
"questionLabel": "Expenditure Description",
"type": "TEXT",
"value": "Equipment"
},{
"questionLabel": "Expenditure Amount",
"type": "NUMBER",
"value": "10000"
}
]
},{
"responseFields": [
{
"questionLabel": "Expenditure Description",
"type": "TEXT",
"value": "Staff"
},{
"questionLabel": "Expenditure Amount",
"type": "NUMBER",
"value": "20000"
}
]
}
]
}
]
}
]
}

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.

results.name The name of the Grant Program.


Example: "Community Grants 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.

results.name The name of the Grant Round.


Example: "Community Grants 2019 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

You might also like