Skip to main content
POST
Create a product

Authorizations

Authorization
string
header
required

Workspace API key sent as a bearer token: Authorization: Bearer failfast_.... Create keys in Settings -> Workspace -> API Keys.

Body

A ModelSerializer that takes an additional fields argument that controls which fields should be displayed.

code
string
required
name
string
required
tracking_method
enum<string>
required
  • N - NONE
  • S - SERIAL
  • B - BATCH
Available options:
N,
S,
B
conversion_factor
string<decimal>
required
Pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
is_imported
boolean
required
manage_committed_inventory
boolean
required
has_substitute
boolean
required
product_class
enum<string>
required
  • NO - NONE
  • RM - RAW_MATERIAL
  • PR - IN_PROCESS
  • FP - FINISHED_PRODUCT
Available options:
NO,
RM,
PR,
FP
group
string<uuid>
required
base_unit
string<uuid>
required
product_type
string<uuid>
required
custom_fields
unknown
description
string | null
is_active
boolean
product_option
string<uuid>[] | null
brand
string<uuid> | null
alternative_measure_unit
string<uuid> | null
tree_hash
string<uuid> | null

Response

201 - application/json
message
string
required

Human-readable outcome of the request.

error
boolean
required

true when the request failed.

Example:

false

data
object
required

A ModelSerializer that takes an additional fields argument that controls which fields should be displayed.