Skip to main content

FreshTrack Cloud GraphQL Api

Updated over 4 months ago

When you login to the main website <customer_subdomain>.freshtrack.com ALL THE DATA you see there is also available from the API.

The other day I mentioned our APIs are powerful, meaning you can literally retrieve everything from the database, and also insert.

The first thing would be to connect to the site as a normal user and see everything we have there.

Here you can explore all the nodes:

(replace the customer_subdomain with your one)

1. In FT Cloud front end, Create a User, make him admin.

API ENDPOINT:

https://customer_subdomain.freshtrack.com/api/graphql

IN POSTMAN: Go under settings, change body to GraphQL

2. GET THE AUTH TOKEN

mutation {
authenticateWithCredentials(authData: {
email: "matteo@freshtrack.com.au",
credentials: "yourpass",
}) {
authToken {
token
}
}
}

YOU GET THIS RESPONSE CONTAINING THE TOKEN

{
"data": {
"authenticateWithCredentials": {
"authToken": {
"token": "m2Xu7kI5SOYsI_u8LNfDKXDh7GDeRv0mEKEt8WOsiHz3qPCdjbh8BsHjYmMG"
}
}
}
}

IN POSTMAN: CLICK ON AUTHORIZATION, BARE TOKEN. Copy the token received

SAMPLE CALLS

GET ALL ENTITIES OF TYPE INDIVIDUAL

{
entities(filterType: "IND") {
indFirstName
indLastName
employee {
isActive
}
}
}

CREATE AN ENTITY

mutation {
createEntity(
entityData: {code: "xxx", type: "IND", orgNo: "", orgTaxNo: "", orgLegalName: "", orgName: "", orgContactName: "", indFirstName: "", indMiddleName: "", indLastName: "", phoneNo: "", mobileNo: "", tags: [], comment: "", notesHtml: "", isActive: true, user: null, employee: {
taxNo: "", bsbNo: "", accNo: "", superAbn: "", superMemberNo: "", emergencyContact: "", isActive: true
}}
){
entity {
id
}
}
}

You can browse all mutation/queries here:

And some examples for postman and also in python.

Did this answer your question?