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

Authenticate requests to this API's endpoints by sending 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\": \"sheldon.doyle@example.com\",
    \"password\": \"*A}P{={c*;-*)_r\"
}"
const url = new URL(
    "https://advisr.com.au/api/authenticate"
);

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

let body = {
    "email": "sheldon.doyle@example.com",
    "password": "*A}P{={c*;-*)_r"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://advisr.com.au/api/authenticate',
    [
        'headers' => [
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'sheldon.doyle@example.com',
            'password' => '*A}P{={c*;-*)_r',
        ],
    ]
);
$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: sheldon.doyle@example.com

password   string   

Example: *A}P{={c*;-*)_r

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();
$response = $client->get(
    'https://advisr.com.au/api/v2/brokerages',
    [
        '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/consequatur" \
    --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/consequatur"
);

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();
$response = $client->get(
    'https://advisr.com.au/api/v2/brokerages/consequatur',
    [
        '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: consequatur

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();
$response = $client->get(
    'https://advisr.com.au/api/v2/reviews',
    [
        '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/5" \
    --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/5"
);

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();
$response = $client->get(
    'https://advisr.com.au/api/v2/reviews/5',
    [
        '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: 5

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\": 19,
    \"reviewee_id\": 3,
    \"rating\": 11,
    \"fullName\": \"quo\",
    \"email\": \"bulah.little@example.net\",
    \"comment\": \"provident\"
}"
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": 19,
    "reviewee_id": 3,
    "rating": 11,
    "fullName": "quo",
    "email": "bulah.little@example.net",
    "comment": "provident"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://advisr.com.au/api/v2/reviews/submit',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 19,
            'reviewee_id' => 3,
            'rating' => 11,
            'fullName' => 'quo',
            'email' => 'bulah.little@example.net',
            'comment' => 'provident',
        ],
    ]
);
$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: 19

reviewee_id   integer   

Example: 3

rating   integer   

Example: 11

fullName   string   

Example: quo

email   string   

Example: bulah.little@example.net

comment   string   

Example: provident

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\": 11,
    \"firstName\": \"dolor\",
    \"lastName\": \"est\",
    \"email\": \"jadyn29@example.com\",
    \"mobile\": 138991767.26234525,
    \"message\": \"cumque\"
}"
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": 11,
    "firstName": "dolor",
    "lastName": "est",
    "email": "jadyn29@example.com",
    "mobile": 138991767.26234525,
    "message": "cumque"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    'https://advisr.com.au/api/v2/leads/submit',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'user_id' => 11,
            'firstName' => 'dolor',
            'lastName' => 'est',
            'email' => 'jadyn29@example.com',
            'mobile' => 138991767.26234525,
            'message' => 'cumque',
        ],
    ]
);
$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: 11

firstName   string   

Example: dolor

lastName   string   

Example: est

email   string   

Example: jadyn29@example.com

mobile   number   

Example: 138991767.26235

message   string   

Example: cumque

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();
$response = $client->post(
    'https://advisr.com.au/api/doSomething/2',
    [
        '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?