curl --request POST \
--url https://api.salesive.com/api/v1/digital-products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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": "66a2a0aae1b3a40012cd0001",
"access": "both",
"pricing": {
"oneTime": 4500,
"monthly": 1500
},
"inPass": true,
"preview": {
"enabled": true,
"pages": 5
}
}
'import requests
url = "https://api.salesive.com/api/v1/digital-products"
payload = {
"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": "66a2a0aae1b3a40012cd0001",
"access": "both",
"pricing": {
"oneTime": 4500,
"monthly": 1500
},
"inPass": True,
"preview": {
"enabled": True,
"pages": 5
}
}
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({
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: '66a2a0aae1b3a40012cd0001',
access: 'both',
pricing: {oneTime: 4500, monthly: 1500},
inPass: true,
preview: {enabled: true, pages: 5}
})
};
fetch('https://api.salesive.com/api/v1/digital-products', 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",
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([
'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' => '66a2a0aae1b3a40012cd0001',
'access' => 'both',
'pricing' => [
'oneTime' => 4500,
'monthly' => 1500
],
'inPass' => true,
'preview' => [
'enabled' => true,
'pages' => 5
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"The Lagos Cookbook\",\n \"description\": \"120 everyday Nigerian recipes, with a shopping list for each week.\",\n \"author\": \"Ngozi Okafor\",\n \"images\": [\n \"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg\"\n ],\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"access\": \"both\",\n \"pricing\": {\n \"oneTime\": 4500,\n \"monthly\": 1500\n },\n \"inPass\": true,\n \"preview\": {\n \"enabled\": true,\n \"pages\": 5\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.salesive.com/api/v1/digital-products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"The Lagos Cookbook\",\n \"description\": \"120 everyday Nigerian recipes, with a shopping list for each week.\",\n \"author\": \"Ngozi Okafor\",\n \"images\": [\n \"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg\"\n ],\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"access\": \"both\",\n \"pricing\": {\n \"oneTime\": 4500,\n \"monthly\": 1500\n },\n \"inPass\": true,\n \"preview\": {\n \"enabled\": true,\n \"pages\": 5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-products")
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 \"name\": \"The Lagos Cookbook\",\n \"description\": \"120 everyday Nigerian recipes, with a shopping list for each week.\",\n \"author\": \"Ngozi Okafor\",\n \"images\": [\n \"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg\"\n ],\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"access\": \"both\",\n \"pricing\": {\n \"oneTime\": 4500,\n \"monthly\": 1500\n },\n \"inPass\": true,\n \"preview\": {\n \"enabled\": true,\n \"pages\": 5\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Digital product created 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": 4500,
"monthly": 1500
},
"price": 1500,
"inPass": true,
"file": {
"name": "",
"size": 0,
"format": null,
"mimetype": "",
"attached": false
},
"preview": {
"enabled": true,
"pages": 3
},
"listed": false,
"featured": false,
"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": {}
}Create a digital product
Creates a digital product in a digital store. Apps cannot attach the private file, so the product is saved unlisted.
curl --request POST \
--url https://api.salesive.com/api/v1/digital-products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"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": "66a2a0aae1b3a40012cd0001",
"access": "both",
"pricing": {
"oneTime": 4500,
"monthly": 1500
},
"inPass": true,
"preview": {
"enabled": true,
"pages": 5
}
}
'import requests
url = "https://api.salesive.com/api/v1/digital-products"
payload = {
"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": "66a2a0aae1b3a40012cd0001",
"access": "both",
"pricing": {
"oneTime": 4500,
"monthly": 1500
},
"inPass": True,
"preview": {
"enabled": True,
"pages": 5
}
}
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({
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: '66a2a0aae1b3a40012cd0001',
access: 'both',
pricing: {oneTime: 4500, monthly: 1500},
inPass: true,
preview: {enabled: true, pages: 5}
})
};
fetch('https://api.salesive.com/api/v1/digital-products', 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",
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([
'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' => '66a2a0aae1b3a40012cd0001',
'access' => 'both',
'pricing' => [
'oneTime' => 4500,
'monthly' => 1500
],
'inPass' => true,
'preview' => [
'enabled' => true,
'pages' => 5
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"The Lagos Cookbook\",\n \"description\": \"120 everyday Nigerian recipes, with a shopping list for each week.\",\n \"author\": \"Ngozi Okafor\",\n \"images\": [\n \"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg\"\n ],\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"access\": \"both\",\n \"pricing\": {\n \"oneTime\": 4500,\n \"monthly\": 1500\n },\n \"inPass\": true,\n \"preview\": {\n \"enabled\": true,\n \"pages\": 5\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.salesive.com/api/v1/digital-products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"The Lagos Cookbook\",\n \"description\": \"120 everyday Nigerian recipes, with a shopping list for each week.\",\n \"author\": \"Ngozi Okafor\",\n \"images\": [\n \"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg\"\n ],\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"access\": \"both\",\n \"pricing\": {\n \"oneTime\": 4500,\n \"monthly\": 1500\n },\n \"inPass\": true,\n \"preview\": {\n \"enabled\": true,\n \"pages\": 5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-products")
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 \"name\": \"The Lagos Cookbook\",\n \"description\": \"120 everyday Nigerian recipes, with a shopping list for each week.\",\n \"author\": \"Ngozi Okafor\",\n \"images\": [\n \"https://cdn.salesive.com/d/lagos-cookbook-cover.jpg\"\n ],\n \"category\": \"66a2a0aae1b3a40012cd0001\",\n \"access\": \"both\",\n \"pricing\": {\n \"oneTime\": 4500,\n \"monthly\": 1500\n },\n \"inPass\": true,\n \"preview\": {\n \"enabled\": true,\n \"pages\": 5\n }\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"success": true,
"message": "Digital product created 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": 4500,
"monthly": 1500
},
"price": 1500,
"inPass": true,
"file": {
"name": "",
"size": 0,
"format": null,
"mimetype": "",
"attached": false
},
"preview": {
"enabled": true,
"pages": 3
},
"listed": false,
"featured": false,
"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": {}
}shop, price, file and deleted are set by the server; any such keys in the body are dropped. Requires the WRITE_INVENTORY scope.
Free preview. preview: { enabled, pages } controls the free sample of a PDF book (default { enabled: true, pages: 3 }, 1 to 20 pages, never more than half of the book). Out-of-range values return 400. Send only the key you change on an update: { "preview": { "pages": 5 } } keeps the switch as it was.
Pricing rules. access: "purchase" needs pricing.oneTime, access: "subscription" needs pricing.monthly, and access: "both" needs both. A needed price must be above 0. price in the response is derived: the cheapest way in.
listed: false, and asking to list it returns 400 (Upload a file before listing this product) until the merchant attaches a file from the Digital page of the dashboard. Use this endpoint to prepare listings, not to publish them.digital. On any other store they return 403 with This is only available on digital stores. See Digital stores.curl -X POST https://api.salesive.com/api/v1/digital-products \
-H "Authorization: Bearer app_<your-app-access-token>" \
-H "Content-Type: application/json" \
-d '{"name":"The Lagos Cookbook","author":"Ngozi Okafor","access":"both","pricing":{"oneTime":4500,"monthly":1500},"inPass":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.
Body
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
Create a digital product: success.
201
true
"Digital product created 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": 4500, "monthly": 1500 },
"price": 1500,
"inPass": true,
"file": {
"name": "",
"size": 0,
"format": null,
"mimetype": "",
"attached": false
},
"preview": { "enabled": true, "pages": 3 },
"listed": false,
"featured": false,
"createdAt": "2026-10-11T09:12:00.000Z",
"updatedAt": "2026-10-11T09:30:00.000Z"
}
Was this page helpful?

