Factuarea APIDevelopers

catalog_variant_required

The line names a product that has active variants and does not say which one. Without a variant, the line would be charged at the product price and would move the product's shared stock without saying which variant it refers to, so it is rejected when the selection is created or changed in sales documents, sales orders, purchase invoices, purchase orders and stock transfers, also from imports and MCP tools. `param` is `lines.N.variant_id` (`lines.N.product_variant_id` on purchase orders and transfers) and `line_index` is the line. A product whose variants are all deactivated does not require it, nor does a line the document already stored without a variant and that is sent again untouched. Purchase and transfer lines, which only move stock, do not require it either when the shared stock of the product is in use: the product manages stock and at least one active variant has no stock of its own, and the line goes to the shared balance of the product.

CodeTypeHTTPCategory
catalog_variant_requiredinvalid_request_error422Products

Cause

The line names a product that has active variants and does not say which one. Without a variant, the line would be charged at the product price and would move the product's shared stock without saying which variant it refers to, so it is rejected when the selection is created or changed in sales documents, sales orders, purchase invoices, purchase orders and stock transfers, also from imports and MCP tools. param is lines.N.variant_id (lines.N.product_variant_id on purchase orders and transfers) and line_index is the line. A product whose variants are all deactivated does not require it, nor does a line the document already stored without a variant and that is sent again untouched. Purchase and transfer lines, which only move stock, do not require it either when the shared stock of the product is in use: the product manages stock and at least one active variant has no stock of its own, and the line goes to the shared balance of the product.

What to do

Set the identifier of an active variant of the product on that line (GET /v1/companies/{company}/products/{product}/variants lists them) and repeat the same request. To sell the product without a variant, deactivate or delete all of its variants first.

On this page

Need a hand?Contact support