Skip to main content
POST
/
api
/
products
Create Product
curl --request POST \
  --url https://qwoty.app/api/products \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "api_name": "<string>",
  "recurrence_type": "<string>",
  "name": "<string>",
  "reference": "<string>",
  "description": "<string>",
  "is_active": true,
  "catalog_ids": [
    "<string>"
  ],
  "category_ids": [
    "<string>"
  ],
  "id_crm": "<string>",
  "id_erp": "<string>",
  "id_accounting": "<string>",
  "inventory[sku]": "<string>",
  "settings[unit_per_pack]": 123,
  "accounting[ledger_account]": "<string>",
  "identifiers[crm]": "<string>",
  "identifiers[erp]": "<string>",
  "identifiers[accounting]": "<string>",
  "shipping[weight]": 123,
  "shipping[weight_unit]": "<string>",
  "shipping[height]": 123,
  "shipping[length]": 123,
  "shipping[width]": 123,
  "shipping[length_unit]": "<string>",
  "shipping[country_of_origin]": "<string>",
  "shipping[harmonized_system_code]": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "catalog_ids": ["660e8400-e29b-41d4-a716-446655440001"],
    "category_ids": ["770e8400-e29b-41d4-a716-446655440002"],
    "product_ids": ["880e8400-e29b-41d4-a716-446655440003"],
    "name": "Premium Widget",
    "api_name": "premium_widget",
    "recurrence_type": "one_off",
    "reference": "PROD-001",
    "description": "High-quality widget for professional use",
    "is_active": true,
    "id_crm": null,
    "id_erp": null,
    "id_accounting": null,
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T10:30:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.qwoty.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorization

Authorization
string
required
Bearer token for authentication. Format: Bearer qwoty_your_token

Request Body

api_name
string
required
Unique API identifier (snake_case). Can only contain lowercase letters, numbers and underscores.
recurrence_type
string
required
Billing model. Allowed values: one_off, recurring
name
string
required
Product name
reference
string
Internal reference code for the default variant
description
string
Product description
is_active
boolean
default:"true"
Active status
catalog_ids
string[]
Array of catalog UUIDs to link the product to. The workspace default catalog is always included automatically.
category_ids
string[]
Array of product category UUIDs to assign to this product.
id_crm
string
External CRM ID
id_erp
string
External ERP ID
id_accounting
string
External accounting ID
inventory[sku]
string
Stock Keeping Unit
settings[unit_per_pack]
number
Number of units per pack
accounting[ledger_account]
string
Ledger account code
identifiers[crm]
string
External CRM identifier (bracket notation)
identifiers[erp]
string
External ERP identifier (bracket notation)
identifiers[accounting]
string
External accounting identifier (bracket notation)
shipping[weight]
number
Shipping weight
shipping[weight_unit]
string
Weight unit. Allowed values: kg, lbs
shipping[height]
number
Shipping height
shipping[length]
number
Shipping length
shipping[width]
number
Shipping width
shipping[length_unit]
string
Length unit (e.g., cm, in)
shipping[country_of_origin]
string
ISO country code of origin
shipping[harmonized_system_code]
string
HS code for customs

Examples

curl -X POST https://qwoty.app/api/products \
  -H "Authorization: Bearer qwoty_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "api_name": "premium_widget",
    "recurrence_type": "one_off",
    "name": "Premium Widget",
    "description": "High-quality widget for professional use",
    "reference": "PROD-001",
    "is_active": true,
    "catalog_ids": ["660e8400-e29b-41d4-a716-446655440001"],
    "category_ids": ["770e8400-e29b-41d4-a716-446655440002"],
    "inventory[sku]": "WID-PRE-001",
    "settings[unit_per_pack]": 1,
    "accounting[ledger_account]": "4010",
    "identifiers[crm]": "crm_123",
    "identifiers[erp]": "erp_456",
    "identifiers[accounting]": "acc_789",
    "shipping[weight]": 2.5,
    "shipping[weight_unit]": "kg",
    "shipping[height]": 10,
    "shipping[length]": 30,
    "shipping[width]": 20,
    "shipping[length_unit]": "cm",
    "shipping[country_of_origin]": "FR",
    "shipping[harmonized_system_code]": "8471.30"
  }'

Response

success
boolean
Indicates if the request was successful
data
object
The created product object with all fields
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "catalog_ids": ["660e8400-e29b-41d4-a716-446655440001"],
    "category_ids": ["770e8400-e29b-41d4-a716-446655440002"],
    "product_ids": ["880e8400-e29b-41d4-a716-446655440003"],
    "name": "Premium Widget",
    "api_name": "premium_widget",
    "recurrence_type": "one_off",
    "reference": "PROD-001",
    "description": "High-quality widget for professional use",
    "is_active": true,
    "id_crm": null,
    "id_erp": null,
    "id_accounting": null,
    "created_at": "2024-12-21T10:30:00Z",
    "updated_at": "2024-12-21T10:30:00Z"
  }
}

Error Responses

{
  "success": false,
  "error": "Validation error",
  "details": [
    "Field 'api_name' is required",
    "Field 'recurrence_type' is required (one_off | recurring)"
  ]
}