Products
Create a new product
Creates a new product in the store. Requires detailed product information including name, pricing model, and price. Optionally includes settings for subscription intervals, trial days, and license key configurations.
Usage: Adds new products to the store’s offerings, supporting different pricing models and configurations.
POST
/
products
Create a new product
curl --request POST \
--url https://api.blink.store/v1/products \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"price": 123,
"description": "<string>",
"status": "active",
"trial_days": 123,
"preview_link": "<string>",
"requires_license_key": true,
"license_key_activation_limit": 123,
"cart_recovery_enabled": true,
"customer_portal_visibility": "visible",
"has_metered": true,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"is_bundle": true,
"bundle_items": [
"1391e872-12f1-43eb-901c-f213e8ec3907"
],
"subscription_interval_count": 2
}
'import requests
url = "https://api.blink.store/v1/products"
payload = {
"name": "<string>",
"price": 123,
"description": "<string>",
"status": "active",
"trial_days": 123,
"preview_link": "<string>",
"requires_license_key": True,
"license_key_activation_limit": 123,
"cart_recovery_enabled": True,
"customer_portal_visibility": "visible",
"has_metered": True,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"is_bundle": True,
"bundle_items": ["1391e872-12f1-43eb-901c-f213e8ec3907"],
"subscription_interval_count": 2
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
price: 123,
description: '<string>',
status: 'active',
trial_days: 123,
preview_link: '<string>',
requires_license_key: true,
license_key_activation_limit: 123,
cart_recovery_enabled: true,
customer_portal_visibility: 'visible',
has_metered: true,
metered_prices: [{up_to: 123, unit_amount: 123}],
is_bundle: true,
bundle_items: ['1391e872-12f1-43eb-901c-f213e8ec3907'],
subscription_interval_count: 2
})
};
fetch('https://api.blink.store/v1/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.blink.store/v1/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' => '<string>',
'price' => 123,
'description' => '<string>',
'status' => 'active',
'trial_days' => 123,
'preview_link' => '<string>',
'requires_license_key' => true,
'license_key_activation_limit' => 123,
'cart_recovery_enabled' => true,
'customer_portal_visibility' => 'visible',
'has_metered' => true,
'metered_prices' => [
[
'up_to' => 123,
'unit_amount' => 123
]
],
'is_bundle' => true,
'bundle_items' => [
'1391e872-12f1-43eb-901c-f213e8ec3907'
],
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"trial_days\": 123,\n \"preview_link\": \"<string>\",\n \"requires_license_key\": true,\n \"license_key_activation_limit\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": \"visible\",\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"is_bundle\": true,\n \"bundle_items\": [\n \"1391e872-12f1-43eb-901c-f213e8ec3907\"\n ],\n \"subscription_interval_count\": 2\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.blink.store/v1/products")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"trial_days\": 123,\n \"preview_link\": \"<string>\",\n \"requires_license_key\": true,\n \"license_key_activation_limit\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": \"visible\",\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"is_bundle\": true,\n \"bundle_items\": [\n \"1391e872-12f1-43eb-901c-f213e8ec3907\"\n ],\n \"subscription_interval_count\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"trial_days\": 123,\n \"preview_link\": \"<string>\",\n \"requires_license_key\": true,\n \"license_key_activation_limit\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": \"visible\",\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"is_bundle\": true,\n \"bundle_items\": [\n \"1391e872-12f1-43eb-901c-f213e8ec3907\"\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
}
}Body
application/json
Available options:
one_time, subscription, pay_what_you_want, tiered 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
Whether this product is a dynamic bundle.
Example:
true
An array of product IDs to include in the bundle.
Example:
["1391e872-12f1-43eb-901c-f213e8ec3907"]
The number of intervals between subscription billings.
Required range:
x >= 1Response
Product created successfully
Show child attributes
Show child attributes
⌘I
Create a new product
curl --request POST \
--url https://api.blink.store/v1/products \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"price": 123,
"description": "<string>",
"status": "active",
"trial_days": 123,
"preview_link": "<string>",
"requires_license_key": true,
"license_key_activation_limit": 123,
"cart_recovery_enabled": true,
"customer_portal_visibility": "visible",
"has_metered": true,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"is_bundle": true,
"bundle_items": [
"1391e872-12f1-43eb-901c-f213e8ec3907"
],
"subscription_interval_count": 2
}
'import requests
url = "https://api.blink.store/v1/products"
payload = {
"name": "<string>",
"price": 123,
"description": "<string>",
"status": "active",
"trial_days": 123,
"preview_link": "<string>",
"requires_license_key": True,
"license_key_activation_limit": 123,
"cart_recovery_enabled": True,
"customer_portal_visibility": "visible",
"has_metered": True,
"metered_prices": [
{
"up_to": 123,
"unit_amount": 123
}
],
"is_bundle": True,
"bundle_items": ["1391e872-12f1-43eb-901c-f213e8ec3907"],
"subscription_interval_count": 2
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
price: 123,
description: '<string>',
status: 'active',
trial_days: 123,
preview_link: '<string>',
requires_license_key: true,
license_key_activation_limit: 123,
cart_recovery_enabled: true,
customer_portal_visibility: 'visible',
has_metered: true,
metered_prices: [{up_to: 123, unit_amount: 123}],
is_bundle: true,
bundle_items: ['1391e872-12f1-43eb-901c-f213e8ec3907'],
subscription_interval_count: 2
})
};
fetch('https://api.blink.store/v1/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.blink.store/v1/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' => '<string>',
'price' => 123,
'description' => '<string>',
'status' => 'active',
'trial_days' => 123,
'preview_link' => '<string>',
'requires_license_key' => true,
'license_key_activation_limit' => 123,
'cart_recovery_enabled' => true,
'customer_portal_visibility' => 'visible',
'has_metered' => true,
'metered_prices' => [
[
'up_to' => 123,
'unit_amount' => 123
]
],
'is_bundle' => true,
'bundle_items' => [
'1391e872-12f1-43eb-901c-f213e8ec3907'
],
'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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"trial_days\": 123,\n \"preview_link\": \"<string>\",\n \"requires_license_key\": true,\n \"license_key_activation_limit\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": \"visible\",\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"is_bundle\": true,\n \"bundle_items\": [\n \"1391e872-12f1-43eb-901c-f213e8ec3907\"\n ],\n \"subscription_interval_count\": 2\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.blink.store/v1/products")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"trial_days\": 123,\n \"preview_link\": \"<string>\",\n \"requires_license_key\": true,\n \"license_key_activation_limit\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": \"visible\",\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"is_bundle\": true,\n \"bundle_items\": [\n \"1391e872-12f1-43eb-901c-f213e8ec3907\"\n ],\n \"subscription_interval_count\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blink.store/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"status\": \"active\",\n \"trial_days\": 123,\n \"preview_link\": \"<string>\",\n \"requires_license_key\": true,\n \"license_key_activation_limit\": 123,\n \"cart_recovery_enabled\": true,\n \"customer_portal_visibility\": \"visible\",\n \"has_metered\": true,\n \"metered_prices\": [\n {\n \"up_to\": 123,\n \"unit_amount\": 123\n }\n ],\n \"is_bundle\": true,\n \"bundle_items\": [\n \"1391e872-12f1-43eb-901c-f213e8ec3907\"\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
}
}