Simplio3D
HomeHelp Center
  • INTRODUCTION
  • GETTING STARTED
    • Create an account
    • Prepare 3D models
  • LEARNING THE APP
    • Dashboard
    • My Account
    • Products
      • New Product
      • Select Layout
      • Add 3D Models
        • 3D Model versions
      • Create Options
        • Default
        • Sections
        • Dropdown
        • Material
        • Checkbox
        • Toggle
        • Thumbnails
        • Arrows
        • Upload
        • Text
        • Numeral
          • Sizing: Keep the proportions
        • Restrictions
          • 'Has one or more variants selected from' type of restriction
          • 'The variant value is between min and max' type of restriction
      • Pricing
        • Pricing formula
        • Variables
        • Add price
      • Add form
        • Add Field
        • Email Settings
          • Gmail
          • Sendgrid
      • Share
      • Product Viewer
    • Materials
      • New Materials
      • Textures
      • SVG
      • Categories
    • 3D Assets
      • Edit 3D Assets
      • Categories
      • File too large
    • Orders
  • Integrations
    • WooCommerce
    • Shopify
    • API Documentation
  • API Reference
    • Partner API
      • Managing Orders
    • Open API
      • Getting Started
      • User Authentication
      • 3D Assets
      • Configurators
      • Contact Form
        • Form Fields
        • Forms
      • Options
        • Options
        • Option Variations
        • Option Restrictions
      • Price Groups
      • Share
      • Materials
        • Materials
        • Material Categories
      • Textures
        • Textures
        • Texture Categories
      • Orders
    • Web SDK
  • Other
    • Change Log
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. Open API
  3. Materials

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

{
  "materials": [
  {
    "id": 1,
    "name": "Wood Texture",
    "material_file": "https://example.com/materials/wood.jpg",
    "category_id": 5,
    "texture_id": 2,
    "status": true,
    "material_type": "flat",
    "surface": "smooth",
    "bump": true,
    "color": "#FFFFFF",
    "opacity": 0.8,
    "specular": 0.5,
    "reflection": 0.0,
    "created_at": "2024-02-27T14:23:00Z",
    "updated_at": "2024-02-27T14:23:00Z",
    "created_by": "John Doe"
  }
    },
    {
  {
    "id": 2,
    "name": "Steel",
    "material_file": "https://example.com/materials/steel.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"
  }
      }
    }
  ]
}

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 /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

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

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

GET /open-api/v1/materials/1
Authorization: Bearer {token}

Example Response

{
  "id": 1,
  "name": "Wood Texture",
  "material_file": "https://example.com/materials/wood.jpg",
  "category_id": 5,
  "texture_id": 2,
  "status": true,
  "material_type": "flat",
  "surface": "smooth",
  "bump": true,
  "color": "#FFFFFF",
  "opacity": 0.8,
  "specular": 0.5,
  "reflection": 0.0,
  "created_at": "2024-02-27T14:23:00Z",
  "updated_at": "2024-02-27T14:23:00Z",
  "created_by": "John Doe"
}

Notes

  • Ensure that the authentication token is valid and correctly included in the headers to access the endpoint successfully.

PreviousMaterialsNextMaterial Categories

Last updated 22 days ago

Was this helpful?

Fetch all materials

get

Get a list of materials.

Authorizations
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
401
Unauthorized
500
Internal Server Error
get
GET /api/open-api/v1/materials HTTP/1.1
Host: app.simplio3d.com
Authorization: Bearer JWT
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 material by ID

get

Get a specific material by ID.

Authorizations
Path parameters
idinteger · int64Required

ID of the material

Responses
200
Successful response
application/json
401
Unauthorized
404
Material not found
500
Internal Server Error
get
GET /api/open-api/v1/materials/{id} HTTP/1.1
Host: app.simplio3d.com
Authorization: Bearer JWT
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
  • Fetch All Materials
  • GETFetch all materials
  • GET /materials/{id}
  • GETGet material by ID