curl --request GET \
--url https://api.partoo.co/v2/business/{business_id}/business_fields \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/business/{business_id}/business_fields"
headers = {"x-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};
fetch('https://api.partoo.co/v2/business/{business_id}/business_fields', 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.partoo.co/v2/business/{business_id}/business_fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-APIKey: <api-key>"
],
]);
$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.partoo.co/v2/business/{business_id}/business_fields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-APIKey", "<api-key>")
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.partoo.co/v2/business/{business_id}/business_fields")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/business/{business_id}/business_fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "address",
"fields": [
{
"name": "country",
"enabled": true,
"enabled_for_subroles": true
},
{
"name": "city",
"enabled": true,
"enabled_for_subroles": false
}
]
},
{
"name": "description",
"fields": [
{
"name": "categories",
"enabled": true,
"enabled_for_subroles": true
},
{
"name": "website_url",
"enabled": true,
"enabled_for_subroles": true
}
]
},
{
"name": "hours",
"fields": [
{
"name": "open_hours",
"enabled": true,
"enabled_for_subroles": true
}
]
},
{
"name": "photos",
"fields": [
{
"name": "cover",
"enabled": false,
"enabled_for_subroles": false
}
]
},
{
"name": "contact",
"fields": [
{
"name": "phone_number",
"enabled": true,
"enabled_for_subroles": false
}
]
},
{
"name": "custom_fields",
"fields": [
{
"name": "has_parking",
"enabled": true,
"enabled_for_subroles": true,
"type": "BOOLEAN",
"id": 1,
"order": 10,
"section_id": 4
},
{
"name": "special_description",
"enabled": true,
"enabled_for_subroles": true,
"type": "TEXT",
"id": 2,
"order": 11,
"max_len": 250,
"section_id": 6
},
{
"name": "facilities",
"enabled": true,
"enabled_for_subroles": true,
"type": "MULTIPLE_SELECT",
"id": 3,
"order": 2,
"possible_values": [
"handicapped access",
"toilets",
"break room"
]
},
{
"name": "banner image",
"enabled": true,
"enabled_for_subroles": true,
"id": 4,
"type": "MULTIPLE_SELECT_IMAGE",
"order": 10,
"possible_values": [
"image 1",
"image 2",
"image 3"
],
"possible_images_labels": [
"label image 1",
"label image 2",
"label image 3"
],
"possible_images_urls": [
"url_of_image_1",
"url_of_image_2",
"url_of_image_3"
]
},
{
"name": "team members",
"enabled": true,
"enabled_for_subroles": true,
"id": 5,
"type": "IMAGES_UPLOADER",
"order": 11,
"text_fields": [
{
"text_field": "text 1",
"max_length": 10
},
{
"text_field": "text 2",
"max_length": 20
},
{
"text_field": "text 3",
"max_length": 30
}
]
}
]
}
]{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Business fields configuration for a business
⚠️ DEPRECATED This endpoint is deprecated in favor of the new Custom Roles system; for migration information, see the Custom Roles & Permissions guide.
This endpoint gives you the list of all the fields that are available for a given Business.
It also tells you, for each field, if you have the permission to edit it or not, depending of the permission configured by your ORG_ADMIN and your PROVIDER.
curl --request GET \
--url https://api.partoo.co/v2/business/{business_id}/business_fields \
--header 'x-APIKey: <api-key>'import requests
url = "https://api.partoo.co/v2/business/{business_id}/business_fields"
headers = {"x-APIKey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-APIKey': '<api-key>'}};
fetch('https://api.partoo.co/v2/business/{business_id}/business_fields', 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.partoo.co/v2/business/{business_id}/business_fields",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-APIKey: <api-key>"
],
]);
$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.partoo.co/v2/business/{business_id}/business_fields"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-APIKey", "<api-key>")
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.partoo.co/v2/business/{business_id}/business_fields")
.header("x-APIKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/business/{business_id}/business_fields")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-APIKey"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"name": "address",
"fields": [
{
"name": "country",
"enabled": true,
"enabled_for_subroles": true
},
{
"name": "city",
"enabled": true,
"enabled_for_subroles": false
}
]
},
{
"name": "description",
"fields": [
{
"name": "categories",
"enabled": true,
"enabled_for_subroles": true
},
{
"name": "website_url",
"enabled": true,
"enabled_for_subroles": true
}
]
},
{
"name": "hours",
"fields": [
{
"name": "open_hours",
"enabled": true,
"enabled_for_subroles": true
}
]
},
{
"name": "photos",
"fields": [
{
"name": "cover",
"enabled": false,
"enabled_for_subroles": false
}
]
},
{
"name": "contact",
"fields": [
{
"name": "phone_number",
"enabled": true,
"enabled_for_subroles": false
}
]
},
{
"name": "custom_fields",
"fields": [
{
"name": "has_parking",
"enabled": true,
"enabled_for_subroles": true,
"type": "BOOLEAN",
"id": 1,
"order": 10,
"section_id": 4
},
{
"name": "special_description",
"enabled": true,
"enabled_for_subroles": true,
"type": "TEXT",
"id": 2,
"order": 11,
"max_len": 250,
"section_id": 6
},
{
"name": "facilities",
"enabled": true,
"enabled_for_subroles": true,
"type": "MULTIPLE_SELECT",
"id": 3,
"order": 2,
"possible_values": [
"handicapped access",
"toilets",
"break room"
]
},
{
"name": "banner image",
"enabled": true,
"enabled_for_subroles": true,
"id": 4,
"type": "MULTIPLE_SELECT_IMAGE",
"order": 10,
"possible_values": [
"image 1",
"image 2",
"image 3"
],
"possible_images_labels": [
"label image 1",
"label image 2",
"label image 3"
],
"possible_images_urls": [
"url_of_image_1",
"url_of_image_2",
"url_of_image_3"
]
},
{
"name": "team members",
"enabled": true,
"enabled_for_subroles": true,
"id": 5,
"type": "IMAGES_UPLOADER",
"order": 11,
"text_fields": [
{
"text_field": "text 1",
"max_length": 10
},
{
"text_field": "text 2",
"max_length": 20
},
{
"text_field": "text 3",
"max_length": 30
}
]
}
]
}
]{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Authorizations
The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.
Path Parameters
Business id.
It may be replaced by c-{code} where code is the store code, which should be unique per organization. This can be used only for ORG_ADMIN, GROUP_MANAGER and BUSINESS_MANAGER users.
Response
OK
[
{
"name": "address",
"fields": [
{
"name": "country",
"enabled": true,
"enabled_for_subroles": true
},
{
"name": "city",
"enabled": true,
"enabled_for_subroles": false
}
]
},
{
"name": "description",
"fields": [
{
"name": "categories",
"enabled": true,
"enabled_for_subroles": true
},
{
"name": "website_url",
"enabled": true,
"enabled_for_subroles": true
}
]
},
{
"name": "hours",
"fields": [
{
"name": "open_hours",
"enabled": true,
"enabled_for_subroles": true
}
]
},
{
"name": "photos",
"fields": [
{
"name": "cover",
"enabled": false,
"enabled_for_subroles": false
}
]
},
{
"name": "contact",
"fields": [
{
"name": "phone_number",
"enabled": true,
"enabled_for_subroles": false
}
]
},
{
"name": "custom_fields",
"fields": [
{
"name": "has_parking",
"enabled": true,
"enabled_for_subroles": true,
"type": "BOOLEAN",
"id": 1,
"order": 10,
"section_id": 4
},
{
"name": "special_description",
"enabled": true,
"enabled_for_subroles": true,
"type": "TEXT",
"id": 2,
"order": 11,
"max_len": 250,
"section_id": 6
},
{
"name": "facilities",
"enabled": true,
"enabled_for_subroles": true,
"type": "MULTIPLE_SELECT",
"id": 3,
"order": 2,
"possible_values": [
"handicapped access",
"toilets",
"break room"
]
},
{
"name": "banner image",
"enabled": true,
"enabled_for_subroles": true,
"id": 4,
"type": "MULTIPLE_SELECT_IMAGE",
"order": 10,
"possible_values": ["image 1", "image 2", "image 3"],
"possible_images_labels": [
"label image 1",
"label image 2",
"label image 3"
],
"possible_images_urls": [
"url_of_image_1",
"url_of_image_2",
"url_of_image_3"
]
},
{
"name": "team members",
"enabled": true,
"enabled_for_subroles": true,
"id": 5,
"type": "IMAGES_UPLOADER",
"order": 11,
"text_fields": [
{ "text_field": "text 1", "max_length": 10 },
{ "text_field": "text 2", "max_length": 20 },
{ "text_field": "text 3", "max_length": 30 }
]
}
]
}
]
Was this page helpful?