/stocks/stock-transactions/transfer-all
This endpoint allows you to transfer all stock between warehouses.
stockTransactionsTransferAll
Content-Type: application/json
· Required fields: warehouse_from_id, warehouse_to_id
warehouse_from_id
integer
required
Warehouse id to transfer stock from
Example: 1
warehouse_to_id
integer
required
Warehouse id to transfer stock to
Example: 2
observations
string
Observations about the transfer
Example: Transferring stock between warehouses
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
curl -X POST \
'https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions/transfer-all' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"warehouse_from_id": 1,
"warehouse_to_id": 2,
"observations": "Transferring stock between warehouses"
}'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions/transfer-all', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
body: JSON.stringify({
"warehouse_from_id": 1,
"warehouse_to_id": 2,
"observations": "Transferring stock between warehouses"
}),
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->post('https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions/transfer-all',
array (
'warehouse_from_id' => 1,
'warehouse_to_id' => 2,
'observations' => 'Transferring stock between warehouses',
)
);
import requests
response = requests.post(
'https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions/transfer-all',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
json={
{
"warehouse_from_id": 1,
"warehouse_to_id": 2,
"observations": "Transferring stock between warehouses"
}
},
)
data = response.json()