/stocks/material-types/ancestor-folders/{materialTypeId}
This endpoint allows the user to get all folder path of a specific material type.
getMaterialTypeAncestors
| Name | Type | Description |
|---|---|---|
materialTypeId
required
|
string |
The material type ID |
data
object
MaterialTypeFolder model structure details
id
string
read-only
ID of the Material Type Folder
type
string
read-only
Model type
stock-material-type-folder
attributes
object
material_type_folder_id
string
read-only
ID of the material type folder
Example: 1
parent_id
string
ID of the associated folder of the material type folder
Example: 1
name
string
Name of the material type folder
Example: Chemical
code
string
Code of the material type folder
Example: CH-00001
created_at
string (date-time)
Creation date
Example: 2021-01-01 00:00:00
updated_at
string (date-time)
Last update date
Example: 2021-01-01 00:00:00
deleted_at
string (date-time) | null
Deletion date
Example: 2021-01-01 00:00:00
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
404
message
string
Example: Resource not found
more_info
string | null
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/material-types/ancestor-folders/{materialTypeId}' \
-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/material-types/ancestor-folders/{materialTypeId}', {
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/material-types/ancestor-folders/{materialTypeId}');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/stocks/material-types/ancestor-folders/{materialTypeId}',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()