Products API
Products are what clients order: hosting plans, domains, licences and custom services, with their prices, add-ons, categories, promotions and configurable options. Guest calls return what the store shows. See Products for the user guide.
Admin calls need Module access on the Product card of the staff group’s Permissions tab, plus each call’s own permission below (Super Administrators have all). See Authentication.
Admin calls
Section titled “Admin calls”get_list
Section titled “get_list”POST /api/admin/product/get_list
Lists the products (not add-ons), by their sort order.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
type |
string | Only this product type, such as hosting, domain or custom (see admin/get_types). |
status |
string | Only enabled or disabled products. |
show_hidden |
boolean | false leaves out hidden products. Default true. |
search |
string | Text to find in the product name. |
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has the fields of admin/get.
Example
Request parameters:
{ "type": "hosting", "per_page": 1}result:
{ "pages": 3, "page": 1, "per_page": 1, "total": 3, "list": [ { "id": 4, "product_category_id": 1, "type": "hosting", "title": "Starter Hosting", "slug": "starter-hosting", "description": "One website, 10 GB storage.", "unit": "product", "priority": 10, "pricing": { "type": "recurrent", "free": { "price": 0, "setup": 0 }, "once": { "price": 0, "setup": 0 }, "recurrent": { "1M": { "price": 5, "setup": 0, "enabled": true }, "1Y": { "price": 50, "setup": 0, "enabled": true } } }, "config": { "hosting_plan_id": 2 }, "addons": [], "price_starting_from": 5, "prorata": [], "icon_url": null, "allow_quantity_select": false, "form_id": null, "created_at": "2026-10-01 09:00:00", "updated_at": "2026-11-12 16:40:02", "quantity_in_stock": 0, "stock_control": false, "upgrades": { "5": "Business Hosting" }, "upgrades_category": false, "status": "enabled", "hidden": false, "setup": "after_payment", "category": { "id": 1, "title": "Web Hosting" } } ]}get_pairs
Section titled “get_pairs”POST /api/admin/product/get_pairs
Returns the products as id and name pairs, for a drop-down list.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
type |
string | Only this product type. |
products_only |
boolean | false also lists add-ons. Default true. |
active_only |
boolean | Default true. Every product is active, so it changes nothing. |
status |
string | Only enabled or disabled products. Without it, both are listed. |
show_hidden |
boolean | false leaves hidden products out. Default true. |
Returns: An object of product id to product name, by id.
Example
Request parameters:
{ "type": "hosting"}result:
{ "4": "Starter Hosting", "5": "Business Hosting"}POST /api/admin/product/get
Returns one product or add-on with everything staff see.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The product’s id. |
Returns: The product: id, product_category_id, type, title, slug, description, unit, priority (sort order), pricing (type: free, once or recurrent; once {price, setup}; recurrent: an object of billing period (1W, 1M, 3M, 6M, 1Y, 2Y, 3Y) to {price, setup, enabled}; for the domain product, an object of TLD to its prices instead), config (the type’s settings), addons (each with id, type, title, slug, description, unit, plugin, allow_quantity_select, created_at, updated_at, icon_url, pricing and config), price_starting_from (the lowest enabled price), prorata (for a prorata product: per billing period, factor and the first due date), icon_url, allow_quantity_select, form_id (its order form), created_at, updated_at, quantity_in_stock, stock_control, upgrades (an object of product id to name: the products it may change to), upgrades_category (every product of its category may be an upgrade), status (enabled or disabled), hidden, setup (after_order, after_payment or manual) and category (id, title; only when it has one). Prices are in the default currency.
Errors:
- Product not found (code 9999)
get_types
Section titled “get_types”POST /api/admin/product/get_types
Lists the product types this install offers: the built-in ones and one per active service module.
Permission: View products (product.view)
No parameters.
Returns: An object of type code to its translated name, such as { "custom": "Custom", "hosting": "Hosting", "domain": "Domain", "apikey": "API Key" }.
prepare
Section titled “prepare”POST /api/admin/product/prepare
Creates a product, disabled and free, so you can set it up with admin/update before you enable it.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
title |
string, required | The product’s name. Its slug is made from it. |
type |
string, required | A type code from admin/get_types. |
product_category_id |
integer | The category to put it in. |
Returns: The new product’s id.
Errors:
- You must specify a title (code 9999)
- Type was not passed (code 9999)
- You have already created domain product. (code 413): there is only one domain product.
- Product type … is not registered. (code 413)
The product starts with Setup “after payment” and at the end of the sort order.
Example
Request parameters:
{ "title": "Business Hosting", "type": "hosting", "product_category_id": 1}result:
5update
Section titled “update”POST /api/admin/product/update
Changes a product or add-on. A field you leave out keeps its value.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The product’s id. |
title |
string | The name. |
slug |
string | The URL name of its store page. |
description |
string | The description (HTML). |
status |
string | enabled (in the store) or disabled. |
hidden |
boolean | Keeps an enabled product out of the store lists; it can still be ordered by its link. |
setup |
string | When the service is set up: after_order, after_payment or manual. |
product_category_id |
integer | Its category; empty for none. |
form_id |
integer | Its order form (Form Builder); empty for none. |
icon_url |
string | An image URL, up to 255 characters. |
pricing |
object | The prices: type (free, once or recurrent, required with pricing), once { "price", "setup" }, and recurrent, an object of period (1W, 1M, 3M, 6M, 1Y, 2Y, 3Y) to { "price", "setup", "enabled" }. A period you leave out keeps its prices. In the default currency. |
config |
object | Type settings to add or change; the others stay. prorata_day (1-31, 0 off) bills every service of the product to that day of the month; prorata_charge_next (day of the month, 0 off) adds the next month to orders placed after that day. |
addons |
array | The ids of the add-ons offered with it. An empty list removes them all. |
upgrades |
array | The ids of the products a client may change it to. |
upgrades_category |
boolean | true lets clients change to any product of its category. |
stock_control |
boolean | Turns on the stock count. |
quantity_in_stock |
integer | How many are left to sell when stock control is on. |
allow_quantity_select |
boolean | Lets clients order more than one. |
plugin |
string | The plugin a custom product runs. |
currency_prices |
object | Fixed prices in other currencies, as prices in admin/currency_prices_save. Saved first, so a wrong price changes nothing. |
translations |
object | The name and description in other languages: an object of locale code (such as de_DE) to { "title", "description" }. It replaces the saved translations; a language left out or with both texts empty loses them. |
Returns: true.
Errors:
- Product ID was not passed (code 9999)
- Product not found (code 9999)
- Pricing type is required (code 9999)
- The prorata day must be a day of the month from 1 to 31. (code 9999)
- Icon URL must not exceed 255 characters. (code 9999)
- Fixed prices can only be set for a currency other than the default one. (code 9999)
- Invalid locale code: … (code 9999)
Example
Request parameters:
{ "id": 5, "status": "enabled", "pricing": { "type": "recurrent", "recurrent": { "1M": { "price": 12, "setup": 0, "enabled": true }, "1Y": { "price": 120, "setup": 0, "enabled": true } } }, "translations": { "de_DE": { "title": "Business-Hosting", "description": "" } }}result:
trueupdate_priority
Section titled “update_priority”POST /api/admin/product/update_priority
Sets the sort order of several products at once.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
priority |
object, required | An object of product id to its position; lower comes first. Unknown ids are skipped. |
Returns: true.
Errors:
- priority params is missing (code 9999)
Example
Request parameters:
{ "priority": { "4": 10, "5": 20 }}result:
trueupdate_config
Section titled “update_config”POST /api/admin/product/update_config
Replaces a product’s type settings (config) with the ones you send, and can add one more.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The product’s id. |
config |
object | The settings to keep, with their values. A saved setting not in this object is removed, and so is one sent with an empty value (0 stays). |
new_config_name |
string | The name of a setting to add. |
new_config_value |
string | Its value. Both must be non-empty. |
Returns: true.
Errors:
- Product ID was not passed (code 9999)
- Product not found (code 9999)
Unlike config in admin/update, this replaces the whole set: send every setting you want to keep.
addon_get_pairs
Section titled “addon_get_pairs”POST /api/admin/product/addon_get_pairs
Returns every add-on as id and name pairs.
Permission: View products (product.view)
No parameters.
Returns: An object of add-on id to name, by id.
addon_create
Section titled “addon_create”POST /api/admin/product/addon_create
Creates an add-on: a custom product that clients add to another product’s order.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
title |
string, required | The add-on’s name. |
description |
string | The description. |
status |
string | enabled or disabled (default). |
setup |
string | after_order, after_payment (default) or manual. |
icon_url |
string | An image URL, up to 255 characters. |
Returns: The new add-on’s id. It starts free: set its prices with admin/addon_update.
Errors:
- You must specify a title (code 9999)
- Icon URL must not exceed 255 characters. (code 9999)
addon_get
Section titled “addon_get”POST /api/admin/product/addon_get
Returns one add-on.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The add-on’s id. |
Returns: The add-on, with the fields of admin/get.
Errors:
- Addon ID was not passed (code 9999)
- Product not found (code 9999)
- Addon not found (code 9999) when the id is a product, not an add-on.
addon_update
Section titled “addon_update”POST /api/admin/product/addon_update
Changes an add-on. It takes the parameters of admin/update.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The add-on’s id. |
title |
string | The name. The other fields of admin/update work the same way. |
pricing |
object | The prices, as in admin/update. |
Returns: true.
Errors:
- Addon ID was not passed (code 9999)
- Product not found (code 9999)
- Addon not found (code 9999)
addon_delete
Section titled “addon_delete”POST /api/admin/product/addon_delete
Deletes an add-on, as admin/delete does for a product.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The add-on’s id. |
Returns: true.
Errors:
- Addon ID was not passed (code 9999)
- Addon not found, also for the id of a product that is not an add-on
- Cannot remove a product that has orders. (code 9999)
This cannot be undone.
delete
Section titled “delete”POST /api/admin/product/delete
Deletes a product with its fixed currency prices and translations, and detaches its option groups.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The product’s id. |
Returns: true.
Errors:
- Product ID was not passed (code 9999)
- Product not found (code 9999)
- Cannot remove a product that has orders. (code 9999) when any order, in any status, uses it: disable it instead.
This cannot be undone.
category_get_pairs
Section titled “category_get_pairs”POST /api/admin/product/category_get_pairs
Returns every product category as id and name pairs.
Permission: View products (product.view)
No parameters.
Returns: An object of category id to name, by id.
category_update
Section titled “category_update”POST /api/admin/product/category_update
Changes a product category. A field you leave out keeps its value.
Permission: Manage product categories (product.manage_categories)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The category’s id. |
title |
string | The name. |
description |
string | The description. |
icon_url |
string | An image URL, up to 255 characters. |
translations |
object | The name and description in other languages, as in admin/update. It replaces the saved translations. |
Returns: true.
Errors:
- Category ID was not passed (code 9999)
- Category not found (code 9999)
- Icon URL must not exceed 255 characters. (code 9999)
- Invalid locale code: … (code 9999)
category_get
Section titled “category_get”POST /api/admin/product/category_get
Returns one category with the products the store shows in it.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The category’s id. |
Returns: The category: id, title, description, icon_url, created_at, updated_at, price_starting_from (the lowest product price), type (the first product’s type) and products (its enabled, visible products, with the fields of admin/get).
Errors:
- Category ID was not passed (code 9999)
- Category not found (code 9999)
category_create
Section titled “category_create”POST /api/admin/product/category_create
Creates a product category.
Permission: Manage product categories (product.manage_categories)
| Parameter | Type | Description |
|---|---|---|
title |
string, required | The name. |
description |
string | The description. |
icon_url |
string | An image URL, up to 255 characters. |
Returns: The new category’s id.
Errors:
- Category title is required (code 9999)
- Icon URL must not exceed 255 characters. (code 9999)
Example
Request parameters:
{ "title": "Web Hosting", "description": "Shared hosting plans."}result:
1category_delete
Section titled “category_delete”POST /api/admin/product/category_delete
Deletes an empty product category and its translations.
Permission: Manage product categories (product.manage_categories)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The category’s id. |
Returns: true.
Errors:
- Category ID was not passed (code 9999)
- Category not found (code 9999)
- Cannot remove product category with products (code 9999)
promo_get_list
Section titled “promo_get_list”POST /api/admin/product/promo_get_list
Lists the promotions, oldest first.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
id |
integer | Only the promotion with this id. |
search |
string | Text to find in the code. |
status |
string | active (on and within its dates), not-started or expired. |
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has the fields of admin/promo_get except usage_stats and include_options.
Example
Request parameters:
{ "status": "active"}result:
{ "pages": 1, "page": 1, "per_page": 100, "total": 1, "list": [ { "id": 3, "code": "WELCOME10", "description": "10% off the first order", "type": "percentage", "value": 10, "maxuses": 0, "used": 4, "freesetup": false, "once_per_client": true, "recurring": false, "active": true, "products": [ 4, 5 ], "periods": [ "1Y" ], "client_groups": [], "start_at": null, "end_at": "2026-12-31 23:59:59", "auto_apply": false, "created_at": "2026-11-01 10:00:00", "updated_at": "2026-11-01 10:00:00", "applies_to": { "4": "Starter Hosting", "5": "Business Hosting" }, "cgroups": null, "redemption_count": 4, "can_be_deleted": false } ]}promo_create
Section titled “promo_create”POST /api/admin/product/promo_create
Creates a promotion code.
Permission: Manage promotions (product.manage_promos)
| Parameter | Type | Description |
|---|---|---|
code |
string, required | The code clients enter. It must be unique. |
type |
string, required | percentage or absolute (an amount in the order’s currency). |
value |
number, required | The discount: 0 to 100 for a percentage, 0 or more for an amount. |
products |
array | The product ids it works for. Empty: every product. |
periods |
array | The billing periods it works for, such as 1M or 1Y. Empty: every period. |
client_groups |
array | The client group ids that may use it. Empty: every client. |
description |
string | A note for staff. |
active |
boolean | Turns it on. Default false. |
freesetup |
boolean | Also removes the setup fee. |
once_per_client |
boolean | Each client may use it once. |
recurring |
boolean | The discount also applies to renewals. |
auto_apply |
boolean | Applies it at checkout without a code (Apply automatically). |
maxuses |
integer | How many times it may be used in all; 0 (default) for no limit. |
used |
integer | The use count to start from. Default 0. |
start_at |
string | Date and time it starts to work. |
end_at |
string | Date and time it stops working. |
include_options |
boolean | The discount also covers configurable options (Also discount configurable options). Default false. |
Returns: The new promotion’s id.
Errors:
- Promo code is missing (code 9999), and the same for the type and value.
- A discount is from 0 to 100 percent, or a positive amount. (code 9999)
- This promotion code already exists. (code 9999)
Example
Request parameters:
{ "code": "WELCOME10", "type": "percentage", "value": 10, "products": [ 4, 5 ], "periods": [ "1Y" ], "once_per_client": true, "active": true}result:
3promo_get
Section titled “promo_get”POST /api/admin/product/promo_get
Returns one promotion with its usage numbers.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The promotion’s id. |
Returns: The promotion: id, code, description, type (percentage or absolute), value, maxuses (0: no limit), used, freesetup, once_per_client, recurring, active, auto_apply, products (product ids), periods (period codes), client_groups (group ids), start_at, end_at, created_at, updated_at, applies_to (product id to name, or null for every product), cgroups (group id to name, or null), redemption_count, can_be_deleted (false once it was used), include_options (the discount also covers configurable options) and usage_stats: operational_use_count, max_uses, remaining_operational_uses, recorded_applications, checkout_applications, renewal_applications, active_checkout_applications, reserved_applications, committed_applications, released_applications, distinct_clients and orders_using_promo.
Errors:
- Promo ID was not passed (code 9999)
- Promo not found (code 9999)
promo_duplicate
Section titled “promo_duplicate”POST /api/admin/product/promo_duplicate
Copies a promotion. The copy is switched off, its use count is 0 and its code gets -COPY (or -COPY-2 and so on).
Permission: Manage promotions (product.manage_promos)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The promotion to copy. |
Returns: The copy’s id.
Errors:
- Promo ID was not passed (code 9999)
- Promo not found (code 9999)
promo_redemption_get_list
Section titled “promo_redemption_get_list”POST /api/admin/product/promo_redemption_get_list
Lists each use of a promotion, newest first: at checkout or at a renewal, with the client, order and invoice.
Permission: View products (product.view), and also View on the Client, Order and Invoice modules (client.view, order.view, invoice.view)
| Parameter | Type | Description |
|---|---|---|
promo_id |
integer, required | The promotion’s id. |
client_id |
integer | Only this client’s uses. |
client_order_id |
integer | Only this order’s uses. |
phase |
string | checkout or renewal. |
status |
string | reserved (invoice not paid yet), committed (paid) or released (given back). |
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has id, promo_id, client_id, client_order_id, invoice_id, phase, status, discount_amount, currency, committed_at, released_at, release_reason, created_at, updated_at, client (id, first_name, last_name, email, or null), order (id, title, created_at, or null) and invoice (id, serie_nr, status, created_at, or null).
Errors:
- Promo ID is missing (code 9999)
promo_update
Section titled “promo_update”POST /api/admin/product/promo_update
Changes a promotion. A field you leave out keeps its value.
Permission: Manage promotions (product.manage_promos)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The promotion’s id. |
code |
string | The code; it must be unique. |
type |
string | percentage or absolute. |
value |
number | The discount. |
products |
array | The product ids; an empty list means every product. |
periods |
array | The billing periods; an empty list means every period. |
client_groups |
array | The client group ids; an empty list means every client. |
description |
string | A note for staff. |
active |
boolean | On or off. |
freesetup |
boolean | Also removes the setup fee. |
once_per_client |
boolean | Each client may use it once. |
recurring |
boolean | Also applies to renewals. |
auto_apply |
boolean | Applies it without a code. |
maxuses |
integer | Use limit; 0 for none. |
used |
integer | Sets the use count. |
start_at |
string | Start date and time. Left out: unchanged; empty: removed. |
end_at |
string | End date and time. Left out: unchanged; empty: removed. |
include_options |
boolean | The discount also covers configurable options. |
Returns: true.
Errors:
- Promo ID was not passed (code 9999)
- Promo not found (code 9999)
- This promotion code already exists. (code 9999)
- A discount is from 0 to 100 percent, or a positive amount. (code 9999)
promo_delete
Section titled “promo_delete”POST /api/admin/product/promo_delete
Deletes a promotion that was never used.
Permission: Manage promotions (product.manage_promos)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The promotion’s id. |
Returns: true.
Errors:
- Promo ID was not passed (code 9999)
- Promo not found (code 9999)
- Promotions with redemption history cannot be deleted. Disable the promotion instead. (code 9999)
option_group_list
Section titled “option_group_list”POST /api/admin/product/option_group_list
Lists the configurable option groups (Products → Configurable options).
Permission: View products (product.view)
No parameters.
Returns: A list, by name. Each group has id, title, description, options (how many) and products (the ids of the products it is attached to).
option_group_get
Section titled “option_group_get”POST /api/admin/product/option_group_get
Returns an option group with its options and their values, hidden ones included.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The group’s id. |
Returns: The group: id, title, description, products (product ids) and options, each with id, group_id, title, code, type (select, radio, yesno or quantity), qty_min, qty_max (0: no maximum), unit, hidden, position and values, each with id, title, code, hidden and prices: an object of price key (once, w, m, q, b, a, bia, tria for one-time, weekly, monthly, 3-monthly, 6-monthly, yearly, 2-yearly and 3-yearly) to { price, setup_price }, in the default currency.
Errors:
- Option group ID was not passed (code 9999)
- Option group not found (code 404)
Example
Request parameters:
{ "id": 2}result:
{ "id": 2, "title": "VPS resources", "description": "", "products": [ 8 ], "options": [ { "id": 6, "group_id": 2, "title": "Daily backups", "code": "backups", "type": "yesno", "qty_min": 0, "qty_max": 0, "unit": "", "hidden": false, "position": 0, "values": [ { "id": 11, "title": "Daily backups", "code": "", "hidden": false, "prices": { "once": { "price": 0, "setup_price": 0 }, "w": { "price": 0, "setup_price": 0 }, "m": { "price": 3, "setup_price": 0 }, "q": { "price": 9, "setup_price": 0 }, "b": { "price": 18, "setup_price": 0 }, "a": { "price": 30, "setup_price": 0 }, "bia": { "price": 60, "setup_price": 0 }, "tria": { "price": 90, "setup_price": 0 } } } ] } ]}option_group_save
Section titled “option_group_save”POST /api/admin/product/option_group_save
Creates an option group (no id) or renames one.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer | The group’s id, to change it. Leave it out to create one. |
title |
string, required | The group’s name, up to 255 characters. |
description |
string | A note, up to 2000 characters. |
Returns: The group’s id.
Errors:
- Group name is required. (code 9999)
- … can be at most … characters. (code 9999)
- Option group not found (code 404)
option_group_delete
Section titled “option_group_delete”POST /api/admin/product/option_group_delete
Deletes an option group with its options and values, and detaches it from its products.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The group’s id. |
Returns: true.
Errors:
- Option group ID was not passed (code 9999)
- Option group not found (code 404)
Orders keep the option lines they already have. This cannot be undone.
option_save
Section titled “option_save”POST /api/admin/product/option_save
Creates a configurable option (no id) or changes one, with its whole list of values.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer | The option’s id, to change it. Leave it out to create one. |
group_id |
integer | The group, for a new option (at most 100 per group). Ignored when changing one. |
title |
string, required | The option’s name, up to 255 characters. |
type |
string, required | select, radio, yesno or quantity. It cannot change once saved. |
code |
string | A key for service modules: letters, digits, dots, dashes and underscores, up to 100. |
qty_min |
integer | For quantity: the minimum. Default 0. |
qty_max |
integer | For quantity: the maximum, up to 100000; 0 for none. |
unit |
string | For quantity: the unit shown, such as GB, up to 50 characters. |
hidden |
boolean | Not offered on new orders; services that have it keep it. |
position |
integer | Its place in the group, lowest first. |
values |
array, required | The values (1 to 100; exactly one for yesno and quantity, its price). Each has id (to keep an existing value; none for a new one), title, code, hidden, and for each price key (once, w, m, q, b, a, bia, tria) <key>_price and <key>_setup_price. A saved value left out of the list is deleted. |
Returns: The option’s id.
Errors:
- Option not found (code 404)
- Option group not found (code 404)
- A group can have at most 100 options. (code 9999)
- Choose the kind of option. (code 9999)
- The kind of an option cannot change. Make a new option instead. (code 9999)
- The maximum cannot be below the minimum. (code 9999)
- An option needs at least one value. (code 9999)
- A yes/no or quantity option has exactly one value: its price. (code 9999)
- Value not found (code 404)
- A key may only have letters, digits, dots, dashes and underscores (at most 100). (code 9999)
Example
Request parameters:
{ "group_id": 2, "title": "RAM", "type": "select", "values": [ { "title": "2 GB", "m_price": 0 }, { "title": "4 GB", "m_price": 5, "a_price": 50 } ]}result:
7option_delete
Section titled “option_delete”POST /api/admin/product/option_delete
Deletes a configurable option with its values.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
id |
integer, required | The option’s id. |
Returns: true.
Errors:
- Option ID was not passed (code 9999)
- Option not found (code 404)
Orders keep the option lines they already have. This cannot be undone.
product_options_get
Section titled “product_options_get”POST /api/admin/product/product_options_get
Returns the option groups attached to a product (its Options tab) and every group.
Permission: View products (product.view)
| Parameter | Type | Description |
|---|---|---|
product_id |
integer, required | The product’s id. |
Returns: groups (the ids of its groups) and all_groups (every group, with the fields of admin/option_group_list).
Errors:
- Product ID was not passed (code 9999)
- Product not found (code 9999)
product_options_save
Section titled “product_options_save”POST /api/admin/product/product_options_save
Sets the option groups attached to a product, replacing the ones it had.
Permission: Manage products (product.manage_products)
| Parameter | Type | Description |
|---|---|---|
product_id |
integer, required | The product’s id. |
groups |
array | The group ids. Empty or left out: none. |
Returns: true.
Errors:
- Product ID was not passed (code 9999)
- Product not found (code 9999)
- Option group not found (code 404)
translations_get
Section titled “translations_get”POST /api/admin/product/translations_get
Returns the saved translations of a product, category, order form question or help desk.
Permission: View of the item’s own module: View products (product.view) for a product or category, View forms (formbuilder.view) for an order form question, View support tickets (support.view) for a help desk. Access to the Product module itself is not needed.
| Parameter | Type | Description |
|---|---|---|
kind |
string, required | product, category, field (an order form question) or helpdesk. |
id |
integer, required | The item’s id. |
Returns: default_locale (the default language, such as en_US) and translations: an object of locale code to { title, description }.
Errors:
- ID was not passed (code 9999)
- Unknown item. (code 9999) for another
kind.
Example
Request parameters:
{ "kind": "product", "id": 5}result:
{ "default_locale": "en_US", "translations": { "de_DE": { "title": "Business-Hosting", "description": null } }}currency_prices_get
Section titled “currency_prices_get”POST /api/admin/product/currency_prices_get
Returns the fixed prices of a product or TLD in each currency other than the default one.
Permission: View products (product.view) for a product; Manage TLDs (servicedomain.manage_tlds) for a TLD
| Parameter | Type | Description |
|---|---|---|
kind |
string, required | product (also for add-ons) or tld. |
id |
integer, required | The product’s or TLD’s id. |
Returns: default (the default currency code) and currencies: a list, each with code, rate and prices, an object of period to { price, setup_price } (null: converted at the rate). A product’s periods are once, 1W, 1M, 3M, 6M, 1Y, 2Y, 3Y; a TLD’s are register, renew and transfer.
Errors:
- Product ID was not passed (code 9999)
- Unknown item. (code 9999)
- Product not found (code 9999)
- TLD not found (code 9999)
Example
Request parameters:
{ "kind": "product", "id": 4}result:
{ "default": "USD", "currencies": [ { "code": "EUR", "rate": 0.92, "prices": { "1M": { "price": 4.5, "setup_price": null } } } ]}currency_prices_save
Section titled “currency_prices_save”POST /api/admin/product/currency_prices_save
Sets the fixed prices of a product or TLD in other currencies. A price you leave blank is converted from the default currency at the rate.
Permission: Manage products (product.manage_products) for a product; Manage TLDs (servicedomain.manage_tlds) for a TLD
| Parameter | Type | Description |
|---|---|---|
kind |
string, required | product or tld. |
id |
integer, required | The product’s or TLD’s id. |
prices |
object | An object of currency code to an object of period to { "price", "setup_price" }. Each currency you send replaces that currency’s fixed prices; a currency you leave out keeps them. TLDs have no setup price. |
Returns: true.
Errors:
- Unknown item. (code 9999)
- Product not found (code 9999)
- TLD not found (code 9999)
- Fixed prices can only be set for a currency other than the default one. (code 9999)
- Unknown billing period … (code 9999)
- Enter a price of 0 or more, or leave it blank to convert at the rate. (code 9999)
Example
Request parameters:
{ "kind": "product", "id": 4, "prices": { "EUR": { "1M": { "price": "4.50", "setup_price": "" }, "1Y": { "price": "45" } } }}result:
trueGuest calls
Section titled “Guest calls”get_list (guest)
Section titled “get_list (guest)”POST /api/guest/product/get_list
Lists the products the store shows: enabled, not hidden, not add-ons, by sort order.
| Parameter | Type | Description |
|---|---|---|
type |
string | Only this product type. |
search |
string | Text to find in the product name. |
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has the public fields of a product: id, product_category_id, type, title and description (in the visitor’s language when translated), slug, unit, priority, pricing (without registrar details), config (only the domain and free domain settings), addons, price_starting_from, prorata, icon_url, allow_quantity_select and form_id.
A store call: when the store is closed to the caller it returns an empty page. Prices are in the default currency; when the visitor chose a currency with fixed prices, those prices are given as their default-currency amount.
get_pairs (guest)
Section titled “get_pairs (guest)”POST /api/guest/product/get_pairs
Returns the products (not add-ons) as id and name pairs.
| Parameter | Type | Description |
|---|---|---|
type |
string | Only this product type. |
Returns: An object of product id to name: only enabled products that are not hidden, as the store shows them.
A store call: when the store is closed to the caller it returns an empty list.
get (guest)
Section titled “get (guest)”POST /api/guest/product/get
Returns one enabled product (not an add-on) by id or slug, as its store page shows it. Hidden products can be read too.
| Parameter | Type | Description |
|---|---|---|
id |
integer | The product’s id. Give id or slug. |
slug |
string | The product’s slug. |
Returns: The product, with the public fields of guest/get_list.
Errors:
- Product ID or slug is missing (code 9999)
- Product not found (code 404), also when the store is closed to the caller.
Example
Request parameters:
{ "slug": "starter-hosting"}result:
{ "id": 4, "product_category_id": 1, "type": "hosting", "title": "Starter Hosting", "slug": "starter-hosting", "description": "One website, 10 GB storage.", "unit": "product", "priority": 10, "pricing": { "type": "recurrent", "free": { "price": 0, "setup": 0 }, "once": { "price": 0, "setup": 0 }, "recurrent": { "1M": { "price": 5, "setup": 0, "enabled": true }, "1Y": { "price": 50, "setup": 0, "enabled": true } } }, "config": {}, "addons": [], "price_starting_from": 5, "prorata": [], "icon_url": null, "allow_quantity_select": false, "form_id": null}category_get_list (guest)
Section titled “category_get_list (guest)”POST /api/guest/product/category_get_list
Lists the categories that have at least one product the store shows, each with those products.
| Parameter | Type | Description |
|---|---|---|
page |
integer | Page number, from 1. Default 1. |
per_page |
integer | Rows per page, 1 to 500. Default 100. |
Returns: A paged list. Each row has id, title and description (in the visitor’s language when translated), icon_url, created_at, updated_at, price_starting_from, type (its first product’s type) and products (with the public fields of guest/get_list).
A store call: when the store is closed to the caller it returns an empty page.
category_get_pairs (guest)
Section titled “category_get_pairs (guest)”POST /api/guest/product/category_get_pairs
Returns every product category as id and name pairs, also when the store is closed.
No parameters.
Returns: An object of category id to name.
options (guest)
Section titled “options (guest)”POST /api/guest/product/options
Returns the configurable options a client may choose when ordering a product, with their prices. Hidden options and values are left out.
| Parameter | Type | Description |
|---|---|---|
product_id |
integer, required | The product’s id; it must be enabled. |
Returns: A list of options with the fields of admin/option_group_get (options), in group and position order. Prices are in the default currency.
Errors:
- Product not found (code 9999)
A store call: when the store is closed to the caller it returns an empty list.

