Skip to main content
GET
/
categories
/
{category_id}
Category information
curl --request GET \
  --url https://api.partoo.co/v2/categories/{category_id} \
  --header 'x-APIKey: <api-key>'
import requests

url = "https://api.partoo.co/v2/categories/{category_id}"

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/categories/{category_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.partoo.co/v2/categories/{category_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 => [
"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/categories/{category_id}"

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/categories/{category_id}")
.header("x-APIKey", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.partoo.co/v2/categories/{category_id}")

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
{
  "id": 4018,
  "gmb_id": "gcid:wood_industry",
  "name": "Industrie du bois",
  "state": "OK",
  "block_push_long_description_on_gmb": false,
  "live_id": null
}

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.

Path Parameters

category_id
required

Category id or Google's category id

Example:

"5706 or gcid:bank"

Query Parameters

lang
enum<string>

Language to get the category name. If not given, the user's language is used.

Available language in the application

Available options:
fr,
en,
es,
it,
pt-br,
de,
ar,
nl,
pl,
cs,
ca,
sk,
pt,
lv,
ro,
bg,
hu
Example:

"fr"

return_live
boolean
default:false

Return the corresponding live category instead of the requested category

with_names
boolean
default:false

Returns an object representing the list of translations in the available languages for the requested category. See example on the right.

If with_names is true, the translations will appear in the field names

with_countries
boolean
default:false

Returns an array of strings representing the list of country codes in which the requested category is available.

If with_countries is true, the country list will appear in the field countries

Response

OK

id
integer

Category id

Example:

42

gmb_id
string

Unique category id. This is the id you should pass in business.categories array when creating/updating a business

Example:

"gcid:climbing_gym"

name
string

Category name in given language or user's language

Example:

"Cabinet d'expertise comptable"

names
object[]

Category names translated for available languages

If with_names is true

state
string

State of category ( OK or DEPRECATED )

Example:

"OK"

block_push_long_description_on_gmb
boolean

Boolean indicating if the business long description can be pushed to Google when the business belongs to this category

Example:

false

countries
string[]

Array of strings representing the list of country codes in which the category is available

If with_countries is true

Example:
["FR", "GB", "IT", "ES"]
live_id
string | null

Live category id to which the category is mapped (deprecated categories are mapped to the closest category)

Example:

"gcid:sport_club"