Products
Update product details
Updates an existing product’s attributes such as name, price, or status. A product ID is required. Requires x-store-id.
Usage: Suitable for modifying product listings directly in the store’s catalog, allowing for dynamically adjusting product offerings.
**Path
PATCH
/
products
/
{id}
Update product details
curl --request PATCH \
--url https://api.blink.store/v1/products/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"trial_days": 123,
"has_metered": true,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"subscription_interval_count": 2
}
'import requests
url = "https://api.blink.store/v1/products/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"trial_days": 123,
"has_metered": True,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"subscription_interval_count": 2
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
price: 123,
status: '<string>',
trial_days: 123,
has_metered: true,
metered_prices: [{up_to: 123, unit_amount: 123}],
subscription_interval_count: 2
})
};
fetch('https://api.blink.store/v1/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.blink.store/v1/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'price' => 123,
'status' => '<string>',
'trial_days' => 123,
'has_metered' => true,
'metered_prices' => [
[
'up_to' => 123,
'unit_amount' => 123
]
],
'subscription_interval_count' => 2
]),
CURLOPT_HTTPHEADER => [
"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.blink.store/v1/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"trial_days\": 123,\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"subscription_interval_count\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.blink.store/v1/products/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"trial_days\": 123,\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"subscription_interval_count\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"trial_days\": 123,\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"subscription_interval_count\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"store_id": "<string>",
"name": "<string>",
"description": "<string>",
"preview_link": "<string>",
"pricing_model": "one_time",
"price": 123,
"currency": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"subscription_interval": "day",
"trial_days": 123,
"is_bundle": true,
"bundle_items": [
{
"product_id": "<string>",
"variant_id": "<string>"
}
],
"variants": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"price": 123,
"currency": "<string>",
"is_active": true,
"subscription_interval": "day",
"trial_days": 123,
"created_at": "2023-11-07T05:31:56Z",
"subscription_interval_count": 2
}
],
"deliverables": [
{
"id": "<string>",
"type": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"categories": [
{
"id": "<string>",
"name": "<string>",
"slug": "<string>"
}
],
"subscription_interval_count": 2
}
}Path Parameters
Body
application/json
Available options:
day, week, month, year Enable metered billing for overages
Configure your overage pricing tiers here. If a user exceeds their deliverable grant, they will be billed at these rates.
Show child attributes
Show child attributes
The number of intervals between subscription billings.
Required range:
x >= 1Response
Product updated successfully
Show child attributes
Show child attributes
⌘I
Update product details
curl --request PATCH \
--url https://api.blink.store/v1/products/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"trial_days": 123,
"has_metered": true,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"subscription_interval_count": 2
}
'import requests
url = "https://api.blink.store/v1/products/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"trial_days": 123,
"has_metered": True,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"subscription_interval_count": 2
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
price: 123,
status: '<string>',
trial_days: 123,
has_metered: true,
metered_prices: [{up_to: 123, unit_amount: 123}],
subscription_interval_count: 2
})
};
fetch('https://api.blink.store/v1/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.blink.store/v1/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'price' => 123,
'status' => '<string>',
'trial_days' => 123,
'has_metered' => true,
'metered_prices' => [
[
'up_to' => 123,
'unit_amount' => 123
]
],
'subscription_interval_count' => 2
]),
CURLOPT_HTTPHEADER => [
"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.blink.store/v1/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"trial_days\": 123,\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"subscription_interval_count\": 2\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.blink.store/v1/products/{id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"trial_days\": 123,\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"subscription_interval_count\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"trial_days\": 123,\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"subscription_interval_count\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"store_id": "<string>",
"name": "<string>",
"description": "<string>",
"preview_link": "<string>",
"pricing_model": "one_time",
"price": 123,
"currency": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"subscription_interval": "day",
"trial_days": 123,
"is_bundle": true,
"bundle_items": [
{
"product_id": "<string>",
"variant_id": "<string>"
}
],
"variants": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"price": 123,
"currency": "<string>",
"is_active": true,
"subscription_interval": "day",
"trial_days": 123,
"created_at": "2023-11-07T05:31:56Z",
"subscription_interval_count": 2
}
],
"deliverables": [
{
"id": "<string>",
"type": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"categories": [
{
"id": "<string>",
"name": "<string>",
"slug": "<string>"
}
],
"subscription_interval_count": 2
}
}