Materials
API endpoints for managing materials
GET /materials
Fetch All Materials
Endpoint
GET open-api/v1/materials
Description
This endpoint retrieves a comprehensive list of all available materials in the Simplio3D system.
Request
Method:
GETURL:
/api/materials
Headers
Authorization
String
Bearer token required for authentication.
Response
Status Code:
200 OK
Response Body
The response will be a JSON object containing the following fields:
materials
Array
An array of material objects.
Each material object includes:
id
String
Unique identifier for the material.
name
String
Name of the material.
Example
Notes
Ensure the correct authentication token is included in the request header to successfully access the endpoint.
The properties object can include various attributes specific to the material type.
Get a list of materials.
Enter token in format (Bearer <your_token>)
Number of items per page (-1 for all)
25Number of page
2Field to order by
created_atSorting order (asc or desc)
descPossible values: Filter materials by category ID
5Filter materials by texture ID
2Successful response
Material object representation
Material ID
1Material name
Wood TextureMaterial file URL
https://example.com/materials/wood.jpgMaterial category ID
5Texture ID
2Material status (active/inactive)
trueType of material
glossyMaterial surface type
smoothBump mapping enabled
falseMaterial color
#FFFFFFOpacity level
0.8Specular reflection
0.5Reflection intensity
0.3Creation date
2024-02-27T14:23:00ZLast update date
2024-02-27T14:23:00ZUser who created the material
John DoeUnauthorized
Internal Server Error
GET /api/open-api/v1/materials HTTP/1.1
Host: app.simplio3d.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": 1,
"name": "Wood Texture",
"material_file": "https://example.com/materials/wood.jpg",
"category_id": 5,
"texture_id": 2,
"status": true,
"material_type": "glossy",
"surface": "smooth",
"bump": false,
"color": "#FFFFFF",
"opacity": 0.8,
"specular": 0.5,
"reflection": 0.3,
"created_at": "2024-02-27T14:23:00Z",
"updated_at": "2024-02-27T14:23:00Z",
"created_by": "John Doe"
}
]GET /materials/{id}
Get Material by ID Endpoint
The Get Material by ID endpoint of the Simplio3D API allows you to retrieve detailed information about a specific material by its unique identifier. This endpoint is ideal for applications requiring precise details about materials used in 3D modeling or rendering.
Endpoint
Path Parameters
id(integer): The unique identifier of the material to be retrieved.
Request Headers
Authorization: Bearer token required to authenticate the request.
Response
The response includes the following attributes specific to the requested material:
id: The unique identifier of the material.name: The name of the material.material_file: URL to the material's texture file.category_id: The ID of the category to which the material belongs.texture_id: The ID of the texture applied to the material.status: Boolean indicating whether the material is active.material_type: The type of material (e.g., flat, glossy).surface: Description of the material's surface finish.bump: Boolean indicating if the material has bump mapping.color: Hex color code representing the material's default color.opacity: The opacity level of the material.specular: The specular reflection component of the material.reflection: The reflection intensity of the material.created_at: ISO 8601 date and time representing when the material was created.updated_at: ISO 8601 date and time representing the last update.created_by: The name of the user who created the material.
Example Request
Example Response
Notes
Ensure that the authentication token is valid and correctly included in the headers to access the endpoint successfully.
Get a specific material by ID.
Enter token in format (Bearer <your_token>)
ID of the material
Successful response
Material object representation
Material ID
1Material name
Wood TextureMaterial file URL
https://example.com/materials/wood.jpgMaterial category ID
5Texture ID
2Material status (active/inactive)
trueType of material
glossyMaterial surface type
smoothBump mapping enabled
falseMaterial color
#FFFFFFOpacity level
0.8Specular reflection
0.5Reflection intensity
0.3Creation date
2024-02-27T14:23:00ZLast update date
2024-02-27T14:23:00ZUser who created the material
John DoeUnauthorized
Material not found
Internal Server Error
GET /api/open-api/v1/materials/{id} HTTP/1.1
Host: app.simplio3d.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 1,
"name": "Wood Texture",
"material_file": "https://example.com/materials/wood.jpg",
"category_id": 5,
"texture_id": 2,
"status": true,
"material_type": "glossy",
"surface": "smooth",
"bump": false,
"color": "#FFFFFF",
"opacity": 0.8,
"specular": 0.5,
"reflection": 0.3,
"created_at": "2024-02-27T14:23:00Z",
"updated_at": "2024-02-27T14:23:00Z",
"created_by": "John Doe"
}Get all materials categories without pagination.
Enter token in format (Bearer <your_token>)
Column to order the results by (default: created_at)
nameOrder direction (asc or desc, default: desc)
ascPossible values: Successful response
Materials Categories Model
ID of the material category
1Title of the material category
WoodDescription of the material category
Wood-based materialsTimestamp when the material category was created
2024-02-26 12:00:00Timestamp when the material category was last updated
2024-02-27 15:00:00Name of the creator
John DoeUnauthorized
Internal Server Error
GET /api/open-api/v1/materials-categories/list HTTP/1.1
Host: app.simplio3d.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"id": 1,
"title": "Wood",
"description": "Wood-based materials",
"created_at": "2024-02-26 12:00:00",
"updated_at": "2024-02-27 15:00:00",
"created_by": "John Doe"
}
]Last updated