## Creates or updates products in bulk.

**post** `/api/v2/public/products`

Creates or updates products in bulk.

### Query Parameters

- `flush: optional boolean`

  When true, removes existing products before inserting.

### Body Parameters

- `products: optional array of object { carrier_item_quantity, is_counted, price_compare_multiplier, 79 more }`

  The products to create or update.

  - `carrier_item_quantity: number`

    Quantity per carrier item.

  - `is_counted: boolean`

    Whether the product is counted.

  - `price_compare_multiplier: number`

    Multiplier used for unit price comparison.

  - `product_name: string`

    Display name of the product.

  - `product_number: string`

    Unique product number.

  - `allow_decimal: optional boolean`

    Whether decimal quantities are allowed.

  - `attention_code: optional array of string`

    Attention codes applied to the product.

  - `average_weight: optional number`

    Average weight of the product.

  - `barcode: optional string`

    Primary barcode for the product.

  - `barcodes_array: optional array of object { barcode }`

    Additional barcodes for the product.

    - `barcode: optional string`

      Barcode value.

  - `base_unit_name: optional string`

    Name of the base unit (e.g. piece, kg).

  - `brand_code: optional string`

    Brand code.

  - `brand_description: optional string`

    Brand description.

  - `category_code: optional string`

    Category code the product belongs to.

  - `color: optional string`

    Color name.

  - `color_code: optional string`

    Color code.

  - `countries_allowed: optional array of string`

    Countries where the product is allowed.

  - `countries_not_allowed: optional array of string`

    Countries where the product is excluded.

  - `country_code: optional string`

    ISO country code; defaults to "NL".

  - `default_location_tag: optional string`

    Default location tag for the product.

  - `deprecation_date: optional string`

    Date the product is deprecated.

  - `expiration_min_range: optional number`

    Minimum days remaining before expiration triggers an alert.

  - `free_fields: optional array of object { sort_order, key, value }`

    Custom free-field key/value pairs.

    - `sort_order: number`

      Sort order for display purposes.

    - `key: optional string`

      Free-field key.

    - `value: optional string`

      Free-field value.

  - `general_ledger_account_number: optional number`

    General ledger account number.

  - `image_url: optional string`

    URL of the product image.

  - `ioq: optional number`

    Initial order quantity.

  - `is_active: optional boolean`

    Whether the product is active.

  - `is_adr: optional boolean`

    Whether the product is classified as ADR (hazardous goods).

  - `is_deleted: optional boolean`

    Whether the product is marked deleted.

  - `is_edit_min_max: optional boolean`

    Whether min/max can be edited at store level.

  - `is_edit_replenishment: optional boolean`

    Whether replenishment values can be edited at store level.

  - `is_expiration: optional boolean`

    Whether expiration tracking is enabled for the product.

  - `is_markdown_allowed: optional boolean`

    Whether markdown is allowed for the product.

  - `is_order_manually: optional boolean`

    Whether the product is ordered manually.

  - `is_ordering: optional boolean`

    Whether the product can be ordered.

  - `is_promotion: optional boolean`

    Whether the product is currently in promotion.

  - `is_reset_store_stock: optional boolean`

    When true, resets store stock for the product.

  - `is_set: optional boolean`

    Whether the product is a set/bundle.

  - `is_stock: optional boolean`

    Whether the product is stocked.

  - `is_store_product: optional boolean`

    Whether the product is store-specific.

  - `is_template: optional boolean`

    Whether the product is a template.

  - `is_theft: optional boolean`

    Whether the product is theft-sensitive.

  - `ledger_dimension_value: optional string`

    Ledger dimension value used for VC exports.

  - `margin_category: optional string`

    Margin category classification.

  - `moq: optional number`

    Minimum order quantity.

  - `price: optional number`

    Sale price.

  - `price_compare_unit: optional string`

    Unit used for price comparison (e.g. per kg).

  - `price_lines: optional string`

    Comma-separated price line identifiers.

  - `product_description: optional string`

    A description of the product.

  - `product_details: optional string`

    Free-form product details.

  - `product_reference_number: optional string`

    External product reference number.

  - `product_status: optional string`

    Product life-cycle status.

  - `product_type: optional string`

    Product type classification.

  - `product_url: optional string`

    URL of the product detail page.

  - `promo_stores_allowed: optional array of string`

    Stores where the product is allowed for promotion.

  - `promo_stores_not_allowed: optional array of string`

    Stores where the product is excluded from promotion.

  - `promotion_price: optional number`

    Promotional price.

  - `promotion_text: optional string`

    Promotion text shown on shelf labels.

  - `promotion_week: optional string`

    Week identifier the promotion applies to.

  - `purchase_price: optional number`

    Purchase price from the supplier.

  - `purchase_unit_barcode: optional string`

    Barcode of the purchase unit.

  - `purchase_unit_name: optional string`

    Name of the purchase unit.

  - `purchase_unit_product_number: optional string`

    Product number of the purchase unit.

  - `purchase_unit_quantity: optional number`

    Quantity in a purchase unit.

  - `purchbook_free_txt: optional string`

    Free text used for purchase book/order exports.

  - `referral_product_number: optional string`

    Referral product number used as a substitute.

  - `set_products: optional array of object { set_item_quantity, set_product_number }`

    Products bundled within this set.

    - `set_item_quantity: optional string`

      Quantity of the bundled item.

    - `set_product_number: optional string`

      Product number of the bundled item.

  - `shelf_labels: optional array of object { shelflabel_1, shelflabel_2, shelflabel_3, 3 more }`

    Shelf-label text fields for the product.

    - `shelflabel_1: optional string`

      Shelf label slot 1.

    - `shelflabel_2: optional string`

      Shelf label slot 2.

    - `shelflabel_3: optional string`

      Shelf label slot 3.

    - `shelflabel_4: optional string`

      Shelf label slot 4.

    - `shelflabel_5: optional string`

      Shelf label slot 5.

    - `shelflabel_6: optional string`

      Shelf label slot 6.

  - `size: optional string`

    Size descriptor.

  - `size_code: optional string`

    Size code.

  - `smallest_product_number: optional string`

    Product number of the smallest sub-unit.

  - `smallest_quantity: optional number`

    Quantity of the smallest sub-unit.

  - `store_number: optional string`

    Store number when the product is store-specific.

  - `stores_allowed: optional array of string`

    Stores where the product is allowed.

  - `stores_not_allowed: optional array of string`

    Stores where the product is excluded.

  - `supplier_name: optional string`

    Supplier name.

  - `supplier_number: optional string`

    Supplier number.

  - `supplier_product_number: optional string`

    Supplier's product number.

  - `units: optional array of object { unit_barcode, unit_name, unit_quantity }`

    Units of measure (e.g. box, pallet) the product is sold in.

    - `unit_barcode: string`

      Barcode of the unit.

    - `unit_name: string`

      Name of the unit.

    - `unit_quantity: number`

      Quantity per unit.

  - `variant_code: optional string`

    Variant code.

  - `variant_family: optional string`

    Variant family.

  - `volume: optional string`

    Volume / size descriptor.

### Returns

- `success: boolean`

  Indicates whether the operation completed successfully.

- `data: optional string`

  Optional data payload returned by the operation.

- `message: optional string`

  Human-readable message describing the result.

### Example

```http
curl https://api.colleqtive.net/api/v2/public/products \
    -X POST \
    -H "Authorization: $COLLEQTIVE_BEARER_TOKEN"
```

#### Response

```json
{
  "success": true,
  "data": "data",
  "message": "message"
}
```
