Get Survey Usage by Location
curl --request POST \
--url https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-business-number: <x-business-number>' \
--data '
{
"startDate": "2024-08-12 8:43:07",
"endDate": "2026-08-12 8:43:07"
}
'import requests
url = "https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location"
payload = {
"startDate": "2024-08-12 8:43:07",
"endDate": "2026-08-12 8:43:07"
}
headers = {
"x-business-number": "<x-business-number>",
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-business-number': '<x-business-number>',
'x-api-key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({startDate: '2024-08-12 8:43:07', endDate: '2026-08-12 8:43:07'})
};
fetch('https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2024-08-12 8:43:07',
'endDate' => '2026-08-12 8:43:07'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-business-number: <x-business-number>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location"
payload := strings.NewReader("{\n \"startDate\": \"2024-08-12 8:43:07\",\n \"endDate\": \"2026-08-12 8:43:07\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-business-number", "<x-business-number>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location")
.header("x-business-number", "<x-business-number>")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2024-08-12 8:43:07\",\n \"endDate\": \"2026-08-12 8:43:07\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-business-number"] = '<x-business-number>'
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2024-08-12 8:43:07\",\n \"endDate\": \"2026-08-12 8:43:07\"\n}"
response = http.request(request)
puts response.read_body{
"surveyName": "ARA| healthcare survey",
"dataPoints": [
{
"count": 120,
"partial": 30,
"complete": 90,
"audience": 200,
"opened": 150,
"clicked": 130,
"responseRate": 60,
"businessId": 100077184,
"locationName": "Electric Heroes"
},
{
"count": 85,
"partial": 20,
"complete": 65,
"audience": 150,
"opened": 110,
"clicked": 95,
"responseRate": 56.67,
"businessId": 100139870,
"locationName": "US location 1"
}
],
"totalCount": 205,
"partial": 50,
"complete": 155,
"page": 0,
"size": 500,
"totalPages": 1,
"partialPercent": 24.39,
"completePercent": 75.61,
"surveyId": 8013
}{
"code": 1315,
"message": "Invalid survey."
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Survey
Get Survey Usage by Location
Get Survey Usage by Location API provides usage data per location for a given survey, including sent count and response rate by location. Results are paginated and sorted by response count in descending order by default.
POST
/
v1
/
survey
/
{surveyId}
/
usage
/
by-location
Get Survey Usage by Location
curl --request POST \
--url https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-business-number: <x-business-number>' \
--data '
{
"startDate": "2024-08-12 8:43:07",
"endDate": "2026-08-12 8:43:07"
}
'import requests
url = "https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location"
payload = {
"startDate": "2024-08-12 8:43:07",
"endDate": "2026-08-12 8:43:07"
}
headers = {
"x-business-number": "<x-business-number>",
"x-api-key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-business-number': '<x-business-number>',
'x-api-key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({startDate: '2024-08-12 8:43:07', endDate: '2026-08-12 8:43:07'})
};
fetch('https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'startDate' => '2024-08-12 8:43:07',
'endDate' => '2026-08-12 8:43:07'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <x-api-key>",
"x-business-number: <x-business-number>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location"
payload := strings.NewReader("{\n \"startDate\": \"2024-08-12 8:43:07\",\n \"endDate\": \"2026-08-12 8:43:07\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-business-number", "<x-business-number>")
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location")
.header("x-business-number", "<x-business-number>")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2024-08-12 8:43:07\",\n \"endDate\": \"2026-08-12 8:43:07\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.birdeye.com/resources/v1/survey/{surveyId}/usage/by-location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-business-number"] = '<x-business-number>'
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2024-08-12 8:43:07\",\n \"endDate\": \"2026-08-12 8:43:07\"\n}"
response = http.request(request)
puts response.read_body{
"surveyName": "ARA| healthcare survey",
"dataPoints": [
{
"count": 120,
"partial": 30,
"complete": 90,
"audience": 200,
"opened": 150,
"clicked": 130,
"responseRate": 60,
"businessId": 100077184,
"locationName": "Electric Heroes"
},
{
"count": 85,
"partial": 20,
"complete": 65,
"audience": 150,
"opened": 110,
"clicked": 95,
"responseRate": 56.67,
"businessId": 100139870,
"locationName": "US location 1"
}
],
"totalCount": 205,
"partial": 50,
"complete": 155,
"page": 0,
"size": 500,
"totalPages": 1,
"partialPercent": 24.39,
"completePercent": 75.61,
"surveyId": 8013
}{
"code": 1315,
"message": "Invalid survey."
}{
"code": 1161,
"message": "Invalid API key"
}{
"code": 1011,
"message": "Business id is invalid"
}{
"code": 89,
"message": "Rate limit exceeded"
}Headers
The Business Number of the Enterprise.
Timezone ID for date filtering. Defaults to UTC.
e.g. [Required] Partner specific API key provided by Birdeye for data exchange.
Media type of the JSON request body.
e.g. application/json
Path Parameters
Id of the Survey.
Query Parameters
The page number, starts with 0.
The number of records per page.
Sort order for results. Results are always sorted by response count.
Available options:
asc, desc Body
application/json
Response
OK