Skip to Content
HelvetlyDocs
API referenceProducts

Create a product

Needs a token with the write:products scope. Authentication

Try in Playground sends a real request to app.helvetly.com with a token you paste. It stays in this browser tab only (session storage) and goes to no one else.

POST
/api/v1/products

Adds an item to the catalogue. name and unit_price are required; type defaults to service and currency, VAT category and rate to the workspace's defaults. Prices are exact decimals. 422 validation_failed with details.fields (including sku when another active item already uses it). Not idempotent: a retry creates a second item (a repeated SKU is refused).

Authorization

bearerAuth
headerAuthorizationBearer <token>

A personal API token, hvt_…, with scopes such as read:* or write:invoices

Request Body

application/json
  1. body

Fields of a catalogue item. name and unit_price are required on create; on update only the fields sent change and null or blank clears an optional field. Unknown fields are refused (400). unit_price_net and unit_price_gross are derived.

type?string

Default service on create.

Value in"product""service"
name?string
Lengthlength <= 200
description?|
Lengthlength <= 1000
sku?|

Letters, digits and . _ / -; unique among the workspace's active items, case-insensitive (422 on sku otherwise).

Lengthlength <= 64
gtin?|

Barcode number; products only, not services.

Lengthlength <= 14
unit?|
Value in"hour""day""piece""month""km""flat"null
price_basis?string

Whether unit_price is entered without or with VAT. Default net.

Value in"net""gross"
unit_price?Money

An exact amount in major units with two decimals, as a string ("1234.50").

Match^-?\d+\.\d{2}$
currency?string

ISO 4217 code with two decimals, e.g. CHF. Default is the workspace currency.

vat_category?string

UNTDID 5305 code, e.g. S (standard), Z (zero-rated), E (exempt), O (outside scope). Changing from S resets vat_rate to 0; changing to S applies the workspace default rate unless vat_rate is sent.

vat_rate?Percent

A percentage, up to two decimals, as a string ("8.1").

Match^-?\d+(\.\d{1,2})?$

Response Body

Created

application/json
  1. response
data*
Example Request
curl -X POST 'https://app.helvetly.com/api/v1/products' \  -H 'Content-Type: application/json' \  -d '{  "type": "service",  "name": "Consulting",  "description": "Hourly rate",  "unit": "hour",  "price_basis": "net",  "unit_price": "180.00",  "currency": "CHF",  "vat_category": "S",  "vat_rate": "8.10"}'
Example Response
{  "data": {    "id": "string",    "type": "product",    "name": "string",    "description": "string",    "sku": "string",    "gtin": "string",    "unit": "string",    "price_basis": "string",    "unit_price": "1234.50",    "unit_price_net": "1234.50",    "unit_price_gross": "1234.50",    "currency": "string",    "vat_category": "string",    "vat_rate": "string",    "is_archived": true,    "archived_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z"  }}