MENU navbar-image

Introduction

Showcase your customer reviews on your website. Enable your team page on your website to update dynamically. Using the Advisr API you can capture and share customer reviews on your website, enable your teams to automatically keep their website team page details up to date and much much more. Reach out and connect with the Advisr team to better understand how the Advisr API could work for you.

The following endpoints provide robust, consistent and stable data to be consumed by your website or front-end service. They are also authenticated with Oauth 2 which requires you to generate a token with your login credentials.

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

The Advisr REST API is based on an OpenAPI open to key partners and enables authenticated access to rich data stored on Advisr.

To get your account approved for API access, please contact us, and we will be happy to assist. When your account is authorised, please see the login endpoint for details on how to obtain a token:

Endpoints

Get Token

Generate new access token for user. This token is unique for every device.

Example request:
curl --request POST \
    "https://advisr.com.au/api/authenticate" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"msauer@example.net\",
    \"password\": \"7\\\":7uH\"
}"
const url = new URL(
    "https://advisr.com.au/api/authenticate"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "msauer@example.net",
    "password": "7\":7uH"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/authenticate';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'msauer@example.net',
            'password' => '7":7uH',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
    "token": "2|adiierKef8kvJkchoTRpYaAjNl243Ythb5kQY5uo"
}
 

Example response (422):


Unprocessable Entity { "errors": { } }
 

Example response (500):


Server Error
 

Request      

POST api/authenticate

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Example: msauer@example.net

password   string   

Example: 7":7uH

Get all brokerages

requires authentication

Returns list of brokerages

Example request:
curl --request GET \
    --get "https://advisr.com.au/api/v2/brokerages" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://advisr.com.au/api/v2/brokerages"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/v2/brokerages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


[
   {
       "id": 23,
       "name": "Bobby Maquire Insurance",
       "first_name": "Bobby",
       "last_name": "Maquire Insurance",
       "telephone": "02 1228 3320",
       "mobile": "04109283759",
       "email": "bobbymaquireinsurance@insurance.com"
       "avatar_url": "https://advisr.com.au/storage/users/bobby_m_insurance.jpg",
       "profile_url": "https://advisr.com.au/bobby-maquire-brokerage",
       "rating": null,
       "description": "<div>Hello World!<\/div>",
       "reviews": []
   }
]
 

Example response (422):


Unprocessable Entity { "errors": { } }
 

Example response (500):


Server Error
 

Request      

GET api/v2/brokerages

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get a brokerage

requires authentication

Returns a brokerage of a specific ID

Example request:
curl --request GET \
    --get "https://advisr.com.au/api/v2/brokerages/dignissimos" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://advisr.com.au/api/v2/brokerages/dignissimos"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/v2/brokerages/dignissimos';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


OK
 

Example response (200):


{
 "id": 0000,
 "name": "Bobby Maquire Insurance",
 "first_name": "Bobby",
 "last_name": "Maquire Insurance",
 "telephone": "02 1228 3320",
 "email": "bobbymaquireinsurance@insurance.com",
 "role": null,
 "mobile": "04109283759",
 "avatar_url": "https:\/\/d1iguueiy4mcfp.cloudfront.net\/tenant2bfad839-9a32-4a49-ad9a-f8ec01e19c76\/users\/default-user.webp",
 "profile_url": "http:\/\/advisr.localhost:8000\/karl-honrado",
 "rating": null,
 "description": "<div>Hello World!<\/div>",
 "reviews": []
}
 

Example response (422):


Unprocessable Entity { "errors": { } }
 

Example response (500):


Server Error
 

Request      

GET api/v2/brokerages/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the brokerage. Example: dignissimos

Get all reviews

requires authentication

Returns list of reviews from a user

Example request:
curl --request GET \
    --get "https://advisr.com.au/api/v2/reviews" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://advisr.com.au/api/v2/reviews"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/v2/reviews';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


[
    {
        "id": 577,
        "type": "inhouse",
        "reviewerName": "Raphael Alexander",
        "reviewerAvatar": "https://ui-avatars.com/api/?length=1&background=random&name=Raphael Alexander",
        "reviewer": "Raphael Alexander",
        "reviewerSlug": null,
        "rating": 5,
        "comment": "In adipisci molestia",
        "caption": "Raphael Alexander reviewed Karl Honrado",
        "reviewReply": [],
        "createdTime": "2022-10-20T04:14:26.000000Z",
        "reviewee_id": 4979,
        "reviewee": "Karl Honrado",
        "revieweeAvatar": "https://d1iguueiy4mcfp.cloudfront.net/tenant2bfad839-9a32-4a49-ad9a-f8ec01e19c76/users/default-user.webp",
        "google": false
    }
]
 

Request      

GET api/v2/reviews

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Get a review

requires authentication

Returns a review of a specific ID

