Skip to content

API reference

Library

Search the dropshipping product library and import pieces into the shop.

Get a library product

GET/api/v1/library/{id}

One library product in full: description, selling points, every photo and variant with its cost, shipping, and margin. `imported_product_id` is set when this shop already sells it.

Scope
library:read
MCP tool
library_get
Changes data
No

Parameters

NameTypeDescription
idpath · requiredstring (uuid)The resource id

Request

curl "https://3commerce.com/api/v1/library/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c" \
  -H "Authorization: Bearer 3c_live_…"

Response

200 OK
{
  "id": "9a3d6f20-1c4e-4b8a-a7f2-5e0c9d8b1a64",
  "title": "Heavyweight organic tee",
  "supplier": "printful",
  "supplier_name": "Printful",
  "category": "apparel",
  "cost": 14.25,
  "shipping_cost": 4.75,
  "suggested_price": 38,
  "margin": 19,
  "margin_rate": 0.5,
  "image": {
    "src": "https://files.cdn.printful.com/tee.jpg",
    "alt": "Heavyweight organic tee",
    "width": 1200,
    "height": 1200
  },
  "ship_days_min": 3,
  "ship_days_max": 7,
  "polished": true,
  "imported": false,
  "description": "A boxy, heavyweight tee in 100% organic cotton.",
  "bullets": [
    "220 gsm organic cotton",
    "Garment dyed",
    "Printed on demand"
  ],
  "tags": [
    "tee",
    "organic"
  ],
  "store_category_slug": "mens-tops",
  "compare_at_price": null,
  "ship_from": "US",
  "images": [
    {
      "src": "https://files.cdn.printful.com/tee.jpg",
      "alt": "Heavyweight organic tee",
      "width": 1200,
      "height": 1200
    }
  ],
  "variants": [
    {
      "id": "4012",
      "name": "Black / M",
      "color": "Black",
      "color_hex": "#111111",
      "size": "M",
      "cost": 14.25,
      "in_stock": true
    }
  ],
  "imports": 12,
  "source_url": "https://www.printful.com/custom/mens/t-shirts",
  "imported_product_id": null
}

Import a library product

POST/api/v1/library/{id}/import

Copies a library product into the shop as a draft product, with its title, description, selling points, photos, and tags. Review it, then publish it with `products.publish`. Refused when this shop already imported it.

Scope
library:write
MCP tool
library_import
Changes data
Yes
Idempotency-Key
Accepted

Parameters

NameTypeDescription
idpath · requiredstring (uuid)The resource id
pricebody · optionalnumberRetail price in USD. Defaults to the suggested price0-100000
category_slugbody · optionalenumA storefront category from `products.categories`. Defaults to the library's suggestionone of womens-dresses, womens-jumpsuits, womens-tops, womens-sweaters, womens-trousers, womens-sets, womens-swimwear, womens-lingerie, womens-shoes, womens-jewelry, womens-watches, womens-sunglasses, womens-bags, womens-accessories, womens-fragrance, mens-tops, mens-shirts, mens-sweaters, mens-jackets, mens-trousers, mens-swimwear, mens-shoes, mens-watches, mens-sunglasses, mens-accessories, mens-jewelry, mens-bags, mens-fragrance, home-decor, home-furniture, home-kitchen, home-bedding, home-storage, home-lighting, tech-phone, tech-audio, tech-desk, tech-gadgets, tech-smart-home, tech-wearables, tech-gaming, tech-cameras, tech-pro-audio, tech-power, tech-tv, outdoor-sports, outdoor-fitness, outdoor-camping, outdoor-travel, outdoor-luggage, outdoor-cycling, outdoor-ebikes, outdoor-water, outdoor-garden, beauty-makeup, beauty-hair, beauty-skincare, beauty-bath, beauty-wellness, pets-dogs, pets-cats, pets-small, office-desk, office-paper, office-writing, office-school, office-art, auto-interior, auto-seat-covers, auto-tech, auto-cleaning, auto-exterior, gifts-stationery, gifts-tarot, gifts-games

Request

curl -X POST "https://3commerce.com/api/v1/library/6f1c2a4e-8b3d-4c5e-9a7f-1d2e3f4a5b6c/import" \
  -H "Authorization: Bearer 3c_live_…" \
  -H "Content-Type: application/json" \
  -d '{}'

Response

201 Created
{
  "id": "5f1c2a9e-8d3b-4f61-9a0e-2b7c4d1e6f80",
  "slug": "heavyweight-organic-tee",
  "title": "Heavyweight organic tee",
  "status": "draft",
  "price": 38,
  "category_slug": "mens-tops",
  "stock": 999,
  "source": "library",
  "library_product_id": "9a3d6f20-1c4e-4b8a-a7f2-5e0c9d8b1a64",
  "storefront_url": null
}