Error codes
When the module refuses a request, it answers HTTP 400 with a body of three
fields: a code, params and a message.
{
"code": "STOCKS.OPERATION.SOURCE_REQUIRED",
"params": {},
"message": "Vous devez renseigner l'emplacement source !"
}
The code and the params form the stable contract: that is what a program
reacts on, never the text. The message repeats the reason in the language of
the caller — French for a machine call — so that a client reading only the
message keeps working. That contract is additive: new codes may appear, the
existing ones do not change meaning. A response without a code is a legacy
refusal, not migrated yet; treat it as a generic error.
Params before text
The values quoted in a message — an item, a batch, a quantity — are also
present in params. Extract them from there rather than reading them in the
sentence: the sentence may be rephrased, the key may not.
The messages listed below are the English wordings the interface displays. A
machine call receives the French wording of the same code.
Operations
| Code |
Params |
Message |
STOCKS.OPERATION.NOT_FOUND |
— |
The operation was not found |
STOCKS.OPERATION.NOT_DRAFT |
— |
The document must be in draft mode to be edited |
STOCKS.OPERATION.NOT_DRAFT_TO_VALIDATE |
— |
The operation must be in draft mode to be validated |
STOCKS.OPERATION.NOT_VALIDATED |
— |
The operation must be validated to be executed |
STOCKS.OPERATION.EXECUTED_UNDELETABLE |
— |
You cannot delete an executed operation |
STOCKS.OPERATION.CANCEL_REQUIRES_EXECUTED |
operation |
Operation operation must be executed to be canceled |
STOCKS.OPERATION.RETURN_TYPE_REQUIRED |
operation |
A return type must be defined to cancel operation operation |
STOCKS.OPERATION.ALREADY_CANCELLED |
operation |
A cancellation operation already exists for operation operation |
STOCKS.OPERATION.SOURCE_REQUIRED |
— |
You must provide the source location |
STOCKS.OPERATION.DESTINATION_REQUIRED |
— |
You must provide the destination location |
STOCKS.OPERATION.SOURCE_EQUALS_DESTINATION |
— |
The source location must differ from the destination location |
STOCKS.OPERATION.SOURCE_MUST_BE_VIRTUAL |
— |
You must pick a virtual location as the source location |
STOCKS.OPERATION.SOURCE_MUST_BE_INTERNAL |
— |
You must pick an internal location as the source location |
STOCKS.OPERATION.DESTINATION_MUST_BE_VIRTUAL |
— |
You must pick a virtual location as the destination location |
STOCKS.OPERATION.DESTINATION_MUST_BE_INTERNAL |
— |
You must pick an internal location as the destination location |
STOCKS.OPERATION.PARENT_LOCATION_AS_SOURCE |
— |
A parent location cannot serve as the source of an operation |
STOCKS.OPERATION.PARENT_LOCATION_AS_DESTINATION |
— |
A parent location cannot serve as the destination of an operation |
STOCKS.OPERATION.INTERNAL_LOCATION_REQUIRED |
— |
You must select at least one internal location |
STOCKS.OPERATION.SEQUENCE_EMPTY |
— |
The sequence is empty |
STOCKS.OPERATION.REFERENCE_TAKEN |
— |
This reference is already taken |
STOCKS.OPERATION.CATEGORY_UNSUPPORTED |
— |
The operation category is not supported |
STOCKS.OPERATION.MUST_BE_INBOUND |
— |
The operation must be an entry operation |
STOCKS.OPERATION.MUST_BE_OUTBOUND |
— |
The operation must be an exit operation |
STOCKS.OPERATION.MUST_BE_INTERNAL |
— |
The operation must be an internal operation |
Operation lines
| Code |
Params |
Message |
STOCKS.OPERATION_LINE.NOT_FOUND |
— |
The operation movement was not found |
STOCKS.OPERATION_LINE.QUANTITY_NOT_POSITIVE |
— |
The quantity must be greater than 0 |
STOCKS.OPERATION_LINE.QUANTITY_INVALID |
— |
Invalid quantity: it cannot be lower than or equal to 0 |
STOCKS.OPERATION_LINE.COST_NEGATIVE |
— |
The item cost cannot be negative |
STOCKS.OPERATION_LINE.AMOUNT_NOT_POSITIVE |
— |
You must enter a positive amount |
STOCKS.OPERATION_LINE.MOVEMENT_ALREADY_EXECUTED |
— |
The movement has already been executed |
STOCKS.OPERATION_LINE.PARENT_LOCATION_AS_DESTINATION |
— |
You cannot use a parent location as the destination location |
STOCKS.OPERATION_LINE.STOCK_INSUFFICIENT |
article, available, requested |
The stock of item article is exhausted. In stock: available / To withdraw: requested |
STOCKS.OPERATION_LINE.BATCH_NOT_IN_LOCATION |
location, batch |
Location location does not hold batch batch |
STOCKS.OPERATION_LINE.BATCH_INSUFFICIENT |
batch, article, location |
Batch batch does not hold enough article in location location |
Inventories
| Code |
Params |
Message |
STOCKS.INVENTORY.NOT_FOUND |
— |
The inventory was not found |
STOCKS.INVENTORY.INTERNAL_LOCATION_REQUIRED |
— |
You must select at least one internal location |
STOCKS.INVENTORY.LOCATION_MUST_BE_INTERNAL |
— |
The location must be internal |
STOCKS.INVENTORY.LOCATION_WAREHOUSE_MISMATCH |
— |
The location does not belong to the selected warehouse |
STOCKS.INVENTORY.LOCATION_NOT_OF_INVENTORY_WAREHOUSE |
— |
The location does not belong to the inventory warehouse |
STOCKS.INVENTORY.LOCATION_NOT_OF_GIVEN_WAREHOUSE |
— |
The location does not belong to the given warehouse |
STOCKS.INVENTORY.ADJUSTMENT_LOCATION_MUST_BE_INTERNAL |
— |
The location must be internal for inventory adjustments |
STOCKS.INVENTORY.PERIOD_AND_TYPE_REQUIRED |
— |
The period and type information are required |
STOCKS.INVENTORY.COUNTED_QUANTITY_NEGATIVE |
— |
The counted quantity must be greater than or equal to 0 |
STOCKS.INVENTORY.TREATED_LINE_REQUIRED |
— |
The inventory must hold at least one processed line |
STOCKS.INVENTORY.CLOSED_NOT_VALIDATABLE |
— |
A closed inventory cannot be validated |
STOCKS.INVENTORY.CLOSED_NOT_EXECUTABLE |
— |
A closed inventory cannot be executed |
STOCKS.INVENTORY.CLOSED_NOT_EDITABLE |
inventory |
A closed inventory cannot be edited |
STOCKS.INVENTORY.CLOSED_NOT_REOPENABLE |
— |
A closed inventory cannot be reopened |
STOCKS.INVENTORY.ALREADY_CLOSED |
— |
The inventory has already been closed |
STOCKS.INVENTORY.ADJUSTMENTS_REQUIRED |
— |
You must apply the adjustments before finalizing |
STOCKS.INVENTORY.ADJUSTMENT_TYPES_MISSING |
inventory |
Adjustment operation types not found for inventory inventory |
STOCKS.INVENTORY.LINES_TREAT_AFTER_VALIDATION |
— |
Lines cannot be processed after validation |
STOCKS.INVENTORY.LINES_UNTREAT_AFTER_VALIDATION |
— |
Lines cannot be unprocessed after validation |
STOCKS.INVENTORY.VALIDATED_UNDELETABLE |
— |
You cannot delete a validated or closed inventory |
STOCKS.INVENTORY.NOT_CANCELABLE |
— |
The inventory cannot be canceled in its current status |
STOCKS.INVENTORY.NOT_CANCELED |
— |
The inventory is not canceled |
STOCKS.INVENTORY.IMPORT_FILE_INVALID |
line, column |
Invalid inventory file at line line for column column |
Inventory lines
| Code |
Params |
Message |
STOCKS.INVENTORY_LINE.NOT_FOUND |
— |
The inventory line was not found |
STOCKS.INVENTORY_LINE.REAL_QUANTITY_ON_STOCKOUT |
— |
The real quantity cannot be > 0 when the state is Out of stock |
STOCKS.INVENTORY_LINE.TREAT_AFTER_VALIDATION |
— |
A line cannot be processed or unprocessed after validation |
STOCKS.INVENTORY_LINE.SPLIT_QUANTITY_INVALID |
— |
The split quantity must be > 0 and < the theoretical quantity |
STOCKS.INVENTORY_LINE.LOCATION_MUST_BE_INTERNAL |
location |
The location must be internal, id location |
STOCKS.INVENTORY_LINE.LOCATION_WAREHOUSE_MISMATCH |
warehouse |
The location does not belong to warehouse warehouse |
STOCKS.INVENTORY_LINE.LOCATION_NOT_OF_INVENTORY |
inventory |
The location is not attached to inventory inventory |
STOCKS.INVENTORY_LINE.ARTICLE_ALREADY_LISTED |
inventory |
The item is already listed in inventory inventory |
Items
| Code |
Params |
Message |
STOCKS.ARTICLE.NOT_FOUND |
— |
The item was not found |
STOCKS.ARTICLE.LABEL_REQUIRED |
— |
You must provide the label |
STOCKS.ARTICLE.LABEL_MISSING |
— |
You must provide a label |
STOCKS.ARTICLE.REFERENCE_MISSING |
— |
You must provide a reference |
STOCKS.ARTICLE.INTERNAL_REFERENCE_REQUIRED |
— |
You must provide the internal reference |
STOCKS.ARTICLE.PACKAGING_REQUIRED |
— |
You must provide the item packaging |
STOCKS.ARTICLE.INTERNAL_REFERENCE_TAKEN |
— |
This internal reference is already taken |
STOCKS.ARTICLE.REFERENCE_TAKEN |
— |
This reference is already in use |
STOCKS.ARTICLE.NOT_STORABLE |
— |
This item is not storable |
STOCKS.ARTICLE.HAS_MOVEMENTS |
— |
Stock movements have already been recorded on this item |
STOCKS.ARTICLE.DELIVERY_TYPE_MISSING |
— |
No delivery operation is configured |
STOCKS.ARTICLE.RECEPTION_TYPE_MISSING |
— |
No reception operation is configured |
STOCKS.ARTICLE.CONVERSION_STOCK_INSUFFICIENT |
article, available, requested |
There is not enough article. Current stock: available / Quantity to withdraw: requested |
STOCKS.ARTICLE.CONVERSION_NOT_MULTIPLE |
quantity, rule |
quantity is not a multiple of rule |
STOCKS.ARTICLE.CONVERSION_QUANTITY_NOT_MULTIPLE |
quantity, target |
The quantity to convert (quantity) is not a multiple of the target item quantity (target) |
STOCKS.ARTICLE.CONVERSION_TARGET_NOT_STORABLE |
source, target, article |
The conversion of source into target failed: item article is not a storable item |
STOCKS.ARTICLE.CONVERSION_FAILED |
sourceQuantity, source, targetQuantity, target |
The conversion of sourceQuantity source into targetQuantity target failed |
STOCKS.ARTICLE.CONVERSION_FAILED_DETAILED |
source, sourceQuantity, target, targetQuantity |
The conversion of source (quantity=sourceQuantity) into target (quantity=targetQuantity) failed |
Families and subfamilies
| Code |
Params |
Message |
STOCKS.ARTICLE_FAMILY.NOT_FOUND |
— |
The item family was not found |
STOCKS.ARTICLE_FAMILY.LABEL_REQUIRED |
— |
You must provide the label |
STOCKS.ARTICLE_FAMILY.NAME_REQUIRED |
— |
The name cannot be empty |
STOCKS.ARTICLE_FAMILY.UNDELETABLE |
— |
You cannot delete this family |
STOCKS.ARTICLE_SUB_FAMILY.NOT_FOUND |
— |
The item subfamily was not found |
STOCKS.ARTICLE_SUB_FAMILY.CODE_NOT_FOUND |
code |
The subfamily with code code was not found |
STOCKS.ARTICLE_SUB_FAMILY.CODE_REQUIRED |
— |
You must provide a code |
STOCKS.ARTICLE_SUB_FAMILY.LABEL_REQUIRED |
— |
You must provide a label |
STOCKS.ARTICLE_SUB_FAMILY.NAME_REQUIRED |
— |
The name cannot be empty |
Plannings
| Code |
Params |
Message |
STOCKS.ARTICLE_PLANNING.NOT_FOUND |
— |
The planning data was not found |
STOCKS.ARTICLE_PLANNING.LOCATION_NOT_OF_WAREHOUSE |
— |
The location does not belong to this warehouse |
STOCKS.ARTICLE_PLANNING.MAXIMUM_NEGATIVE |
— |
The maximum stock cannot be negative |
STOCKS.ARTICLE_PLANNING.SAFETY_NEGATIVE |
— |
The safety stock cannot be negative |
STOCKS.ARTICLE_PLANNING.MINIMUM_NEGATIVE |
— |
The minimum stock cannot be negative |
Locations
| Code |
Params |
Message |
STOCKS.LOCATION.NOT_FOUND |
— |
The location was not found |
STOCKS.LOCATION.DELETE_TARGET_NOT_FOUND |
— |
The location to delete was not found |
STOCKS.LOCATION.HAS_OPERATIONS |
— |
Operations have already been recorded on this location |
STOCKS.LOCATION.LABEL_REQUIRED |
— |
You must provide the label |
STOCKS.LOCATION.LABEL_MISSING |
— |
You must provide a label |
STOCKS.LOCATION.SHORT_NAME_REQUIRED |
— |
You must provide the short name |
STOCKS.LOCATION.SHORT_NAME_MISSING |
— |
You must provide a short name |
STOCKS.LOCATION.OWN_PARENT |
— |
A location cannot be its own parent |
STOCKS.LOCATION.PARENT_ON_NON_INTERNAL |
— |
Only internal locations can have a parent |
STOCKS.LOCATION.PARENT_MUST_BE_INTERNAL |
— |
The parent must be an internal location |
STOCKS.LOCATION.PARENT_HOLDS_STOCK |
— |
The parent holds available stock |
STOCKS.LOCATION.NOT_VIRTUAL |
type |
Location type is not a virtual location |
Warehouses
| Code |
Params |
Message |
STOCKS.WAREHOUSE.NOT_FOUND |
— |
The warehouse was not found |
STOCKS.WAREHOUSE.HAS_MOVEMENTS |
— |
Stock movements have already been recorded on this warehouse |
STOCKS.WAREHOUSE.NAME_REQUIRED |
— |
The name cannot be empty |
STOCKS.WAREHOUSE.LABEL_MISSING |
— |
You must provide a label |
STOCKS.WAREHOUSE.SHORT_NAME_EMPTY |
— |
The short name cannot be empty |
STOCKS.WAREHOUSE.SHORT_NAME_MISSING |
— |
You must provide a short name |
Operation types
| Code |
Params |
Message |
STOCKS.OPERATION_TYPE.NOT_FOUND |
— |
The operation type was not found |
STOCKS.OPERATION_TYPE.DELETE_TARGET_NOT_FOUND |
— |
The operation type to delete was not found |
STOCKS.OPERATION_TYPE.HAS_OPERATIONS |
— |
Operations have already been recorded with this operation type |
STOCKS.OPERATION_TYPE.LAST_OF_CATEGORY |
category |
You cannot delete the last category operation type |
STOCKS.OPERATION_TYPE.LABEL_REQUIRED |
— |
You must provide the label |
STOCKS.OPERATION_TYPE.NAME_REQUIRED |
— |
The name cannot be empty |
STOCKS.OPERATION_TYPE.CATEGORY_REQUIRED |
— |
The category cannot be empty |
STOCKS.OPERATION_TYPE.SEQUENCE_REQUIRED |
— |
The sequence cannot be empty |
STOCKS.OPERATION_TYPE.SOURCE_LOCATION_REQUIRED |
— |
The default source location cannot be empty |
STOCKS.OPERATION_TYPE.DESTINATION_LOCATION_REQUIRED |
— |
The default destination location cannot be empty |
STOCKS.OPERATION_TYPE.PREPARATION_SELF |
— |
Invalid picking type: it cannot equal the current type |
STOCKS.OPERATION_TYPE.RETURN_SELF |
— |
Invalid return type: it cannot equal the current type |
Batches
| Code |
Params |
Message |
STOCKS.BATCH.NOT_FOUND |
— |
The batch was not found |
STOCKS.BATCH.NOT_AVAILABLE |
— |
The batch is not available |
STOCKS.BATCH.NOT_EDITABLE |
— |
You cannot edit the batch |
STOCKS.BATCH.AMOUNT_NOT_POSITIVE |
— |
You must enter a positive amount |
STOCKS.BATCH.QUANTITY_NOT_POSITIVE |
— |
You must enter a positive quantity |
STOCKS.BATCH.LIFO_UNSUPPORTED |
— |
LIFO is not supported |
STOCKS.BATCH.NONE_LEFT_IN_LOCATION |
location, article |
No batch is left in location location for item article |
STOCKS.BATCH.CANCEL_TARGET_NOT_FOUND |
batch |
Batch batch was not found |
STOCKS.BATCH.ALREADY_CANCELED |
batch |
Batch batch has already been canceled |
STOCKS.BATCH.CONSUMED |
batch |
Items have already been consumed on batch batch |
STOCKS.BATCH.RECEPTION_NOT_EXECUTED |
batch |
The reception of batch batch must be executed to be canceled |
STOCKS.BATCH.NOT_FROM_RECEPTION |
batch |
Batch batch does not come from a reception |
STOCKS.BATCH.RETURN_TYPE_REQUIRED |
batch |
A return type must be defined to cancel batch batch |
STOCKS.BATCH.NOT_OF_ORDER |
— |
This batch was not received for this purchase order |
Receptions
| Code |
Params |
Message |
STOCKS.RECEPTION.ARTICLE_REQUIRED |
— |
You must specify at least one item to receive |
STOCKS.RECEPTION.TYPE_REQUIRED |
— |
You must configure a reception operation |
STOCKS.RECEPTION.ALREADY_CONFIRMED |
— |
The reception has already been confirmed for this purchase order |
STOCKS.RECEPTION.NO_PENDING_OPERATION |
— |
No pending operation is linked to this purchase order |
STOCKS.RECEPTION.NO_EXECUTED_RECEPTION |
— |
No executed reception is linked to this purchase order |
STOCKS.RECEPTION.ALREADY_CANCELED |
— |
The reception has already been canceled for this purchase order |
STOCKS.RECEPTION.BATCHES_CONSUMED |
— |
Items have already been consumed on the batches of this reception |
Miscellaneous
| Code |
Params |
Message |
STOCKS.DELIVERY.ARTICLE_REQUIRED |
— |
You must specify at least one item to deliver |
STOCKS.DELIVERY.TYPE_REQUIRED |
— |
You must configure a delivery operation |
STOCKS.STOCK_MOVEMENT.NOT_FOUND |
— |
The stock movement was not found |
STOCKS.MEASURE_UNIT.NOT_FOUND |
— |
The measure unit was not found |
STOCKS.SETTINGS.COST_METHOD_REQUIRED |
— |
You must provide a stock costing method |
STOCKS.PERIOD.INVALID |
— |
The period is invalid |
STOCKS.INDICATOR.NOT_FOUND |
— |
The indicator was not found |
STOCKS.MODULE.PRODUCTS_REQUIRED |
— |
The Products module must be installed before continuing |
STOCKS.MODULE.ALREADY_INSTALLED |
— |
The Stocks module is already installed |
Messages are not a contract
The wordings above reproduce the messages as the module returns them today.
They may be rephrased without notice; the codes, for their part, do not
change.
Changelog
- 1.0 (August 18, 2026): document created.