Bulk Archive Content
curl --request DELETE \
--url 'https://api.proposales.com/v3/content?action=bulk' \
--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=bulk"
payload = {
"variation_ids": [123],
"product_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
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=bulk', 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=bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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=bulk"
payload := strings.NewReader("{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.proposales.com/v3/content?action=bulk")
.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=bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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": {
"archived_count": 123,
"product_ids": [
123
],
"message": "<string>"
}
}Content
Bulk Archive Content
Archive multiple content items at once.
DELETE
/
v3
/
content?action=bulk
Bulk Archive Content
curl --request DELETE \
--url 'https://api.proposales.com/v3/content?action=bulk' \
--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=bulk"
payload = {
"variation_ids": [123],
"product_ids": [123]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
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=bulk', 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=bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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=bulk"
payload := strings.NewReader("{\n \"variation_ids\": [\n 123\n ],\n \"product_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.proposales.com/v3/content?action=bulk")
.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=bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.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": {
"archived_count": 123,
"product_ids": [
123
],
"message": "<string>"
}
}Use this endpoint to archive multiple content items in a single request. Archived content is not actually deleted from the database, but is hidden from most views and cannot be added to proposals.
Note: This operation is idempotent. You can safely call it on already-archived products without errors, and only products that aren’t already archived will be updated.
Or alternatively:
To view archived content items, use the List Content endpoint with the
Request Body
number[]
An array of variation IDs to archive. Either this or product_ids must be provided.
number[]
An array of product IDs to archive. 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": {
"archived_count": 3,
"product_ids": [123, 456, 789],
"message": "Products archived successfully"
}
}
include_archived=true query parameter.
To restore archived content items, use the Bulk Restore Content endpoint.⌘I