/stocks/material-types/folders/tree
This endpoint allows the user to get the tree of material types with folders and types.
getMaterialTypeFolderTree
| Name | Type | Description |
|---|---|---|
search_text
|
string |
Text string to search for |
searchText
|
string |
Text string to search for |
sort
|
string |
The name of the attribute to use for sort order |
order
|
string |
The direction of the sort order asc
desc
|
include_trashed
|
boolean |
Whether to include trashed items in the response |
includeTrashed
|
boolean |
Whether to include trashed items in the response |
date_min_updated_at
|
string |
Filter by minimum updated_at. |
updatedAtAfter
|
string |
Filter for a minimum date-time given |
data
array<union>
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
id
string
read-only
ID of the Material Type
Example: 1
type
string
read-only
Model type
stock-material-type
attributes
object
material_type_id
string
read-only
ID of the material type
Example: 1
parent_id
string
ID of the associated parent folder of the material type
Example: 1
name
string
Name of the material type
Example: Chemical
code
string
Code of the material type
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
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
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/folders/tree' \
-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/folders/tree', {
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/folders/tree');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/stocks/material-types/folders/tree',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()