curl --request PUT \
--url https://api.salesive.com/api/v1/digital-products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pricing": {
"oneTime": 5000
},
"featured": true
}
'import requests
url = "https://api.salesive.com/api/v1/digital-products/{id}"
payload = {
"pricing": { "oneTime": 5000 },
"featured": True
}
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({pricing: {oneTime: 5000}, featured: true})
};
fetch('https://api.salesive.com/api/v1/digital-products/{id}', 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.salesive.com/api/v1/digital-products/{id}",
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([
'pricing' => [
'oneTime' => 5000
],
'featured' => true
]),
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.salesive.com/api/v1/digital-products/{id}"
payload := strings.NewReader("{\n \"pricing\": {\n \"oneTime\": 5000\n },\n \"featured\": true\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.salesive.com/api/v1/digital-products/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pricing\": {\n \"oneTime\": 5000\n },\n \"featured\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-products/{id}")
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 \"pricing\": {\n \"oneTime\": 5000\n },\n \"featured\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Digital product updated successfully",
"data": {
"_id": "6702c1a4e1b3a40012cd2001",
"shop": "66a1eee0e1b3a40012ab0001",
"name": "The Lagos Cookbook",
"description": "120 everyday Nigerian recipes, with a shopping list for each week.",
"author": "Ngozi Okafor",
"images": [
"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg"
],
"category": {
"_id": "66a2a0aae1b3a40012cd0001",
"name": "Cookbooks",
"slug": "cookbooks"
},
"access": "both",
"pricing": {
"oneTime": 5000,
"monthly": 1500
},
"price": 1500,
"inPass": true,
"file": {
"name": "lagos-cookbook.pdf",
"size": 8421376,
"format": "pdf",
"mimetype": "application/pdf",
"attached": true
},
"preview": {
"enabled": true,
"pages": 3
},
"listed": true,
"featured": true,
"createdAt": "2026-10-11T09:12:00.000Z",
"updatedAt": "2026-10-11T09:30:00.000Z"
}
}{
"status": 400,
"success": false,
"message": "A one-time price is required",
"data": {}
}{
"status": 401,
"success": false,
"message": "App token expired or invalid.",
"data": {}
}{
"status": 403,
"success": false,
"message": "This app is missing the required permission(s): WRITE_INVENTORY",
"data": {}
}{
"status": 404,
"success": false,
"message": "Product not found",
"data": {}
}{
"status": 409,
"success": false,
"message": "That file is already attached to another product",
"data": {}
}Update a digital product
Partially updates a digital product. PATCH on the same path behaves identically.
curl --request PUT \
--url https://api.salesive.com/api/v1/digital-products/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pricing": {
"oneTime": 5000
},
"featured": true
}
'import requests
url = "https://api.salesive.com/api/v1/digital-products/{id}"
payload = {
"pricing": { "oneTime": 5000 },
"featured": True
}
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({pricing: {oneTime: 5000}, featured: true})
};
fetch('https://api.salesive.com/api/v1/digital-products/{id}', 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.salesive.com/api/v1/digital-products/{id}",
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([
'pricing' => [
'oneTime' => 5000
],
'featured' => true
]),
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.salesive.com/api/v1/digital-products/{id}"
payload := strings.NewReader("{\n \"pricing\": {\n \"oneTime\": 5000\n },\n \"featured\": true\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.salesive.com/api/v1/digital-products/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pricing\": {\n \"oneTime\": 5000\n },\n \"featured\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-products/{id}")
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 \"pricing\": {\n \"oneTime\": 5000\n },\n \"featured\": true\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Digital product updated successfully",
"data": {
"_id": "6702c1a4e1b3a40012cd2001",
"shop": "66a1eee0e1b3a40012ab0001",
"name": "The Lagos Cookbook",
"description": "120 everyday Nigerian recipes, with a shopping list for each week.",
"author": "Ngozi Okafor",
"images": [
"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg"
],
"category": {
"_id": "66a2a0aae1b3a40012cd0001",
"name": "Cookbooks",
"slug": "cookbooks"
},
"access": "both",
"pricing": {
"oneTime": 5000,
"monthly": 1500
},
"price": 1500,
"inPass": true,
"file": {
"name": "lagos-cookbook.pdf",
"size": 8421376,
"format": "pdf",
"mimetype": "application/pdf",
"attached": true
},
"preview": {
"enabled": true,
"pages": 3
},
"listed": true,
"featured": true,
"createdAt": "2026-10-11T09:12:00.000Z",
"updatedAt": "2026-10-11T09:30:00.000Z"
}
}{
"status": 400,
"success": false,
"message": "A one-time price is required",
"data": {}
}{
"status": 401,
"success": false,
"message": "App token expired or invalid.",
"data": {}
}{
"status": 403,
"success": false,
"message": "This app is missing the required permission(s): WRITE_INVENTORY",
"data": {}
}{
"status": 404,
"success": false,
"message": "Product not found",
"data": {}
}{
"status": 409,
"success": false,
"message": "That file is already attached to another product",
"data": {}
}PATCH /digital-products/{id} accepts the same body and behaves identically. Requires the WRITE_INVENTORY scope.
The pricing rules are re-checked on the merged product, so changing access to both also needs both prices. A price for a way of buying the product no longer offers is discarded.
fileId replaces the attached file and deletes the previous one from storage. An app cannot obtain a fileId (see Create a digital product), so apps normally leave it out.digital. On any other store they return 403 with This is only available on digital stores. See Digital stores.curl -X PUT https://api.salesive.com/api/v1/digital-products/6702c1a4e1b3a40012cd2001 \
-H "Authorization: Bearer app_<your-app-access-token>" \
-H "Content-Type: application/json" \
-d '{"pricing":{"oneTime":5000},"featured":true}'
Authorizations
Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side , never send a shop id.
Path Parameters
The digital product's ObjectId.
Body
Any subset of the create fields. At least one is required. The pricing rules are re-checked on the merged product.
Product name (required, max 120 characters).
Description (max 10,000 characters).
Author or publisher (max 120 characters).
Cover image links (http or https, max 10).
Category ObjectId, which must belong to this store. null or an empty string clears it.
How buyers get the product. Default purchase.
purchase, subscription, both Prices in the store currency. A price for a way of buying that access does not offer is discarded.
Show child attributes
Show child attributes
Include the product in the store's all-access pass.
The free preview of a PDF book: the first pages pages, cut on demand. A product with no stored preview setting reads as { enabled: true, pages: 3 }.
Show child attributes
Show child attributes
Id of a private file already uploaded to the store's file storage. See the note on this page: an app cannot upload that file itself.
Show the product in the storefront. A product with no file is saved unlisted, and asking to list it returns 400.
Response
Update a digital product: success.
200
true
"Digital product updated successfully"
Show child attributes
Show child attributes
{
"_id": "6702c1a4e1b3a40012cd2001",
"shop": "66a1eee0e1b3a40012ab0001",
"name": "The Lagos Cookbook",
"description": "120 everyday Nigerian recipes, with a shopping list for each week.",
"author": "Ngozi Okafor",
"images": [
"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg"
],
"category": {
"_id": "66a2a0aae1b3a40012cd0001",
"name": "Cookbooks",
"slug": "cookbooks"
},
"access": "both",
"pricing": { "oneTime": 5000, "monthly": 1500 },
"price": 1500,
"inPass": true,
"file": {
"name": "lagos-cookbook.pdf",
"size": 8421376,
"format": "pdf",
"mimetype": "application/pdf",
"attached": true
},
"preview": { "enabled": true, "pages": 3 },
"listed": true,
"featured": true,
"createdAt": "2026-10-11T09:12:00.000Z",
"updatedAt": "2026-10-11T09:30:00.000Z"
}
Was this page helpful?

