Set Place Action Links
curl --request POST \
--url https://api.partoo.co/v2/business/{business_id}/place_action_links \
--header 'Content-Type: application/json' \
--header 'x-APIKey: <api-key>' \
--data '
{
"place_action_links": [
{
"gmb_id": "SHOP_ONLINE",
"urls": [
{
"value": "https://www.example.com/shop_online",
"is_preferred": true
},
{
"id": 2,
"value": "https://www.example.com/shop_online2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_TAKEOUT",
"urls": [
{
"id": 3,
"value": "https://www.example.com/food_takeout1",
"is_preferred": false
},
{
"id": 4,
"value": "https://www.example.com/food_takeout2",
"is_preferred": false
},
{
"value": "https://www.example.com/food_takeout3",
"is_preferred": false
}
]
},
{
"gmb_id": "ONLINE_APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/online_appointment",
"is_preferred": true
},
{
"id": 7,
"value": "https://www.example.com/online_appointment2",
"is_preferred": false
}
]
},
{
"gmb_id": "DINING_RESERVATION",
"urls": [
{
"id": 8,
"value": "https://www.example.com/dining_reservation1",
"is_preferred": true
},
{
"id": 9,
"value": "https://www.example.com/dining_reservation2",
"is_preferred": false
}
]
},
{
"gmb_id": "APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/appointment1",
"is_preferred": true
},
{
"id": 11,
"value": "https://www.example.com/appointment2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_ORDERING",
"urls": [
{
"value": "https://www.example.com/food_ordering1",
"is_preferred": true
},
{
"id": 13,
"value": "https://www.example.com/food_ordering2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_DELIVERY",
"urls": [
{
"id": 14,
"value": "https://www.example.com/food_delivery1",
"is_preferred": true
},
{
"value": "https://www.example.com/food_delivery2",
"is_preferred": false
}
]
}
]
}
'import requests
url = "https://api.partoo.co/v2/business/{business_id}/place_action_links"
payload = { "place_action_links": [
{
"gmb_id": "SHOP_ONLINE",
"urls": [
{
"value": "https://www.example.com/shop_online",
"is_preferred": True
},
{
"id": 2,
"value": "https://www.example.com/shop_online2",
"is_preferred": False
}
]
},
{
"gmb_id": "FOOD_TAKEOUT",
"urls": [
{
"id": 3,
"value": "https://www.example.com/food_takeout1",
"is_preferred": False
},
{
"id": 4,
"value": "https://www.example.com/food_takeout2",
"is_preferred": False
},
{
"value": "https://www.example.com/food_takeout3",
"is_preferred": False
}
]
},
{
"gmb_id": "ONLINE_APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/online_appointment",
"is_preferred": True
},
{
"id": 7,
"value": "https://www.example.com/online_appointment2",
"is_preferred": False
}
]
},
{
"gmb_id": "DINING_RESERVATION",
"urls": [
{
"id": 8,
"value": "https://www.example.com/dining_reservation1",
"is_preferred": True
},
{
"id": 9,
"value": "https://www.example.com/dining_reservation2",
"is_preferred": False
}
]
},
{
"gmb_id": "APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/appointment1",
"is_preferred": True
},
{
"id": 11,
"value": "https://www.example.com/appointment2",
"is_preferred": False
}
]
},
{
"gmb_id": "FOOD_ORDERING",
"urls": [
{
"value": "https://www.example.com/food_ordering1",
"is_preferred": True
},
{
"id": 13,
"value": "https://www.example.com/food_ordering2",
"is_preferred": False
}
]
},
{
"gmb_id": "FOOD_DELIVERY",
"urls": [
{
"id": 14,
"value": "https://www.example.com/food_delivery1",
"is_preferred": True
},
{
"value": "https://www.example.com/food_delivery2",
"is_preferred": False
}
]
}
] }
headers = {
"x-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
place_action_links: [
{
gmb_id: 'SHOP_ONLINE',
urls: [
{value: 'https://www.example.com/shop_online', is_preferred: true},
{id: 2, value: 'https://www.example.com/shop_online2', is_preferred: false}
]
},
{
gmb_id: 'FOOD_TAKEOUT',
urls: [
{id: 3, value: 'https://www.example.com/food_takeout1', is_preferred: false},
{id: 4, value: 'https://www.example.com/food_takeout2', is_preferred: false},
{value: 'https://www.example.com/food_takeout3', is_preferred: false}
]
},
{
gmb_id: 'ONLINE_APPOINTMENT',
urls: [
{value: 'https://www.example.com/online_appointment', is_preferred: true},
{
id: 7,
value: 'https://www.example.com/online_appointment2',
is_preferred: false
}
]
},
{
gmb_id: 'DINING_RESERVATION',
urls: [
{
id: 8,
value: 'https://www.example.com/dining_reservation1',
is_preferred: true
},
{
id: 9,
value: 'https://www.example.com/dining_reservation2',
is_preferred: false
}
]
},
{
gmb_id: 'APPOINTMENT',
urls: [
{value: 'https://www.example.com/appointment1', is_preferred: true},
{id: 11, value: 'https://www.example.com/appointment2', is_preferred: false}
]
},
{
gmb_id: 'FOOD_ORDERING',
urls: [
{value: 'https://www.example.com/food_ordering1', is_preferred: true},
{id: 13, value: 'https://www.example.com/food_ordering2', is_preferred: false}
]
},
{
gmb_id: 'FOOD_DELIVERY',
urls: [
{id: 14, value: 'https://www.example.com/food_delivery1', is_preferred: true},
{value: 'https://www.example.com/food_delivery2', is_preferred: false}
]
}
]
})
};
fetch('https://api.partoo.co/v2/business/{business_id}/place_action_links', 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}/place_action_links",
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([
'place_action_links' => [
[
'gmb_id' => 'SHOP_ONLINE',
'urls' => [
[
'value' => 'https://www.example.com/shop_online',
'is_preferred' => true
],
[
'id' => 2,
'value' => 'https://www.example.com/shop_online2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'FOOD_TAKEOUT',
'urls' => [
[
'id' => 3,
'value' => 'https://www.example.com/food_takeout1',
'is_preferred' => false
],
[
'id' => 4,
'value' => 'https://www.example.com/food_takeout2',
'is_preferred' => false
],
[
'value' => 'https://www.example.com/food_takeout3',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'ONLINE_APPOINTMENT',
'urls' => [
[
'value' => 'https://www.example.com/online_appointment',
'is_preferred' => true
],
[
'id' => 7,
'value' => 'https://www.example.com/online_appointment2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'DINING_RESERVATION',
'urls' => [
[
'id' => 8,
'value' => 'https://www.example.com/dining_reservation1',
'is_preferred' => true
],
[
'id' => 9,
'value' => 'https://www.example.com/dining_reservation2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'APPOINTMENT',
'urls' => [
[
'value' => 'https://www.example.com/appointment1',
'is_preferred' => true
],
[
'id' => 11,
'value' => 'https://www.example.com/appointment2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'FOOD_ORDERING',
'urls' => [
[
'value' => 'https://www.example.com/food_ordering1',
'is_preferred' => true
],
[
'id' => 13,
'value' => 'https://www.example.com/food_ordering2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'FOOD_DELIVERY',
'urls' => [
[
'id' => 14,
'value' => 'https://www.example.com/food_delivery1',
'is_preferred' => true
],
[
'value' => 'https://www.example.com/food_delivery2',
'is_preferred' => false
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.partoo.co/v2/business/{business_id}/place_action_links"
payload := strings.NewReader("{\n \"place_action_links\": [\n {\n \"gmb_id\": \"SHOP_ONLINE\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/shop_online\",\n \"is_preferred\": true\n },\n {\n \"id\": 2,\n \"value\": \"https://www.example.com/shop_online2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_TAKEOUT\",\n \"urls\": [\n {\n \"id\": 3,\n \"value\": \"https://www.example.com/food_takeout1\",\n \"is_preferred\": false\n },\n {\n \"id\": 4,\n \"value\": \"https://www.example.com/food_takeout2\",\n \"is_preferred\": false\n },\n {\n \"value\": \"https://www.example.com/food_takeout3\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"ONLINE_APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/online_appointment\",\n \"is_preferred\": true\n },\n {\n \"id\": 7,\n \"value\": \"https://www.example.com/online_appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"DINING_RESERVATION\",\n \"urls\": [\n {\n \"id\": 8,\n \"value\": \"https://www.example.com/dining_reservation1\",\n \"is_preferred\": true\n },\n {\n \"id\": 9,\n \"value\": \"https://www.example.com/dining_reservation2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/appointment1\",\n \"is_preferred\": true\n },\n {\n \"id\": 11,\n \"value\": \"https://www.example.com/appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_ORDERING\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/food_ordering1\",\n \"is_preferred\": true\n },\n {\n \"id\": 13,\n \"value\": \"https://www.example.com/food_ordering2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_DELIVERY\",\n \"urls\": [\n {\n \"id\": 14,\n \"value\": \"https://www.example.com/food_delivery1\",\n \"is_preferred\": true\n },\n {\n \"value\": \"https://www.example.com/food_delivery2\",\n \"is_preferred\": false\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-APIKey", "<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.partoo.co/v2/business/{business_id}/place_action_links")
.header("x-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"place_action_links\": [\n {\n \"gmb_id\": \"SHOP_ONLINE\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/shop_online\",\n \"is_preferred\": true\n },\n {\n \"id\": 2,\n \"value\": \"https://www.example.com/shop_online2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_TAKEOUT\",\n \"urls\": [\n {\n \"id\": 3,\n \"value\": \"https://www.example.com/food_takeout1\",\n \"is_preferred\": false\n },\n {\n \"id\": 4,\n \"value\": \"https://www.example.com/food_takeout2\",\n \"is_preferred\": false\n },\n {\n \"value\": \"https://www.example.com/food_takeout3\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"ONLINE_APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/online_appointment\",\n \"is_preferred\": true\n },\n {\n \"id\": 7,\n \"value\": \"https://www.example.com/online_appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"DINING_RESERVATION\",\n \"urls\": [\n {\n \"id\": 8,\n \"value\": \"https://www.example.com/dining_reservation1\",\n \"is_preferred\": true\n },\n {\n \"id\": 9,\n \"value\": \"https://www.example.com/dining_reservation2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/appointment1\",\n \"is_preferred\": true\n },\n {\n \"id\": 11,\n \"value\": \"https://www.example.com/appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_ORDERING\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/food_ordering1\",\n \"is_preferred\": true\n },\n {\n \"id\": 13,\n \"value\": \"https://www.example.com/food_ordering2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_DELIVERY\",\n \"urls\": [\n {\n \"id\": 14,\n \"value\": \"https://www.example.com/food_delivery1\",\n \"is_preferred\": true\n },\n {\n \"value\": \"https://www.example.com/food_delivery2\",\n \"is_preferred\": false\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/business/{business_id}/place_action_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"place_action_links\": [\n {\n \"gmb_id\": \"SHOP_ONLINE\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/shop_online\",\n \"is_preferred\": true\n },\n {\n \"id\": 2,\n \"value\": \"https://www.example.com/shop_online2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_TAKEOUT\",\n \"urls\": [\n {\n \"id\": 3,\n \"value\": \"https://www.example.com/food_takeout1\",\n \"is_preferred\": false\n },\n {\n \"id\": 4,\n \"value\": \"https://www.example.com/food_takeout2\",\n \"is_preferred\": false\n },\n {\n \"value\": \"https://www.example.com/food_takeout3\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"ONLINE_APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/online_appointment\",\n \"is_preferred\": true\n },\n {\n \"id\": 7,\n \"value\": \"https://www.example.com/online_appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"DINING_RESERVATION\",\n \"urls\": [\n {\n \"id\": 8,\n \"value\": \"https://www.example.com/dining_reservation1\",\n \"is_preferred\": true\n },\n {\n \"id\": 9,\n \"value\": \"https://www.example.com/dining_reservation2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/appointment1\",\n \"is_preferred\": true\n },\n {\n \"id\": 11,\n \"value\": \"https://www.example.com/appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_ORDERING\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/food_ordering1\",\n \"is_preferred\": true\n },\n {\n \"id\": 13,\n \"value\": \"https://www.example.com/food_ordering2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_DELIVERY\",\n \"urls\": [\n {\n \"id\": 14,\n \"value\": \"https://www.example.com/food_delivery1\",\n \"is_preferred\": true\n },\n {\n \"value\": \"https://www.example.com/food_delivery2\",\n \"is_preferred\": false\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success"
}{
"errors": {
"json": {
"message": "following gmb_ids do not exist in place_action_links: ['SHOPIFY_ONLINE', 'JUST_TAKEOUT']"
}
}
}{
"errors": {
"authentication": "User not authenticated"
}
}{
"errors": {
"authorization": "Operation not allowed"
}
}{
"errors": {
"json": "Resource not found"
}
}Businesses
Set Place Action Links
This endpoint enables you to manage place action links for a given business. Create, update, or delete place action links by modifying the urls array for each gmb_id.
- Create: Include a place action link in urls without an id.
- Update: Include the given place action link in urls with an existing id.
- Delete: Omit the specific link object from urls or provide an empty urls array to remove all for the gmb_id . For the POST method, ensure you send the complete list of desired links to retain or update per gmb_id.
POST
/
business
/
{business_id}
/
place_action_links
Set Place Action Links
curl --request POST \
--url https://api.partoo.co/v2/business/{business_id}/place_action_links \
--header 'Content-Type: application/json' \
--header 'x-APIKey: <api-key>' \
--data '
{
"place_action_links": [
{
"gmb_id": "SHOP_ONLINE",
"urls": [
{
"value": "https://www.example.com/shop_online",
"is_preferred": true
},
{
"id": 2,
"value": "https://www.example.com/shop_online2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_TAKEOUT",
"urls": [
{
"id": 3,
"value": "https://www.example.com/food_takeout1",
"is_preferred": false
},
{
"id": 4,
"value": "https://www.example.com/food_takeout2",
"is_preferred": false
},
{
"value": "https://www.example.com/food_takeout3",
"is_preferred": false
}
]
},
{
"gmb_id": "ONLINE_APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/online_appointment",
"is_preferred": true
},
{
"id": 7,
"value": "https://www.example.com/online_appointment2",
"is_preferred": false
}
]
},
{
"gmb_id": "DINING_RESERVATION",
"urls": [
{
"id": 8,
"value": "https://www.example.com/dining_reservation1",
"is_preferred": true
},
{
"id": 9,
"value": "https://www.example.com/dining_reservation2",
"is_preferred": false
}
]
},
{
"gmb_id": "APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/appointment1",
"is_preferred": true
},
{
"id": 11,
"value": "https://www.example.com/appointment2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_ORDERING",
"urls": [
{
"value": "https://www.example.com/food_ordering1",
"is_preferred": true
},
{
"id": 13,
"value": "https://www.example.com/food_ordering2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_DELIVERY",
"urls": [
{
"id": 14,
"value": "https://www.example.com/food_delivery1",
"is_preferred": true
},
{
"value": "https://www.example.com/food_delivery2",
"is_preferred": false
}
]
}
]
}
'import requests
url = "https://api.partoo.co/v2/business/{business_id}/place_action_links"
payload = { "place_action_links": [
{
"gmb_id": "SHOP_ONLINE",
"urls": [
{
"value": "https://www.example.com/shop_online",
"is_preferred": True
},
{
"id": 2,
"value": "https://www.example.com/shop_online2",
"is_preferred": False
}
]
},
{
"gmb_id": "FOOD_TAKEOUT",
"urls": [
{
"id": 3,
"value": "https://www.example.com/food_takeout1",
"is_preferred": False
},
{
"id": 4,
"value": "https://www.example.com/food_takeout2",
"is_preferred": False
},
{
"value": "https://www.example.com/food_takeout3",
"is_preferred": False
}
]
},
{
"gmb_id": "ONLINE_APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/online_appointment",
"is_preferred": True
},
{
"id": 7,
"value": "https://www.example.com/online_appointment2",
"is_preferred": False
}
]
},
{
"gmb_id": "DINING_RESERVATION",
"urls": [
{
"id": 8,
"value": "https://www.example.com/dining_reservation1",
"is_preferred": True
},
{
"id": 9,
"value": "https://www.example.com/dining_reservation2",
"is_preferred": False
}
]
},
{
"gmb_id": "APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/appointment1",
"is_preferred": True
},
{
"id": 11,
"value": "https://www.example.com/appointment2",
"is_preferred": False
}
]
},
{
"gmb_id": "FOOD_ORDERING",
"urls": [
{
"value": "https://www.example.com/food_ordering1",
"is_preferred": True
},
{
"id": 13,
"value": "https://www.example.com/food_ordering2",
"is_preferred": False
}
]
},
{
"gmb_id": "FOOD_DELIVERY",
"urls": [
{
"id": 14,
"value": "https://www.example.com/food_delivery1",
"is_preferred": True
},
{
"value": "https://www.example.com/food_delivery2",
"is_preferred": False
}
]
}
] }
headers = {
"x-APIKey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-APIKey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
place_action_links: [
{
gmb_id: 'SHOP_ONLINE',
urls: [
{value: 'https://www.example.com/shop_online', is_preferred: true},
{id: 2, value: 'https://www.example.com/shop_online2', is_preferred: false}
]
},
{
gmb_id: 'FOOD_TAKEOUT',
urls: [
{id: 3, value: 'https://www.example.com/food_takeout1', is_preferred: false},
{id: 4, value: 'https://www.example.com/food_takeout2', is_preferred: false},
{value: 'https://www.example.com/food_takeout3', is_preferred: false}
]
},
{
gmb_id: 'ONLINE_APPOINTMENT',
urls: [
{value: 'https://www.example.com/online_appointment', is_preferred: true},
{
id: 7,
value: 'https://www.example.com/online_appointment2',
is_preferred: false
}
]
},
{
gmb_id: 'DINING_RESERVATION',
urls: [
{
id: 8,
value: 'https://www.example.com/dining_reservation1',
is_preferred: true
},
{
id: 9,
value: 'https://www.example.com/dining_reservation2',
is_preferred: false
}
]
},
{
gmb_id: 'APPOINTMENT',
urls: [
{value: 'https://www.example.com/appointment1', is_preferred: true},
{id: 11, value: 'https://www.example.com/appointment2', is_preferred: false}
]
},
{
gmb_id: 'FOOD_ORDERING',
urls: [
{value: 'https://www.example.com/food_ordering1', is_preferred: true},
{id: 13, value: 'https://www.example.com/food_ordering2', is_preferred: false}
]
},
{
gmb_id: 'FOOD_DELIVERY',
urls: [
{id: 14, value: 'https://www.example.com/food_delivery1', is_preferred: true},
{value: 'https://www.example.com/food_delivery2', is_preferred: false}
]
}
]
})
};
fetch('https://api.partoo.co/v2/business/{business_id}/place_action_links', 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}/place_action_links",
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([
'place_action_links' => [
[
'gmb_id' => 'SHOP_ONLINE',
'urls' => [
[
'value' => 'https://www.example.com/shop_online',
'is_preferred' => true
],
[
'id' => 2,
'value' => 'https://www.example.com/shop_online2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'FOOD_TAKEOUT',
'urls' => [
[
'id' => 3,
'value' => 'https://www.example.com/food_takeout1',
'is_preferred' => false
],
[
'id' => 4,
'value' => 'https://www.example.com/food_takeout2',
'is_preferred' => false
],
[
'value' => 'https://www.example.com/food_takeout3',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'ONLINE_APPOINTMENT',
'urls' => [
[
'value' => 'https://www.example.com/online_appointment',
'is_preferred' => true
],
[
'id' => 7,
'value' => 'https://www.example.com/online_appointment2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'DINING_RESERVATION',
'urls' => [
[
'id' => 8,
'value' => 'https://www.example.com/dining_reservation1',
'is_preferred' => true
],
[
'id' => 9,
'value' => 'https://www.example.com/dining_reservation2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'APPOINTMENT',
'urls' => [
[
'value' => 'https://www.example.com/appointment1',
'is_preferred' => true
],
[
'id' => 11,
'value' => 'https://www.example.com/appointment2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'FOOD_ORDERING',
'urls' => [
[
'value' => 'https://www.example.com/food_ordering1',
'is_preferred' => true
],
[
'id' => 13,
'value' => 'https://www.example.com/food_ordering2',
'is_preferred' => false
]
]
],
[
'gmb_id' => 'FOOD_DELIVERY',
'urls' => [
[
'id' => 14,
'value' => 'https://www.example.com/food_delivery1',
'is_preferred' => true
],
[
'value' => 'https://www.example.com/food_delivery2',
'is_preferred' => false
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.partoo.co/v2/business/{business_id}/place_action_links"
payload := strings.NewReader("{\n \"place_action_links\": [\n {\n \"gmb_id\": \"SHOP_ONLINE\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/shop_online\",\n \"is_preferred\": true\n },\n {\n \"id\": 2,\n \"value\": \"https://www.example.com/shop_online2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_TAKEOUT\",\n \"urls\": [\n {\n \"id\": 3,\n \"value\": \"https://www.example.com/food_takeout1\",\n \"is_preferred\": false\n },\n {\n \"id\": 4,\n \"value\": \"https://www.example.com/food_takeout2\",\n \"is_preferred\": false\n },\n {\n \"value\": \"https://www.example.com/food_takeout3\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"ONLINE_APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/online_appointment\",\n \"is_preferred\": true\n },\n {\n \"id\": 7,\n \"value\": \"https://www.example.com/online_appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"DINING_RESERVATION\",\n \"urls\": [\n {\n \"id\": 8,\n \"value\": \"https://www.example.com/dining_reservation1\",\n \"is_preferred\": true\n },\n {\n \"id\": 9,\n \"value\": \"https://www.example.com/dining_reservation2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/appointment1\",\n \"is_preferred\": true\n },\n {\n \"id\": 11,\n \"value\": \"https://www.example.com/appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_ORDERING\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/food_ordering1\",\n \"is_preferred\": true\n },\n {\n \"id\": 13,\n \"value\": \"https://www.example.com/food_ordering2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_DELIVERY\",\n \"urls\": [\n {\n \"id\": 14,\n \"value\": \"https://www.example.com/food_delivery1\",\n \"is_preferred\": true\n },\n {\n \"value\": \"https://www.example.com/food_delivery2\",\n \"is_preferred\": false\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-APIKey", "<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.partoo.co/v2/business/{business_id}/place_action_links")
.header("x-APIKey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"place_action_links\": [\n {\n \"gmb_id\": \"SHOP_ONLINE\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/shop_online\",\n \"is_preferred\": true\n },\n {\n \"id\": 2,\n \"value\": \"https://www.example.com/shop_online2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_TAKEOUT\",\n \"urls\": [\n {\n \"id\": 3,\n \"value\": \"https://www.example.com/food_takeout1\",\n \"is_preferred\": false\n },\n {\n \"id\": 4,\n \"value\": \"https://www.example.com/food_takeout2\",\n \"is_preferred\": false\n },\n {\n \"value\": \"https://www.example.com/food_takeout3\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"ONLINE_APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/online_appointment\",\n \"is_preferred\": true\n },\n {\n \"id\": 7,\n \"value\": \"https://www.example.com/online_appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"DINING_RESERVATION\",\n \"urls\": [\n {\n \"id\": 8,\n \"value\": \"https://www.example.com/dining_reservation1\",\n \"is_preferred\": true\n },\n {\n \"id\": 9,\n \"value\": \"https://www.example.com/dining_reservation2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/appointment1\",\n \"is_preferred\": true\n },\n {\n \"id\": 11,\n \"value\": \"https://www.example.com/appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_ORDERING\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/food_ordering1\",\n \"is_preferred\": true\n },\n {\n \"id\": 13,\n \"value\": \"https://www.example.com/food_ordering2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_DELIVERY\",\n \"urls\": [\n {\n \"id\": 14,\n \"value\": \"https://www.example.com/food_delivery1\",\n \"is_preferred\": true\n },\n {\n \"value\": \"https://www.example.com/food_delivery2\",\n \"is_preferred\": false\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.partoo.co/v2/business/{business_id}/place_action_links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-APIKey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"place_action_links\": [\n {\n \"gmb_id\": \"SHOP_ONLINE\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/shop_online\",\n \"is_preferred\": true\n },\n {\n \"id\": 2,\n \"value\": \"https://www.example.com/shop_online2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_TAKEOUT\",\n \"urls\": [\n {\n \"id\": 3,\n \"value\": \"https://www.example.com/food_takeout1\",\n \"is_preferred\": false\n },\n {\n \"id\": 4,\n \"value\": \"https://www.example.com/food_takeout2\",\n \"is_preferred\": false\n },\n {\n \"value\": \"https://www.example.com/food_takeout3\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"ONLINE_APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/online_appointment\",\n \"is_preferred\": true\n },\n {\n \"id\": 7,\n \"value\": \"https://www.example.com/online_appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"DINING_RESERVATION\",\n \"urls\": [\n {\n \"id\": 8,\n \"value\": \"https://www.example.com/dining_reservation1\",\n \"is_preferred\": true\n },\n {\n \"id\": 9,\n \"value\": \"https://www.example.com/dining_reservation2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"APPOINTMENT\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/appointment1\",\n \"is_preferred\": true\n },\n {\n \"id\": 11,\n \"value\": \"https://www.example.com/appointment2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_ORDERING\",\n \"urls\": [\n {\n \"value\": \"https://www.example.com/food_ordering1\",\n \"is_preferred\": true\n },\n {\n \"id\": 13,\n \"value\": \"https://www.example.com/food_ordering2\",\n \"is_preferred\": false\n }\n ]\n },\n {\n \"gmb_id\": \"FOOD_DELIVERY\",\n \"urls\": [\n {\n \"id\": 14,\n \"value\": \"https://www.example.com/food_delivery1\",\n \"is_preferred\": true\n },\n {\n \"value\": \"https://www.example.com/food_delivery2\",\n \"is_preferred\": false\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success"
}{
"errors": {
"json": {
"message": "following gmb_ids do not exist in place_action_links: ['SHOPIFY_ONLINE', 'JUST_TAKEOUT']"
}
}
}{
"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.
Body
application/json
List of Business Place Action Links
Show child attributes
Show child attributes
Example:
[
{
"gmb_id": "SHOP_ONLINE",
"urls": [
{
"value": "https://www.example.com/shop_online",
"is_preferred": true
},
{
"id": 2,
"value": "https://www.example.com/shop_online2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_TAKEOUT",
"urls": [
{
"id": 3,
"value": "https://www.example.com/food_takeout1",
"is_preferred": false
},
{
"id": 4,
"value": "https://www.example.com/food_takeout2",
"is_preferred": false
},
{
"value": "https://www.example.com/food_takeout3",
"is_preferred": false
}
]
},
{
"gmb_id": "ONLINE_APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/online_appointment",
"is_preferred": true
},
{
"id": 7,
"value": "https://www.example.com/online_appointment2",
"is_preferred": false
}
]
},
{
"gmb_id": "DINING_RESERVATION",
"urls": [
{
"id": 8,
"value": "https://www.example.com/dining_reservation1",
"is_preferred": true
},
{
"id": 9,
"value": "https://www.example.com/dining_reservation2",
"is_preferred": false
}
]
},
{
"gmb_id": "APPOINTMENT",
"urls": [
{
"value": "https://www.example.com/appointment1",
"is_preferred": true
},
{
"id": 11,
"value": "https://www.example.com/appointment2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_ORDERING",
"urls": [
{
"value": "https://www.example.com/food_ordering1",
"is_preferred": true
},
{
"id": 13,
"value": "https://www.example.com/food_ordering2",
"is_preferred": false
}
]
},
{
"gmb_id": "FOOD_DELIVERY",
"urls": [
{
"id": 14,
"value": "https://www.example.com/food_delivery1",
"is_preferred": true
},
{
"value": "https://www.example.com/food_delivery2",
"is_preferred": false
}
]
}
]Response
OK
Request status
Available options:
success Was this page helpful?
⌘I