Extend buyer access
curl --request POST \
--url https://api.salesive.com/api/v1/digital-access/{id}/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"days": 14,
"grantId": "6702f0b2e1b3a40012cd5002"
}
'import requests
url = "https://api.salesive.com/api/v1/digital-access/{id}/extend"
payload = {
"days": 14,
"grantId": "6702f0b2e1b3a40012cd5002"
}
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({days: 14, grantId: '6702f0b2e1b3a40012cd5002'})
};
fetch('https://api.salesive.com/api/v1/digital-access/{id}/extend', 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-access/{id}/extend",
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([
'days' => 14,
'grantId' => '6702f0b2e1b3a40012cd5002'
]),
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-access/{id}/extend"
payload := strings.NewReader("{\n \"days\": 14,\n \"grantId\": \"6702f0b2e1b3a40012cd5002\"\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-access/{id}/extend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 14,\n \"grantId\": \"6702f0b2e1b3a40012cd5002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-access/{id}/extend")
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 \"days\": 14,\n \"grantId\": \"6702f0b2e1b3a40012cd5002\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Access extended",
"data": {
"_id": "6702d3f0e1b3a40012cd3001",
"email": "ada@example.com",
"user": "66f0aa11e1b3a40012ef0001",
"scope": "product",
"product": {
"_id": "6702c1a4e1b3a40012cd2001",
"name": "The Lagos Cookbook"
},
"kind": "pass",
"status": "active",
"source": "granted",
"startsAt": "2026-10-12T08:00:00.000Z",
"accessUntil": "2026-11-25T08:00:00.000Z",
"daysLeft": 44,
"autoRenew": {
"enabled": false,
"cardLast4": null,
"cardBrand": null
},
"revokedAt": null,
"revokedReason": "",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00: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": {}
}Digital access
Extend buyer access
Adds days to a buyer’s pass.
POST
/
digital-access
/
{id}
/
extend
Extend buyer access
curl --request POST \
--url https://api.salesive.com/api/v1/digital-access/{id}/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"days": 14,
"grantId": "6702f0b2e1b3a40012cd5002"
}
'import requests
url = "https://api.salesive.com/api/v1/digital-access/{id}/extend"
payload = {
"days": 14,
"grantId": "6702f0b2e1b3a40012cd5002"
}
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({days: 14, grantId: '6702f0b2e1b3a40012cd5002'})
};
fetch('https://api.salesive.com/api/v1/digital-access/{id}/extend', 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-access/{id}/extend",
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([
'days' => 14,
'grantId' => '6702f0b2e1b3a40012cd5002'
]),
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-access/{id}/extend"
payload := strings.NewReader("{\n \"days\": 14,\n \"grantId\": \"6702f0b2e1b3a40012cd5002\"\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-access/{id}/extend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 14,\n \"grantId\": \"6702f0b2e1b3a40012cd5002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salesive.com/api/v1/digital-access/{id}/extend")
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 \"days\": 14,\n \"grantId\": \"6702f0b2e1b3a40012cd5002\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"message": "Access extended",
"data": {
"_id": "6702d3f0e1b3a40012cd3001",
"email": "ada@example.com",
"user": "66f0aa11e1b3a40012ef0001",
"scope": "product",
"product": {
"_id": "6702c1a4e1b3a40012cd2001",
"name": "The Lagos Cookbook"
},
"kind": "pass",
"status": "active",
"source": "granted",
"startsAt": "2026-10-12T08:00:00.000Z",
"accessUntil": "2026-11-25T08:00:00.000Z",
"daysLeft": 44,
"autoRenew": {
"enabled": false,
"cardLast4": null,
"cardBrand": null
},
"revokedAt": null,
"revokedReason": "",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00: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": {}
}Adds
days to a pass: the new end date is the later of now and the current end date, plus days. Lifetime access cannot be extended, and neither can a revoked record (grant it again instead); both return 400. Send the same grantId on a retry to make it a no-op. Requires the WRITE_INVENTORY scope.
These endpoints only work on a store whose type is
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-access/6702d3f0e1b3a40012cd3001/extend \
-H "Authorization: Bearer app_<your-app-access-token>" \
-H "Content-Type: application/json" \
-d '{"days":14}'
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 access record's ObjectId.
Body
application/json
Response
Extend buyer access: success.
Example:
200
Example:
true
Example:
"Access extended"
One buyer's access record. There is one record per buyer, product (or the all-access pass) and kind, so buying a pass again extends the same record.
Show child attributes
Show child attributes
Example:
{
"_id": "6702d3f0e1b3a40012cd3001",
"email": "ada@example.com",
"user": "66f0aa11e1b3a40012ef0001",
"scope": "product",
"product": {
"_id": "6702c1a4e1b3a40012cd2001",
"name": "The Lagos Cookbook"
},
"kind": "pass",
"status": "active",
"source": "granted",
"startsAt": "2026-10-12T08:00:00.000Z",
"accessUntil": "2026-11-25T08:00:00.000Z",
"daysLeft": 44,
"autoRenew": {
"enabled": false,
"cardLast4": null,
"cardBrand": null
},
"revokedAt": null,
"revokedReason": "",
"createdAt": "2026-10-12T08:00:00.000Z",
"updatedAt": "2026-10-12T08:00:00.000Z"
}
Was this page helpful?

