/stocks/warehouses
This endpoint allows you to get all Warehouses.
getStockWarehouses
| Name | Type | Description |
|---|---|---|
expand
|
string |
A comma-separated list of related resources to include in the response data. operators
|
sort
|
string |
The field by which the warehouse results will be sorted. code
name
address
warehouse_id
|
order
|
string |
The sorting direction to apply to the results. asc
desc
|
searchText
|
string |
A general search term to filter warehouses. Enter keywords to search across warehouse code, name, and address. This parameter performs a partial match (using 'LIKE' internally) on these fields. Example: |
date_min_updated_at
|
string |
Filter warehouses to include only those updated on or after the specified date and time. Example: |
date_max_updated_at
|
string |
Filter warehouses to include only those updated on or before the specified date and time. Example: |
date_min_created_at
|
string |
Filter warehouses to include only those created on or after the specified date and time. Example: |
date_max_created_at
|
string |
Filter warehouses to include only those created on or before the specified date and time. Example: |
s_code
|
string |
Search term to filter warehouses by their unique code. This parameter performs a partial match (using 'LIKE' internally) on the warehouse code. Example: |
s_name
|
string |
Search term to filter warehouses by their descriptive name. This parameter performs a partial match (using 'LIKE' internally) on the warehouse name. Example: |
warehouse_managers_ids
|
array |
Filter warehouses by the IDs of their associated managers. Only warehouses that have at least one manager with an ID present in this list will be returned. |
s_material_id
|
string |
Filter warehouses to include only those that have ever stocked or currently hold the specified material ID. Example: |
limit
|
integer |
The maximum number of records to return in a single response page. This parameter controls the size of the result set for pagination. |
page
|
integer |
The specific page number of the results to retrieve. |
data
array<object>
id
string
read-only
The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
Example: 1
type
string
read-only
The resource type, identifying this as a warehouse.
stock-warehouse
attributes
object
warehouse_id
string
The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
Example: 1
name
string
The descriptive name of the warehouse, intended for readability and identification within the application's user interface.
Example: Warehouse
code
string
A unique code assigned to the warehouse, intended for readability and identification within the application's user interface.
Example: WZ1
address
string | null
The physical street address of the warehouse. This provides the geographical location of the storage facility.
Example: Warehouse street, 10, Country
observations
string | null
Free-text field for any additional notes, specific instructions, or relevant details pertaining to this warehouse.
Example: Operational hours from 9am to 7pm, entrance by the large door on the side.
created_at
string (date-time)
The timestamp indicating when the warehouse record was initially created in the system. This value is automatically set upon the creation of a new warehouse.
Example: 2025-05-27T11:44:46.000Z
updated_at
string (date-time)
The timestamp indicating when the warehouse record was last modified. This value is automatically updated whenever any attribute of the warehouse is changed and saved.
Example: 2025-05-27T11:44:46.000Z
associated_operators
array<object>
A list of operators associated with this warehouse. This defines the personnel linked to this storage location and their respective roles or responsibilities.
operator_id
integer
The unique identifier of the operator within the system. This ID is used to reference the specific personnel associated with the warehouse.
Example: 1
permission
string
The specific permission or role assigned to this operator in relation to the warehouse. This dictates the actions the operator is authorized to perform.
manager
included
array<object>
List of relationships to be included
meta
object
Meta model structure details
pagination
object
total
integer
required
Total items.
Example: 1
count
integer
required
Total items returned for the current page.
Example: 1
per_page
integer
required
Maximum number of records per page.
Example: 1
current_page
integer
required
Number of the current page.
total_pages
integer
required
Number of the total pages.
links
object
Requests that return multiple items include a `links` attribute, with links related to request's context.
self
string
required
read-only
Current response link.
Example: /path?page=1
first
string
required
read-only
Link to the first page result.
Example: /path?page=1
last
string
required
read-only
Link to the previous page result.
Example: /path?page=1
next
string
read-only
Link to the next page result.
Example: /path?page=1
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/warehouses?searchText=house&date_min_updated_at=2025-05-27T10%3A00%3A00.000Z&date_max_updated_at=2025-05-27T10%3A00%3A00.000Z&date_min_created_at=2025-05-27T10%3A00%3A00.000Z&date_max_created_at=2025-05-27T10%3A00%3A00.000Z&s_code=WZ1&s_name=Warehouse&s_material_id=1' \
-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/warehouses?searchText=house&date_min_updated_at=2025-05-27T10%3A00%3A00.000Z&date_max_updated_at=2025-05-27T10%3A00%3A00.000Z&date_min_created_at=2025-05-27T10%3A00%3A00.000Z&date_max_created_at=2025-05-27T10%3A00%3A00.000Z&s_code=WZ1&s_name=Warehouse&s_material_id=1', {
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/warehouses?searchText=house&date_min_updated_at=2025-05-27T10%3A00%3A00.000Z&date_max_updated_at=2025-05-27T10%3A00%3A00.000Z&date_min_created_at=2025-05-27T10%3A00%3A00.000Z&date_max_created_at=2025-05-27T10%3A00%3A00.000Z&s_code=WZ1&s_name=Warehouse&s_material_id=1');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/stocks/warehouses?searchText=house&date_min_updated_at=2025-05-27T10%3A00%3A00.000Z&date_max_updated_at=2025-05-27T10%3A00%3A00.000Z&date_min_created_at=2025-05-27T10%3A00%3A00.000Z&date_max_created_at=2025-05-27T10%3A00%3A00.000Z&s_code=WZ1&s_name=Warehouse&s_material_id=1',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()