> For the complete documentation index, see [llms.txt](https://docs.simplio3d.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.simplio3d.com/api-reference/open-api/textures/textures.md).

# Textures

Fetch texture(s)

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

#### Fetch All Textures - GET Endpoint

The `Fetch All Textures` endpoint of the Simplio3D API provides a list of all available textures. This endpoint is useful for retrieving texture data that can be applied within the Simplio3D environment.

**URL**

```
GET /open-api/v1/textures
```

**Request Parameters**

* **Headers**:

  * `Authorization` : Bearer token for authentication (required)

  **Response**

  * **Status Code**: `200 OK`
  * **Body**: Returns a JSON array of objects, each representing a texture with the following properties:

    * `id`: Unique identifier for the texture.
    * `name`: Name of the texture.
    * `url`: Direct URL to the texture file.
    * `category`: Category to which the texture belongs.

    **Example Response**

    ```json
    [
      {
        "id": "texture_001",
        "name": "Wooden Texture",
        "url": "https://example.com/textures/wooden.jpg",
        "category": "Wood"
      },
      {
        "id": "texture_002",
        "name": "Metallic Texture",
        "url": "https://example.com/textures/metallic.jpg",
        "category": "Metal"
      }
    ]
    ```

  Use this endpoint to integrate texture data retrieval within your application. Ensure to handle authentication and JSON parsing to access the desired texture details.

## Fetch all textures

> Get a list of textures.

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"tags":[{"name":"Textures","description":"API Endpoints for managing textures"}],"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":{"TexturesResource":{"title":"Textures Resource","description":"Textures data response","properties":{"id":{"type":"integer"},"name":{"type":"string"},"texture_file":{"type":"string","format":"url"},"texture_thumbnail_50":{"type":"string","format":"url"},"texture_thumbnail_100":{"type":"string","format":"url"},"bump_file":{"type":"string","format":"url"},"category_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}},"paths":{"/api/open-api/v1/textures":{"get":{"tags":["Textures"],"summary":"Fetch all textures","description":"Get a list of textures.","operationId":"918768e7b7a9c227b07cd9f0fa25287c","parameters":[{"name":"per_page","in":"query","description":"Number of items per page (-1 for all items)","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","description":"Number of page","required":false,"schema":{"type":"integer"}},{"name":"order_by","in":"query","description":"Field to order by (default: created_at)","required":false,"schema":{"type":"string"}},{"name":"order","in":"query","description":"Sorting order (asc or desc)","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"category_id","in":"query","description":"Filter by category ID","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TexturesResource"}}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"}}}}}}
```

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

#### Get Texture by ID

```
GET /open-api/v1/textures/{id}
```

**Request Parameters**

* **Path Parameters**:
  * `Id`: The unique identifier of the texture (required).

## Get texture by ID

> Get a specific texture by ID.

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"tags":[{"name":"Textures","description":"API Endpoints for managing textures"}],"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":{"TexturesResource":{"title":"Textures Resource","description":"Textures data response","properties":{"id":{"type":"integer"},"name":{"type":"string"},"texture_file":{"type":"string","format":"url"},"texture_thumbnail_50":{"type":"string","format":"url"},"texture_thumbnail_100":{"type":"string","format":"url"},"bump_file":{"type":"string","format":"url"},"category_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}},"paths":{"/api/open-api/v1/textures/{id}":{"get":{"tags":["Textures"],"summary":"Get texture by ID","description":"Get a specific texture by ID.","operationId":"04a22f530134507d67da2080f59ac6e7","parameters":[{"name":"id","in":"path","description":"ID of the texture","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TexturesResource"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Texture not found"}}}}}}
```

## The TexturesResource object

```json
{"openapi":"3.0.0","info":{"title":"Simplio3D-Open REST API","version":"1.0.0"},"components":{"schemas":{"TexturesResource":{"title":"Textures Resource","description":"Textures data response","properties":{"id":{"type":"integer"},"name":{"type":"string"},"texture_file":{"type":"string","format":"url"},"texture_thumbnail_50":{"type":"string","format":"url"},"texture_thumbnail_100":{"type":"string","format":"url"},"bump_file":{"type":"string","format":"url"},"category_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}}}
```
