Products
Products: code, unit, price, VAT, minimum stock.
Module: Catalog (catalog).
Endpoints
Section titled “Endpoints”GET /api/v1/products- List with filters, sorting and pagination (scopecatalog:read)GET /api/v1/products/{id}- A record by id (scopecatalog:read)POST /api/v1/products- Create a record (scopecatalog:write)PATCH /api/v1/products/{id}- Modify the submitted fields (scopecatalog:write)DELETE /api/v1/products/{id}- Delete or deactivate (scopecatalog:write)POST /api/v1/products/{id}/set_options- The product’s attributes and their values, including those variants are made from. (scopeshop:write)POST /api/v1/products/{id}/generate_variants- Creates the missing variants from the attributes marked for variants. (scopeshop:write)POST /api/v1/products/{id}/create_variant- New product variant. (scopeshop:write)POST /api/v1/products/{id}/update_variant- Modifies a variant. (scopeshop:write)POST /api/v1/products/{id}/delete_variant- Deletes a variant. (scopeshop:write)POST /api/v1/products/{id}/set_attributes- The specifications shown on the product. (scopeshop: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. (scopecatalog:write)POST /api/v1/products/{id}/add_from_gallery- Links a gallery image to the product, without a copy. (scopecatalog:write)POST /api/v1/products/{id}/delete_media- Deletes a product photo. (scopecatalog:write)POST /api/v1/products/{id}/set_media_alt- A photo’s alt text. (scopecatalog:write)POST /api/v1/products/{id}/add_barcode- Extra barcode. (scopeinventory:write)POST /api/v1/products/{id}/remove_barcode- Removes a barcode. (scopeinventory:write)POST /api/v1/products/{id}/set_variant_stock- Variant stock in the chosen warehouse and the availability mode. (scopeinventory:write)POST /api/v1/products/{id}/set_collections- Replaces the product’s collections. (scopeshop:write)
Fields
Section titled “Fields”id(string, uuid; read): Unique identifier (UUID).sku(string; write): Code (SKU)name(string; write, required): Nameis_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): Categoryunit(string; write): Unit of measurebarcode(string; write): Barcodebrand(string; write): Manufacturerdescription(string; write): Descriptionmin_stock(number; write): Minimum stock (alert)reorder_qty(number; write): Reorder quantitytrack_lots(boolean; write): Track lots and expiry datesavg_cost(number; read)sale_price(number; write): Regular price (excl. VAT)vat_rate(number; write): VAT (%)is_stockable(boolean; write): Stock trackedpreferred_supplier_id(string, uuid; write): Preferred supplierupdated_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): Typeparent_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): Returnablehas_variants(boolean; write): Product with variants (price is set on each variant)online_availability(string; write): Availability in the shopstock_type(string; write): Stock type (account)nc_code(string; write): CN code (customs)profile_data(object; read)
Events
Section titled “Events”products.createdproducts.updatedproducts.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.