/stocks/stock-transactions
This endpoint allows you to list all the stock transactions.
getAllStockTransactions
| Name | Type | Description |
|---|---|---|
sort
|
string |
he name of the attribute to use for sort order |
order
|
string |
The direction of the sort order asc
desc
|
page
|
integer |
The page number (1-based) to retrieve the results, according to the `limit` defined |
limit
|
integer |
Limit to restrict the number of entries per page |
warehouse_id
|
string |
Filter by warehouse id |
material_id
|
string |
Filter by material id |
expand
|
string |
Comma-separated list of relations to include in the response operator
|
s_warehouse_id
|
string |
Filter by warehouse id |
s_material_id
|
string |
Filter by material id |
date_min_created_at
|
string |
Filter by minimum created_at. |
date_max_created_at
|
string |
Filter by maximum created_at. |
date_min_updated_at
|
string |
Filter by minimum updated_at. |
date_max_updated_at
|
string |
Filter by maximum updated_at. |
s_operator_id
|
string |
Filter by operator id |
data
object
StockTransaction model structure details
id
string
read-only
ID of the transaction
type
string
read-only
Model type
stock-transaction
attributes
object
warehouse_id
integer
ID of the warehouse
Example: 1
material_id
integer
ID of the material
Example: 1
quantity
integer
Transaction's quantity
Example: 25
action
string
Transaction's action
ADD
SUBTRACT
Example: SUBTRACT
observations
string | null
Transaction's observations
cost_price
integer
Transaction's associated price
Example: 25
created_at
string
Transaction's created date
Example: 2024-08-16T13:33:39.000000Z
operator_id
integer
ID of the operator
Example: 1
stock_transaction_batch_id
integer
read-only
ID of the parent transaction batch
Example: 1
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 GET \
'https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions', {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->get('https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/stocks/stock-transactions',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()