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: GET

  • URL: /api/materials

Headers

Name
Type
Description

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:

Field
Type
Description

materials

Array

An array of material objects.

Each material object includes:

Field
Type
Description

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.

Fetch all materials

get
/api/open-api/v1/materials

Get a list of materials.

Authorizations
AuthorizationstringRequired

Enter token in format (Bearer <your_token>)

Query parameters
per_pageintegerOptional

Number of items per page (-1 for all)

Example: 25
pageintegerOptional

Number of page

Example: 2
order_bystringOptional

Field to order by

Example: created_at
orderstring · enumOptional

Sorting order (asc or desc)

Example: descPossible values:
category_idintegerOptional

Filter materials by category ID

Example: 5
texture_idintegerOptional

Filter materials by texture ID

Example: 2
Responses
200

Successful response

application/json
get
/api/open-api/v1/materials

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 material by ID

get
/api/open-api/v1/materials/{id}

Get a specific material by ID.

Authorizations
AuthorizationstringRequired

Enter token in format (Bearer <your_token>)

Path parameters
idinteger · int64Required

ID of the material

Responses
200

Successful response

application/json
get
/api/open-api/v1/materials/{id}

Get list of materials categories (without pagination)

get
/api/open-api/v1/materials-categories/list

Get all materials categories without pagination.

Authorizations
AuthorizationstringRequired

Enter token in format (Bearer <your_token>)

Query parameters
order_bystringOptional

Column to order the results by (default: created_at)

Example: name
orderstring · enumOptional

Order direction (asc or desc, default: desc)

Example: ascPossible values:
Responses
200

Successful response

application/json
get
/api/open-api/v1/materials-categories/list

Last updated

Was this helpful?