The "/api/v3/token" endpoint will allow you to generate a session token that will expire in 24 hours. The "Authorization" header must be your client id, followed by a colon, followed by the client secret.
Example (assuming your client id is "5889796789559" and your client secret is "230408972308020237838")
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer 5889796789559:230408972308020237838' \
https://www.eagleagent.com.au/api/v3/token
{
"data": {
"token": {
"token": "eyJ0eXAfKV1QiLCJhbGciOiJIUzI1NiJ9....",
"expiresAt": 1582206763
}
}
}
query GetProperties {
properties {
nodes {
id
formattedAddress
latitude
longitude
vendors { contact { firstName lastName } }
}
}
}
The authorization header should be "Bearer TOKEN" where "TOKEN" is the session token you received by querying the previous endpoint.
curl \
-X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer eyJ0eXAfKV1QiLCJhbGciOiJIUzI1NiJ9....' \
--data '{ "query": "query GetEmailTemplates { properties { nodes { id formattedAddress latitude longitude vendors { contact { firstName lastName } } } } }" }' \
https://www.eagleagent.com.au/api/v3/graphql
{
"data": {
"properties": {
"nodes": [
{ "id": "1", "formattedAddress": "1366 May Locks, EUROA", "latitude": 51.7247, "longitude": 77.0944, "vendors": [] },
{ "id": "3", "formattedAddress": "4831 Konopelski Summit, EUROA", "latitude": 59.8443, "longitude": -20.4846, "vendors": [] }
]
}
}
}
For full details on our GraphQL API please refer to the documentation below: