The Azavista Platform is completely build using an API structure. The front-end separated from the back-end. The back-end consists of independent microservices which are accessible via APIs.
The complete details overview of Azavista API specification is accessible via the following link: https://app.swaggerhub.com/apis/Azavista4/Azavista
Different API sections
All API are separated in sections. Anything the Azavista interface can do, can be done with the api. Although possible most of the external api requests have to two with only two apis:
1. Event & registration : https://app.swaggerhub.com/apis/Azavista4/Azavista/EVENT3.0
2. Contact & organization : https://app.swaggerhub.com/apis/Azavista4/Azavista/CRM3.1
API versions
The Azavista API is backwards compatible meaning old implementation with continue to work even if the Azavista API develops further. This is done by versioning the api. As can be seen in the examples above there are in this case two versions applicable, a 3.0 and a 3.1 version. Please chech the documentation on information on the correct version
Sever name
The server name is the same as the planner interface. If the planner interface has "us.azavista.com", it is that server name.
OAuth flow
OAuth tokens are used for authorization. We have have two type of flow:
1. password and refesh_token : Use the identity of an existing user.
2. client_credendials : User a clien_id
There is not a lot of difference between the password and the client_credetial flow. Both can have the superadmin flags set on and off, both can have teams connected and when the superadmin flag is off, the tokens will be restricted by team / role scopes
Executing the client_credential flow
Swagger : https://app.swaggerhub.com/apis/Azavista4/Azavista/UM3.0#/Token/post_oauth_token
curl --location 'https://3.0.app.azavista.com/3.0/oauth/token' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'client_id=**SNIP**' \ --data-urlencode 'client_secret=**SNIP**' |
Which returns
{ "access_token": "**SNIP**", "token_type": "Bearer", "expires_in": 3599 } |
Creating an Organization
Now use the access_token in the previous example to create a new organization in Azavista
Swagger : https://app.swaggerhub.com/apis/Azavista4/Azavista/CRM3.1#/Organizations/post_organization
curl --location 'https://3.0.app.azavista.com/3.1/organization' \ --header 'Authorization: Bearer **access_token**' \ --header 'Content-Type: application/json' \ --data '{ "name": "Department 1" }' |
Which returns (please ignore the external_id with is deprecated and will be removed from future api versions
{ "id": "6792280e261ac0ed47432c14", "external_id": null, // WILL BE RETIRED "created_at": "2025-01-23T11:29:18.876Z", "updated_at": "2025-01-23T11:29:18.876Z", "name": "Department 1" } |
Update and organization
curl --location --request PATCH 'https://3.0.app.azavista.com/3.1/organization/6792280e261ac0ed47432c14' \ --header 'Authorization: Bearer **access_token**' \ --header 'Content-Type: application/json' \ --data '{ "name": "Department 1 (updated)" }' |
With the result:
{ "id": "6792280e261ac0ed47432c14", "created_at": "2025-01-23T11:29:18.876Z", "updated_at": "2025-01-23T11:35:36.478Z", "external_reference": "A0001" } |
Get an organization by id
curl --location --request GET 'https://3.0.app.azavista.com/3.1/organization/6792280e261ac0ed47432c14' \ --header 'Authorization: Bearer **access_token**' \ --header 'Content-Type: application/json' \ ' |
Result
{ "id": "6792280e261ac0ed47432c14", "created_at": "2025-01-23T11:29:18.876Z", "updated_at": "2025-01-23T11:35:36.478Z", "name": "Department 1 (updated)" } |
Searching an organization
Searching is in Azavista is very extensive. It is possible to construct complex queries with AND and OR, but in the first example we will simply search no name:
Limit and Offset
Azavista implements a limit and offset where currently the MAX limit is 50. The offset is records. For record 100 - 150 use offset = 100 and limit = 50
Swagger: https://app.swaggerhub.com/apis/Azavista4/Azavista/CRM3.1#/Organizations/post_organization_search
curl --location 'https://3.0.app.azavista.com/3.1/organization/search' \ --header 'Authorization: Bearer **access_token**' \ --data '{ "organization_filter": { "and": [{ "external_reference": {"eq":"A0001"} } ] } }' |
result
{ "object_count": 1, "limit": 50, "offset": 0, "organizations": [ { "id": "6792280e261ac0ed47432c14", "created_at": "2025-01-23T11:29:18.876Z", "updated_at": "2025-01-23T11:35:36.478Z", "name": "Department 1 (updated)" } ] } |
Create contact belonging to an organization
curl --location 'https://3.0.app.azavista.com/3.1/contact' \ --header 'Authorization: Bearer **access_token**' \ --header 'Content-Type: application/json' \ --data-raw '{ "first_name": "John", "last_name": "Doe", "email": "jonh@doe.email", "organization_manager": true, "organization_id": "6792280e261ac0ed47432c14" }' |
With the result
{ "id": "67922cd9261ac0ed47433c87", "external_id": null, // RETIRED "created_at": "2025-01-23T11:49:45.632Z", "updated_at": "2025-01-23T11:49:45.632Z", "first_name": "John", "last_name": "Doe", "email": "jonh@doe.email", "organization_manager": true, "organization_id": "6792280e261ac0ed47432c14" } |
Search contact of an organzation
curl --location 'https://3.0.app.azavista.com/3.1/contact/search' \ --header 'Authorization: Bearer **access_token**' \ --header 'Content-Type: application/json' \ --data '{ "contact_filter": { "and": [{ "organization_id": "6792280e261ac0ed47432c14" }] } }' |
Result
{ "object_count": 1, "limit": 50, "offset": 0, "contacts": [ { "id": "67922cd9261ac0ed47433c87", "created_at": "2025-01-23T11:49:45.632Z", "updated_at": "2025-01-23T11:51:10.681Z", "first_name": "John", "last_name": "Doe", "email": "jonh@doenew.email", "organization_manager": false, "organization_id": "6792280e261ac0ed47432c14" } ] } |
Advanced search
We will include one advanced search example. The operators differ per field type, and will be added to a future version of this document. Lest find all events withing a date range and of a certain type:
Swagger : https://app.swaggerhub.com/apis/Azavista4/Azavista/EVENT3.0#/Events/post_event_search
{
"event_filter": {
"and":[ { "start":{ "after":"2024-03-13T00:00:00+01:00" } }, { "start":{ "before":"2025-02-04T00:00:00+01:00" } }, { "event_type":{ "in":[ "marketing", "sales" ] } } ], "or":[ { "name":{ "like":"workshop" } },
{
"name":{ "like":"meeting" } }, ] }
|
The above query has two main keys: "and" and "or". They both have to evaluate to true. This means find:
1. All event of type marketing or sales
2. Which starts after date1
3. Before date2
4. And which have "workshop" "OR" "meeting" in their name
Here you can review the API overview for each module
Building your API integrations
With above mentioned API structure you can now build your own integrations. You can do this with following steps:
1. Go to the user section
2. In the user section select API client
3. Select Create new API client
4. Please make sure your select the super admin checkbox
5. Now copy past the Client ID and the Client Secret as these will only be shown once