/stocks/warehouses/{warehouseId}/check-associations
This endpoint allows you to determine if a specific warehouse has any existing dependencies (such as associated operators or ongoing purchases).
getWarehousesAssociations
| Name | Type | Description |
|---|---|---|
warehouseId
required
|
string |
The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation. Example: |
| Name | Type | Description |
|---|---|---|
associations
|
string |
A comma-separated list of dependencies (related resources). operators
purchases
|
status
string
required
success
data
object
required
operators
boolean
Indicates if the warehouse has associated operators (whose default warehouse is this one) that prevent deletion. 'true' if dependencies exist, 'false' otherwise.
purchases
boolean
Indicates if the warehouse has ongoing purchases that prevent deletion. 'true' if dependencies exist, 'false' otherwise.
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/1/check-associations' \
-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/1/check-associations', {
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/1/check-associations');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/stocks/warehouses/1/check-associations',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()