Update a saved view
curl --request PATCH \
--url https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId}",
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([
]),
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;
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"visibility": "private",
"state": {
"question": {
"search": "<string>",
"filter": {
"items": [
{
"field": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"logic": "and"
},
"sort": {
"field": "<string>",
"direction": "asc"
}
},
"columns": [
"<string>"
],
"hide": [
"<string>"
]
},
"mine": true,
"default": true
}{
"type": "<string>",
"status": 123,
"code": "core.view_not_found",
"requestId": "<string>",
"title": "<string>",
"params": {},
"errors": [
{
"location": "<string>",
"pointer": "<string>",
"code": "<string>",
"params": {}
}
]
}Saved views
Update a saved view
Changes a saved view of yours: renames it, shares it with the organization or makes it private again (which takes it off the others’ default), or saves over the search, filters, order and columns it keeps.
PATCH
/
api
/
v1
/
orgs
/
{orgId}
/
core
/
views
/
{viewId}
Update a saved view
curl --request PATCH \
--url https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId}",
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([
]),
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;
}const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.readyforcommerce.com/api/v1/orgs/{orgId}/core/views/{viewId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"visibility": "private",
"state": {
"question": {
"search": "<string>",
"filter": {
"items": [
{
"field": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"logic": "and"
},
"sort": {
"field": "<string>",
"direction": "asc"
}
},
"columns": [
"<string>"
],
"hide": [
"<string>"
]
},
"mine": true,
"default": true
}{
"type": "<string>",
"status": 123,
"code": "core.view_not_found",
"requestId": "<string>",
"title": "<string>",
"params": {},
"errors": [
{
"location": "<string>",
"pointer": "<string>",
"code": "<string>",
"params": {}
}
]
}Authorizations
Body
application/json
Was this page helpful?