curl --request POST \
--url https://api.hyperline.co/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Product name",
"type": "flat_fee",
"price_configurations": [
{
"currency": "EUR",
"billing_interval": {
"period": "once"
},
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
],
"country": "FR",
"plan_id": "<string>",
"price_book_id": "<string>",
"commitment_interval": {
"period": "all"
}
}
],
"description": "Product internal description",
"description_display_interval_dates": true,
"public_description": "Product public description",
"translations": {},
"is_available_on_demand": true,
"is_available_on_subscription": true,
"custom_properties": {},
"accounting": {}
}
'import requests
url = "https://api.hyperline.co/v1/products"
payload = {
"name": "Product name",
"type": "flat_fee",
"price_configurations": [
{
"currency": "EUR",
"billing_interval": { "period": "once" },
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
],
"country": "FR",
"plan_id": "<string>",
"price_book_id": "<string>",
"commitment_interval": { "period": "all" }
}
],
"description": "Product internal description",
"description_display_interval_dates": True,
"public_description": "Product public description",
"translations": {},
"is_available_on_demand": True,
"is_available_on_subscription": True,
"custom_properties": {},
"accounting": {}
}
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: 'Product name',
type: 'flat_fee',
price_configurations: [
{
currency: 'EUR',
billing_interval: {period: 'once'},
type: 'fee',
prices: [{type: 'fee', amount: 123, id: '<string>'}],
country: 'FR',
plan_id: '<string>',
price_book_id: '<string>',
commitment_interval: {period: 'all'}
}
],
description: 'Product internal description',
description_display_interval_dates: true,
public_description: 'Product public description',
translations: {},
is_available_on_demand: true,
is_available_on_subscription: true,
custom_properties: {},
accounting: {}
})
};
fetch('https://api.hyperline.co/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.hyperline.co/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' => 'Product name',
'type' => 'flat_fee',
'price_configurations' => [
[
'currency' => 'EUR',
'billing_interval' => [
'period' => 'once'
],
'type' => 'fee',
'prices' => [
[
'type' => 'fee',
'amount' => 123,
'id' => '<string>'
]
],
'country' => 'FR',
'plan_id' => '<string>',
'price_book_id' => '<string>',
'commitment_interval' => [
'period' => 'all'
]
]
],
'description' => 'Product internal description',
'description_display_interval_dates' => true,
'public_description' => 'Product public description',
'translations' => [
],
'is_available_on_demand' => true,
'is_available_on_subscription' => true,
'custom_properties' => [
],
'accounting' => [
]
]),
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.hyperline.co/v1/products"
payload := strings.NewReader("{\n \"name\": \"Product name\",\n \"type\": \"flat_fee\",\n \"price_configurations\": [\n {\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n }\n ],\n \"description\": \"Product internal description\",\n \"description_display_interval_dates\": true,\n \"public_description\": \"Product public description\",\n \"translations\": {},\n \"is_available_on_demand\": true,\n \"is_available_on_subscription\": true,\n \"custom_properties\": {},\n \"accounting\": {}\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.hyperline.co/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Product name\",\n \"type\": \"flat_fee\",\n \"price_configurations\": [\n {\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n }\n ],\n \"description\": \"Product internal description\",\n \"description_display_interval_dates\": true,\n \"public_description\": \"Product public description\",\n \"translations\": {},\n \"is_available_on_demand\": true,\n \"is_available_on_subscription\": true,\n \"custom_properties\": {},\n \"accounting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/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\": \"Product name\",\n \"type\": \"flat_fee\",\n \"price_configurations\": [\n {\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n }\n ],\n \"description\": \"Product internal description\",\n \"description_display_interval_dates\": true,\n \"public_description\": \"Product public description\",\n \"translations\": {},\n \"is_available_on_demand\": true,\n \"is_available_on_subscription\": true,\n \"custom_properties\": {},\n \"accounting\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "itm_3kXODDF42QXtnL",
"name": "Product name",
"status": "active",
"description": "Product internal description",
"description_display_interval_dates": true,
"public_description": "Product public description",
"translations": {},
"properties": null,
"custom_properties": {},
"accounting": {},
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"type": "flat_fee",
"is_available_on_demand": true,
"is_available_on_subscription": true,
"price_configurations": [
{
"id": "<string>",
"product_id": "<string>",
"price_book_id": "<string>",
"status": "active",
"currency": "EUR",
"country": "FR",
"plan_id": "<string>",
"billing_interval": {
"period": "once"
},
"commitment_interval": {
"period": "all"
},
"updated_at": "2023-12-25",
"archived_at": "2023-12-25",
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
]
}
]
}Create product
Create a new product.
curl --request POST \
--url https://api.hyperline.co/v1/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Product name",
"type": "flat_fee",
"price_configurations": [
{
"currency": "EUR",
"billing_interval": {
"period": "once"
},
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
],
"country": "FR",
"plan_id": "<string>",
"price_book_id": "<string>",
"commitment_interval": {
"period": "all"
}
}
],
"description": "Product internal description",
"description_display_interval_dates": true,
"public_description": "Product public description",
"translations": {},
"is_available_on_demand": true,
"is_available_on_subscription": true,
"custom_properties": {},
"accounting": {}
}
'import requests
url = "https://api.hyperline.co/v1/products"
payload = {
"name": "Product name",
"type": "flat_fee",
"price_configurations": [
{
"currency": "EUR",
"billing_interval": { "period": "once" },
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
],
"country": "FR",
"plan_id": "<string>",
"price_book_id": "<string>",
"commitment_interval": { "period": "all" }
}
],
"description": "Product internal description",
"description_display_interval_dates": True,
"public_description": "Product public description",
"translations": {},
"is_available_on_demand": True,
"is_available_on_subscription": True,
"custom_properties": {},
"accounting": {}
}
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: 'Product name',
type: 'flat_fee',
price_configurations: [
{
currency: 'EUR',
billing_interval: {period: 'once'},
type: 'fee',
prices: [{type: 'fee', amount: 123, id: '<string>'}],
country: 'FR',
plan_id: '<string>',
price_book_id: '<string>',
commitment_interval: {period: 'all'}
}
],
description: 'Product internal description',
description_display_interval_dates: true,
public_description: 'Product public description',
translations: {},
is_available_on_demand: true,
is_available_on_subscription: true,
custom_properties: {},
accounting: {}
})
};
fetch('https://api.hyperline.co/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.hyperline.co/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' => 'Product name',
'type' => 'flat_fee',
'price_configurations' => [
[
'currency' => 'EUR',
'billing_interval' => [
'period' => 'once'
],
'type' => 'fee',
'prices' => [
[
'type' => 'fee',
'amount' => 123,
'id' => '<string>'
]
],
'country' => 'FR',
'plan_id' => '<string>',
'price_book_id' => '<string>',
'commitment_interval' => [
'period' => 'all'
]
]
],
'description' => 'Product internal description',
'description_display_interval_dates' => true,
'public_description' => 'Product public description',
'translations' => [
],
'is_available_on_demand' => true,
'is_available_on_subscription' => true,
'custom_properties' => [
],
'accounting' => [
]
]),
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.hyperline.co/v1/products"
payload := strings.NewReader("{\n \"name\": \"Product name\",\n \"type\": \"flat_fee\",\n \"price_configurations\": [\n {\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n }\n ],\n \"description\": \"Product internal description\",\n \"description_display_interval_dates\": true,\n \"public_description\": \"Product public description\",\n \"translations\": {},\n \"is_available_on_demand\": true,\n \"is_available_on_subscription\": true,\n \"custom_properties\": {},\n \"accounting\": {}\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.hyperline.co/v1/products")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Product name\",\n \"type\": \"flat_fee\",\n \"price_configurations\": [\n {\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n }\n ],\n \"description\": \"Product internal description\",\n \"description_display_interval_dates\": true,\n \"public_description\": \"Product public description\",\n \"translations\": {},\n \"is_available_on_demand\": true,\n \"is_available_on_subscription\": true,\n \"custom_properties\": {},\n \"accounting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/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\": \"Product name\",\n \"type\": \"flat_fee\",\n \"price_configurations\": [\n {\n \"currency\": \"EUR\",\n \"billing_interval\": {\n \"period\": \"once\"\n },\n \"type\": \"fee\",\n \"prices\": [\n {\n \"type\": \"fee\",\n \"amount\": 123,\n \"id\": \"<string>\"\n }\n ],\n \"country\": \"FR\",\n \"plan_id\": \"<string>\",\n \"price_book_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"all\"\n }\n }\n ],\n \"description\": \"Product internal description\",\n \"description_display_interval_dates\": true,\n \"public_description\": \"Product public description\",\n \"translations\": {},\n \"is_available_on_demand\": true,\n \"is_available_on_subscription\": true,\n \"custom_properties\": {},\n \"accounting\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "itm_3kXODDF42QXtnL",
"name": "Product name",
"status": "active",
"description": "Product internal description",
"description_display_interval_dates": true,
"public_description": "Product public description",
"translations": {},
"properties": null,
"custom_properties": {},
"accounting": {},
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"type": "flat_fee",
"is_available_on_demand": true,
"is_available_on_subscription": true,
"price_configurations": [
{
"id": "<string>",
"product_id": "<string>",
"price_book_id": "<string>",
"status": "active",
"currency": "EUR",
"country": "FR",
"plan_id": "<string>",
"billing_interval": {
"period": "once"
},
"commitment_interval": {
"period": "all"
},
"updated_at": "2023-12-25",
"archived_at": "2023-12-25",
"type": "fee",
"prices": [
{
"type": "fee",
"amount": 123,
"id": "<string>"
}
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Create product payload
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Product name.
"Product name"
Product type for fixed fee products.
flat_fee Price configurations for the product.
Show child attributes
Show child attributes
Product description.
"Product internal description"
Indicates if the dates of the interval should be automatically added in the product description on the invoices.
Public description of the product.
5000"Product public description"
Product name and description translations.
Show child attributes
Show child attributes
A list of key value with the slug of the custom property as the key and the custom property value as value.
Show child attributes
Show child attributes
Mapping invoicing entity ID/accounting settings.
Show child attributes
Show child attributes
Response
The newly created product
- Fee product
- Seat product
- Dynamic product
- Credit product
- Bundle product
Product ID.
"itm_3kXODDF42QXtnL"
Product name.
"Product name"
Product status.
active: The product is active and can be used in new quotes/subscriptions/invoices.archived: The product is archived and can't be used anymore.
active, archived "active"
Product description.
"Product internal description"
Indicates if the dates of the interval should be automatically added in the product description on the invoices.
Public description of the product.
"Product public description"
Product name and description translations.
Show child attributes
Show child attributes
Key/value pairs to store any metadata useful in your context.
Show child attributes
Show child attributes
null
A list of key value with the slug of the custom property as the key and the custom property value as value.
Show child attributes
Show child attributes
Mapping invoicing entity ID/accounting settings.
Show child attributes
Show child attributes
References to this product in external providers (billing, accounting, etc).
Show child attributes
Show child attributes
Product type.
flat_fee Enable the product to be billed at any time as a one-time payment.
true
Enable the product to be added as part of a subscription.
true
Show child attributes
Show child attributes
Was this page helpful?

