Products
Update product details
This endpoint updates the details of an existing product identified by its id. Only specific fields such as name, description, price, and status can be updated. It requires the x-store-id header for authorization and returns the updated product data.
PATCH
/
v1
/
products
/
{id}
Update product details
curl --request PATCH \
--url https://api.blink.store/v1/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'x-store-id: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"subscription_interval": "<string>",
"trial_days": 123,
"cart_recovery_enabled": true,
"customer_portal_visibility": true,
"preview_link": "<string>",
"custom_fields": {}
}
'import requests
url = "https://api.blink.store/v1/v1/products/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"subscription_interval": "<string>",
"trial_days": 123,
"cart_recovery_enabled": True,
"customer_portal_visibility": True,
"preview_link": "<string>",
"custom_fields": {}
}
headers = {
"x-store-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-store-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
price: 123,
status: '<string>',
subscription_interval: '<string>',
trial_days: 123,
cart_recovery_enabled: true,
customer_portal_visibility: true,
preview_link: '<string>',
custom_fields: {}
})
};
fetch('https://api.blink.store/v1/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/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>',
'subscription_interval' => '<string>',
'trial_days' => 123,
'cart_recovery_enabled' => true,
'customer_portal_visibility' => true,
'preview_link' => '<string>',
'custom_fields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-store-id: <api-key>"
],
]);
$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/v1/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"subscription_interval\": \"<string>\",\n \"trial_days\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": true,\n \"preview_link\": \"<string>\",\n \"custom_fields\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-store-id", "<api-key>")
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/v1/products/{id}")
.header("x-store-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"subscription_interval\": \"<string>\",\n \"trial_days\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": true,\n \"preview_link\": \"<string>\",\n \"custom_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-store-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"subscription_interval\": \"<string>\",\n \"trial_days\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": true,\n \"preview_link\": \"<string>\",\n \"custom_fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"store_id": "<string>",
"name": "<string>",
"description": "<string>",
"preview_link": "<string>",
"pricing_model": "<string>",
"price": 123,
"currency": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"subscription_interval": "<string>",
"trial_days": 123,
"pricing_tiers": "<string>",
"package_size": 123,
"metered_prices": "<string>",
"requires_license_key": true,
"license_key_activation_limit": 123,
"cart_recovery_enabled": true,
"customer_portal_visibility": true,
"variants": [
{
"id": "<string>",
"product_id": "<string>",
"name": "<string>",
"description": "<string>",
"price": 123,
"subscription_interval": "<string>",
"trial_days": 123,
"is_active": true,
"requires_license_key": true,
"license_key_activation_limit": 123,
"created_at": "2023-11-07T05:31:56Z",
"deliverables": [
{
"id": "<string>",
"type": "<string>",
"title": "<string>",
"description": "<string>",
"url": "<string>",
"button_label": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
],
"deliverables": [
{
"id": "<string>",
"type": "<string>",
"title": "<string>",
"description": "<string>",
"url": "<string>",
"button_label": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"images": [
{
"id": "<string>",
"file_url": "<string>",
"position": 123
}
]
}Authorizations
Path Parameters
ID of the product to update.
Body
application/json
Response
Product details updated successfully.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Previous
List product variantsThis endpoint retrieves a list of all variants associated with a specified product. It ensures store association by requiring the `x-store-id` header. The response includes detailed information on each variant, aiding efficient product management.
Next
⌘I
Update product details
curl --request PATCH \
--url https://api.blink.store/v1/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'x-store-id: <api-key>' \
--data '
{
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"subscription_interval": "<string>",
"trial_days": 123,
"cart_recovery_enabled": true,
"customer_portal_visibility": true,
"preview_link": "<string>",
"custom_fields": {}
}
'import requests
url = "https://api.blink.store/v1/v1/products/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"price": 123,
"status": "<string>",
"subscription_interval": "<string>",
"trial_days": 123,
"cart_recovery_enabled": True,
"customer_portal_visibility": True,
"preview_link": "<string>",
"custom_fields": {}
}
headers = {
"x-store-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-store-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
price: 123,
status: '<string>',
subscription_interval: '<string>',
trial_days: 123,
cart_recovery_enabled: true,
customer_portal_visibility: true,
preview_link: '<string>',
custom_fields: {}
})
};
fetch('https://api.blink.store/v1/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/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>',
'subscription_interval' => '<string>',
'trial_days' => 123,
'cart_recovery_enabled' => true,
'customer_portal_visibility' => true,
'preview_link' => '<string>',
'custom_fields' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-store-id: <api-key>"
],
]);
$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/v1/products/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"subscription_interval\": \"<string>\",\n \"trial_days\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": true,\n \"preview_link\": \"<string>\",\n \"custom_fields\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-store-id", "<api-key>")
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/v1/products/{id}")
.header("x-store-id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"subscription_interval\": \"<string>\",\n \"trial_days\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": true,\n \"preview_link\": \"<string>\",\n \"custom_fields\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-store-id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"price\": 123,\n \"status\": \"<string>\",\n \"subscription_interval\": \"<string>\",\n \"trial_days\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": true,\n \"preview_link\": \"<string>\",\n \"custom_fields\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"store_id": "<string>",
"name": "<string>",
"description": "<string>",
"preview_link": "<string>",
"pricing_model": "<string>",
"price": 123,
"currency": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"subscription_interval": "<string>",
"trial_days": 123,
"pricing_tiers": "<string>",
"package_size": 123,
"metered_prices": "<string>",
"requires_license_key": true,
"license_key_activation_limit": 123,
"cart_recovery_enabled": true,
"customer_portal_visibility": true,
"variants": [
{
"id": "<string>",
"product_id": "<string>",
"name": "<string>",
"description": "<string>",
"price": 123,
"subscription_interval": "<string>",
"trial_days": 123,
"is_active": true,
"requires_license_key": true,
"license_key_activation_limit": 123,
"created_at": "2023-11-07T05:31:56Z",
"deliverables": [
{
"id": "<string>",
"type": "<string>",
"title": "<string>",
"description": "<string>",
"url": "<string>",
"button_label": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}
],
"deliverables": [
{
"id": "<string>",
"type": "<string>",
"title": "<string>",
"description": "<string>",
"url": "<string>",
"button_label": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
],
"images": [
{
"id": "<string>",
"file_url": "<string>",
"position": 123
}
]
}