Example request:
curl --request GET \
    --get "https://advisr.com.au/api/v2/reviews/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://advisr.com.au/api/v2/reviews/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/v2/reviews/15';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200):


{
 "id": 1,
 "rating": 5,
 "reviewer": "Carla Pate",
 "comment": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
 "date": "2022-10-31T02:09:24.000000Z",
 "reviewee_id": 0000,
 "reviewee": "Bobby Maquire Insurance"
 }
 

Example response (422):


Unprocessable Entity { "errors": { } }
 

Example response (500):


Server Error
 

Request      

GET api/v2/reviews/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the review. Example: 15

Submit a review

requires authentication

Submit a review for specific user

Example request:
curl --request POST \
    "https://advisr.com.au/api/v2/reviews/submit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 1,
    \"reviewee_id\": 12,
    \"rating\": 1,
    \"fullName\": \"possimus\",
    \"email\": \"pernser@example.org\",
    \"comment\": \"dolorum\"
}"
const url = new URL(
    "https://advisr.com.au/api/v2/reviews/submit"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 1,
    "reviewee_id": 12,
    "rating": 1,
    "fullName": "possimus",
    "email": "pernser@example.org",
    "comment": "dolorum"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/v2/reviews/submit';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 1,
            'reviewee_id' => 12,
            'rating' => 1,
            'fullName' => 'possimus',
            'email' => 'pernser@example.org',
            'comment' => 'dolorum',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
    "user_id": 0,
    "reviewee_id": 123,
    "rating": 4,
    "user_name": "Bobby Jones",
    "user_email": "hello@email.com",
    "comment": "I like ...",
    "ip_address": "192.168.1.1",
    "created_at": "2021-07-01T03:01:37.209902Z",
    "status": "PENDING",
    "reviewee_name": "John Doe",
    "id": "1"
}
 

Example response (422):


Unprocessable Entity { "errors": { } }
 

Example response (500):


Server Error
 

Request      

POST api/v2/reviews/submit

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user_id   integer  optional  

Example: 1

reviewee_id   integer   

Example: 12

rating   integer   

Example: 1

fullName   string   

Example: possimus

email   string   

Example: pernser@example.org

comment   string   

Example: dolorum

Submit an inquiry

requires authentication

Save a lead for specific user

Example request:
curl --request POST \
    "https://advisr.com.au/api/v2/leads/submit" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"user_id\": 13,
    \"firstName\": \"tempora\",
    \"lastName\": \"ea\",
    \"email\": \"ybahringer@example.net\",
    \"mobile\": 6625.20777,
    \"message\": \"qui\"
}"
const url = new URL(
    "https://advisr.com.au/api/v2/leads/submit"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "user_id": 13,
    "firstName": "tempora",
    "lastName": "ea",
    "email": "ybahringer@example.net",
    "mobile": 6625.20777,
    "message": "qui"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/v2/leads/submit';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 13,
            'firstName' => 'tempora',
            'lastName' => 'ea',
            'email' => 'ybahringer@example.net',
            'mobile' => 6625.20777,
            'message' => 'qui',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (201):


{
     "user_id": 0,
     "name": "Bobby Johnson",
     "email": "hello@email.com",
     "mobile": "04 8628 3917",
     "message": "I like ...",
     "updated_at": "2021-07-01T03:01:37.209902Z",
     "created_at": "2021-07-01T03:01:37.209902Z",
     "id": 1,
}
 

Example response (422):


Unprocessable Entity { "errors": { } }
 

Example response (500):


Server Error
 

Request      

POST api/v2/leads/submit

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

user_id   integer   

Example: 13

firstName   string   

Example: tempora

lastName   string   

Example: ea

email   string   

Example: ybahringer@example.net

mobile   number   

Example: 6625.20777

message   string   

Example: qui

The group the endpoint belongs to. Can be a new group or an existing group.

A description for the group. You don't need to set this for every endpoint; once is enough.

You can add a subgroup, too.

Do something

This endpoint allows you to do something.

Example request:
curl --request POST \
    "https://advisr.com.au/api/doSomething/2?speed=fast" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"something\": [
        \"string 1\",
        \"string 2\"
    ]
}"
const url = new URL(
    "https://advisr.com.au/api/doSomething/2"
);

const params = {
    "speed": "fast",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "something": [
        "string 1",
        "string 2"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://advisr.com.au/api/doSomething/2';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'speed' => 'fast',
        ],
        'json' => [
            'something' => [
                'string 1',
                'string 2',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Example response (200, When the thing was done smoothly.):


{
    "hey": "ho ho ho"
}
 

Request      

POST api/doSomething/{param}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

param   integer   

A URL param for no reason. Example: 2

Query Parameters

speed   string  optional  

How fast the thing should be done. Can be slow or fast. Example: fast

Body Parameters

something   string[]   

The things we should do.

Response

Response Fields

hey   string   

Who knows?