Skip to main content
PUT
/
products
/
{id}
/
kit
Replace a kit's composition
curl --request PUT \
  --url https://api.autoprintfarm.com/public/v1/products/{id}/kit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "variants": [
    {
      "color": "<string>",
      "sku_id": "<string>",
      "filament_type": "<string>",
      "hex_code": "<string>",
      "low_stock_threshold": 0,
      "bundle_extras": [
        {
          "inventory_item_id": "<string>",
          "quantity_required": 123
        }
      ]
    }
  ],
  "parts": [
    {
      "name": "<string>",
      "quantity_per_kit": 2,
      "part_id": "<string>",
      "print_file_id": "<string>",
      "fixed_color": "<string>",
      "fixed_hex_code": "<string>",
      "requires_assembly": false,
      "components": []
    }
  ],
  "description": "<string>",
  "category": "<string>",
  "requires_post_processing": true,
  "wiki_id": "<string>",
  "bundle_extras": []
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "category": "<string>",
    "requires_assembly": true,
    "requires_post_processing": true,
    "image_url": "<string>",
    "images": [
      {
        "id": "<string>",
        "sort_order": 123,
        "url": "<string>"
      }
    ],
    "is_active": true,
    "created_at": "<string>",
    "updated_at": "<string>",
    "skus": [
      {
        "id": "<string>",
        "sku": "<string>",
        "color": "<string>",
        "filament_type": "<string>",
        "hex_code": "<string>",
        "quantity": 123,
        "stock_level": 123,
        "low_stock_threshold": 123,
        "is_composite": true,
        "is_active": true,
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ],
    "components": [
      {
        "id": "<string>",
        "component_name": "<string>",
        "component_type": "<string>",
        "quantity_required": 123,
        "notes": "<string>"
      }
    ],
    "kit": {
      "parts": [
        {
          "part_id": "<string>",
          "name": "<string>",
          "print_file_id": "<string>",
          "file_name": "<string>",
          "quantity_per_kit": 123,
          "fixed_color": "<string>",
          "requires_assembly": true,
          "components": [
            {
              "id": "<string>",
              "component_name": "<string>",
              "component_type": "<string>",
              "quantity_required": 123,
              "notes": "<string>"
            }
          ],
          "variants": [
            {
              "kit_sku_id": "<string>",
              "kit_color": "<string>",
              "child_sku_id": "<string>",
              "child_sku": "<string>",
              "child_color": "<string>",
              "child_on_hand": 123
            }
          ]
        }
      ],
      "bundle_extras": [
        {
          "id": "<string>",
          "sku_id": "<string>",
          "inventory_item_id": "<string>",
          "quantity_required": 123,
          "created_at": "<string>",
          "item_name": "<string>",
          "remaining": 123
        }
      ],
      "bundle_extras_by_variant": {}
    }
  }
}

Authorizations

Authorization
string
header
required

API keys are minted in the AutoPrintFarm web app under Settings → API Keys. Send as Authorization: Bearer apf_live_.... Keys are shown exactly once at creation and can be revoked at any time.

Path Parameters

id
string
required

Body

application/json
name
string
required
Required string length: 1 - 200
variants
object[]
required
Minimum array length: 1
parts
object[]
required
Minimum array length: 1
description
string | null
Maximum string length: 2000
category
string | null
Maximum string length: 100
requires_post_processing
boolean
wiki_id
string | null
bundle_extras
object[]

Response

Kit updated

success
enum<boolean>
required
Available options:
true
data
object
required