Products error codes
Every public API error code emitted by Products, with its HTTP status, its type and a page per code.
Error codes emitted by Products. Each code links to its own page with the cause and the action to take.
| Code | Type | HTTP | Description |
|---|---|---|---|
duplicate_pack_component | invalid_request_error | 422 | The same product, variant, presentation or configuration appears more than once in the pack. |
duplicate_promotion_item | invalid_request_error | 422 | The same article appears more than once in the offer, and each article can have only one price rule. |
gross_weight_not_allowed | invalid_request_error | 422 | This item cannot carry a gross transport weight: services have no weight, products and variants whose base unit is a mass unit (KGM, GRM) already weigh their quantity, and a variable-measure presentation is weighed on each line. |
invalid_gross_weight | invalid_request_error | 422 | The gross transport weight is not a number, is zero or negative, has more than 4 decimals or exceeds the column ceiling. On a goods line of a transport control document, also when the quantity times the weight per unit gives a line weight that rounds to 0 kg or exceeds that ceiling. |
invalid_pack_component | invalid_request_error | 422 | A component cannot be part of a pack, for example a product sold by real weight, whose price is only known at the scale. |
invalid_pack_image | invalid_request_error | 422 | The uploaded file is not a usable pack image: it is not a JPG, PNG, WebP or GIF image, it exceeds the maximum size or it could not be read. |
invalid_pack_pricing | invalid_request_error | 422 | The pack price is not valid for its mode: a missing or out-of-range value, more than two decimals, or a discount that equals or exceeds the price of the products separately. |
invalid_pack_status_transition | invalid_request_error | 422 | The requested status change is not allowed from the current pack status, for example activating a pack without sales channels or restoring one whose composition is blocked. |
invalid_promotion | invalid_request_error | 422 | A field of the offer breaks one of its rules: the name, the text shown on the web, the dates, the time zone, the channels or the list of articles. |
invalid_promotion_item | invalid_request_error | 422 | An article of the offer is not valid: its target, its mode, its basis or its value breaks a rule. |
pack_composition_too_small | invalid_request_error | 422 | A pack needs at least two components, or a single counted product with a quantity of 2 or more. |
pack_group_not_contiguous | invalid_request_error | 422 | The lines of the same pack are not consecutive in the document. Another line sits between them. |
pack_image_limit_reached | invalid_request_error | 422 | The pack already has the maximum of 5 images. |
pack_in_use | invalid_request_error | 422 | The pack is referenced by issued documents, so deleting it would break their composition. |
pack_line_locked | invalid_request_error | 422 | A line that belongs to a pack group cannot change its product, quantity, unit price or discount. |
pack_lines_must_be_expanded | invalid_request_error | 422 | The lines of a pack cannot be built by hand. The server splits the price among the components of the pack and sets the group data itself. |
pack_not_found | not_found_error | 404 | The identifier does not resolve to any pack of the authenticated company. |
pack_not_sellable | invalid_request_error | 422 | The pack cannot be added to a document: it is archived, inactive, out of its availability dates, or one of its components is inactive. |
pack_price_allocation_impossible | invalid_request_error | 422 | The pack price cannot be split among its components because they have no price when bought separately. |
pack_price_unreachable | invalid_request_error | 422 | The requested price including VAT cannot be reached exactly because VAT is rounded line by line. |
pack_print_mode_not_allowed | invalid_request_error | 422 | The only print mode is full_breakdown: every product of the pack is printed as a regular line with the pack name. |
pack_snapshot_invalid | invalid_request_error | 422 | The pack snapshot sent with the document line is unsigned, altered or malformed. |
product_in_use | invalid_request_error | 422 | The product is referenced by issued documents or by other catalogue entries, and removing it would leave those references dangling. |
product_not_found | not_found_error | 404 | The identifier does not resolve to any product of the authenticated company. |
promotion_not_found | not_found_error | 404 | The identifier does not resolve to any offer of the authenticated company. |
promotion_read_only | invalid_request_error | 422 | The offer has ended or been cancelled, so it is read-only and accepts no further changes. |
promotion_started | invalid_request_error | 422 | The offer has already started and is part of the price history. A started offer only allows changing its end date and cannot be deleted. |
sku_already_exists | conflict_error | 409 | Another product of the company already uses that SKU, and the SKU identifies the item uniquely in the catalogue. |
slug_already_exists | conflict_error | 409 | The slug is already used, as current or previous slug, by another product or pack of the company. |
Related
Error codes by category
Find an error by the category that emits it.
Full reference table
All codes, HTTP statuses, types and descriptions in one reference.
Error model
Interpret the error envelope and handle errors by code.