POST /stocks/materials/{materialId}/stock-transactions

Create a batch of stock transactions for a material

This endpoint allows you to create multiple stock transactions for a specific material.

Operation ID: createMaterialStockBatchTransactions
lock This endpoint requires a Bearer token in the Authorization header.

Path Parameters

Name Type Description
materialId required
path
string

The Material ID

Request Body

Content-Type: application/json · Required fields: action, transactions

action string required

Action to be performed

MATERIAL_ADD MATERIAL_SUBTRACT

Example: MATERIAL_ADD

observations string

Observations about the transaction

Example: Observations about the transaction

transactions array<object> required

List of transactions

quantity number required

Quantity of the transaction

Example: 10

warehouse_id integer required

Warehouse ID

Example: 1

cost_price number

Cost price of the transaction

Example: 10

observations string

Observations about the transaction

Example: Observations about the transaction

Responses

data object

StockBatchTransactions model structure details

id string read-only

ID of the batch

type string read-only

Model type

stock-transactions-batch
attributes object
stock_transaction_batch_id string read-only

ID of the stock transaction batch

Example: fd9815f9-d365-4be8-bb3a-3ab66a595c61

operator_id integer read-only

ID of the operator

Example: 1

action string read-only

Batch's action

TRANSFER_STOCK WAREHOUSE_SUBTRACT WAREHOUSE_ADD MATERIAL_SUBTRACT MATERIAL_ADD CONSUME PURCHASE

Example: TRANSFER_STOCK

observations string | null

Batch's observations

source_id integer read-only

ID of the source

Example: 1

source_type string read-only

Type of the source

FAILURE SCHEDULED_WORK_ORDER BUY_ORDER ELEMENT MANUEL
status string
error
error object
properties object

Only present when related to property validation error

dev_message string

Example: Property validation error. Check the "properties" section in the response.

http_code integer
400
message string

Example: Property validation error.

more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string