# Material Categories

## <mark style="color:green;">GET</mark> /materials/categories

### Get List of Materials Categories (Without Pagination) Endpoint

**Endpoint**: `GET /open-api/v1/materials/categories`

#### Description

Fetches a complete list of material categories from the Simplio3D API without pagination.

#### Request Headers

* **Authorization**: Bearer token required.

#### Sample Request

```http
GET /open-api/v1/materials/categories HTTP/1.1
Host: api.simplio3d.com
Authorization: Bearer {your_api_token}
```

#### Response

* **Status Code**: `200 OK`
* **Body**: A JSON array containing the material categories available.
* ```json
  [
      {
          "id": "1",
          "name": "Wood"
      },
      {
          "id": "2",
          "name": "Metal"
      }
      // ... other categories
  ]
  ```

  #### Error Handling

  * **401 Unauthorized**: If the authorization token is missing or invalid.
  * **500 Internal Server Error**: For generic server-side errors.

## Get list of materials categories (without pagination)

> Get all materials categories without pagination.

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"tags":[{"name":"Materials Categories","description":"API Endpoints for managing materials categories"}],"servers":[{"url":"https://app.simplio3d.com","description":"API Open Base URL"},{"url":""}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter token in format (Bearer <your_token>)"}},"schemas":{"MaterialsCategoriesResource":{"title":"Materials Categories Resource","description":"Materials Categories Model","properties":{"id":{"description":"ID of the material category","type":"integer"},"title":{"description":"Title of the material category","type":"string"},"description":{"description":"Description of the material category","type":"string"},"created_at":{"description":"Timestamp when the material category was created","type":"string","format":"date-time"},"updated_at":{"description":"Timestamp when the material category was last updated","type":"string","format":"date-time"},"created_by":{"description":"Name of the creator","type":"string"}},"type":"object"}}},"paths":{"/api/open-api/v1/materials-categories/list":{"get":{"tags":["Materials Categories"],"summary":"Get list of materials categories (without pagination)","description":"Get all materials categories without pagination.","operationId":"ca6213cfd7e44a2b1c3c09e1a397d2eb","parameters":[{"name":"order_by","in":"query","description":"Column to order the results by (default: created_at)","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Order direction (asc or desc, default: desc)","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MaterialsCategoriesResource"}}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}}}}}}
```

## <mark style="color:green;">GET</mark> /materials/categories/{id}

#### Get a Specific Material Category by ID

```http
GET /open-api/v1/materials/categories/{id} HTTP/1.1
Host: api.simplio3d.com
Authorization: Bearer {your_api_token}
```

#### Response

* **Status Code**: `200 OK`
* **Materials Not Found:** 404
* **Unauthorized:** 401

## Get materials category by ID

> Get a specific materials category by ID.

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"tags":[{"name":"Materials Categories","description":"API Endpoints for managing materials categories"}],"servers":[{"url":"https://app.simplio3d.com","description":"API Open Base URL"},{"url":""}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Enter token in format (Bearer <your_token>)"}},"schemas":{"MaterialsCategoriesResource":{"title":"Materials Categories Resource","description":"Materials Categories Model","properties":{"id":{"description":"ID of the material category","type":"integer"},"title":{"description":"Title of the material category","type":"string"},"description":{"description":"Description of the material category","type":"string"},"created_at":{"description":"Timestamp when the material category was created","type":"string","format":"date-time"},"updated_at":{"description":"Timestamp when the material category was last updated","type":"string","format":"date-time"},"created_by":{"description":"Name of the creator","type":"string"}},"type":"object"}}},"paths":{"/api/open-api/v1/materials-categories/{id}":{"get":{"tags":["Materials Categories"],"summary":"Get materials category by ID","description":"Get a specific materials category by ID.","operationId":"28760292756b57702f58bdf2d6f6d659","parameters":[{"name":"id","in":"path","description":"ID of the materials category","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaterialsCategoriesResource"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Materials category not found"}}}}}}
```

## The MaterialsCategoriesResource object

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"components":{"schemas":{"MaterialsCategoriesResource":{"title":"Materials Categories Resource","description":"Materials Categories Model","properties":{"id":{"description":"ID of the material category","type":"integer"},"title":{"description":"Title of the material category","type":"string"},"description":{"description":"Description of the material category","type":"string"},"created_at":{"description":"Timestamp when the material category was created","type":"string","format":"date-time"},"updated_at":{"description":"Timestamp when the material category was last updated","type":"string","format":"date-time"},"created_by":{"description":"Name of the creator","type":"string"}},"type":"object"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.simplio3d.com/api-reference/open-api/materials/material-categories.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
