Update the facts sheet: a key that is present replaces its section, a key that is absent is kept
curl --request PATCH \
--url https://api.nextintent.ai/v1/sdk/{id}/facts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"free_shipping_threshold": 123,
"shipping_flat": 123,
"shipping_zones": [
{
"countries": [
"<string>"
],
"rest_of_world": true,
"free_shipping_threshold": 123,
"shipping_flat": 123
}
],
"return_days": 123,
"delivery_promise": "<string>",
"size_notes": [
{
"handle": "<string>",
"text": "<string>",
"url": "<string>"
}
],
"links": {},
"codes": [
{
"label": "<string>",
"percent": 123,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"first_order_only": true
}
],
"discounts_allowed": true,
"popup": {}
}
'import requests
url = "https://api.nextintent.ai/v1/sdk/{id}/facts"
payload = {
"currency": "<string>",
"free_shipping_threshold": 123,
"shipping_flat": 123,
"shipping_zones": [
{
"countries": ["<string>"],
"rest_of_world": True,
"free_shipping_threshold": 123,
"shipping_flat": 123
}
],
"return_days": 123,
"delivery_promise": "<string>",
"size_notes": [
{
"handle": "<string>",
"text": "<string>",
"url": "<string>"
}
],
"links": {},
"codes": [
{
"label": "<string>",
"percent": 123,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"first_order_only": True
}
],
"discounts_allowed": True,
"popup": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: '<string>',
free_shipping_threshold: 123,
shipping_flat: 123,
shipping_zones: [
{
countries: ['<string>'],
rest_of_world: true,
free_shipping_threshold: 123,
shipping_flat: 123
}
],
return_days: 123,
delivery_promise: '<string>',
size_notes: [{handle: '<string>', text: '<string>', url: '<string>'}],
links: {},
codes: [
{
label: '<string>',
percent: 123,
starts_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
first_order_only: true
}
],
discounts_allowed: true,
popup: {}
})
};
fetch('https://api.nextintent.ai/v1/sdk/{id}/facts', 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.nextintent.ai/v1/sdk/{id}/facts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'currency' => '<string>',
'free_shipping_threshold' => 123,
'shipping_flat' => 123,
'shipping_zones' => [
[
'countries' => [
'<string>'
],
'rest_of_world' => true,
'free_shipping_threshold' => 123,
'shipping_flat' => 123
]
],
'return_days' => 123,
'delivery_promise' => '<string>',
'size_notes' => [
[
'handle' => '<string>',
'text' => '<string>',
'url' => '<string>'
]
],
'links' => [
],
'codes' => [
[
'label' => '<string>',
'percent' => 123,
'starts_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'first_order_only' => true
]
],
'discounts_allowed' => true,
'popup' => [
]
]),
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.nextintent.ai/v1/sdk/{id}/facts"
payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123,\n \"shipping_zones\": [\n {\n \"countries\": [\n \"<string>\"\n ],\n \"rest_of_world\": true,\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123\n }\n ],\n \"return_days\": 123,\n \"delivery_promise\": \"<string>\",\n \"size_notes\": [\n {\n \"handle\": \"<string>\",\n \"text\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"links\": {},\n \"codes\": [\n {\n \"label\": \"<string>\",\n \"percent\": 123,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"first_order_only\": true\n }\n ],\n \"discounts_allowed\": true,\n \"popup\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.nextintent.ai/v1/sdk/{id}/facts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123,\n \"shipping_zones\": [\n {\n \"countries\": [\n \"<string>\"\n ],\n \"rest_of_world\": true,\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123\n }\n ],\n \"return_days\": 123,\n \"delivery_promise\": \"<string>\",\n \"size_notes\": [\n {\n \"handle\": \"<string>\",\n \"text\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"links\": {},\n \"codes\": [\n {\n \"label\": \"<string>\",\n \"percent\": 123,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"first_order_only\": true\n }\n ],\n \"discounts_allowed\": true,\n \"popup\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextintent.ai/v1/sdk/{id}/facts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123,\n \"shipping_zones\": [\n {\n \"countries\": [\n \"<string>\"\n ],\n \"rest_of_world\": true,\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123\n }\n ],\n \"return_days\": 123,\n \"delivery_promise\": \"<string>\",\n \"size_notes\": [\n {\n \"handle\": \"<string>\",\n \"text\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"links\": {},\n \"codes\": [\n {\n \"label\": \"<string>\",\n \"percent\": 123,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"first_order_only\": true\n }\n ],\n \"discounts_allowed\": true,\n \"popup\": {}\n}"
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"free_shipping_threshold": 123,
"shipping_flat": 123,
"shipping_zones": [
{
"countries": [
"<string>"
],
"rest_of_world": true,
"free_shipping_threshold": 123,
"shipping_flat": 123
}
],
"return_days": 123,
"delivery_promise": "<string>",
"size_notes": [
{
"handle": "<string>",
"text": "<string>",
"url": "<string>"
}
],
"links": {},
"codes": [
{
"label": "<string>",
"percent": 123,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"first_order_only": true
}
],
"discounts_allowed": true,
"output": "card",
"popup": {}
}{
"error": "<string>"
}{
"error": "<string>"
}Facts
Update the facts sheet
Update the facts sheet. A key that is present replaces its section; a key that is absent is kept.
PATCH
/
sdk
/
{id}
/
facts
Update the facts sheet: a key that is present replaces its section, a key that is absent is kept
curl --request PATCH \
--url https://api.nextintent.ai/v1/sdk/{id}/facts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"currency": "<string>",
"free_shipping_threshold": 123,
"shipping_flat": 123,
"shipping_zones": [
{
"countries": [
"<string>"
],
"rest_of_world": true,
"free_shipping_threshold": 123,
"shipping_flat": 123
}
],
"return_days": 123,
"delivery_promise": "<string>",
"size_notes": [
{
"handle": "<string>",
"text": "<string>",
"url": "<string>"
}
],
"links": {},
"codes": [
{
"label": "<string>",
"percent": 123,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"first_order_only": true
}
],
"discounts_allowed": true,
"popup": {}
}
'import requests
url = "https://api.nextintent.ai/v1/sdk/{id}/facts"
payload = {
"currency": "<string>",
"free_shipping_threshold": 123,
"shipping_flat": 123,
"shipping_zones": [
{
"countries": ["<string>"],
"rest_of_world": True,
"free_shipping_threshold": 123,
"shipping_flat": 123
}
],
"return_days": 123,
"delivery_promise": "<string>",
"size_notes": [
{
"handle": "<string>",
"text": "<string>",
"url": "<string>"
}
],
"links": {},
"codes": [
{
"label": "<string>",
"percent": 123,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"first_order_only": True
}
],
"discounts_allowed": True,
"popup": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: '<string>',
free_shipping_threshold: 123,
shipping_flat: 123,
shipping_zones: [
{
countries: ['<string>'],
rest_of_world: true,
free_shipping_threshold: 123,
shipping_flat: 123
}
],
return_days: 123,
delivery_promise: '<string>',
size_notes: [{handle: '<string>', text: '<string>', url: '<string>'}],
links: {},
codes: [
{
label: '<string>',
percent: 123,
starts_at: '2023-11-07T05:31:56Z',
expires_at: '2023-11-07T05:31:56Z',
first_order_only: true
}
],
discounts_allowed: true,
popup: {}
})
};
fetch('https://api.nextintent.ai/v1/sdk/{id}/facts', 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.nextintent.ai/v1/sdk/{id}/facts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'currency' => '<string>',
'free_shipping_threshold' => 123,
'shipping_flat' => 123,
'shipping_zones' => [
[
'countries' => [
'<string>'
],
'rest_of_world' => true,
'free_shipping_threshold' => 123,
'shipping_flat' => 123
]
],
'return_days' => 123,
'delivery_promise' => '<string>',
'size_notes' => [
[
'handle' => '<string>',
'text' => '<string>',
'url' => '<string>'
]
],
'links' => [
],
'codes' => [
[
'label' => '<string>',
'percent' => 123,
'starts_at' => '2023-11-07T05:31:56Z',
'expires_at' => '2023-11-07T05:31:56Z',
'first_order_only' => true
]
],
'discounts_allowed' => true,
'popup' => [
]
]),
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.nextintent.ai/v1/sdk/{id}/facts"
payload := strings.NewReader("{\n \"currency\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123,\n \"shipping_zones\": [\n {\n \"countries\": [\n \"<string>\"\n ],\n \"rest_of_world\": true,\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123\n }\n ],\n \"return_days\": 123,\n \"delivery_promise\": \"<string>\",\n \"size_notes\": [\n {\n \"handle\": \"<string>\",\n \"text\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"links\": {},\n \"codes\": [\n {\n \"label\": \"<string>\",\n \"percent\": 123,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"first_order_only\": true\n }\n ],\n \"discounts_allowed\": true,\n \"popup\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.nextintent.ai/v1/sdk/{id}/facts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123,\n \"shipping_zones\": [\n {\n \"countries\": [\n \"<string>\"\n ],\n \"rest_of_world\": true,\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123\n }\n ],\n \"return_days\": 123,\n \"delivery_promise\": \"<string>\",\n \"size_notes\": [\n {\n \"handle\": \"<string>\",\n \"text\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"links\": {},\n \"codes\": [\n {\n \"label\": \"<string>\",\n \"percent\": 123,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"first_order_only\": true\n }\n ],\n \"discounts_allowed\": true,\n \"popup\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextintent.ai/v1/sdk/{id}/facts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123,\n \"shipping_zones\": [\n {\n \"countries\": [\n \"<string>\"\n ],\n \"rest_of_world\": true,\n \"free_shipping_threshold\": 123,\n \"shipping_flat\": 123\n }\n ],\n \"return_days\": 123,\n \"delivery_promise\": \"<string>\",\n \"size_notes\": [\n {\n \"handle\": \"<string>\",\n \"text\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"links\": {},\n \"codes\": [\n {\n \"label\": \"<string>\",\n \"percent\": 123,\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"first_order_only\": true\n }\n ],\n \"discounts_allowed\": true,\n \"popup\": {}\n}"
response = http.request(request)
puts response.read_body{
"currency": "<string>",
"free_shipping_threshold": 123,
"shipping_flat": 123,
"shipping_zones": [
{
"countries": [
"<string>"
],
"rest_of_world": true,
"free_shipping_threshold": 123,
"shipping_flat": 123
}
],
"return_days": 123,
"delivery_promise": "<string>",
"size_notes": [
{
"handle": "<string>",
"text": "<string>",
"url": "<string>"
}
],
"links": {},
"codes": [
{
"label": "<string>",
"percent": 123,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"first_order_only": true
}
],
"discounts_allowed": true,
"output": "card",
"popup": {}
}{
"error": "<string>"
}{
"error": "<string>"
}A key that is present in the body replaces that section of the sheet in full. A key that is absent is left as it was. So
{ "codes": [...] } rewrites the codes and touches nothing else, and to clear a section you send it empty ("codes": [] or "delivery_promise": null). Keys outside the sheet’s field list are ignored.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The website id
Body
application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
card, popup, event, none Response
Facts
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
card, popup, event, none 