Skip to main content
GET
/
custom_fields
Get custom fields
curl --request GET \
  --url https://api.partoo.co/v2/custom_fields \
  --header 'x-APIKey: <api-key>'
import requests

url = "https://api.partoo.co/v2/custom_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/custom_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/custom_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/custom_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/custom_fields")
  .header("x-APIKey", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.partoo.co/v2/custom_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
{
  "custom_fields": [
    {
      "id": 1,
      "name": "Is Active",
      "description": "Whether the business is currently active",
      "type": "BOOLEAN",
      "order": 1,
      "section_id": null,
      "section_name": null,
      "slug": "is-active"
    },
    {
      "id": 2,
      "name": "Description",
      "description": "Business description text",
      "type": "TEXT",
      "max_len": 500,
      "order": 2,
      "section_id": 1,
      "section_name": "Section 1",
      "slug": "description"
    },
    {
      "id": 3,
      "name": "Employee Count",
      "description": "Number of employees",
      "type": "INTEGER",
      "min": 0,
      "max": 10000,
      "order": 3,
      "section_id": 1,
      "section_name": "Section 1",
      "slug": "employee-count"
    },
    {
      "id": 4,
      "name": "Rating",
      "description": "Business rating score",
      "type": "FLOAT",
      "min": 0,
      "max": 5,
      "order": 4,
      "section_id": 2,
      "section_name": "Section 2",
      "slug": "rating"
    },
    {
      "id": 5,
      "name": "Category",
      "description": "Business category type",
      "type": "SINGLE_SELECT",
      "possible_values": [
        "Premium",
        "Standard",
        "Basic"
      ],
      "order": 5,
      "section_id": 2,
      "section_name": "Section 2",
      "slug": "category"
    },
    {
      "id": 6,
      "name": "Tags",
      "description": "Business tags for classification",
      "type": "MULTIPLE_SELECT",
      "possible_values": [
        "Featured",
        "New",
        "Sale",
        "Popular"
      ],
      "max_selected_values": 3,
      "order": 6,
      "section_id": 3,
      "section_name": "Section 3",
      "slug": "tags"
    },
    {
      "id": 7,
      "name": "Product Images",
      "description": "Product image selections",
      "type": "MULTIPLE_SELECT_IMAGE",
      "possible_values": [
        "image1",
        "image2",
        "image3"
      ],
      "possible_images_urls": [
        "https://example.com/img1.jpg",
        "https://example.com/img2.jpg",
        "https://example.com/img3.jpg"
      ],
      "possible_images_labels": [
        "Image 1",
        "Image 2",
        "Image 3"
      ],
      "max_selected_values": 2,
      "order": 7,
      "section_id": 3,
      "section_name": "Section 3",
      "slug": "product-images"
    },
    {
      "id": 8,
      "name": "Gallery",
      "description": "Image gallery uploader",
      "type": "IMAGES_UPLOADER",
      "text_fields": [
        {
          "text_field": "Caption",
          "max_length": 100
        },
        {
          "text_field": "Alt Text",
          "max_length": 50
        }
      ],
      "order": 8,
      "section_id": 4,
      "section_name": "Section 4",
      "slug": "gallery"
    }
  ]
}
{
  "errors": {
    "authentication": "User not authenticated"
  }
}
{
  "errors": {
    "authorization": "Operation not allowed"
  }
}
{
  "errors": {
    "json": "Resource not found"
  }
}

Authorizations

x-APIKey
string
header
required

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.

Query Parameters

org_id
integer

Filter by organization ID. Only PROVIDER users can use this filter. If you are not a PROVIDER, this will default to the ID of your organization.

Response

OK

custom_fields
(Boolean Field · object | Text Field · object | Integer Field · object | Float Field · object | Single Select Field · object | Multiple Select Field · object | Multiple Select Image Field · object | Images Uploader Field · object)[]

Boolean Custom Field