Replace business information
curl --request PUT \
--url https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method": "example",
"return_policy": "example"
}
'import requests
url = "https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information"
payload = {
"payment_method": "example",
"return_policy": "example"
}
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({payment_method: 'example', return_policy: 'example'})
};
fetch('https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information', 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/messaging/business-agent/business-information",
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([
'payment_method' => 'example',
'return_policy' => 'example'
]),
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/messaging/business-agent/business-information"
payload := strings.NewReader("{\n \"payment_method\": \"example\",\n \"return_policy\": \"example\"\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/messaging/business-agent/business-information")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": \"example\",\n \"return_policy\": \"example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information")
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 \"payment_method\": \"example\",\n \"return_policy\": \"example\"\n}"
response = http.request(request)
puts response.read_body{
"business_description": "<string>",
"contact_info": {
"address": "<string>",
"email": "<string>",
"hours_of_operation": "<string>"
},
"delivery_and_shipping": "<string>",
"payment_method": "<string>",
"purchase_info": "<string>",
"return_policy": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}AIsa Messaging
Replace business information
Business Agent. Full replacement: every field you send overwrites the stored value; fields you omit are cleared.
A write: needs messaging:write and is audited.
PUT
https://api.aisa.one
/
apis
/
v1
/
social
/
messaging
/
business-agent
/
business-information
Replace business information
curl --request PUT \
--url https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payment_method": "example",
"return_policy": "example"
}
'import requests
url = "https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information"
payload = {
"payment_method": "example",
"return_policy": "example"
}
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({payment_method: 'example', return_policy: 'example'})
};
fetch('https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information', 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/messaging/business-agent/business-information",
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([
'payment_method' => 'example',
'return_policy' => 'example'
]),
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/messaging/business-agent/business-information"
payload := strings.NewReader("{\n \"payment_method\": \"example\",\n \"return_policy\": \"example\"\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/messaging/business-agent/business-information")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"payment_method\": \"example\",\n \"return_policy\": \"example\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information")
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 \"payment_method\": \"example\",\n \"return_policy\": \"example\"\n}"
response = http.request(request)
puts response.read_body{
"business_description": "<string>",
"contact_info": {
"address": "<string>",
"email": "<string>",
"hours_of_operation": "<string>"
},
"delivery_and_shipping": "<string>",
"payment_method": "<string>",
"purchase_info": "<string>",
"return_policy": "<string>"
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "<string>",
"retryable": true,
"type": "<string>"
}
}Request contract
- Method and path: PUT /apis/v1/social/messaging/business-agent/business-information
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/social/messaging/business-agent/business-information - connectionId: query; required
{
"operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
"method": "PUT",
"path": "/apis/v1/social/messaging/business-agent/business-information",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
"in": "query",
"name": "connectionId",
"required": true,
"schema": {
"pattern": "^msc_[0-9A-Za-z]+$",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"payment_method": "example",
"return_policy": "example"
},
"schema": {
"additionalProperties": false,
"description": "Free-text facts the agent answers from; PUT replaces the whole object.",
"properties": {
"business_description": {
"type": "string"
},
"connectionId": {
"description": "The connection, when not sent as the connectionId query parameter.",
"pattern": "^msc_[0-9A-Za-z]+$",
"type": "string"
},
"contact_info": {
"properties": {
"address": {
"type": "string"
},
"email": {
"type": "string"
},
"hours_of_operation": {
"type": "string"
}
},
"type": [
"object",
"null"
]
},
"delivery_and_shipping": {
"type": "string"
},
"payment_method": {
"type": "string"
},
"purchase_info": {
"type": "string"
},
"return_policy": {
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
No additional charge for this operation.Authorizations
Query Parameters
Body
application/json
Free-text facts the agent answers from; PUT replaces the whole object.