Create a Product
curl --request POST \
--url https://api.viarosandbox.com/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"active": true,
"metadata": {}
}
'import requests
url = "https://api.viarosandbox.com/v1/products"
payload = {
"name": "<string>",
"description": "<string>",
"active": True,
"metadata": {}
}
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: '<string>', description: '<string>', active: true, metadata: {}})
};
fetch('https://api.viarosandbox.com/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.viarosandbox.com/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>',
'description' => '<string>',
'active' => true,
'metadata' => [
]
]),
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.viarosandbox.com/v1/products"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\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.viarosandbox.com/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.viarosandbox.com/v1/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\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyProducts & Catalog
Create a Product
Create a new product in your business catalog.
POST
/
products
Create a Product
curl --request POST \
--url https://api.viarosandbox.com/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"active": true,
"metadata": {}
}
'import requests
url = "https://api.viarosandbox.com/v1/products"
payload = {
"name": "<string>",
"description": "<string>",
"active": True,
"metadata": {}
}
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: '<string>', description: '<string>', active: true, metadata: {}})
};
fetch('https://api.viarosandbox.com/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.viarosandbox.com/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>',
'description' => '<string>',
'active' => true,
'metadata' => [
]
]),
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.viarosandbox.com/v1/products"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\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.viarosandbox.com/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.viarosandbox.com/v1/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\": \"<string>\",\n \"description\": \"<string>\",\n \"active\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyCreates a new product object. Products can be linked to prices, payment links, and subscription tiers.
Request Body
string
required
The product’s name, meant to be displayable to the customer.
string
The product’s description, meant to be displayable to the customer.
boolean
default:"true"
Whether the product is currently available for purchase.
object
Key-value pairs for internal SKU or inventory tracking.
Code Examples
curl -X POST https://api.viarosandbox.com/v1/products \
-u sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG: \
-H "Content-Type: application/json" \
-d '{
"name": "Standard Developer Plan",
"description": "Monthly recurring developer license",
"active": true
}'
import requests
url = "https://api.viarosandbox.com/v1/products"
auth = ("sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG", "")
payload = {
"name": "Standard Developer Plan",
"description": "Monthly recurring developer license",
"active": True
}
response = requests.post(url, auth=auth, json=payload)
print(response.json())
const axios = require('axios');
async function createProduct() {
const response = await axios.post(
'https://api.viarosandbox.com/v1/products',
{
name: 'Standard Developer Plan',
description: 'Monthly recurring developer license',
active: true
},
{
auth: {
username: 'sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG',
password: ''
}
}
);
console.log(response.data);
}
createProduct();
Response
{
"id": "prod_3a4b5c6d7e",
"object": "product",
"name": "Standard Developer Plan",
"description": "Monthly recurring developer license",
"active": true,
"created_at": "2026-11-06T12:00:00Z"
}

