Bulk Restore Content
curl --request POST \
--url 'https://api.proposales.com/v3/content?action=restore' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variation_ids": [
123
],
"product_ids": [
123
]
}
'import requests
url = "https://api.proposales.com/v3/content?action=restore"
payload = {
"variation_ids": [123],
"product_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({variation_ids: [123], product_ids: [123]})
};
fetch('https://api.proposales.com/v3/content?action=restore', 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.proposales.com/v3/content?action=restore",
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([
'variation_ids' => [
123
],
'product_ids' => [
123
]
]),
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.proposales.com/v3/content?action=restore"
payload := strings.NewReader("{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.proposales.com/v3/content?action=restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proposales.com/v3/content?action=restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"restored_count": 123,
"product_ids": [
123
],
"message": "<string>"
}
}Content
Bulk Restore Content
Restore multiple archived content items at once.
POST
/
v3
/
content?action=restore
Bulk Restore Content
curl --request POST \
--url 'https://api.proposales.com/v3/content?action=restore' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"variation_ids": [
123
],
"product_ids": [
123
]
}
'import requests
url = "https://api.proposales.com/v3/content?action=restore"
payload = {
"variation_ids": [123],
"product_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({variation_ids: [123], product_ids: [123]})
};
fetch('https://api.proposales.com/v3/content?action=restore', 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.proposales.com/v3/content?action=restore",
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([
'variation_ids' => [
123
],
'product_ids' => [
123
]
]),
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.proposales.com/v3/content?action=restore"
payload := strings.NewReader("{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.proposales.com/v3/content?action=restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.proposales.com/v3/content?action=restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"restored_count": 123,
"product_ids": [
123
],
"message": "<string>"
}
}Use this endpoint to restore multiple archived content items in a single request. Restoring archived content makes them visible again in the content library and allows them to be added to proposals.
Note: This operation is idempotent. You can safely call it on already-active products without errors, and only products that are currently archived will be updated.
Or alternatively:
To archive content items, use the Bulk Archive Content endpoint.
Request Body
number[]
An array of variation IDs to restore. Either this or product_ids must be provided.
number[]
An array of product IDs to restore. Either this or variation_ids must be provided.
This is often more convenient when you have product IDs rather than variation IDs.
{
"variation_ids": [123, 456, 789]
}
{
"product_ids": [123, 456, 789]
}
Response
object
{
"data": {
"restored_count": 3,
"product_ids": [123, 456, 789],
"message": "Products restored successfully"
}
}
⌘I