# SKUs

Products in your allocated orders or in stocks you hold, with their designs, extras and stock.

## Endpoints

-   [GET `/v1/print-farm/skus`](https://public-api.dapi.digital/docs/reference/print-farm-skus.md#listPrintFarmSkus)
-   [GET `/v1/print-farm/skus/{id}`](https://public-api.dapi.digital/docs/reference/print-farm-skus.md#getPrintFarmSku)

## The SKU object

### Attributes

-   `id` (string): Opaque public identifier for this SKU (`sku_` prefix + 33 base62 chars). Use this value verbatim when referencing the SKU in other endpoints.
-   `name` (object, optional): Human-readable name of the SKU.
-   `status` (string): Lifecycle status of the SKU.
    
    Possible values: `active`, `inactive`, `deleted`.
    
-   `code` (string): Designer-defined code, unique within the designer.
-   `description` (object, optional): Free-text description of the SKU.
-   `designs` (array of PrintFarmSkuDesignDto): Designs that make up this SKU.
    -   `count` (number): Number of copies of this design included in the SKU.
    -   `design_id` (string): Public identifier of the design (`dsg_…`).
    -   `materials` (array of PrintFarmSkuDesignMaterialDto): Materials specified for this design.
        -   `type` (string): Either `default` (references a catalog material) or `custom` (designer-named).
        -   `material_id` (object, optional): Public material identifier (`mat_…`) when `type` is `default`. Null for custom materials.
        -   `name` (object, optional): Material name when `type` is `custom`.
-   `stocks` (array of PrintFarmSkuStockDto): Stocks this SKU participates in.
    -   `id` (string): Public identifier of the stock this SKU is part of (`stk_…`).
    -   `enabled` (boolean): Whether this SKU is currently enabled in the stock.
-   `extras` (array of PrintFarmSkuExtraDto): Extras attached to this SKU.
    -   `id` (string): Public identifier of the extra (`xtr_…`).
    -   `qty` (number): Quantity of this extra included.
-   `customLabelUrl` (object, optional): Public URL of the custom label set on the owning product (listing) for this SKU. May be an image or a PDF. Null when the product has no custom label.

**The SKU object**

```json
{
  "id": "sku_aB3xKp9wFqZ7vM2nLpHt12cN8jR3sLkPm",
  "name": "Dragon Figurine - Red PLA",
  "status": "active",
  "code": "DRAGON-RED-PLA",
  "description": "Red PLA dragon figurine, 100mm tall.",
  "designs": [
    {
      "count": 1,
      "design_id": "dsg_kP4xT8aBnLf2sH9eY3jZ5dM7cR1vQbWtJ",
      "materials": [
        {
          "type": "default",
          "material_id": "mat_jR6tN9pXq4sL8mB3dK7vH2cF5wYzA1ePsK",
          "name": "Transparent Red PLA"
        }
      ]
    }
  ],
  "stocks": [
    {
      "id": "stk_fL3sB8eYzKnQ7mX2dC9vR4tH6jW1uPbAcN",
      "enabled": true
    }
  ],
  "extras": [
    {
      "id": "xtr_mW2yH7cVjPq8rT5dN3kFx9eL4bA1uZcRh",
      "qty": 1
    }
  ],
  "customLabelUrl": "https://cdn.dapi.digital/labels/dragon-figurine.pdf"
}
```

## List SKUs visible to your print farm

GET `/v1/print-farm/skus`

- **Credentials**: An API key with the `SKU` or `FULL` permission.

- **For**: Print farms

- **Operation id**: `listPrintFarmSkus`

Returns a paginated list of SKUs visible to your print farm. A SKU is visible if it appears in an order allocated to your farm, or if its `stock_list` references a stock you hold inventory for. Requires an API key with the `SKU` (or `FULL`) permission scope.

### Query parameters

-   `page` (integer): 1-based page index.
    
    Range at least 1. Defaults to 1.
    
-   `page_size` (integer): Page size (max 100).
    
    Range 1 to 100. Defaults to 20.
    
-   `id` (string): Filter by SKU id. Accepts a comma-separated list of UUIDs to match any.
-   `status` (string): Filter by SKU status. Accepts a comma-separated list (active, inactive, deleted).
-   `code` (string): Filter by SKU code (case-insensitive partial match).

### Returns 200 OK

Paginated list of SKUs visible to the authenticated print farm.

Response attributes (ListPrintFarmSkusResponseDto):

-   `skus` (array of PrintFarmSkuResponseDto): SKUs on this page, sorted by creation date (newest first).
    
    Described in [the SKU object](https://public-api.dapi.digital/docs/reference/print-farm-skus.md#farm_sku_object).
    
-   `page` (number): Page number returned, matching the `page` query parameter.
    
    Range at least 1.
    
-   `page_size` (number): Number of items per page, matching the `page_size` query parameter.
    
    Range 1 to 100.
    
-   `total` (number): Total number of SKUs across all pages (after filters are applied).
    
    Range at least 0.
    

### Responses

-   `200`: Paginated list of SKUs visible to the authenticated print farm.
-   `400`: `page` or `page_size` is outside the allowed range.
-   `401`: API key is missing or invalid.
-   `403`: The API key does not have the required permission scope.
-   `429`: Rate limit exceeded - wait until the window resets before retrying.
-   `500`: An unexpected error occurred on our side.

Errors use [the print farm error body](https://public-api.dapi.digital/docs/guides/print-farm-quickstart.md#errors).

**Request**

```bash
curl "https://public-api.dapi.digital/v1/print-farm/skus" \
  -H "x-api-key: $DAPI_API_KEY"
```

**Response 200**

```json
{
  "skus": [
    {
      "id": "sku_aB3xKp9wFqZ7vM2nLpHt12cN8jR3sLkPm",
      "name": "Dragon Figurine - Red PLA",
      "status": "active",
      "code": "DRAGON-RED-PLA",
      "description": "Red PLA dragon figurine, 100mm tall.",
      "designs": [
        {
          "count": 1,
          "design_id": "dsg_kP4xT8aBnLf2sH9eY3jZ5dM7cR1vQbWtJ",
          "materials": [
            null
          ]
        }
      ],
      "stocks": [
        {
          "id": "stk_fL3sB8eYzKnQ7mX2dC9vR4tH6jW1uPbAcN",
          "enabled": true
        }
      ],
      "extras": [
        {
          "id": "xtr_mW2yH7cVjPq8rT5dN3kFx9eL4bA1uZcRh",
          "qty": 1
        }
      ],
      "customLabelUrl": "https://cdn.dapi.digital/labels/dragon-figurine.pdf"
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 42
}
```

## Get one SKU visible to your print farm

GET `/v1/print-farm/skus/{id}`

- **Credentials**: An API key with the `SKU` or `FULL` permission.

- **For**: Print farms

- **Operation id**: `getPrintFarmSku`

Returns the SKU matching the given `id`, only if it is visible to your print farm (via an allocated order or held stock). Requires an API key with the `SKU` (or `FULL`) permission scope.

### Path parameters

-   `id` (string, required): The public SKU identifier (`sku_…`) returned by the list endpoint.

### Returns 200 OK

The requested SKU. Returns [the SKU object](https://public-api.dapi.digital/docs/reference/print-farm-skus.md#farm_sku_object).

### Responses

-   `200`: The requested SKU.
-   `401`: API key is missing or invalid.
-   `403`: The API key does not have the required permission scope.
-   `404`: No SKU with this `id` is visible to your print farm.
-   `429`: Rate limit exceeded - wait until the window resets before retrying.
-   `500`: An unexpected error occurred on our side.

Errors use [the print farm error body](https://public-api.dapi.digital/docs/guides/print-farm-quickstart.md#errors).

**Request**

```bash
curl "https://public-api.dapi.digital/v1/print-farm/skus/sku_aB3xKp9wFqZ7vM2nLpHt12cN8jR3sLkPm" \
  -H "x-api-key: $DAPI_API_KEY"
```

---

3DAPI API Docs. This page on the web: https://public-api.dapi.digital/docs/reference/print-farm-skus. Index of every page: https://public-api.dapi.digital/docs/llms.txt.
