Get a business
curl --request GET \
--url https://api.izap.ai/api/v1/businesses/{business_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.izap.ai/api/v1/businesses/{business_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.izap.ai/api/v1/businesses/{business_id}', 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.izap.ai/api/v1/businesses/{business_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/businesses/{business_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.izap.ai/api/v1/businesses/{business_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/businesses/{business_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "6a1f2e2e-1c34-4e2a-9c3e-1234567890ab",
"business_name": "Gás na Promoção",
"industry": "retail",
"hours": [
{
"day_of_week": 1,
"open_time": "08:00",
"close_time": "18:00"
}
],
"menus": [],
"chatbot": {
"id": "b2c3d4e5-1234-4a5b-9c8d-abcdef123456",
"name": "Assistente",
"is_active": true
}
}{
"detail": "Not authenticated"
}Businesses
Get a business
Fetch a single business, including hours, menus, and its active chatbot configuration.
GET
/
api
/
v1
/
businesses
/
{business_id}
Get a business
curl --request GET \
--url https://api.izap.ai/api/v1/businesses/{business_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.izap.ai/api/v1/businesses/{business_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.izap.ai/api/v1/businesses/{business_id}', 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.izap.ai/api/v1/businesses/{business_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/businesses/{business_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.izap.ai/api/v1/businesses/{business_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/businesses/{business_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "6a1f2e2e-1c34-4e2a-9c3e-1234567890ab",
"business_name": "Gás na Promoção",
"industry": "retail",
"hours": [
{
"day_of_week": 1,
"open_time": "08:00",
"close_time": "18:00"
}
],
"menus": [],
"chatbot": {
"id": "b2c3d4e5-1234-4a5b-9c8d-abcdef123456",
"name": "Assistente",
"is_active": true
}
}{
"detail": "Not authenticated"
}Autorizações
JWT access token obtained from POST /api/v1/auth/jwt/login, the OAuth token endpoint, or a business-scoped API token. Some Business/Chat/Template/Scheduling endpoints alternatively accept HTTP Basic credentials scoped to the business slug.
Parâmetros de caminho
⌘I