📡 API Reference

Product Variant Endpoints

Manage product variants (sizes, colors, configurations).

Base Path

/api/product-variant

Endpoints

List Variants

GET /api/product-variant
Authorization: Bearer {token}

Create Variant

POST /api/product-variant
Authorization: Bearer {token}
{
  "productId": "uuid",
  "options": [
    { "name": "Size", "value": "Large" },
    { "name": "Color", "value": "Blue" }
  ],
  "price": { "unitCost": 29.99, "retailPrice": 49.99 },
  "settings": {
    "isSubscription": false,
    "isPurchaseAutomatically": true,
    "canBeSold": true,
    "canBePurchased": true,
    "canBeRented": false,
    "trackInventory": true
  },
  "quantity": 100
}

Update Variant

PUT /api/product-variant/:id
Authorization: Bearer {token}

Delete Variant

DELETE /api/product-variant/:id
Authorization: Bearer {token}

Update Variant Price

PUT /api/product-variant-price/:id
Authorization: Bearer {token}

Update Variant Settings

PUT /api/product-variant-setting/:id
Authorization: Bearer {token}

Edit this page

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey