Skip to main content
POST
https://api.puppetvendors.com
/
v1
/
commissions
/
sku
Bulk Upload SKU Commissions
curl --request POST \
  --url https://api.puppetvendors.com/v1/commissions/sku \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "skus": [
    {
      "sku": "<string>",
      "commissionType": "<string>",
      "commissionRate": 123,
      "costOfGoods": 123
    }
  ]
}
'

Overview

Create or update SKU-level commission rates and cost of goods values in bulk. Each SKU is upserted — if a matching SKU already exists for your shop it is updated, otherwise a new record is created.

Use Cases

  • Bulk-set commission overrides for hundreds of SKUs at once
  • Sync cost of goods from an ERP or inventory system
  • Onboard new product lines with pre-configured commission rates
  • Periodic updates to COGS values as supplier pricing changes

Request Body

skus
array
required
Array of SKU commission records (max 500 per request).

Response

Success — all items processed:
200
{
  "success": true,
  "received": 3,
  "created": 2,
  "updated": 1,
  "errors": []
}
Partial failure — some items had validation errors:
200
{
  "success": false,
  "received": 3,
  "created": 1,
  "updated": 0,
  "errors": [
    {
      "index": 1,
      "sku": "BAD-SKU",
      "error": "commissionType must be 'percentage' or 'flat'"
    },
    {
      "index": 2,
      "sku": "",
      "error": "sku is required"
    }
  ]
}
Validation error — request-level:
422
{
  "error": "\"skus\" array is required"
}
This endpoint uses upsert behavior. If a SKU already exists for your shop, the provided fields are updated. If it doesn’t exist, a new SKU record is created. Duplicate SKUs within the same request are processed in order — the last entry wins.
Commission values are applied as-is. A commissionRate of 14 means 14% (not 0.14). Do not divide by 100.

Example

curl -X POST https://api.puppetvendors.com/v1/commissions/sku \
  -H "Content-Type: application/json" \
  -H "x-access-token: YOUR_JWT_TOKEN" \
  -d '{
    "skus": [
      {
        "sku": "TSH-LG-BLU",
        "commissionType": "percentage",
        "commissionRate": 14,
        "costOfGoods": 15.50
      },
      {
        "sku": "MUG-WHT-001",
        "commissionType": "flat",
        "commissionRate": 2.00
      }
    ]
  }'