Skip to content

Products

Products: code, unit, price, VAT, minimum stock.

Module: Catalog (catalog).

  • GET /api/v1/products - List with filters, sorting and pagination (scope catalog:read)
  • GET /api/v1/products/{id} - A record by id (scope catalog:read)
  • POST /api/v1/products - Create a record (scope catalog:write)
  • PATCH /api/v1/products/{id} - Modify the submitted fields (scope catalog:write)
  • DELETE /api/v1/products/{id} - Delete or deactivate (scope catalog:write)
  • POST /api/v1/products/{id}/set_options - The product’s attributes and their values, including those variants are made from. (scope shop:write)
  • POST /api/v1/products/{id}/generate_variants - Creates the missing variants from the attributes marked for variants. (scope shop:write)
  • POST /api/v1/products/{id}/create_variant - New product variant. (scope shop:write)
  • POST /api/v1/products/{id}/update_variant - Modifies a variant. (scope shop:write)
  • POST /api/v1/products/{id}/delete_variant - Deletes a variant. (scope shop:write)
  • POST /api/v1/products/{id}/set_attributes - The specifications shown on the product. (scope shop:write)
  • POST /api/v1/products/{id}/add_media - Adds a photo (JPG, PNG or WebP, up to 8 MB), in base64. The type is checked by content. (scope catalog:write)
  • POST /api/v1/products/{id}/add_from_gallery - Links a gallery image to the product, without a copy. (scope catalog:write)
  • POST /api/v1/products/{id}/delete_media - Deletes a product photo. (scope catalog:write)
  • POST /api/v1/products/{id}/set_media_alt - A photo’s alt text. (scope catalog:write)
  • POST /api/v1/products/{id}/add_barcode - Extra barcode. (scope inventory:write)
  • POST /api/v1/products/{id}/remove_barcode - Removes a barcode. (scope inventory:write)
  • POST /api/v1/products/{id}/set_variant_stock - Variant stock in the chosen warehouse and the availability mode. (scope inventory:write)
  • POST /api/v1/products/{id}/set_collections - Replaces the product’s collections. (scope shop:write)
  • id (string, uuid; read): Unique identifier (UUID).
  • sku (string; write): Code (SKU)
  • name (string; write, required): Name
  • is_active (boolean; write): Whether the record is active.
  • custom_fields (object; read): Custom fields (key-value object). Definitions are created in the ERP; see the guide on docs.rivil.app.
  • created_at (string, date-time; read): Creation date (ISO 8601).
  • category (string; write): Category
  • unit (string; write): Unit of measure
  • barcode (string; write): Barcode
  • brand (string; write): Manufacturer
  • description (string; write): Description
  • min_stock (number; write): Minimum stock (alert)
  • reorder_qty (number; write): Reorder quantity
  • track_lots (boolean; write): Track lots and expiry dates
  • avg_cost (number; read)
  • sale_price (number; write): Regular price (excl. VAT)
  • vat_rate (number; write): VAT (%)
  • is_stockable (boolean; write): Stock tracked
  • preferred_supplier_id (string, uuid; write): Preferred supplier
  • updated_at (string, date-time; read): Last modification date (ISO 8601).
  • purchase_unit (string; write): Purchase unit (e.g. box)
  • purchase_factor (number; write): Stock units per purchase unit (e.g. 100)
  • kind (string; write): Type
  • parent_product_id (string, uuid; read)
  • variant_options (object; read)
  • weight_grams (number; write): Weight (g)
  • length_mm (number; write): Length (mm)
  • width_mm (number; write): Width (mm)
  • height_mm (number; write): Height (mm)
  • allow_backorder (boolean; write): Allow backorder (order without stock)
  • is_kit (boolean; write): Kit (made of other products)
  • returnable (boolean; write): Returnable
  • has_variants (boolean; write): Product with variants (price is set on each variant)
  • online_availability (string; write): Availability in the shop
  • stock_type (string; write): Stock type (account)
  • nc_code (string; write): CN code (customs)
  • profile_data (object; read)
  • products.created
  • products.updated
  • products.deleted

Accepts custom fields in custom_fields. docs.rivil.app documents the capability; the list for your company is in the ERP, under Settings, API.