iOrdertrack Developers

Managing products

Create and update products and inventory with a write-scoped personal access token.

Adding products and updating stock are write operations. They require a personal access token that carries the matching write scope:

  • catalog:write — products and listings
  • inventory:write — stock and locations

Grant these when you create the token at Settings → API tokens (/vendor/settings/api). A token with only read scopes gets 403 on these endpoints. See Authentication for the enforcement rules.

All writes are scoped to your company — you can only create or change data for the company the token belongs to.

Create a listing

A product has two layers: a product master (the catalog entry — name, brand, description) and a vendor product (your listing of it — SKU, price). To list something new, create the master, then the listing against it.

# 1. Create the product master
curl -X POST "$IORDERTRACK_API_URL/catalog/products" \
  -H "Authorization: Bearer $IORDERTRACK_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Linen Throw Blanket", "seoSlug": "linen-throw-blanket" }'

# 2. Create your listing (vendorCompanyId must be your company)
curl -X POST "$IORDERTRACK_API_URL/catalog/vendor-products" \
  -H "Authorization: Bearer $IORDERTRACK_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "vendorCompanyId": "123",
        "productMasterId": "456",
        "vendorSku": "LIN-THROW-01",
        "listPriceCents": 4999
      }'

Look up the exact request shape any time with the get_api_schema tool, or validate a body before sending it with validate_code (see the AI Toolkit).

Update a listing

curl -X PATCH "$IORDERTRACK_API_URL/catalog/vendor-products/789" \
  -H "Authorization: Bearer $IORDERTRACK_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "listPriceCents": 4499 }'

POST /catalog/vendor-products/:id/publish clears the review flag and activates a draft listing (the underlying master must have a category).

Bulk import

POST /catalog/vendor-products/import accepts an array of rows (the same payload the portal's CSV/XLSX importer posts). Each row is independent — one bad row doesn't fail the batch; the response reports per-row outcomes.

Set inventory

Stock is upserted per (vendorProductId, locationId). Requires inventory:write.

# Create a location (once)
curl -X POST "$IORDERTRACK_API_URL/inventory/locations" \
  -H "Authorization: Bearer $IORDERTRACK_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "companyId": "123", "name": "Main Warehouse", "address1": "1 A St",
        "city": "Austin", "region": "TX", "postalCode": "78701", "country": "US" }'

# Upsert stock for a listing at that location
curl -X PUT "$IORDERTRACK_API_URL/inventory" \
  -H "Authorization: Bearer $IORDERTRACK_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "vendorProductId": "789", "locationId": "12", "onHand": 40 }'

With the AI Toolkit

The toolkit exposes a dedicated, explicitly-named store_write tool (separate from the read-only store_execute) with create_product and upsert_inventory operations. It uses your token, so the same write-scope rules apply. See the AI Toolkit page.

On this page