Skip to main content
POST
Create product

Authorizations

Authorization
string
header
required

An API token from Sign in, sent as Authorization: Bearer <token>. Tokens last 30 days.

Body

application/json
type
enum<string>
required

Product type: goods, service, consu (consumable).

Available options:
goods,
service
Example:

"goods"

name
string
required

Product name (max 255 characters). Must not be greater than 255 characters.

Example:

"Laptop Computer"

price
number
required

Sales price (minimum 0). Must be at least 0.

Example:

999.99

category_id
integer
required

Product category ID. The id of an existing record in the products_categories table.

Example:

1

service_tracking
string | null

Must not be greater than 255 characters.

Example:

"b"

reference
string | null

Internal reference code (max 255 characters). Must not be greater than 255 characters.

Example:

"PROD-001"

barcode
string | null

Product barcode (max 255 characters). Must not be greater than 255 characters.

Example:

"1234567890"

cost
number | null

Product cost (minimum 0). Must be at least 0.

Example:

750

volume
number | null

Product volume (min 0, max 99999999999). Must be at least 0. Must not be greater than 99999999999.

Example:

0.5

weight
number | null

Product weight (min 0, max 99999999999). Must be at least 0. Must not be greater than 99999999999.

Example:

2.5

description
string | null

Product description.

Example:

"High-performance laptop with latest specifications."

description_purchase
string | null

Purchase description.

Example:

"Enterprise laptop for business use."

description_sale
string | null

Sales description.

Example:

"Perfect for professionals and power users."

enable_sales
boolean | null

Whether this product can be sold.

Example:

false

enable_purchase
boolean | null

Whether this product can be purchased.

Example:

false

is_favorite
boolean | null

Mark this product as favorite.

Example:

false

images
string[] | null
Example:
uom_id
integer | null

Unit of measure ID.

Example:

1

uom_po_id
integer | null

Purchase unit of measure ID.

Example:

1

company_id
integer | null

Company ID this product belongs to.

Example:

1

tags
integer[]

The id of an existing record in the products_tags table.

Example:

Response

Created