Replace services
curl --request PUT \
--url https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceItems": [
{
"freeFormServiceItem": {
"category": "categories/gcid:plumber",
"label": {
"description": "Emergency and scheduled pipe repair",
"displayName": "Pipe Repair"
}
},
"price": {
"currencyCode": "USD",
"units": "150"
}
}
]
}
'import requests
url = "https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services"
payload = { "serviceItems": [
{
"freeFormServiceItem": {
"category": "categories/gcid:plumber",
"label": {
"description": "Emergency and scheduled pipe repair",
"displayName": "Pipe Repair"
}
},
"price": {
"currencyCode": "USD",
"units": "150"
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serviceItems: [
{
freeFormServiceItem: {
category: 'categories/gcid:plumber',
label: {description: 'Emergency and scheduled pipe repair', displayName: 'Pipe Repair'}
},
price: {currencyCode: 'USD', units: '150'}
}
]
})
};
fetch('https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services', 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.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'serviceItems' => [
[
'freeFormServiceItem' => [
'category' => 'categories/gcid:plumber',
'label' => [
'description' => 'Emergency and scheduled pipe repair',
'displayName' => 'Pipe Repair'
]
],
'price' => [
'currencyCode' => 'USD',
'units' => '150'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services"
payload := strings.NewReader("{\n \"serviceItems\": [\n {\n \"freeFormServiceItem\": {\n \"category\": \"categories/gcid:plumber\",\n \"label\": {\n \"description\": \"Emergency and scheduled pipe repair\",\n \"displayName\": \"Pipe Repair\"\n }\n },\n \"price\": {\n \"currencyCode\": \"USD\",\n \"units\": \"150\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serviceItems\": [\n {\n \"freeFormServiceItem\": {\n \"category\": \"categories/gcid:plumber\",\n \"label\": {\n \"description\": \"Emergency and scheduled pipe repair\",\n \"displayName\": \"Pipe Repair\"\n }\n },\n \"price\": {\n \"currencyCode\": \"USD\",\n \"units\": \"150\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serviceItems\": [\n {\n \"freeFormServiceItem\": {\n \"category\": \"categories/gcid:plumber\",\n \"label\": {\n \"description\": \"Emergency and scheduled pipe repair\",\n \"displayName\": \"Pipe Repair\"\n }\n },\n \"price\": {\n \"currencyCode\": \"USD\",\n \"units\": \"150\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"services": [
{}
],
"success": true
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Google Business Profile
Replace services
Google Business. Acts in public on your connected account; needs social:publish. Audited. Ids are yours: accounts acc_…, profiles prf_…, posts pst_…; every other object id is checked against your accounts before the call.
Replaces the entire service list for a location. Google’s API requires full replacement; individual item updates are not supported. Each service can be structured (using a predefined serviceTypeId) or free-form (custom label).
PUT
https://api.aisa.one
/
apis
/
v1
/
social
/
accounts
/
{accountId}
/
gmb-services
Replace services
curl --request PUT \
--url https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serviceItems": [
{
"freeFormServiceItem": {
"category": "categories/gcid:plumber",
"label": {
"description": "Emergency and scheduled pipe repair",
"displayName": "Pipe Repair"
}
},
"price": {
"currencyCode": "USD",
"units": "150"
}
}
]
}
'import requests
url = "https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services"
payload = { "serviceItems": [
{
"freeFormServiceItem": {
"category": "categories/gcid:plumber",
"label": {
"description": "Emergency and scheduled pipe repair",
"displayName": "Pipe Repair"
}
},
"price": {
"currencyCode": "USD",
"units": "150"
}
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serviceItems: [
{
freeFormServiceItem: {
category: 'categories/gcid:plumber',
label: {description: 'Emergency and scheduled pipe repair', displayName: 'Pipe Repair'}
},
price: {currencyCode: 'USD', units: '150'}
}
]
})
};
fetch('https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services', 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.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'serviceItems' => [
[
'freeFormServiceItem' => [
'category' => 'categories/gcid:plumber',
'label' => [
'description' => 'Emergency and scheduled pipe repair',
'displayName' => 'Pipe Repair'
]
],
'price' => [
'currencyCode' => 'USD',
'units' => '150'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services"
payload := strings.NewReader("{\n \"serviceItems\": [\n {\n \"freeFormServiceItem\": {\n \"category\": \"categories/gcid:plumber\",\n \"label\": {\n \"description\": \"Emergency and scheduled pipe repair\",\n \"displayName\": \"Pipe Repair\"\n }\n },\n \"price\": {\n \"currencyCode\": \"USD\",\n \"units\": \"150\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serviceItems\": [\n {\n \"freeFormServiceItem\": {\n \"category\": \"categories/gcid:plumber\",\n \"label\": {\n \"description\": \"Emergency and scheduled pipe repair\",\n \"displayName\": \"Pipe Repair\"\n }\n },\n \"price\": {\n \"currencyCode\": \"USD\",\n \"units\": \"150\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serviceItems\": [\n {\n \"freeFormServiceItem\": {\n \"category\": \"categories/gcid:plumber\",\n \"label\": {\n \"description\": \"Emergency and scheduled pipe repair\",\n \"displayName\": \"Pipe Repair\"\n }\n },\n \"price\": {\n \"currencyCode\": \"USD\",\n \"units\": \"150\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"services": [
{}
],
"success": true
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: PUT /apis/v1/social/accounts/{accountId}/gmb-services
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/social/accounts/{accountId}/gmb-services - accountId: path; required
- locationId: query; optional
{
"operationId": "put_aisa_social_apis_v1_social_accounts_accountid_a7f18f",
"method": "PUT",
"path": "/apis/v1/social/accounts/{accountId}/gmb-services",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "One of your social accounts (acc_...).",
"in": "path",
"name": "accountId",
"required": true,
"schema": {
"pattern": "^acc_[0-9A-Za-z]{22}$",
"type": "string"
}
},
{
"description": "Override which location to target. If omitted, uses the account's selected location.",
"in": "query",
"name": "locationId",
"required": false,
"schema": {
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"serviceItems": [
{
"freeFormServiceItem": {
"category": "categories/gcid:plumber",
"label": {
"description": "Emergency and scheduled pipe repair",
"displayName": "Pipe Repair"
}
},
"price": {
"currencyCode": "USD",
"units": "150"
}
}
]
},
"schema": {
"properties": {
"serviceItems": {
"items": {
"properties": {
"freeFormServiceItem": {
"properties": {
"category": {
"minLength": 1,
"type": "string"
},
"label": {
"properties": {
"description": {
"type": "string"
},
"displayName": {
"minLength": 1,
"type": "string"
},
"languageCode": {
"type": "string"
}
},
"required": [
"displayName"
],
"type": "object"
}
},
"required": [
"category",
"label"
],
"type": "object"
},
"price": {
"properties": {
"currencyCode": {
"minLength": 1,
"type": "string"
},
"nanos": {
"type": "integer"
},
"units": {
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"structuredServiceItem": {
"description": "Exactly one of structuredServiceItem or freeFormServiceItem is required per item (enforced server-side; not modeled as oneOf because required-only oneOf branches break SDK generators).",
"properties": {
"description": {
"type": "string"
},
"serviceTypeId": {
"minLength": 1,
"type": "string"
}
},
"required": [
"serviceTypeId"
],
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
},
"required": [
"serviceItems"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}