/materials/all
Deprecated
This endpoint allows you to list all the materials.
getAllMaterials
data
array<object>
id
string
required
read-only
ID of the Material
Example: 1
type
string
required
read-only
Model type
material
Example: material
attributes
object
required
material_id
integer
read-only
ID of the material
Example: 1
parent_id
integer
read-only
ID of the associated folder of the material
Example: 1
name
string
Name of the material
Example: Chair
code
string
Code of the material
Example: CH-00001
full_code
string
read-only
Full code of the material (folders prefix included)
Example: FOLDER.CH-00001
observations
string | null
Material observations
Example: This is a observation
is_real
boolean
Indicates if this is a real material or a parent folder of materials
Example: 1
units
string
Indicates which kind of unit should this material be measured with
Example: un
mean_price
object
Mean price of the material
Example: 8
has_children
boolean
Indicates if this material is a parent of other materials
Example: 1
default_sell_price
number
The default sell price of the material
Example: 10
default_sell_vat
number
The default sell VAT of the material
Example: 23
is_from_network
boolean
Indicates if the material was shared via Infraspeak Network
Example:
purchase_consumption_type
string
Purchase consumption type of the material
INHERIT
AUTOMATIC
MANUAL
Example: INHERIT
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
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/materials/all' \
-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/materials/all', {
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/materials/all');
import requests
response = requests.get(
'https://api.sandbox.infraspeak.com/v3/materials/all',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
)
data = response.json()